Skip to content

Commit 853a1fa

Browse files
authored
Fix CI pipelines and bump to RNW 0.73.21 (#293)
This PR is meant to fix the CI for `react-native-xaml` with the minimum number of changes required to pass, so that new development can continue. A side-effect of this change is to bump the version of `react-native-windows` needed by the example apps from 0.73.4 to 0.73.21. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-xaml/pull/293)
1 parent 0fdf33a commit 853a1fa

16 files changed

+497
-348
lines changed

.github/ISSUE_TEMPLATE/bug-report.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ body:
3232
attributes:
3333
label: Environment
3434
description: |
35-
Run the command `npx react-native info` in your terminal and copy the results here
36-
value: "npx react-native info"
35+
Run the command `npx @react-native-community/cli info` in your terminal and copy the results here
36+
value: "npx @react-native-community/cli info"
3737
render: markdown

.github/policies/resourceManagement.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ configuration:
240240
This issue lacks the environment info requested in the bug template. Please edit your issue report to add this information.
241241
242242
243-
1. `npx react-native --version`:
243+
1. `npx @react-native-community/cli --version`:
244244
245-
2. `npx react-native run-windows --info`:
245+
2. `npx @react-native-community/cli run-windows --info`:
246246
- addLabel:
247247
label: 'Needs: Author Feedback'
248248
- removeLabel:

.github/workflows/main.yml

+8-27
Original file line numberDiff line numberDiff line change
@@ -30,40 +30,21 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
rnwVersion: [ 'latest', '0.72-stable', '0.71-stable'] # test *all* versions that use VS 2022. aka any RNW version >= min in package.json and >= 0.71
33+
rnwVersion: [ 'v0.73-stable', 'v0.72-stable', 'v0.71-stable'] # test *all* versions that use VS 2022. aka any RNW version >= min in package.json and >= 0.71
3434
useRnwNuGet: [false, true] # test building with both RNW source and RNW NuGet
3535
include:
36-
- rnwVersion: 'latest'
37-
rnTemplate: 'react-native@latest'
38-
- rnwVersion: '0.72-stable'
39-
rnTemplate: 'react-native@0.72-stable'
40-
- rnwVersion: '0.71-stable'
41-
rnTemplate: 'react-native@0.71-stable'
36+
- rnwVersion: 'v0.73-stable'
37+
rnVersion: '0.73-stable'
38+
- rnwVersion: 'v0.72-stable'
39+
rnVersion: '0.72-stable'
40+
- rnwVersion: 'v0.71-stable'
41+
rnVersion: '0.71-stable'
4242
uses: ./.github/workflows/template-testcli.yml
4343
with:
4444
vmImage: windows-2022
4545
rnwVersion: ${{ matrix.rnwVersion }}
4646
useRnwNuGet: ${{ matrix.useRnwNuGet }}
47-
rnTemplate: ${{ matrix.rnTemplate }}
48-
49-
call-testcli-old:
50-
name: Test CLI (VS 2019)
51-
strategy:
52-
fail-fast: false
53-
matrix:
54-
rnwVersion: ['0.70-stable', '0.69-stable'] # test *all* versions that use VS 2019. aka any RNW version >= min in package.json and < 0.71
55-
useRnwNuGet: [false, true] # test building with both RNW source and RNW NuGet
56-
include:
57-
- rnwVersion: '0.70-stable'
58-
rnTemplate: '[email protected]'
59-
- rnwVersion: '0.69-stable'
60-
rnTemplate: '[email protected]'
61-
uses: ./.github/workflows/template-testcli.yml
62-
with:
63-
vmImage: windows-2019
64-
rnwVersion: ${{ matrix.rnwVersion }}
65-
useRnwNuGet: ${{ matrix.useRnwNuGet }}
66-
rnTemplate: ${{ matrix.rnTemplate }}
47+
rnVersion: ${{ matrix.rnVersion }}
6748

6849
call-buildnpmpackage:
6950
name: Build NPM Package

.github/workflows/pr.yml

