@jonaskahn/relo 0.1.9-beta.43.2fcce6ff → 0.1.10-beta.44.193c46da

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 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 when that is a prerelease, or the
14
- // latest release. Rerun this file by hand with the flag to install a specific
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, prereleaseTag, selectBundle, tagFromArgs, url } from './release.mjs';
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)) ?? prereleaseTag(publishedVersion);
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
- // prereleaseTag pins an install to the version this package was published as,
25
- // and only when that version is a prerelease. A beta published under the beta
26
- // dist-tag would otherwise resolve "latest" and install the stable binary,
27
- // which is not the build its caller asked for. A stable package keeps
28
- // following the latest release, so re-publishing an old stable version still
29
- // tracks the channel instead of pinning itself.
30
- export function prereleaseTag(published) {
31
- const pinned = version(published);
32
- return pinned && /^\d+\.\d+\.\d+-/.test(pinned) ? pinned : null;
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.9-beta.43.2fcce6ff",
3
+ "version": "0.1.10-beta.44.193c46da",
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",