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

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,22 @@ 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 safe again on Linux/macOSit previously broke
529
- // the Pi SDK loader (oven-sh/bun#6893, #11732) but the loader
530
- // now uses static imports of a bundled Pi so resolution happens
531
- // at build time. Bytecode caching => faster startup.
532
- //
533
- // On Windows, --bytecode + --compile triggers a Bun internal
534
- // panic ("Internal assertion failure: total_insertions ... !=
535
- // output_files.items.len ..."). Tracked in oven-sh/bun#23490
536
- // and elsewhere; intermittently reintroduced across Bun
537
- // releases. Skip --bytecode on Windows to keep the build green.
538
- const useBytecode = !target.startsWith('bun-windows');
528
+ // --bytecode is disabled across all targetsBun 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.
539
540
  const buildArgs = [
540
541
  'build',
541
542
  '--compile',
542
543
  '--minify',
543
- ...(useBytecode ? ['--bytecode'] : []),
544
544
  `--target=${target}`,
545
545
  '--define',
546
546
  `BUILD_VERSION="${VERSION}"`,
@@ -20,7 +20,13 @@ if (existsSync(distDir)) {
20
20
 
21
21
  // Build with version define
22
22
  try {
23
- await $`bun build src/index.ts --outdir dist --target bun --minify --external bun-pty --external expo-server-sdk --external @ngrok/ngrok --define BUILD_VERSION='"${VERSION}"'`;
23
+ // Mark Pi as external for the npm build. Pi 0.74+ has CJS-shaped
24
+ // transitive deps that break bun's bundler/bytecode pass. When
25
+ // installed via npm, Node's resolver finds Pi in node_modules
26
+ // alongside our dist/, so bundling it just adds risk for zero
27
+ // gain. (The compiled-binary build path can't do this — see
28
+ // build-binaries.ts for the trade-off there.)
29
+ await $`bun build src/index.ts --outdir dist --target bun --minify --external bun-pty --external expo-server-sdk --external @ngrok/ngrok --external @earendil-works/pi-coding-agent --external @earendil-works/pi-ai --define BUILD_VERSION='"${VERSION}"'`;
24
30
  console.log('✓ Built dist/index.js');
25
31
  } catch (error) {
26
32
  console.error('✗ Build failed:', error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naarang/ccc",
3
- "version": "3.3.0-beta.13",
3
+ "version": "3.3.0-beta.15",
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,22 @@ 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 safe again on Linux/macOSit previously broke
529
- // the Pi SDK loader (oven-sh/bun#6893, #11732) but the loader
530
- // now uses static imports of a bundled Pi so resolution happens
531
- // at build time. Bytecode caching => faster startup.
532
- //
533
- // On Windows, --bytecode + --compile triggers a Bun internal
534
- // panic ("Internal assertion failure: total_insertions ... !=
535
- // output_files.items.len ..."). Tracked in oven-sh/bun#23490
536
- // and elsewhere; intermittently reintroduced across Bun
537
- // releases. Skip --bytecode on Windows to keep the build green.
538
- const useBytecode = !target.startsWith('bun-windows');
528
+ // --bytecode is disabled across all targetsBun 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.
539
540
  const buildArgs = [
540
541
  'build',
541
542
  '--compile',
542
543
  '--minify',
543
- ...(useBytecode ? ['--bytecode'] : []),
544
544
  `--target=${target}`,
545
545
  '--define',
546
546
  `BUILD_VERSION="${VERSION}"`,
@@ -20,7 +20,13 @@ if (existsSync(distDir)) {
20
20
 
21
21
  // Build with version define
22
22
  try {
23
- await $`bun build src/index.ts --outdir dist --target bun --minify --external bun-pty --external expo-server-sdk --external @ngrok/ngrok --define BUILD_VERSION='"${VERSION}"'`;
23
+ // Mark Pi as external for the npm build. Pi 0.74+ has CJS-shaped
24
+ // transitive deps that break bun's bundler/bytecode pass. When
25
+ // installed via npm, Node's resolver finds Pi in node_modules
26
+ // alongside our dist/, so bundling it just adds risk for zero
27
+ // gain. (The compiled-binary build path can't do this — see
28
+ // build-binaries.ts for the trade-off there.)
29
+ await $`bun build src/index.ts --outdir dist --target bun --minify --external bun-pty --external expo-server-sdk --external @ngrok/ngrok --external @earendil-works/pi-coding-agent --external @earendil-works/pi-ai --define BUILD_VERSION='"${VERSION}"'`;
24
30
  console.log('✓ Built dist/index.js');
25
31
  } catch (error) {
26
32
  console.error('✗ Build failed:', error);