@vltpkg/graph 1.6.0 → 1.6.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/dist/install.js +4 -1
- package/dist/lockfile/load-nodes.js +4 -9
- package/dist/node.js +6 -0
- package/package.json +21 -21
package/dist/install.js
CHANGED
|
@@ -47,7 +47,10 @@ export const install = async (options, add) => {
|
|
|
47
47
|
}
|
|
48
48
|
catch (err) {
|
|
49
49
|
if (asError(err).message === 'Could not read package.json file') {
|
|
50
|
-
await init({
|
|
50
|
+
await init({
|
|
51
|
+
cwd: options.projectRoot,
|
|
52
|
+
packageJson: options.packageJson,
|
|
53
|
+
});
|
|
51
54
|
mainManifest = options.packageJson.read(options.projectRoot, {
|
|
52
55
|
reload: true,
|
|
53
56
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { error } from '@vltpkg/error-cause';
|
|
2
2
|
import { asDepID, splitDepID, splitExtra, } from '@vltpkg/dep-id/browser';
|
|
3
3
|
import { getBooleanFlagsFromNum, getBuildStateFromNum, } from "./types.js";
|
|
4
|
-
import { tarballFormat } from '@vltpkg/types';
|
|
5
4
|
export const loadNodes = (graph, nodes, options, actual, throwOnMissingManifest) => {
|
|
6
5
|
const entries = Object.entries(nodes);
|
|
7
6
|
const nodeCount = entries.length;
|
|
@@ -76,16 +75,12 @@ export const loadNodes = (graph, nodes, options, actual, throwOnMissingManifest)
|
|
|
76
75
|
// before setResolved(), which needs it to pick the extension for a
|
|
77
76
|
// node whose `resolved` the lockfile left out
|
|
78
77
|
node.brotli = brotli;
|
|
79
|
-
node.integrity = integrity ?? referenceNode?.integrity;
|
|
80
78
|
// `integrity` is the hash of the artifact `resolved` points at, so a
|
|
81
|
-
// reference
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const refResolvedUsable = !integrity ||
|
|
85
|
-
!refResolved ||
|
|
86
|
-
(tarballFormat(refResolved) === 'brotli') === brotli;
|
|
79
|
+
// reference node only fills in for the kind the flag bit names
|
|
80
|
+
const ref = !!referenceNode?.brotli === brotli ? referenceNode : undefined;
|
|
81
|
+
node.integrity = integrity ?? ref?.integrity;
|
|
87
82
|
node.resolved =
|
|
88
|
-
type === 'remote' ? filepath : (
|
|
83
|
+
type === 'remote' ? filepath : (resolved ?? ref?.resolved);
|
|
89
84
|
node.resolvedFromLockfile = !!(node.integrity && node.resolved);
|
|
90
85
|
node.projectRoot = graph.projectRoot;
|
|
91
86
|
if (!node.resolved)
|
package/dist/node.js
CHANGED
|
@@ -371,6 +371,12 @@ export class Node {
|
|
|
371
371
|
case 'registry':
|
|
372
372
|
this.#registryNodeResolved(tuple);
|
|
373
373
|
break;
|
|
374
|
+
case 'git':
|
|
375
|
+
// a hosted git committish is fetched as the host's tarball
|
|
376
|
+
this.resolved =
|
|
377
|
+
hydrateTuple(tuple, this.#name, this.#options).final
|
|
378
|
+
.remoteURL ?? resolved;
|
|
379
|
+
break;
|
|
374
380
|
default:
|
|
375
381
|
this.resolved = resolved;
|
|
376
382
|
break;
|
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.6.
|
|
4
|
+
"version": "1.6.1",
|
|
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.6.
|
|
17
|
-
"@vltpkg/dep-id": "1.6.
|
|
18
|
-
"@vltpkg/dss-breadcrumb": "1.6.
|
|
19
|
-
"@vltpkg/error-cause": "1.6.
|
|
20
|
-
"@vltpkg/fast-split": "1.6.
|
|
21
|
-
"@vltpkg/graph-run": "1.6.
|
|
22
|
-
"@vltpkg/init": "1.6.
|
|
23
|
-
"@vltpkg/output": "1.6.
|
|
24
|
-
"@vltpkg/package-info": "1.6.
|
|
25
|
-
"@vltpkg/package-json": "1.6.
|
|
26
|
-
"@vltpkg/pick-manifest": "1.6.
|
|
27
|
-
"@vltpkg/query": "1.6.
|
|
28
|
-
"@vltpkg/rollback-remove": "1.6.
|
|
29
|
-
"@vltpkg/run": "1.6.
|
|
30
|
-
"@vltpkg/satisfies": "1.6.
|
|
31
|
-
"@vltpkg/security-archive": "1.6.
|
|
32
|
-
"@vltpkg/spec": "1.6.
|
|
33
|
-
"@vltpkg/types": "1.6.
|
|
34
|
-
"@vltpkg/vlt-json": "1.6.
|
|
35
|
-
"@vltpkg/workspaces": "1.6.
|
|
16
|
+
"@vltpkg/cmd-shim": "1.6.1",
|
|
17
|
+
"@vltpkg/dep-id": "1.6.1",
|
|
18
|
+
"@vltpkg/dss-breadcrumb": "1.6.1",
|
|
19
|
+
"@vltpkg/error-cause": "1.6.1",
|
|
20
|
+
"@vltpkg/fast-split": "1.6.1",
|
|
21
|
+
"@vltpkg/graph-run": "1.6.1",
|
|
22
|
+
"@vltpkg/init": "1.6.1",
|
|
23
|
+
"@vltpkg/output": "1.6.1",
|
|
24
|
+
"@vltpkg/package-info": "1.6.1",
|
|
25
|
+
"@vltpkg/package-json": "1.6.1",
|
|
26
|
+
"@vltpkg/pick-manifest": "1.6.1",
|
|
27
|
+
"@vltpkg/query": "1.6.1",
|
|
28
|
+
"@vltpkg/rollback-remove": "1.6.1",
|
|
29
|
+
"@vltpkg/run": "1.6.1",
|
|
30
|
+
"@vltpkg/satisfies": "1.6.1",
|
|
31
|
+
"@vltpkg/security-archive": "1.6.1",
|
|
32
|
+
"@vltpkg/spec": "1.6.1",
|
|
33
|
+
"@vltpkg/types": "1.6.1",
|
|
34
|
+
"@vltpkg/vlt-json": "1.6.1",
|
|
35
|
+
"@vltpkg/workspaces": "1.6.1",
|
|
36
36
|
"path-scurry": "^2.0.1",
|
|
37
37
|
"promise-call-limit": "^3.0.2"
|
|
38
38
|
},
|