+7-25
Original file line numberDiff line numberDiff line change
@@ -42,37 +42,19 @@ jobs:
4242
strategy:
4343
fail-fast: true
4444
matrix:
45-
rnwVersion: ['latest', '0.72-stable'] # test *key* versions that use VS 2022. aka any RNW version >= 0.71 used by supported partners and/or Active/Maintenance from https://microsoft.github.io/react-native-windows/support
45+
rnwVersion: ['v0.73-stable', 'v0.72-stable'] # test *key* versions that use VS 2022. aka any RNW version >= 0.71 used by supported partners and/or Active/Maintenance from https://microsoft.github.io/react-native-windows/support
4646
useRnwNuGet: [false, true] # test building with both RNW source and RNW NuGet
4747
include:
48-
- rnwVersion: 'latest'
49-
rnTemplate: 'react-native@latest'
50-
- rnwVersion: '0.72-stable'
51-
rnTemplate: 'react-native@0.72-stable'
48+
- rnwVersion: 'v0.73-stable'
49+
rnVersion: '0.73-stable'
50+
- rnwVersion: 'v0.72-stable'
51+
rnVersion: '0.72-stable'
5252
uses: ./.github/workflows/template-testcli.yml
5353
with:
5454
vmImage: windows-2022
5555
rnwVersion: ${{ matrix.rnwVersion }}
5656
useRnwNuGet: ${{ matrix.useRnwNuGet }}
57-
rnTemplate: ${{ matrix.rnTemplate }}
58-
59-
call-testcli-old:
60-
name: Test CLI (VS 2019)
61-
needs: setupcheck
62-
strategy:
63-
fail-fast: true
64-
matrix:
65-
rnwVersion: ['0.69-stable'] # test *key* versions that use VS 2019. aka any RNW version < 0.71 that are used by supported partners
66-
useRnwNuGet: [false, true] # test building with both RNW source and RNW NuGet
67-
include:
68-
- rnwVersion: '0.69-stable'
69-
rnTemplate: '[email protected]'
70-
uses: ./.github/workflows/template-testcli.yml
71-
with:
72-
vmImage: windows-2019
73-
rnwVersion: ${{ matrix.rnwVersion }}
74-
useRnwNuGet: ${{ matrix.useRnwNuGet }}
75-
rnTemplate: ${{ matrix.rnTemplate }}
57+
rnVersion: ${{ matrix.rnVersion }}
7658

7759
call-buildnpmpackage:
7860
name: Build NPM Package
@@ -98,6 +80,6 @@ jobs:
9880
prcheck:
9981
name: Successful PR Check
10082
runs-on: ubuntu-latest
101-
needs: [setupcheck, call-runcodegen, call-testcli, call-testcli-old, call-buildnpmpackage, call-buildrnx]
83+
needs: [setupcheck, call-runcodegen, call-testcli, call-buildnpmpackage, call-buildrnx]
10284
steps:
10385
- uses: actions/checkout@v3

.github/workflows/template-buildexample.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
working-directory: ${{ inputs.exampleName }}
4040

4141
- name: yarn windows
42-
run: yarn windows --no-launch --no-deploy --no-packager --logging ${{ inputs.useBuildCertificate && '--msbuildprops PackageCertificateKeyFile=${{github.workspace}}\GitHubActionsWorkflow.pfx' || '' }}
42+
run: npx @react-native-community/cli run-windows --no-launch --no-deploy --no-packager --logging ${{ inputs.useBuildCertificate && '--msbuildprops PackageCertificateKeyFile=${{github.workspace}}\GitHubActionsWorkflow.pfx' || '' }}
4343
working-directory: ${{ inputs.exampleName }}
4444

4545
- name: Remove the pfx

.github/workflows/template-testcli.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ on:
1515
required: false
1616
default: false
1717
type: boolean
18-
rnTemplate:
18+
rnVersion:
1919
required: false
20-
default: 'react-native@latest'
20+
default: 'latest'
2121
type: string
2222

2323
jobs:
@@ -37,10 +37,14 @@ jobs:
3737
run: yarn link
3838
working-directory: package
3939

