tinymist/contrib/html/editors/vscode/scripts/check-version.mjs
Myriad-Dreamin 548f64aec9
feat: initialize tinymist-vscode-html extension (#1378)
* feat: migrate eslint

* feat: workspace prettierrc

* feat: workspace eslint

* chore: format files

* build: update yarn.lock

* feat: init html extension

* feat: html extension first working flow

* feat: css class support

* feat: update package metadata

* feat: check string context

* feat: clean code

* feat: delete unused yarn.lock
2025-02-23 18:56:47 +08:00

15 lines
443 B
JavaScript

import { readFileSync } from "fs";
function check() {
const cargoToml = readFileSync("../../../../Cargo.toml", "utf8");
const cargoVersion = cargoToml.match(/version = "(.*?)"/)[1];
const pkgVersion = JSON.parse(readFileSync("package.json", "utf8")).version;
if (cargoVersion !== pkgVersion) {
throw new Error(
`Version mismatch: ${cargoVersion} (in Cargo.toml) !== ${pkgVersion} (in package.json)`,
);
}
}
check();