Skip to content

Autodetect Bun runtime if engines.bun is set. - #16685

Merged
dnwpark merged 4 commits into
mainfrom
dnwpark/bun-runtime
Jun 22, 2026
Merged

dnwpark merged 4 commits into
mainfrom
dnwpark/bun-runtime

Conversation

@dnwpark

@dnwpark dnwpark commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

This will allow bun to be automatically selected as the runtime without needing to set bunVersion in vercel.json.

Reworked getNodeVersion to pick node or bun based on the following priority:

  • engines.node/engines.bun
    • if both are set, use bun if config.bunVersion is set, otherwise node
  • config.bunVersion
  • default to node

Also removed the fallbackVersion parameter since it was never directly passed in.

@changeset-bot

changeset-bot Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f18cbb1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@vercel/build-utils Minor
@vercel/backends Patch
vercel Patch
@vercel/client Patch
@vercel/elysia Patch
@vercel/express Patch
@vercel/fastify Patch
@vercel/fs-detectors Patch
@vercel/gatsby-plugin-vercel-builder Patch
@vercel/h3 Patch
@vercel/hono Patch
@vercel/koa Patch
@vercel/nestjs Patch
@vercel/node Patch
@vercel/static-build Patch
@vercel/cervel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

🧪 Unit Test Strategy

Comparing: 73d85e5 → f18cbb1 (view diff)

Strategy: Code changed outside of a package - running all unit tests

⚠️ All unit tests will run because global code changes could impact all packages.

Affected packages - 47 (100%)
  1. @vercel-internals/get-package-json
  2. @vercel-internals/ipc-proxy
  3. @vercel/aws
  4. @vercel/backends
  5. @vercel/build-utils
  6. @vercel/cervel
  7. @vercel/cli-auth
  8. @vercel/cli-config
  9. @vercel/cli-exec
  10. @vercel/client
  11. @vercel/config
  12. @vercel/connect
  13. @vercel/detect-agent
  14. @vercel/edge
  15. @vercel/elysia
  16. @vercel/error-utils
  17. @vercel/express
  18. @vercel/fastify
  19. @vercel/firewall
  20. @vercel/frameworks
  21. @vercel/fs-detectors
  22. @vercel/functions
  23. @vercel/gatsby-plugin-vercel-analytics
  24. @vercel/gatsby-plugin-vercel-builder
  25. @vercel/go
  26. @vercel/h3
  27. @vercel/hono
  28. @vercel/hydrogen
  29. @vercel/koa
  30. @vercel/nestjs
  31. @vercel/next
  32. @vercel/node
  33. @vercel/oidc
  34. @vercel/oidc-aws-credentials-provider
  35. @vercel/python
  36. @vercel/python-analysis
  37. @vercel/redwood
  38. @vercel/related-projects
  39. @vercel/remix-builder
  40. @vercel/routing-utils
  41. @vercel/ruby
  42. @vercel/rust
  43. @vercel/static-build
  44. @vercel/static-config
  45. @vercel/vc-native
  46. examples
  47. vercel

Results

  • Unit tests: All affected packages will run unit tests
  • E2E tests: Running in parallel in this workflow
  • Type checks: All affected packages will run type checks

This comment is automatically generated based on the affected testing strategy

@github-actions

github-actions Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

📦 CLI Tarball Ready

The Vercel CLI tarball for this PR is now available!

Quick Test

You can test this PR's CLI directly by running:

npx https://vercel-io8vgr6zo.vercel.sh/tarballs/vercel.tgz --help

Use in vercel.json

To use this CLI version in your project builds, add to your vercel.json:

{
  "build": {
    "env": {
      "VERCEL_CLI_VERSION": "vercel@https://vercel-io8vgr6zo.vercel.sh/tarballs/vercel.tgz"
    }
  }
}

Python Runtime Wheel

A vercel-runtime wheel was also built for this PR.
To use in your Python project builds, also set this environment variable:

VERCEL_RUNTIME_PYTHON="vercel-runtime @ https://vercel-io8vgr6zo.vercel.sh/tarballs/vercel_runtime-0.15.0.dev1781741411+f18cbb1-py3-none-any.whl"

Python Workers Wheel

A vercel-workers wheel was also built for this PR.
To use in your Python project builds, also set this environment variable:

VERCEL_WORKERS_PYTHON="vercel-workers @ https://vercel-io8vgr6zo.vercel.sh/tarballs/vercel_workers-0.1.0.dev1781741411+f18cbb1-py3-none-any.whl"

This comment is automatically generated

@dnwpark
dnwpark force-pushed the dnwpark/bun-runtime branch from 71ed357 to f18cbb1 Compare June 18, 2026 00:10
@dnwpark
dnwpark marked this pull request as ready for review June 18, 2026 05:33
@dnwpark
dnwpark requested a review from a team as a code owner June 18, 2026 05:33
@dnwpark
dnwpark merged commit 04f830c into main Jun 22, 2026
347 checks passed
@dnwpark
dnwpark deleted the dnwpark/bun-runtime branch June 22, 2026 22:02
AbhilashG12 pushed a commit to AbhilashG12/vercel that referenced this pull request Jul 9, 2026
This will allow bun to be automatically selected as the runtime without
needing to set `bunVersion` in `vercel.json`.

Reworked `getNodeVersion` to pick `node` or `bun` based on the following
priority:
- `engines.node`/`engines.bun`
- if both are set, use `bun` if `config.bunVersion` is set, otherwise
`node`
- `config.bunVersion`
- default to `node`

This branch was successfully deployed

1 active deployment
Preview — f18cbb18 Deployed Jun 18, 2026 by vercel[bot]
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.

3 participants