@jonaskahn/relo 0.1.9 → 0.1.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.
- package/lib/install.mjs +4 -4
- package/lib/release.mjs +9 -9
- package/package.json +1 -1
package/lib/install.mjs
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// never waits on keys again.
|
|
11
11
|
//
|
|
12
12
|
// The binary always comes from a GitHub release: the one --relo-version names,
|
|
13
|
-
// the one this package was published as
|
|
14
|
-
//
|
|
13
|
+
// else the one this package was published as, so the binary and the shim stay
|
|
14
|
+
// on one version. Rerun this file by hand with the flag to install a specific
|
|
15
15
|
// release.
|
|
16
16
|
import { spawnSync } from 'node:child_process';
|
|
17
17
|
import { existsSync, readFileSync } from 'node:fs';
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
warn
|
|
43
43
|
} from './progress.mjs';
|
|
44
44
|
import { target } from './platform.mjs';
|
|
45
|
-
import { assets, checksumsUrl,
|
|
45
|
+
import { assets, checksumsUrl, pinnedTag, selectBundle, tagFromArgs, url } from './release.mjs';
|
|
46
46
|
import { extractBinary } from './archive.mjs';
|
|
47
47
|
|
|
48
48
|
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
@@ -146,7 +146,7 @@ async function fromRelease(tag, asset, startedAt) {
|
|
|
146
146
|
|
|
147
147
|
try {
|
|
148
148
|
const startedAt = Date.now();
|
|
149
|
-
const tag = tagFromArgs(process.argv.slice(2)) ??
|
|
149
|
+
const tag = tagFromArgs(process.argv.slice(2)) ?? pinnedTag(publishedVersion);
|
|
150
150
|
const asset = target();
|
|
151
151
|
const { version } = assets(tag);
|
|
152
152
|
await openScreen(LOGO, 'I N S T A L L E R', [
|
package/lib/release.mjs
CHANGED
|
@@ -21,15 +21,15 @@ export function tagFromArgs(argv = []) {
|
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return
|
|
24
|
+
// pinnedTag pins an install to the version this package was published as. npm
|
|
25
|
+
// does not forward the install spec -- `@v0.1.8`, `@beta`, `@latest` -- to
|
|
26
|
+
// lifecycle scripts, so the installed package version is the only pin the
|
|
27
|
+
// postinstall can see. The publish job checks every declaration against the
|
|
28
|
+
// release tag first, so a published version always has a matching v<version>
|
|
29
|
+
// release to download: following the package keeps the binary and the shim on
|
|
30
|
+
// one version instead of installing the latest binary under an older package.
|
|
31
|
+
export function pinnedTag(published) {
|
|
32
|
+
return version(published);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// assets resolves the download directory for one release. Without a tag it
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jonaskahn/relo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "One local proxy that lets Codex, Claude Code, Cursor and Grok, etc. Talk to any model, any provider with no config changes",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|