@vltpkg/cli-js 1.3.6 → 1.3.8

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 (84) hide show
  1. package/{access-SFEGWG3Y.js → access-WLKANIOE.js} +8 -8
  2. package/{bugs-X2JHO4WZ.js → bugs-5Q3QSTWP.js} +17 -17
  3. package/{build-BK4ITRPX.js → build-XSFR63AW.js} +9 -9
  4. package/{cache-JRW72UJE.js → cache-UVPK5J5A.js} +13 -13
  5. package/chunk-3U6QWN62.js +45 -0
  6. package/{chunk-2XDF3JBH.js → chunk-43HNQWPQ.js} +6 -6
  7. package/chunk-4JAZZRKR.js +76 -0
  8. package/{chunk-F6ZN6TTL.js → chunk-5KOLUYXH.js} +61 -11
  9. package/{chunk-TY2UJ3SA.js → chunk-6BQKR2FM.js} +1 -1
  10. package/{chunk-PBBULTAG.js → chunk-6D54UN4T.js} +1 -1
  11. package/{chunk-FOSDT7YU.js → chunk-6P5CFJR7.js} +4 -4
  12. package/{chunk-J4NHRZX6.js → chunk-A2TSRXZD.js} +1 -1
  13. package/{chunk-IXAHSTBN.js → chunk-BGA3WB7H.js} +86 -10
  14. package/{chunk-GDYDW277.js → chunk-CB65DPZ2.js} +195 -195
  15. package/{chunk-VI7V6OCC.js → chunk-DL3H4EMY.js} +46 -19
  16. package/{chunk-O2B5SLP7.js → chunk-EL4GVZK5.js} +2 -2
  17. package/{chunk-HD6TAM7A.js → chunk-FIUUAQGC.js} +5 -5
  18. package/{chunk-64VFL4WI.js → chunk-GZ5MYMBT.js} +1 -1
  19. package/{chunk-X2WYIUFQ.js → chunk-H77JYU7F.js} +1 -1
  20. package/{chunk-BP3PQ67D.js → chunk-IBGFQR23.js} +16 -0
  21. package/{chunk-CRGWLUGC.js → chunk-IHXJVKAE.js} +1 -1
  22. package/{chunk-2XFFMF6G.js → chunk-IUL6MPP6.js} +4 -4
  23. package/{chunk-BCANUHR3.js → chunk-KMOOTBHM.js} +5 -1
  24. package/{chunk-WGSYVB4F.js → chunk-NWHKSRO3.js} +268 -21
  25. package/{chunk-JELA46YR.js → chunk-OAP2ROTL.js} +1 -1
  26. package/{chunk-AFUXQ3P4.js → chunk-OWMR2EDW.js} +1 -1
  27. package/{chunk-RAE3LNUK.js → chunk-PJJCFMLW.js} +3 -3
  28. package/chunk-QNDM4DVO.js +25 -0
  29. package/{chunk-XU5WNX4S.js → chunk-SE2FSMBR.js} +1 -0
  30. package/{chunk-JIQBZ2UT.js → chunk-SV4WK3KX.js} +2 -2
  31. package/{chunk-LHIDMYN2.js → chunk-TLY4VGMH.js} +1 -1
  32. package/{chunk-WS7BNE5S.js → chunk-WHLYMMI2.js} +3 -3
  33. package/{chunk-LFCZGP2L.js → chunk-WKA5UYNA.js} +3 -10
  34. package/{chunk-2XD7RUKI.js → chunk-XCDLOQZZ.js} +3 -3
  35. package/{chunk-TOKUDCSW.js → chunk-XDSZO74H.js} +6 -6
  36. package/{ci-6GQ3GMJK.js → ci-EDRETPUF.js} +10 -10
  37. package/cli-package.json +3 -1
  38. package/{config-6VRNS5F3.js → config-MVNXGEOQ.js} +8 -8
  39. package/{config-5VN6JXGK.js → config-OKBXU7TU.js} +10 -10
  40. package/{create-K7ROUCVJ.js → create-R7BXYJSU.js} +18 -18
  41. package/{deprecate-WRSZJ2WG.js → deprecate-YSUKBKQM.js} +11 -11
  42. package/{dist-tag-NSTCFNON.js → dist-tag-MIGYSR4F.js} +8 -8
  43. package/{docs-E2PATRJS.js → docs-4WVIN75H.js} +17 -17
  44. package/{exec-SV4RXF2E.js → exec-IXHDQLAM.js} +26 -18
  45. package/{exec-cache-K4LBRSRD.js → exec-cache-EA7GHIK7.js} +16 -16
  46. package/{exec-local-RT27P325.js → exec-local-GM4LH56M.js} +15 -15
  47. package/{help-XXKA42B7.js → help-TCXGBICU.js} +4 -4
  48. package/{init-IYCFQJPW.js → init-MWZDWQHM.js} +10 -10
  49. package/{install-RRCUQ34D.js → install-HPI5HU3C.js} +16 -16
  50. package/{list-WFYB66G7.js → list-2CX6REPJ.js} +21 -19
  51. package/{login-K6HTWO4J.js → login-RAY23CVG.js} +12 -12
  52. package/{logout-F6EI7WST.js → logout-ICB5OMGY.js} +8 -8
  53. package/outdated-FYHPXRMT.js +533 -0
  54. package/{pack-FX24JZR4.js → pack-E5MNPQXK.js} +11 -11
  55. package/package.json +1 -1
  56. package/{ping-6QRL622S.js → ping-REQ2KSAR.js} +8 -8
  57. package/{pkg-FPWX4VUE.js → pkg-YB4GSRII.js} +11 -11
  58. package/{profile-WAI5BGPU.js → profile-GKBW6GRI.js} +8 -8
  59. package/{publish-GI7T7TE2.js → publish-4ZQJYYLF.js} +17 -17
  60. package/{query-GC2DGBWT.js → query-SKXBF3MJ.js} +21 -19
  61. package/{registry-PY2L5ZWC.js → registry-MQJJCWJY.js} +5 -5
  62. package/registry-client-src-revalidate.js +58 -9
  63. package/{repo-CFXNFSY7.js → repo-ACPTZI2C.js} +17 -17
  64. package/{reporter-5QKWEQNH.js → reporter-4KK2JNGO.js} +10 -10
  65. package/{run-VFHTHV5N.js → run-YW3ITX2A.js} +15 -15
  66. package/{run-exec-OJEIP3WL.js → run-exec-7VQX3OFG.js} +15 -15
  67. package/security-archive-src-update-expired.js +1 -1
  68. package/{setup-CCM2QAVA.js → setup-PLEKCMXN.js} +15 -15
  69. package/{src-3MEJQYBG.js → src-GP7VLT7P.js} +2 -2
  70. package/{src-LLE3Q5NY.js → src-PXDFMQ6W.js} +6 -4
  71. package/{src-54SW7RQE.js → src-XQ7KVUVN.js} +14 -14
  72. package/{token-P5N54F4D.js → token-GB7RPE5J.js} +8 -8
  73. package/{uninstall-QJA3X4GY.js → uninstall-RLCECX37.js} +12 -12
  74. package/{unpublish-IAB6LNVC.js → unpublish-3ZXEAVHF.js} +8 -8
  75. package/{update-VZEF6QRY.js → update-VDZP6EZN.js} +25 -16
  76. package/{version-A6FPEDV5.js → version-MRELJPOK.js} +10 -10
  77. package/{view-SA6QU2NW.js → view-LCXMTGCJ.js} +76 -52
  78. package/vlr.js +1 -1
  79. package/vlrx.js +1 -1
  80. package/vlt.js +1 -1
  81. package/vlx.js +1 -1
  82. package/vlxl.js +1 -1
  83. package/{whoami-YDNKCWU7.js → whoami-PNRDBS45.js} +8 -8
  84. package/chunk-MXRSLXAC.js +0 -75
