@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.
- package/dist/index.js +173 -1973
- package/dist/scripts/build-binaries.ts +12 -12
- package/dist/scripts/build-dist.ts +7 -1
- package/package.json +1 -1
- package/scripts/build-binaries.ts +12 -12
- package/scripts/build-dist.ts +7 -1
|
@@ -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
|
|
529
|
-
//
|
|
530
|
-
//
|
|
531
|
-
//
|
|
532
|
-
//
|
|
533
|
-
//
|
|
534
|
-
//
|
|
535
|
-
//
|
|
536
|
-
//
|
|
537
|
-
//
|
|
538
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
@@ -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
|
|
529
|
-
//
|
|
530
|
-
//
|
|
531
|
-
//
|
|
532
|
-
//
|
|
533
|
-
//
|
|
534
|
-
//
|
|
535
|
-
//
|
|
536
|
-
//
|
|
537
|
-
//
|
|
538
|
-
|
|
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.
|
|
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}"`,
|
package/scripts/build-dist.ts
CHANGED
|
@@ -20,7 +20,13 @@ if (existsSync(distDir)) {
|
|
|
20
20
|
|
|
21
21
|
// Build with version define
|
|
22
22
|
try {
|
|
23
|
-
|
|
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);
|