Skip to content

Commit 72d91f7

Browse files
committed
Merge branch 'main' into wh201906/fast-utf16
2 parents 397326f + e720ae2 commit 72d91f7

90 files changed

Lines changed: 5888 additions & 1006 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<rules category="testing">
2+
<rule severity="HIGH" enforcement="STRICT">
3+
<name>Wait for user test confirmation before pushing fixes</name>
4+
<description>
5+
Tests in this project run only in the example React Native app — the
6+
assistant cannot execute them. After fixing a bug or adding a feature
7+
that would normally be validated by running tests, commit locally and
8+
WAIT for the user to manually run the test suite (`bun ios` /
9+
`bun android` and exercise the relevant suite) and confirm it passes
10+
before pushing to the remote.
11+
</description>
12+
<requirements>
13+
<requirement>After committing a fix that requires runtime validation, do NOT immediately `git push`.</requirement>
14+
<requirement>Tell the user the commit is ready and ask them to run the test that exercises the fix.</requirement>
15+
<requirement>Wait for explicit user confirmation ("tests pass", "all green", "ship it", etc.) before pushing.</requirement>
16+
<requirement>If the user reports a failure, iterate locally with new commits — do NOT push interim fixes either.</requirement>
17+
<requirement>Once the user confirms, batch-push all the validated commits in one `git push`.</requirement>
18+
</requirements>
19+
<appliesWhen>
20+
<case>The change touches C++ that only the example app can exercise.</case>
21+
<case>The change modifies behavior that an existing example-app test asserts.</case>
22+
<case>The change adds new example-app tests whose pass/fail is unknown.</case>
23+
<case>A previous push had a confirmed test failure and you are pushing the followup.</case>
24+
</appliesWhen>
25+
<doesNotApplyWhen>
26+
<case>The change is purely documentation, plan files, or `.claude/` config — no runtime impact.</case>
27+
<case>The user explicitly says "push it" or "ship now" before running tests.</case>
28+
<case>The branch has never been pushed and you are creating the first PR push (still ask first if any unverified runtime change is included).</case>
29+
</doesNotApplyWhen>
30+
<rationale>
31+
The /pr and /commit skills are written for projects where the assistant
32+
can run tests itself. This project's testing model puts that step on the
33+
user. Pushing unverified fixes ships potentially broken code to the
34+
remote, pollutes PR history with revert-style "fix the fix" commits,
35+
and burns user trust. The cost of waiting is a single round-trip
36+
message; the cost of not waiting is a force-push or noise on the PR.
37+
</rationale>
38+
<mustAcknowledge>true</mustAcknowledge>
39+
</rule>
40+
</rules>

.github/workflows/deploy-docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ concurrency:
1717
group: 'pages'
1818
cancel-in-progress: true
1919

20+
env:
21+
# Opt actions still on Node 20 into the runner's Node 24 instead.
22+
# https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
23+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
24+
2025
jobs:
2126
build:
2227
runs-on: ubuntu-latest
2328
steps:
2429
- name: Checkout
25-
uses: actions/checkout@v4
30+
uses: actions/checkout@v5
2631

2732
- name: Setup Bun
2833
uses: ./.github/actions/setup-bun

.github/workflows/e2e-android-test.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,31 @@ on:
1010
paths:
1111
- '.github/workflows/e2e-android-test.yml'
1212
- 'example/**'
13-
- 'cpp/**'
14-
- 'nitrogen/**'
15-
- 'src/**'
13+
- 'packages/react-native-quick-crypto/cpp/**'
14+
- 'packages/react-native-quick-crypto/nitrogen/**'
15+
- 'packages/react-native-quick-crypto/src/**'
1616
- 'packages/react-native-quick-crypto/android/**'
1717
push:
1818
branches: [main]
1919
paths:
2020
- 'example/**'
21-
- 'cpp/**'
22-
- 'nitrogen/**'
23-
- 'src/**'
21+
- 'packages/react-native-quick-crypto/cpp/**'
22+
- 'packages/react-native-quick-crypto/nitrogen/**'
23+
- 'packages/react-native-quick-crypto/src/**'
2424
- 'packages/react-native-quick-crypto/android/**'
2525

