@vltpkg/cli-js 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.
Files changed (64) hide show
  1. package/{access-6HRR4HXE.js → access-I7Q5S4HE.js} +1 -1
  2. package/{bugs-2CAZQ32S.js → bugs-XJDVOIWV.js} +4 -4
  3. package/{build-OAWTNBMS.js → build-KFMSG6YJ.js} +1 -1
  4. package/{cache-JTAFST6T.js → cache-RL4MUZZ4.js} +1 -1
  5. package/{chunk-K3RN3BGU.js → chunk-6SMCDBB5.js} +1 -1
  6. package/{chunk-CPM47YUH.js → chunk-AAO77QBG.js} +1 -1
  7. package/{chunk-ZINDEKAU.js → chunk-BCS77CZK.js} +72 -72
  8. package/{chunk-M7HPHM7B.js → chunk-CX6CSVSZ.js} +1 -1
  9. package/{chunk-HAGUS4HI.js → chunk-DPQWORL7.js} +1 -1
  10. package/{chunk-7RZL7BZI.js → chunk-E76YOTJF.js} +45 -9
  11. package/{chunk-VPKJNCKL.js → chunk-EGIFRSA7.js} +1 -1
  12. package/{chunk-CLDF5XLG.js → chunk-FXFN5J74.js} +2 -2
  13. package/chunk-HDWMQCAC.js +73 -0
  14. package/{chunk-WX2DCAG2.js → chunk-I626GJCR.js} +2 -2
  15. package/{chunk-VRIS5HAW.js → chunk-LUL76G2K.js} +2 -2
  16. package/chunk-QI6JZT5E.js +781 -0
  17. package/{chunk-3MWZTKGK.js → chunk-UUE6D7ZK.js} +52 -20
  18. package/{chunk-D2MVJDUA.js → chunk-YXHBZAYO.js} +1 -1
  19. package/{ci-TOJJVHI4.js → ci-25PDKMKT.js} +2 -2
  20. package/cli-package.json +5 -4
  21. package/{config-DVAPEE5D.js → config-EUN3UG63.js} +3 -3
  22. package/{config-GOV4E2KK.js → config-SGKD6FN7.js} +3 -3
  23. package/{create-NGJD7K4L.js → create-7MBL7X4J.js} +6 -6
  24. package/{deprecate-WROL4AHK.js → deprecate-RXSOKRB6.js} +2 -2
  25. package/{devtools-TPMVKPB5.js → devtools-6NFQDW4L.js} +29 -29
  26. package/{dist-tag-WZXXWXMB.js → dist-tag-TR6YTPWB.js} +1 -1
  27. package/{docs-YCOZFMZG.js → docs-SXJQN3VK.js} +4 -4
  28. package/{exec-URG5OWLH.js → exec-GZUI7N7U.js} +6 -6
  29. package/{exec-cache-KHDOEH2F.js → exec-cache-ERIWZB3O.js} +4 -4
  30. package/{exec-local-52TVUL5K.js → exec-local-5EIXJDU2.js} +3 -3
  31. package/{help-LNSDVBGJ.js → help-VZXBYP36.js} +1 -1
  32. package/{init-XNMWYATA.js → init-B3GRYNH5.js} +2 -2
  33. package/{install-SKUZERZJ.js → install-GFUAOCU3.js} +3 -3
  34. package/{list-XEDVFUD5.js → list-SWSGDOS2.js} +3 -3
  35. package/{login-52SA2DSI.js → login-2QU5SPGP.js} +1 -1
  36. package/{logout-5YYHNV5W.js → logout-DVW3KZKJ.js} +1 -1
  37. package/{pack-B7QZHMYP.js → pack-GNYL35NY.js} +3 -3
  38. package/package.json +1 -1
  39. package/{ping-PRGDYDRI.js → ping-5NKJAV3C.js} +1 -1
  40. package/{pkg-UEIQIVVD.js → pkg-XGXCIZCS.js} +3 -3
  41. package/{profile-46FKVQEL.js → profile-OZYH6GL2.js} +1 -1
  42. package/{publish-HBYHOSKH.js → publish-PUXCD3CT.js} +23 -14
  43. package/{query-5A4YLS2C.js → query-TUQMPQGD.js} +3 -3
  44. package/registry-client-package.json +1 -1
  45. package/registry-client-src-revalidate.js +46 -16
  46. package/{repo-I6X66PHD.js → repo-ALXGJFIG.js} +4 -4
  47. package/{reporter-NUXJTV4G.js → reporter-MSQWYN76.js} +1 -1
  48. package/{run-VEZMUMVH.js → run-GM2E5WHJ.js} +3 -3
  49. package/{run-exec-6ADY4BKH.js → run-exec-3AMM56A3.js} +3 -3
  50. package/{src-O32QL33R.js → src-QQVS7FWK.js} +4 -4
  51. package/{token-YK6L74PA.js → token-MW32RFPW.js} +73 -24
  52. package/{uninstall-UBUZBV7E.js → uninstall-QTAVWQNB.js} +3 -3
  53. package/{unpublish-ZHJEKT7A.js → unpublish-B5JROG62.js} +1 -1
  54. package/{update-WO4BHJF4.js → update-P274ATK3.js} +2 -2
  55. package/{version-RLESYHML.js → version-23AKGCGL.js} +2 -2
  56. package/{view-UA5HXFXG.js → view-Q35LCZGS.js} +2 -2
  57. package/vlr.js +1 -1
  58. package/vlrx.js +1 -1
  59. package/vlt.js +1 -1
  60. package/vlx.js +1 -1
  61. package/vlxl.js +1 -1
  62. package/{whoami-7H3FPR2O.js → whoami-XH64UEWS.js} +1 -1
  63. package/chunk-7WHVJ56C.js +0 -73
  64. package/chunk-BW6C3YUV.js +0 -301
