@pnpm/installing.read-projects-context 1100.0.28 → 1101.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.
- package/CHANGELOG.md +39 -0
- package/lib/index.d.ts +1 -2
- package/lib/index.js +0 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @pnpm/read-projects-context
|
|
2
2
|
|
|
3
|
+
## 1101.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- `node_modules/.modules.yaml` no longer records the registries an install resolved from, and the recorded copy is dropped from the file on the first install that rewrites it.
|
|
8
|
+
|
|
9
|
+
It dated from the lockfile format that spelled a dependency's path relative to its registry, where reading an installed tree meant knowing the registries it was installed with. Dependency paths have not carried a registry for several major versions, and the recorded copy outlived its use: `pnpm list`, `pnpm why`, and single-project installs preferred it over the project's own configuration, so a project whose registry had changed since its last install was still read through the old one.
|
|
10
|
+
|
|
11
|
+
They now use the configured registries, like every other command already did.
|
|
12
|
+
|
|
13
|
+
- 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:
|
|
14
|
+
|
|
15
|
+
| before | after |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `Config.registries` | `Config.registriesByScope` |
|
|
18
|
+
| `Config.namedRegistries` | `Config.registriesByPrefix` |
|
|
19
|
+
| `Config.registryOptions` | `Config.registryOptionsByUrl` |
|
|
20
|
+
|
|
21
|
+
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`).
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
25
|
+
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.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies:
|
|
30
|
+
- @pnpm/config.normalize-registries@1101.0.0
|
|
31
|
+
- @pnpm/installing.modules-yaml@1101.0.0
|
|
32
|
+
- @pnpm/lockfile.fs@1100.2.3
|
|
33
|
+
- @pnpm/types@1102.0.0
|
|
34
|
+
|
|
35
|
+
## 1100.0.29
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies:
|
|
40
|
+
- @pnpm/lockfile.fs@1100.2.2
|
|
41
|
+
|
|
3
42
|
## 1100.0.28
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Modules } from '@pnpm/installing.modules-yaml';
|
|
2
|
-
import type { DependenciesField, DepPath, HoistedDependencies, ProjectId, ProjectRootDir, ProjectRootDirRealPath
|
|
2
|
+
import type { DependenciesField, DepPath, HoistedDependencies, ProjectId, ProjectRootDir, ProjectRootDirRealPath } from '@pnpm/types';
|
|
3
3
|
export interface ProjectOptions {
|
|
4
4
|
binsDir?: string;
|
|
5
5
|
modulesDir?: string;
|
|
@@ -20,7 +20,6 @@ export declare function readProjectsContext<T>(projects: Array<ProjectOptions &
|
|
|
20
20
|
include: Record<DependenciesField, boolean>;
|
|
21
21
|
modules: Modules | null;
|
|
22
22
|
pendingBuilds: string[];
|
|
23
|
-
registries: Registries | null | undefined;
|
|
24
23
|
rootModulesDir: string;
|
|
25
24
|
skipped: Set<DepPath>;
|
|
26
25
|
virtualStoreDirMaxLength?: number;
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { promises as fs } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import util from 'node:util';
|
|
4
|
-
import { normalizeRegistries } from '@pnpm/config.normalize-registries';
|
|
5
4
|
import { readModulesManifest } from '@pnpm/installing.modules-yaml';
|
|
6
5
|
import { getLockfileImporterId } from '@pnpm/lockfile.fs';
|
|
7
6
|
import { pathAbsolute } from 'path-absolute';
|
|
@@ -33,7 +32,6 @@ export async function readProjectsContext(projects, opts) {
|
|
|
33
32
|
rootDirRealPath: project.rootDirRealPath ?? await realpath(project.rootDir),
|
|
34
33
|
};
|
|
35
34
|
})),
|
|
36
|
-
registries: ((modules?.registries) != null) ? normalizeRegistries(modules.registries) : undefined,
|
|
37
35
|
rootModulesDir,
|
|
38
36
|
skipped: new Set((modules?.skipped ?? [])),
|
|
39
37
|
virtualStoreDirMaxLength: modules?.virtualStoreDirMaxLength,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/installing.read-projects-context",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1101.0.0",
|
|
4
4
|
"description": "Reads the current state of projects from modules manifest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"!*.map"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@pnpm/config.normalize-registries": "
|
|
31
|
-
"@pnpm/installing.modules-yaml": "
|
|
32
|
-
"@pnpm/lockfile.fs": "1100.2.
|
|
33
|
-
"@pnpm/types": "
|
|
30
|
+
"@pnpm/config.normalize-registries": "1101.0.0",
|
|
31
|
+
"@pnpm/installing.modules-yaml": "1101.0.0",
|
|
32
|
+
"@pnpm/lockfile.fs": "1100.2.3",
|
|
33
|
+
"@pnpm/types": "1102.0.0",
|
|
34
34
|
"path-absolute": "^2.0.0",
|
|
35
35
|
"realpath-missing": "^2.0.0"
|
|
36
36
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@pnpm/logger": "^1100.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@pnpm/installing.read-projects-context": "
|
|
41
|
+
"@pnpm/installing.read-projects-context": "1101.0.0",
|
|
42
42
|
"@pnpm/logger": "1100.0.0"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|