@vltpkg/cli-js 1.3.2 → 1.3.4

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 (76) hide show
  1. package/{access-M5BOAKLX.js → access-AY2CIGVN.js} +4 -4
  2. package/{bugs-QZ5NURDC.js → bugs-6PTC6V7S.js} +12 -12
  3. package/{build-CEAMZG7H.js → build-R6OJNJDU.js} +6 -6
  4. package/{cache-ILCET6EY.js → cache-NVLCCVWQ.js} +6 -6
  5. package/{chunk-NAVFU65Z.js → chunk-4XTUCYBW.js} +1 -1
  6. package/{chunk-MC6CESRA.js → chunk-AFUXQ3P4.js} +1 -1
  7. package/{chunk-4FHGRT4J.js → chunk-B5AKQ5TS.js} +3 -3
  8. package/{chunk-CU752KW7.js → chunk-BCANUHR3.js} +1 -1
  9. package/{chunk-EJFGJ543.js → chunk-BFR3XHEM.js} +3 -3
  10. package/{chunk-HBB2ECAT.js → chunk-CYN4ADWK.js} +2 -2
  11. package/{chunk-USLE2NXK.js → chunk-D4KNFORN.js} +1 -1
  12. package/{chunk-4QYSZZZQ.js → chunk-DK6HGJCF.js} +4 -4
  13. package/chunk-DM2XRLCS.js +75 -0
  14. package/{chunk-O63K3ZP6.js → chunk-GCLZEI3R.js} +173 -50
  15. package/{chunk-BUKZHMMK.js → chunk-INEKXXUQ.js} +1 -0
  16. package/{chunk-I6QGYSB4.js → chunk-LHIDMYN2.js} +1 -1
  17. package/{chunk-4WQ76RJD.js → chunk-MVD5AUNS.js} +1 -1
  18. package/{chunk-E53Z7AF6.js → chunk-MWAWPY3P.js} +3 -3
  19. package/chunk-OFHNSAQ5.js +2155 -0
  20. package/{chunk-2UW4UIVL.js → chunk-QEWKCTQY.js} +4 -4
  21. package/{chunk-IIXKXSLE.js → chunk-QGFDMXDH.js} +313 -171
  22. package/{chunk-QX6KMBTX.js → chunk-QZIC3WVP.js} +3 -3
  23. package/{chunk-ZWKI5OSF.js → chunk-SRWDPPLX.js} +0 -1377
  24. package/{chunk-ZMRJRQDK.js → chunk-TL5SYXSC.js} +292 -45
  25. package/{chunk-CSZTT7QN.js → chunk-TOKUDCSW.js} +2 -2
  26. package/{chunk-3NWCWTIU.js → chunk-WXRS5PRL.js} +1 -1
  27. package/{chunk-ENSGPOLR.js → chunk-XU5WNX4S.js} +3 -1
  28. package/{ci-4AI6XHRE.js → ci-FEZ6B33S.js} +7 -7
  29. package/cli-package.json +1 -1
  30. package/{config-PJVA5HZQ.js → config-EV5S74AA.js} +5 -5
  31. package/{config-UHPA5FHX.js → config-VVPVV36W.js} +6 -6
  32. package/{create-NQNFYWOC.js → create-VGCARZLU.js} +13 -13
  33. package/{deprecate-35D4AZFD.js → deprecate-3E27QREJ.js} +7 -7
  34. package/{dist-tag-W3AJECYB.js → dist-tag-ZIDIGEIM.js} +4 -4
  35. package/{docs-OFRPTPOG.js → docs-GESU73FF.js} +12 -12
  36. package/{exec-UTWGYF3B.js → exec-3SE4PRXY.js} +13 -13
  37. package/{exec-cache-VLPJMK7E.js → exec-cache-7QOIKCYP.js} +11 -11
  38. package/{exec-local-JKBHBKJZ.js → exec-local-EVAI6IYM.js} +10 -10
  39. package/{help-YRQQVODA.js → help-H54DUW2F.js} +4 -4
  40. package/{init-2QZ5TITF.js → init-JOAMKEKV.js} +7 -7
  41. package/{install-QBVAEHTO.js → install-WHOVSLKH.js} +12 -12
  42. package/{list-P4UQWDX7.js → list-7X2RIDA4.js} +12 -12
  43. package/{login-6KPWMFG4.js → login-P5NRTQDS.js} +8 -8
  44. package/{logout-KCYMUY6H.js → logout-5PCTGCJZ.js} +4 -4
  45. package/{pack-WQLFLOE2.js → pack-MLOVKXJZ.js} +9 -9
  46. package/package.json +1 -1
  47. package/{ping-GYFPW4F5.js → ping-6D6EEICV.js} +4 -4
  48. package/{pkg-KVQ6QMQH.js → pkg-HC6N3DDH.js} +8 -8
  49. package/{profile-APD6X27T.js → profile-C3MNVMAE.js} +4 -4
  50. package/{publish-EYKECRD3.js → publish-3KUMQXKT.js} +12 -12
  51. package/{query-3N5D2ZZW.js → query-HNBW2ZGX.js} +12 -12
  52. package/{registry-MXAA4HVJ.js → registry-PY2L5ZWC.js} +2 -2
  53. package/registry-client-src-revalidate.js +173 -50
  54. package/{repo-6B5W7Q2C.js → repo-VWEPCUXK.js} +12 -12
  55. package/{reporter-ZEDO2YIG.js → reporter-UUDMEN4E.js} +6 -6
  56. package/{run-INZMUBF2.js → run-OFW4MPAV.js} +10 -10
  57. package/{run-exec-RVYS73II.js → run-exec-ACGX23HX.js} +10 -10
  58. package/security-archive-src-update-expired.js +1 -1
  59. package/{setup-Q7JD6XJV.js → setup-5C56O3S3.js} +10 -10
  60. package/{src-EJSVFFXB.js → src-3MEJQYBG.js} +21 -7
  61. package/{src-3UQFZRM3.js → src-LH2HZ6FT.js} +2 -2
  62. package/{src-527GIT4Y.js → src-SI5YMOJI.js} +9 -9
  63. package/{token-5HFD3COV.js → token-RPQP6BV5.js} +4 -4
  64. package/{uninstall-4R7Z2FD7.js → uninstall-HDUNLNAD.js} +8 -8
  65. package/{unpublish-RBRQE53F.js → unpublish-SB647KPY.js} +4 -4
  66. package/{update-7LXJAEJN.js → update-PAIZPQPH.js} +11 -11
  67. package/{version-UHRS2KJX.js → version-5O2P2ROI.js} +7 -7
  68. package/{view-BNQKJF5L.js → view-3YVL4M7Z.js} +7 -7
  69. package/vlr.js +1 -1
  70. package/vlrx.js +1 -1
  71. package/vlt.js +1 -1
  72. package/vlx.js +1 -1
  73. package/vlxl.js +1 -1
  74. package/{whoami-GYAT6NWM.js → whoami-KFXNKZOX.js} +4 -4
  75. package/chunk-KH3ERNCA.js +0 -783
  76. package/chunk-TGOC27YZ.js +0 -75
