Migrate from Bun APIs to universal Node.js APIs#1
Merged
Conversation
Replace all Bun-specific APIs with standard Node.js equivalents so the project runs on any Node.js 18+ runtime: - Bun.CryptoHasher -> node:crypto createHash - Bun.spawnSync -> node:child_process execSync - Bun.spawn -> node:child_process execFile - Bun.write / Bun.file -> node:fs writeFileSync / readFileSync - Bun.build -> esbuild - import.meta.dir -> fileURLToPath + dirname - @types/bun -> @types/node - bun script runner -> tsx Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Revert scripts back to Bun APIs (build, extract-templates) — these are dev-only and don't ship. Only src/ (cli.ts, generator.ts) uses Node.js APIs so the bundled output runs on any Node 18+ runtime. - Build target changed from "bun" to "node" - Built shebang changed from #!/usr/bin/env bun to #!/usr/bin/env node - Scripts and test runner remain on Bun Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bebac97 to
dbfd707
Compare
skacimo1985-star
approved these changes
Apr 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bun.write,Bun.file,Bun.CryptoHasher,Bun.spawnSync,Bun.spawn,Bun.build,import.meta.dir) with standard Node.js equivalents (node:fs,node:crypto,node:child_process,node:url)Bun.buildbundler withesbuildfor the build scriptbunscript runner withtsxfor TypeScript execution@types/bunfor@types/node+esbuild+tsxin devDependenciesTest plan
npx tsc --noEmitpasses with zero errorsnpx tsx scripts/build.tsproducesbuild/cli.mjs(277 KB)npx tsx src/cli.ts --listlists templates correctlynpx tsx src/cli.ts MyApp -ygenerates a valid Xcode project🤖 Generated with Claude Code