Skip to content

Commit f615e11

Browse files
authored
Merge branch 'main' into wmaj/nanospinner
2 parents e79af65 + ddbba6c commit f615e11

31 files changed

Lines changed: 290 additions & 90 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Use Node.js 20
15+
- name: Use Node.js 22
1616
uses: actions/setup-node@v3
1717
with:
18-
node-version: 20
18+
node-version: 22
1919
cache: yarn
2020
- name: Install dependencies
2121
run: yarn --frozen-lockfile
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
strategy:
2929
matrix:
30-
node-version: [18, 20]
30+
node-version: [20, 22]
3131
steps:
3232
- uses: actions/checkout@v3
3333
- name: Use Node.js ${{ matrix.node-version }}
@@ -44,7 +44,7 @@ jobs:
4444
name: E2E Tests
4545
strategy:
4646
matrix:
47-
node-version: [18, 20]
47+
node-version: [20, 22]
4848
os: [ubuntu-latest, macos-latest]
4949
runs-on: ${{ matrix.os }}
5050
defaults:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Our release cycle is independent of `react-native`. We follow semver and here is
2323

2424
| `@react-native-community/cli` | `react-native` |
2525
| ------------------------------------------------------------------ | ------------------------- |
26-
| [^20.0.0](https://github.com/react-native-community/cli/tree/main) | ^0.81.0 |
26+
| [^20.0.0](https://github.com/react-native-community/cli/tree/main) | ^0.81.0, ^0.82.0 |
2727
| [^19.0.0](https://github.com/react-native-community/cli/tree/19.x) | ^0.80.0 |
2828
| [^18.0.0](https://github.com/react-native-community/cli/tree/18.x) | ^0.79.0 |
2929
| [^15.0.0](https://github.com/react-native-community/cli/tree/15.x) | ^0.76.0, ^0.77.0, ^0.78.0 |

__e2e__/__snapshots__/config.test.ts.snap

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,36 @@ exports[`shows up current config without unnecessary output 1`] = `
55
"root": "<<REPLACED_ROOT>>/TestProject",
66
"reactNativePath": "<<REPLACED_ROOT>>/TestProject/node_modules/react-native",
77
"reactNativeVersion": "<<REPLACED>>",
8-
"dependencies": {},
8+
"dependencies": {
9+
"react-native-safe-area-context": {
10+
"root": "<<REPLACED_ROOT>>/TestProject/node_modules/react-native-safe-area-context",
11+
"name": "react-native-safe-area-context",
12+
"platforms": {
13+
"ios": {
14+
"podspecPath": "<<REPLACED_ROOT>>/TestProject/node_modules/react-native-safe-area-context/react-native-safe-area-context.podspec",
15+
"version": "5.6.1",
16+
"configurations": [],
17+
"scriptPhases": []
18+
},
19+
"android": {
20+
"sourceDir": "<<REPLACED_ROOT>>/TestProject/node_modules/react-native-safe-area-context/android",
21+
"packageImportPath": "import com.th3rdwave.safeareacontext.SafeAreaContextPackage;",
22+
"packageInstance": "new SafeAreaContextPackage()",
23+
"buildTypes": [],
24+
"libraryName": "safeareacontext",
25+
"componentDescriptors": [
26+
"RNCSafeAreaProviderComponentDescriptor",
27+
"RNCSafeAreaViewComponentDescriptor"
28+
],
29+
"cmakeListsPath": "<<REPLACED_ROOT>>/TestProject/node_modules/react-native-safe-area-context/android/src/main/jni/CMakeLists.txt",
30+
"cxxModuleCMakeListsModuleName": null,
31+
"cxxModuleCMakeListsPath": null,
32+
"cxxModuleHeaderName": null,
33+
"isPureCxxDependency": false
34+
}
35+
}
36+
}
37+
},
938
"commands": [
1039
{
1140
"name": "bundle",

__e2e__/config.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ test('should fail if using require() in ES module in react-native.config.mjs', (
199199
'test-command-esm',
200200
]);
201201
expect(stderr).toMatch('error Failed to load configuration of your project');
202-
expect(stdout).toMatch(
203-
'ReferenceError: require is not defined in ES module scope, you can use import instead',
204-
);
202+
expect(stdout).toMatch(/Cannot require\(\) ES Module/);
205203
});
206204

207205
test('should fail if using require() in ES module with "type": "module" in package.json', () => {

docs/init.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
There are couple of ways to initialize new React Native projects.
44

55
```sh
6-
npx react-native@latest init ProjectName
6+
npx react-native-community/cli@latest init ProjectName
77
```
88

99
> Note: If you have both `yarn` and `npm` installed on your machine, React Native CLI will always try to use `npm`. You can force usage of `yarn` by adding `--pm yarn` flag to the command.
@@ -20,10 +20,10 @@ yarn init && yarn add react-native && yarn react-native init ProjectName
2020

2121
```sh
2222
# This will use the latest init command but will install react-native@VERSION and use its template
23-
npx react-native@latest init ProjectName --version ${VERSION}
23+
npx react-native-community/cli@latest init ProjectName --version ${VERSION}
2424

25-
# This will use init command from react-native@VERSION
26-
npx react-native@${VERSION} init ProjectName
25+
# This will use init command from react-native@VERSION through react-native-community/cli@${VERSION} (e.g. X.XX.X) automatically
26+
npx react-native-community/cli@${VERSION} init ProjectName
2727
```
2828

2929
## Initializing project with custom template
@@ -43,16 +43,16 @@ For all available options, please check [Yarn documentation](https://classic.yar
4343

4444
```sh
4545
# This will initialize new project using template from `react-native-template-typescript` package
46-
npx react-native@latest init ProjectName --template ${TEMPLATE_NAME}
46+
npx react-native-community/cli@latest init ProjectName --template ${TEMPLATE_NAME}
4747

4848
# This will initialize new project using init command from react-native@VERSION but will use a custom template
49-
npx react-native@${VERSION} init ProjectName --template ${TEMPLATE_NAME}
49+
npx react-native-community/cli@${VERSION} init ProjectName --template ${TEMPLATE_NAME}
5050
```
5151

5252
You can force usage of `yarn` if you have both `yarn` and `npm` installed on your machine:
5353

5454
```sh
55-
npx react-native@latest init ProjectName --pm yarn
55+
npx react-native-community/cli@latest init ProjectName --pm yarn
5656
```
5757

5858
## Creating custom template

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "20.0.0",
2+
"version": "20.0.2",
33
"npmClient": "yarn",
44
"exact": true,
55
"$schema": "node_modules/lerna/schemas/lerna-schema.json"

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@react-native-community/eslint-config": "^3.2.0",
3131
"@types/glob": "^7.1.1",
3232
"@types/jest": "^26.0.15",
33-
"@types/node": "^18.0.0",
33+
"@types/node": "^20.0.0",
3434
"babel-jest": "^26.6.2",
3535
"babel-plugin-module-resolver": "^3.2.0",
3636
"chalk": "^4.1.2",
@@ -55,9 +55,6 @@
5555
"string-length": "^2.0.0",
5656
"typescript": "^5.2.0"
5757
},
58-
"resolutions": {
59-
"@types/node": "^18.0.0"
60-
},
6158
"lint-staged": {
6259
"./packages/**/*.ts": [
6360
"yarn lint"

packages/cli-clean/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "@react-native-community/cli-clean",
3-
"version": "20.0.0",
3+
"version": "20.0.2",
44
"license": "MIT",
55
"main": "build/index.js",
66
"publishConfig": {
77
"access": "public"
88
},
99
"types": "build/index.d.ts",
1010
"dependencies": {
11-
"@react-native-community/cli-tools": "20.0.0",
11+
"@react-native-community/cli-tools": "20.0.2",
1212
"chalk": "^4.1.2",
1313
"execa": "^5.0.0",
1414
"fast-glob": "^3.3.2"
@@ -19,7 +19,7 @@
1919
"!*.map"
2020
],
2121
"devDependencies": {
22-
"@react-native-community/cli-types": "20.0.0",
22+
"@react-native-community/cli-types": "20.0.2",
2323
"@types/prompts": "^2.4.4"
2424
},
2525
"homepage": "https://github.com/react-native-community/cli/tree/main/packages/cli-clean",

packages/cli-config-android/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@react-native-community/cli-config-android",
3-
"version": "20.0.0",
3+
"version": "20.0.2",
44
"license": "MIT",
55
"main": "build/index.js",
66
"publishConfig": {
77
"access": "public"
88
},
99
"dependencies": {
10-
"@react-native-community/cli-tools": "20.0.0",
10+
"@react-native-community/cli-tools": "20.0.2",
1111
"chalk": "^4.1.2",
1212
"fast-glob": "^3.3.2",
1313
"fast-xml-parser": "^4.4.1"
@@ -19,7 +19,7 @@
1919
"native_modules.gradle"
2020
],
2121
"devDependencies": {
22-
"@react-native-community/cli-types": "20.0.0"
22+
"@react-native-community/cli-types": "20.0.2"
2323
},
2424
"homepage": "https://github.com/react-native-community/cli/tree/main/packages/cli-config-android",
2525
"repository": {

packages/cli-config-apple/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"name": "@react-native-community/cli-config-apple",
3-
"version": "20.0.0",
3+
"version": "20.0.2",
44
"license": "MIT",
55
"main": "build/index.js",
66
"publishConfig": {
77
"access": "public"
88
},
99
"dependencies": {
10-
"@react-native-community/cli-tools": "20.0.0",
10+
"@react-native-community/cli-tools": "20.0.2",
1111
"chalk": "^4.1.2",
1212
"execa": "^5.0.0",
1313
"fast-glob": "^3.3.2"
1414
},
1515
"devDependencies": {
16-
"@react-native-community/cli-types": "20.0.0",
16+
"@react-native-community/cli-types": "20.0.2",
1717
"nanospinner": "^1.0.0"
1818
},
1919
"files": [

0 commit comments

Comments
 (0)