@vltpkg/vlx 1.1.1 → 1.2.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.
Files changed (2) hide show
  1. package/dist/install.js +8 -1
  2. package/package.json +11 -11
package/dist/install.js CHANGED
@@ -65,7 +65,7 @@ export const vlxInstall = async (spec, options, promptFn) => {
65
65
  },
66
66
  };
67
67
  await writeFile(resolve(dir, 'package.json'), JSON.stringify(manifest, null, 2) + '\n');
68
- await install({
68
+ const { graph } = await install({
69
69
  ...options,
70
70
  packageInfo,
71
71
  projectRoot: dir,
@@ -74,5 +74,12 @@ export const vlxInstall = async (spec, options, promptFn) => {
74
74
  // allow lifecycle scripts but filter out malware via security archive
75
75
  allowScripts: ':scripts:not(:malware)',
76
76
  });
77
+ // an abbreviated packument carries no integrity; the install hashed
78
+ // the tarball it extracted, so pin that
79
+ const installed = graph.mainImporter.edgesOut.get(pkgSpec.name)?.to;
80
+ if (!manifest.vlx.integrity && installed?.integrity) {
81
+ manifest.vlx.integrity = installed.integrity;
82
+ await writeFile(resolve(dir, 'package.json'), JSON.stringify(manifest, null, 2) + '\n');
83
+ }
77
84
  return vlxInfo(dir, options, manifest);
78
85
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vltpkg/vlx",
3
3
  "description": "vlt exec management",
4
- "version": "1.1.1",
4
+ "version": "1.2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/vltpkg/vltpkg.git",
@@ -13,15 +13,15 @@
13
13
  "url": "http://vlt.sh"
14
14
  },
15
15
  "dependencies": {
16
- "@vltpkg/cmd-shim": "1.1.1",
17
- "@vltpkg/error-cause": "1.1.1",
18
- "@vltpkg/graph": "1.1.1",
19
- "@vltpkg/package-info": "1.1.1",
20
- "@vltpkg/package-json": "1.1.1",
21
- "@vltpkg/rollback-remove": "1.1.1",
22
- "@vltpkg/spec": "1.1.1",
23
- "@vltpkg/types": "1.1.1",
24
- "@vltpkg/xdg": "1.1.1",
16
+ "@vltpkg/cmd-shim": "1.2.0",
17
+ "@vltpkg/error-cause": "1.2.0",
18
+ "@vltpkg/graph": "1.2.0",
19
+ "@vltpkg/package-info": "1.2.0",
20
+ "@vltpkg/package-json": "1.2.0",
21
+ "@vltpkg/rollback-remove": "1.2.0",
22
+ "@vltpkg/spec": "1.2.0",
23
+ "@vltpkg/types": "1.2.0",
24
+ "@vltpkg/xdg": "1.2.0",
25
25
  "path-scurry": "^2.0.1",
26
26
  "walk-up-path": "^4.0.0"
27
27
  },
@@ -30,7 +30,7 @@
30
30
  "@types/node": "^22.19.2",
31
31
  "eslint": "^9.39.1",
32
32
  "prettier": "^3.7.4",
33
- "tap": "^21.5.0",
33
+ "tap": "^21.8.0",
34
34
  "typedoc": "~0.27.9",
35
35
  "typescript": "5.7.3",
36
36
  "typescript-eslint": "^8.49.0"