diff --git a/version-bump.mjs b/version-bump.mjs index 55d631f..73a49bd 100644 --- a/version-bump.mjs +++ b/version-bump.mjs @@ -1,4 +1,5 @@ import { readFileSync, writeFileSync } from "fs"; +import process from "process"; const targetVersion = process.env.npm_package_version; @@ -10,8 +11,8 @@ writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t")); // update versions.json with target version and minAppVersion from manifest.json // but only if the target version is not already in versions.json -const versions = JSON.parse(readFileSync('versions.json', 'utf8')); +const versions = JSON.parse(readFileSync("versions.json", "utf8")); if (!Object.values(versions).includes(minAppVersion)) { - versions[targetVersion] = minAppVersion; - writeFileSync('versions.json', JSON.stringify(versions, null, '\t')); + versions[targetVersion] = minAppVersion; + writeFileSync("versions.json", JSON.stringify(versions, null, "\t")); }