@pnpm/resolving.resolver-base 1100.2.0 → 1100.3.0
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/lib/index.d.ts +26 -1
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DependencyManifest, PackageVersionPolicy, PinnedVersion, PkgResolutionId, ProjectRootDir, SupportedArchitectures, TrustPolicy } from '@pnpm/types';
|
|
1
|
+
import type { DependencyManifest, PackageManifest, PackageVersionPolicy, PinnedVersion, PkgResolutionId, ProjectRootDir, SupportedArchitectures, TrustPolicy } from '@pnpm/types';
|
|
2
2
|
export { type PkgResolutionId };
|
|
3
3
|
/**
|
|
4
4
|
* tarball hosted remotely
|
|
@@ -240,3 +240,28 @@ export type WantedDependency = {
|
|
|
240
240
|
export type ResolveFunction = (wantedDependency: WantedDependency & {
|
|
241
241
|
optional?: boolean;
|
|
242
242
|
}, opts: ResolveOptions) => Promise<ResolveResult>;
|
|
243
|
+
/**
|
|
244
|
+
* Input to a resolver's `resolveLatest` function. The resolver decides
|
|
245
|
+
* whether it owns this dep purely from `wantedDependency` (its alias and
|
|
246
|
+
* manifest specifier) — the lockfile-resolved ref is the caller's
|
|
247
|
+
* concern, not the resolver's.
|
|
248
|
+
*/
|
|
249
|
+
export interface LatestQuery {
|
|
250
|
+
wantedDependency: WantedDependency;
|
|
251
|
+
compatible?: boolean;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Result of a resolver's `resolveLatest` call.
|
|
255
|
+
*
|
|
256
|
+
* - `undefined` means "this resolver does not handle this dep — try
|
|
257
|
+
* the next one".
|
|
258
|
+
* - An object (even without a `latestManifest`) means "I claim this
|
|
259
|
+
* dep, but I can't tell you what's latest" (e.g. policy blocked,
|
|
260
|
+
* network unavailable, no concept of latest for this protocol).
|
|
261
|
+
* The caller still surfaces a ref-mismatch report if the lockfile
|
|
262
|
+
* shifted.
|
|
263
|
+
*/
|
|
264
|
+
export interface LatestInfo {
|
|
265
|
+
latestManifest?: PackageManifest;
|
|
266
|
+
}
|
|
267
|
+
export type ResolveLatestFunction = (query: LatestQuery, opts: ResolveOptions) => Promise<LatestInfo | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/resolving.resolver-base",
|
|
3
|
-
"version": "1100.
|
|
3
|
+
"version": "1100.3.0",
|
|
4
4
|
"description": "Types for pnpm-compatible resolvers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"!*.map"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@pnpm/types": "1101.1.
|
|
28
|
+
"@pnpm/types": "1101.1.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@pnpm/resolving.resolver-base": "1100.
|
|
31
|
+
"@pnpm/resolving.resolver-base": "1100.3.0"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=22.13"
|