Skip to content

Commit

Permalink
fix: look for version in pnpm devDependencies (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbergstroem authored Mar 10, 2024
1 parent 2b1f919 commit 2f1f99a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/version.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { existsSync } from "node:fs";
import { readFile } from "node:fs/promises";
import { join } from "node:path";
import { info, warning } from "@actions/core";
import { Octokit } from "@octokit/rest";
import { readFile } from "fs/promises";
import type { Octokit } from "@octokit/rest";
import {
SemVer,
type SemVer,
coerce,
maxSatisfying,
rsort,
Expand Down Expand Up @@ -87,7 +87,10 @@ const extractVersionFromPnpmLockFile = async (
const lockfile = parse(
await readFile(join(root, "pnpm-lock.yaml"), "utf8"),
);
return lockfile.dependencies?.["@biomejs/biome"]?.version;
return (
lockfile.devDependencies?.["@biomejs/biome"]?.version ??
lockfile.dependencies?.["@biomejs/biome"]?.version
);
} catch {
return undefined;
}
Expand Down

0 comments on commit 2f1f99a

Please sign in to comment.