Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ environment. We recommend Visual Studio Code, `dev && code .` works great.

> [!WARNING]
>
> Unfortunately, this usually means you *must* open your editor via your
> Unfortunately, this usually means you _must_ open your editor via your
> terminal.

## GitHub Actions
Expand Down
1 change: 1 addition & 0 deletions fixtures/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
^20
1 change: 1 addition & 0 deletions src/sniff.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,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/sniff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,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 versions are `@`ed
s = `${project}${s}`;
pkgs.push(utils.pkg.parse(s));
}

Expand Down
Loading