@vltpkg/graph 1.0.0-rc.29 → 1.0.0-rc.30
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/dist/actual/load.js +5 -2
- package/dist/install.js +7 -2
- package/dist/lockfile/load-edges.js +8 -5
- package/dist/uninstall.js +5 -2
- package/package.json +21 -21
package/dist/actual/load.js
CHANGED
|
@@ -180,7 +180,10 @@ const parseDir = (options, scurry, packageJson, depsFound, graph, fromNode, curr
|
|
|
180
180
|
const depType = shorten(type, alias, fromNode.manifest);
|
|
181
181
|
let spec = Spec.parse(alias, bareSpec, {
|
|
182
182
|
...options,
|
|
183
|
-
|
|
183
|
+
// fall back to options.registry (which the lockfile merges into)
|
|
184
|
+
// so importer-level edges don't silently revert to the default
|
|
185
|
+
// npm registry. see vltpkg/vltpkg#1580.
|
|
186
|
+
registry: fromNode.registry ?? options.registry,
|
|
184
187
|
});
|
|
185
188
|
// Check for active modifiers and replace spec if a modifier is complete
|
|
186
189
|
const { spec: modifiedSpec, queryModifier } = maybeApplyModifierToSpec(spec, alias, modifierRefs);
|
|
@@ -239,7 +242,7 @@ const parseDir = (options, scurry, packageJson, depsFound, graph, fromNode, curr
|
|
|
239
242
|
const depType = shorten(type, name, fromNode.manifest);
|
|
240
243
|
let spec = Spec.parse(name, bareSpec, {
|
|
241
244
|
...options,
|
|
242
|
-
registry: fromNode.registry,
|
|
245
|
+
registry: fromNode.registry ?? options.registry,
|
|
243
246
|
});
|
|
244
247
|
// Check for active modifiers and replace spec for missing dependencies
|
|
245
248
|
const { spec: modifiedSpec, queryModifier } = maybeApplyModifierToSpec(spec, name, modifierRefs);
|
package/dist/install.js
CHANGED
|
@@ -165,8 +165,13 @@ export const install = async (options, add) => {
|
|
|
165
165
|
});
|
|
166
166
|
// If lockfileOnly is enabled, skip reify and only save the lockfile
|
|
167
167
|
if (options.lockfileOnly) {
|
|
168
|
-
// Save only the main lockfile, skip all filesystem operations
|
|
169
|
-
|
|
168
|
+
// Save only the main lockfile, skip all filesystem operations.
|
|
169
|
+
// Spread `options` so that spec-level config (registry,
|
|
170
|
+
// scoped-registries, git-hosts, catalogs, etc.) round-trips
|
|
171
|
+
// through the lockfile - otherwise subsequent installs lose
|
|
172
|
+
// the configured registry and rewrite node/edge DepIDs back
|
|
173
|
+
// to the default npm registry. (See vltpkg/vltpkg#1580.)
|
|
174
|
+
lockfile.save({ ...options, graph, modifiers });
|
|
170
175
|
const saveImportersPackageJson =
|
|
171
176
|
/* c8 ignore next */
|
|
172
177
|
add?.modifiedDependencies || remove.modifiedDependencies ?
|
|
@@ -78,11 +78,14 @@ export const loadEdges = (graph, edges, options) => {
|
|
|
78
78
|
toNode = graph.nodes.get(asDepID(toId));
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
//
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
// Use the merged options directly — they already carry the
|
|
82
|
+
// correct registry from the lockfile's `options` + caller config.
|
|
83
|
+
// `fromNode.registry` is not populated yet at this point (the
|
|
84
|
+
// post-load hydration loop in load.ts sets it *after* edges are
|
|
85
|
+
// loaded), so overriding here would always inject `undefined`
|
|
86
|
+
// and silently revert to the default npm registry.
|
|
87
|
+
// See vltpkg/vltpkg#1580.
|
|
88
|
+
const spec = Spec.parse(specName, valRest.substring(0, vrSplit), options);
|
|
86
89
|
if (useOptimizations) {
|
|
87
90
|
edgeProcessingQueue.push({
|
|
88
91
|
fromNode,
|
package/dist/uninstall.js
CHANGED
|
@@ -34,8 +34,11 @@ export const uninstall = async (options, remove) => {
|
|
|
34
34
|
});
|
|
35
35
|
// If lockfileOnly is enabled, skip reify and only save the lockfile
|
|
36
36
|
if (options.lockfileOnly) {
|
|
37
|
-
// Save only the main lockfile, skip all filesystem operations
|
|
38
|
-
|
|
37
|
+
// Save only the main lockfile, skip all filesystem operations.
|
|
38
|
+
// Spread `options` so that spec-level config (registry,
|
|
39
|
+
// scoped-registries, git-hosts, catalogs, etc.) round-trips
|
|
40
|
+
// through the lockfile. See vltpkg/vltpkg#1580.
|
|
41
|
+
lockfile.save({ ...options, graph, modifiers });
|
|
39
42
|
const saveImportersPackageJson =
|
|
40
43
|
/* c8 ignore next */
|
|
41
44
|
remove?.modifiedDependencies ?
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/graph",
|
|
3
3
|
"description": "A library that helps understanding & expressing what happens on an install",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.30",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -13,26 +13,26 @@
|
|
|
13
13
|
"url": "http://vlt.sh"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@vltpkg/cmd-shim": "1.0.0-rc.
|
|
17
|
-
"@vltpkg/dep-id": "1.0.0-rc.
|
|
18
|
-
"@vltpkg/dss-breadcrumb": "1.0.0-rc.
|
|
19
|
-
"@vltpkg/error-cause": "1.0.0-rc.
|
|
20
|
-
"@vltpkg/fast-split": "1.0.0-rc.
|
|
21
|
-
"@vltpkg/graph-run": "1.0.0-rc.
|
|
22
|
-
"@vltpkg/init": "1.0.0-rc.
|
|
23
|
-
"@vltpkg/output": "1.0.0-rc.
|
|
24
|
-
"@vltpkg/package-info": "1.0.0-rc.
|
|
25
|
-
"@vltpkg/package-json": "1.0.0-rc.
|
|
26
|
-
"@vltpkg/pick-manifest": "1.0.0-rc.
|
|
27
|
-
"@vltpkg/query": "1.0.0-rc.
|
|
28
|
-
"@vltpkg/rollback-remove": "1.0.0-rc.
|
|
29
|
-
"@vltpkg/run": "1.0.0-rc.
|
|
30
|
-
"@vltpkg/satisfies": "1.0.0-rc.
|
|
31
|
-
"@vltpkg/security-archive": "1.0.0-rc.
|
|
32
|
-
"@vltpkg/spec": "1.0.0-rc.
|
|
33
|
-
"@vltpkg/types": "1.0.0-rc.
|
|
34
|
-
"@vltpkg/vlt-json": "1.0.0-rc.
|
|
35
|
-
"@vltpkg/workspaces": "1.0.0-rc.
|
|
16
|
+
"@vltpkg/cmd-shim": "1.0.0-rc.30",
|
|
17
|
+
"@vltpkg/dep-id": "1.0.0-rc.30",
|
|
18
|
+
"@vltpkg/dss-breadcrumb": "1.0.0-rc.30",
|
|
19
|
+
"@vltpkg/error-cause": "1.0.0-rc.30",
|
|
20
|
+
"@vltpkg/fast-split": "1.0.0-rc.30",
|
|
21
|
+
"@vltpkg/graph-run": "1.0.0-rc.30",
|
|
22
|
+
"@vltpkg/init": "1.0.0-rc.30",
|
|
23
|
+
"@vltpkg/output": "1.0.0-rc.30",
|
|
24
|
+
"@vltpkg/package-info": "1.0.0-rc.30",
|
|
25
|
+
"@vltpkg/package-json": "1.0.0-rc.30",
|
|
26
|
+
"@vltpkg/pick-manifest": "1.0.0-rc.30",
|
|
27
|
+
"@vltpkg/query": "1.0.0-rc.30",
|
|
28
|
+
"@vltpkg/rollback-remove": "1.0.0-rc.30",
|
|
29
|
+
"@vltpkg/run": "1.0.0-rc.30",
|
|
30
|
+
"@vltpkg/satisfies": "1.0.0-rc.30",
|
|
31
|
+
"@vltpkg/security-archive": "1.0.0-rc.30",
|
|
32
|
+
"@vltpkg/spec": "1.0.0-rc.30",
|
|
33
|
+
"@vltpkg/types": "1.0.0-rc.30",
|
|
34
|
+
"@vltpkg/vlt-json": "1.0.0-rc.30",
|
|
35
|
+
"@vltpkg/workspaces": "1.0.0-rc.30",
|
|
36
36
|
"path-scurry": "^2.0.1",
|
|
37
37
|
"promise-call-limit": "^3.0.2"
|
|
38
38
|
},
|