@vltpkg/vlx 1.0.8 → 1.0.10

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 +11 -3
  2. package/package.json +10 -10
package/dist/install.js CHANGED
@@ -16,9 +16,17 @@ import { vlxInfo } from "./info.js";
16
16
  */
17
17
  export const vlxInstall = async (spec, options, promptFn) => {
18
18
  const pkgSpec = inferName(spec, options);
19
- // We always use the cache as much as possible, to prevent unnecessarily
20
- // waiting to run a command while installing something. The one we used
21
- // last time is almost certainly fine.
19
+ // Use the cache as much as possible, to prevent unnecessarily waiting
20
+ // to run a command while installing something. The one we used last
21
+ // time is almost certainly fine.
22
+ //
23
+ // Exception: the root spec when it's a dist-tag or bare name.
24
+ // package-info forces a revalidation for those (#1656), so `vlx foo`
25
+ // pays a conditional GET even when already installed -- `resolved` is
26
+ // part of the install dir hash, so it can't short-circuit any earlier.
27
+ // A forced revalidation still falls back to the cached entry if the
28
+ // registry can't be reached, and Infinity here keeps that fallback
29
+ // open forever, so offline `vlx` keeps working off the last answer.
22
30
  options = {
23
31
  ...options,
24
32
  ['stale-while-revalidate-factor']: Infinity,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vltpkg/vlx",
3
3
  "description": "vlt exec management",
4
- "version": "1.0.8",
4
+ "version": "1.0.10",
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.0.8",
17
- "@vltpkg/error-cause": "1.0.8",
18
- "@vltpkg/graph": "1.0.8",
19
- "@vltpkg/package-info": "1.0.8",
20
- "@vltpkg/package-json": "1.0.8",
21
- "@vltpkg/rollback-remove": "1.0.8",
22
- "@vltpkg/spec": "1.0.8",
23
- "@vltpkg/types": "1.0.8",
24
- "@vltpkg/xdg": "1.0.8",
16
+ "@vltpkg/cmd-shim": "1.0.10",
17
+ "@vltpkg/error-cause": "1.0.10",
18
+ "@vltpkg/graph": "1.0.10",
19
+ "@vltpkg/package-info": "1.0.10",
20
+ "@vltpkg/package-json": "1.0.10",
21
+ "@vltpkg/rollback-remove": "1.0.10",
22
+ "@vltpkg/spec": "1.0.10",
23
+ "@vltpkg/types": "1.0.10",
24
+ "@vltpkg/xdg": "1.0.10",
25
25
  "path-scurry": "^2.0.1",
26
26
  "walk-up-path": "^4.0.0"
27
27
  },