Repository navigation
fix(updates): prevent mobile changelog crash on Hermes - #854
Merged
Merged
Conversation
Replace unsupported Array.prototype.toSorted in release note ordering with compatible sorting and add regression coverage. Fixes: #601
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.
Change
Opening mobile “What's new” crashed after release notes loaded on the Hermes runtime bundled with React Native 0.88.1. The release note ordering used
Array.prototype.toSorted, which is unavailable in the pinned Hermes version. The shared domain code now sorts copied arrays withsort, preserving the input index, and includes a regression test that runs withtoSortedremoved. Mobile documentation records the runtime compatibility requirement.Verification
bun install --frozen-lockfilebun run check:tmp ./packages/domain/src/release/notes.test.ts— 8 passed, 47 assertionsbun run --filter @canopy/domain typecheckbun run --filter @canopy/mobile typecheckbunx oxlint packages/domain/src/release/notes.ts packages/domain/src/release/note-range.ts packages/domain/src/release/notes.test.tsapps/mobile/src/features/updates/WhatsNew.tsxgit diff --checkFixes: #601