Use double quotes and import process in version-bump.mjs

Standardized string literals to double quotes and added explicit import of the process module. This improves code consistency and ensures process.env is available.
This commit is contained in:
RAIT-09 2025-12-14 19:35:46 +09:00
parent 2d33a32b39
commit 9004897164

View file

@ -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"));
}