fix: use negative lookahead to exclude bundler while keeping bun1.1.0 support
- Update regex to /^bun(?![a-zA-Z])\s*(?<version>\S+)$/m - Restore test case for .tool-versions (bun1.1.0)
This commit is contained in:
parent
590150eeee
commit
46fef78413
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -130,6 +130,10 @@ jobs:
|
|||||||
file: .tool-versions
|
file: .tool-versions
|
||||||
run: echo "bun 1.1.0" > .tool-versions
|
run: echo "bun 1.1.0" > .tool-versions
|
||||||
|
|
||||||
|
- name: .tool-versions (bun1.1.0)
|
||||||
|
file: .tool-versions
|
||||||
|
run: echo "bun1.1.0" > .tool-versions
|
||||||
|
|
||||||
- name: .tool-versions (bun 1.1.0)
|
- name: .tool-versions (bun 1.1.0)
|
||||||
file: .tool-versions
|
file: .tool-versions
|
||||||
run: echo "bun 1.1.0" > .tool-versions
|
run: echo "bun 1.1.0" > .tool-versions
|
||||||
|
|||||||
2
dist/setup/index.js
generated
vendored
2
dist/setup/index.js
generated
vendored
File diff suppressed because one or more lines are too long
@ -75,7 +75,7 @@ const FILE_VERSION_READERS = {
|
|||||||
return pkg.packageManager?.split("bun@")?.[1] ?? pkg.engines?.bun;
|
return pkg.packageManager?.split("bun@")?.[1] ?? pkg.engines?.bun;
|
||||||
},
|
},
|
||||||
".tool-versions": (content: string) =>
|
".tool-versions": (content: string) =>
|
||||||
content.match(/^bun\s+(?<version>\S+)$/m)?.groups?.version,
|
content.match(/^bun(?![a-zA-Z])\s*(?<version>\S+)$/m)?.groups?.version,
|
||||||
".bumrc": (content: string) => content, // https://github.com/owenizedd/bum
|
".bumrc": (content: string) => content, // https://github.com/owenizedd/bum
|
||||||
".bun-version": (content: string) => content,
|
".bun-version": (content: string) => content,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user