@just-every/code 0.1.4 → 0.1.6

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
@@ -56,7 +56,11 @@ if (!targetTriple) {
56
56
  throw new Error(`Unsupported platform: ${platform} (${arch})`);
57
57
  }
58
58
 
59
- const binaryPath = path.join(__dirname, "..", "bin", `coder-${targetTriple}`);
59
+ // Prefer new 'code-*' binary names; fall back to legacy 'coder-*' if missing.
60
+ let binaryPath = path.join(__dirname, "..", "bin", `code-${targetTriple}`);
61
+ if (!existsSync(binaryPath)) {
62
+ binaryPath = path.join(__dirname, "..", "bin", `coder-${targetTriple}`);
63
+ }
60
64
 
61
65
  // Check if binary exists and try to fix permissions if needed
62
66
  import { existsSync, chmodSync } from "fs";
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@just-every/code",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lightweight coding agent that runs in your terminal - fork of OpenAI Codex",
6
6
  "bin": {
7
- "code": "bin/coder.js"
7
+ "code": "bin/coder.js",
8
+ "coder": "bin/coder.js"
8
9
  },
9
10
  "type": "module",
10
11
  "engines": {
package/postinstall.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ // Non-functional change to trigger release workflow
2
3
 
3
4
  import { existsSync, mkdirSync, createWriteStream, chmodSync, readFileSync, readSync, writeFileSync } from 'fs';
4
5
  import { join, dirname } from 'path';
@@ -56,6 +57,30 @@ async function downloadBinary(url, dest) {
56
57
  }
57
58
 
58
59
  async function main() {
60
+ // Detect potential PATH conflict with an existing `code` command (e.g., VS Code)
61
+ try {
62
+ const whichCmd = process.platform === 'win32' ? 'where code' : 'command -v code || which code || true';
63
+ const resolved = execSync(whichCmd, { stdio: ['ignore', 'pipe', 'ignore'], shell: process.platform !== 'win32' }).toString().split(/\r?\n/).filter(Boolean)[0];
64
+ if (resolved) {
65
+ let contents = '';
66
+ try {
67
+ contents = readFileSync(resolved, 'utf8');
68
+ } catch {
69
+ contents = '';
70
+ }
71
+ const looksLikeOurs = contents.includes('@just-every/code') || contents.includes('bin/coder.js');
72
+ if (!looksLikeOurs) {
73
+ console.warn('[notice] Found an existing `code` on PATH at:');
74
+ console.warn(` ${resolved}`);
75
+ console.warn('[notice] We will still install our CLI, also available as `coder`.');
76
+ console.warn(' If `code` runs another tool, prefer using: coder');
77
+ console.warn(' Or run our CLI explicitly via: npx -y @just-every/code');
78
+ }
79
+ }
80
+ } catch {
81
+ // Ignore detection failures; proceed with install.
82
+ }
83
+
59
84
  const targetTriple = getTargetTriple();
60
85
  const isWindows = platform() === 'win32';
61
86
  const binaryExt = isWindows ? '.exe' : '';
@@ -69,8 +94,8 @@ async function main() {
69
94
  const packageJson = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8'));
70
95
  const version = packageJson.version;
71
96
 
72
- // Binary names to download (Rust artifacts remain named 'coder*')
73
- const binaries = ['coder', 'coder-tui', 'coder-exec'];
97
+ // Binary names to download (new naming is 'code*')
98
+ const binaries = ['code', 'code-tui', 'code-exec'];
74
99
 
75
100
  console.log(`Installing @just-every/code v${version} for ${targetTriple}...`);
76
101
 
@@ -114,17 +139,17 @@ async function main() {
114
139
  }
115
140
 
116
141
  // Create platform-specific symlink/copy for main binary
117
- const mainBinary = `coder-${targetTriple}${binaryExt}`;
142
+ const mainBinary = `code-${targetTriple}${binaryExt}`;
118
143
  const mainBinaryPath = join(binDir, mainBinary);
119
144
 
120
145
  if (existsSync(mainBinaryPath)) {
121
- console.log('Setting up main coder binary...');
146
+ console.log('Setting up main code binary...');
122
147
 
123
148
  // On Windows, we can't use symlinks easily, so update the JS wrapper
124
149
  // On Unix, the JS wrapper will find the correct binary
125
150
  console.log('✓ Installation complete!');
126
151
  } else {
127
- console.warn('⚠ Main coder binary not found. You may need to build from source.');
152
+ console.warn('⚠ Main code binary not found. You may need to build from source.');
128
153
  }
129
154
 
130
155
  // With bin name = 'code', handle collisions with existing 'code' (e.g., VS Code)