Skip to content

Commit d3919a8

Browse files
authoredOct 16, 2020
Require Node.js 10 (#9)
1 parent 3493be5 commit d3919a8

File tree

4 files changed

+63
-68
lines changed

4 files changed

+63
-68
lines changed
 

‎.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: node_js
22
node_js:
3+
- '14'
34
- '12'
45
- '10'
5-
- '8'

‎index.d.ts

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
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+
210
/**
311
Find the root directory of a Node.js project or npm package.
412
@@ -28,17 +36,6 @@ declare const pkgDir: {
2836
```
2937
*/
3038
(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;
4239
};
4340

4441
export = pkgDir;

‎index.js

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ const pkgDir = async cwd => {
88
};
99

1010
module.exports = pkgDir;
11-
// TODO: Remove this for the next major release
12-
module.exports.default = pkgDir;
1311

1412
module.exports.sync = cwd => {
1513
const filePath = findUp.sync('package.json', {cwd});

‎package.json

+54-54
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
{
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+
}
5656
}

0 commit comments

Comments
 (0)
Please sign in to comment.