Skip to content

Commit c7ab60d

Browse files
authored
Merge branch 'facebook:main' into dev-menu
2 parents d5dc2dd + 8f0713f commit c7ab60d

File tree

328 files changed

+3437
-1323
lines changed

Some content is hidden

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

328 files changed

+3437
-1323
lines changed

.flowconfig

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ module.system.haste.module_ref_prefix=m#
7575

7676
react.runtime=automatic
7777

78-
experimental.error_code_migration=new
78+
experimental.only_support_flow_fixme_and_expected_error=true
79+
experimental.require_suppression_with_error_code=true
80+
experimental.invariant_subtyping_error_message_improvement=true
81+
experimental.natural_inference.local_object_literals.followup_fix=true
7982

8083
ban_spread_key_props=true
8184

@@ -100,4 +103,4 @@ untyped-import
100103
untyped-type-import
101104

102105
[version]
103-
^0.279.0
106+
^0.280.0

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changelog
22

3+
## v0.81.1
4+
5+
### Added
6+
7+
8+
#### iOS specific
9+
10+
- **Prebuild:** Added setting SWIFT_ENABLE_EXPLICIT_MODULES=NO when using precompiled to support Xcode 26 ([939a75b5ce](https://github.com/facebook/react-native/commit/939a75b5ce2a580ece4a62689582ea81480c3e97) by [@chrfalch](https://github.com/chrfalch))
11+
12+
### Fixed
13+
14+
- **Infra:** Add missing Babel dependencies ([bf2c3af93b](https://github.com/facebook/react-native/commit/bf2c3af93b146943cb35866fa9badcd188e63f5b) by [@tido64](https://github.com/tido64))
15+
- **Accessibility:** fix `aria-label` on `TextInput` ([6965d57e75](https://github.com/facebook/react-native/commit/6965d57e75ed0cf9f265c6020d478ddb9af4bf10) by [@mdjastrzebski](https://github.com/mdjastrzebski))
16+
17+
18+
#### iOS specific
19+
20+
- **TextInput:** Setting maxLength to 0 in TextInput now correctly blocks typing ([c5956da8c0](https://github.com/facebook/react-native/commit/c5956da8c0b735d47761af51019ed25b49001c00) by [@riteshshukla04](https://github.com/riteshshukla04))
21+
- **Switch:** Fix Switch layout to work with iOS 26 ([ba51aeaa90](https://github.com/facebook/react-native/commit/ba51aeaa9040014e1d77c93158c96e9bf09940cf) by [@cipolleschi](https://github.com/cipolleschi))
22+
- **C++:** Fix import RuntimeExecutor.h with USE_FRAMEWORKS ([dacd8f26fd](https://github.com/facebook/react-native/commit/dacd8f26fda61b16b52a4953267f2108181c3282) by [@sharifhh](https://github.com/sharifhh))
23+
- **Infra:** Fix scripts for paths containing whitespaces ([94623ca8ec](https://github.com/facebook/react-native/commit/94623ca8ec969f09d8ec430e7633c3bf49a3d71e) by [@kitten](https://github.com/kitten))
24+
- **Prebuild:** Fixed how we copy and build the Symbols folder when precompiling ReactNativeDependencies ([a843119ff1](https://github.com/facebook/react-native/commit/a843119ff1f0e2dfb1d3884ccf255784e3cea1a7) by [@chrfalch](https://github.com/chrfalch))
25+
- **Prebuild:** Fixed wrong jsi symbols in use when using React.xcframework ([8a2e7efe01](https://github.com/facebook/react-native/commit/8a2e7efe010c49a293c146654094b1cb5d6e6acd) by [@chrfalch](https://github.com/chrfalch))
26+
- **Prebuild:** Fixed copying bundles correctly to xcframeworks when precompiling ReactNativeDependencies.xcframework ([e3adf47214](https://github.com/facebook/react-native/commit/e3adf4721467557f19e6cd7a65c4e2314796bc17) by [@chrfalch](https://github.com/chrfalch))
27+
- **Prebuild:** Aligned Symbols folder in React.xcframework symbols with ReactNativeDependencies.xcframework symbols. ([8c444f773a](https://github.com/facebook/react-native/commit/8c444f773a44e8554745c9cfc1451083c12b00e3) by [@chrfalch](https://github.com/chrfalch))
28+
- **Prebuild:** Fix "file exists" error in `ReactNativeDependencies.podspec` ([4c570b5d31](https://github.com/facebook/react-native/commit/4c570b5d31ef46e04e5fa26fa92d7f7090bf15e2) by [@vonovak](https://github.com/vonovak))
29+
- **Prebuild:** added explicit handling of ReactCodegen ([6526a98d68](https://github.com/facebook/react-native/commit/6526a98d68dbc8578ea15cbf117c0a216c6e9af0) by [@cipolleschi](https://github.com/cipolleschi))
30+
31+
332
## v0.81.0
433

534
### Breaking

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"eslint-plugin-redundant-undefined": "^0.4.0",
8383
"eslint-plugin-relay": "^1.8.3",
8484
"flow-api-translator": "0.32.0",
85-
"flow-bin": "^0.279.0",
85+
"flow-bin": "^0.280.0",
8686
"glob": "^7.1.1",
8787
"hermes-eslint": "0.32.0",
8888
"hermes-transform": "0.32.0",
@@ -91,7 +91,7 @@
9191
"jest": "^29.7.0",
9292
"jest-config": "^29.7.0",
9393
"jest-diff": "^29.7.0",
94-
"jest-junit": "^10.0.0",
94+
"jest-junit": "^16.0.0",
9595
"jest-snapshot": "^29.7.0",
9696
"markdownlint-cli2": "^0.17.2",
9797
"markdownlint-rule-relative-links": "^3.0.0",
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`prepareDebuggerShellFromDotSlashFile fails with the expected error message for a missing dotslash file 1`] = `
4+
Object {
5+
"code": "unexpected_error",
6+
"humanReadableMessage": "An unexpected error occured while installing the latest version of React Native DevTools. Using a fallback version instead.",
7+
"verboseInfo": Any<String>,
8+
}
9+
`;
10+
11+
exports[`prepareDebuggerShellFromDotSlashFile fails with the expected error message for missing platforms 1`] = `
12+
Object {
13+
"code": "platform_not_supported",
14+
"humanReadableMessage": "The latest version of React Native DevTools is not supported on this platform. Using a fallback version instead.",
15+
"verboseInfo": Any<String>,
16+
}
17+
`;
18+
19+
exports[`prepareDebuggerShellFromDotSlashFile scenarios requiring a local HTTP server fails with the expected error message for a corrupted tarball 1`] = `
20+
Object {
21+
"code": "possible_corruption",
22+
"humanReadableMessage": "Failed to verify the latest version of React Native DevTools. Using a fallback version instead. ",
23+
"verboseInfo": Any<String>,
24+
}
25+
`;
26+
27+
exports[`prepareDebuggerShellFromDotSlashFile scenarios requiring a local HTTP server fails with the expected error message for a network error 1`] = `
28+
Object {
29+
"code": "likely_offline",
30+
"humanReadableMessage": "Failed to download the latest version of React Native DevTools. Using a fallback version instead. Connect to the internet or check your network settings.",
31+
"verboseInfo": Any<String>,
32+
}
33+
`;
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env dotslash
2+
3+
{
4+
"name": "React Native DevTools",
5+
"platforms": {
6+
"linux-aarch64": {
7+
"size": 113510892,
8+
"hash": "sha256",
9+
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
10+
"providers": [
11+
{
12+
"type": "http",
13+
"url": "http://$HOST:$PORT/corrupted.tar.gz"
14+
}
15+
],
16+
"format": "tar.gz",
17+
"path": "React Native DevTools-linux-arm64/React Native DevTools"
18+
},
19+
"linux-x86_64": {
20+
"size": 113243910,
21+
"hash": "sha256",
22+
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
23+
"providers": [
24+
{
25+
"type": "http",
26+
"url": "http://$HOST:$PORT/corrupted.tar.gz"
27+
}
28+
],
29+
"format": "tar.gz",
30+
"path": "React Native DevTools-linux-x64/React Native DevTools"
31+
},
32+
"macos-aarch64": {
33+
"size": 108810433,
34+
"hash": "sha256",
35+
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
36+
"providers": [
37+
{
38+
"type": "http",
39+
"url": "http://$HOST:$PORT/corrupted.tar.gz"
40+
}
41+
],
42+
"format": "tar.gz",
43+
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
44+
},
45+
"macos-x86_64": {
46+
"size": 113769989,
47+
"hash": "sha256",
48+
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
49+
"providers": [
50+
{
51+
"type": "http",
52+
"url": "http://$HOST:$PORT/corrupted.tar.gz"
53+
}
54+
],
55+
"format": "tar.gz",
56+
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
57+
}
58+
}
59+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env dotslash
2+
3+
{
4+
"name": "React Native DevTools",
5+
"platforms": {
6+
"linux-aarch64": {
7+
"size": 113510892,
8+
"hash": "sha256",
9+
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
10+
"providers": [
11+
{
12+
"type": "http",
13+
"url": "https://$HOST:$PORT/does-not-exist"
14+
}
15+
],
16+
"format": "tar.gz",
17+
"path": "React Native DevTools-linux-arm64/React Native DevTools"
18+
},
19+
"linux-x86_64": {
20+
"size": 113243910,
21+
"hash": "sha256",
22+
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
23+
"providers": [
24+
{
25+
"type": "http",
26+
"url": "https://$HOST:$PORT/does-not-exist"
27+
}
28+
],
29+
"format": "tar.gz",
30+
"path": "React Native DevTools-linux-x64/React Native DevTools"
31+
},
32+
"macos-aarch64": {
33+
"size": 108810433,
34+
"hash": "sha256",
35+
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
36+
"providers": [
37+
{
38+
"type": "http",
39+
"url": "https://$HOST:$PORT/does-not-exist"
40+
}
41+
],
42+
"format": "tar.gz",
43+
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
44+
},
45+
"macos-x86_64": {
46+
"size": 113769989,
47+
"hash": "sha256",
48+
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
49+
"providers": [
50+
{
51+
"type": "http",
52+
"url": "https://$HOST:$PORT/does-not-exist"
53+
}
54+
],
55+
"format": "tar.gz",
56+
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
57+
}
58+
}
59+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env dotslash
2+
3+
{
4+
"name": "React Native DevTools",
5+
"platforms": {}
6+
}
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow strict-local
8+
* @format
9+
*/
10+
11+
const {
12+
prepareDebuggerShellFromDotSlashFile,
13+
} = require('../src/node/private/LaunchUtils');
14+
const fs = require('fs').promises;
15+
const http = require('http');
16+
const os = require('os');
17+
const path = require('path');
18+
19+
// The implementation of prepareDebuggerShellFromDotSlashFile relies on
20+
// details of DotSlash that are not guaranteed to be stable (support for
21+
// `dotslash -- fetch <file>`, certain strings being printed to stderr).
22+
// This (admittedly elaborate) test suite ensures we'll fail loudly if we
23+
// try to upgrade DotSlash to a version that breaks our assumptions.
24+
describe('prepareDebuggerShellFromDotSlashFile', () => {
25+
test('fails with the expected error message for missing platforms', async () => {
26+
const result = await prepareDebuggerShellFromDotSlashFile(
27+
path.join(__dirname, 'dotslash-file-with-missing-platforms.jsonc'),
28+
);
29+
expect(result).toMatchSnapshot({
30+
verboseInfo: expect.any(String),
31+
});
32+
});
33+
34+
test('fails with the expected error message for a missing dotslash file', async () => {
35+
const result = await prepareDebuggerShellFromDotSlashFile(
36+
path.join(__dirname, 'dotslash-file-that-does-not-exist.jsonc'),
37+
);
38+
expect(result).toMatchSnapshot({
39+
verboseInfo: expect.any(String),
40+
});
41+
});
42+
43+
describe('scenarios requiring a local HTTP server', () => {
44+
let server, scratchDir;
45+
46+
beforeEach(async () => {
47+
scratchDir = await fs.mkdtemp(path.join(os.tmpdir(), 'dotslash-test-'));
48+
server = http.createServer((request, response) => {
49+
if (request.url === '/corrupted.tar.gz') {
50+
response.writeHead(200, {'Content-Type': 'application/gzip'});
51+
response.end(
52+
'Hello, world!\n' + 'This simulated a corrupted tarball.',
53+
);
54+
} else {
55+
response.writeHead(404);
56+
response.end();
57+
}
58+
});
59+
await new Promise((resolve, reject) => {
60+
server.on('error', reject);
61+
server.listen(0, 'localhost', () => {
62+
server.removeListener('error', reject);
63+
resolve();
64+
});
65+
});
66+
});
67+
68+
afterEach(async () => {
69+
await fs.rm(scratchDir, {recursive: true, force: true});
70+
if (server.listening) {
71+
await new Promise((resolve, reject) => {
72+
server.close(error => {
73+
if (error) {
74+
reject(error);
75+
} else {
76+
resolve();
77+
}
78+
});
79+
});
80+
}
81+
});
82+
83+
test('fails with the expected error message for a corrupted tarball', async () => {
84+
const dotslashFileContents = injectHostPort(
85+
await fs.readFile(
86+
path.join(
87+
__dirname,
88+
'dotslash-file-simulating-data-corruption.jsonc',
89+
),
90+
'utf8',
91+
),
92+
server.address(),
93+
);
94+
95+
await fs.writeFile(
96+
path.join(scratchDir, 'dotslash-file.jsonc'),
97+
dotslashFileContents,
98+
);
99+
const result = await prepareDebuggerShellFromDotSlashFile(
100+
path.join(scratchDir, 'dotslash-file.jsonc'),
101+
);
102+
expect(result).toMatchSnapshot({
103+
verboseInfo: expect.any(String),
104+
});
105+
});
106+
107+
test('fails with the expected error message for a network error', async () => {
108+
const dotslashFileContents = injectHostPort(
109+
await fs.readFile(
110+
path.join(__dirname, 'dotslash-file-simulating-network-error.jsonc'),
111+
'utf8',
112+
),
113+
server.address(),
114+
);
115+
116+
await fs.writeFile(
117+
path.join(scratchDir, 'dotslash-file.jsonc'),
118+
dotslashFileContents,
119+
);
120+
const result = await prepareDebuggerShellFromDotSlashFile(
121+
path.join(scratchDir, 'dotslash-file.jsonc'),
122+
);
123+
expect(result).toMatchSnapshot({
124+
verboseInfo: expect.any(String),
125+
});
126+
});
127+
});
128+
});
129+
130+
function injectHostPort(
131+
dotslashFileContents: string,
132+
address: net$Socket$address,
133+
) {
134+
const host =
135+
address.family === 'IPv6' ? `[${address.address}]` : address.address;
136+
return dotslashFileContents
137+
.replaceAll('$HOST', host)
138+
.replaceAll('$PORT', address.port.toString());
139+
}

packages/debugger-shell/__tests__/electron-dependency-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('Electron dependency', () => {
2222
// $FlowFixMe[untyped-import] - package.json is not typed
2323
const ourPackageJson = require('../package.json');
2424

25-
const declaredElectronVersion = ourPackageJson.dependencies.electron;
25+
const declaredElectronVersion = ourPackageJson.devDependencies.electron;
2626
expect(declaredElectronVersion).toBeTruthy();
2727

2828
// $FlowFixMe[untyped-import] - package.json is not typed

0 commit comments

Comments
 (0)