Skip to content

Commit ea922ec

Browse files
committed
Merge commit '166ea3166cbb6ab665accbdc18147d8f5ed4be46' into 0.78.1-merge
2 parents ce45e31 + 166ea31 commit ea922ec

File tree

93 files changed

+1109
-650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1109
-650
lines changed

.github/actions/build-android/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ runs:
2020
- name: Set React Native Version
2121
shell: bash
2222
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
23-
# We don't want to re-set the artifacts version if we're on the release branch.
24-
if: ${{ !contains(github.ref, '-stable') }}
2523
- name: Setup gradle
2624
uses: ./.github/actions/setup-gradle
2725
with:

.github/workflow-scripts/publishTemplate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ module.exports.verifyPublishedTemplate = async (
8686
return;
8787
}
8888
log(
89-
`🐌 ${TEMPLATE_NPM_PKG}@latest → ${pkg.version} on npm and not ${version} as expected, retrying...`,
89+
`🐌 ${TEMPLATE_NPM_PKG}@latest → ${json.version} on npm and not ${version} as expected, retrying...`,
9090
);
9191
} catch (e) {
9292
log(`Nope, fetch failed: ${e.message}`);

.github/workflows/test-all.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
158158

159159
test_ios_rntester:
160-
runs-on: macos-13
160+
runs-on: macos-13-large
161161
needs:
162162
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
163163
env:
@@ -369,6 +369,11 @@ jobs:
369369
sed -i 's/newArchEnabled=true/newArchEnabled=false/' android/gradle.properties
370370
fi
371371
372+
if [[ ${{matrix.jsengine}} == "JSC" ]]; then
373+
echo "Using JSC instead of Hermes"
374+
sed -i 's/hermesEnabled=true/hermesEnabled=false/' android/gradle.properties
375+
fi
376+
372377
# Build
373378
cd android
374379
CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}')

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"@definitelytyped/dtslint": "^0.0.127",
5555
"@jest/create-cache-key-function": "^29.6.3",
5656
"@nx/js": "~20.0.0",
57-
"@react-native/metro-babel-transformer": "0.77.0-main",
58-
"@react-native/metro-config": "0.77.0-main",
57+
"@react-native/metro-babel-transformer": "0.78.1",
58+
"@react-native/metro-config": "0.78.1",
5959
"@tsconfig/node18": "1.0.1",
6060
"@types/react": "^19.0.0",
6161
"@typescript-eslint/parser": "^7.1.1",

