Skip to content

Commit

Permalink
Require Node.js 10 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
AviVahl committed Oct 16, 2020
1 parent 3493be5 commit d3919a8
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,5 +1,5 @@
language: node_js
node_js:
- '14'
- '12'
- '10'
- '8'
19 changes: 8 additions & 11 deletions index.d.ts
@@ -1,4 +1,12 @@
declare const pkgDir: {
/**
Synchronously find the root directory of a Node.js project or npm package.
@param cwd - Directory to start from. Default: `process.cwd()`.
@returns The project root path or `undefined` if it couldn't be found.
*/
sync: (cwd?: string) => string | undefined;

/**
Find the root directory of a Node.js project or npm package.
Expand Down Expand Up @@ -28,17 +36,6 @@ declare const pkgDir: {
```
*/
(cwd?: string): Promise<string | undefined>;

/**
Synchronously find the root directory of a Node.js project or npm package.
@param cwd - Directory to start from. Default: `process.cwd()`.
@returns The project root path or `undefined` if it couldn't be found.
*/
sync(cwd?: string): string | undefined;

// TODO: Remove this for the next major release
default: typeof pkgDir;
};

export = pkgDir;
2 changes: 0 additions & 2 deletions index.js
Expand Up @@ -8,8 +8,6 @@ const pkgDir = async cwd => {
};

module.exports = pkgDir;
// TODO: Remove this for the next major release
module.exports.default = pkgDir;

module.exports.sync = cwd => {
const filePath = findUp.sync('package.json', {cwd});
Expand Down
108 changes: 54 additions & 54 deletions package.json
@@ -1,56 +1,56 @@
{
"name": "pkg-dir",
"version": "4.2.0",
"description": "Find the root directory of a Node.js project or npm package",
"license": "MIT",
"repository": "sindresorhus/pkg-dir",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"package",
"json",
"root",
"npm",
"entry",
"find",
"up",
"find-up",
"findup",
"look-up",
"look",
"file",
"search",
"match",
"resolve",
"parent",
"parents",
"folder",
"directory",
"dir",
"walk",
"walking",
"path"
],
"dependencies": {
"find-up": "^4.0.0"
},
"devDependencies": {
"ava": "^1.4.1",
"tempy": "^0.3.0",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
"name": "pkg-dir",
"version": "4.2.0",
"description": "Find the root directory of a Node.js project or npm package",
"license": "MIT",
"repository": "sindresorhus/pkg-dir",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"package",
"json",
"root",
"npm",
"entry",
"find",
"up",
"find-up",
"findup",
"look-up",
"look",
"file",
"search",
"match",
"resolve",
"parent",
"parents",
"folder",
"directory",
"dir",
"walk",
"walking",
"path"
],
"dependencies": {
"find-up": "^5.0.0"
},
"devDependencies": {
"ava": "^2.4.0",
"tempy": "^1.0.0",
"tsd": "^0.13.1",
"xo": "^0.33.1"
}
}

0 comments on commit d3919a8

Please sign in to comment.