Skip to content

docs: add Bun-to-nub migration guide#52

Merged
colinhacks merged 1 commit into
mainfrom
bun-migration-guide
Jun 21, 2026
Merged

docs: add Bun-to-nub migration guide#52
colinhacks merged 1 commit into
mainfrom
bun-migration-guide

Conversation

@colinhacks

Copy link
Copy Markdown
Contributor

Adds a new guide page at site/content/docs/guides/bun-to-nub.mdx covering migration from the Bun runtime to Node + nub.

Per the request, the page is created but not added to the sidebar nav (no meta.json changes) until the maintainer wants it listed.

Content is grounded in real nub behavior verified against the codebase:

  • Runtime / TS execution (nub <file>, the file-runner vs nub run distinction, --node escape hatch).
  • Node version selection (nub runs your Node; tier banding; pin a realistic floor).
  • Package manager + lockfile (pnpm-grammar CLI, multi-PM lockfile compat, peer-deps NOT auto-installed).
  • Scripts: /regex/ selection (the native multi-script form, concurrent by default / --sequential), run a b is NOT multi-script, npm-run-all2 for explicit run-p/run-s lists.
  • Env files: --env-file suppresses auto-discovery, ${VAR} expansion, shell-wins; documents that --env-file-if-exists is not yet a first-class nub flag; and corrects the common misconception that Bun's --env-file cascades (it does not — explicit files and the default cascade are mutually exclusive in Bun, Node, and nub).
  • Bun.$ → tinyexec; Bun.sql → postgres.js / pg (Prisma-aware); Bun.file/Bun.spawn/Bun.YAML/import.meta replacements.
  • Dependabot (npm ecosystem + a nub install lockfile-regen step).
  • minimumReleaseAge under nub identity lives in .npmrc (minimum-release-age, minutes); bunfig seconds are auto-converted on nub install.

Refs #43.

https://claude.ai/code/session_01YRvztkcr4fzfg9rD5edUwa

New page under site/content/docs/guides/ covering the runtime swap, package
manager and lockfile compatibility, script parallelism (regex selection +
npm-run-all2), env-file handling, and the Bun.* API replacements ($ shell →
tinyexec, sql → postgres.js/pg, file/spawn shims). Documents real nub behavior
including the --env-file auto-discovery suppression, the lack of a native
run-p/run-s named-list form, the absent --env-file-if-exists flag, and the
minimumReleaseAge .npmrc (minutes) mapping. Not added to the sidebar nav.

Claude-Session: https://claude.ai/code/session_01YRvztkcr4fzfg9rD5edUwa
Copilot AI review requested due to automatic review settings June 21, 2026 16:59
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nub Ready Ready Preview, Comment Jun 21, 2026 5:01pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@colinhacks colinhacks merged commit 83bf6fe into main Jun 21, 2026
18 checks passed
@colinhacks

Copy link
Copy Markdown
Contributor Author

Shipped in v0.1.10: https://github.com/nubjs/nub/releases/tag/v0.1.10

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.

2 participants