From 882b181b9625b7bfb4dbad5df37af4e63dd76254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 12:44:31 +0200 Subject: [PATCH 01/18] test-renderer 1.0 --- package.json | 4 ++-- yarn.lock | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 0d4d38c39..6fb7ec34d 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jest": ">=29.0.0", "react": ">=19.0.0", "react-native": ">=0.78", - "test-renderer": "^0.16.0" + "test-renderer": "^1.0.0" }, "peerDependenciesMeta": { "jest": { @@ -97,7 +97,7 @@ "react-native": "0.85.0", "react-native-gesture-handler": "^2.31.1", "release-it": "^19.2.4", - "test-renderer": "0.16.0", + "test-renderer": "1.0.0", "typescript": "^6.0.2", "typescript-eslint": "^8.58.1" }, diff --git a/yarn.lock b/yarn.lock index 96dcf66e4..cd80a0fa1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3018,14 +3018,14 @@ __metadata: react-native-gesture-handler: "npm:^2.31.1" redent: "npm:^3.0.0" release-it: "npm:^19.2.4" - test-renderer: "npm:0.16.0" + test-renderer: "npm:1.0.0" typescript: "npm:^6.0.2" typescript-eslint: "npm:^8.58.1" peerDependencies: jest: ">=29.0.0" react: ">=19.0.0" react-native: ">=0.78" - test-renderer: ^0.16.0 + test-renderer: ^1.0.0 peerDependenciesMeta: jest: optional: true @@ -10343,15 +10343,15 @@ __metadata: languageName: node linkType: hard -"test-renderer@npm:0.16.0": - version: 0.16.0 - resolution: "test-renderer@npm:0.16.0" +"test-renderer@npm:1.0.0": + version: 1.0.0 + resolution: "test-renderer@npm:1.0.0" dependencies: "@types/react-reconciler": "npm:~0.31.0" react-reconciler: "npm:~0.31.0" peerDependencies: react: ^19.0.0 - checksum: 10c0/8175d6519f68285357b17a3dd40ea500877a9920483a2d7271583139d4b296175f672d57a98a9f6ad9417ce3cd464d557130214585c7c959ded3dde1cae1f48e + checksum: 10c0/f63cbed064231faa039e4ba7bdb382bf777d7b58dba710ff71cf9e56283dba0b10c36166b4f22f5c8c62a4f21d9173d2a527d6c18c70476eeab8c28bc2c7fd57 languageName: node linkType: hard From 900715efc72d38af7dfddbd5a418f17e475e6b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 13:24:11 +0200 Subject: [PATCH 02/18] test-renderer 1.1 --- package.json | 2 +- yarn.lock | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 6fb7ec34d..0d0a5959b 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "react-native": "0.85.0", "react-native-gesture-handler": "^2.31.1", "release-it": "^19.2.4", - "test-renderer": "1.0.0", + "test-renderer": "1.1.0", "typescript": "^6.0.2", "typescript-eslint": "^8.58.1" }, diff --git a/yarn.lock b/yarn.lock index cd80a0fa1..1651ae5f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3018,7 +3018,7 @@ __metadata: react-native-gesture-handler: "npm:^2.31.1" redent: "npm:^3.0.0" release-it: "npm:^19.2.4" - test-renderer: "npm:1.0.0" + test-renderer: "npm:1.1.0" typescript: "npm:^6.0.2" typescript-eslint: "npm:^8.58.1" peerDependencies: @@ -3200,12 +3200,12 @@ __metadata: languageName: node linkType: hard -"@types/react-reconciler@npm:~0.31.0": - version: 0.31.0 - resolution: "@types/react-reconciler@npm:0.31.0" +"@types/react-reconciler@npm:~0.32.0": + version: 0.32.3 + resolution: "@types/react-reconciler@npm:0.32.3" peerDependencies: "@types/react": "*" - checksum: 10c0/9d8fd6334760d51e94dbf22b9783199c8937a2b76d1f682ef6f7f46d0ced578ccc8a9e285475931c9d410df1cae4b0fc17c0b3bb55dd00cc4e9a70a5707b3b09 + checksum: 10c0/8d6485c6da3aa6d84b5c320c4cf9737e67511cd6c7ebfb7252ec032fd1cfb0515d3a2c06054491603c6ab040202694ff5ad125cd840e1da9e76d7447cef53dff languageName: node linkType: hard @@ -9302,14 +9302,14 @@ __metadata: languageName: node linkType: hard -"react-reconciler@npm:~0.31.0": - version: 0.31.0 - resolution: "react-reconciler@npm:0.31.0" +"react-reconciler@npm:~0.32.0": + version: 0.32.0 + resolution: "react-reconciler@npm:0.32.0" dependencies: - scheduler: "npm:^0.25.0" + scheduler: "npm:^0.26.0" peerDependencies: - react: ^19.0.0 - checksum: 10c0/97920e1866c7206e200c3920c133c2e85f62a3c54fd9bc4b83c10c558d83d98eb378caab4fe37498e0cc1b1b2665d898627f2ae2537b29c8ab295ec8abc0c580 + react: ^19.1.0 + checksum: 10c0/ace0562d2aa99685416ac62741354706dec6df334aa64acc7ad455bd8a6f6af0068b276ad2e5412c3875388022ab13807f0b7d688fda7b2835301c110247146b languageName: node linkType: hard @@ -9681,10 +9681,10 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.25.0": - version: 0.25.0 - resolution: "scheduler@npm:0.25.0" - checksum: 10c0/a4bb1da406b613ce72c1299db43759526058fdcc413999c3c3e0db8956df7633acf395cb20eb2303b6a65d658d66b6585d344460abaee8080b4aa931f10eaafe +"scheduler@npm:^0.26.0": + version: 0.26.0 + resolution: "scheduler@npm:0.26.0" + checksum: 10c0/5b8d5bfddaae3513410eda54f2268e98a376a429931921a81b5c3a2873aab7ca4d775a8caac5498f8cbc7d0daeab947cf923dbd8e215d61671f9f4e392d34356 languageName: node linkType: hard @@ -10343,15 +10343,15 @@ __metadata: languageName: node linkType: hard -"test-renderer@npm:1.0.0": - version: 1.0.0 - resolution: "test-renderer@npm:1.0.0" +"test-renderer@npm:1.1.0": + version: 1.1.0 + resolution: "test-renderer@npm:1.1.0" dependencies: - "@types/react-reconciler": "npm:~0.31.0" - react-reconciler: "npm:~0.31.0" + "@types/react-reconciler": "npm:~0.32.0" + react-reconciler: "npm:~0.32.0" peerDependencies: react: ^19.0.0 - checksum: 10c0/f63cbed064231faa039e4ba7bdb382bf777d7b58dba710ff71cf9e56283dba0b10c36166b4f22f5c8c62a4f21d9173d2a527d6c18c70476eeab8c28bc2c7fd57 + checksum: 10c0/0ccdfa5ec15fa5f7339b7b53b496b9ec97434b9aab4ac298b419c64efd8ec13bc85cf572757e20f90ff946aa6ef8112eb6e1b911dd274c6e4c698bc07033088d languageName: node linkType: hard From 8950bff40b54ab916d3ffd7fb85d60fbcfd4f8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 13:25:46 +0200 Subject: [PATCH 03/18] test-renderer 1.2 --- package.json | 2 +- yarn.lock | 43 ++++++++++++++++++------------------------- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 0d0a5959b..f1f5e2fac 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "react-native": "0.85.0", "react-native-gesture-handler": "^2.31.1", "release-it": "^19.2.4", - "test-renderer": "1.1.0", + "test-renderer": "1.2.0", "typescript": "^6.0.2", "typescript-eslint": "^8.58.1" }, diff --git a/yarn.lock b/yarn.lock index 1651ae5f2..5d30a3a15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3018,7 +3018,7 @@ __metadata: react-native-gesture-handler: "npm:^2.31.1" redent: "npm:^3.0.0" release-it: "npm:^19.2.4" - test-renderer: "npm:1.1.0" + test-renderer: "npm:1.2.0" typescript: "npm:^6.0.2" typescript-eslint: "npm:^8.58.1" peerDependencies: @@ -3200,12 +3200,12 @@ __metadata: languageName: node linkType: hard -"@types/react-reconciler@npm:~0.32.0": - version: 0.32.3 - resolution: "@types/react-reconciler@npm:0.32.3" +"@types/react-reconciler@npm:~0.33.0": + version: 0.33.0 + resolution: "@types/react-reconciler@npm:0.33.0" peerDependencies: "@types/react": "*" - checksum: 10c0/8d6485c6da3aa6d84b5c320c4cf9737e67511cd6c7ebfb7252ec032fd1cfb0515d3a2c06054491603c6ab040202694ff5ad125cd840e1da9e76d7447cef53dff + checksum: 10c0/190c203d93c0df9a42fabd693ce059dbdf6c53e15eb14502d9e5b946c981231c5846b867de15522ff61368e9218a8508a9db5476f3e47b5d664bbb2c84b31ac7 languageName: node linkType: hard @@ -9302,14 +9302,14 @@ __metadata: languageName: node linkType: hard -"react-reconciler@npm:~0.32.0": - version: 0.32.0 - resolution: "react-reconciler@npm:0.32.0" +"react-reconciler@npm:~0.33.0": + version: 0.33.0 + resolution: "react-reconciler@npm:0.33.0" dependencies: - scheduler: "npm:^0.26.0" + scheduler: "npm:^0.27.0" peerDependencies: - react: ^19.1.0 - checksum: 10c0/ace0562d2aa99685416ac62741354706dec6df334aa64acc7ad455bd8a6f6af0068b276ad2e5412c3875388022ab13807f0b7d688fda7b2835301c110247146b + react: ^19.2.0 + checksum: 10c0/3f7b27ea8d0ff4c8bf0e402a285e1af9b7d0e6f4c1a70a28f4384938bc1130bc82a90a31df0b79ef5e380e2e55e2598bd90b4dbf802b1203d735ba0355817d3a languageName: node linkType: hard @@ -9674,20 +9674,13 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:0.27.0": +"scheduler@npm:0.27.0, scheduler@npm:^0.27.0": version: 0.27.0 resolution: "scheduler@npm:0.27.0" checksum: 10c0/4f03048cb05a3c8fddc45813052251eca00688f413a3cee236d984a161da28db28ba71bd11e7a3dd02f7af84ab28d39fb311431d3b3772fed557945beb00c452 languageName: node linkType: hard -"scheduler@npm:^0.26.0": - version: 0.26.0 - resolution: "scheduler@npm:0.26.0" - checksum: 10c0/5b8d5bfddaae3513410eda54f2268e98a376a429931921a81b5c3a2873aab7ca4d775a8caac5498f8cbc7d0daeab947cf923dbd8e215d61671f9f4e392d34356 - languageName: node - linkType: hard - "semver@npm:7.7.3": version: 7.7.3 resolution: "semver@npm:7.7.3" @@ -10343,15 +10336,15 @@ __metadata: languageName: node linkType: hard -"test-renderer@npm:1.1.0": - version: 1.1.0 - resolution: "test-renderer@npm:1.1.0" +"test-renderer@npm:1.2.0": + version: 1.2.0 + resolution: "test-renderer@npm:1.2.0" dependencies: - "@types/react-reconciler": "npm:~0.32.0" - react-reconciler: "npm:~0.32.0" + "@types/react-reconciler": "npm:~0.33.0" + react-reconciler: "npm:~0.33.0" peerDependencies: react: ^19.0.0 - checksum: 10c0/0ccdfa5ec15fa5f7339b7b53b496b9ec97434b9aab4ac298b419c64efd8ec13bc85cf572757e20f90ff946aa6ef8112eb6e1b911dd274c6e4c698bc07033088d + checksum: 10c0/f6ac10a7906d46fd67e3a2ece1964a71f31ca15d70e8e18e2d06170fa355f8e042599f8956ae55b2b5ce15644d5574c580e1fe751954341ac9327a631215d77e languageName: node linkType: hard From eef9ffba5ae1ed5517531f6084617021b3348aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 14:33:42 +0200 Subject: [PATCH 04/18] nightly to check against all TR versions --- .github/actions/setup-deps-rn-latest/action.yml | 10 ++++++++++ .github/actions/setup-deps-rn-next/action.yml | 10 ++++++++++ .github/actions/setup-deps-rn-nightly/action.yml | 10 ++++++++++ .github/actions/setup-deps/action.yml | 8 ++++++++ .github/workflows/nightly.yaml | 9 ++++++++- 5 files changed, 46 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-deps-rn-latest/action.yml b/.github/actions/setup-deps-rn-latest/action.yml index a811040c8..ff91d5038 100644 --- a/.github/actions/setup-deps-rn-latest/action.yml +++ b/.github/actions/setup-deps-rn-latest/action.yml @@ -1,6 +1,11 @@ name: Setup deps (RN @latest) description: Setup Node.js and install dependencies +inputs: + test-renderer-version: + description: Test renderer version to install (e.g., 1.1.0) + required: false + runs: using: composite steps: @@ -32,3 +37,8 @@ runs: @react-native/babel-preset@latest \ @react-native/jest-preset@latest shell: bash + + - name: Switch to test-renderer version + if: inputs.test-renderer-version != '' + run: yarn add -D test-renderer@${{ inputs.test-renderer-version }} + shell: bash diff --git a/.github/actions/setup-deps-rn-next/action.yml b/.github/actions/setup-deps-rn-next/action.yml index 09bf6516a..402f7364f 100644 --- a/.github/actions/setup-deps-rn-next/action.yml +++ b/.github/actions/setup-deps-rn-next/action.yml @@ -1,6 +1,11 @@ name: Setup deps (RN @next) description: Setup Node.js and install dependencies +inputs: + test-renderer-version: + description: Test renderer version to install (e.g., 1.1.0) + required: false + runs: using: composite steps: @@ -32,3 +37,8 @@ runs: @react-native/babel-preset@next \ @react-native/jest-preset@next shell: bash + + - name: Switch to test-renderer version + if: inputs.test-renderer-version != '' + run: yarn add -D test-renderer@${{ inputs.test-renderer-version }} + shell: bash diff --git a/.github/actions/setup-deps-rn-nightly/action.yml b/.github/actions/setup-deps-rn-nightly/action.yml index 097c51226..6008d6a04 100644 --- a/.github/actions/setup-deps-rn-nightly/action.yml +++ b/.github/actions/setup-deps-rn-nightly/action.yml @@ -1,6 +1,11 @@ name: Setup deps (RN nightly) description: Setup Node.js and install dependencies +inputs: + test-renderer-version: + description: Test renderer version to install (e.g., 1.1.0) + required: false + runs: using: composite steps: @@ -33,3 +38,8 @@ runs: @react-native/babel-preset@nightly \ @react-native/jest-preset@nightly shell: bash + + - name: Switch to test-renderer version + if: inputs.test-renderer-version != '' + run: yarn add -D test-renderer@${{ inputs.test-renderer-version }} + shell: bash diff --git a/.github/actions/setup-deps/action.yml b/.github/actions/setup-deps/action.yml index 5c0e5f461..87a888206 100644 --- a/.github/actions/setup-deps/action.yml +++ b/.github/actions/setup-deps/action.yml @@ -8,6 +8,9 @@ inputs: react-native-version: description: React Native version to install (e.g., 0.83.1) required: false + test-renderer-version: + description: Test renderer version to install (e.g., 1.1.0) + required: false runs: using: composite @@ -56,3 +59,8 @@ runs: yarn add -D "${deps[@]}" shell: bash + + - name: Switch to test-renderer version + if: inputs.test-renderer-version != '' + run: yarn add -D test-renderer@${{ inputs.test-renderer-version }} + shell: bash diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index bd9189865..59b1aa30a 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -68,11 +68,12 @@ jobs: test: runs-on: ubuntu-latest - name: Test - ${{ matrix.rn-version }} + name: Test - ${{ matrix.rn-version }} - TR ${{ matrix.test-renderer-version }} strategy: fail-fast: false matrix: rn-version: [latest, next, nightly] + test-renderer-version: ['1.0.0', '1.1.0', '1.2.0'] steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -80,14 +81,20 @@ jobs: - name: Setup Node.js and deps (latest) if: matrix.rn-version == 'latest' uses: ./.github/actions/setup-deps-rn-latest + with: + test-renderer-version: ${{ matrix.test-renderer-version }} - name: Setup Node.js and deps (next) if: matrix.rn-version == 'next' uses: ./.github/actions/setup-deps-rn-next + with: + test-renderer-version: ${{ matrix.test-renderer-version }} - name: Setup Node.js and deps (nightly) if: matrix.rn-version == 'nightly' uses: ./.github/actions/setup-deps-rn-nightly + with: + test-renderer-version: ${{ matrix.test-renderer-version }} - name: Test run: yarn test:ci From 2794e73459a80ecd386118cfe19f548ae15dcb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 14:34:44 +0200 Subject: [PATCH 05/18] expand nightly test --- .github/workflows/nightly.yaml | 57 +++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 59b1aa30a..0010f9050 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -68,30 +68,77 @@ jobs: test: runs-on: ubuntu-latest - name: Test - ${{ matrix.rn-version }} - TR ${{ matrix.test-renderer-version }} + name: Test - RN ${{ matrix.rn-lane }} - TR ${{ matrix.test-renderer-version }} strategy: fail-fast: false matrix: - rn-version: [latest, next, nightly] + rn-lane: ['0.85.0', '0.84.1', '0.83.4', '0.82.1', '0.81.6', '0.80.3', '0.79.7', '0.78.3', latest, next, nightly] test-renderer-version: ['1.0.0', '1.1.0', '1.2.0'] + include: + - rn-lane: '0.85.0' + setup-kind: stable + react-version: '19.2.3' + react-native-version: '0.85.0' + - rn-lane: '0.84.1' + setup-kind: stable + react-version: '19.2.3' + react-native-version: '0.84.1' + - rn-lane: '0.83.4' + setup-kind: stable + react-version: '19.2.0' + react-native-version: '0.83.4' + - rn-lane: '0.82.1' + setup-kind: stable + react-version: '19.1.1' + react-native-version: '0.82.1' + - rn-lane: '0.81.6' + setup-kind: stable + react-version: '19.1.4' + react-native-version: '0.81.6' + - rn-lane: '0.80.3' + setup-kind: stable + react-version: '19.1.0' + react-native-version: '0.80.3' + - rn-lane: '0.79.7' + setup-kind: stable + react-version: '19.0.0' + react-native-version: '0.79.7' + - rn-lane: '0.78.3' + setup-kind: stable + react-version: '19.0.0' + react-native-version: '0.78.3' + - rn-lane: latest + setup-kind: latest + - rn-lane: next + setup-kind: next + - rn-lane: nightly + setup-kind: nightly steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Setup Node.js and deps (stable) + if: matrix.setup-kind == 'stable' + uses: ./.github/actions/setup-deps + with: + react-version: ${{ matrix.react-version }} + react-native-version: ${{ matrix.react-native-version }} + test-renderer-version: ${{ matrix.test-renderer-version }} + - name: Setup Node.js and deps (latest) - if: matrix.rn-version == 'latest' + if: matrix.setup-kind == 'latest' uses: ./.github/actions/setup-deps-rn-latest with: test-renderer-version: ${{ matrix.test-renderer-version }} - name: Setup Node.js and deps (next) - if: matrix.rn-version == 'next' + if: matrix.setup-kind == 'next' uses: ./.github/actions/setup-deps-rn-next with: test-renderer-version: ${{ matrix.test-renderer-version }} - name: Setup Node.js and deps (nightly) - if: matrix.rn-version == 'nightly' + if: matrix.setup-kind == 'nightly' uses: ./.github/actions/setup-deps-rn-nightly with: test-renderer-version: ${{ matrix.test-renderer-version }} From ceab9c9dd019824b159ce808a55eacc58775d7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 14:43:38 +0200 Subject: [PATCH 06/18] add activity test --- src/__tests__/render.test.tsx | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/__tests__/render.test.tsx b/src/__tests__/render.test.tsx index f39d3228b..0f4315f22 100644 --- a/src/__tests__/render.test.tsx +++ b/src/__tests__/render.test.tsx @@ -112,6 +112,56 @@ describe('render options', () => { }); describe('hidden instance props', () => { + test('renders Activity hidden and then visible', async () => { + await render( + + + Ready + + , + ); + + expect(screen.queryByTestId('activity-target')).not.toBeOnTheScreen(); + expect(screen.getByTestId('activity-target', { includeHiddenElements: true }).props.style).toEqual( + { + display: 'none', + }, + ); + expect(screen.toJSON()).toMatchInlineSnapshot(` + + + Ready + + + `); + + await screen.rerender( + + + Ready + + , + ); + + expect(screen.getByTestId('activity-target')).toBeOnTheScreen(); + expect(screen.toJSON()).toMatchInlineSnapshot(` + + + Ready + + + `); + }); + test('does not retain hidden UI when the component suspends on initial render', async () => { const promise = new Promise(() => {}); From 00377f499b9fd2878236cc6c06a1b89c37a8425c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 14:52:04 +0200 Subject: [PATCH 07/18] test gate react 19.2 --- .github/workflows/nightly.yaml | 15 ++++++++++++++- eslint.config.mjs | 8 ++++++++ src/__tests__/render.test.tsx | 13 +++++++------ src/test-utils/react-version-gates.ts | 21 +++++++++++++++++++++ 4 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 src/test-utils/react-version-gates.ts diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 0010f9050..c01893879 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -72,7 +72,20 @@ jobs: strategy: fail-fast: false matrix: - rn-lane: ['0.85.0', '0.84.1', '0.83.4', '0.82.1', '0.81.6', '0.80.3', '0.79.7', '0.78.3', latest, next, nightly] + rn-lane: + [ + '0.85.0', + '0.84.1', + '0.83.4', + '0.82.1', + '0.81.6', + '0.80.3', + '0.79.7', + '0.78.3', + latest, + next, + nightly, + ] test-renderer-version: ['1.0.0', '1.1.0', '1.2.0'] include: - rn-lane: '0.85.0' diff --git a/eslint.config.mjs b/eslint.config.mjs index 8c2cb9ada..e58898fe9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,8 +1,11 @@ import tseslint from 'typescript-eslint'; import callstackConfig from '@callstack/eslint-config/react-native.flat.js'; import { fixupPluginRules } from '@eslint/compat'; +import pluginJest from 'eslint-plugin-jest'; import simpleImportSort from 'eslint-plugin-simple-import-sort'; +const additionalTestBlockFunctions = ['testGateReact19_2', 'testGateReact19_3']; + const patchedCallstackConfig = callstackConfig.map((configItem) => { if (!configItem.plugins?.react) { return configItem; @@ -45,6 +48,9 @@ export default [ }, { files: ['**/*.test.{ts,tsx}', 'src/test-utils/**'], + plugins: { + jest: pluginJest, + }, rules: { 'react/no-multi-comp': 'off', 'react-native/no-color-literals': 'off', @@ -54,6 +60,8 @@ export default [ 'react-native-a11y/has-valid-accessibility-ignores-invert-colors': 'off', 'react-native-a11y/has-valid-accessibility-value': 'off', '@typescript-eslint/no-explicit-any': 'off', + 'jest/expect-expect': ['error', { additionalTestBlockFunctions }], + 'jest/no-standalone-expect': ['error', { additionalTestBlockFunctions }], }, }, ]; diff --git a/src/__tests__/render.test.tsx b/src/__tests__/render.test.tsx index 0f4315f22..335e1fddc 100644 --- a/src/__tests__/render.test.tsx +++ b/src/__tests__/render.test.tsx @@ -3,6 +3,7 @@ import { Text, View } from 'react-native'; import { render, screen } from '..'; import { _console, logger } from '../helpers/logger'; +import { testGateReact19_2 } from '../test-utils/react-version-gates'; function MaybeSuspend({ children, @@ -112,7 +113,7 @@ describe('render options', () => { }); describe('hidden instance props', () => { - test('renders Activity hidden and then visible', async () => { + testGateReact19_2('renders Activity hidden and then visible', async () => { await render( @@ -122,11 +123,11 @@ describe('hidden instance props', () => { ); expect(screen.queryByTestId('activity-target')).not.toBeOnTheScreen(); - expect(screen.getByTestId('activity-target', { includeHiddenElements: true }).props.style).toEqual( - { - display: 'none', - }, - ); + expect( + screen.getByTestId('activity-target', { includeHiddenElements: true }).props.style, + ).toEqual({ + display: 'none', + }); expect(screen.toJSON()).toMatchInlineSnapshot(` 19; + } + + return minor >= targetMinor; +} + +export const testGateReact19_2 = isReactMinorOrNewer(2) ? test : test.skip; +export const testGateReact19_3 = isReactMinorOrNewer(3) ? test : test.skip; From b245ba04d2f6635744c5f33c163ea5cee5b0ec0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 16:06:20 +0200 Subject: [PATCH 08/18] improve test gate --- src/test-utils/react-version-gates.ts | 28 ++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/test-utils/react-version-gates.ts b/src/test-utils/react-version-gates.ts index f2dd87b1b..e0761488d 100644 --- a/src/test-utils/react-version-gates.ts +++ b/src/test-utils/react-version-gates.ts @@ -1,7 +1,14 @@ import React from 'react'; +// eslint-disable-next-line @typescript-eslint/no-require-imports +const testRendererVersion = require('test-renderer/package.json').version; -function isReactMinorOrNewer(targetMinor: number): boolean { - const match = /^(\d+)\.(\d+)/.exec(React.version); +function matchesMinVersion( + versionString: string, + targetMajor: number, + targetMinor: number, + targetPatch: number, +): boolean { + const match = /^(\d+)\.(\d+)\.(\d+)/.exec(versionString); if (!match) { return false; @@ -9,13 +16,20 @@ function isReactMinorOrNewer(targetMinor: number): boolean { const major = Number(match[1]); const minor = Number(match[2]); + const patch = Number(match[3]); - if (major !== 19) { - return major > 19; + if (major !== targetMajor) { + return major > targetMajor; } - return minor >= targetMinor; + if (minor !== targetMinor) { + return minor > targetMinor; + } + + return patch >= targetPatch; } -export const testGateReact19_2 = isReactMinorOrNewer(2) ? test : test.skip; -export const testGateReact19_3 = isReactMinorOrNewer(3) ? test : test.skip; +export const testGateReact19_2 = + matchesMinVersion(React.version, 19, 2, 0) && matchesMinVersion(testRendererVersion, 1, 2, 0) + ? test + : test.skip; From a71a4f68ff13db18256496c2400c71fba6f82d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 16:17:58 +0200 Subject: [PATCH 09/18] job naming --- .github/workflows/ci.yml | 44 +++++++++++++++--------------- .github/workflows/nightly-v13.yaml | 6 ++-- .github/workflows/nightly.yaml | 6 ++-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df5942409..3a402f7de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: typecheck-rn-0-85: runs-on: ubuntu-latest - name: Typecheck RN 0.85.0 + name: Typecheck: RN 0.85.0 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -61,7 +61,7 @@ jobs: typecheck-rn-0-84: runs-on: ubuntu-latest - name: Typecheck RN 0.84.1 + name: Typecheck: RN 0.84.1 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -77,7 +77,7 @@ jobs: typecheck-rn-0-83: runs-on: ubuntu-latest - name: Typecheck RN 0.83.4 + name: Typecheck: RN 0.83.4 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -93,7 +93,7 @@ jobs: typecheck-rn-0-82: runs-on: ubuntu-latest - name: Typecheck RN 0.82.1 + name: Typecheck: RN 0.82.1 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -109,7 +109,7 @@ jobs: typecheck-rn-0-81: runs-on: ubuntu-latest - name: Typecheck RN 0.81.6 + name: Typecheck: RN 0.81.6 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -125,7 +125,7 @@ jobs: typecheck-rn-0-80: runs-on: ubuntu-latest - name: Typecheck RN 0.80.3 + name: Typecheck: RN 0.80.3 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -141,7 +141,7 @@ jobs: typecheck-rn-0-79: runs-on: ubuntu-latest - name: Typecheck RN 0.79.7 + name: Typecheck: RN 0.79.7 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -157,7 +157,7 @@ jobs: typecheck-rn-0-78: runs-on: ubuntu-latest - name: Typecheck RN 0.78.3 + name: Typecheck: RN 0.78.3 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -173,7 +173,7 @@ jobs: typecheck-rn-latest: runs-on: ubuntu-latest - name: Typecheck RN Latest + name: Typecheck: RN Latest steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -186,7 +186,7 @@ jobs: typecheck-rn-next: runs-on: ubuntu-latest - name: Typecheck RN Next + name: Typecheck: RN Next steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -199,7 +199,7 @@ jobs: typecheck-rn-nightly: runs-on: ubuntu-latest - name: Typecheck RN Nightly + name: Typecheck: RN Nightly steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -243,7 +243,7 @@ jobs: test-rn-0-85: runs-on: ubuntu-latest - name: Test RN 0.85.0 + name: Test: RN 0.85.0 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -259,7 +259,7 @@ jobs: test-rn-0-84: runs-on: ubuntu-latest - name: Test RN 0.84.1 + name: Test: RN 0.84.1 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -275,7 +275,7 @@ jobs: test-rn-0-83: runs-on: ubuntu-latest - name: Test RN 0.83.4 + name: Test: RN 0.83.4 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -291,7 +291,7 @@ jobs: test-rn-0-82: runs-on: ubuntu-latest - name: Test RN 0.82.1 + name: Test: RN 0.82.1 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -307,7 +307,7 @@ jobs: test-rn-0-81: runs-on: ubuntu-latest - name: Test RN 0.81.6 + name: Test: RN 0.81.6 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -323,7 +323,7 @@ jobs: test-rn-0-80: runs-on: ubuntu-latest - name: Test RN 0.80.3 + name: Test: RN 0.80.3 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -339,7 +339,7 @@ jobs: test-rn-0-79: runs-on: ubuntu-latest - name: Test RN 0.79.7 + name: Test: RN 0.79.7 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -355,7 +355,7 @@ jobs: test-rn-0-78: runs-on: ubuntu-latest - name: Test RN 0.78.3 + name: Test: RN 0.78.3 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -371,7 +371,7 @@ jobs: test-rn-latest: runs-on: ubuntu-latest - name: Test RN Latest + name: Test: RN Latest steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -384,7 +384,7 @@ jobs: test-rn-next: runs-on: ubuntu-latest - name: Test RN Next + name: Test: RN Next steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -397,7 +397,7 @@ jobs: test-rn-nightly: runs-on: ubuntu-latest - name: Test RN Nightly + name: Test: RN Nightly steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/nightly-v13.yaml b/.github/workflows/nightly-v13.yaml index 4ab2ac42a..16d1e9d29 100644 --- a/.github/workflows/nightly-v13.yaml +++ b/.github/workflows/nightly-v13.yaml @@ -16,7 +16,7 @@ concurrency: jobs: lint: runs-on: ubuntu-latest - name: Lint - ${{ matrix.rn-version }} + name: Lint: ${{ matrix.rn-version }} strategy: fail-fast: false matrix: @@ -44,7 +44,7 @@ jobs: typecheck: runs-on: ubuntu-latest - name: Typecheck - ${{ matrix.rn-version }} + name: Typecheck: ${{ matrix.rn-version }} strategy: fail-fast: false matrix: @@ -72,7 +72,7 @@ jobs: test: runs-on: ubuntu-latest - name: Test - ${{ matrix.rn-version }} + name: Test: ${{ matrix.rn-version }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index c01893879..ab9aad5ed 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -16,7 +16,7 @@ concurrency: jobs: lint: runs-on: ubuntu-latest - name: Lint - ${{ matrix.rn-version }} + name: Lint: RN ${{ matrix.rn-version }} strategy: fail-fast: false matrix: @@ -42,7 +42,7 @@ jobs: typecheck: runs-on: ubuntu-latest - name: Typecheck - ${{ matrix.rn-version }} + name: Typecheck: RN ${{ matrix.rn-version }} strategy: fail-fast: false matrix: @@ -68,7 +68,7 @@ jobs: test: runs-on: ubuntu-latest - name: Test - RN ${{ matrix.rn-lane }} - TR ${{ matrix.test-renderer-version }} + name: Test: RN ${{ matrix.rn-lane }} x TR ${{ matrix.test-renderer-version }} strategy: fail-fast: false matrix: From a034134d0b42773ee6677e4e92292441282db153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 16:25:54 +0200 Subject: [PATCH 10/18] CI patch version handling --- .github/workflows/ci.yml | 86 +++++++++++++++++++--------------- .github/workflows/nightly.yaml | 66 +++++++++++++------------- 2 files changed, 80 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a402f7de..302ac8c52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: typecheck-rn-0-85: runs-on: ubuntu-latest - name: Typecheck: RN 0.85.0 + name: Typecheck: RN 0.85 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -53,15 +53,15 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.2.3 - react-native-version: 0.85.0 + react-version: ~19.2.3 + react-native-version: ~0.85.0 - name: Typecheck run: yarn typecheck typecheck-rn-0-84: runs-on: ubuntu-latest - name: Typecheck: RN 0.84.1 + name: Typecheck: RN 0.84 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -69,15 +69,15 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.2.3 - react-native-version: 0.84.1 + react-version: ~19.2.3 + react-native-version: ~0.84.1 - name: Typecheck run: yarn typecheck typecheck-rn-0-83: runs-on: ubuntu-latest - name: Typecheck: RN 0.83.4 + name: Typecheck: RN 0.83 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -85,15 +85,15 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.2.0 - react-native-version: 0.83.4 + react-version: ~19.2.0 + react-native-version: ~0.83.4 - name: Typecheck run: yarn typecheck typecheck-rn-0-82: runs-on: ubuntu-latest - name: Typecheck: RN 0.82.1 + name: Typecheck: RN 0.82 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -101,15 +101,15 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.1.1 - react-native-version: 0.82.1 + react-version: ~19.1.1 + react-native-version: ~0.82.1 - name: Typecheck run: yarn typecheck typecheck-rn-0-81: runs-on: ubuntu-latest - name: Typecheck: RN 0.81.6 + name: Typecheck: RN 0.81 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -117,8 +117,8 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.1.4 - react-native-version: 0.81.6 + react-version: ~19.1.4 + react-native-version: ~0.81.6 - name: Typecheck run: yarn typecheck @@ -243,7 +243,7 @@ jobs: test-rn-0-85: runs-on: ubuntu-latest - name: Test: RN 0.85.0 + name: Test: RN 0.85 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -251,15 +251,16 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.2.3 - react-native-version: 0.85.0 + react-version: ~19.2.3 + react-native-version: ~0.85.0 + test-renderer-version: ~1.2.0 - name: Test run: yarn test:ci test-rn-0-84: runs-on: ubuntu-latest - name: Test: RN 0.84.1 + name: Test: RN 0.84 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -267,15 +268,16 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.2.3 - react-native-version: 0.84.1 + react-version: ~19.2.3 + react-native-version: ~0.84.1 + test-renderer-version: ~1.2.0 - name: Test run: yarn test:ci test-rn-0-83: runs-on: ubuntu-latest - name: Test: RN 0.83.4 + name: Test: RN 0.83 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -283,15 +285,16 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.2.0 - react-native-version: 0.83.4 + react-version: ~19.2.0 + react-native-version: ~0.83.4 + test-renderer-version: ~1.2.0 - name: Test run: yarn test:ci test-rn-0-82: runs-on: ubuntu-latest - name: Test: RN 0.82.1 + name: Test: RN 0.82 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -299,15 +302,16 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.1.1 - react-native-version: 0.82.1 + react-version: ~19.1.1 + react-native-version: ~0.82.1 + test-renderer-version: ~1.1.0 - name: Test run: yarn test:ci test-rn-0-81: runs-on: ubuntu-latest - name: Test: RN 0.81.6 + name: Test: RN 0.81 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -315,15 +319,16 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.1.4 - react-native-version: 0.81.6 + react-version: ~19.1.4 + react-native-version: ~0.81.6 + test-renderer-version: ~1.1.0 - name: Test run: yarn test:ci test-rn-0-80: runs-on: ubuntu-latest - name: Test: RN 0.80.3 + name: Test: RN 0.80 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -331,15 +336,16 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.1.0 - react-native-version: 0.80.3 + react-version: ~19.1.0 + react-native-version: ~0.80.3 + test-renderer-version: ~1.1.0 - name: Test run: yarn test:ci test-rn-0-79: runs-on: ubuntu-latest - name: Test: RN 0.79.7 + name: Test: RN 0.79 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -347,15 +353,16 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.0.0 - react-native-version: 0.79.7 + react-version: ~19.0.0 + react-native-version: ~0.79.7 + test-renderer-version: ~1.0.0 - name: Test run: yarn test:ci test-rn-0-78: runs-on: ubuntu-latest - name: Test: RN 0.78.3 + name: Test: RN 0.78 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -363,8 +370,9 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: 19.0.0 - react-native-version: 0.78.3 + react-version: ~19.0.0 + react-native-version: ~0.78.3 + test-renderer-version: ~1.0.0 - name: Test run: yarn test:ci diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index ab9aad5ed..0bbb980df 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -74,52 +74,52 @@ jobs: matrix: rn-lane: [ - '0.85.0', - '0.84.1', - '0.83.4', - '0.82.1', - '0.81.6', - '0.80.3', - '0.79.7', - '0.78.3', + '0.85', + '0.84', + '0.83', + '0.82', + '0.81', + '0.80', + '0.79', + '0.78', latest, next, nightly, ] - test-renderer-version: ['1.0.0', '1.1.0', '1.2.0'] + test-renderer-version: ['~1.0.0', '~1.1.0', '~1.2.0'] include: - - rn-lane: '0.85.0' + - rn-lane: '0.85' setup-kind: stable - react-version: '19.2.3' - react-native-version: '0.85.0' - - rn-lane: '0.84.1' + react-version: '~19.2.3' + react-native-version: '~0.85.0' + - rn-lane: '0.84' setup-kind: stable - react-version: '19.2.3' - react-native-version: '0.84.1' - - rn-lane: '0.83.4' + react-version: '~19.2.3' + react-native-version: '~0.84.1' + - rn-lane: '0.83' setup-kind: stable - react-version: '19.2.0' - react-native-version: '0.83.4' - - rn-lane: '0.82.1' + react-version: '~19.2.0' + react-native-version: '~0.83.4' + - rn-lane: '0.82' setup-kind: stable - react-version: '19.1.1' - react-native-version: '0.82.1' - - rn-lane: '0.81.6' + react-version: '~19.1.1' + react-native-version: '~0.82.1' + - rn-lane: '0.81' setup-kind: stable - react-version: '19.1.4' - react-native-version: '0.81.6' - - rn-lane: '0.80.3' + react-version: '~19.1.4' + react-native-version: '~0.81.6' + - rn-lane: '0.80' setup-kind: stable - react-version: '19.1.0' - react-native-version: '0.80.3' - - rn-lane: '0.79.7' + react-version: '~19.1.0' + react-native-version: '~0.80.3' + - rn-lane: '0.79' setup-kind: stable - react-version: '19.0.0' - react-native-version: '0.79.7' - - rn-lane: '0.78.3' + react-version: '~19.0.0' + react-native-version: '~0.79.7' + - rn-lane: '0.78' setup-kind: stable - react-version: '19.0.0' - react-native-version: '0.78.3' + react-version: '~19.0.0' + react-native-version: '~0.78.3' - rn-lane: latest setup-kind: latest - rn-lane: next From 80205e2d64d8292ac63d65dd3d942a5e84513015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 16:29:17 +0200 Subject: [PATCH 11/18] fix ci chars --- .github/workflows/ci.yml | 44 +++++++++++++++--------------- .github/workflows/nightly-v13.yaml | 6 ++-- .github/workflows/nightly.yaml | 6 ++-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 302ac8c52..aa5617a7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: typecheck-rn-0-85: runs-on: ubuntu-latest - name: Typecheck: RN 0.85 + name: Typecheck → RN 0.85 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -61,7 +61,7 @@ jobs: typecheck-rn-0-84: runs-on: ubuntu-latest - name: Typecheck: RN 0.84 + name: Typecheck → RN 0.84 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -77,7 +77,7 @@ jobs: typecheck-rn-0-83: runs-on: ubuntu-latest - name: Typecheck: RN 0.83 + name: Typecheck → RN 0.83 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -93,7 +93,7 @@ jobs: typecheck-rn-0-82: runs-on: ubuntu-latest - name: Typecheck: RN 0.82 + name: Typecheck → RN 0.82 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -109,7 +109,7 @@ jobs: typecheck-rn-0-81: runs-on: ubuntu-latest - name: Typecheck: RN 0.81 + name: Typecheck → RN 0.81 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -125,7 +125,7 @@ jobs: typecheck-rn-0-80: runs-on: ubuntu-latest - name: Typecheck: RN 0.80.3 + name: Typecheck → RN 0.80.3 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -141,7 +141,7 @@ jobs: typecheck-rn-0-79: runs-on: ubuntu-latest - name: Typecheck: RN 0.79.7 + name: Typecheck → RN 0.79.7 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -157,7 +157,7 @@ jobs: typecheck-rn-0-78: runs-on: ubuntu-latest - name: Typecheck: RN 0.78.3 + name: Typecheck → RN 0.78.3 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -173,7 +173,7 @@ jobs: typecheck-rn-latest: runs-on: ubuntu-latest - name: Typecheck: RN Latest + name: Typecheck → RN Latest steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -186,7 +186,7 @@ jobs: typecheck-rn-next: runs-on: ubuntu-latest - name: Typecheck: RN Next + name: Typecheck → RN Next steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -199,7 +199,7 @@ jobs: typecheck-rn-nightly: runs-on: ubuntu-latest - name: Typecheck: RN Nightly + name: Typecheck → RN Nightly steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -243,7 +243,7 @@ jobs: test-rn-0-85: runs-on: ubuntu-latest - name: Test: RN 0.85 + name: Test → RN 0.85 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -260,7 +260,7 @@ jobs: test-rn-0-84: runs-on: ubuntu-latest - name: Test: RN 0.84 + name: Test → RN 0.84 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -277,7 +277,7 @@ jobs: test-rn-0-83: runs-on: ubuntu-latest - name: Test: RN 0.83 + name: Test → RN 0.83 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -294,7 +294,7 @@ jobs: test-rn-0-82: runs-on: ubuntu-latest - name: Test: RN 0.82 + name: Test → RN 0.82 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -311,7 +311,7 @@ jobs: test-rn-0-81: runs-on: ubuntu-latest - name: Test: RN 0.81 + name: Test → RN 0.81 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -328,7 +328,7 @@ jobs: test-rn-0-80: runs-on: ubuntu-latest - name: Test: RN 0.80 + name: Test → RN 0.80 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -345,7 +345,7 @@ jobs: test-rn-0-79: runs-on: ubuntu-latest - name: Test: RN 0.79 + name: Test → RN 0.79 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -362,7 +362,7 @@ jobs: test-rn-0-78: runs-on: ubuntu-latest - name: Test: RN 0.78 + name: Test → RN 0.78 steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -379,7 +379,7 @@ jobs: test-rn-latest: runs-on: ubuntu-latest - name: Test: RN Latest + name: Test → RN Latest steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -392,7 +392,7 @@ jobs: test-rn-next: runs-on: ubuntu-latest - name: Test: RN Next + name: Test → RN Next steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -405,7 +405,7 @@ jobs: test-rn-nightly: runs-on: ubuntu-latest - name: Test: RN Nightly + name: Test → RN Nightly steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/nightly-v13.yaml b/.github/workflows/nightly-v13.yaml index 16d1e9d29..8bdd07a72 100644 --- a/.github/workflows/nightly-v13.yaml +++ b/.github/workflows/nightly-v13.yaml @@ -16,7 +16,7 @@ concurrency: jobs: lint: runs-on: ubuntu-latest - name: Lint: ${{ matrix.rn-version }} + name: Lint → ${{ matrix.rn-version }} strategy: fail-fast: false matrix: @@ -44,7 +44,7 @@ jobs: typecheck: runs-on: ubuntu-latest - name: Typecheck: ${{ matrix.rn-version }} + name: Typecheck → ${{ matrix.rn-version }} strategy: fail-fast: false matrix: @@ -72,7 +72,7 @@ jobs: test: runs-on: ubuntu-latest - name: Test: ${{ matrix.rn-version }} + name: Test → ${{ matrix.rn-version }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 0bbb980df..8fa060903 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -16,7 +16,7 @@ concurrency: jobs: lint: runs-on: ubuntu-latest - name: Lint: RN ${{ matrix.rn-version }} + name: Lint → RN ${{ matrix.rn-version }} strategy: fail-fast: false matrix: @@ -42,7 +42,7 @@ jobs: typecheck: runs-on: ubuntu-latest - name: Typecheck: RN ${{ matrix.rn-version }} + name: Typecheck → RN ${{ matrix.rn-version }} strategy: fail-fast: false matrix: @@ -68,7 +68,7 @@ jobs: test: runs-on: ubuntu-latest - name: Test: RN ${{ matrix.rn-lane }} x TR ${{ matrix.test-renderer-version }} + name: Test → RN ${{ matrix.rn-lane }} x TR ${{ matrix.test-renderer-version }} strategy: fail-fast: false matrix: From f6441c40390b569c0736871be3e6400d62f37d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Tue, 21 Apr 2026 16:35:31 +0200 Subject: [PATCH 12/18] . --- .github/workflows/ci.yml | 26 +++++++++++++------------- .github/workflows/nightly.yaml | 16 ++++++++-------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa5617a7e..135303f2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.2.3 + react-version: 19.2.3 react-native-version: ~0.85.0 - name: Typecheck @@ -69,7 +69,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.2.3 + react-version: 19.2.3 react-native-version: ~0.84.1 - name: Typecheck @@ -85,7 +85,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.2.0 + react-version: 19.2.0 react-native-version: ~0.83.4 - name: Typecheck @@ -101,7 +101,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.1.1 + react-version: 19.1.1 react-native-version: ~0.82.1 - name: Typecheck @@ -117,7 +117,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.1.4 + react-version: 19.1.4 react-native-version: ~0.81.6 - name: Typecheck @@ -251,7 +251,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.2.3 + react-version: 19.2.3 react-native-version: ~0.85.0 test-renderer-version: ~1.2.0 @@ -268,7 +268,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.2.3 + react-version: 19.2.3 react-native-version: ~0.84.1 test-renderer-version: ~1.2.0 @@ -285,7 +285,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.2.0 + react-version: 19.2.0 react-native-version: ~0.83.4 test-renderer-version: ~1.2.0 @@ -302,7 +302,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.1.1 + react-version: 19.1.1 react-native-version: ~0.82.1 test-renderer-version: ~1.1.0 @@ -319,7 +319,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.1.4 + react-version: 19.1.4 react-native-version: ~0.81.6 test-renderer-version: ~1.1.0 @@ -336,7 +336,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.1.0 + react-version: 19.1.0 react-native-version: ~0.80.3 test-renderer-version: ~1.1.0 @@ -353,7 +353,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.0.0 + react-version: 19.0.0 react-native-version: ~0.79.7 test-renderer-version: ~1.0.0 @@ -370,7 +370,7 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps with: - react-version: ~19.0.0 + react-version: 19.0.0 react-native-version: ~0.78.3 test-renderer-version: ~1.0.0 diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 8fa060903..8a727d73c 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -90,35 +90,35 @@ jobs: include: - rn-lane: '0.85' setup-kind: stable - react-version: '~19.2.3' + react-version: '19.2.3' react-native-version: '~0.85.0' - rn-lane: '0.84' setup-kind: stable - react-version: '~19.2.3' + react-version: '19.2.3' react-native-version: '~0.84.1' - rn-lane: '0.83' setup-kind: stable - react-version: '~19.2.0' + react-version: '19.2.0' react-native-version: '~0.83.4' - rn-lane: '0.82' setup-kind: stable - react-version: '~19.1.1' + react-version: '19.1.1' react-native-version: '~0.82.1' - rn-lane: '0.81' setup-kind: stable - react-version: '~19.1.4' + react-version: '19.1.4' react-native-version: '~0.81.6' - rn-lane: '0.80' setup-kind: stable - react-version: '~19.1.0' + react-version: '19.1.0' react-native-version: '~0.80.3' - rn-lane: '0.79' setup-kind: stable - react-version: '~19.0.0' + react-version: '19.0.0' react-native-version: '~0.79.7' - rn-lane: '0.78' setup-kind: stable - react-version: '~19.0.0' + react-version: '19.0.0' react-native-version: '~0.78.3' - rn-lane: latest setup-kind: latest From 3593338a4a2028b0a369cf06600df8311a5be510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Wed, 22 Apr 2026 11:44:59 +0200 Subject: [PATCH 13/18] extrat tests --- eslint.config.mjs | 10 +++- package.json | 1 + src/__tests__/react-19_2/activity.test.tsx | 55 ++++++++++++++++++++++ src/__tests__/render.test.tsx | 51 -------------------- src/test-utils/react-version-gates.ts | 4 +- tsconfig.json | 3 +- tsconfig.react-19_2.json | 5 ++ 7 files changed, 74 insertions(+), 55 deletions(-) create mode 100644 src/__tests__/react-19_2/activity.test.tsx create mode 100644 tsconfig.react-19_2.json diff --git a/eslint.config.mjs b/eslint.config.mjs index e58898fe9..d8c1036e1 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -4,7 +4,7 @@ import { fixupPluginRules } from '@eslint/compat'; import pluginJest from 'eslint-plugin-jest'; import simpleImportSort from 'eslint-plugin-simple-import-sort'; -const additionalTestBlockFunctions = ['testGateReact19_2', 'testGateReact19_3']; +const additionalTestBlockFunctions = ['testGateReact19_2']; const patchedCallstackConfig = callstackConfig.map((configItem) => { if (!configItem.plugins?.react) { @@ -46,6 +46,14 @@ export default [ '@typescript-eslint/consistent-type-imports': 'error', }, }, + { + files: ['src/__tests__/react-19_2/**/*.{ts,tsx}'], + languageOptions: { + parserOptions: { + project: './tsconfig.react-19_2.json', + }, + }, + }, { files: ['**/*.test.{ts,tsx}', 'src/test-utils/**'], plugins: { diff --git a/package.json b/package.json index f1f5e2fac..99f18adaa 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "test:ci:coverage": "jest --maxWorkers=2 --collectCoverage=true", "test:codemods": "node scripts/test-codemods.mjs", "typecheck": "tsc", + "typecheck:react-19_2": "tsc -p tsconfig.react-19_2.json", "lint": "eslint src --cache", "prettier": "prettier --check .", "prettier:fix": "prettier --write .", diff --git a/src/__tests__/react-19_2/activity.test.tsx b/src/__tests__/react-19_2/activity.test.tsx new file mode 100644 index 000000000..c31b09761 --- /dev/null +++ b/src/__tests__/react-19_2/activity.test.tsx @@ -0,0 +1,55 @@ +import * as React from 'react'; +import { Text, View } from 'react-native'; + +import { render, screen } from '../..'; +import { testGateReact19_2 } from '../../test-utils/react-version-gates'; + +testGateReact19_2('renders Activity hidden and then visible', async () => { + await render( + + + Ready + + , + ); + + expect(screen.queryByTestId('activity-target')).not.toBeOnTheScreen(); + expect( + screen.getByTestId('activity-target', { includeHiddenElements: true }).props.style, + ).toEqual({ + display: 'none', + }); + expect(screen.toJSON()).toMatchInlineSnapshot(` + + + Ready + + + `); + + await screen.rerender( + + + Ready + + , + ); + + expect(screen.getByTestId('activity-target')).toBeOnTheScreen(); + expect(screen.toJSON()).toMatchInlineSnapshot(` + + + Ready + + + `); +}); diff --git a/src/__tests__/render.test.tsx b/src/__tests__/render.test.tsx index 335e1fddc..f39d3228b 100644 --- a/src/__tests__/render.test.tsx +++ b/src/__tests__/render.test.tsx @@ -3,7 +3,6 @@ import { Text, View } from 'react-native'; import { render, screen } from '..'; import { _console, logger } from '../helpers/logger'; -import { testGateReact19_2 } from '../test-utils/react-version-gates'; function MaybeSuspend({ children, @@ -113,56 +112,6 @@ describe('render options', () => { }); describe('hidden instance props', () => { - testGateReact19_2('renders Activity hidden and then visible', async () => { - await render( - - - Ready - - , - ); - - expect(screen.queryByTestId('activity-target')).not.toBeOnTheScreen(); - expect( - screen.getByTestId('activity-target', { includeHiddenElements: true }).props.style, - ).toEqual({ - display: 'none', - }); - expect(screen.toJSON()).toMatchInlineSnapshot(` - - - Ready - - - `); - - await screen.rerender( - - - Ready - - , - ); - - expect(screen.getByTestId('activity-target')).toBeOnTheScreen(); - expect(screen.toJSON()).toMatchInlineSnapshot(` - - - Ready - - - `); - }); - test('does not retain hidden UI when the component suspends on initial render', async () => { const promise = new Promise(() => {}); diff --git a/src/test-utils/react-version-gates.ts b/src/test-utils/react-version-gates.ts index e0761488d..488548009 100644 --- a/src/test-utils/react-version-gates.ts +++ b/src/test-utils/react-version-gates.ts @@ -2,7 +2,7 @@ import React from 'react'; // eslint-disable-next-line @typescript-eslint/no-require-imports const testRendererVersion = require('test-renderer/package.json').version; -function matchesMinVersion( +function isVersionAtLeast( versionString: string, targetMajor: number, targetMinor: number, @@ -30,6 +30,6 @@ function matchesMinVersion( } export const testGateReact19_2 = - matchesMinVersion(React.version, 19, 2, 0) && matchesMinVersion(testRendererVersion, 1, 2, 0) + isVersionAtLeast(React.version, 19, 2, 0) && isVersionAtLeast(testRendererVersion, 1, 2, 0) ? test : test.skip; diff --git a/tsconfig.json b/tsconfig.json index 692221260..8973f5a52 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,5 +15,6 @@ "types": ["jest", "node"], "outDir": "build" }, - "include": ["src/**/*"] + "include": ["src/**/*"], + "exclude": ["src/__tests__/react-19_2/**/*"] } diff --git a/tsconfig.react-19_2.json b/tsconfig.react-19_2.json new file mode 100644 index 000000000..8e43e989c --- /dev/null +++ b/tsconfig.react-19_2.json @@ -0,0 +1,5 @@ +{ + "extends": "./tsconfig.json", + "include": ["src/__tests__/react-19_2/**/*"], + "exclude": [] +} From e3f144c4a868523c8172f002da3a4a4dacc76681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Wed, 22 Apr 2026 11:46:39 +0200 Subject: [PATCH 14/18] ci adjustment --- .../action.yml | 20 +++++++++++++++++++ .github/workflows/ci.yml | 12 +++++++++++ .github/workflows/nightly.yaml | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 .github/actions/typecheck-react-19_2-if-supported/action.yml diff --git a/.github/actions/typecheck-react-19_2-if-supported/action.yml b/.github/actions/typecheck-react-19_2-if-supported/action.yml new file mode 100644 index 000000000..da92e086a --- /dev/null +++ b/.github/actions/typecheck-react-19_2-if-supported/action.yml @@ -0,0 +1,20 @@ +name: Typecheck React 19.2 tests if supported +description: Run React 19.2-only test typecheck when the installed React version is 19.2 or newer + +runs: + using: composite + steps: + - name: Typecheck React 19.2-only tests + run: | + REACT_VERSION="$(node -p "require('react/package.json').version")" + REACT_MAJOR="${REACT_VERSION%%.*}" + REACT_MINOR_PATCH="${REACT_VERSION#*.}" + REACT_MINOR="${REACT_MINOR_PATCH%%.*}" + + if [ "$REACT_MAJOR" -gt 19 ] || { [ "$REACT_MAJOR" -eq 19 ] && [ "$REACT_MINOR" -ge 2 ]; }; then + echo "Running React 19.2-only typecheck for React $REACT_VERSION" + yarn typecheck:react-19_2 + else + echo "Skipping React 19.2-only typecheck for React $REACT_VERSION" + fi + shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 135303f2d..e2b29227a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,9 @@ jobs: - name: Typecheck run: yarn typecheck + - name: Typecheck React 19.2-only tests + run: yarn typecheck:react-19_2 + typecheck-rn-0-85: runs-on: ubuntu-latest name: Typecheck → RN 0.85 @@ -59,6 +62,9 @@ jobs: - name: Typecheck run: yarn typecheck + - name: Typecheck React 19.2-only tests + run: yarn typecheck:react-19_2 + typecheck-rn-0-84: runs-on: ubuntu-latest name: Typecheck → RN 0.84 @@ -75,6 +81,9 @@ jobs: - name: Typecheck run: yarn typecheck + - name: Typecheck React 19.2-only tests + run: yarn typecheck:react-19_2 + typecheck-rn-0-83: runs-on: ubuntu-latest name: Typecheck → RN 0.83 @@ -91,6 +100,9 @@ jobs: - name: Typecheck run: yarn typecheck + - name: Typecheck React 19.2-only tests + run: yarn typecheck:react-19_2 + typecheck-rn-0-82: runs-on: ubuntu-latest name: Typecheck → RN 0.82 diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 8a727d73c..427b80306 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -66,6 +66,9 @@ jobs: - name: Typecheck run: yarn typecheck + - name: Typecheck React 19.2-only tests + uses: ./.github/actions/typecheck-react-19_2-if-supported + test: runs-on: ubuntu-latest name: Test → RN ${{ matrix.rn-lane }} x TR ${{ matrix.test-renderer-version }} From 115dd2f7c69c759c4c20a83ae42f136b81a4fde6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Wed, 22 Apr 2026 11:48:02 +0200 Subject: [PATCH 15/18] fix lint --- .github/workflows/nightly.yaml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 427b80306..c8e17c3a1 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -76,19 +76,7 @@ jobs: fail-fast: false matrix: rn-lane: - [ - '0.85', - '0.84', - '0.83', - '0.82', - '0.81', - '0.80', - '0.79', - '0.78', - latest, - next, - nightly, - ] + ['0.85', '0.84', '0.83', '0.82', '0.81', '0.80', '0.79', '0.78', latest, next, nightly] test-renderer-version: ['~1.0.0', '~1.1.0', '~1.2.0'] include: - rn-lane: '0.85' From c3ac727eafc63a0a51073af0b3d6ab72e13685f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Wed, 22 Apr 2026 11:54:09 +0200 Subject: [PATCH 16/18] fix 0.85 action --- .github/actions/setup-deps/action.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-deps/action.yml b/.github/actions/setup-deps/action.yml index 87a888206..f3102ae43 100644 --- a/.github/actions/setup-deps/action.yml +++ b/.github/actions/setup-deps/action.yml @@ -41,7 +41,14 @@ runs: if: inputs.react-version != '' && inputs.react-native-version != '' run: | RN_VERSION='${{ inputs.react-native-version }}' - RN_MINOR="${RN_VERSION#0.}" + RN_VERSION_CLEAN="$RN_VERSION" + + case "$RN_VERSION_CLEAN" in + '~'*) RN_VERSION_CLEAN="${RN_VERSION_CLEAN#\~}" ;; + '^'*) RN_VERSION_CLEAN="${RN_VERSION_CLEAN#^}" ;; + esac + + RN_MINOR="${RN_VERSION_CLEAN#0.}" RN_MINOR="${RN_MINOR%%.*}" deps=( From 49143e83595fdde6a80edd8cc2e26ec75ac26043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Thu, 23 Apr 2026 11:20:17 +0200 Subject: [PATCH 17/18] modify codemods --- .github/workflows/nightly.yaml | 2 +- codemods/v14-update-deps/README.md | 4 +- codemods/v14-update-deps/package.json | 2 +- codemods/v14-update-deps/scripts/codemod.ts | 2 +- .../fixtures/already-alpha/expected.json | 2 +- .../tests/fixtures/basic-update/expected.json | 2 +- .../fixtures/move-from-deps/expected.json | 2 +- .../fixtures/rntl-in-devdeps/expected.json | 2 +- .../fixtures/with-peer-deps/expected.json | 2 +- package.json | 1 + scripts/test-codemods.mjs | 2 +- yarn.lock | 308 +++++++++++++++++- 12 files changed, 318 insertions(+), 13 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index c8e17c3a1..599d38bea 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -77,7 +77,7 @@ jobs: matrix: rn-lane: ['0.85', '0.84', '0.83', '0.82', '0.81', '0.80', '0.79', '0.78', latest, next, nightly] - test-renderer-version: ['~1.0.0', '~1.1.0', '~1.2.0'] + test-renderer-version: ['~1.0', '~1.1', '~1.2'] include: - rn-lane: '0.85' setup-kind: stable diff --git a/codemods/v14-update-deps/README.md b/codemods/v14-update-deps/README.md index 61677e5f6..efe170f48 100644 --- a/codemods/v14-update-deps/README.md +++ b/codemods/v14-update-deps/README.md @@ -7,7 +7,7 @@ This codemod automatically updates your `package.json` to prepare for React Nati - Removes `@types/react-test-renderer` and `react-test-renderer` (no longer needed) - Moves `@testing-library/react-native` to `devDependencies` if it's in `dependencies` - Updates `@testing-library/react-native` to `^14.0.0-beta.0` -- Adds `test-renderer@0.16.0` to `devDependencies` +- Adds `test-renderer@1.2.0` to `devDependencies` ## Usage @@ -38,7 +38,7 @@ npx codemod@latest run rntl-v14-update-deps --target ./path/to/your/project { "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "0.16.0" + "test-renderer": "1.2.0" } } ``` diff --git a/codemods/v14-update-deps/package.json b/codemods/v14-update-deps/package.json index 6840cbdbc..9e28dd3c3 100644 --- a/codemods/v14-update-deps/package.json +++ b/codemods/v14-update-deps/package.json @@ -4,7 +4,7 @@ "description": "Codemod to update dependencies for RNTL v14 migration", "type": "module", "scripts": { - "test": "node --loader tsx/esm scripts/test.js" + "test": "node --import tsx/esm scripts/test.js" }, "devDependencies": {}, "dependencies": {} diff --git a/codemods/v14-update-deps/scripts/codemod.ts b/codemods/v14-update-deps/scripts/codemod.ts index 21b2cec7d..0f2bbf808 100644 --- a/codemods/v14-update-deps/scripts/codemod.ts +++ b/codemods/v14-update-deps/scripts/codemod.ts @@ -4,7 +4,7 @@ import type { Transform } from 'codemod:ast-grep'; import type JSONLang from 'codemod:ast-grep/langs/json'; const RNTL_VERSION = '^14.0.0-beta.0'; -const TEST_RENDERER_VERSION = '0.16.0'; +const TEST_RENDERER_VERSION = '1.2.0'; interface PackageJson { dependencies?: Record; diff --git a/codemods/v14-update-deps/tests/fixtures/already-alpha/expected.json b/codemods/v14-update-deps/tests/fixtures/already-alpha/expected.json index a94fd3eaf..12e9ae68e 100644 --- a/codemods/v14-update-deps/tests/fixtures/already-alpha/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/already-alpha/expected.json @@ -3,6 +3,6 @@ "version": "1.0.0", "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "0.16.0" + "test-renderer": "1.2.0" } } diff --git a/codemods/v14-update-deps/tests/fixtures/basic-update/expected.json b/codemods/v14-update-deps/tests/fixtures/basic-update/expected.json index a94fd3eaf..12e9ae68e 100644 --- a/codemods/v14-update-deps/tests/fixtures/basic-update/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/basic-update/expected.json @@ -3,6 +3,6 @@ "version": "1.0.0", "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "0.16.0" + "test-renderer": "1.2.0" } } diff --git a/codemods/v14-update-deps/tests/fixtures/move-from-deps/expected.json b/codemods/v14-update-deps/tests/fixtures/move-from-deps/expected.json index a94fd3eaf..12e9ae68e 100644 --- a/codemods/v14-update-deps/tests/fixtures/move-from-deps/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/move-from-deps/expected.json @@ -3,6 +3,6 @@ "version": "1.0.0", "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "0.16.0" + "test-renderer": "1.2.0" } } diff --git a/codemods/v14-update-deps/tests/fixtures/rntl-in-devdeps/expected.json b/codemods/v14-update-deps/tests/fixtures/rntl-in-devdeps/expected.json index 6cf17e5d7..b34bfa7d7 100644 --- a/codemods/v14-update-deps/tests/fixtures/rntl-in-devdeps/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/rntl-in-devdeps/expected.json @@ -1,6 +1,6 @@ { "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "0.16.0" + "test-renderer": "1.2.0" } } diff --git a/codemods/v14-update-deps/tests/fixtures/with-peer-deps/expected.json b/codemods/v14-update-deps/tests/fixtures/with-peer-deps/expected.json index a94fd3eaf..12e9ae68e 100644 --- a/codemods/v14-update-deps/tests/fixtures/with-peer-deps/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/with-peer-deps/expected.json @@ -3,6 +3,6 @@ "version": "1.0.0", "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "0.16.0" + "test-renderer": "1.2.0" } } diff --git a/package.json b/package.json index 99f18adaa..8f43ca9bc 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ "react-native-gesture-handler": "^2.31.1", "release-it": "^19.2.4", "test-renderer": "1.2.0", + "tsx": "^4.21.0", "typescript": "^6.0.2", "typescript-eslint": "^8.58.1" }, diff --git a/scripts/test-codemods.mjs b/scripts/test-codemods.mjs index a4a38323a..7b6f44565 100644 --- a/scripts/test-codemods.mjs +++ b/scripts/test-codemods.mjs @@ -25,7 +25,7 @@ try { console.log('Running update-deps codemod tests...\n'); try { - execSync(`yarn dlx tsx ${join(rootDir, 'codemods/v14-update-deps/scripts/test.js')}`, { + execSync(`node --import tsx/esm ${join(rootDir, 'codemods/v14-update-deps/scripts/test.js')}`, { cwd: rootDir, stdio: 'inherit', }); diff --git a/yarn.lock b/yarn.lock index 5d30a3a15..a3b748a4d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1621,6 +1621,188 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/aix-ppc64@npm:0.27.7" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/android-arm64@npm:0.27.7" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/android-arm@npm:0.27.7" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/android-x64@npm:0.27.7" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/darwin-arm64@npm:0.27.7" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/darwin-x64@npm:0.27.7" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/freebsd-arm64@npm:0.27.7" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/freebsd-x64@npm:0.27.7" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/linux-arm64@npm:0.27.7" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/linux-arm@npm:0.27.7" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/linux-ia32@npm:0.27.7" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/linux-loong64@npm:0.27.7" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/linux-mips64el@npm:0.27.7" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/linux-ppc64@npm:0.27.7" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/linux-riscv64@npm:0.27.7" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/linux-s390x@npm:0.27.7" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/linux-x64@npm:0.27.7" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-arm64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/netbsd-arm64@npm:0.27.7" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/netbsd-x64@npm:0.27.7" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/openbsd-arm64@npm:0.27.7" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/openbsd-x64@npm:0.27.7" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openharmony-arm64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/openharmony-arm64@npm:0.27.7" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/sunos-x64@npm:0.27.7" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/win32-arm64@npm:0.27.7" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/win32-ia32@npm:0.27.7" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.27.7": + version: 0.27.7 + resolution: "@esbuild/win32-x64@npm:0.27.7" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.4.0, @eslint-community/eslint-utils@npm:^4.8.0, @eslint-community/eslint-utils@npm:^4.9.1": version: 4.9.1 resolution: "@eslint-community/eslint-utils@npm:4.9.1" @@ -3019,6 +3201,7 @@ __metadata: redent: "npm:^3.0.0" release-it: "npm:^19.2.4" test-renderer: "npm:1.2.0" + tsx: "npm:^4.21.0" typescript: "npm:^6.0.2" typescript-eslint: "npm:^8.58.1" peerDependencies: @@ -5150,6 +5333,95 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.27.0": + version: 0.27.7 + resolution: "esbuild@npm:0.27.7" + dependencies: + "@esbuild/aix-ppc64": "npm:0.27.7" + "@esbuild/android-arm": "npm:0.27.7" + "@esbuild/android-arm64": "npm:0.27.7" + "@esbuild/android-x64": "npm:0.27.7" + "@esbuild/darwin-arm64": "npm:0.27.7" + "@esbuild/darwin-x64": "npm:0.27.7" + "@esbuild/freebsd-arm64": "npm:0.27.7" + "@esbuild/freebsd-x64": "npm:0.27.7" + "@esbuild/linux-arm": "npm:0.27.7" + "@esbuild/linux-arm64": "npm:0.27.7" + "@esbuild/linux-ia32": "npm:0.27.7" + "@esbuild/linux-loong64": "npm:0.27.7" + "@esbuild/linux-mips64el": "npm:0.27.7" + "@esbuild/linux-ppc64": "npm:0.27.7" + "@esbuild/linux-riscv64": "npm:0.27.7" + "@esbuild/linux-s390x": "npm:0.27.7" + "@esbuild/linux-x64": "npm:0.27.7" + "@esbuild/netbsd-arm64": "npm:0.27.7" + "@esbuild/netbsd-x64": "npm:0.27.7" + "@esbuild/openbsd-arm64": "npm:0.27.7" + "@esbuild/openbsd-x64": "npm:0.27.7" + "@esbuild/openharmony-arm64": "npm:0.27.7" + "@esbuild/sunos-x64": "npm:0.27.7" + "@esbuild/win32-arm64": "npm:0.27.7" + "@esbuild/win32-ia32": "npm:0.27.7" + "@esbuild/win32-x64": "npm:0.27.7" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/openharmony-arm64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10c0/ccd51f0555708bc9ff4ec9dc3ac92d3daacd45ecaac949ca8645984c5c323bf8cefe98c2df307418685e0b4ce37f9a3bdbfe8e3651fe632a0059a436195a17d4 + languageName: node + linkType: hard + "escalade@npm:^3.1.1, escalade@npm:^3.2.0": version: 3.2.0 resolution: "escalade@npm:3.2.0" @@ -5884,7 +6156,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:^2.3.2, fsevents@npm:^2.3.3, fsevents@npm:~2.3.2": +"fsevents@npm:^2.3.2, fsevents@npm:^2.3.3, fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -5894,7 +6166,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A^2.3.3#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A^2.3.3#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -6022,6 +6294,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.5": + version: 4.14.0 + resolution: "get-tsconfig@npm:4.14.0" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: 10c0/abc2b9275468eb589079a0b7a95eb5107c14fdd0ca6dda1bff116fe774ea1f79975421dcb22a0c86b4f820fcc69a7655dddf9b6d6a8a2c06fcb59e19794c0724 + languageName: node + linkType: hard + "get-uri@npm:^6.0.1": version: 6.0.5 resolution: "get-uri@npm:6.0.5" @@ -9512,6 +9793,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: 10c0/fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab + languageName: node + linkType: hard + "resolve@npm:^1.22.11, resolve@npm:^1.22.8": version: 1.22.11 resolution: "resolve@npm:1.22.11" @@ -10433,6 +10721,22 @@ __metadata: languageName: node linkType: hard +"tsx@npm:^4.21.0": + version: 4.21.0 + resolution: "tsx@npm:4.21.0" + dependencies: + esbuild: "npm:~0.27.0" + fsevents: "npm:~2.3.3" + get-tsconfig: "npm:^4.7.5" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: 10c0/f5072923cd8459a1f9a26df87823a2ab5754641739d69df2a20b415f61814322b751fa6be85db7c6ec73cf68ba8fac2fd1cfc76bdb0aa86ded984d84d5d2126b + languageName: node + linkType: hard + "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" From 2ce0b038315731a3d551b445c5d47edddb7a3d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Thu, 23 Apr 2026 11:39:50 +0200 Subject: [PATCH 18/18] tweak version req --- codemods/v14-update-deps/README.md | 4 ++-- codemods/v14-update-deps/scripts/codemod.ts | 2 +- .../tests/fixtures/already-alpha/expected.json | 2 +- .../v14-update-deps/tests/fixtures/basic-update/expected.json | 2 +- .../tests/fixtures/move-from-deps/expected.json | 2 +- .../tests/fixtures/rntl-in-devdeps/expected.json | 2 +- .../tests/fixtures/with-peer-deps/expected.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/codemods/v14-update-deps/README.md b/codemods/v14-update-deps/README.md index efe170f48..22ee0f7f7 100644 --- a/codemods/v14-update-deps/README.md +++ b/codemods/v14-update-deps/README.md @@ -7,7 +7,7 @@ This codemod automatically updates your `package.json` to prepare for React Nati - Removes `@types/react-test-renderer` and `react-test-renderer` (no longer needed) - Moves `@testing-library/react-native` to `devDependencies` if it's in `dependencies` - Updates `@testing-library/react-native` to `^14.0.0-beta.0` -- Adds `test-renderer@1.2.0` to `devDependencies` +- Adds `test-renderer@^1.0.0` to `devDependencies` ## Usage @@ -38,7 +38,7 @@ npx codemod@latest run rntl-v14-update-deps --target ./path/to/your/project { "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "1.2.0" + "test-renderer": "^1.0.0" } } ``` diff --git a/codemods/v14-update-deps/scripts/codemod.ts b/codemods/v14-update-deps/scripts/codemod.ts index 0f2bbf808..6a441abca 100644 --- a/codemods/v14-update-deps/scripts/codemod.ts +++ b/codemods/v14-update-deps/scripts/codemod.ts @@ -4,7 +4,7 @@ import type { Transform } from 'codemod:ast-grep'; import type JSONLang from 'codemod:ast-grep/langs/json'; const RNTL_VERSION = '^14.0.0-beta.0'; -const TEST_RENDERER_VERSION = '1.2.0'; +const TEST_RENDERER_VERSION = '^1.0.0'; interface PackageJson { dependencies?: Record; diff --git a/codemods/v14-update-deps/tests/fixtures/already-alpha/expected.json b/codemods/v14-update-deps/tests/fixtures/already-alpha/expected.json index 12e9ae68e..3b0cd4ffa 100644 --- a/codemods/v14-update-deps/tests/fixtures/already-alpha/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/already-alpha/expected.json @@ -3,6 +3,6 @@ "version": "1.0.0", "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "1.2.0" + "test-renderer": "^1.0.0" } } diff --git a/codemods/v14-update-deps/tests/fixtures/basic-update/expected.json b/codemods/v14-update-deps/tests/fixtures/basic-update/expected.json index 12e9ae68e..3b0cd4ffa 100644 --- a/codemods/v14-update-deps/tests/fixtures/basic-update/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/basic-update/expected.json @@ -3,6 +3,6 @@ "version": "1.0.0", "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "1.2.0" + "test-renderer": "^1.0.0" } } diff --git a/codemods/v14-update-deps/tests/fixtures/move-from-deps/expected.json b/codemods/v14-update-deps/tests/fixtures/move-from-deps/expected.json index 12e9ae68e..3b0cd4ffa 100644 --- a/codemods/v14-update-deps/tests/fixtures/move-from-deps/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/move-from-deps/expected.json @@ -3,6 +3,6 @@ "version": "1.0.0", "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "1.2.0" + "test-renderer": "^1.0.0" } } diff --git a/codemods/v14-update-deps/tests/fixtures/rntl-in-devdeps/expected.json b/codemods/v14-update-deps/tests/fixtures/rntl-in-devdeps/expected.json index b34bfa7d7..cc292c2a9 100644 --- a/codemods/v14-update-deps/tests/fixtures/rntl-in-devdeps/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/rntl-in-devdeps/expected.json @@ -1,6 +1,6 @@ { "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "1.2.0" + "test-renderer": "^1.0.0" } } diff --git a/codemods/v14-update-deps/tests/fixtures/with-peer-deps/expected.json b/codemods/v14-update-deps/tests/fixtures/with-peer-deps/expected.json index 12e9ae68e..3b0cd4ffa 100644 --- a/codemods/v14-update-deps/tests/fixtures/with-peer-deps/expected.json +++ b/codemods/v14-update-deps/tests/fixtures/with-peer-deps/expected.json @@ -3,6 +3,6 @@ "version": "1.0.0", "devDependencies": { "@testing-library/react-native": "^14.0.0-beta.0", - "test-renderer": "1.2.0" + "test-renderer": "^1.0.0" } }