2626
env:
2727
EMULATOR_API_LEVEL: 34
28+
# Opt actions still on Node 20 (setup-java, upload/download-artifact, setup-android, etc.)
29+
# into the runner's Node 24 instead. Silences deprecation warnings until each action ships a v5.
30+
# https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
31+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
32+
33+
# Minimum scopes — post-maestro-screenshot composite action posts a PR comment with
34+
# the upload-image artifact link.
35+
permissions:
36+
contents: read
37+
pull-requests: write
2838

2939
jobs:
3040
# ============================================================================
@@ -51,7 +61,7 @@ jobs:
5161
- name: Setup Node.js
5262
uses: actions/setup-node@v5
5363
with:
54-
node-version: '20'
64+
node-version: '24'
5565

5666
- name: Install Bun
5767
uses: ./.github/actions/setup-bun
@@ -87,7 +97,7 @@ jobs:
8797
packages/react-native-quick-crypto/android/build
8898
node_modules/.bun/react-native-nitro-modules*/node_modules/react-native-nitro-modules/android/.cxx
8999
node_modules/.bun/react-native-nitro-modules*/node_modules/react-native-nitro-modules/android/build
90-
key: ${{ runner.os }}-gradle-${{ github.run_id }}
100+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/**/*.gradle*', 'example/android/gradle.properties', 'example/android/gradle/wrapper/gradle-wrapper.properties', 'packages/react-native-quick-crypto/android/build.gradle', 'packages/react-native-quick-crypto/android/gradle.properties', 'bun.lock') }}
91101
restore-keys: |
92102
${{ runner.os }}-gradle-
93103
@@ -141,7 +151,7 @@ jobs:
141151
packages/react-native-quick-crypto/android/build
142152
node_modules/.bun/react-native-nitro-modules*/node_modules/react-native-nitro-modules/android/.cxx
143153
node_modules/.bun/react-native-nitro-modules*/node_modules/react-native-nitro-modules/android/build
144-
key: ${{ runner.os }}-gradle-${{ github.run_id }}
154+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/**/*.gradle*', 'example/android/gradle.properties', 'example/android/gradle/wrapper/gradle-wrapper.properties', 'packages/react-native-quick-crypto/android/build.gradle', 'packages/react-native-quick-crypto/android/gradle.properties', 'bun.lock') }}
145155

