@pnpm/resolving.npm-resolver 1102.1.5 → 1102.1.6

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,11 @@
1
1
  # @pnpm/npm-resolver
2
2
 
3
+ ## 1102.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed `pnpm install` running out of memory while resolving large dependency graphs [#8441](https://github.com/pnpm/pnpm/issues/8441). The resolver kept full registry documents — per-version readmes, scripts, descriptions, and other install-irrelevant bulk — in memory for every package fetched with full metadata (optional dependencies, and packages re-fetched for `minimumReleaseAge`'s publish timestamps). Every retained document is now condensed down to the field set installation actually reads, which reduces peak resolution memory by several times on workspaces with more than a thousand packages.
8
+
3
9
  ## 1102.1.5
4
10
 
5
11
  ### Patch Changes
package/lib/index.js CHANGED
@@ -12,6 +12,7 @@ import { clone } from 'ramda';
12
12
  import semver from 'semver';
13
13
  import ssri from 'ssri';
14
14
  import versionSelectorType from 'version-selector-type';
15
+ import { clearMeta, retainsFullMeta } from './clearMeta.js';
15
16
  import { fetchMetadataFromFromRegistry, RegistryResponseError } from './fetch.js';
16
17
  import { memoizeFetchMetadata } from './memoizeFetchMetadata.js';
17
18
  import { normalizeRegistryUrl } from './normalizeRegistryUrl.js';
@@ -75,7 +76,9 @@ export function createNpmResolver(fetchFromRegistry, getAuthHeader, opts) {
75
76
  timeout: opts.timeout ?? 60000,
76
77
  fetchWarnTimeoutMs: opts.fetchWarnTimeoutMs ?? 10 * 1000, // 10 sec
77
78
  };
78
- const { fetch, clear: clearFetchCache } = memoizeFetchMetadata(fetchMetadataFromFromRegistry.bind(null, fetchOpts));
79
+ const { fetch, clear: clearFetchCache } = memoizeFetchMetadata(fetchMetadataFromFromRegistry.bind(null, fetchOpts), {
80
+ condenseSettledMeta: retainsFullMeta(opts) ? undefined : clearMeta,
81
+ });
79
82
  // Track ownership so `clearCache()` below only wipes the in-memory
80
83
  // cache when this factory created it. A caller-supplied
81
84
  // `opts.metaCache` may be shared with another resolver instance (or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/resolving.npm-resolver",
3
- "version": "1102.1.5",
3
+ "version": "1102.1.6",
4
4
  "description": "Resolver for npm-hosted packages",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -69,7 +69,7 @@
69
69
  "@jest/globals": "30.4.1",
70
70
  "@pnpm/logger": "1100.0.0",
71
71
  "@pnpm/network.fetch": "1100.1.6",
72
- "@pnpm/resolving.npm-resolver": "1102.1.5",
72
+ "@pnpm/resolving.npm-resolver": "1102.1.6",
73
73
  "@pnpm/test-fixtures": "1100.0.0",
74
74
  "@pnpm/testing.mock-agent": "1101.0.6",
75
75
  "@types/normalize-path": "^3.0.2",