40-
- name: create react-native@${{ inputs.rnwVersion }} app
41-
run: npx react-native init testrnx --template ${{ inputs.rnTemplate }}
40+
- name: create react-native@${{ inputs.rnVersion }} app
41+
run: npx @react-native-community/cli init testrnx --version ${{ inputs.rnVersion }} --skip-install --install-pods false --verbose --skip-git-init true
4242
working-directory: ../
4343

44+
- name: yarn install
45+
run: yarn install
46+
working-directory: ../testrnx
47+
4448
- name: add Windows (RNW via ${{ inputs.useRnwNuGet && 'NuGet' || 'Source' }})
4549
run: npx react-native-windows-init --overwrite ${{ inputs.useRnwNuGet && '--experimentalNuGetDependency true' || '' }}
4650
working-directory: ../testrnx
@@ -54,11 +58,11 @@ jobs:
5458
working-directory: ../testrnx
5559

5660
- name: autolink
57-
run: npx react-native autolink-windows --logging
61+
run: npx @react-native-community/cli autolink-windows --logging
5862
working-directory: ../testrnx
5963

6064
- name: build app
61-
run: npx react-native run-windows --no-launch --no-deploy --no-packager --logging
65+
run: npx @react-native-community/cli run-windows --no-launch --no-deploy --no-packager --logging
6266
working-directory: ../testrnx
6367

6468
- name: test app
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Bump to RNW 0.73.21",
4+
"packageName": "react-native-xaml",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

example/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
},
1111
"dependencies": {
1212
"react": "18.2.0",
13-
"react-native": "0.73.0",
14-
"react-native-windows": "0.73.4",
13+
"react-native": "0.73.11",
14+
"react-native-windows": "0.73.21",
1515
"react-native-xaml": "*"
1616
},
1717
"devDependencies": {
1818
"@babel/core": "^7.20.0",
1919
"@babel/preset-env": "^7.20.0",
2020
"@babel/runtime": "^7.20.0",
21-
"@react-native/babel-preset": "^0.73.18",
22-
"@react-native/eslint-config": "^0.73.1",
23-
"@react-native/metro-config": "^0.73.2",
21+
"@react-native/babel-preset": "^0.73.21",
22+
"@react-native/eslint-config": "^0.73.2",
23+
"@react-native/metro-config": "^0.73.5",
2424
"@react-native/typescript-config": "^0.73.1",
2525
"@types/react": "^18.2.6",
2626
"@types/react-test-renderer": "^18.0.0",

example/windows/ExperimentalFeatures.props

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
-->
3434
<UseExperimentalNuget>false</UseExperimentalNuget>
3535

36+
<!-- Necessary as sometimes RNW 0.73 doesn't run with the old `npx react-natve codegen-windows` -->
37+
<CodegenCommand>npx @react-native-community/cli codegen-windows</CodegenCommand>
38+
3639
<ReactExperimentalFeaturesSet>true</ReactExperimentalFeaturesSet>
3740

3841
</PropertyGroup>

example/windows/example/packages.lock.json

+22-19
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"native,Version=v0.0": {
55
"Microsoft.JavaScript.Hermes": {
66
"type": "Direct",
7-
"requested": "[0.1.18, )",
8-
"resolved": "0.1.18",
9-
"contentHash": "5K8rRihGwIs2XNOTP2Jsw3T6cegxCBQXcpPS4optONU/AmFElGAfnA6XBQJ4UqlCFCl9Nf9zQrgvCUPBWYHiag=="
7+
"requested": "[0.1.27, )",
8+
"resolved": "0.1.27",
9+
"contentHash": "o4YBxD3yVaDfB7ccauyIIcUL3Q+k2C7dv3F9ODkMzUIL/lZBe44BiB2qdw/jchBD3ByUaC/kK3Lm/SW59V1A/w=="
1010
},
1111
"Microsoft.UI.Xaml": {
1212
"type": "Direct",
@@ -25,8 +25,8 @@
2525
},
2626
"boost": {
2727
"type": "Transitive",
28-
"resolved": "1.76.0",
29-
"contentHash": "p+w3YvNdXL8Cu9Fzrmexssu0tZbWxuf6ywsQqHjDlKFE5ojXHof1HIyMC3zDLfLnh80dIeFcEUAuR2Asg/XHRA=="
28+
"resolved": "1.83.0",
29+
"contentHash": "cy53VNMzysEMvhBixDe8ujPk67Fcj3v6FPHQnH91NYJNLHpc6jxa2xq9ruCaaJjE4M3YrGSHDi4uUSTGBWw6EQ=="
3030
},
3131
"CDebug": {
3232
"type": "Transitive",
@@ -39,42 +39,45 @@
3939
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
4040
},
4141
"common": {
42-
"type": "Project"
42+
"type": "Project",
43+
"dependencies": {
44+
"boost": "[1.83.0, )"
45+
}
4346
},
4447
"fmt": {
4548
"type": "Project"
4649
},
4750
"folly": {
4851
"type": "Project",
4952
"dependencies": {
50-
"boost": "1.76.0",
51-
"fmt": "1.0.0"
53+
"boost": "[1.83.0, )",
54+
"fmt": "[1.0.0, )"
5255
}
5356
},
5457
"microsoft.reactnative": {
5558
"type": "Project",
5659
"dependencies": {
57-
"Common": "1.0.0",
58-
"Folly": "1.0.0",
59-
"Microsoft.JavaScript.Hermes": "0.1.18",
60-
"Microsoft.UI.Xaml": "2.8.0",
61-
"ReactCommon": "1.0.0",
62-
"boost": "1.76.0"
60+
"Common": "[1.0.0, )",
61+
"Folly": "[1.0.0, )",
62+
"Microsoft.JavaScript.Hermes": "[0.1.27, )",
63+
"Microsoft.UI.Xaml": "[2.8.0, )",
64+
"ReactCommon": "[1.0.0, )",
65+
"boost": "[1.83.0, )"
6366
}
6467
},
6568
"reactcommon": {
6669
"type": "Project",
6770
"dependencies": {
68-
"Folly": "1.0.0",
69-
"boost": "1.76.0"
71+
"Folly": "[1.0.0, )",
72+
"boost": "[1.83.0, )"
7073
}
7174
},
7275
"reactnativexaml": {
7376
"type": "Project",
7477
"dependencies": {
75-
"CDebug": "0.0.3",
76-
"Microsoft.ReactNative": "1.0.0",
77-
"Microsoft.UI.Xaml": "2.8.0"
78+
"CDebug": "[0.0.3, )",
79+
"Microsoft.ReactNative": "[1.0.0, )",
80+
"Microsoft.UI.Xaml": "[2.8.0, )"
7881
}
7982
}
8083
},

examplenuget/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
},
1111
"dependencies": {
1212
"react": "18.2.0",
13-
"react-native": "0.73.0",
14-
"react-native-windows": "0.73.4",
13+
"react-native": "0.73.11",
14+
"react-native-windows": "0.73.21",
1515
"react-native-xaml": "*"
1616
},
1717
"devDependencies": {
1818
"@babel/core": "^7.20.0",
1919
"@babel/preset-env": "^7.20.0",
2020
"@babel/runtime": "^7.20.0",
21-
"@react-native/babel-preset": "^0.73.18",
22-
"@react-native/eslint-config": "^0.73.1",
23-
"@react-native/metro-config": "^0.73.2",
21+
"@react-native/babel-preset": "^0.73.21",
22+
"@react-native/eslint-config": "^0.73.2",
23+
"@react-native/metro-config": "^0.73.5",
2424
"@react-native/typescript-config": "^0.73.1",
2525
"@types/react": "^18.2.6",
2626
"@types/react-test-renderer": "^18.0.0",

examplenuget/windows/ExperimentalFeatures.props

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
-->
3434
<UseExperimentalNuget>true</UseExperimentalNuget>
3535

36+
<!-- Necessary as sometimes RNW 0.73 doesn't run with the old `npx react-natve codegen-windows` -->
37+
<CodegenCommand>npx @react-native-community/cli codegen-windows</CodegenCommand>
38+
3639
<ReactExperimentalFeaturesSet>true</ReactExperimentalFeaturesSet>
3740

3841
</PropertyGroup>

0 commit comments

Comments
 (0)