@naarang/ccc 3.3.0-beta.15 → 3.3.0-beta.17

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.
@@ -525,22 +525,19 @@ for (const { name, target, outfile, ptyLib, ngrokLib, ngrokPkg } of selectedTarg
525
525
 
526
526
  // Build the binary (bun-pty and ngrok are now bundled via the generated loaders).
527
527
  //
528
- // --bytecode is disabled across all targets Bun 1.3.13 has
529
- // multiple regressions when combined with --compile:
530
- // - Windows panics: "Internal assertion failure:
531
- // total_insertions != output_files.items.len"
532
- // (oven-sh/bun#23490)
533
- // - Linux ARM64 binary loads but throws on first import:
534
- // "TypeError: Expected CommonJS module to have a function
535
- // wrapper" bytecode mangles CJS-shaped deps (some of
536
- // pi-coding-agent's transitive deps are CJS).
537
- // The startup speedup isn't worth shipping a broken binary on
538
- // any platform. Re-enable per-target when Bun's bytecode +
539
- // CJS interop stabilizes.
528
+ // --bytecode is enabled on Linux/macOS where it works cleanly
529
+ // after the pi-bootstrap fix unblocked Pi's package.json read.
530
+ // Windows triggers an unrelated Bun compile-linker panic
531
+ // ("Internal assertion failure: total_insertions != output_files
532
+ // .items.len" — oven-sh/bun#23490) at BUILD time, so skip it
533
+ // there. The Pi (linux-arm64) is the platform we care about
534
+ // most and gets the startup speedup.
535
+ const useBytecode = !target.startsWith('bun-windows');
540
536
  const buildArgs = [
541
537
  'build',
542
538
  '--compile',
543
539
  '--minify',
540
+ ...(useBytecode ? ['--bytecode'] : []),
544
541
  `--target=${target}`,
545
542
  '--define',
546
543
  `BUILD_VERSION="${VERSION}"`,
@@ -23,10 +23,9 @@ function header(label: string): void {
23
23
  }
24
24
 
25
25
  async function main(): Promise<void> {
26
- header('1. Where is Pi installed and what version?');
26
+ header('1. Pi SDK source');
27
27
  const resolved = await loadPiSdk();
28
28
  console.log('install path:', resolved.installPath);
29
- console.log('version :', resolved.version);
30
29
 
31
30
  header('2. What does ~/.pi/agent/auth.json look like?');
32
31
  const authPath = path.join(os.homedir(), '.pi', 'agent', 'auth.json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naarang/ccc",
3
- "version": "3.3.0-beta.15",
3
+ "version": "3.3.0-beta.17",
4
4
  "description": "Code Chat Connect - Control Claude Code from your mobile device",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -525,22 +525,19 @@ for (const { name, target, outfile, ptyLib, ngrokLib, ngrokPkg } of selectedTarg
525
525
 
526
526
  // Build the binary (bun-pty and ngrok are now bundled via the generated loaders).
527
527
  //
528
- // --bytecode is disabled across all targets Bun 1.3.13 has
529
- // multiple regressions when combined with --compile:
530
- // - Windows panics: "Internal assertion failure:
531
- // total_insertions != output_files.items.len"
532
- // (oven-sh/bun#23490)
533
- // - Linux ARM64 binary loads but throws on first import:
534
- // "TypeError: Expected CommonJS module to have a function
535
- // wrapper" bytecode mangles CJS-shaped deps (some of
536
- // pi-coding-agent's transitive deps are CJS).
537
- // The startup speedup isn't worth shipping a broken binary on
538
- // any platform. Re-enable per-target when Bun's bytecode +
539
- // CJS interop stabilizes.
528
+ // --bytecode is enabled on Linux/macOS where it works cleanly
529
+ // after the pi-bootstrap fix unblocked Pi's package.json read.
530
+ // Windows triggers an unrelated Bun compile-linker panic
531
+ // ("Internal assertion failure: total_insertions != output_files
532
+ // .items.len" — oven-sh/bun#23490) at BUILD time, so skip it
533
+ // there. The Pi (linux-arm64) is the platform we care about
534
+ // most and gets the startup speedup.
535
+ const useBytecode = !target.startsWith('bun-windows');
540
536
  const buildArgs = [
541
537
  'build',
542
538
  '--compile',
543
539
  '--minify',
540
+ ...(useBytecode ? ['--bytecode'] : []),
544
541
  `--target=${target}`,
545
542
  '--define',
546
543
  `BUILD_VERSION="${VERSION}"`,
@@ -23,10 +23,9 @@ function header(label: string): void {
23
23
  }
24
24
 
25
25
  async function main(): Promise<void> {
26
- header('1. Where is Pi installed and what version?');
26
+ header('1. Pi SDK source');
27
27
  const resolved = await loadPiSdk();
28
28
  console.log('install path:', resolved.installPath);
29
- console.log('version :', resolved.version);
30
29
 
31
30
  header('2. What does ~/.pi/agent/auth.json look like?');
32
31
  const authPath = path.join(os.homedir(), '.pi', 'agent', 'auth.json');