unoverse 0.1.148 → 0.1.149
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/unoverse.mjs +13 -1
- package/package.json +1 -1
package/bin/unoverse.mjs
CHANGED
|
@@ -145,7 +145,19 @@ switch (cmd) {
|
|
|
145
145
|
|
|
146
146
|
case "studio": {
|
|
147
147
|
// Studio is its own npm app; this is a launcher, not a wrapper.
|
|
148
|
-
|
|
148
|
+
//
|
|
149
|
+
// Launched by EXACT version, resolved fresh, never `@latest`: npx keys its cache
|
|
150
|
+
// by the spec, and a cached `@latest` entry updates the top package IN PLACE while
|
|
151
|
+
// reusing whatever dependencies already satisfy their ranges — observed live as
|
|
152
|
+
// studio 0.1.43 running against a base two releases stale, which is how a
|
|
153
|
+
// developer gets last week's lint under this week's screens. An exact spec is a
|
|
154
|
+
// new cache key, so every studio release installs clean and fully resolved, and
|
|
155
|
+
// relaunching the same version stays instant from cache. Offline (npm view
|
|
156
|
+
// fails), fall back to the cached latest — stale beats broken with no network.
|
|
157
|
+
const view = spawnSync("npm", ["view", "@unoverse-platform/studio", "version"], { encoding: "utf8" });
|
|
158
|
+
const exact = view.status === 0 ? view.stdout.trim() : "";
|
|
159
|
+
const spec = exact ? `@unoverse-platform/studio@${exact}` : "@unoverse-platform/studio@latest";
|
|
160
|
+
const r = spawnSync("npx", ["-y", spec, ...args], {
|
|
149
161
|
stdio: "inherit",
|
|
150
162
|
});
|
|
151
163
|
process.exit(r.status ?? 0);
|
package/package.json
CHANGED