Skip to content

Commit

Permalink
chore: fix semver compare for version check
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Apr 17, 2022
1 parent ff515b9 commit 30d1c78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function ensureBuildVersion(packageName, version) {
let file = path.join(rootDir, "packages", packageName, "package.json");
let json = await jsonfile.readFile(file);
invariant(
json.version === version,
semver.compare(json.version, version) === 0,
`Package ${packageName} is on version ${json.version}, but should be on ${version}`
);
}
Expand Down

0 comments on commit 30d1c78

Please sign in to comment.