You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
449 B
18 lines
449 B
import packageJSON from "../package.json" with { type: "json" };
|
|
|
|
let hasError = false;
|
|
|
|
for (const dep in packageJSON.dependencies) {
|
|
const semver = packageJSON.dependencies[dep];
|
|
if (semver.startsWith("^")) {
|
|
console.error(`Dependency ${dep} has a caret (^) in its version. Please change it to (~)`);
|
|
hasError = true;
|
|
}
|
|
}
|
|
|
|
if (hasError) {
|
|
process.exit(1);
|
|
} else {
|
|
console.log("All dependencies are valid.");
|
|
}
|