File tree 4 files changed +63
-68
lines changed
4 files changed +63
-68
lines changed Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js :
3
+ - ' 14'
3
4
- ' 12'
4
5
- ' 10'
5
- - ' 8'
Original file line number Diff line number Diff line change 1
1
declare const pkgDir : {
2
+ /**
3
+ Synchronously find the root directory of a Node.js project or npm package.
4
+
5
+ @param cwd - Directory to start from. Default: `process.cwd()`.
6
+ @returns The project root path or `undefined` if it couldn't be found.
7
+ */
8
+ sync : ( cwd ?: string ) => string | undefined ;
9
+
2
10
/**
3
11
Find the root directory of a Node.js project or npm package.
4
12
@@ -28,17 +36,6 @@ declare const pkgDir: {
28
36
```
29
37
*/
30
38
( cwd ?: string ) : Promise < string | undefined > ;
31
-
32
- /**
33
- Synchronously find the root directory of a Node.js project or npm package.
34
-
35
- @param cwd - Directory to start from. Default: `process.cwd()`.
36
- @returns The project root path or `undefined` if it couldn't be found.
37
- */
38
- sync ( cwd ?: string ) : string | undefined ;
39
-
40
- // TODO: Remove this for the next major release
41
- default : typeof pkgDir ;
42
39
} ;
43
40
44
41
export = pkgDir ;
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ const pkgDir = async cwd => {
8
8
} ;
9
9
10
10
module . exports = pkgDir ;
11
- // TODO: Remove this for the next major release
12
- module . exports . default = pkgDir ;
13
11
14
12
module . exports . sync = cwd => {
15
13
const filePath = findUp . sync ( 'package.json' , { cwd} ) ;
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " pkg-dir" ,
3
- "version" : " 4.2.0" ,
4
- "description" : " Find the root directory of a Node.js project or npm package" ,
5
- "license" : " MIT" ,
6
- "repository" : " sindresorhus/pkg-dir" ,
7
- "author" : {
8
- "name" : " Sindre Sorhus" ,
9
- "email" : " sindresorhus@gmail.com" ,
10
- "url" : " sindresorhus.com"
11
- },
12
- "engines" : {
13
- "node" : " >=8 "
14
- },
15
- "scripts" : {
16
- "test" : " xo && ava && tsd"
17
- },
18
- "files" : [
19
- " index.js" ,
20
- " index.d.ts"
21
- ],
22
- "keywords" : [
23
- " package" ,
24
- " json" ,
25
- " root" ,
26
- " npm" ,
27
- " entry" ,
28
- " find" ,
29
- " up" ,
30
- " find-up" ,
31
- " findup" ,
32
- " look-up" ,
33
- " look" ,
34
- " file" ,
35
- " search" ,
36
- " match" ,
37
- " resolve" ,
38
- " parent" ,
39
- " parents" ,
40
- " folder" ,
41
- " directory" ,
42
- " dir" ,
43
- " walk" ,
44
- " walking" ,
45
- " path"
46
- ],
47
- "dependencies" : {
48
- "find-up" : " ^4 .0.0"
49
- },
50
- "devDependencies" : {
51
- "ava" : " ^1 .4.1 " ,
52
- "tempy" : " ^0.3 .0" ,
53
- "tsd" : " ^0.7.2 " ,
54
- "xo" : " ^0.24.0 "
55
- }
2
+ "name" : " pkg-dir" ,
3
+ "version" : " 4.2.0" ,
4
+ "description" : " Find the root directory of a Node.js project or npm package" ,
5
+ "license" : " MIT" ,
6
+ "repository" : " sindresorhus/pkg-dir" ,
7
+ "author" : {
8
+ "name" : " Sindre Sorhus" ,
9
+ "email" : " sindresorhus@gmail.com" ,
10
+ "url" : " https:// sindresorhus.com"
11
+ },
12
+ "engines" : {
13
+ "node" : " >=10 "
14
+ },
15
+ "scripts" : {
16
+ "test" : " xo && ava && tsd"
17
+ },
18
+ "files" : [
19
+ " index.js" ,
20
+ " index.d.ts"
21
+ ],
22
+ "keywords" : [
23
+ " package" ,
24
+ " json" ,
25
+ " root" ,
26
+ " npm" ,
27
+ " entry" ,
28
+ " find" ,
29
+ " up" ,
30
+ " find-up" ,
31
+ " findup" ,
32
+ " look-up" ,
33
+ " look" ,
34
+ " file" ,
35
+ " search" ,
36
+ " match" ,
37
+ " resolve" ,
38
+ " parent" ,
39
+ " parents" ,
40
+ " folder" ,
41
+ " directory" ,
42
+ " dir" ,
43
+ " walk" ,
44
+ " walking" ,
45
+ " path"
46
+ ],
47
+ "dependencies" : {
48
+ "find-up" : " ^5 .0.0"
49
+ },
50
+ "devDependencies" : {
51
+ "ava" : " ^2 .4.0 " ,
52
+ "tempy" : " ^1.0 .0" ,
53
+ "tsd" : " ^0.13.1 " ,
54
+ "xo" : " ^0.33.1 "
55
+ }
56
56
}
You can’t perform that action at this time.
0 commit comments