@pnpm/deps.graph-builder 1100.2.2 → 1101.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # @pnpm/deps.graph-builder
2
2
 
3
+ ## 1101.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - @pnpm/lockfile.fs@1100.2.4
9
+
10
+ ## 1101.0.0
11
+
12
+ ### Major Changes
13
+
14
+ - The three registry lookups are now named for what they are keyed by, so that none of them is called `registries` — a name the `registries` setting itself has taken:
15
+
16
+ | before | after |
17
+ |---|---|
18
+ | `Config.registries` | `Config.registriesByScope` |
19
+ | `Config.namedRegistries` | `Config.registriesByPrefix` |
20
+ | `Config.registryOptions` | `Config.registryOptionsByUrl` |
21
+
22
+ The same rename applies to the `RegistryContext` fields, the `Registries` and `NamedRegistries` types (now `RegistriesByScope` and `RegistriesByPrefix`), `normalizeRegistries` / `normalizeNamedRegistries` (now `normalizeRegistriesByScope` / `normalizeRegistriesByPrefix`), and the `BUILTIN_NAMED_REGISTRIES` constant (now `BUILTIN_REGISTRIES_BY_PREFIX`).
23
+
24
+ This is an internal rename: no setting, error code, lockfile field, or `.pnpmfile.cjs` hook field changes. A `preResolution` hook still reads `ctx.registries`, which is the name pacquet passes as well. The `registries` and `namedRegistries` settings are read under the names users write them.
25
+
26
+ The pnpr resolve request sends `registriesByPrefix` where it sent `namedRegistries`. A pnpr server and its clients must be on matching versions, which is already the case for an experimental server.
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies:
31
+ - @pnpm/config.normalize-registries@1101.0.0
32
+ - @pnpm/config.package-is-installable@1100.1.4
33
+ - @pnpm/constants@1102.0.0
34
+ - @pnpm/core-loggers@1100.3.3
35
+ - @pnpm/deps.graph-hasher@1100.2.18
36
+ - @pnpm/deps.path@1101.0.0
37
+ - @pnpm/fs.symlink-dependency@1100.0.18
38
+ - @pnpm/hooks.types@1101.0.0
39
+ - @pnpm/installing.modules-yaml@1101.0.0
40
+ - @pnpm/lockfile.fs@1100.2.3
41
+ - @pnpm/lockfile.utils@1102.0.0
42
+ - @pnpm/patching.config@1100.1.2
43
+ - @pnpm/store.controller-types@1101.1.2
44
+ - @pnpm/types@1102.0.0
45
+
3
46
  ## 1100.2.2
4
47
 
5
48
  ### Patch Changes
@@ -3,7 +3,7 @@ import type { LockfileObject, LockfileResolution } from '@pnpm/lockfile.fs';
3
3
  import { type PatchGroupRecord } from '@pnpm/patching.config';
4
4
  import type { PatchInfo } from '@pnpm/patching.types';
5
5
  import type { PkgRequestFetchResult, StoreController } from '@pnpm/store.controller-types';
