fast-npm-meta 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +8 -2
- package/dist/index.mjs +7 -1
- package/package.json +2 -2
- package/skills/fast-npm-meta/SKILL.md +1 -2
package/dist/cli.mjs
CHANGED
|
@@ -619,7 +619,7 @@ var CAC = class extends EventTarget {
|
|
|
619
619
|
const cac = (name = "") => new CAC(name);
|
|
620
620
|
//#endregion
|
|
621
621
|
//#region package.json
|
|
622
|
-
var version = "1.5.
|
|
622
|
+
var version = "1.5.1";
|
|
623
623
|
//#endregion
|
|
624
624
|
//#region ../node_modules/.pnpm/is-network-error@1.3.0/node_modules/is-network-error/index.js
|
|
625
625
|
const objectToString = Object.prototype.toString;
|
|
@@ -816,7 +816,13 @@ const defaultRetryOptions = {
|
|
|
816
816
|
maxTimeout: Infinity,
|
|
817
817
|
randomize: false
|
|
818
818
|
};
|
|
819
|
-
const defaultOptions = {
|
|
819
|
+
const defaultOptions = {
|
|
820
|
+
/**
|
|
821
|
+
* API endpoint for fetching package versions
|
|
822
|
+
*
|
|
823
|
+
* @default 'https://npm.antfu.dev/'
|
|
824
|
+
*/
|
|
825
|
+
apiEndpoint: "https://npm.antfu.dev/" };
|
|
820
826
|
async function getLatestVersionBatch(packages, options = {}) {
|
|
821
827
|
const { apiEndpoint = defaultOptions.apiEndpoint, fetch: fetchApi = fetch, throw: throwError = true, retry = defaultRetryOptions } = options;
|
|
822
828
|
let query = [
|
package/dist/index.mjs
CHANGED
|
@@ -193,7 +193,13 @@ const defaultRetryOptions = {
|
|
|
193
193
|
maxTimeout: Infinity,
|
|
194
194
|
randomize: false
|
|
195
195
|
};
|
|
196
|
-
const defaultOptions = {
|
|
196
|
+
const defaultOptions = {
|
|
197
|
+
/**
|
|
198
|
+
* API endpoint for fetching package versions
|
|
199
|
+
*
|
|
200
|
+
* @default 'https://npm.antfu.dev/'
|
|
201
|
+
*/
|
|
202
|
+
apiEndpoint: "https://npm.antfu.dev/" };
|
|
197
203
|
async function getLatestVersionBatch(packages, options = {}) {
|
|
198
204
|
const { apiEndpoint = defaultOptions.apiEndpoint, fetch: fetchApi = fetch, throw: throwError = true, retry = defaultRetryOptions } = options;
|
|
199
205
|
let query = [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fast-npm-meta",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.1",
|
|
5
5
|
"description": "Get npm package metadata",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"cac": "^7.0.0",
|
|
31
31
|
"p-retry": "^8.0.0",
|
|
32
|
-
"tsdown": "^0.21.
|
|
32
|
+
"tsdown": "^0.21.10"
|
|
33
33
|
},
|
|
34
34
|
"inlinedDependencies": {
|
|
35
35
|
"cac": "7.0.0",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fast-npm-meta
|
|
3
|
-
description:
|
|
4
|
-
license: MIT
|
|
3
|
+
description: Queries npm package metadata via the fast-npm-meta CLI — resolves package versions, dist-tags, publish dates, engine requirements, and version range specifiers. Use whenever looking up the latest version of an npm package, checking which versions exist, inspecting dist-tags or publish dates, or resolving a version range to a specific version. Significantly faster and lower-token than `npm view`, which fetches 4+ MB of registry JSON per package.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# fast-npm-meta CLI
|