Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fixtures/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
^20.0.0
1 change: 1 addition & 0 deletions src/utils/devenv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Deno.test("devenv.ts", async runner => {
'pnpm.io@7.33.7',
],
[".node-version", "nodejs.org@16.16.0"],
[".nvmrc", "nodejs.org^20"],
["python-version/std/.python-version", "python.org~3.10"],
["python-version/commented/.python-version", "python.org~3.11"],
[".ruby-version", "ruby-lang.org@3.2.1"],
Expand Down
3 changes: 2 additions & 1 deletion src/utils/devenv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ export default async function(dir: Path) {
async function version_file(path: Path, project: string) {
let s = (await path.read()).trim()
if (s.startsWith('v')) s = s.slice(1) // v prefix has no effect but is allowed
s = `${project}@${s}`
if (s.match(/^[0-9]/)) s = `@${s}` // bare numbers are single versions
s = `${project}${s}`
pkgs.push(utils.pkg.parse(s))
}

Expand Down