probe-research 0.10.2 → 0.10.3
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.
- package/bin/probe-research.js +20 -4
- package/package.json +1 -1
package/bin/probe-research.js
CHANGED
|
@@ -100,15 +100,29 @@ function main() {
|
|
|
100
100
|
if (found && atLeast(found, wanted)) return run("probe", forwarded);
|
|
101
101
|
console.error(
|
|
102
102
|
`probe-research: installed probe ${found || "(unknown version)"} is older than ` +
|
|
103
|
-
`${wanted}; fetching
|
|
103
|
+
`${wanted}; fetching the latest…`,
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
// A FLOOR, not an exact pin. Unpinned, `uv tool run --from probe-research`
|
|
107
107
|
// reuses an already-installed 0.8.2 tool; pinned exactly, it demands a PyPI
|
|
108
108
|
// version that may not exist. `>=` fixes both.
|
|
109
109
|
const spec = `${DIST}>=${wanted}`;
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
// REFRESH. uv caches the ENVIRONMENT it built for a requirement, so a range
|
|
111
|
+
// like `>=0.10.0` keeps serving whatever it resolved the FIRST time — every
|
|
112
|
+
// user frozen on the version they happened to run on day one, with the
|
|
113
|
+
// launcher silently never delivering another update.
|
|
114
|
+
//
|
|
115
|
+
// It has to be the full `--refresh`: `--refresh-package` only refreshes
|
|
116
|
+
// package METADATA and still reuses the built environment (measured — it
|
|
117
|
+
// kept returning 0.10.0 after 0.10.1 was published). The full refresh costs
|
|
118
|
+
// ~100ms, which is nothing for a command that only runs when there is no
|
|
119
|
+
// usable local install.
|
|
120
|
+
if (has("uv")) {
|
|
121
|
+
return run("uv", ["tool", "run", "--refresh", "--from", spec, "probe", ...forwarded]);
|
|
122
|
+
}
|
|
123
|
+
if (has("pipx")) {
|
|
124
|
+
return run("pipx", ["run", "--no-cache", "--spec", spec, "probe", ...forwarded]);
|
|
125
|
+
}
|
|
112
126
|
|
|
113
127
|
if (process.platform === "win32") {
|
|
114
128
|
console.error(
|
|
@@ -129,7 +143,9 @@ function main() {
|
|
|
129
143
|
// The installer drops uv in ~/.local/bin, which is not on THIS process's PATH
|
|
130
144
|
// because it was resolved before the install ran.
|
|
131
145
|
const uv = `${os.homedir()}/.local/bin/uv`;
|
|
132
|
-
return run(uv, [
|
|
146
|
+
return run(uv, [
|
|
147
|
+
"tool", "run", "--refresh", "--from", `${DIST}>=${wanted}`, "probe", ...forwarded,
|
|
148
|
+
]);
|
|
133
149
|
}
|
|
134
150
|
|
|
135
151
|
main();
|