146156
# ============================================================================
147157
# AVD Job - Create and cache emulator snapshot (runs in parallel with build)
@@ -167,9 +177,7 @@ jobs:
167177
path: |
168178
~/.android/avd/*
169179
~/.android/adb*
170-
key: avd-pixel7pro-${{ env.EMULATOR_API_LEVEL }}-${{ github.run_id }}
171-
restore-keys: |
172-
avd-pixel7pro-${{ env.EMULATOR_API_LEVEL }}-
180+
key: avd-pixel7pro-${{ env.EMULATOR_API_LEVEL }}-x86_64-v1
173181

174182
- name: Create AVD and Generate Snapshot for Caching
175183
if: steps.avd-cache.outputs.cache-hit != 'true'
@@ -190,7 +198,7 @@ jobs:
190198
path: |
191199
~/.android/avd/*
192200
~/.android/adb*
193-
key: avd-pixel7pro-${{ env.EMULATOR_API_LEVEL }}-${{ github.run_id }}
201+
key: avd-pixel7pro-${{ env.EMULATOR_API_LEVEL }}-x86_64-v1
194202

195203
# ============================================================================
196204
# Test Job - Run E2E tests (needs both build and AVD)
@@ -209,7 +217,7 @@ jobs:
209217
- name: Setup Node.js
210218
uses: actions/setup-node@v5
211219
with:
212-
node-version: '20'
220+
node-version: '24'
213221

214222
- name: Install Bun
215223
uses: ./.github/actions/setup-bun
@@ -226,7 +234,7 @@ jobs:
226234
uses: actions/cache/restore@v5
227235
with:
228236
path: node_modules
229-
key: ${{ runner.os }}-node-modules-${{ github.run_id }}
237+
key: ${{ runner.os }}-node-modules-${{ hashFiles('bun.lock') }}
230238
restore-keys: |
231239
${{ runner.os }}-node-modules-
232240
@@ -237,7 +245,7 @@ jobs:
237245
uses: actions/cache/save@v5
238246
with:
239247
path: node_modules
240-
key: ${{ runner.os }}-node-modules-${{ github.run_id }}
248+
key: ${{ runner.os }}-node-modules-${{ hashFiles('bun.lock') }}
241249

242250
- name: Download APK
243251
uses: actions/download-artifact@v4
@@ -263,9 +271,7 @@ jobs:
263271
path: |
264272
~/.android/avd/*
265273
~/.android/adb*
266-
key: avd-pixel7pro-${{ env.EMULATOR_API_LEVEL }}-${{ github.run_id }}
267-
restore-keys: |
268-
avd-pixel7pro-${{ env.EMULATOR_API_LEVEL }}-
274+
key: avd-pixel7pro-${{ env.EMULATOR_API_LEVEL }}-x86_64-v1
269275

270276
- name: Run E2E Tests
271277
uses: reactivecircus/android-emulator-runner@v2

.github/workflows/e2e-ios-test.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,31 @@ on:
1010
paths:
1111
- '.github/workflows/e2e-ios-test.yml'
1212
- 'example/**'
13-
- 'cpp/**'
14-
- 'nitrogen/**'
15-
- 'src/**'
13+
- 'packages/react-native-quick-crypto/cpp/**'
14+
- 'packages/react-native-quick-crypto/nitrogen/**'
15+
- 'packages/react-native-quick-crypto/src/**'
1616
- 'packages/react-native-quick-crypto/ios/**'
1717
push:
1818
branches: [main]
1919
paths:
2020
- 'example/**'
21-
- 'cpp/**'
22-
- 'nitrogen/**'
23-
- 'src/**'
21+
- 'packages/react-native-quick-crypto/cpp/**'
22+
- 'packages/react-native-quick-crypto/nitrogen/**'
23+
- 'packages/react-native-quick-crypto/src/**'
2424
- 'packages/react-native-quick-crypto/ios/**'
2525

26+
env:
27+
# Opt actions still on Node 20 (upload-artifact, McCzarny/upload-image, peter-evans/*, etc.)
28+
# into the runner's Node 24 instead. Silences deprecation warnings until each action ships a v5.
29+
# https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
30+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
31+
32+
# Minimum scopes — post-maestro-screenshot composite action posts a PR comment with
33+
# the upload-image artifact link.
34+
permissions:
35+
contents: read
36+
pull-requests: write
37+
2638
jobs:
2739
e2e-tests-ios:
2840
runs-on: macOS-26
@@ -34,7 +46,7 @@ jobs:
3446

3547
steps:
3648
- name: Checkout
37-
uses: actions/checkout@v4
49+
uses: actions/checkout@v5
3850

3951
- name: Select Xcode 26.2
4052
run: |

.github/workflows/release.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
type: boolean
1313
default: false
1414

15+
env:
16+
# Opt actions still on Node 20 into the runner's Node 24 instead.
17+
# https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
18+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
19+
1520
jobs:
1621
release:
1722
runs-on: macos-latest
@@ -20,7 +25,7 @@ jobs:
2025
id-token: write
2126
steps:
2227
- name: Checkout
23-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2429
with:
2530
fetch-depth: 0
2631
token: ${{ secrets.GITHUB_TOKEN }}
@@ -29,7 +34,7 @@ jobs:
2934
uses: ./.github/actions/setup-bun
3035

3136
- name: Setup Node.js (for npm publish with OIDC)
32-
uses: actions/setup-node@v4
37+
uses: actions/setup-node@v5
3338
with:
3439
node-version: '24'
3540
registry-url: 'https://registry.npmjs.org'
@@ -58,20 +63,24 @@ jobs:
5863
- name: Release package to npm
5964
working-directory: packages/react-native-quick-crypto
6065
run: |
61-
if [ "${{ inputs.dry-run }}" = "true" ]; then
62-
bun release ${{ inputs.version }} --dry-run --ci
66+
if [ "$DRY_RUN" = "true" ]; then
67+
bun release "$VERSION" --dry-run --ci
6368
else
64-
bun release ${{ inputs.version }} --ci
69+
bun release "$VERSION" --ci
6570
fi
6671
env:
6772
NPM_CONFIG_PROVENANCE: true
73+
VERSION: ${{ inputs.version }}
74+
DRY_RUN: ${{ inputs.dry-run }}
6875

6976
- name: Create Git tag and GitHub release
7077
run: |
71-
if [ "${{ inputs.dry-run }}" = "true" ]; then
72-
bun run release-it ${{ inputs.version }} --dry-run --ci
78+
if [ "$DRY_RUN" = "true" ]; then
79+
bun run release-it "$VERSION" --dry-run --ci
7380
else
74-
bun run release-it ${{ inputs.version }} --ci
81+
bun run release-it "$VERSION" --ci
7582
fi
7683
env:
7784
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
VERSION: ${{ inputs.version }}
86+
DRY_RUN: ${{ inputs.dry-run }}

.github/workflows/update-lockfiles.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ on:
1515
permissions:
1616
contents: write
1717

18+
env:
19+
# Opt actions still on Node 20 into the runner's Node 24 instead.
20+
# https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
21+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
22+
1823
jobs:
1924
update-lockfiles:
2025
name: 'Update lockfiles (Podfile.lock)'
2126
if: github.actor == 'dependabot[bot]'
2227
runs-on: macOS-latest
2328
steps:
24-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
2530
with:
2631
fetch-depth: 0
2732
ref: ${{ github.event.pull_request.head.ref }}

.github/workflows/validate-cpp.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,32 @@ on:
1616
- 'packages/react-native-quick-crypto/cpp/**'
1717
- 'packages/react-native-quick-crypto/nitrogen/generated/shared/**'
1818

19+
env:
20+
# Opt actions still on Node 20 (e.g. reviewdog/action-cpplint) into the runner's Node 24.
21+
# Silences deprecation warnings until each action ships a v5.
22+
# https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
23+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
24+
25+
# Minimum scopes — reviewdog posts review comments on PRs.
26+
permissions:
27+
contents: read
28+
checks: write
29+
pull-requests: write
30+
1931
jobs:
2032
validate_cpp:
2133
name: C++ Lint
2234
runs-on: ubuntu-latest
2335
steps:
24-
- uses: actions/checkout@v4
36+
- uses: actions/checkout@v5
2537
- name: Set up clang-format
2638
run: sudo apt-get install -y clang-format
2739
- name: Run clang-format check
2840
run: |
2941
find packages/react-native-quick-crypto/cpp packages/react-native-quick-crypto/android/src/main/cpp \
3042
-regex '.*\.\(cpp\|hpp\|cc\|cxx\|h\)' \
3143
-exec clang-format --style=file --dry-run --Werror {} +
32-
- uses: reviewdog/action-cpplint@master
44+
- uses: reviewdog/action-cpplint@9552c62f4bd516c1e3a6f84eae56bd864cc304c6 # v1.11.0
3345
with:
3446
github_token: ${{ secrets.github_token }}
3547
reporter: github-pr-review

0 commit comments

Comments
 (0)