@@ -4190,6 +4190,14 @@ var satisfiesTuple = (tuple, spec2, fromLocation = process.cwd(), projectRoot =
4190
4190
  const { options } = spec2;
4191
4191
  spec2 = spec2.final;
4192
4192
  const [type2, first, second] = tuple;
4193
+ if (spec2.type === "registry" && type2 === "workspace") {
4194
+ if (!monorepo) return false;
4195
+ const ws = monorepo.get(first);
4196
+ if (ws?.name !== spec2.name) return false;
4197
+ if (!spec2.range) return true;
4198
+ const v = parse(ws.manifest.version ?? "");
4199
+ return !!v && spec2.range.test(v);
4200
+ }
4193
4201
  if (spec2.type !== type2) return false;
4194
4202
  switch (spec2.type) {
4195
4203
  case "registry": {
@@ -9369,10 +9377,11 @@ var loadEdges = (graph, edges, options) => {
9369
9377
  toNode = graph.nodes.get(asDepID(toId));
9370
9378
  }
9371
9379
  }
9372
- const spec2 = Spec.parse(specName, valRest.substring(0, vrSplit), {
9373
- ...options,
9374
- registry: fromNode.registry
9375
- });
9380
+ const spec2 = Spec.parse(
9381
+ specName,
9382
+ valRest.substring(0, vrSplit),
9383
+ options
9384
+ );
9376
9385
  if (useOptimizations) {
9377
9386
  edgeProcessingQueue.push({
9378
9387
  fromNode,
@@ -9682,7 +9691,10 @@ var parseDir = (options, scurry, packageJson, depsFound, graph, fromNode, currDi
9682
9691
  const depType = shorten(type2, alias, fromNode.manifest);
9683
9692
  let spec2 = Spec2.parse(alias, bareSpec, {
9684
9693
  ...options,
9685
- registry: fromNode.registry
9694
+ // fall back to options.registry (which the lockfile merges into)
9695
+ // so importer-level edges don't silently revert to the default
9696
+ // npm registry. see vltpkg/vltpkg#1580.
9697
+ registry: fromNode.registry ?? options.registry
9686
9698
  });
9687
9699
  const { spec: modifiedSpec, queryModifier } = maybeApplyModifierToSpec(spec2, alias, modifierRefs);
9688
9700
  spec2 = modifiedSpec;
@@ -9729,7 +9741,7 @@ var parseDir = (options, scurry, packageJson, depsFound, graph, fromNode, currDi
9729
9741
  const depType = shorten(type2, name, fromNode.manifest);
9730
9742
  let spec2 = Spec2.parse(name, bareSpec, {
9731
9743
  ...options,
9732
- registry: fromNode.registry
9744
+ registry: fromNode.registry ?? options.registry
9733
9745
  });
9734
9746
  const { spec: modifiedSpec, queryModifier } = maybeApplyModifierToSpec(spec2, name, modifierRefs);
9735
9747
  spec2 = modifiedSpec;
@@ -11101,6 +11113,7 @@ var template = ({ name, author }) => normalizeManifest({
11101
11113
  ...author ? { author } : void 0
11102
11114
  });
11103
11115
  var GITIGNORE_ENTRY = "node_modules";
11116
+ var NPMIGNORE_ENTRY = "vlt.json";
11104
11117
  var ensureGitignore = (cwd) => {
11105
11118
  const gitignorePath = resolve7(cwd, ".gitignore");
11106
11119
  if (!existsSync3(gitignorePath)) {
@@ -11122,6 +11135,27 @@ var ensureGitignore = (cwd) => {
11122
11135
  }
11123
11136
  return void 0;
11124
11137
  };
11138
+ var ensureNpmignore = (cwd) => {
11139
+ const npmignorePath = resolve7(cwd, ".npmignore");
11140
+ if (!existsSync3(npmignorePath)) {
11141
+ writeFileSync2(npmignorePath, `${NPMIGNORE_ENTRY}
11142
+ `, "utf8");
11143
+ return { path: npmignorePath };
11144
+ }
11145
+ const content = readFileSync3(npmignorePath, "utf8");
11146
+ const lines = content.split("\n").map((l) => l.trim());
11147
+ if (!lines.includes(NPMIGNORE_ENTRY)) {
11148
+ const prefix = content.endsWith("\n") ? "" : "\n";
11149
+ appendFileSync(
11150
+ npmignorePath,
11151
+ `${prefix}${NPMIGNORE_ENTRY}
11152
+ `,
11153
+ "utf8"
11154
+ );
11155
+ return { path: npmignorePath };
11156
+ }
11157
+ return void 0;
11158
+ };
11125
11159
  var init = async ({
11126
11160
  cwd = process.cwd(),
11127
11161
  author,
@@ -11147,9 +11181,11 @@ var init = async ({
11147
11181
  const indent = 2;
11148
11182
  packageJson.write(cwd, data, indent);
11149
11183
  const gitignore = ensureGitignore(cwd);
11184
+ const npmignore = ensureNpmignore(cwd);
11150
11185
  return {
11151
11186
  manifest: { path: path2, data },
11152
- ...gitignore ? { gitignore } : {}
11187
+ ...gitignore ? { gitignore } : {},
11188
+ ...npmignore ? { npmignore } : {}
11153
11189
  };
11154
11190
  };
11155
11191
 
@@ -13478,7 +13514,7 @@ var uninstall = async (options, remove) => {
13478
13514
  remover
13479
13515
  });
13480
13516
  if (options.lockfileOnly) {
13481
- lockfile.save({ graph, modifiers });
13517
+ lockfile.save({ ...options, graph, modifiers });
13482
13518
  const saveImportersPackageJson = (
13483
13519
  /* c8 ignore next */
13484
13520
  remove?.modifiedDependencies ? updatePackageJson({
@@ -13820,7 +13856,7 @@ var install = async (options, add) => {
13820
13856
  monorepo: fullMonorepo
13821
13857
  });
13822
13858
  if (options.lockfileOnly) {
13823
- lockfile.save({ graph, modifiers });
13859
+ lockfile.save({ ...options, graph, modifiers });
13824
13860
  const saveImportersPackageJson = (
13825
13861
  /* c8 ignore next */
13826
13862
  add?.modifiedDependencies || remove.modifiedDependencies ? updatePackageJson({
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  init,
14
14
  install
15
- } from "./chunk-7RZL7BZI.js";
15
+ } from "./chunk-E76YOTJF.js";
16
16
  import {
17
17
  asWSConfig,
18
18
  assertWSConfig,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-RIYFGX27.js";
15
15
  import {
16
16
  createHostContextsMap
17
- } from "./chunk-VRIS5HAW.js";
17
+ } from "./chunk-LUL76G2K.js";
18
18
  import {
19
19
  stderr,
20
20
  stdout,
@@ -24,7 +24,7 @@ import {
24
24
  Query,
25
25
  actual,
26
26
  isRunResult
27
- } from "./chunk-7RZL7BZI.js";
27
+ } from "./chunk-E76YOTJF.js";
28
28
  import {
29
29
  require_emoji_regex
30
30
  } from "./chunk-VTEFO2FT.js";
@@ -0,0 +1,73 @@
1
+ var global = globalThis;
2
+ import {Buffer} from "node:buffer";
3
+ import {setTimeout as _vlt_setTimeout,clearTimeout as _vlt_clearTimeout,setImmediate as _vlt_setImmediate,clearImmediate as _vlt_clearImmediate,setInterval as _vlt_setInterval,clearInterval as _vlt_clearInterval} from "node:timers";
4
+ globalThis.setTimeout = _vlt_setTimeout;
5
+ globalThis.clearTimeout = _vlt_clearTimeout;
6
+ globalThis.setImmediate = _vlt_setImmediate;
7
+ globalThis.clearImmediate = _vlt_clearImmediate;
8
+ globalThis.setInterval = _vlt_setInterval;
9
+ globalThis.clearInterval = _vlt_clearInterval;
10
+ import {createRequire as _vlt_createRequire} from "node:module";
11
+ var require = _vlt_createRequire(import.meta.filename);
12
+ import {
13
+ error
14
+ } from "./chunk-WZWDS3W4.js";
15
+ import {
16
+ __glob
17
+ } from "./chunk-PZLD7RTK.js";
18
+
19
+ // import("./commands/**/*.ts") in ../../src/cli-sdk/src/load-command.ts
20
+ var globImport_commands_ts = __glob({
21
+ "./commands/access.ts": () => import("./access-I7Q5S4HE.js"),
22
+ "./commands/bugs.ts": () => import("./bugs-XJDVOIWV.js"),
23
+ "./commands/build.ts": () => import("./build-KFMSG6YJ.js"),
24
+ "./commands/cache.ts": () => import("./cache-RL4MUZZ4.js"),
25
+ "./commands/ci.ts": () => import("./ci-25PDKMKT.js"),
26
+ "./commands/config.ts": () => import("./config-SGKD6FN7.js"),
27
+ "./commands/create.ts": () => import("./create-7MBL7X4J.js"),
28
+ "./commands/deprecate.ts": () => import("./deprecate-RXSOKRB6.js"),
29
+ "./commands/dist-tag.ts": () => import("./dist-tag-TR6YTPWB.js"),
30
+ "./commands/docs.ts": () => import("./docs-SXJQN3VK.js"),
31
+ "./commands/exec-cache.ts": () => import("./exec-cache-ERIWZB3O.js"),
32
+ "./commands/exec-local.ts": () => import("./exec-local-5EIXJDU2.js"),
33
+ "./commands/exec.ts": () => import("./exec-GZUI7N7U.js"),
34
+ "./commands/help.ts": () => import("./help-VZXBYP36.js"),
35
+ "./commands/init.ts": () => import("./init-B3GRYNH5.js"),
36
+ "./commands/install.ts": () => import("./install-GFUAOCU3.js"),
37
+ "./commands/install/reporter.ts": () => import("./reporter-MSQWYN76.js"),
38
+ "./commands/list.ts": () => import("./list-SWSGDOS2.js"),
39
+ "./commands/login.ts": () => import("./login-2QU5SPGP.js"),
40
+ "./commands/logout.ts": () => import("./logout-DVW3KZKJ.js"),
41
+ "./commands/pack.ts": () => import("./pack-GNYL35NY.js"),
42
+ "./commands/ping.ts": () => import("./ping-5NKJAV3C.js"),
43
+ "./commands/pkg.ts": () => import("./pkg-XGXCIZCS.js"),
44
+ "./commands/profile.ts": () => import("./profile-OZYH6GL2.js"),
45
+ "./commands/publish.ts": () => import("./publish-PUXCD3CT.js"),
46
+ "./commands/query.ts": () => import("./query-TUQMPQGD.js"),
47
+ "./commands/repo.ts": () => import("./repo-ALXGJFIG.js"),
48
+ "./commands/run-exec.ts": () => import("./run-exec-3AMM56A3.js"),
49
+ "./commands/run.ts": () => import("./run-GM2E5WHJ.js"),
50
+ "./commands/token.ts": () => import("./token-MW32RFPW.js"),
51
+ "./commands/uninstall.ts": () => import("./uninstall-QTAVWQNB.js"),
52
+ "./commands/unpublish.ts": () => import("./unpublish-B5JROG62.js"),
53
+ "./commands/update.ts": () => import("./update-P274ATK3.js"),
54
+ "./commands/version.ts": () => import("./version-23AKGCGL.js"),
55
+ "./commands/view.ts": () => import("./view-Q35LCZGS.js"),
56
+ "./commands/whoami.ts": () => import("./whoami-XH64UEWS.js")
57
+ });
58
+
59
+ // ../../src/cli-sdk/src/load-command.ts
60
+ var loadCommand = async (command) => {
61
+ try {
62
+ return await globImport_commands_ts(`./commands/${command}.ts`);
63
+ } catch (e) {
64
+ throw error("Could not load command", {
65
+ found: command,
66
+ cause: e
67
+ });
68
+ }
69
+ };
70
+
71
+ export {
72
+ loadCommand
73
+ };
@@ -12,10 +12,10 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  findCmdShimIfExists,
14
14
  install
15
- } from "./chunk-7RZL7BZI.js";
15
+ } from "./chunk-E76YOTJF.js";
16
16
  import {
17
17
  PackageInfoClient
18
- } from "./chunk-HAGUS4HI.js";
18
+ } from "./chunk-DPQWORL7.js";
19
19
  import {
20
20
  PathScurry
21
21
  } from "./chunk-XYCCQT7N.js";
@@ -13,7 +13,7 @@ import {
13
13
  actual,
14
14
  callLimit,
15
15
  createVirtualRoot
16
- } from "./chunk-7RZL7BZI.js";
16
+ } from "./chunk-E76YOTJF.js";
17
17
  import {
18
18
  SecurityArchive
19
19
  } from "./chunk-MAIQR5GM.js";
@@ -115,7 +115,7 @@ var reloadConfig = async (folder) => {
115
115
  unload("project");
116
116
  } catch {
117
117
  }
118
- const { Config } = await import("./config-DVAPEE5D.js");
118
+ const { Config } = await import("./config-EUN3UG63.js");
119
119
  return Config.load(folder, process.argv, true);
120
120
  };
121
121