@pnpm/fetching.tarball-fetcher 1101.0.13 → 1102.0.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.
@@ -1,20 +1,21 @@
1
1
  import type { IncomingMessage } from 'node:http';
2
2
  import type { FetchOptions, FetchResult } from '@pnpm/fetching.fetcher-base';
3
- import type { FetchFromRegistry } from '@pnpm/fetching.types';
3
+ import type { FetchFromRegistry, GetAuthHeader } from '@pnpm/fetching.types';
4
4
  import type { Cafs } from '@pnpm/store.cafs-types';
5
5
  import type { StoreIndex } from '@pnpm/store.index';
6
6
  export interface HttpResponse {
7
7
  body: string;
8
8
  }
9
9
  export type DownloadOptions = {
10
- getAuthHeaderByURI: (registry: string) => string | undefined;
10
+ getAuthHeaderByURI: GetAuthHeader;
11
11
  cafs: Cafs;
12
12
  registry?: string;
13
13
  onStart?: (totalSize: number | null, attempt: number) => void;
14
14
  onProgress?: (downloaded: number) => void;
15
15
  integrity?: string;
16
16
  storeIndex: StoreIndex;
17
- } & Pick<FetchOptions, 'pkg' | 'appendManifest' | 'readManifest' | 'filesIndexFile' | 'ignoreFilePattern'>;
17
+ pkg?: FetchOptions['pkg'];
18
+ } & Pick<FetchOptions, 'appendManifest' | 'readManifest' | 'filesIndexFile' | 'ignoreFilePattern'>;
18
19
  export type DownloadFunction = (url: string, opts: DownloadOptions) => Promise<FetchResult>;
19
20
  export interface NpmRegistryClient {
20
21
  get: (url: string, getOpts: object, cb: (err: Error, data: object, raw: object, res: HttpResponse) => void) => void;
@@ -17,7 +17,7 @@ export function createDownloader(fetchFromRegistry, gotOpts) {
17
17
  };
18
18
  const fetchMinSpeedKiBps = gotOpts.fetchMinSpeedKiBps ?? 50; // 50 KiB/s
19
19
  return async function download(url, opts) {
20
- const authHeaderValue = opts.getAuthHeaderByURI(url);
20
+ const authHeaderValue = opts.getAuthHeaderByURI(url, { pkgName: opts.pkg?.name });
21
21
  const op = retry.operation(retryOpts);
22
22
  return new Promise((resolve, reject) => {
23
23
  op.attempt(async (attempt) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/fetching.tarball-fetcher",
3
- "version": "1101.0.13",
3
+ "version": "1102.0.0",
4
4
  "description": "Fetcher for packages hosted as tarballs",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -33,37 +33,37 @@
33
33
  "lodash.throttle": "4.1.1",
34
34
  "p-map-values": "^0.1.0",
35
35
  "ramda": "npm:@pnpm/ramda@0.28.1",
36
+ "@pnpm/exec.prepare-package": "1100.0.18",
36
37
  "@pnpm/error": "1100.0.0",
37
- "@pnpm/core-loggers": "1100.1.4",
38
- "@pnpm/exec.prepare-package": "1100.0.16",
39
- "@pnpm/fetching.fetcher-base": "1100.1.8",
40
- "@pnpm/fetching.types": "1100.0.1",
38
+ "@pnpm/core-loggers": "1100.2.1",
39
+ "@pnpm/fetching.types": "1100.0.2",
41
40
  "@pnpm/fs.packlist": "1100.0.1",
42
- "@pnpm/fs.graceful-fs": "1100.1.0",
43
- "@pnpm/store.index": "1100.1.0",
44
- "@pnpm/types": "1101.3.1"
41
+ "@pnpm/store.index": "1100.2.0",
42
+ "@pnpm/types": "1101.3.2",
43
+ "@pnpm/fetching.fetcher-base": "1100.1.9",
44
+ "@pnpm/fs.graceful-fs": "1100.1.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "@pnpm/logger": "^1001.0.1",
48
- "@pnpm/worker": "^1100.1.10"
47
+ "@pnpm/logger": "^1100.0.0",
48
+ "@pnpm/worker": "^1100.2.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@jest/globals": "30.3.0",
52
- "@pnpm/util.lex-comparator": "^3.0.2",
51
+ "@jest/globals": "30.4.1",
52
+ "@pnpm/util.lex-comparator": "^4.0.1",
53
53
  "@types/lodash.throttle": "4.1.9",
54
54
  "@types/ramda": "0.31.1",
55
55
  "@types/retry": "^0.12.5",
56
56
  "@types/ssri": "^7.1.5",
57
57
  "ssri": "13.0.1",
58
58
  "tempy": "3.0.0",
59
- "undici": "^7.26.0",
60
- "@pnpm/fetching.tarball-fetcher": "1101.0.13",
61
- "@pnpm/store.cafs-types": "1100.0.1",
62
- "@pnpm/network.fetch": "1100.1.1",
59
+ "undici": "^7.27.2",
63
60
  "@pnpm/logger": "1100.0.0",
64
- "@pnpm/store.create-cafs-store": "1100.0.12",
65
- "@pnpm/test-fixtures": "1100.0.0",
66
- "@pnpm/types": "1101.3.1"
61
+ "@pnpm/store.cafs-types": "1100.0.1",
62
+ "@pnpm/network.fetch": "1100.1.3",
63
+ "@pnpm/store.create-cafs-store": "1100.0.14",
64
+ "@pnpm/types": "1101.3.2",
65
+ "@pnpm/fetching.tarball-fetcher": "1102.0.0",
66
+ "@pnpm/test-fixtures": "1100.0.0"
67
67
  },
68
68
  "engines": {
69
69
  "node": ">=22.13"