Migrate cli push to glob promise API (fixes silent no-op on glob v9+) - #247
Open
deathbird wants to merge 1 commit into
Open
Migrate cli push to glob promise API (fixes silent no-op on glob v9+)#247deathbird wants to merge 1 commit into
deathbird wants to merge 1 commit into
Conversation
The push command wrapped glob's v8 callback API in a Promise. glob v9 removed the callback API, so when a workspace resolves glob >=9 (e.g. a security tool force-upgrading past the deprecated glob@8 line), the callback never fires, the await never settles, and `txjs-cli push` exits 0 having parsed and uploaded nothing -- a silent push failure that keeps CI green while no strings reach Transifex. Switch to `await glob(filePattern)` (works on glob v9-v11) and bump the dependency from the deprecated ^8.1.0 to ^10.5.0. glob v9+ also dropped default alphabetical sorting of results, which the push pipeline relies on: mergePayload is last-write-wins for developer_comment/character_limit and order-preserving for occurrences/tags, so unsorted results make the uploaded payload depend on filesystem order. Sort the results to restore deterministic output. Note: glob@8.1.0 was not itself affected by CVE-2025-64756; that advisory covers glob's CLI (-c/--cmd) in ranges >=10.2.0 <10.5.0 and >=11.0.0 <11.1.0, which this library-API usage never touches. The real motivation is glob v9+ compatibility and dropping the deprecated glob@8. Co-authored-by: Felipe Guaycuru <guaycuru@gmail.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KCnNk8wHfxAovnhYmVEBe2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrates
txjs-cli pushfrom glob's removed v8 callback API to the promise API, bumpsglob^8.1.0→^10.5.0, and sorts glob results.Why
When a workspace resolves glob ≥9 (e.g. a security tool force-upgrading past the deprecated glob@8 line), the old callback never fires, the
awaitnever settles, andpushexits 0 having uploaded nothing — a silent failure that keeps CI green while no strings reach Transifex. Reproduced on glob 11: prints "Parsing all files…" then exits 0.Notes
>=10.2.0 <10.5.0/>=11.0.0 <11.1.0; this uses the library API). Real motivation is glob v9+ compatibility + dropping deprecated glob@8..sort()restores deterministic payload order (mergePayloadis last-write-wins ondeveloper_comment/character_limit).^10.5.0, not a current major: glob 13 requires Node ≥18, conflicting with this package'sengines.node: ">=16.0.0".node_modulesignore,--purgesafety when files fail to parse, and a regression test for glob ordering.🤖 Generated with Claude Code