Add mise.toml support - #787
Open
leifarriens wants to merge 2 commits into
Open
leifarriens wants to merge 2 commits into
leifarriens wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds mise.toml as a supported go-version-file source so workflows using mise can pin Go versions without duplicating configuration elsewhere.
Changes:
- Parse Go versions from
mise.toml([tools].go) supporting scalar, object ({ version = "…" }), and array forms (first entry). - Add
smol-tomldependency and update bundleddistoutput accordingly. - Update docs, CI workflow coverage, and unit tests to include
mise.tomlexamples/cases.
File summaries
| File | Description |
|---|---|
| src/installer.ts | Adds mise.toml parsing logic to parseGoVersionFile. |
| README.md | Updates usage docs to mention mise.toml as a valid go-version-file. |
| package.json | Adds smol-toml dependency. |
| package-lock.json | Locks smol-toml dependency and transitive metadata. |
| docs/advanced-usage.md | Documents mise.toml behavior and adds an example snippet. |
| dist/setup/index.js | Updates bundled action output including TOML parser code and regenerated symbol names. |
| action.yml | Updates input description to include mise.toml. |
| .licenses/npm/smol-toml.dep.yml | Adds license attribution entry for the new dependency. |
| .github/workflows/versions.yml | Adds a workflow job to validate go-version-file with mise.toml across OSes. |
| tests/setup-go.test.ts | Adds unit tests for scalar/object/array mise.toml parsing. |
| tests/data/mise.toml | Adds test fixture mise.toml used by workflow verification. |
Review details
- Files reviewed: 9/11 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+676
to
+689
| const first = Array.isArray(go) ? go[0] : go; | ||
|
|
||
| if (typeof first === 'object' && typeof first?.version === 'string') { | ||
| return first.version; | ||
| } | ||
|
|
||
| if (typeof first === 'string') { | ||
| return first; | ||
| } | ||
|
|
||
| return ''; | ||
| } catch { | ||
| // Fall through to the plain-text parser for invalid TOML. | ||
| } |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Add support for reading Go versions from
mise.tomlfiles supplied throughgo-version-file.This supports scalar, object, and array-form tool entries. For arrays, setup-go selects the first version, matching mise's default behavior.
Related issue:
N/A
Check list: