feat: support reading bun version from mise.toml - #185
Conversation
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>
WalkthroughThis PR adds support for reading Bun versions from ChangesMise version file support
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (2)
dist/cache-save/index.jsis excluded by!**/dist/**dist/setup/index.jsis excluded by!**/dist/**
📒 Files selected for processing (2)
README.mdsrc/utils.ts
| | ------------------ | --------------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------ | | ||
| | `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` | |
There was a problem hiding this comment.
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.
| | `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.
Summary
mise.tomland.mise.tomlto the supported version file readers@iarna/tomldependency for robust TOML parsing (handles both string and array formats under[tools])mise.tomlas abun-version-fileoptionFixes #184
🤖 Generated with Claude Code