fix: pin @formatjs/cli to 6.9.0 to fix pseudo-locale compilation - #3842
Merged
Conversation
|
Git2Gus App is installed but the |
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
@formatjs/cli >= 6.15.0 introduced native platform binaries that silently ignore the --pseudo-locale flag, producing plain English output instead of pseudo-localized text. This breaks the locale.test.js tests in generated projects where postinstall recompiles en-XA.json using the latest version.
6.15.0+ introduced native binaries that silently ignore --pseudo-locale.
npm ci fails when package-lock.json doesn't match package.json.
6.14.5 requires Node >= 20.12.0 which breaks Node 18 CI jobs. 6.9.0 is the last version with working pseudo-locale AND Node 16+ support.
Manual lockfile edits caused npm integrity issues on Windows CI. Regenerated cleanly with npm install --package-lock-only.
Minimal edit to the original lockfile — only updating the @formatjs/cli entry from 6.8.0 to 6.9.0 with correct integrity hash and peerDeps. Preserves all other dependency resolutions to avoid vendor bundle bloat.
The generated project fetches @salesforce/retail-react-app from the public npm registry (via verdaccio proxy), which has "@formatjs/cli": "^6.0.4". This resolves to 6.15.0+ which has native binaries that silently break --pseudo-locale. Pin to 6.9.0 in the generator after extracting the template.
…naries" This reverts commit 58554bc.
Local verdaccio was proxying @salesforce/* to public npm, causing generated projects to use the public registry tarball instead of the locally published one. This meant local changes to package.json (like dependency pins) were never reflected in generated projects.
2 tasks
adamraya
approved these changes
May 21, 2026
vcua-mobify
approved these changes
May 21, 2026
vcua-mobify
left a comment
Contributor
There was a problem hiding this comment.
Thanks for fixing that CI test!
adamraya
added a commit
that referenced
this pull request
May 21, 2026
… and changelog entry Reverts: - bf3aed5 Add CHANGELOG entry for translation compile script fix - 0636c23 Make translation compile scripts wait for formatjs to finish The locale.test.js failure on Node 24 CI is caused by `@formatjs/cli@>=6.15.0` shipping native binaries that silently emit "Warning: Pseudo-locale transformations not yet implemented" and produce a single-element array instead of the expected 3-element pseudo-localized output. That root cause is fixed in #3842 (pin `@formatjs/cli` to 6.9.0 + verdaccio config to stop proxying monorepo packages). Reverting both commits since they were addressing the wrong symptom; we'll merge develop in once #3842 lands.
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.
Summary
@formatjs/clito6.9.0intemplate-retail-react-app@salesforce/*packages, so locally published versions are used in generated project testsProblem
The
generated (retail-react-app-test-project)CI job started failing on May 15, 2026 with:The test
fetchTranslations › loading the pseudo localeexpectsmessages['footer.link.privacy_policy'][1].valueto contain pseudo-localized text likeƤřīṽȧȧƈẏ Ƥǿǿŀīƈẏ, but instead the array only had one element with plain English.Root Cause (two issues)
1.
@formatjs/cli>= 6.15.0 broke--pseudo-localeVersions 6.15.0+ introduced native platform binaries that silently ignore the
--pseudo-localeflag, producing plain English output instead of pseudo-localized text.2. Verdaccio proxied
@salesforce/*to public npmThe local verdaccio registry (used for testing generated projects) had
proxy: npmjsfor ALL packages including@salesforce/*. This meant:lerna publish from-packagechecked verdaccio for existing versions@salesforce/retail-react-app@10.0.0already published"@formatjs/cli": "^6.0.4")^6.0.4resolved to 6.16.1 (broken native binary) → pseudo-locale compilation failedFix
@formatjs/clito6.9.0— last version with working pseudo-locale and Node 18+ support@salesforce/pwa-kit-*,@salesforce/retail-react-app,@salesforce/commerce-sdk-reactno longer proxy to npmjs, ensuring locally published versions always take precedence. Non-monorepo@salesforce/*deps (likecc-datacloud-typescript) still proxy correctly through the generic@*/*rule.Test plan
"@formatjs/cli": "^6.0.4"and brokenen-XA.json"@formatjs/cli": "6.9.0"and correct pseudo-locale outputjest app/utils/locale.test.jsin generated project — all 9 tests passgenerated (retail-react-app-test-project)passeschangelog-checkpasses