@vltpkg/graph 1.0.0-rc.26 → 1.0.0-rc.29
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/graph.js
CHANGED
|
@@ -106,7 +106,7 @@ export class Graph {
|
|
|
106
106
|
registries: options.registries,
|
|
107
107
|
'git-hosts': options['git-hosts'],
|
|
108
108
|
'git-host-archives': options['git-host-archives'],
|
|
109
|
-
'
|
|
109
|
+
'scoped-registries': options['scoped-registries'],
|
|
110
110
|
'jsr-registries': options['jsr-registries'],
|
|
111
111
|
catalog: options.catalog,
|
|
112
112
|
catalogs: options.catalogs,
|
|
@@ -18,6 +18,14 @@ export const removeSatisfiedSpecs = ({ add, graph, }) => {
|
|
|
18
18
|
// brand new edge being added
|
|
19
19
|
continue;
|
|
20
20
|
}
|
|
21
|
+
// If the spec type has changed (e.g., from "registry" to
|
|
22
|
+
// "catalog" or vice versa), keep it in the add list so the
|
|
23
|
+
// edge gets rebuilt with the updated spec, even if the
|
|
24
|
+
// resolved node is the same.
|
|
25
|
+
const edgeIsCatalog = edge.spec.type === 'catalog';
|
|
26
|
+
const depIsCatalog = dependency.spec.type === 'catalog';
|
|
27
|
+
if (edgeIsCatalog !== depIsCatalog)
|
|
28
|
+
continue;
|
|
21
29
|
// If the current graph edge is already valid, then we remove that
|
|
22
30
|
// dependency item from the list of items to be added to the graph
|
|
23
31
|
if (satisfies(edge.to?.id, dependency.spec, edge.from.location, graph.projectRoot, graph.monorepo)) {
|
package/dist/lockfile/load.js
CHANGED
|
@@ -44,17 +44,20 @@ export const loadObject = (options, lockfileData) => {
|
|
|
44
44
|
const packageJson = options.packageJson ?? new PackageJson();
|
|
45
45
|
const monorepo = options.monorepo ??
|
|
46
46
|
Monorepo.maybeLoad(options.projectRoot, { packageJson, scurry });
|
|
47
|
-
const { catalog = {}, catalogs = {}, '
|
|
47
|
+
const { catalog = {}, catalogs = {}, 'scoped-registries': scopedRegistriesOption, registry, registries, 'git-hosts': gitHosts, 'git-host-archives': gitHostArchives,
|
|
48
48
|
/* c8 ignore next */
|
|
49
49
|
} = lockfileData.options ?? {};
|
|
50
|
+
// backwards-compat: legacy lockfiles wrote this field as `scope-registries`
|
|
51
|
+
const scopeRegistries = scopedRegistriesOption ??
|
|
52
|
+
lockfileData.options['scope-registries'];
|
|
50
53
|
// Optimize options merging - only create new objects when needed
|
|
51
54
|
const mergedOptions = {
|
|
52
55
|
...options,
|
|
53
56
|
catalog,
|
|
54
57
|
catalogs,
|
|
55
|
-
'
|
|
56
|
-
{ ...options['
|
|
57
|
-
: options['
|
|
58
|
+
'scoped-registries': scopeRegistries ?
|
|
59
|
+
{ ...options['scoped-registries'], ...scopeRegistries }
|
|
60
|
+
: options['scoped-registries'],
|
|
58
61
|
registry: registry ?? options.registry,
|
|
59
62
|
registries: registries ?
|
|
60
63
|
{ ...options.registries, ...registries }
|
package/dist/lockfile/save.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export type SaveOptions = SpecOptions & {
|
|
|
24
24
|
*/
|
|
25
25
|
throwOnMissingManifest?: boolean;
|
|
26
26
|
};
|
|
27
|
-
export declare const lockfileData: ({ graph, catalog, catalogs, "git-hosts": gitHosts, "git-host-archives": gitHostArchives, modifiers, registry, registries, saveManifests, saveBuildData, "
|
|
27
|
+
export declare const lockfileData: ({ graph, catalog, catalogs, "git-hosts": gitHosts, "git-host-archives": gitHostArchives, modifiers, registry, registries, saveManifests, saveBuildData, "scoped-registries": scopeRegistries, "jsr-registries": jsrRegistries, throwOnMissingManifest, }: SaveOptions) => LockfileData;
|
|
28
28
|
export declare const saveData: (data: LockfileData, fileName: string, saveManifests?: boolean) => void;
|
|
29
29
|
export declare const save: (options: Omit<SaveOptions, "saveManifests">) => void;
|
|
30
30
|
export declare const saveHidden: (options: Omit<SaveOptions, "saveManifests" | "saveBuildData">) => void;
|
package/dist/lockfile/save.js
CHANGED
|
@@ -82,7 +82,7 @@ const removeDefaultItems = (defaultItems, items) => {
|
|
|
82
82
|
}
|
|
83
83
|
return res;
|
|
84
84
|
};
|
|
85
|
-
export const lockfileData = ({ graph, catalog, catalogs, 'git-hosts': gitHosts, 'git-host-archives': gitHostArchives, modifiers, registry, registries, saveManifests, saveBuildData, '
|
|
85
|
+
export const lockfileData = ({ graph, catalog, catalogs, 'git-hosts': gitHosts, 'git-host-archives': gitHostArchives, modifiers, registry, registries, saveManifests, saveBuildData, 'scoped-registries': scopeRegistries, 'jsr-registries': jsrRegistries, throwOnMissingManifest, }) => {
|
|
86
86
|
const cleanGitHosts = isRecordStringString(gitHosts) ?
|
|
87
87
|
removeDefaultItems(defaultGitHosts, gitHosts)
|
|
88
88
|
: undefined;
|
|
@@ -111,7 +111,7 @@ export const lockfileData = ({ graph, catalog, catalogs, 'git-hosts': gitHosts,
|
|
|
111
111
|
...(hasItems(catalog) ? { catalog } : {}),
|
|
112
112
|
...(hasItems(catalogs) ? { catalogs } : {}),
|
|
113
113
|
...(hasItems(cleanScopeRegistries) ?
|
|
114
|
-
{ '
|
|
114
|
+
{ 'scoped-registries': cleanScopeRegistries }
|
|
115
115
|
: undefined),
|
|
116
116
|
...(hasItems(cleanJsrRegistries) ?
|
|
117
117
|
{ 'jsr-registries': cleanJsrRegistries }
|
|
@@ -5,7 +5,10 @@ import { stringifyNode } from "../stringify-node.js";
|
|
|
5
5
|
import { loadEdges } from "../lockfile/load-edges.js";
|
|
6
6
|
import { loadNodes } from "../lockfile/load-nodes.js";
|
|
7
7
|
const loadSpecOptions = (lockfile) => {
|
|
8
|
-
const { catalog = {}, catalogs = {}, registries, registry, 'git-hosts': gitHosts, 'git-host-archives': gitHostArchives, '
|
|
8
|
+
const { catalog = {}, catalogs = {}, registries, registry, 'git-hosts': gitHosts, 'git-host-archives': gitHostArchives, 'scoped-registries': scopedRegistriesOption, 'jsr-registries': jsrRegistries, } = lockfile.options;
|
|
9
|
+
// backwards-compat: legacy lockfiles wrote this field as `scope-registries`
|
|
10
|
+
const scopeRegistries = scopedRegistriesOption ??
|
|
11
|
+
lockfile.options['scope-registries'];
|
|
9
12
|
return {
|
|
10
13
|
catalog,
|
|
11
14
|
catalogs,
|
|
@@ -17,7 +20,7 @@ const loadSpecOptions = (lockfile) => {
|
|
|
17
20
|
...defaultGitHostArchives,
|
|
18
21
|
...gitHostArchives,
|
|
19
22
|
},
|
|
20
|
-
'
|
|
23
|
+
'scoped-registries': {
|
|
21
24
|
...defaultScopeRegistries,
|
|
22
25
|
...scopeRegistries,
|
|
23
26
|
},
|
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.29",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -13,33 +13,32 @@
|
|
|
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.29",
|
|
17
|
+
"@vltpkg/dep-id": "1.0.0-rc.29",
|
|
18
|
+
"@vltpkg/dss-breadcrumb": "1.0.0-rc.29",
|
|
19
|
+
"@vltpkg/error-cause": "1.0.0-rc.29",
|
|
20
|
+
"@vltpkg/fast-split": "1.0.0-rc.29",
|
|
21
|
+
"@vltpkg/graph-run": "1.0.0-rc.29",
|
|
22
|
+
"@vltpkg/init": "1.0.0-rc.29",
|
|
23
|
+
"@vltpkg/output": "1.0.0-rc.29",
|
|
24
|
+
"@vltpkg/package-info": "1.0.0-rc.29",
|
|
25
|
+
"@vltpkg/package-json": "1.0.0-rc.29",
|
|
26
|
+
"@vltpkg/pick-manifest": "1.0.0-rc.29",
|
|
27
|
+
"@vltpkg/query": "1.0.0-rc.29",
|
|
28
|
+
"@vltpkg/rollback-remove": "1.0.0-rc.29",
|
|
29
|
+
"@vltpkg/run": "1.0.0-rc.29",
|
|
30
|
+
"@vltpkg/satisfies": "1.0.0-rc.29",
|
|
31
|
+
"@vltpkg/security-archive": "1.0.0-rc.29",
|
|
32
|
+
"@vltpkg/spec": "1.0.0-rc.29",
|
|
33
|
+
"@vltpkg/types": "1.0.0-rc.29",
|
|
34
|
+
"@vltpkg/vlt-json": "1.0.0-rc.29",
|
|
35
|
+
"@vltpkg/workspaces": "1.0.0-rc.29",
|
|
36
36
|
"path-scurry": "^2.0.1",
|
|
37
37
|
"promise-call-limit": "^3.0.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@eslint/js": "^9.39.1",
|
|
41
41
|
"@types/node": "^22.19.2",
|
|
42
|
-
"@vltpkg/vlt-json": "1.0.0-rc.26",
|
|
43
42
|
"eslint": "^9.39.1",
|
|
44
43
|
"prettier": "^3.7.4",
|
|
45
44
|
"tap": "^21.5.0",
|