mirror of
https://github.com/rait-09/obsidian-agent-client.git
synced 2026-07-22 06:43:37 +00:00
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:
parent
2d33a32b39
commit
9004897164
1 changed files with 4 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import { readFileSync, writeFileSync } from "fs";
|
import { readFileSync, writeFileSync } from "fs";
|
||||||
|
import process from "process";
|
||||||
|
|
||||||
const targetVersion = process.env.npm_package_version;
|
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
|
// update versions.json with target version and minAppVersion from manifest.json
|
||||||
// but only if the target version is not already in versions.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)) {
|
if (!Object.values(versions).includes(minAppVersion)) {
|
||||||
versions[targetVersion] = minAppVersion;
|
versions[targetVersion] = minAppVersion;
|
||||||
writeFileSync('versions.json', JSON.stringify(versions, null, '\t'));
|
writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue