Skip to content

Remove experimental bun support #2048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nicktrn
Copy link
Collaborator

@nicktrn nicktrn commented May 14, 2025

The only supported runtime is now node (Node 21). The node-test runtime points at the same image and will only be used internally for testing before adding new node versions.

Closes: #1191
Closes: #1671

Summary by CodeRabbit

  • New Features

    • None.
  • Bug Fixes

    • None.
  • Documentation

    • Removed all references to the experimental Bun runtime from documentation, guides, and configuration examples.
    • Updated upgrade guide to note the removal of Bun support.
    • Clarified that only the Node runtime is supported throughout documentation.
  • Chores

    • Fully removed Bun runtime support from the codebase, including configuration, build logic, and related files.
    • Deleted all Bun-related example projects and files.

Copy link

changeset-bot bot commented May 14, 2025

🦋 Changeset detected

Latest commit: 988a398

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

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

Copy link
Contributor

coderabbitai bot commented May 14, 2025

Walkthrough

This change removes all experimental support and documentation for the bun runtime from the project, leaving node as the only supported runtime. It updates configuration validation, documentation, CLI options, build logic, and removes related files, guides, and references to Bun in code, documentation, and example projects.

Changes

File(s) Change Summary
.changeset/mighty-dryers-warn.md Documents the removal of Bun support and marks related packages for patch updates.
.cursor/rules/writing-tasks.mdc, docs/config/extensions/custom.mdx Updates documentation to clarify only Node is supported and reorders/simplifies config examples.
docs/config/config-file.mdx Removes the "Runtime" section, eliminating references to Bun configuration.
docs/docs.json, docs/guides/frameworks/bun.mdx, docs/guides/introduction.mdx Removes Bun guide and navigation entries; deletes Bun framework card from introduction.
docs/upgrade-to-v4.mdx Adds a new section documenting the removal of Bun support in v4.
packages/cli-v3/src/build/plugins.ts, packages/cli-v3/src/runtimes/bun.ts Removes Bun plugin import, usage, and deletes the Bun plugin file.
packages/cli-v3/src/commands/init.ts, packages/cli-v3/src/config.ts Updates CLI descriptions and config validation to error on Bun, removing warnings and support.
packages/cli-v3/src/deploy/buildImage.ts Removes Bun-specific image build logic, Dockerfile generation, and related constants/functions.
packages/cli-v3/src/executions/taskRunProcess.ts Deletes a Bun-related TODO comment.
packages/core/src/v3/build/runtime.ts Removes all Bun runtime handling from runtime resolution functions.
packages/core/src/v3/config.ts Adds a clarifying comment to the runtime property in the config type.
packages/core/src/v3/schemas/build.ts Removes Bun and node-22 from the BuildRuntime enum, adds node-test.
packages/rsc/src/build.ts Simplifies logic by removing Bun-specific runtime checks.
references/bun-catalog/* (all files: .env.example, .gitignore, README.md, package.json, src/trigger/bun.ts, trigger.config.ts, tsconfig.json) Deletes the entire Bun catalog reference project, including config, code, and documentation.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant ConfigValidator

    User->>CLI: trigger init --runtime bun
    CLI->>ConfigValidator: Validate runtime
    ConfigValidator-->>CLI: Throw error ("Bun support removed, use node")
    CLI-->>User: Display error and exit
Loading

Suggested reviewers

  • matt-aitken

Poem

🐇
Farewell to Bun, we hop along,
Only Node now sings our song.
Docs and configs, guides and code—
All cleaned up for a lighter load.
With every change, we leap ahead,
One runtime strong, full speed instead!
🥕

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
packages/rsc/src/build.ts (1)

4-7: 🛠️ Refactor suggestion

Type definition still includes removed runtime

While the implementation code has been updated to remove Bun support, the type definition for reactDomEnvironment still includes "bun" as a valid option.

 export type RSCExtensionOptions = {
   resolveDir?: string;
-  reactDomEnvironment?: "node" | "worker" | "bun";
+  reactDomEnvironment?: "node" | "worker";
 };
🧹 Nitpick comments (1)
.cursor/rules/writing-tasks.mdc (1)

2-4: Ensure consistent spacing in the globs field
The comma-delimited patterns should have a space after each comma for readability and consistency.

--- a/.cursor/rules/writing-tasks.mdc
+++ b/.cursor/rules/writing-tasks.mdc
@@ line 3
- globs: **/trigger/**/*.ts, **/trigger/**/*.tsx,**/trigger/**/*.js,**/trigger/**/*.jsx
+ globs: **/trigger/**/*.ts, **/trigger/**/*.tsx, **/trigger/**/*.js, **/trigger/**/*.jsx
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2deef00 and 988a398.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • .changeset/mighty-dryers-warn.md (1 hunks)
  • .cursor/rules/writing-tasks.mdc (2 hunks)
  • docs/config/config-file.mdx (0 hunks)
  • docs/config/extensions/custom.mdx (1 hunks)
  • docs/docs.json (0 hunks)
  • docs/guides/frameworks/bun.mdx (0 hunks)
  • docs/guides/introduction.mdx (0 hunks)
  • docs/upgrade-to-v4.mdx (1 hunks)
  • packages/cli-v3/src/build/plugins.ts (0 hunks)
  • packages/cli-v3/src/commands/init.ts (1 hunks)
  • packages/cli-v3/src/config.ts (1 hunks)
  • packages/cli-v3/src/deploy/buildImage.ts (1 hunks)
  • packages/cli-v3/src/executions/taskRunProcess.ts (0 hunks)
  • packages/cli-v3/src/runtimes/bun.ts (0 hunks)
  • packages/core/src/v3/build/runtime.ts (3 hunks)
  • packages/core/src/v3/config.ts (1 hunks)
  • packages/core/src/v3/schemas/build.ts (1 hunks)
  • packages/rsc/src/build.ts (1 hunks)
  • references/bun-catalog/.env.example (0 hunks)
  • references/bun-catalog/.gitignore (0 hunks)
  • references/bun-catalog/README.md (0 hunks)
  • references/bun-catalog/package.json (0 hunks)
  • references/bun-catalog/src/trigger/bun.ts (0 hunks)
  • references/bun-catalog/trigger.config.ts (0 hunks)
  • references/bun-catalog/tsconfig.json (0 hunks)
