Skip to content

fix: cast getRandomValues result and fix CI tsc error detection#963

Merged
boorad merged 1 commit intomainfrom
fix/tsc-and-ci-reviewdog
Mar 3, 2026
Merged

fix: cast getRandomValues result and fix CI tsc error detection#963
boorad merged 1 commit intomainfrom
fix/tsc-and-ci-reviewdog

Conversation

@boorad
Copy link
Collaborator

@boorad boorad commented Mar 3, 2026

Summary

Fixes the failed 1.0.16 release — npm published successfully but the git tag/release step failed because the pre-commit hook caught TS errors.

  • TS fix: wrap_unwrap.ts calls Buffer.from(plaintext) where plaintext is getRandomValues() return type (RandomTypedArrays union). @craftzdog/react-native-buffer's Buffer.from() only accepts Buffer | Uint8Array, not the full union. Cast to Uint8Array at the 5 call sites since we always pass new Uint8Array() in.

  • CI fix: bun --filter='*' typescript prefixes output with workspace names (e.g. react-native-quick-crypto-example typescript: src/file.ts(60,17): error TS2769: ...), which breaks reviewdog's -efm pattern. Errors were being silently ignored. Added set -o pipefail to propagate tsc exit codes and sed to strip the workspace prefix so reviewdog can parse errors.

Test plan

  • bun tsc passes locally
  • Pre-commit hook passes (lint-staged + tsc + bob build)
  • CI Validate JS workflow passes
  • After merge: complete 1.0.16 git release (version bump, tag, GitHub release)

The wrap_unwrap tests called Buffer.from() with getRandomValues()
return type (RandomTypedArrays union), which @craftzdog/react-native-buffer
doesn't accept. Cast to Uint8Array at the 5 call sites.

CI wasn't catching this because bun --filter prefixes tsc output with
workspace names, breaking reviewdog's error format pattern. Add
set -o pipefail and sed to strip the prefix so errors propagate.
@boorad boorad self-assigned this Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🤖 End-to-End Test Results - Android

Status: ✅ Passed
Platform: Android
Run: 22645099051

📸 Final Test Screenshot

Maestro Test Results - android

Screenshot automatically captured from End-to-End tests and will expire in 30 days


This comment is automatically updated on each test run.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🤖 End-to-End Test Results - iOS

Status: ✅ Passed
Platform: iOS
Run: 22645099046

📸 Final Test Screenshot

Maestro Test Results - ios

Screenshot automatically captured from End-to-End tests and will expire in 30 days


This comment is automatically updated on each test run.

@boorad boorad merged commit 62a8f87 into main Mar 3, 2026
6 checks passed
@boorad boorad deleted the fix/tsc-and-ci-reviewdog branch March 3, 2026 22:41
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