6
- import type { AllowBuild, DepPath, PkgIdWithPatchHash, ProjectId, Registries, SupportedArchitectures } from '@pnpm/types';
6
+ import type { AllowBuild, DepPath, PkgIdWithPatchHash, ProjectId, RegistryContext, SupportedArchitectures } from '@pnpm/types';
7
7
  export interface DependenciesGraphNode {
8
8
  alias?: string;
9
9
  hasBundledDependencies: boolean;
@@ -28,7 +28,7 @@ export interface DependenciesGraphNode {
28
28
  export interface DependenciesGraph {
29
29
  [depPath: string]: DependenciesGraphNode;
30
30
  }
31
- export interface LockfileToDepGraphOptions {
31
+ export interface LockfileToDepGraphOptions extends RegistryContext {
32
32
  allowBuild?: AllowBuild;
33
33
  autoInstallPeers: boolean;
34
34
  enableGlobalVirtualStore?: boolean;
@@ -48,8 +48,6 @@ export interface LockfileToDepGraphOptions {
48
48
  nodeVersion: string;
49
49
  pnpmVersion: string;
50
50
  patchedDependencies?: PatchGroupRecord;
51
- registries: Registries;
52
- namedRegistries?: Record<string, string>;
53
51
  /**
54
52
  * The dep paths a non-optional edge reaches, as classified by
55
53
  * `filterLockfileByImportersAndEngine`. Installability is evaluated as
@@ -1,5 +1,6 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
+ import { pickRegistryContext } from '@pnpm/config.normalize-registries';
3
4
  import { packageIsInstallable } from '@pnpm/config.package-is-installable';
4
5
  import { WANTED_LOCKFILE } from '@pnpm/constants';
5
6
  import { progressLogger, } from '@pnpm/core-loggers';
@@ -27,7 +28,7 @@ export async function lockfileToDepGraph(lockfile, currentLockfile, opts) {
27
28
  force: opts.force,
28
29
  graph,
29
30
  lockfileDir: opts.lockfileDir,
30
- registries: opts.registries,
31
+ registriesByScope: opts.registriesByScope,
31
32
  sideEffectsCacheRead: opts.sideEffectsCacheRead,
32
33
  skipped: opts.skipped,
33
34
  storeController: opts.storeController,
@@ -156,7 +157,7 @@ async function buildGraphFromPackages(lockfile, currentLockfile, opts) {
156
157
  }
157
158
  }
158
159
  if (!fetchResponse) {
159
- const resolution = pkgSnapshotToResolution(depPath, pkgSnapshot, { registries: opts.registries, namedRegistries: opts.namedRegistries });
160
+ const resolution = pkgSnapshotToResolution(depPath, pkgSnapshot, pickRegistryContext(opts));
160
161
  progressLogger.debug({ packageId, requester: opts.lockfileDir, status: 'resolved' });
161
162
  try {
162
163
  fetchResponse = await opts.storeController.fetchPackage({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/deps.graph-builder",
3
- "version": "1100.2.2",
3
+ "version": "1101.0.1",
4
4
  "description": "A package for building a dependency graph from a lockfile",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -27,20 +27,21 @@
27
27
  "!*.map"
28
28
  ],
29
29
  "dependencies": {
30
- "@pnpm/config.package-is-installable": "1100.1.3",
31
- "@pnpm/constants": "1101.0.0",
32
- "@pnpm/core-loggers": "1100.3.2",
33
- "@pnpm/deps.graph-hasher": "1100.2.17",
34
- "@pnpm/deps.path": "1100.1.0",
35
- "@pnpm/fs.symlink-dependency": "1100.0.17",
36
- "@pnpm/hooks.types": "1100.2.6",
37
- "@pnpm/installing.modules-yaml": "1100.0.15",
38
- "@pnpm/lockfile.fs": "1100.2.2",
39
- "@pnpm/lockfile.utils": "1101.1.0",
40
- "@pnpm/patching.config": "1100.1.1",
30
+ "@pnpm/config.normalize-registries": "1101.0.0",
31
+ "@pnpm/config.package-is-installable": "1100.1.4",
32
+ "@pnpm/constants": "1102.0.0",
33
+ "@pnpm/core-loggers": "1100.3.3",
34
+ "@pnpm/deps.graph-hasher": "1100.2.18",
35
+ "@pnpm/deps.path": "1101.0.0",
36
+ "@pnpm/fs.symlink-dependency": "1100.0.18",
37
+ "@pnpm/hooks.types": "1101.0.0",
38
+ "@pnpm/installing.modules-yaml": "1101.0.0",
39
+ "@pnpm/lockfile.fs": "1100.2.4",
40
+ "@pnpm/lockfile.utils": "1102.0.0",
41
+ "@pnpm/patching.config": "1100.1.2",
41
42
  "@pnpm/patching.types": "1100.0.1",
42
- "@pnpm/store.controller-types": "1101.1.1",
43
- "@pnpm/types": "1101.9.0",
43
+ "@pnpm/store.controller-types": "1101.1.2",
44
+ "@pnpm/types": "1102.0.0",
44
45
  "path-exists": "^5.0.0",
45
46
  "ramda": "npm:@pnpm/ramda@0.28.1"
46
47
  },
@@ -49,7 +50,7 @@
49
50
  },
50
51
  "devDependencies": {
51
52
  "@jest/globals": "30.4.1",
52
- "@pnpm/deps.graph-builder": "1100.2.2",
53
+ "@pnpm/deps.graph-builder": "1101.0.1",
53
54
  "@pnpm/logger": "1100.0.0",
54
55
  "@types/ramda": "0.32.0"
55
56
  },