💤 Files with no reviewable changes (14)
  • docs/guides/introduction.mdx
  • references/bun-catalog/.gitignore
  • docs/docs.json
  • docs/config/config-file.mdx
  • references/bun-catalog/.env.example
  • packages/cli-v3/src/runtimes/bun.ts
  • packages/cli-v3/src/executions/taskRunProcess.ts
  • references/bun-catalog/src/trigger/bun.ts
  • references/bun-catalog/tsconfig.json
  • references/bun-catalog/package.json
  • references/bun-catalog/README.md
  • references/bun-catalog/trigger.config.ts
  • packages/cli-v3/src/build/plugins.ts
  • docs/guides/frameworks/bun.mdx
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/cli-v3/src/deploy/buildImage.ts (1)
packages/core/src/v3/schemas/build.ts (2)
  • BuildRuntime (16-16)
  • BuildRuntime (18-18)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: units / 🧪 Unit Tests
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (15)
.cursor/rules/writing-tasks.mdc (1)

1168-1168: Approve removal of Bun runtime from the example
The example now correctly reflects that only the "node" runtime is supported, matching the PR objective to drop experimental Bun support.

docs/config/extensions/custom.mdx (1)

253-253: Documentation accurately updated to reflect runtime support.

The description has been correctly updated to indicate that only the node runtime is supported, which aligns with the PR objective of removing experimental bun support.

docs/upgrade-to-v4.mdx (1)

864-866: Good addition to breaking changes documentation.

Adding this "Runtime changes" section to the upgrade guide appropriately informs users about the removal of experimental bun support, which is a breaking change for anyone using it.

.changeset/mighty-dryers-warn.md (1)

1-7: Appropriate changeset for version updates.

The changeset correctly identifies the affected packages and uses patch versions, which is appropriate for removing an experimental feature. The description accurately summarizes the change.

packages/core/src/v3/config.ts (1)

24-25: JSDoc formatting improvement.

The JSDoc comment has been formatted with better spacing, which improves readability while maintaining the information about the default runtime.

packages/core/src/v3/schemas/build.ts (1)

16-16: Core schema updated to enforce runtime support policy.

The BuildRuntime enum has been correctly updated to remove "bun" and replace "node-22" with "node-test", which aligns with the PR objective and ensures that configuration validation will enforce the new runtime support policy.

packages/cli-v3/src/commands/init.ts (1)

70-72: Accurately updated CLI documentation

The runtime option description now correctly reflects that only Node.js is supported, aligning with the removal of experimental Bun support.

packages/rsc/src/build.ts (1)

92-92: Simplified runtime resolution logic

The condition assignment has been properly simplified to remove Bun-specific handling, aligning with the removal of Bun runtime support.

packages/cli-v3/src/config.ts (1)

332-334: Properly enforced runtime restrictions

The configuration validation now correctly throws an error if "bun" is specified as the runtime. The error message is clear and provides useful guidance for users to switch to the supported "node" runtime.

packages/core/src/v3/build/runtime.ts (3)

10-12: Correctly updated runtime binary resolution

The binary resolution logic has been updated to rename "node-22" to "node-test" while removing Bun support, aligning with the PR objectives.


20-22: Correctly updated execution path resolution

The execution path resolution logic has been updated to rename "node-22" to "node-test" while removing Bun support, maintaining consistency across the codebase.


39-41: Correctly updated execution options logic

The execution options logic has been updated to rename "node-22" to "node-test" while removing Bun support, completing the runtime transition.

packages/cli-v3/src/deploy/buildImage.ts (3)

476-480: Effective code reuse through constants

Good refactoring by extracting the Node 21 image reference into a constant and reusing it for both runtimes. This makes future updates to the Node image version easier to maintain.


481-484: Successfully removed Bun runtime references

The BASE_IMAGE mapping has been updated to only include "node" and "node-test" entries, both pointing to the Node 21 image. This change aligns with the PR objective to remove experimental Bun runtime support.


489-494: Properly consolidated runtime handling

The switch statement now correctly handles both "node" and "node-test" cases with the same implementation, which aligns with the PR objective stating "node-test runtime now points to the same image as node".

@nicktrn nicktrn mentioned this pull request May 14, 2025
3 tasks
@nicktrn nicktrn marked this pull request as draft May 21, 2025 20:35
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.

bug: no run logs and metadata in dev mode with bun runtime [TRI-2795] Add bun support
1 participant