@@ -19,15 +19,15 @@ import {
19
19
  pickManifest,
20
20
  resolve,
21
21
  revs
22
- } from "./chunk-GDYDW277.js";
22
+ } from "./chunk-CB65DPZ2.js";
23
23
  import {
24
24
  Spec
25
- } from "./chunk-64VFL4WI.js";
25
+ } from "./chunk-GZ5MYMBT.js";
26
26
  import {
27
27
  registryErrorMessage,
28
28
  storeRoot,
29
29
  tokenRefusalAdvice
30
- } from "./chunk-PBBULTAG.js";
30
+ } from "./chunk-6D54UN4T.js";
31
31
  import {
32
32
  logRequest
33
33
  } from "./chunk-U7TEQCBN.js";
@@ -39,7 +39,7 @@ import {
39
39
  brotliTarballUrl,
40
40
  integrityHex,
41
41
  tarballFormat
42
- } from "./chunk-BP3PQ67D.js";
42
+ } from "./chunk-IBGFQR23.js";
43
43
  import {
44
44
  error
45
45
  } from "./chunk-WZWDS3W4.js";
@@ -299,9 +299,38 @@ var PackageInfoClient = class {
299
299
  #resolveWaiters = /* @__PURE__ */ new Map();
300
300
  #registryClientPromise;
301
301
  #tarPoolPromise;
302
+ // fire-and-forget work, settled by drain()
303
+ #background = /* @__PURE__ */ new Set();
304
+ #inBackground(p) {
305
+ const done = () => {
306
+ this.#background.delete(tracked);
307
+ };
308
+ const tracked = p.then(done, done);
309
+ this.#background.add(tracked);
310
+ }
311
+ /**
312
+ * Wind the client down: abort open resolve streams, settle background
313
+ * work (manifest cache writes, capabilities, hedges), drain the registry
314
+ * client (in-flight requests, cache writes). Await before removing the
315
+ * cache dir or exiting.
316
+ */
317
+ async drain() {
318
+ for (const [sent, owner] of this.#resolveOwners) {
319
+ this.#resolveOwners.delete(sent);
320
+ this.#resolveSent.delete(sent);
321
+ owner.controller.abort();
322
+ }
323
+ while (this.#background.size) {
324
+ await Promise.all(this.#background);
325
+ }
326
+ if (this.#registryClientPromise) {
327
+ await (await this.#registryClientPromise).drain();
328
+ }
329
+ if (this.#background.size) await this.drain();
330
+ }
302
331
  async getRegistryClient() {
303
332
  if (this.#registryClient) return this.#registryClient;
304
- this.#registryClientPromise ??= import("./src-LLE3Q5NY.js").then(({ RegistryClient }) => {
333
+ this.#registryClientPromise ??= import("./src-PXDFMQ6W.js").then(({ RegistryClient }) => {
305
334
  this.#registryClient = new RegistryClient(this.options);
306
335
  return this.#registryClient;
307
336
  });
@@ -332,8 +361,7 @@ var PackageInfoClient = class {
332
361
  if (!registry || !isStableSelector(f)) return false;
333
362
  const client = this.#registryClient;
334
363
  if (!client) {
335
- void this.capabilities(registry).catch(() => {
336
- });
364
+ this.#inBackground(this.capabilities(registry));
337
365
  return true;
338
366
  }
339
367
  const caps = peekCapabilities(client, registry);
@@ -341,7 +369,7 @@ var PackageInfoClient = class {
341
369
  }
342
370
  async getTarPool() {
343
371
  if (this.#tarPool) return this.#tarPool;
344
- this.#tarPoolPromise ??= import("./src-3MEJQYBG.js").then(
372
+ this.#tarPoolPromise ??= import("./src-GP7VLT7P.js").then(
345
373
  ({ Pool }) => {
346
374
  this.#tarPool = new Pool();
347
375
  return this.#tarPool;
@@ -379,10 +407,6 @@ var PackageInfoClient = class {
379
407
  this.#storeRoot = options.storeRoot ?? storeRoot(this.#cachePath);
380
408
  const linker = options["store-linker"];
381
409
  this.#storeLinker = linker && storeLinkers.has(linker) ? linker : "unpack";
382
- void mkdir(pathResolve(this.#cachePath, "package-info"), {
383
- recursive: true
384
- }).catch(() => {
385
- });
386
410
  }
387
411
  async extract(spec, target, options = {}) {
388
412
  if (typeof spec === "string")
@@ -560,7 +584,7 @@ var PackageInfoClient = class {
560
584
  }
561
585
  case "remote": {
562
586
  const rc = await this.getRegistryClient();
563
- const { CacheEntry: Entry, cacheKey } = await import("./src-LLE3Q5NY.js");
587
+ const { CacheEntry: Entry, cacheKey } = await import("./src-PXDFMQ6W.js");
564
588
  const key = cacheKey("GET", new URL(r.resolved));
565
589
  const unzipped = (entry) => {
566
590
  try {
@@ -934,6 +958,7 @@ var PackageInfoClient = class {
934
958
  inflight
935
959
  );
936
960
  inflight.requests.add(promise);
961
+ this.#inBackground(promise);
937
962
  const clear = () => {
938
963
  inflight.requests.delete(promise);
939
964
  if (this.#resolveOwners.get(sent) === owner)
@@ -1034,6 +1059,7 @@ var PackageInfoClient = class {
1034
1059
  if (early !== graceOver) return early ?? await fetch();
1035
1060
  debug("resolve hedge %s", key);
1036
1061
  const hedge = fetch();
1062
+ this.#inBackground(hedge);
1037
1063
  const outcome = await Promise.race([
1038
1064
  arrival,
1039
1065
  settled,
@@ -1080,8 +1106,7 @@ var PackageInfoClient = class {
1080
1106
  const json = JSON.parse(cached);
1081
1107
  if (st.mtimeMs < this.#manifestCacheMinAge || json.__VLT_MANIFEST_CACHE_TIMESTAMP !== void 0) {
1082
1108
  this.#manifestWritePaths.delete(cachePath);
1083
- void unlink(cachePath).catch(() => {
1084
- });
1109
+ this.#inBackground(unlink(cachePath));
1085
1110
  throw new Error("manifest cache expired");
1086
1111
  }
1087
1112
  if (json.__VLT_PACKUMENT) {
@@ -1104,10 +1129,12 @@ var PackageInfoClient = class {
1104
1129
  const vlt = this.#vltPackuments.has(
1105
1130
  `${f.registry}${f.name}`
1106
1131
  );
1107
- void this.#writeManifestCache(
1108
- cachePath,
1109
- JSON.stringify(
1110
- vlt ? { ...mani, __VLT_PACKUMENT: true } : mani
1132
+ this.#inBackground(
1133
+ this.#writeManifestCache(
1134
+ cachePath,
1135
+ JSON.stringify(
1136
+ vlt ? { ...mani, __VLT_PACKUMENT: true } : mani
1137
+ )
1111
1138
  )
1112
1139
  );
1113
1140
  }
@@ -15,10 +15,10 @@ import {
15
15
  } from "./chunk-SRWDPPLX.js";
16
16
  import {
17
17
  minimatch
18
- } from "./chunk-GDYDW277.js";
18
+ } from "./chunk-CB65DPZ2.js";
19
19
  import {
20
20
  Spec
21
- } from "./chunk-64VFL4WI.js";
21
+ } from "./chunk-GZ5MYMBT.js";
22
22
  import {
23
23
  parse,
24
24
  stringify
@@ -14,12 +14,12 @@ import {
14
14
  } from "./chunk-RIYFGX27.js";
15
15
  import {
16
16
  createHostContextsMap
17
- } from "./chunk-WS7BNE5S.js";
17
+ } from "./chunk-WHLYMMI2.js";
18
18
  import {
19
19
  stderr,
20
20
  stdout,
21
21
  styleTextStdout
22
- } from "./chunk-TOKUDCSW.js";
22
+ } from "./chunk-XDSZO74H.js";
23
23
  import {
24
24
  require_emoji_regex
25
25
  } from "./chunk-VTEFO2FT.js";
@@ -27,13 +27,13 @@ import {
27
27
  Query,
28
28
  actual,
29
29
  isRunResult
30
- } from "./chunk-WGSYVB4F.js";
30
+ } from "./chunk-NWHKSRO3.js";
31
31
  import {
32
32
  Monorepo
33
- } from "./chunk-GDYDW277.js";
33
+ } from "./chunk-CB65DPZ2.js";
34
34
  import {
35
35
  isErrorWithCause
36
- } from "./chunk-BP3PQ67D.js";
36
+ } from "./chunk-IBGFQR23.js";
37
37
  import {
38
38
  error
39
39
  } from "./chunk-WZWDS3W4.js";
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  Spec,
14
14
  kCustomInspect
15
- } from "./chunk-BP3PQ67D.js";
15
+ } from "./chunk-IBGFQR23.js";
16
16
 
17
17
  // ../../src/spec/src/index.ts
18
18
  import { homedir } from "node:os";
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  isManifest,
18
18
  normalizeBinPaths
19
- } from "./chunk-BP3PQ67D.js";
19
+ } from "./chunk-IBGFQR23.js";
20
20
  import {
21
21
  error
22
22
  } from "./chunk-WZWDS3W4.js";
@@ -2293,6 +2293,15 @@ var satisfies = (version, range, includePrerelease = false) => {
2293
2293
  return version.satisfies(range);
2294
2294
  };
2295
2295
  var inc = (version, part, prereleaseIdentifier) => (typeof version === "string" ? Version.parse(version) : version).inc(part, prereleaseIdentifier);
2296
+ var rsort = (list) => list.slice().sort(rsortMethod);
2297
+ var rsortMethod = (a, b) => {
2298
+ const pa = parse(a);
2299
+ const pb = parse(b);
2300
+ if (!pa && !pb) return String(a).localeCompare(String(b), "en");
2301
+ if (!pa) return 1;
2302
+ if (!pb) return -1;
2303
+ return pa.rcompare(pb);
2304
+ };
2296
2305
  var compare = (versionA, versionB) => {
2297
2306
  const a = parse(versionA);
2298
2307
  if (!a) {
@@ -2313,6 +2322,11 @@ var eq = (versionA, versionB) => compare(versionA, versionB) === 0;
2313
2322
  var major = (version) => parse(version)?.major;
2314
2323
  var minor = (version) => parse(version)?.minor;
2315
2324
  var patch = (version) => parse(version)?.patch;
2325
+ var stable = (versions) => versions.filter((v) => {
2326
+ const p = parse(v);
2327
+ if (!p) return false;
2328
+ return !p.prerelease?.length;
2329
+ });
2316
2330
  var intersectsCache = /* @__PURE__ */ new WeakMap();
2317
2331
  var intersects = (r1, r2, includePrerelease) => {
2318
2332
  const range1 = typeof r1 === "string" ? parseRange(r1, includePrerelease) : r1;
@@ -2513,6 +2527,7 @@ export {
2513
2527
  parseRange,
2514
2528
  satisfies,
2515
2529
  inc,
2530
+ rsort,
2516
2531
  compare,
2517
2532
  gt,
2518
2533
  gte,
@@ -2523,6 +2538,7 @@ export {
2523
2538
  major,
2524
2539
  minor,
2525
2540
  patch,
2541
+ stable,
2526
2542
  intersects,
2527
2543
  subset,
2528
2544
  assertPathSafeName,
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  isError,
14
14
  isObject
15
- } from "./chunk-BP3PQ67D.js";
15
+ } from "./chunk-IBGFQR23.js";
16
16
 
17
17
  // ../../src/output/src/error.ts
18
18
  var parseError = (err) => {
@@ -15,14 +15,14 @@ import {
15
15
  pairsToRecords,
16
16
  registrySelectionFields,
17
17
  registrySelectors
18
- } from "./chunk-2XDF3JBH.js";
18
+ } from "./chunk-43HNQWPQ.js";
19
19
  import {
20
20
  normalizeRegistryURL
21
- } from "./chunk-J4NHRZX6.js";
21
+ } from "./chunk-A2TSRXZD.js";
22
22
  import {
23
23
  getCommand,
24
24
  isRecordField
25
- } from "./chunk-XU5WNX4S.js";
25
+ } from "./chunk-SE2FSMBR.js";
26
26
  import {
27
27
  find
28
28
  } from "./chunk-HTOTG4TS.js";
@@ -33,7 +33,7 @@ import {
33
33
  defaultRegistries,
34
34
  defaultRegistryName,
35
35
  isObject
36
- } from "./chunk-BP3PQ67D.js";
36
+ } from "./chunk-IBGFQR23.js";
37
37
  import {
38
38
  error
39
39
  } from "./chunk-WZWDS3W4.js";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-WGDTG44V.js";
15
15
  import {
16
16
  commandAliases
17
- } from "./chunk-XU5WNX4S.js";
17
+ } from "./chunk-SE2FSMBR.js";
18
18
 
19
19
  // ../../node_modules/.vlt/~npm~package-json-from-dist@1.0.1/node_modules/package-json-from-dist/dist/esm/index.js
20
20
  import { readFileSync } from "node:fs";
@@ -173,6 +173,10 @@ var commandHelp = {
173
173
  args: "",
174
174
  desc: "Log out from a registry"
175
175
  },
176
+ outdated: {
177
+ args: "[package-names...]",
178
+ desc: "List dependencies with newer versions available"
179
+ },
176
180
  pack: {
177
181
  args: "",
178
182
  desc: "Create a tarball from a package"