Skip to content

Commit a665789

Browse files
authored
Merge branch 'main' into main
2 parents f7c5a3c + 8492fde commit a665789

34 files changed

Lines changed: 132 additions & 113 deletions

File tree

__e2e__/__snapshots__/config.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`shows up current config without unnecessary output 1`] = `
44
{
55
"root": "<<REPLACED_ROOT>>/TestProject",
66
"reactNativePath": "<<REPLACED_ROOT>>/TestProject/node_modules/react-native",
7-
"reactNativeVersion": "0.78",
7+
"reactNativeVersion": "<<REPLACED>>",
88
"dependencies": {},
99
"commands": [
1010
{

__e2e__/config.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ test('shows up current config without unnecessary output', () => {
7070
options: command.options && ['<<REPLACED>>'],
7171
}));
7272

73+
expect(parsedStdout.reactNativeVersion).toMatch(/^\d+\.\d+(\.\d+)?$/);
74+
parsedStdout.reactNativeVersion = '<<REPLACED>>';
75+
7376
const expectedXcodeProject =
7477
process.platform === 'darwin'
7578
? {

docs/dependencies.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ type AndroidDependencyParams = {
5656
packageInstance?: string;
5757
buildTypes?: string[];
5858
libraryName?: string | null;
59-
componentDescriptors?: string[] | null;
6059
cmakeListsPath?: string | null;
6160
cxxModuleCMakeListsModuleName?: string | null;
6261
cxxModuleCMakeListsPath?: string | null;
@@ -134,9 +133,9 @@ A string indicating your custom library name. By default it's taken from the `li
134133

135134
#### platforms.android.componentDescriptors
136135

137-
> Note: Only applicable when new architecture is turned on.
136+
> Note: This field is deprecated and providing a value to it will have no effect.
138137
139-
An array of custom component descriptor strings. By default they're generated based on `codegenNativeComponent` calls.
138+
Historically used to provide an array of custom component descriptor to register with the Interop Layer. [Since 0.74](https://github.com/reactwg/react-native-new-architecture/discussions/175) this field is ignored as the interop layer are automatic.
140139

141140
#### platforms.android.cmakeListsPath
142141

lerna.json

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@
6262
"./packages/**/*.ts": [
6363
"yarn lint"
6464
]
65-
}
65+
},
66+
"packageManager": "yarn@1.22.22"
6667
}

packages/cli-clean/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "@react-native-community/cli-clean",
3-
"version": "19.0.0-alpha.0",
3+
"version": "19.0.0",
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": "19.0.0-alpha.0",
11+
"@react-native-community/cli-tools": "19.0.0",
12+
"chalk": "^4.1.2",
1213
"execa": "^5.0.0",
1314
"fast-glob": "^3.3.2",
1415
"picocolors": "^1.1.1"
@@ -19,7 +20,7 @@
1920
"!*.map"
2021
],
2122
"devDependencies": {
22-
"@react-native-community/cli-types": "19.0.0-alpha.0",
23+
"@react-native-community/cli-types": "19.0.0",
2324
"@types/prompts": "^2.4.4"
2425
},
2526
"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": "19.0.0-alpha.0",
3+
"version": "19.0.0",
44
"license": "MIT",
55
"main": "build/index.js",
66
"publishConfig": {
77
"access": "public"
88
},
99
"dependencies": {
10-
"@react-native-community/cli-tools": "19.0.0-alpha.0",
10+
"@react-native-community/cli-tools": "19.0.0",
1111
"fast-glob": "^3.3.2",
1212
"fast-xml-parser": "^4.4.1",
1313
"picocolors": "^1.1.1"
@@ -19,7 +19,7 @@
1919
"native_modules.gradle"
2020
],
2121
"devDependencies": {
22-
"@react-native-community/cli-types": "19.0.0-alpha.0"
22+
"@react-native-community/cli-types": "19.0.0"
2323
},
2424
"homepage": "https://github.com/react-native-community/cli/tree/main/packages/cli-config-android",
2525
"repository": {

packages/cli-config-android/src/config/__fixtures__/android.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,19 @@ function generateValidFileStructureForApp() {
7171
};
7272
}
7373

74+
function generateValidFileStructureForAppWithCustomAppName(
75+
customAppName: string,
76+
) {
77+
return {
78+
'build.gradle': buildGradle,
79+
[customAppName]: {
80+
'build.gradle': appBuildGradle,
81+
},
82+
src: {
83+
'AndroidManifest.xml': manifest,
84+
},
85+
};
86+
}
7487
export const valid = generateValidFileStructureForLib('ReactPackage.java');
7588

7689
export const validKotlin = generateValidFileStructureForLib('ReactPackage.kt');
@@ -83,6 +96,9 @@ export const validKotlinWithDifferentFileName =
8396

8497
export const validApp = generateValidFileStructureForApp();
8598

99+
export const validAppWithCustomAppName =
100+
generateValidFileStructureForAppWithCustomAppName('custom');
101+
86102
export const userConfigManifest = {
87103
src: {
88104
main: {

packages/cli-config-android/src/config/__tests__/__snapshots__/getProjectConfig.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`android::getProjectConfig returns an object with android project configuration for flat structure 1`] = `
44
Object {
55
"appName": "",
6-
"applicationId": "com.some.example",
6+
"applicationId": "com.example",
77
"assets": Array [],
88
"dependencyConfiguration": undefined,
99
"mainActivity": ".MainActivity",

packages/cli-config-android/src/config/__tests__/findBuildGradle.test.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,26 @@ describe('findBuildGradle for apps', () => {
2121
flat: {
2222
android: mocks.validApp,
2323
},
24+
customPath: {
25+
android: mocks.validAppWithCustomAppName,
26+
},
2427
});
2528
});
2629

2730
it('returns the app gradle path if file exists in the folder', () => {
28-
expect(findBuildGradle('/flat/android', false)).toBe(
31+
expect(findBuildGradle('/flat/android', 'app')).toBe(
2932
'/flat/android/app/build.gradle',
3033
);
3134
});
3235

3336
it('returns `null` if there is no gradle in the app folder', () => {
34-
expect(findBuildGradle('/empty', false)).toBeNull();
37+
expect(findBuildGradle('/empty', 'app')).toBeNull();
38+
});
39+
40+
it('returns the app build.gradle with custom app name', () => {
41+
expect(findBuildGradle('/customPath/android', 'custom')).toBe(
42+
'/customPath/android/custom/build.gradle',
43+
);
3544
});
3645
});
3746

@@ -46,12 +55,12 @@ describe('findBuildGradle for libraries', () => {
4655
});
4756

4857
it('returns the app gradle path if file exists in the folder', () => {
49-
expect(findBuildGradle('/flat/android', true)).toBe(
58+
expect(findBuildGradle('/flat/android', '')).toBe(
5059
'/flat/android/build.gradle',
5160
);
5261
});
5362

5463
it('returns `null` if there is no gradle in the app folder', () => {
55-
expect(findBuildGradle('/empty', true)).toBeNull();
64+
expect(findBuildGradle('/empty', '')).toBeNull();
5665
});
5766
});

0 commit comments

Comments
 (0)