packages/assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native/assets-registry",
3-
"version": "0.77.0-main",
3+
"version": "0.78.1",
44
"description": "Asset support code for React Native.",
55
"license": "MIT",
66
"repository": {

packages/babel-plugin-codegen/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native/babel-plugin-codegen",
3-
"version": "0.77.0-main",
3+
"version": "0.78.1",
44
"description": "Babel plugin to generate native module and view manager code for React Native.",
55
"license": "MIT",
66
"repository": {
@@ -26,7 +26,7 @@
2626
],
2727
"dependencies": {
2828
"@babel/traverse": "^7.25.3",
29-
"@react-native/codegen": "0.77.0-main"
29+
"@react-native/codegen": "0.78.1"
3030
},
3131
"devDependencies": {
3232
"@babel/core": "^7.25.2"

packages/community-cli-plugin/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Start the React Native development server.
1515
#### Usage
1616

1717
```sh
18-
npx react-native start [options]
18+
npx @react-native-community/cli start [options]
1919
```
2020

2121
#### Options
@@ -37,6 +37,7 @@ npx react-native start [options]
3737
| `--cert <path>` | Specify path to a custom SSL cert. |
3838
| `--config <string>` | Path to the CLI configuration file. |
3939
| `--no-interactive` | Disable interactive mode. |
40+
| `--client-logs` | **[Deprecated]** Enable plain text JavaScript log streaming for all connected apps. |
4041

4142
### `bundle`
4243

@@ -45,7 +46,7 @@ Build the bundle for the provided JavaScript entry file.
4546
#### Usage
4647

4748
```sh
48-
npx react-native bundle --entry-file <path> [options]
49+
npx @react-native-community/cli bundle --entry-file <path> [options]
4950
```
5051

5152
#### Options

packages/community-cli-plugin/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native/community-cli-plugin",
3-
"version": "0.77.0-main",
3+
"version": "0.78.1",
44
"description": "Core CLI commands for React Native",
55
"keywords": [
66
"react-native",
@@ -22,8 +22,8 @@
2222
"dist"
2323
],
2424
"dependencies": {
25-
"@react-native/dev-middleware": "0.77.0-main",
26-
"@react-native/metro-babel-transformer": "0.77.0-main",
25+
"@react-native/dev-middleware": "0.78.1",
26+
"@react-native/metro-babel-transformer": "0.78.1",
2727
"chalk": "^4.0.0",
2828
"debug": "^2.2.0",
2929
"invariant": "^2.2.4",
@@ -37,10 +37,10 @@
3737
"metro-resolver": "^0.81.0"
3838
},
3939
"peerDependencies": {
40-
"@react-native-community/cli-server-api": "*"
40+
"@react-native-community/cli": "*"
4141
},
4242
"peerDependenciesMeta": {
43-
"@react-native-community/cli-server-api": {
43+
"@react-native-community/cli": {
4444
"optional": true
4545
}
4646
},

packages/community-cli-plugin/src/commands/start/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ const startCommand: Command = {
9595
name: '--no-interactive',
9696
description: 'Disables interactive mode',
9797
},
98+
{
99+
name: '--client-logs',
100+
description:
101+
'[Deprecated] Enable plain text JavaScript log streaming for all ' +
102+
'connected apps. This feature is deprecated and will be removed in ' +
103+
'future.',
104+
default: false,
105+
},
98106
],
99107
};
100108

packages/community-cli-plugin/src/commands/start/middleware.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
* @oncall react_native
1010
*/
1111

12-
import type {NextHandleFunction, Server} from 'connect';
12+
import typeof * as CLIServerAPI from '@react-native-community/cli-server-api';
13+
import type {Server} from 'connect';
1314
import type {TerminalReportableEvent} from 'metro/src/lib/TerminalReporter';
1415

1516
const debug = require('debug')('ReactNative:CommunityCliPlugin');
@@ -30,10 +31,6 @@ type MiddlewareReturn = {
3031
...
3132
};
3233

33-
const noopNextHandle: NextHandleFunction = (req, res, next) => {
34-
next();
35-
};
36-
3734
// $FlowFixMe
3835
const unusedStubWSServer: ws$WebSocketServer = {};
3936
// $FlowFixMe
@@ -45,6 +42,12 @@ const communityMiddlewareFallback = {
4542
port: number,
4643
watchFolders: $ReadOnlyArray<string>,
4744
}): MiddlewareReturn => ({
45+
// FIXME: Several features will break without community middleware and
46+
// should be migrated into core.
47+
// e.g. used by Libraries/Core/Devtools:
48+
// - /open-stack-frame
49+
// - /open-url
50+
// - /symbolicate
4851
middleware: unusedMiddlewareStub,
4952
websocketEndpoints: {},
5053
messageSocketEndpoint: {
@@ -59,23 +62,34 @@ const communityMiddlewareFallback = {
5962
reportEvent: (event: TerminalReportableEvent) => {},
6063
},
6164
}),
62-
indexPageMiddleware: noopNextHandle,
6365
};
6466

6567
// Attempt to use the community middleware if it exists, but fallback to
6668
// the stubs if it doesn't.
6769
try {
68-
const community = require('@react-native-community/cli-server-api');
69-
communityMiddlewareFallback.indexPageMiddleware =
70-
community.indexPageMiddleware;
70+
// `@react-native-community/cli` is an optional peer dependency of this
71+
// package, and should be a dev dependency of the host project (via the
72+
// community template's package.json).
73+
const communityCliPath = require.resolve('@react-native-community/cli');
74+
75+
// `@react-native-community/cli-server-api` is a dependency of
76+
// `@react-native-community/cli`, but is not re-exported by it, so we need
77+
// to resolve the former through the latter.
78+
const communityCliServerApiPath = require.resolve(
79+
'@react-native-community/cli-server-api',
80+
{paths: [communityCliPath]},
81+
);
82+
// $FlowIgnore[unsupported-syntax] dynamic import
83+
const communityCliServerApi: CLIServerAPI = require(
84+
communityCliServerApiPath,
85+
);
86+
// $FlowIgnore[unsupported-syntax] dynamic import
7187
communityMiddlewareFallback.createDevServerMiddleware =
72-
community.createDevServerMiddleware;
88+
communityCliServerApi.createDevServerMiddleware;
7389
} catch {
7490
debug(`⚠️ Unable to find @react-native-community/cli-server-api
7591
Starting the server without the community middleware.`);
7692
}
7793

7894
export const createDevServerMiddleware =
7995
communityMiddlewareFallback.createDevServerMiddleware;
80-
export const indexPageMiddleware =
81-
communityMiddlewareFallback.indexPageMiddleware;

0 commit comments

Comments
 (0)