Skip to content

migrate: switch from Node.js/npm to Bun runtime - #94

Open
charudatta10 wants to merge 4 commits into
Sidenai:mainfrom
charudatta10:main
Open

migrate: switch from Node.js/npm to Bun runtime#94
charudatta10 wants to merge 4 commits into
Sidenai:mainfrom
charudatta10:main

Conversation

@charudatta10

Copy link
Copy Markdown

Migrate project to Bun v1.3.14 as runtime, package manager, and task runner.

BREAKING CHANGES:

  • Removed: package-lock.json, node_modules, cross-env dependency
  • Generated: bun.lock
  • Scripts now use: bun, bunx, bun --bun instead of node, npm, npx
  • Removed: --max-old-space-size V8 flags (unnecessary with Bun/JavaScriptCore)

MODIFIED FILES (12):

package.json

  • Scripts use bun/bunx with --bun flag for JS-native runtime
  • Removed cross-env from devDependencies
  • Added typecheck script
  • Removed --max-old-space-size flags

README.md, CONTRIBUTING.md

  • npm install/run/npx/node -> bun install/run/bunx/bun

.github/workflows/lint-js.yml, fmt.yml, release.yml, audit.yml

  • setup-node -> oven-sh/setup-bun@v2
  • npm ci -> bun install
  • npx -> bunx
  • NODE_OPTIONS env removed
  • package-lock.json trigger -> bun.lock
  • npm-audit job -> bun-audit

.devcontainer/devcontainer.json, Dockerfile

  • postCreateCommand: npm ci -> bun install
  • Dockerfile: Node.js install -> Bun install

scripts/generate-extension-meta.js

  • writeFileSync -> Bun.write() (async, top-level await)
  • readFileSync -> Bun.file().text()
  • Restructured with async main() for proper await

scripts/postbuild.js

  • fs.statSync -> Bun.file().size getter
  • esbuild-style import cleanup

NEW FILES (2):

  • .gitattributes (bun.lock linguist-generated)
  • bun.lock

VALIDATION:

  • bun install: 192 packages, 22.31s
  • bun run lint: clean
  • bun run typecheck: clean
  • bun run build: 34.17s
  • bun test: no tests found (project has Rust tests via cargo test)

Migrate project to Bun v1.3.14 as runtime, package manager, and task runner.

BREAKING CHANGES:
- Removed: package-lock.json, node_modules, cross-env dependency
- Generated: bun.lock
- Scripts now use: bun, bunx, bun --bun instead of node, npm, npx
- Removed: --max-old-space-size V8 flags (unnecessary with Bun/JavaScriptCore)

MODIFIED FILES (12):

package.json
- Scripts use bun/bunx with --bun flag for JS-native runtime
- Removed cross-env from devDependencies
- Added typecheck script
- Removed --max-old-space-size flags

README.md, CONTRIBUTING.md
- npm install/run/npx/node -> bun install/run/bunx/bun

.github/workflows/lint-js.yml, fmt.yml, release.yml, audit.yml
- setup-node -> oven-sh/setup-bun@v2
- npm ci -> bun install
- npx -> bunx
- NODE_OPTIONS env removed
- package-lock.json trigger -> bun.lock
- npm-audit job -> bun-audit

.devcontainer/devcontainer.json, Dockerfile
- postCreateCommand: npm ci -> bun install
- Dockerfile: Node.js install -> Bun install

scripts/generate-extension-meta.js
- writeFileSync -> Bun.write() (async, top-level await)
- readFileSync -> Bun.file().text()
- Restructured with async main() for proper await

scripts/postbuild.js
- fs.statSync -> Bun.file().size getter
- esbuild-style import cleanup

NEW FILES (2):
- .gitattributes (bun.lock linguist-generated)
- bun.lock

VALIDATION:
- bun install: 192 packages, 22.31s
- bun run lint: clean
- bun run typecheck: clean
- bun run build: 34.17s
- bun test: no tests found (project has Rust tests via cargo test)
@charudatta10

Copy link
Copy Markdown
Author

port node to bun #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant