Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"angular-html-parser": "^1.8.0",
"axios": "^1.15.0",
"ejs": "^3.1.9",
"glob": "^8.1.0",
"glob": "^10.5.0",
"lodash": "^4.17.21",
"pug": "^3.0.2"
},
Expand Down
7 changes: 1 addition & 6 deletions packages/cli/src/commands/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ class PushCommand extends Command {

this.log('Parsing all files to detect translatable content...');

const allFiles = await new Promise((resolve, reject) => {
glob(filePattern, (err, files) => {
if (err) return reject(err);
return resolve(files);
});
});
const allFiles = await glob(filePattern);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change needed before this merges. glob v9 removed the default alphabetical sort of results (and deleted the nosort option that controlled it), so await glob(filePattern) now returns paths in raw filesystem order where glob@8 returned them sorted.

That order feeds mergePayload in src/api/merge.js, where developer_comment and character_limit are last-write-wins across files. So when the same source string appears in two files with different _comment / _charlimit values, which value gets pushed now depends on filesystem order — it can differ between a dev machine and CI, and change between runs after a file is rewritten. occurrences and tags reorder too, which shows up as spurious "Updated strings" on every push even when nothing changed. Unfortunately this whole behavior isn't covered by existing tests.

To restore the prior behavior make a small addition:

const allFiles = (await glob(filePattern)).sort();

We we'll add covering tests on a follow-up PR.


let emptyFiles = 0;
const errorFiles = [];
Expand Down
Loading