aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/localizations.yml21
-rw-r--r--package-lock.json66
-rw-r--r--package.json2
-rw-r--r--scripts/langs.js12
-rwxr-xr-xscripts/publish.sh2
5 files changed, 66 insertions, 37 deletions
diff --git a/.github/workflows/localizations.yml b/.github/workflows/localizations.yml
new file mode 100644
index 0000000..072d0bc
--- /dev/null
+++ b/.github/workflows/localizations.yml
@@ -0,0 +1,21 @@
+name: Localizations
+on:
+ push:
+ pull_request:
+ types: [opened, reopened]
+
+jobs:
+ check-localizations:
+ name: "Check localizations"
+ runs-on: "ubuntu-latest"
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ - name: Setup Node environment
+ uses: actions/setup-node@v3
+ with:
+ node-version: 20
+ - name: Install dependencies
+ run: npm install
+ - name: Check localizations
+ run: npm run langs:check
diff --git a/package-lock.json b/package-lock.json
index 44c4628..19a4bee 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.12.1",
"license": "GPL-3.0-or-later",
"dependencies": {
- "electron-updater": "^4.6.1",
+ "electron-updater": "^6.3.0",
"enquirer": "^2.4.1",
"flattenizer": "^1.1.3",
"follow-redirects": "^1.15.6",
@@ -480,11 +480,6 @@
"@types/node": "*"
}
},
- "node_modules/@types/semver": {
- "version": "7.3.9",
- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz",
- "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ=="
- },
"node_modules/@types/verror": {
"version": "1.10.9",
"resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.9.tgz",
@@ -1015,11 +1010,11 @@
}
},
"node_modules/builder-util-runtime": {
- "version": "8.9.1",
- "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.9.1.tgz",
- "integrity": "sha512-c8a8J3wK6BIVLW7ls+7TRK9igspTbzWmUqxFbgK0m40Ggm6efUbxtWVCGIjc+dtchyr5qAMAUL6iEGRdS/6vwg==",
+ "version": "9.2.5",
+ "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.2.5.tgz",
+ "integrity": "sha512-HjIDfhvqx/8B3TDN4GbABQcgpewTU4LMRTQPkVpKYV3lsuxEJoIfvg09GyWTNmfVNSUAYf+fbTN//JX4TH20pg==",
"dependencies": {
- "debug": "^4.3.2",
+ "debug": "^4.3.4",
"sax": "^1.2.4"
},
"engines": {
@@ -1659,18 +1654,18 @@
}
},
"node_modules/electron-updater": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-4.6.1.tgz",
- "integrity": "sha512-YsU1mHqXLrXXmBMsxhxy24PrbaB8rnpZDPmFa2gOkTYk/Ch13+R0fjsRSpPYvqtskVVY0ux8fu+HnUkVkqc7og==",
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-6.3.0.tgz",
+ "integrity": "sha512-3Xlezhk+dKaSQrOnkQNqCGiuGSSUPO9BV9TQZ4Iig6AyTJ4FzJONE5gFFc382sY53Sh9dwJfzKsA3DxRHt2btw==",
"dependencies": {
- "@types/semver": "^7.3.6",
- "builder-util-runtime": "8.9.1",
- "fs-extra": "^10.0.0",
+ "builder-util-runtime": "9.2.5",
+ "fs-extra": "^10.1.0",
"js-yaml": "^4.1.0",
"lazy-val": "^1.0.5",
"lodash.escaperegexp": "^4.1.2",
"lodash.isequal": "^4.5.0",
- "semver": "^7.3.5"
+ "semver": "^7.3.8",
+ "tiny-typed-emitter": "^2.1.0"
}
},
"node_modules/electron-updater/node_modules/semver": {
@@ -3490,6 +3485,11 @@
"fs-extra": "^10.0.0"
}
},
+ "node_modules/tiny-typed-emitter": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz",
+ "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA=="
+ },
"node_modules/tmp": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
@@ -4114,11 +4114,6 @@
"@types/node": "*"
}
},
- "@types/semver": {
- "version": "7.3.9",
- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz",
- "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ=="
- },
"@types/verror": {
"version": "1.10.9",
"resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.9.tgz",
@@ -4549,11 +4544,11 @@
}
},
"builder-util-runtime": {
- "version": "8.9.1",
- "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.9.1.tgz",
- "integrity": "sha512-c8a8J3wK6BIVLW7ls+7TRK9igspTbzWmUqxFbgK0m40Ggm6efUbxtWVCGIjc+dtchyr5qAMAUL6iEGRdS/6vwg==",
+ "version": "9.2.5",
+ "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.2.5.tgz",
+ "integrity": "sha512-HjIDfhvqx/8B3TDN4GbABQcgpewTU4LMRTQPkVpKYV3lsuxEJoIfvg09GyWTNmfVNSUAYf+fbTN//JX4TH20pg==",
"requires": {
- "debug": "^4.3.2",
+ "debug": "^4.3.4",
"sax": "^1.2.4"
}
},
@@ -5027,18 +5022,18 @@
}
},
"electron-updater": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-4.6.1.tgz",
- "integrity": "sha512-YsU1mHqXLrXXmBMsxhxy24PrbaB8rnpZDPmFa2gOkTYk/Ch13+R0fjsRSpPYvqtskVVY0ux8fu+HnUkVkqc7og==",
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-6.3.0.tgz",
+ "integrity": "sha512-3Xlezhk+dKaSQrOnkQNqCGiuGSSUPO9BV9TQZ4Iig6AyTJ4FzJONE5gFFc382sY53Sh9dwJfzKsA3DxRHt2btw==",
"requires": {
- "@types/semver": "^7.3.6",
- "builder-util-runtime": "8.9.1",
- "fs-extra": "^10.0.0",
+ "builder-util-runtime": "9.2.5",
+ "fs-extra": "^10.1.0",
"js-yaml": "^4.1.0",
"lazy-val": "^1.0.5",
"lodash.escaperegexp": "^4.1.2",
"lodash.isequal": "^4.5.0",
- "semver": "^7.3.5"
+ "semver": "^7.3.8",
+ "tiny-typed-emitter": "^2.1.0"
},
"dependencies": {
"semver": {
@@ -6431,6 +6426,11 @@
"fs-extra": "^10.0.0"
}
},
+ "tiny-typed-emitter": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz",
+ "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA=="
+ },
"tmp": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
diff --git a/package.json b/package.json
index 1370a4b..1cde783 100644
--- a/package.json
+++ b/package.json
@@ -50,7 +50,7 @@
},
"homepage": "https://github.com/0neGal/viper#readme",
"dependencies": {
- "electron-updater": "^4.6.1",
+ "electron-updater": "^6.3.0",
"enquirer": "^2.4.1",
"flattenizer": "^1.1.3",
"follow-redirects": "^1.15.6",
diff --git a/scripts/langs.js b/scripts/langs.js
index 23b9924..b2f5287 100644
--- a/scripts/langs.js
+++ b/scripts/langs.js
@@ -361,10 +361,18 @@ let check = (logging = true) => {
// run `check()` if `--check()` is set
if (args["check"]) {
- let problems = check();
+ let has_problems = false;
+
+ // check localizations, and set `has_problems` depending on whether
+ // any localization files have problems
+ Object.values(check()).forEach((item) => {
+ if (item.length) {
+ has_problems = true;
+ }
+ });
// exit with the correct exit code
- if (problems.length) {
+ if (has_problems) {
process.exit(1);
} else {
process.exit();
diff --git a/scripts/publish.sh b/scripts/publish.sh
index bff91df..0a4e51d 100755
--- a/scripts/publish.sh
+++ b/scripts/publish.sh
@@ -26,7 +26,7 @@ REMOTEVERSION="$(curl --silent "https://api.github.com/repos/0neGal/viper/releas
}
-node scripts/langs.js || {
+node scripts/langs.js --check || {
echo "Please fix localization errors before publishing..."
exit 1
}