Skip to content

feat: support reading bun version from mise.toml - #185

Open
leetrout wants to merge 1 commit into
oven-sh:mainfrom
leetrout:ltrout/install-bun-from-mise-toml
Open

feat: support reading bun version from mise.toml#185
leetrout wants to merge 1 commit into
oven-sh:mainfrom
leetrout:ltrout/install-bun-from-mise-toml

Conversation

@leetrout

@leetrout leetrout commented Jun 2, 2026

Copy link
Copy Markdown

Summary

  • Add mise.toml and .mise.toml to the supported version file readers
  • Use the existing @iarna/toml dependency for robust TOML parsing (handles both string and array formats under [tools])
  • Update README to document mise.toml as a bun-version-file option

Fixes #184

🤖 Generated with Claude Code

Add `mise.toml` and `.mise.toml` to the version file readers, using the
existing `@iarna/toml` dependency for robust TOML parsing. Handles both
string and array formats under `[tools]`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR adds support for reading Bun versions from mise.toml configuration files. It introduces TOML parsing, implements a new reader function to extract the tools.bun field from mise configuration, integrates it into the existing version-file lookup system, and updates documentation.

Changes

Mise version file support

Layer / File(s) Summary
TOML parser and mise reader implementation
src/utils.ts
Import TOML parser from @iarna/toml and implement readMiseToml() function to parse mise.toml content and extract the tools.bun field, handling both string and array configurations.
Reader integration and documentation
src/utils.ts, README.md
Wire the new mise reader into FILE_VERSION_READERS for both mise.toml and .mise.toml filenames, and update README to document these new supported version-file names.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately summarizes the main change: adding support for reading bun version from mise.toml files.
Description check ✅ Passed The pull request description clearly relates to the changeset, providing a summary of changes made and linking to the relevant issue #184.
Linked Issues check ✅ Passed The pull request meets the requirement from issue #184 by implementing support for reading bun version from mise.toml and .mise.toml files.
Out of Scope Changes check ✅ Passed All changes are directly related to the scope of issue #184: adding mise.toml support, updating README documentation, and implementing TOML parsing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 84: Update the README entry for `bun-version-file` to document that both
`mise.toml` and `.mise.toml` are supported: modify the table cell listing
example files to include `.mise.toml` (e.g., change "package.json, mise.toml" to
"package.json, mise.toml, .mise.toml"), and add a short note referencing
FILE_VERSION_READERS support if present so users know the hidden filename is
intentional.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c7e628cd-984d-48d6-97e3-49745bad5011

📥 Commits

Reviewing files that changed from the base of the PR and between 0c5077e and 5bb1c1b.

⛔ Files ignored due to path filters (2)
  • dist/cache-save/index.js is excluded by !**/dist/**
  • dist/setup/index.js is excluded by !**/dist/**
📒 Files selected for processing (2)
  • README.md
  • src/utils.ts

Comment thread README.md
| ------------------ | --------------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------ |
| `bun-version` | The version of Bun to download and install. | Version from `package.json`, or `latest` | `canary`, `1.0.0`, `1.0.x` |
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions` |
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions`, `mise.toml` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Document .mise.toml alongside mise.toml.

FILE_VERSION_READERS now supports both mise.toml and .mise.toml, but the input docs only mention the non-hidden filename. That leaves the new supported variant effectively undocumented for users.

Suggested doc tweak
-| `bun-version-file` | The version of Bun to download and install from file.                             | `undefined`                              | `package.json`, `.bun-version`, `.tool-versions`, `mise.toml` |
+| `bun-version-file` | The version of Bun to download and install from file.                             | `undefined`                              | `package.json`, `.bun-version`, `.tool-versions`, `mise.toml`, `.mise.toml` |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions`, `mise.toml` |
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions`, `mise.toml`, `.mise.toml` |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 84, Update the README entry for `bun-version-file` to
document that both `mise.toml` and `.mise.toml` are supported: modify the table
cell listing example files to include `.mise.toml` (e.g., change "package.json,
mise.toml" to "package.json, mise.toml, .mise.toml"), and add a short note
referencing FILE_VERSION_READERS support if present so users know the hidden
filename is intentional.

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.

Feature Request: bun version from mise.toml

1 participant