Skip to content

Commit

Permalink
Require Node.js 18
Browse files Browse the repository at this point in the history
Fixes #24
  • Loading branch information
sindresorhus committed Jan 23, 2024
1 parent b79a0ce commit bebb80b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 30 deletions.
4 changes: 0 additions & 4 deletions .github/funding.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ jobs:
fail-fast: false
matrix:
node-version:
- 20
- 18
- 16
- 14
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
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export interface Options {
export type Options = {
/**
A semver range or [dist-tag](https://docs.npmjs.com/cli/dist-tag).
*/
readonly version?: string;
}
};

/**
Get the latest version of an npm package.
Expand Down
19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"sideEffects": false,
"engines": {
"node": ">=14.16"
"node": ">=18"
},
"scripts": {
"test": "xo && ava && tsd"
Expand All @@ -33,14 +37,13 @@
"module"
],
"dependencies": {
"package-json": "^8.1.0"
"package-json": "^9.0.0"
},
"devDependencies": {
"ava": "^4.3.0",
"semver": "^7.3.7",
"ava": "^6.1.0",
"semver": "^7.5.4",
"semver-regex": "^4.0.5",
"tsd": "^0.21.0",
"typescript": "^4.7.4",
"xo": "^0.50.0"
"tsd": "^0.30.4",
"xo": "^0.56.0"
}
}
12 changes: 0 additions & 12 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,3 @@ console.log(await latestVersion('npm', {version: 'latest-5'}));

- [latest-version-cli](https://github.com/sindresorhus/latest-version-cli) - CLI for this module
- [package-json](https://github.com/sindresorhus/package-json) - Get the package.json of a package from the npm registry

---

<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-latest-version?utm_source=npm-latest-version&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

0 comments on commit bebb80b

Please sign in to comment.