Skip to content

Commit

Permalink
Update bundle, version bump 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nichwall committed Jun 11, 2024
1 parent c964713 commit f827a93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26605,6 +26605,7 @@ function saveJSONFile(filePath, data) {
}

function updateJSONFiles(baseFileName, directory) {
/*
const baseFilePath = path.join(directory, baseFileName);
const baseData = loadJSONFile(baseFilePath);

Expand All @@ -26615,6 +26616,7 @@ function updateJSONFiles(baseFileName, directory) {
.forEach(key => {
sortedBaseData[key] = baseData[key];
});
*/

fs.readdirSync(directory).forEach(filename => {
const filePath = path.join(directory, filename);
Expand All @@ -26624,11 +26626,12 @@ function updateJSONFiles(baseFileName, directory) {
// Check if keys are in alphabetical order
const keys = Object.keys(otherData);
for (let i = 1; i < keys.length; i++) {
if (keys[i].toLowerCase() < keys[i - 1].toLowerCase()) {
if (keys[i] < keys[i - 1]) {
throw new Error('Keys are not alphabetized in ' + filename);
}
}
}
/*
if (filename.endsWith('.json') && filename !== baseFileName) {
let otherData = loadJSONFile(filePath);

Expand Down Expand Up @@ -26657,6 +26660,7 @@ function updateJSONFiles(baseFileName, directory) {

saveJSONFile(filePath, sortedOtherData);
}
*/
});

}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "audiobookshelf-i18n-updater",
"version": "1.0.0",
"version": "1.3.0",
"description": "A GitHub action that validates the localization files are alphabetized and copies any missing keys from the English file",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit f827a93

Please sign in to comment.