fast-npm-meta 0.4.1 → 0.4.3
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/index.d.mts +10 -1
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -30,6 +30,9 @@ interface PackageError {
|
|
|
30
30
|
error: string;
|
|
31
31
|
}
|
|
32
32
|
type MaybeError<T> = T | PackageError;
|
|
33
|
+
interface PackageManifestError extends PackageError {
|
|
34
|
+
lastSynced: number;
|
|
35
|
+
}
|
|
33
36
|
interface ResolvedPackageVersion {
|
|
34
37
|
name: string;
|
|
35
38
|
version: string | null;
|
|
@@ -79,6 +82,12 @@ interface GetVersionsOptions<Metadata extends boolean = false, Throw extends boo
|
|
|
79
82
|
* @default false
|
|
80
83
|
*/
|
|
81
84
|
metadata?: Metadata;
|
|
85
|
+
/**
|
|
86
|
+
* Only return versions published after this ISO date-time
|
|
87
|
+
*
|
|
88
|
+
* @default undefined
|
|
89
|
+
*/
|
|
90
|
+
after?: string;
|
|
82
91
|
}
|
|
83
92
|
interface GetLatestVersionOptions<Metadata extends boolean = false, Throw extends boolean = true> extends FetchOptions<Throw> {
|
|
84
93
|
/**
|
|
@@ -119,4 +128,4 @@ declare const NPM_REGISTRY = "https://registry.npmjs.org/";
|
|
|
119
128
|
*/
|
|
120
129
|
declare function pickRegistry(scope: string | null | undefined, npmConfigs: Record<string, unknown>, defaultRegistry?: string): string;
|
|
121
130
|
|
|
122
|
-
export { type FetchOptions, type GetLatestVersionOptions, type GetVersionsOptions, type InferGetLatestVersionResult, type InferGetVersionsResult, NPM_REGISTRY, type PackageManifest, type ResolvedPackageVersion, defaultOptions, getLatestVersion, getLatestVersionBatch, getVersions, getVersionsBatch, pickRegistry };
|
|
131
|
+
export { type Engines, type FetchOptions, type GetLatestVersionOptions, type GetVersionsOptions, type InferGetLatestVersionResult, type InferGetVersionsResult, type MaybeError, NPM_REGISTRY, type PackageError, type PackageManifest, type PackageManifestError, type PackageVersionMeta, type PackageVersionsInfo, type PackageVersionsInfoWithMetadata, type ResolvedPackageVersion, type ResolvedPackageVersionWithMetadata, defaultOptions, getLatestVersion, getLatestVersionBatch, getVersions, getVersionsBatch, pickRegistry };
|
package/dist/index.mjs
CHANGED
|
@@ -37,6 +37,7 @@ async function getVersionsBatch(packages, options = {}) {
|
|
|
37
37
|
options.force ? "force=true" : "",
|
|
38
38
|
options.loose ? "loose=true" : "",
|
|
39
39
|
options.metadata ? "metadata=true" : "",
|
|
40
|
+
options.after ? `after=${encodeURIComponent(options.after)}` : "",
|
|
40
41
|
throwError ? "" : "throw=false"
|
|
41
42
|
].filter(Boolean).join("&");
|
|
42
43
|
if (query)
|