-
Notifications
You must be signed in to change notification settings - Fork 75
fix: .tool-versions regex #144
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughUpdated regex pattern in Changes
Pre-merge checks✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🔇 Additional comments (1)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
dist/setup/index.jsis excluded by!**/dist/**
📒 Files selected for processing (1)
src/utils.ts(1 hunks)
xhyrom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@xhyrom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
dist/setup/index.jsis excluded by!**/dist/**
📒 Files selected for processing (1)
src/utils.ts(1 hunks)
b08cdef to
a961131
Compare
| file: .tool-versions | ||
| run: echo "bun 1.1.0" > .tool-versions | ||
|
|
||
| - name: .tool-versions (bun1.1.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this format is not supported on asdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should continue supporting this, even though it’s invalid, until the next major version so we don’t break semver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. I've updated the regex to use negative lookahead (?![a-zA-Z]) which:
- Excludes
bundlerand similar patterns (the original bug) - Maintains backward compatibility for
bun1.1.0format (no space) - Keeps support for the standard
bun 1.1.0format
This approach preserves semver compatibility as @xhyrom suggested.
| file: .tool-versions | ||
| run: echo "bun 1.1.0" > .tool-versions | ||
|
|
||
| - name: .tool-versions (bun1.1.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should continue supporting this, even though it’s invalid, until the next major version so we don’t break semver
… support - Update regex to /^bun(?![a-zA-Z])\s*(?<version>\S+)$/m - Restore test case for .tool-versions (bun1.1.0)
Overview
I had a mistake on #94.
We can't find bun's version correctly when
.tool-versionshave other versions begin "bun".Reproduce steps
In
.tool-versions:Regex check
https://regex101.com/r/2aCusB/4