@pnpm/resolving.resolver-base 1100.2.0 → 1100.3.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.
Files changed (2) hide show
  1. package/lib/index.d.ts +27 -1
  2. 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
@@ -216,6 +216,7 @@ export interface ResolveOptions {
216
216
  preferWorkspacePackages?: boolean;
217
217
  workspacePackages?: WorkspacePackages;
218
218
  update?: false | 'compatible' | 'latest';
219
+ updateChecksums?: boolean;
219
220
  injectWorkspacePackages?: boolean;
220
221
  calcSpecifier?: boolean;
221
222
  pinnedVersion?: PinnedVersion;
@@ -240,3 +241,28 @@ export type WantedDependency = {
240
241
  export type ResolveFunction = (wantedDependency: WantedDependency & {
241
242
  optional?: boolean;
242
243
  }, opts: ResolveOptions) => Promise<ResolveResult>;
244
+ /**
245
+ * Input to a resolver's `resolveLatest` function. The resolver decides
246
+ * whether it owns this dep purely from `wantedDependency` (its alias and
247
+ * manifest specifier) — the lockfile-resolved ref is the caller's
248
+ * concern, not the resolver's.
249
+ */
250
+ export interface LatestQuery {
251
+ wantedDependency: WantedDependency;
252
+ compatible?: boolean;
253
+ }
254
+ /**
255
+ * Result of a resolver's `resolveLatest` call.
256
+ *
257
+ * - `undefined` means "this resolver does not handle this dep — try
258
+ * the next one".
259
+ * - An object (even without a `latestManifest`) means "I claim this
260
+ * dep, but I can't tell you what's latest" (e.g. policy blocked,
261
+ * network unavailable, no concept of latest for this protocol).
262
+ * The caller still surfaces a ref-mismatch report if the lockfile
263
+ * shifted.
264
+ */
265
+ export interface LatestInfo {
266
+ latestManifest?: PackageManifest;
267
+ }
268
+ 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.2.0",
3
+ "version": "1100.3.1",
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.0"
28
+ "@pnpm/types": "1101.2.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@pnpm/resolving.resolver-base": "1100.2.0"
31
+ "@pnpm/resolving.resolver-base": "1100.3.1"
32
32
  },
33
33
  "engines": {
34
34
  "node": ">=22.13"