@@ -13,14 +13,15 @@ import {
13
13
  AbortError,
14
14
  SecurityArchive,
15
15
  pRetry
16
- } from "./chunk-4WQ76RJD.js";
16
+ } from "./chunk-MVD5AUNS.js";
17
17
  import {
18
18
  Monorepo,
19
19
  PackageJson,
20
+ detectLibc,
20
21
  getUser,
21
22
  minimatch,
22
23
  platformCheck
23
- } from "./chunk-BUKZHMMK.js";
24
+ } from "./chunk-INEKXXUQ.js";
24
25
  import {
25
26
  asDepID,
26
27
  baseDepID,
@@ -46,7 +47,7 @@ import {
46
47
  import {
47
48
  userAgent,
48
49
  userAgentHeaders
49
- } from "./chunk-3NWCWTIU.js";
50
+ } from "./chunk-WXRS5PRL.js";
50
51
  import {
51
52
  graphStep,
52
53
  promiseSpawn
@@ -204,12 +205,12 @@ var require_isexe = __commonJS({
204
205
  if (typeof Promise !== "function") {
205
206
  throw new TypeError("callback not provided");
206
207
  }
207
- return new Promise(function(resolve13, reject) {
208
+ return new Promise(function(resolve14, reject) {
208
209
  isexe(path2, options || {}, function(er, is2) {
209
210
  if (er) {
210
211
  reject(er);
211
212
  } else {
212
- resolve13(is2);
213
+ resolve14(is2);
213
214
  }
214
215
  });
215
216
  });
@@ -275,27 +276,27 @@ var require_which = __commonJS({
275
276
  opt = {};
276
277
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
277
278
  const found = [];
278
- const step = (i) => new Promise((resolve13, reject) => {
279
+ const step = (i) => new Promise((resolve14, reject) => {
279
280
  if (i === pathEnv.length)
280
- return opt.all && found.length ? resolve13(found) : reject(getNotFoundError(cmd));
281
+ return opt.all && found.length ? resolve14(found) : reject(getNotFoundError(cmd));
281
282
  const ppRaw = pathEnv[i];
282
283
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
283
284
  const pCmd = path2.join(pathPart, cmd);
284
285
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
285
- resolve13(subStep(p, i, 0));
286
+ resolve14(subStep(p, i, 0));
286
287
  });
287
- const subStep = (p, i, ii) => new Promise((resolve13, reject) => {
288
+ const subStep = (p, i, ii) => new Promise((resolve14, reject) => {
288
289
  if (ii === pathExt.length)
289
- return resolve13(step(i + 1));
290
+ return resolve14(step(i + 1));
290
291
  const ext = pathExt[ii];
291
292
  isexe(p + ext, { pathExt: pathExtExe }, (er, is2) => {
292
293
  if (!er && is2) {
293
294
  if (opt.all)
294
295
  found.push(p + ext);
295
296
  else
296
- return resolve13(p + ext);
297
+ return resolve14(p + ext);
297
298
  }
298
- return resolve13(subStep(p, i, ii + 1));
299
+ return resolve14(subStep(p, i, ii + 1));
299
300
  });
300
301
  });
301
302
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -3984,7 +3985,7 @@ var require_processor = __commonJS({
3984
3985
  if (options === void 0) {
3985
3986
  options = {};
3986
3987
  }
3987
- return new Promise(function(resolve13, reject) {
3988
+ return new Promise(function(resolve14, reject) {
3988
3989
  try {
3989
3990
  var root_1 = _this._root(rule, options);
3990
3991
  Promise.resolve(_this.func(root_1)).then(function(transform) {
@@ -3994,7 +3995,7 @@ var require_processor = __commonJS({
3994
3995
  rule.selector = string;
3995
3996
  }
3996
3997
  return { transform, root: root_1, string };
3997
- }).then(resolve13, reject);
3998
+ }).then(resolve14, reject);
3998
3999
  } catch (e) {
3999
4000
  reject(e);
4000
4001
  return;
@@ -4481,6 +4482,7 @@ var Node = class _Node {
4481
4482
  }
4482
4483
  #options;
4483
4484
  #location;
4485
+ #resolvedLoc;
4484
4486
  #rawManifest;
4485
4487
  #optional = false;
4486
4488
  /**
@@ -4699,9 +4701,16 @@ var Node = class _Node {
4699
4701
  }
4700
4702
  /**
4701
4703
  * The resolved location of the node in the file system.
4704
+ * Memoized per location and scurry cwd.
4702
4705
  */
4703
4706
  resolvedLocation(scurry) {
4704
- return scurry.cwd.resolve(this.location).fullpath();
4707
+ const loc = this.location;
4708
+ const { cwd } = scurry;
4709
+ const m = this.#resolvedLoc;
4710
+ if (m?.loc === loc && m.cwd === cwd) return m.path;
4711
+ const path2 = cwd.resolve(loc).fullpath();
4712
+ this.#resolvedLoc = { loc, cwd, path: path2 };
4713
+ return path2;
4705
4714
  }
4706
4715
  /**
4707
4716
  * The location of the node_modules folder where this node's edgesOut
@@ -4713,7 +4722,11 @@ var Node = class _Node {
4713
4722
  */
4714
4723
  nodeModules(scurry) {
4715
4724
  const loc = this.resolvedLocation(scurry);
4716
- return this.inVltStore() ? loc.substring(0, loc.length - this.name.length - 1) : scurry.resolve(loc, "node_modules");
4725
+ if (this.inVltStore()) {
4726
+ return loc.substring(0, loc.length - this.name.length - 1);
4727
+ }
4728
+ const { sep: sep2 } = scurry.cwd;
4729
+ return (loc.endsWith(sep2) ? loc : loc + sep2) + "node_modules";
4717
4730
  }
4718
4731
  constructor(options, id2, manifest, spec2, name, version) {
4719
4732
  this.#options = options;
@@ -8944,8 +8957,8 @@ var Query = class {
8944
8957
  specificity
8945
8958
  } = await walk({
8946
8959
  cancellable: async () => {
8947
- await new Promise((resolve13) => {
8948
- setTimeout(resolve13, 0);
8960
+ await new Promise((resolve14) => {
8961
+ setTimeout(resolve14, 0);
8949
8962
  });
8950
8963
  signal.throwIfAborted();
8951
8964
  },
@@ -10586,10 +10599,36 @@ var del = (diff2, node) => {
10586
10599
  diff2.nodes.add.delete(node);
10587
10600
  diff2.nodes.delete.add(node);
10588
10601
  };
10602
+ var isUnsupported = (node) => !!node.manifest?.deprecated || !platformCheck(
10603
+ node.platform ?? node.manifest ?? {},
10604
+ process.version,
10605
+ process.platform,
10606
+ process.arch
10607
+ );
10608
+ var pruneUnsupportedOptional = (diff2) => {
10609
+ let pruned = false;
10610
+ for (const node of diff2.nodes.add) {
10611
+ if (node.inVltStore() && !node.extracted && node.isOptional() && isUnsupported(node)) {
10612
+ del(diff2, node);
10613
+ pruned = true;
10614
+ }
10615
+ }
10616
+ if (!pruned) return;
10617
+ for (const node of diff2.to.gc().values()) {
10618
+ diff2.nodes.add.delete(node);
10619
+ diff2.nodes.delete.add(node);
10620
+ }
10621
+ for (const edge of diff2.edges.add) {
10622
+ if (diff2.to.nodes.get(edge.from.id) !== edge.from) {
10623
+ diff2.edges.add.delete(edge);
10624
+ }
10625
+ }
10626
+ };
10589
10627
 
10590
10628
  // ../../src/graph/src/reify/bin-chmod.ts
10591
10629
  import { statSync as statSync3 } from "node:fs";
10592
10630
  import { chmod as chmod2 } from "node:fs/promises";
10631
+ import { join as join2 } from "node:path";
10593
10632
  var binChmodAll = async (nodes, scurry) => {
10594
10633
  const chmods = [];
10595
10634
  for (const node of nodes) {
@@ -10601,9 +10640,7 @@ var binChmod = async (node, scurry) => {
10601
10640
  const chmods = [];
10602
10641
  if (!node.bins) return;
10603
10642
  for (const bin of Object.values(node.bins)) {
10604
- const path2 = scurry.resolve(
10605
- `${node.resolvedLocation(scurry)}/${bin}`
10606
- );
10643
+ const path2 = join2(node.resolvedLocation(scurry), bin);
10607
10644
  let mode;
10608
10645
  try {
10609
10646
  mode = statSync3(path2).mode;
@@ -10618,10 +10655,10 @@ var binChmod = async (node, scurry) => {
10618
10655
 
10619
10656
  // ../../src/graph/src/reify/binding-gyp.ts
10620
10657
  import { lstatSync } from "node:fs";
10621
- import { join as join2 } from "node:path";
10658
+ import { join as join3 } from "node:path";
10622
10659
  var onDisk = (dir) => {
10623
10660
  try {
10624
- return !!lstatSync(join2(dir, "binding.gyp"), {
10661
+ return !!lstatSync(join3(dir, "binding.gyp"), {
10625
10662
  throwIfNoEntry: false
10626
10663
  })?.isFile();
10627
10664
  } catch {
@@ -10633,6 +10670,108 @@ var hasBindingGyp = (node, scurry) => node.bindingGyp ?? onDisk(node.resolvedLoc
10633
10670
  // ../../src/graph/src/reify/scripts-manifest.ts
10634
10671
  var scriptsManifest = (manifest, dir, packageJson) => manifest.hasInstallScript && !manifest.scripts ? packageJson.read(dir) : manifest;
10635
10672
 
10673
+ // ../../src/graph/src/reify/unshare.ts
10674
+ import { randomBytes } from "node:crypto";
10675
+ import { lstatSync as lstatSync2, readdirSync, rmSync } from "node:fs";
10676
+ import {
10677
+ chmod as chmod3,
10678
+ readFile,
10679
+ rename,
10680
+ rm,
10681
+ writeFile as writeFile2
10682
+ } from "node:fs/promises";
10683
+ import { join as join4 } from "node:path";
10684
+
10685
+ // ../../node_modules/.vlt/~npm~promise-call-limit@3.0.2/node_modules/promise-call-limit/dist/esm/index.js
10686
+ import * as os from "node:os";
10687
+ var defLimit = "availableParallelism" in os ? Math.max(1, os.availableParallelism() - 1) : Math.max(1, os.cpus().length - 1);
10688
+ var callLimit = (queue, { limit: limit2 = defLimit, rejectLate } = {}) => new Promise((res, rej) => {
10689
+ let active = 0;
10690
+ let current = 0;
10691
+ const results = [];
10692
+ let rejected = false;
10693
+ let rejection;
10694
+ const reject = (er) => {
10695
+ if (rejected)
10696
+ return;
10697
+ rejected = true;
10698
+ rejection ??= er;
10699
+ if (!rejectLate)
10700
+ rej(rejection);
10701
+ };
10702
+ let resolved = false;
10703
+ const resolve14 = () => {
10704
+ if (resolved || active > 0)
10705
+ return;
10706
+ resolved = true;
10707
+ res(results);
10708
+ };
10709
+ const run2 = () => {
10710
+ const c = current++;
10711
+ if (c >= queue.length)
10712
+ return rejected ? reject() : resolve14();
10713
+ active++;
10714
+ const step = queue[c];
10715
+ if (!step)
10716
+ throw new Error("walked off queue");
10717
+ results[c] = step().then((result) => {
10718
+ active--;
10719
+ results[c] = result;
10720
+ return result;
10721
+ }, (er) => {
10722
+ active--;
10723
+ reject(er);
10724
+ }).then((result) => {
10725
+ if (rejected && active === 0)
10726
+ return rej(rejection);
10727
+ run2();
10728
+ return result;
10729
+ });
10730
+ };
10731
+ for (let i = 0; i < limit2; i++)
10732
+ run2();
10733
+ });
10734
+
10735
+ // ../../src/graph/src/reify/unshare.ts
10736
+ var TMP = ".vlt-unshare-";
10737
+ var own = async (p, mode, tmp) => {
10738
+ const body = await readFile(p);
10739
+ try {
10740
+ await writeFile2(tmp, body, { mode: mode & 511, flag: "wx" });
10741
+ if (mode & 73) await chmod3(tmp, mode & 511);
10742
+ await rename(tmp, p);
10743
+ } catch (er) {
10744
+ await rm(tmp, { force: true });
10745
+ throw er;
10746
+ }
10747
+ };
10748
+ var unshare = async (dir) => {
10749
+ const pjPath = join4(dir, "package.json");
10750
+ const pj = lstatSync2(pjPath, { throwIfNoEntry: false });
10751
+ if (!pj || pj.nlink < 2) return;
10752
+ const tag = `${TMP}${randomBytes(4).toString("hex")}-`;
10753
+ let n = 0;
10754
+ const shared = [];
10755
+ const walk2 = (d) => {
10756
+ for (const ent of readdirSync(d, { withFileTypes: true })) {
10757
+ const p = join4(d, ent.name);
10758
+ if (ent.isDirectory()) walk2(p);
10759
+ else if (ent.isFile() && p !== pjPath) {
10760
+ const { mode, nlink } = lstatSync2(p);
10761
+ if (nlink > 1) {
10762
+ const tmp = join4(d, `${tag}${n++}`);
10763
+ shared.push(() => own(p, mode, tmp));
10764
+ } else if (ent.name.startsWith(TMP)) {
10765
+ rmSync(p);
10766
+ }
10767
+ }
10768
+ }
10769
+ };
10770
+ walk2(dir);
10771
+ await callLimit(shared, { limit: 16, rejectLate: true });
10772
+ await own(pjPath, pj.mode, join4(dir, `${tag}${n}`));
10773
+ };
10774
+
10636
10775
  // ../../src/graph/src/reify/build.ts
10637
10776
  var build = async (diff2, packageJson, scurry, allowScriptsNodes) => {
10638
10777
  const graph = diff2.to;
@@ -10686,26 +10825,28 @@ var visit = async (packageJson, scurry, node, signal, _path) => {
10686
10825
  } = scripts2;
10687
10826
  const hasImplicitInstall = hasBindingGyp(node, scurry) && !install2 && !preinstall;
10688
10827
  const runInstall = !!(install2 || preinstall || postinstall) || hasImplicitInstall;
10828
+ const prepable = node.id.startsWith("git") || node.importer || !node.inVltStore();
10829
+ const runPrepare = !!(prepare || preprepare || postprepare) && prepable;
10830
+ if ((runInstall || runPrepare) && node.inVltStore())
10831
+ await unshare(dir);
10689
10832
  if (runInstall) {
10690
10833
  await run({
10691
10834
  signal,
10692
10835
  arg0: "install",
10693
10836
  ignoreMissing: true,
10694
10837
  packageJson,
10695
- cwd: node.resolvedLocation(scurry),
10838
+ cwd: dir,
10696
10839
  projectRoot: node.projectRoot,
10697
10840
  manifest
10698
10841
  });
10699
10842
  }
10700
- const prepable = node.id.startsWith("git") || node.importer || !node.inVltStore();
10701
- const runPrepare = !!(prepare || preprepare || postprepare) && prepable;
10702
10843
  if (runPrepare) {
10703
10844
  await run({
10704
10845
  signal,
10705
10846
  arg0: "prepare",
10706
10847
  ignoreMissing: true,
10707
10848
  packageJson,
10708
- cwd: node.resolvedLocation(scurry),
10849
+ cwd: dir,
10709
10850
  projectRoot: node.projectRoot,
10710
10851
  manifest
10711
10852
  });
@@ -11233,7 +11374,7 @@ function mermaidOutput(options) {
11233
11374
 
11234
11375
  // ../../src/rollback-remove/src/index.ts
11235
11376
  import { spawn as spawn3 } from "node:child_process";
11236
- import { rename } from "node:fs/promises";
11377
+ import { rename as rename2 } from "node:fs/promises";
11237
11378
  import { basename, dirname as dirname3 } from "node:path";
11238
11379
 
11239
11380
  // ../../src/rollback-remove/src/remove.ts
@@ -11249,7 +11390,7 @@ var RollbackRemove = class {
11249
11390
  if (this.#paths.has(path2)) return;
11250
11391
  const target = `${dirname3(path2)}/.VLT.DELETE.${this.#key}.${basename(path2)}`;
11251
11392
  try {
11252
- await rename(path2, target);
11393
+ await rename2(path2, target);
11253
11394
  } catch (e) {
11254
11395
  if (e instanceof Error && "code" in e && /* c8 ignore start - very spurious weirdness on Windows */
11255
11396
  (e.code === "ENOENT" || e.code === "EPERM")) {
@@ -11290,7 +11431,7 @@ var RollbackRemove = class {
11290
11431
  for (const [original, moved] of this.#paths) {
11291
11432
  promises.push(
11292
11433
  rimraf(original).catch(() => {
11293
- }).then(() => rename(moved, original))
11434
+ }).then(() => rename2(moved, original))
11294
11435
  );
11295
11436
  }
11296
11437
  await Promise.all(promises);
@@ -12474,7 +12615,7 @@ var canonicalizePeerIds = (graph, options = {}) => {
12474
12615
 
12475
12616
  // ../../src/graph/src/ideal/move-peer-store-dirs.ts
12476
12617
  import { existsSync as existsSync3 } from "node:fs";
12477
- import { rename as rename2 } from "node:fs/promises";
12618
+ import { rename as rename3 } from "node:fs/promises";
12478
12619
  var movePeerStoreDirs = async (moves, {
12479
12620
  scurry,
12480
12621
  remover
@@ -12494,7 +12635,7 @@ var movePeerStoreDirs = async (moves, {
12494
12635
  }
12495
12636
  const tmp = scurry.resolve(store, `.VLT.MOVE.${key}.${to}`);
12496
12637
  try {
12497
- await rename2(src, tmp);
12638
+ await rename3(src, tmp);
12498
12639
  } catch {
12499
12640
  node.extracted = false;
12500
12641
  return;
@@ -12508,7 +12649,7 @@ var movePeerStoreDirs = async (moves, {
12508
12649
  const { node, tmp, dest } = s;
12509
12650
  try {
12510
12651
  await remover.rm(dest);
12511
- await rename2(tmp, dest);
12652
+ await rename3(tmp, dest);
12512
12653
  } catch {
12513
12654
  node.extracted = false;
12514
12655
  try {
@@ -12611,12 +12752,12 @@ var isPathSecurityError = (er) => {
12611
12752
  };
12612
12753
 
12613
12754
  // ../../src/graph/src/reify/extract-node.ts
12755
+ import { lstatSync as lstatSync3 } from "node:fs";
12614
12756
  var getOptionalFailedNodeRemover = (node, diff2) => {
12615
12757
  return diff2 ? optionalFail(diff2, node) : node.isOptional() ? () => removeOptionalSubgraph(node.graph, node) : void 0;
12616
12758
  };
12617
12759
  var extractNode = async (node, scurry, remover, options, packageInfo, diff2) => {
12618
12760
  node.extracted = true;
12619
- const { manifest = {} } = node;
12620
12761
  const target = node.resolvedLocation(scurry);
12621
12762
  const from = scurry.resolve("");
12622
12763
  const spec2 = hydrate2(node.id, node.name, options);
@@ -12625,14 +12766,7 @@ var extractNode = async (node, scurry, remover, options, packageInfo, diff2) =>
12625
12766
  diff2
12626
12767
  );
12627
12768
  const { integrity, resolved } = node;
12628
- const platformData = node.platform ?? manifest;
12629
- if (removeOptionalFailedNode && (manifest.deprecated || !platformCheck(
12630
- platformData,
12631
- process.version,
12632
- process.platform,
12633
- process.arch
12634
- // libc is auto-detected by platformCheck when not provided
12635
- ))) {
12769
+ if (removeOptionalFailedNode && isUnsupported(node)) {
12636
12770
  removeOptionalFailedNode();
12637
12771
  return {
12638
12772
  success: false,
@@ -12640,13 +12774,11 @@ var extractNode = async (node, scurry, remover, options, packageInfo, diff2) =>
12640
12774
  error: new Error("Platform check failed or package deprecated")
12641
12775
  };
12642
12776
  }
12643
- const { scripts: scripts2, hasInstallScript } = manifest;
12644
12777
  const extractOptions = {
12645
12778
  from,
12646
12779
  integrity,
12647
12780
  resolved,
12648
- fromLockfile: node.resolvedFromLockfile,
12649
- installScripts: !!(hasInstallScript || scripts2?.install || scripts2?.preinstall || scripts2?.postinstall)
12781
+ fromLockfile: node.resolvedFromLockfile
12650
12782
  };
12651
12783
  const extracted = (r) => {
12652
12784
  if (r.integrity && !node.integrity) node.integrity = r.integrity;
@@ -12662,7 +12794,9 @@ var extractNode = async (node, scurry, remover, options, packageInfo, diff2) =>
12662
12794
  return { success: true, node };
12663
12795
  };
12664
12796
  try {
12665
- await remover.rm(target);
12797
+ if (lstatSync3(target, { throwIfNoEntry: false })) {
12798
+ await remover.rm(target);
12799
+ }
12666
12800
  if (removeOptionalFailedNode) {
12667
12801
  try {
12668
12802
  return extracted(
@@ -13542,7 +13676,10 @@ var fetchManifestsForDeps = async (packageInfo, graph, fromNode, deps, scurry, o
13542
13676
  // `keepVersion` marks a fork that only differs by an optional peer
13543
13677
  // link, so the copy keeps the version it forked from instead of
13544
13678
  // re-resolving the range to the newest satisfying release
13545
- existingNode?.manifest && (existingNode.detached || peerCompatResult.keepVersion) ? Promise.resolve(existingNode.manifest) : packageInfo.manifest(spec2, { from }).then((manifest) => manifest).catch((er) => {
13679
+ existingNode?.manifest && (existingNode.detached || peerCompatResult.keepVersion) ? Promise.resolve(existingNode.manifest) : packageInfo.manifest(
13680
+ spec2,
13681
+ isExplicit ? { from } : { from, backgroundRevalidate: true }
13682
+ ).then((manifest) => manifest).catch((er) => {
13546
13683
  if (isPathSecurityError(er)) throw er;
13547
13684
  if (!isExplicit && (edgeOptional || fromNode.optional)) {
13548
13685
  return void 0;
@@ -13784,7 +13921,6 @@ var appendNodes = async (packageInfo, graph, fromNode, deps, scurry, options, se
13784
13921
  peerContext,
13785
13922
  depth
13786
13923
  }) => {
13787
- seen.add(node.id);
13788
13924
  const result = await fetchManifestsForDeps(
13789
13925
  packageInfo,
13790
13926
  graph,
@@ -13861,15 +13997,12 @@ var appendNodes = async (packageInfo, graph, fromNode, deps, scurry, options, se
13861
13997
  levelResults.push(placed);
13862
13998
  }
13863
13999
  postPlacementPeerCheck(graph, levelResults);
14000
+ const nextDepth = (currentLevelDeps[0]?.depth ?? 0) + 1;
13864
14001
  for (const childDepsToProcess of levelResults) {
13865
14002
  for (const childDep of childDepsToProcess) {
13866
- if (!seen.has(childDep.node.id)) {
13867
- const currentDepth = currentLevelDeps[0]?.depth ?? 0;
13868
- nextLevelDeps.push({
13869
- ...childDep,
13870
- depth: currentDepth + 1
13871
- });
13872
- }
14003
+ if (seen.has(childDep.node.id)) continue;
14004
+ seen.add(childDep.node.id);
14005
+ nextLevelDeps.push({ ...childDep, depth: nextDepth });
13873
14006
  }
13874
14007
  }
13875
14008
  currentLevelDeps = nextLevelDeps;
@@ -14041,6 +14174,57 @@ var buildIdealFromStartingGraph = async (options) => {
14041
14174
  return options.graph;
14042
14175
  };
14043
14176
 
14177
+ // ../../src/graph/src/ideal/prefetch-resolve.ts
14178
+ var prefetchResolve = (graph, packageInfo, options) => {
14179
+ if (options.modifiers) return 0;
14180
+ const registry2 = options.registry;
14181
+ if (!registry2) return 0;
14182
+ const scopes = Object.keys(options["scoped-registries"] ?? {});
14183
+ const scoped = (name) => scopes.some((scope2) => name.startsWith(`${scope2}/`));
14184
+ const roots = [];
14185
+ const seen = /* @__PURE__ */ new Set();
14186
+ for (const importer of graph.importers) {
14187
+ const manifest = importer.manifest;
14188
+ if (!manifest) continue;
14189
+ for (const field of [
14190
+ "dependencies",
14191
+ "devDependencies",
14192
+ "optionalDependencies"
14193
+ ]) {
14194
+ const deps = manifest[field];
14195
+ if (!deps) continue;
14196
+ for (const [name, spec2] of Object.entries(deps)) {
14197
+ if (typeof spec2 !== "string") continue;
14198
+ if (spec2.includes(":") || scoped(name)) continue;
14199
+ const key = `${name}@${spec2}`;
14200
+ if (seen.has(key)) continue;
14201
+ seen.add(key);
14202
+ roots.push({ name, spec: spec2 });
14203
+ }
14204
+ }
14205
+ }
14206
+ if (!roots.length) return 0;
14207
+ const have = [];
14208
+ for (const node of graph.nodes.values()) {
14209
+ if (node.manifest && node.name && node.version && !scoped(node.name)) {
14210
+ have.push(`${node.name}@${node.version}`);
14211
+ }
14212
+ }
14213
+ packageInfo.prefetchResolve(registry2, {
14214
+ roots,
14215
+ have,
14216
+ ...scopes.length ? { stop: { scopes } } : {},
14217
+ platform: {
14218
+ os: process.platform,
14219
+ cpu: process.arch,
14220
+ node: process.versions.node,
14221
+ // undefined never serializes, so no libc means the field is absent
14222
+ libc: detectLibc()
14223
+ }
14224
+ });
14225
+ return roots.length;
14226
+ };
14227
+
14044
14228
  // ../../src/graph/src/ideal/build.ts
14045
14229
  var getMap2 = (m) => m ?? /* @__PURE__ */ new Map();
14046
14230
  var validateFileDepNode = (graph, id2) => {
@@ -14077,6 +14261,7 @@ var build3 = async (options) => {
14077
14261
  monorepo
14078
14262
  });
14079
14263
  }
14264
+ prefetchResolve(graph, packageInfo, options);
14080
14265
  const res = await buildIdealFromStartingGraph({
14081
14266
  ...options,
14082
14267
  scurry,
@@ -14103,63 +14288,13 @@ var build3 = async (options) => {
14103
14288
  // ../../src/graph/src/reify/index.ts
14104
14289
  import { availableParallelism as availableParallelism2 } from "node:os";
14105
14290
 
14106
- // ../../node_modules/.vlt/~npm~promise-call-limit@3.0.2/node_modules/promise-call-limit/dist/esm/index.js
14107
- import * as os from "node:os";
14108
- var defLimit = "availableParallelism" in os ? Math.max(1, os.availableParallelism() - 1) : Math.max(1, os.cpus().length - 1);
14109
- var callLimit = (queue, { limit: limit2 = defLimit, rejectLate } = {}) => new Promise((res, rej) => {
14110
- let active = 0;
14111
- let current = 0;
14112
- const results = [];
14113
- let rejected = false;
14114
- let rejection;
14115
- const reject = (er) => {
14116
- if (rejected)
14117
- return;
14118
- rejected = true;
14119
- rejection ??= er;
14120
- if (!rejectLate)
14121
- rej(rejection);
14122
- };
14123
- let resolved = false;
14124
- const resolve13 = () => {
14125
- if (resolved || active > 0)
14126
- return;
14127
- resolved = true;
14128
- res(results);
14129
- };
14130
- const run2 = () => {
14131
- const c = current++;
14132
- if (c >= queue.length)
14133
- return rejected ? reject() : resolve13();
14134
- active++;
14135
- const step = queue[c];
14136
- if (!step)
14137
- throw new Error("walked off queue");
14138
- results[c] = step().then((result) => {
14139
- active--;
14140
- results[c] = result;
14141
- return result;
14142
- }, (er) => {
14143
- active--;
14144
- reject(er);
14145
- }).then((result) => {
14146
- if (rejected && active === 0)
14147
- return rej(rejection);
14148
- run2();
14149
- return result;
14150
- });
14151
- };
14152
- for (let i = 0; i < limit2; i++)
14153
- run2();
14154
- });
14155
-
14156
14291
  // ../../src/cmd-shim/src/index.ts
14157
14292
  import {
14158
- chmod as chmod3,
14293
+ chmod as chmod4,
14159
14294
  mkdir as mkdir2,
14160
- readFile as readFile2,
14295
+ readFile as readFile3,
14161
14296
  stat as stat2,
14162
- writeFile as writeFile2
14297
+ writeFile as writeFile3
14163
14298
  } from "node:fs/promises";
14164
14299
  import { dirname as dirname5, relative as relative2 } from "node:path";
14165
14300
 
@@ -14193,7 +14328,7 @@ var replaceDollarWithPercentPair = (value) => {
14193
14328
  };
14194
14329
 
14195
14330
  // ../../src/cmd-shim/src/read.ts
14196
- import { lstat, readFile, readlink } from "node:fs/promises";
14331
+ import { lstat, readFile as readFile2, readlink } from "node:fs/promises";
14197
14332
  import { dirname as dirname4, resolve as resolve8 } from "node:path";
14198
14333
 
14199
14334
  // ../../src/cmd-shim/src/paths.ts
@@ -14245,7 +14380,7 @@ var readCmdShimIfExists = async (path2) => {
14245
14380
  if (st.isSymbolicLink()) {
14246
14381
  return resolve8(dirname4(path2), await readlink(path2));
14247
14382
  }
14248
- const contents = await readFile(path2);
14383
+ const contents = await readFile2(path2);
14249
14384
  const destination = extractPath(path2, contents.toString());
14250
14385
  if (destination) return resolve8(dirname4(path2), destination);
14251
14386
  } catch {
@@ -14270,7 +14405,7 @@ var writeShim = async (from, to, remover) => {
14270
14405
  remover.rm(to + ".pwsh")
14271
14406
  ]);
14272
14407
  await mkdir2(dirname5(to), { recursive: true });
14273
- const data = await readFile2(from, "utf8").catch(() => "");
14408
+ const data = await readFile3(from, "utf8").catch(() => "");
14274
14409
  if (!data) {
14275
14410
  return await writeShim_(from, to);
14276
14411
  }
@@ -14385,34 +14520,48 @@ exit $LASTEXITCODE
14385
14520
  `;
14386
14521
  }
14387
14522
  await Promise.all([
14388
- writeFile2(to + ".cmd", cmd, "utf8"),
14389
- writeFile2(to + ".ps1", pwsh, "utf8"),
14390
- writeFile2(to, sh, "utf8")
14523
+ writeFile3(to + ".cmd", cmd, "utf8"),
14524
+ writeFile3(to + ".ps1", pwsh, "utf8"),
14525
+ writeFile3(to, sh, "utf8")
14391
14526
  ]);
14392
14527
  await chmodShim(to);
14393
14528
  };
14394
14529
  var chmodShim = async (to) => await Promise.all([
14395
- chmod3(to, 493),
14396
- chmod3(to + ".cmd", 493),
14397
- chmod3(to + ".ps1", 493)
14530
+ chmod4(to, 493),
14531
+ chmod4(to + ".cmd", 493),
14532
+ chmod4(to + ".ps1", 493)
14398
14533
  ]);
14399
14534
 
14400
14535
  // ../../src/graph/src/reify/add-edge.ts
14401
- import { mkdir as mkdir3, symlink } from "node:fs/promises";
14402
- import { dirname as dirname6, relative as relative3, resolve as resolve9 } from "node:path";
14536
+ import { symlinkSync as symlinkSync2 } from "node:fs";
14537
+ import { dirname as dirname7, relative as relative3, resolve as resolve9 } from "node:path";
14538
+
14539
+ // ../../src/graph/src/reify/symlink-sync.ts
14540
+ import { mkdirSync as mkdirSync2, symlinkSync } from "node:fs";
14541
+ import { dirname as dirname6 } from "node:path";
14542
+ var symlinkSyncMkdirp = (target, link2, type2) => {
14543
+ try {
14544
+ symlinkSync(target, link2, type2);
14545
+ } catch (er) {
14546
+ if (er.code !== "ENOENT") throw er;
14547
+ mkdirSync2(dirname6(link2), { recursive: true });
14548
+ symlinkSync(target, link2, type2);
14549
+ }
14550
+ };
14551
+
14552
+ // ../../src/graph/src/reify/add-edge.ts
14403
14553
  var clobberSymlink = async (target, link2, remover, type2 = "file") => {
14404
14554
  const symlinkType = type2 === "dir" && process.platform === "win32" ? "junction" : type2;
14405
- const symlinkTarget = symlinkType === "junction" ? resolve9(dirname6(link2), target) : target;
14406
- await mkdir3(dirname6(link2), { recursive: true });
14555
+ const symlinkTarget = symlinkType === "junction" ? resolve9(dirname7(link2), target) : target;
14407
14556
  try {
14408
- await symlink(symlinkTarget, link2, symlinkType);
14557
+ symlinkSyncMkdirp(symlinkTarget, link2, symlinkType);
14409
14558
  } catch (er) {
14410
14559
  if (er.code !== "EEXIST") {
14411
14560
  throw er;
14412
14561
  }
14413
14562
  await remover.rm(link2);
14414
14563
  try {
14415
- await symlink(symlinkTarget, link2, symlinkType);
14564
+ symlinkSync2(symlinkTarget, link2, symlinkType);
14416
14565
  } catch (er2) {
14417
14566
  if (er2.code !== "EEXIST") {
14418
14567
  throw er2;
@@ -14422,17 +14571,13 @@ var clobberSymlink = async (target, link2, remover, type2 = "file") => {
14422
14571
  };
14423
14572
  var addEdge = async (edge, scurry, remover, bins) => {
14424
14573
  if (!edge.to) return;
14425
- const binRoot = scurry.resolve(
14426
- edge.from.nodeModules(scurry),
14427
- ".bin"
14428
- );
14429
- const path2 = scurry.resolve(
14430
- edge.from.nodeModules(scurry),
14431
- edge.spec.name
14432
- );
14574
+ const { sep: sep2 } = scurry.cwd;
14575
+ const nm = edge.from.nodeModules(scurry);
14576
+ const binRoot = nm + sep2 + ".bin";
14577
+ const path2 = nm + sep2 + edge.spec.name.replace("/", sep2);
14433
14578
  const promises = [];
14434
14579
  const target = relative3(
14435
- dirname6(path2),
14580
+ dirname7(path2),
14436
14581
  edge.to.resolvedLocation(scurry)
14437
14582
  );
14438
14583
  const p = clobberSymlink(target, path2, remover, "dir");
@@ -14440,8 +14585,8 @@ var addEdge = async (edge, scurry, remover, bins) => {
14440
14585
  else promises.push(p);
14441
14586
  if (bins) {
14442
14587
  for (const [key, val] of Object.entries(bins)) {
14443
- const link2 = scurry.resolve(binRoot, key);
14444
- const absTarget = scurry.resolve(path2, val);
14588
+ const link2 = resolve9(binRoot, key);
14589
+ const absTarget = resolve9(path2, val);
14445
14590
  const target2 = relative3(binRoot, absTarget);
14446
14591
  promises.push(
14447
14592
  process.platform === "win32" ? cmdShimIfExists(absTarget, link2, remover) : clobberSymlink(target2, link2, remover)
@@ -14477,6 +14622,7 @@ var addNodes = (diff2, scurry, remover, options, packageInfo) => {
14477
14622
  };
14478
14623
 
14479
14624
  // ../../src/graph/src/reify/delete-edge.ts
14625
+ import { resolve as resolve10 } from "node:path";
14480
14626
  var rmBinPosix = (remover, bin) => {
14481
14627
  return [remover.rm(bin)];
14482
14628
  };
@@ -14493,15 +14639,16 @@ var deleteEdge = async (edge, scurry, remover) => {
14493
14639
  spec: { name },
14494
14640
  to
14495
14641
  } = edge;
14642
+ const { sep: sep2 } = scurry.cwd;
14496
14643
  const nm = edge.from.nodeModules(scurry);
14497
- const path2 = scurry.resolve(nm, name);
14498
- const binRoot = scurry.cwd.resolve(`${nm}/.bin`);
14644
+ const path2 = nm + sep2 + name.replace("/", sep2);
14645
+ const binRoot = nm + sep2 + ".bin";
14499
14646
  const promises = [];
14500
14647
  promises.push(remover.rm(path2));
14501
14648
  const bins = to?.bins;
14502
14649
  if (bins) {
14503
14650
  for (const key of Object.keys(bins)) {
14504
- const bin = binRoot.resolve(key).fullpath();
14651
+ const bin = resolve10(binRoot, key);
14505
14652
  promises.push(...rmBin(remover, bin));
14506
14653
  }
14507
14654
  }
@@ -14558,10 +14705,11 @@ var checkNeededBuild = (options) => {
14558
14705
  // ../../src/graph/src/reify/delete-nodes.ts
14559
14706
  var deleteNodes = (diff2, remover, scurry) => {
14560
14707
  const store = scurry.resolve("node_modules/.vlt");
14708
+ const { sep: sep2 } = scurry.cwd;
14561
14709
  const rmActions = [];
14562
14710
  for (const node of diff2.nodes.delete) {
14563
14711
  if (!node.inVltStore()) continue;
14564
- rmActions.push(remover.rm(scurry.resolve(store, node.id)));
14712
+ rmActions.push(remover.rm(store + sep2 + node.id));
14565
14713
  for (const edge of node.edgesIn) {
14566
14714
  rmActions.push(deleteEdge(edge, scurry, remover));
14567
14715
  }
@@ -14570,8 +14718,8 @@ var deleteNodes = (diff2, remover, scurry) => {
14570
14718
  };
14571
14719
 
14572
14720
  // ../../src/graph/src/reify/internal-hoist.ts
14573
- import { mkdir as mkdir4, symlink as symlink2 } from "node:fs/promises";
14574
- import { dirname as dirname7, relative as relative4 } from "node:path";
14721
+ import { mkdir as mkdir3 } from "node:fs/promises";
14722
+ import { dirname as dirname8, relative as relative4 } from "node:path";
14575
14723
  var pickNodeToHoist = (nodes) => {
14576
14724
  let pick = void 0;
14577
14725
  let pickNode = void 0;
@@ -14652,7 +14800,7 @@ var internalHoist = async (graph, options, remover) => {
14652
14800
  const hoistDir = scurry.cwd.resolve(
14653
14801
  "node_modules/.vlt/node_modules"
14654
14802
  );
14655
- await mkdir4(hoistDir.fullpath(), { recursive: true });
14803
+ await mkdir3(hoistDir.fullpath(), { recursive: true });
14656
14804
  const removes = [];
14657
14805
  for (const entry of await hoistDir.readdir()) {
14658
14806
  const name = entry.name;
@@ -14679,22 +14827,15 @@ var internalHoist = async (graph, options, remover) => {
14679
14827
  }
14680
14828
  }
14681
14829
  await Promise.all(removes);
14682
- const symlinks = [];
14830
+ const hoistPath = hoistDir.fullpath();
14831
+ const vlt = scurry.resolve("node_modules/.vlt");
14832
+ const { sep: sep2 } = scurry.cwd;
14833
+ const native = (n) => n.replace("/", sep2);
14683
14834
  for (const [name, { name: nodeName, id: id2 }] of links) {
14684
- const target = scurry.resolve(
14685
- `node_modules/.vlt/${id2}/node_modules/${nodeName}`
14686
- );
14687
- const path2 = scurry.resolve(
14688
- `node_modules/.vlt/node_modules/${name}`
14689
- );
14690
- if (name.includes("/")) {
14691
- await mkdir4(dirname7(path2), { recursive: true });
14692
- }
14693
- symlinks.push(
14694
- symlink2(relative4(dirname7(path2), target), path2, "dir")
14695
- );
14835
+ const target = vlt + sep2 + id2 + sep2 + "node_modules" + sep2 + native(nodeName);
14836
+ const path2 = hoistPath + sep2 + native(name);
14837
+ symlinkSyncMkdirp(relative4(dirname8(path2), target), path2, "dir");
14696
14838
  }
14697
- await Promise.all(symlinks);
14698
14839
  };
14699
14840
  var checkExisting = async (name, entry, links, removes, scurry, remover) => {
14700
14841
  const target = await entry.readlink();
@@ -14942,6 +15083,7 @@ var reify_ = async (options, diff2, remover, saveImportersPackageJson) => {
14942
15083
  const res = {};
14943
15084
  const { packageInfo, packageJson, scurry, allowScripts } = options;
14944
15085
  const lfData = lockfileData(options);
15086
+ pruneUnsupportedOptional(diff2);
14945
15087
  const actions = addNodes(
14946
15088
  diff2,
14947
15089
  scurry,
@@ -14992,8 +15134,8 @@ var reify_ = async (options, diff2, remover, saveImportersPackageJson) => {
14992
15134
  };
14993
15135
 
14994
15136
  // ../../src/graph/src/install.ts
14995
- import { existsSync as existsSync6, rmSync as rmSync3 } from "node:fs";
14996
- import { resolve as resolve12 } from "node:path";
15137
+ import { existsSync as existsSync6, rmSync as rmSync4 } from "node:fs";
15138
+ import { resolve as resolve13 } from "node:path";
14997
15139
 
14998
15140
  // ../../src/graph/src/lockfile/format-options-change.ts
14999
15141
  var redactUserinfo = (value) => {
@@ -15012,8 +15154,8 @@ var formatOptionsChange = ({
15012
15154
  }) => `${section}:${key === void 0 ? "" : ` ${key}`} ` + (from === void 0 ? "(missing)" : `"${redactUserinfo(from)}"`) + ` -> ${to === void 0 ? "(removed)" : `"${redactUserinfo(to)}"`}`;
15013
15155
 
15014
15156
  // ../../src/graph/src/uninstall.ts
15015
- import { existsSync as existsSync4, rmSync } from "node:fs";
15016
- import { resolve as resolve10 } from "node:path";
15157
+ import { existsSync as existsSync4, rmSync as rmSync2 } from "node:fs";
15158
+ import { resolve as resolve11 } from "node:path";
15017
15159
  var uninstall = async (options, remove) => {
15018
15160
  const mainManifest = options.packageJson.read(options.projectRoot);
15019
15161
  const modifiers = GraphModifier.maybeLoad(options);
@@ -15060,12 +15202,12 @@ var uninstall = async (options, remove) => {
15060
15202
  await remover.rollback().catch(() => {
15061
15203
  });
15062
15204
  try {
15063
- const hiddenLockfile = resolve10(
15205
+ const hiddenLockfile = resolve11(
15064
15206
  options.projectRoot,
15065
15207
  "node_modules/.vlt-lock.json"
15066
15208
  );
15067
15209
  if (existsSync4(hiddenLockfile)) {
15068
- rmSync(hiddenLockfile, { force: true });
15210
+ rmSync2(hiddenLockfile, { force: true });
15069
15211
  }
15070
15212
  } catch {
15071
15213
  }
@@ -15074,8 +15216,8 @@ var uninstall = async (options, remove) => {
15074
15216
  };
15075
15217
 
15076
15218
  // ../../src/graph/src/update.ts
15077
- import { existsSync as existsSync5, rmSync as rmSync2 } from "node:fs";
15078
- import { resolve as resolve11 } from "node:path";
15219
+ import { existsSync as existsSync5, rmSync as rmSync3 } from "node:fs";
15220
+ import { resolve as resolve12 } from "node:path";
15079
15221
  var update = async (options) => {
15080
15222
  let mainManifest = void 0;
15081
15223
  try {
@@ -15124,12 +15266,12 @@ var update = async (options) => {
15124
15266
  await remover.rollback().catch(() => {
15125
15267
  });
15126
15268
  try {
15127
- const hiddenLockfile = resolve11(
15269
+ const hiddenLockfile = resolve12(
15128
15270
  options.projectRoot,
15129
15271
  "node_modules/.vlt-lock.json"
15130
15272
  );
15131
15273
  if (existsSync5(hiddenLockfile)) {
15132
- rmSync2(hiddenLockfile, { force: true });
15274
+ rmSync3(hiddenLockfile, { force: true });
15133
15275
  }
15134
15276
  } catch {
15135
15277
  }
@@ -15223,7 +15365,7 @@ var install = async (options, add) => {
15223
15365
  );
15224
15366
  }
15225
15367
  if (options.expectLockfile || options.frozenLockfile) {
15226
- const lockfilePath = resolve12(options.projectRoot, "vlt-lock.json");
15368
+ const lockfilePath = resolve13(options.projectRoot, "vlt-lock.json");
15227
15369
  if (!existsSync6(lockfilePath)) {
15228
15370
  throw error(
15229
15371
  "vlt-lock.json file is required when using --expect-lockfile, --frozen-lockfile, or ci command",
@@ -15342,7 +15484,7 @@ var install = async (options, add) => {
15342
15484
  );
15343
15485
  }
15344
15486
  }
15345
- const lockfilePath = resolve12(
15487
+ const lockfilePath = resolve13(
15346
15488
  options.projectRoot,
15347
15489
  "vlt-lock.json"
15348
15490
  );
@@ -15356,7 +15498,7 @@ var install = async (options, add) => {
15356
15498
  }
15357
15499
  const remover = new RollbackRemove();
15358
15500
  if (options.cleanInstall) {
15359
- const nodeModulesPath = resolve12(
15501
+ const nodeModulesPath = resolve13(
15360
15502
  options.projectRoot,
15361
15503
  "node_modules"
15362
15504
  );
@@ -15424,12 +15566,12 @@ var install = async (options, add) => {
15424
15566
  await remover.rollback().catch(() => {
15425
15567
  });
15426
15568
  try {
15427
- const hiddenLockfile = resolve12(
15569
+ const hiddenLockfile = resolve13(
15428
15570
  options.projectRoot,
15429
15571
  "node_modules/.vlt-lock.json"
15430
15572
  );
15431
15573
  if (existsSync6(hiddenLockfile)) {
15432
- rmSync3(hiddenLockfile, { force: true });
15574
+ rmSync4(hiddenLockfile, { force: true });
15433
15575
  }
15434
15576
  } catch {
15435
15577
  }
@@ -15448,12 +15590,12 @@ export {
15448
15590
  execFG,
15449
15591
  runExec,
15450
15592
  runExecFG,
15593
+ callLimit,
15451
15594
  Query,
15452
15595
  build2 as build,
15453
15596
  jsonOutput,
15454
15597
  humanReadableOutput,
15455
15598
  mermaidOutput,
15456
- callLimit,
15457
15599
  findCmdShimIfExists,
15458
15600
  RollbackRemove,
15459
15601
  GraphModifier,