Skip to content

Commit

Permalink
Require Node.js 18
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 3, 2023
1 parent ec9827e commit 935a546
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ jobs:
node-version:
- 20
- 18
- 16
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'node:path';
import {findUp, findUpSync} from 'find-up';
import {findUp, findUpSync} from 'find-up-simple';
import {readPackage, readPackageSync} from 'read-pkg';

export async function readPackageUp(options) {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"default": "./index.js"
},
"engines": {
"node": ">=16"
"node": ">=18"
},
"scripts": {
"test": "xo && ava && tsd"
Expand Down Expand Up @@ -52,13 +52,13 @@
"path"
],
"dependencies": {
"find-up": "^6.3.0",
"read-pkg": "^8.1.0",
"type-fest": "^4.2.0"
"find-up-simple": "^1.0.0",
"read-pkg": "^9.0.0",
"type-fest": "^4.6.0"
},
"devDependencies": {
"ava": "^5.3.1",
"tsd": "^0.28.1",
"tsd": "^0.29.0",
"xo": "^0.56.0"
},
"xo": {
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ console.log(await readPackageUp());

### readPackageUp(options?)

Returns a `Promise<object>` or `Promise<undefined>` if no `package.json` was found.
Returns a `Promise<object>`, or `Promise<undefined>` if no `package.json` was found.

### readPackageUpSync(options?)

Returns the result object or `undefined` if no `package.json` was found.
Returns the result object, or `undefined` if no `package.json` was found.

#### options

Expand Down

0 comments on commit 935a546

Please sign in to comment.