update version bump formatting and add editorconfig

This commit is contained in:
marc-f 2025-04-13 14:32:52 +02:00
parent b821af6926
commit dd52d045e1
2 changed files with 17 additions and 2 deletions

15
.editorconfig Normal file
View file

@ -0,0 +1,15 @@
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.{ts,js,css}]
charset = utf-8
indent_style = space
indent_size = 4
[*.{json,mjs}]
charset = utf-8
indent_style = space
indent_size = 2

View file

@ -6,9 +6,9 @@ const targetVersion = process.env.npm_package_version;
let manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
const { minAppVersion } = manifest;
manifest.version = targetVersion;
writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t"));
writeFileSync("manifest.json", JSON.stringify(manifest, null, 2));
// update versions.json with target version and minAppVersion from manifest.json
let versions = JSON.parse(readFileSync("versions.json", "utf8"));
versions[targetVersion] = minAppVersion;
writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));
writeFileSync("versions.json", JSON.stringify(versions, null, 2));