Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/scripts/up-to-date-check.js
6508 views
1
import yariPackageJson from "@mdn/yari/package.json" assert { type: "json" };
2
import thisPackageJson from "../package.json" assert { type: "json" };
3
4
const availableYariVersion = thisPackageJson.dependencies["@mdn/yari"];
5
const installedYariVersion = yariPackageJson.version;
6
7
if (installedYariVersion < availableYariVersion) {
8
console.log(
9
`The installed version of Yari (${installedYariVersion}) is older than ` +
10
`the version referenced in package.json (${availableYariVersion}). ` +
11
`Please make sure your main git branch is up-to-date with ` +
12
`https://github.com/mdn/content/, then run yarn install to ` +
13
`install the latest Yari.`
14
);
15
}
16
17