@pnpm/fetching.fetcher-base 1100.1.8 → 1100.2.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.
Files changed (2) hide show
  1. package/lib/index.d.ts +8 -1
  2. package/package.json +6 -6
package/lib/index.d.ts CHANGED
@@ -20,7 +20,14 @@ export interface FetchOptions {
20
20
  */
21
21
  ignoreFilePattern?: string;
22
22
  }
23
- export type FetchFunction<FetcherResolution = Resolution, Options = FetchOptions, Result = FetchResult> = (cafs: Cafs, resolution: FetcherResolution, opts: Options) => Promise<Result>;
23
+ export interface ResolutionFetchContract {
24
+ /**
25
+ * Returns `true` when a resolution is missing data only this fetcher can supply, so
26
+ * callers must fetch before treating the resolution as complete.
27
+ */
28
+ resolutionNeedsFetch?: (resolution: Resolution) => boolean;
29
+ }
30
+ export type FetchFunction<FetcherResolution = Resolution, Options = FetchOptions, Result = FetchResult> = ((cafs: Cafs, resolution: FetcherResolution, opts: Options) => Promise<Result>) & ResolutionFetchContract;
24
31
  export interface FetchResult {
25
32
  local?: boolean;
26
33
  manifest?: BundledManifest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/fetching.fetcher-base",
3
- "version": "1100.1.8",
3
+ "version": "1100.2.0",
4
4
  "description": "Types for pnpm-compatible fetchers",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -11,9 +11,9 @@
11
11
  "funding": "https://opencollective.com/pnpm",
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "https://github.com/pnpm/pnpm/tree/main/fetching/fetcher-base"
14
+ "url": "https://github.com/pnpm/pnpm/tree/main/pnpm11/fetching/fetcher-base"
15
15
  },
16
- "homepage": "https://github.com/pnpm/pnpm/tree/main/fetching/fetcher-base#readme",
16
+ "homepage": "https://github.com/pnpm/pnpm/tree/main/pnpm11/fetching/fetcher-base#readme",
17
17
  "bugs": {
18
18
  "url": "https://github.com/pnpm/pnpm/issues"
19
19
  },
@@ -29,11 +29,11 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@types/ssri": "^7.1.5",
32
- "@pnpm/resolving.resolver-base": "1100.4.1",
33
- "@pnpm/types": "1101.3.1"
32
+ "@pnpm/resolving.resolver-base": "1100.5.0",
33
+ "@pnpm/types": "1101.3.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@pnpm/fetching.fetcher-base": "1100.1.8",
36
+ "@pnpm/fetching.fetcher-base": "1100.2.0",
37
37
  "@pnpm/store.cafs-types": "1100.0.1"
38
38
  },
39
39
  "engines": {