@just-every/code 0.5.2 → 0.5.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/coder.js CHANGED
@@ -18,7 +18,7 @@ const { platform, arch } = process;
18
18
  // When users run via `npx @just-every/code`, we must always execute our
19
19
  // packaged native binary by absolute path to avoid PATH collisions.
20
20
 
21
- const isWSL = () => {
21
+ function isWSL() {
22
22
  if (platform !== "linux") return false;
23
23
  try {
24
24
  const txt = readFileSync("/proc/version", "utf8").toLowerCase();
@@ -26,7 +26,7 @@ const isWSL = () => {
26
26
  } catch {
27
27
  return false;
28
28
  }
29
- };
29
+ }
30
30
 
31
31
  let targetTriple = null;
32
32
  switch (platform) {
@@ -394,9 +394,12 @@ try {
394
394
  // receives a fatal signal, both processes exit in a predictable manner.
395
395
  const { spawn } = await import("child_process");
396
396
 
397
+ // Make the resolved native binary path visible to spawned agents/subprocesses.
398
+ process.env.CODE_BINARY_PATH = binaryPath;
399
+
397
400
  const child = spawn(binaryPath, process.argv.slice(2), {
398
401
  stdio: "inherit",
399
- env: { ...process.env, CODER_MANAGED_BY_NPM: "1", CODEX_MANAGED_BY_NPM: "1" },
402
+ env: { ...process.env, CODER_MANAGED_BY_NPM: "1", CODEX_MANAGED_BY_NPM: "1", CODE_BINARY_PATH: binaryPath },
400
403
  });
401
404
 
402
405
  child.on("error", (err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@just-every/code",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lightweight coding agent that runs in your terminal - fork of OpenAI Codex",
6
6
  "bin": {
@@ -35,10 +35,10 @@
35
35
  "prettier": "^3.3.3"
36
36
  },
37
37
  "optionalDependencies": {
38
- "@just-every/code-darwin-arm64": "0.5.2",
39
- "@just-every/code-darwin-x64": "0.5.2",
40
- "@just-every/code-linux-x64-musl": "0.5.2",
41
- "@just-every/code-linux-arm64-musl": "0.5.2",
42
- "@just-every/code-win32-x64": "0.5.2"
38
+ "@just-every/code-darwin-arm64": "0.5.3",
39
+ "@just-every/code-darwin-x64": "0.5.3",
40
+ "@just-every/code-linux-x64-musl": "0.5.3",
41
+ "@just-every/code-linux-arm64-musl": "0.5.3",
42
+ "@just-every/code-win32-x64": "0.5.3"
43
43
  }
44
44
  }
package/postinstall.js CHANGED
@@ -428,7 +428,7 @@ export async function runPostinstall(options = {}) {
428
428
  // - Windows: .zip
429
429
  // - macOS/Linux: prefer .zst if `zstd` CLI is available; otherwise use .tar.gz
430
430
  const isWin = isWindows;
431
- const isWSL = (() => {
431
+ const detectedWSL = (() => {
432
432
  if (platform() !== 'linux') return false;
433
433
  try {
434
434
  const ver = readFileSync('/proc/version', 'utf8').toLowerCase();
@@ -436,7 +436,7 @@ export async function runPostinstall(options = {}) {
436
436
  } catch { return false; }
437
437
  })();
438
438
  const binDirReal = (() => { try { return realpathSync(binDir); } catch { return binDir; } })();
439
- const mirrorToLocal = !(isWin || (isWSL && isPathOnWindowsFs(binDirReal)));
439
+ const mirrorToLocal = !(isWin || (detectedWSL && isPathOnWindowsFs(binDirReal)));
440
440
  let useZst = false;
441
441
  if (!isWin) {
442
442
  try {