Skip to content

Commit d06f46b

Browse files
committed
Merge branch 'main' into fix/rntester-tests
2 parents b445b28 + b7012ba commit d06f46b

192 files changed

Lines changed: 2065 additions & 1275 deletions

File tree

Some content is hidden

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

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ untyped-import
9898
untyped-type-import
9999

100100
[version]
101-
^0.289.0
101+
^0.290.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"eslint-plugin-relay": "^1.8.3",
8787
"fb-dotslash": "0.5.8",
8888
"flow-api-translator": "0.32.0",
89-
"flow-bin": "^0.289.0",
89+
"flow-bin": "^0.290.0",
9090
"glob": "^7.1.1",
9191
"hermes-eslint": "0.32.0",
9292
"hermes-transform": "0.32.0",

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,26 @@ export default class OpenDebuggerKeyboardHandler {
9494
const target = targets[0];
9595
void this.#tryOpenDebuggerForTarget(target);
9696
} else {
97-
this.#targetsShownForSelection = targets;
98-
9997
if (targets.length > 9) {
10098
this.#log(
10199
'warn',
102100
'10 or more debug targets available, showing the first 9.',
103101
);
104102
}
103+
const targetsShown = targets.slice(0, 9);
104+
const hasDuplicateTitles =
105+
new Set(targetsShown.map(target => target.title)).size <
106+
targetsShown.length;
107+
this.#targetsShownForSelection = targetsShown;
105108

106109
this.#setTerminalMenu(
107-
`Multiple debug targets available, please select:\n ${targets
108-
.slice(0, 9)
109-
.map(
110-
({title}, i) =>
111-
`${styleText(['white', 'inverse'], ` ${i + 1} `)} - "${title}"`,
112-
)
110+
`Multiple debug targets available, please select:\n ${targetsShown
111+
.map(({title, description}, i) => {
112+
const descriptionSuffix = hasDuplicateTitles
113+
? ` (${description})`
114+
: '';
115+
return `${styleText(['white', 'inverse'], ` ${i + 1} `)} - "${title}${descriptionSuffix}"`;
116+
})
113117
.join('\n ')}`,
114118
);
115119
}

packages/debugger-frontend/BUILD_INFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@generated SignedSource<<4bb67766e15e25a481c4c38873260a7a>>
2-
Git revision: 7aa57d13e50ce9d74a91c9315c9b0ded00fbc19f
1+
@generated SignedSource<<b62ff235444c99d1d66a64ceb11e3bad>>
2+
Git revision: d8824de5790a32c018ec9926a970daa7feb9a84c
33
Built with --nohooks: false
44
Is local checkout: false
55
Remote URL: https://github.com/facebook/react-native-devtools-frontend

packages/debugger-frontend/dist/third-party/front_end/core/host/host.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/debugger-frontend/dist/third-party/front_end/core/sdk/sdk.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/polyfills/console.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,11 @@ function consoleAssertPolyfill(expression, label) {
571571

572572
function stub() {}
573573

574+
// https://developer.chrome.com/docs/devtools/console/api#createtask
575+
function consoleCreateTaskStub() {
576+
return {run: cb => cb()};
577+
}
578+
574579
if (global.nativeLoggingHook) {
575580
const originalConsole = global.console;
576581
// Preserve the original `console` as `originalConsole`
@@ -587,6 +592,7 @@ if (global.nativeLoggingHook) {
587592
timeStamp: stub,
588593
count: stub,
589594
countReset: stub,
595+
createTask: consoleCreateTaskStub,
590596
...(originalConsole ?? {}),
591597
error: getNativeLogFunction(LOG_LEVELS.error),
592598
info: getNativeLogFunction(LOG_LEVELS.info),
@@ -705,6 +711,7 @@ if (global.nativeLoggingHook) {
705711
time: stub,
706712
timeEnd: stub,
707713
timeStamp: stub,
714+
createTask: consoleCreateTaskStub,
708715
};
709716

710717
Object.defineProperty(console, '_isPolyfilled', {

packages/react-native/Libraries/Animated/createAnimatedComponent.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export function unstable_createAnimatedComponentWithAllowlist<
125125
const [reducedProps, callbackRef] = useAnimatedProps<
126126
TProps,
127127
React.ElementRef<TInstance>,
128+
// $FlowFixMe[incompatible-type]
128129
>(props);
129130
const ref = useMergeRefs<React.ElementRef<TInstance>>(
130131
callbackRef,

packages/react-native/Libraries/Blob/RCTBlobManager.mm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ @implementation RCTBlobManager {
4242
dispatch_queue_t _processingQueue;
4343
}
4444

45-
+ (NSString *)moduleName
46-
{
47-
return @"BlobModule";
48-
}
45+
RCT_EXPORT_MODULE(BlobModule)
4946

5047
@synthesize bridge = _bridge;
5148
@synthesize moduleRegistry = _moduleRegistry;

packages/react-native/Libraries/Blob/RCTBlobPlugins.mm

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313

1414
#import "RCTBlobPlugins.h"
1515

16-
#import <string>
17-
#import <unordered_map>
18-
19-
Class RCTBlobClassProvider(const char *name) {
20-
// Intentionally leak to avoid crashing after static destructors are run.
21-
static const auto sCoreModuleClassMap = new const std::unordered_map<std::string, Class (*)(void)>{
22-
{"BlobModule", RCTBlobManagerCls},
23-
{"FileReaderModule", RCTFileReaderModuleCls},
24-
};
25-
26-
auto p = sCoreModuleClassMap->find(name);
27-
if (p != sCoreModuleClassMap->end()) {
28-
auto classFunc = p->second;
29-
return classFunc();
16+
#import <string_view>
17+
18+
using namespace std::literals;
19+
20+
Class RCTBlobClassProvider(const char *name)
21+
{
22+
23+
if (name == "BlobModule"sv) {
24+
return RCTBlobManagerCls();
3025
}
26+
27+
if (name == "FileReaderModule"sv) {
28+
return RCTFileReaderModuleCls();
29+
}
30+
3131
return nil;
3232
}
3333

0 commit comments

Comments
 (0)