@pnpm/fetching.tarball-fetcher 1102.1.3 → 1102.1.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @pnpm/tarball-fetcher
2
2
 
3
+ ## 1102.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - `pnpm install` now fails at once when a registry or tarball server presents a TLS certificate that fails verification, such as a self-signed or expired one. The error names the certificate problem. Such requests were retried for more than a minute [#9134](https://github.com/pnpm/pnpm/issues/9134).
8
+
9
+ - `pnpm import` and fresh resolutions now record `integrity` for git-hosted tarballs, such as `codeload.github.com` URLs, even when the tarball is already in the store [#13338](https://github.com/pnpm/pnpm/issues/13338).
10
+
11
+ - When the registry stops sending data for longer than `fetchTimeout`, pnpm now reports that the metadata or tarball request timed out. Previously the error did not mention the timeout [#3646](https://github.com/pnpm/pnpm/issues/3646).
12
+
13
+ - Updated dependencies:
14
+ - @pnpm/core-loggers@1101.0.1
15
+ - @pnpm/error@1100.2.0
16
+ - @pnpm/exec.prepare-package@1100.0.38
17
+ - @pnpm/fetching.fetcher-base@1100.2.11
18
+ - @pnpm/fs.graceful-fs@1100.2.3
19
+ - @pnpm/fs.packlist@1100.0.5
20
+ - @pnpm/network.fetch@1100.1.18
21
+ - @pnpm/store.index@1100.3.2
22
+ - @pnpm/types@1102.1.1
23
+
3
24
  ## 1102.1.3
4
25
 
5
26
  ### Patch Changes
@@ -38,7 +38,9 @@ export function createGitHostedTarballFetcher(fetchRemoteTarball, fetcherOpts) {
38
38
  throw err;
39
39
  }
40
40
  };
41
- return fetch;
41
+ return Object.assign(fetch, {
42
+ resolutionNeedsFetch: fetchRemoteTarball.resolutionNeedsFetch?.bind(fetchRemoteTarball),
43
+ });
42
44
  }
43
45
  async function prepareGitHostedPkg(filesMap, cafs, rawFilesIndexFile, filesIndexFile, opts, fetcherOpts, resolution) {
44
46
  const tempLocation = await cafs.tempDir();
@@ -1,8 +1,9 @@
1
1
  import { isIP } from 'node:net';
2
2
  import util from 'node:util';
3
3
  import { requestRetryLogger } from '@pnpm/core-loggers';
4
- import { FetchError, redactUrlForDisplay } from '@pnpm/error';
4
+ import { FetchError, FetchTimeoutError, isFetchTimeoutError, redactUrlForDisplay } from '@pnpm/error';
5
5
  import { globalWarn } from '@pnpm/logger';
6
+ import { isNonRetryableError } from '@pnpm/network.fetch';
6
7
  import { addFilesFromTarball } from '@pnpm/worker';
7
8
  import * as retry from '@zkochan/retry';
8
9
  import throttle from 'lodash.throttle';
@@ -31,7 +32,8 @@ export function createDownloader(fetchFromRegistry, gotOpts) {
31
32
  error.response?.status === 401 ||
32
33
  error.response?.status === 403 ||
33
34
  error.response?.status === 404 ||
34
- error.code === 'ERR_PNPM_PREPARE_PKG_FAILURE') {
35
+ error.code === 'ERR_PNPM_PREPARE_PKG_FAILURE' ||
36
+ isNonRetryableError(error)) {
35
37
  reject(error);
36
38
  return;
37
39
  }
@@ -152,7 +154,9 @@ export function createDownloader(fetchFromRegistry, gotOpts) {
152
154
  }
153
155
  }
154
156
  catch (err) {
155
- const error = util.types.isNativeError(err) ? err : new Error(String(err), { cause: err });
157
+ const error = isFetchTimeoutError(err)
158
+ ? new FetchTimeoutError('FETCH_TIMEOUT', url, gotOpts.timeout, { cause: err })
159
+ : util.types.isNativeError(err) ? err : new Error(String(err), { cause: err });
156
160
  Object.assign(error, {
157
161
  attempts: currentAttempt,
158
162
  resource: url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/fetching.tarball-fetcher",
3
- "version": "1102.1.3",
3
+ "version": "1102.1.4",
4
4
  "description": "Fetcher for packages hosted as tarballs",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -29,33 +29,33 @@
29
29
  "!*.map"
30
30
  ],
31
31
  "dependencies": {
32
- "@pnpm/core-loggers": "1101.0.0",
33
- "@pnpm/error": "1100.1.4",
34
- "@pnpm/exec.prepare-package": "1100.0.37",
35
- "@pnpm/fetching.fetcher-base": "1100.2.10",
32
+ "@pnpm/core-loggers": "1101.0.1",
33
+ "@pnpm/error": "1100.2.0",
34
+ "@pnpm/exec.prepare-package": "1100.0.38",
35
+ "@pnpm/fetching.fetcher-base": "1100.2.11",
36
36
  "@pnpm/fetching.types": "1100.0.3",
37
- "@pnpm/fs.graceful-fs": "1100.2.2",
38
- "@pnpm/fs.packlist": "1100.0.4",
39
- "@pnpm/store.index": "1100.3.1",
40
- "@pnpm/types": "1102.1.0",
37
+ "@pnpm/fs.graceful-fs": "1100.2.3",
38
+ "@pnpm/fs.packlist": "1100.0.5",
39
+ "@pnpm/network.fetch": "1100.1.18",
40
+ "@pnpm/store.index": "1100.3.2",
41
+ "@pnpm/types": "1102.1.1",
41
42
  "@zkochan/retry": "^0.2.0",
42
43
  "lodash.throttle": "4.1.1",
43
44
  "ramda": "npm:@pnpm/ramda@0.28.1"
44
45
  },
45
46
  "peerDependencies": {
46
47
  "@pnpm/logger": "^1100.0.0",
47
- "@pnpm/worker": "^1100.4.3"
48
+ "@pnpm/worker": "^1100.4.4"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@jest/globals": "30.4.1",
51
- "@pnpm/fetching.tarball-fetcher": "1102.1.3",
52
+ "@pnpm/fetching.tarball-fetcher": "1102.1.4",
52
53
  "@pnpm/logger": "1100.0.0",
53
- "@pnpm/network.fetch": "1100.1.17",
54
54
  "@pnpm/store.cafs-types": "1100.1.0",
55
- "@pnpm/store.create-cafs-store": "1100.0.30",
55
+ "@pnpm/store.create-cafs-store": "1100.0.31",
56
56
  "@pnpm/test-fixtures": "1100.0.1",
57
57
  "@pnpm/text.ordinal-comparator": "1100.0.0",
58
- "@pnpm/types": "1102.1.0",
58
+ "@pnpm/types": "1102.1.1",
59
59
  "@types/lodash.throttle": "4.1.9",
60
60
  "@types/ramda": "0.32.0",
61
61
  "@types/retry": "^0.12.5",