Skip to content

fix(updates): prevent mobile changelog crash on Hermes - #854

Merged
nixuuu merged 1 commit into
devfrom
fix/changelog-opening-crash
Nov 16, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/changelog-opening-crash

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 16, 2026

Copy link
Copy Markdown
Member

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 with sort, preserving the input index, and includes a regression test that runs with toSorted removed. Mobile documentation records the runtime compatibility requirement.

Verification

  • bun install --frozen-lockfile
  • bun run check:tmp ./packages/domain/src/release/notes.test.ts — 8 passed, 47 assertions
  • bun run --filter @canopy/domain typecheck
  • bun run --filter @canopy/mobile typecheck
  • bunx oxlint packages/domain/src/release/notes.ts packages/domain/src/release/note-range.ts packages/domain/src/release/notes.test.ts
  • targeted mobile ESLint for apps/mobile/src/features/updates/WhatsNew.tsx
  • formatting and git diff --check
  • Full mobile Expo lint remains blocked by 111 existing errors in unrelated files; the edited mobile file passes targeted ESLint.

Fixes: #601

Replace unsupported Array.prototype.toSorted in release note ordering with compatible sorting and add regression coverage.

Fixes: #601
@nixuuu
nixuuu enabled auto-merge (squash) November 16, 2026 06:37
@nixuuu
nixuuu merged commit 86d99e4 into dev Nov 16, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/changelog-opening-crash branch November 16, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant