diff --git a/.github/funding.yml b/.github/funding.yml deleted file mode 100644 index 8ec0bf5..0000000 --- a/.github/funding.yml +++ /dev/null @@ -1,4 +0,0 @@ -github: sindresorhus -open_collective: sindresorhus -custom: https://sindresorhus.com/donate -tidelift: npm/latest-version diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d50ada6..346585c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/index.d.ts b/index.d.ts index 8149f74..b9be850 100644 --- a/index.d.ts +++ b/index.d.ts @@ -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. diff --git a/package.json b/package.json index 41825bd..dc64f4e 100644 --- a/package.json +++ b/package.json @@ -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" @@ -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" } } diff --git a/readme.md b/readme.md index c937e3d..2a1ae12 100644 --- a/readme.md +++ b/readme.md @@ -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 - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-