Skip to content

Commit cf111b5

Browse files
committed
feat: regenerate snapshots
1 parent bcbee66 commit cf111b5

7 files changed

Lines changed: 95 additions & 7 deletions

File tree

packages/react-native-codegen/src/generators/modules/__test_fixtures__/fixtures.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,6 +2678,7 @@ const ARRAY_BUFFER_NATIVE_MODULE: SchemaType = {
26782678
],
26792679
},
26802680
moduleName: 'SampleTurboModule',
2681+
excludedPlatforms: ['iOS', 'android'],
26812682
},
26822683
},
26832684
};

packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleHObjCpp-test.js.snap

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,47 @@ namespace facebook::react {
6565
}
6666
`;
6767
68+
exports[`GenerateModuleHObjCpp can generate fixture array_buffer_native_module 1`] = `
69+
Map {
70+
"array_buffer_native_module.h" => "/**
71+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
72+
*
73+
* Do not edit this file as changes may cause incorrect behavior and will be lost
74+
* once the code is regenerated.
75+
*
76+
* @generated by codegen project: GenerateModuleObjCpp
77+
*
78+
* We create an umbrella header (and corresponding implementation) here since
79+
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
80+
* must have a single output. More files => more genrule()s => slower builds.
81+
*/
82+
83+
#ifndef __cplusplus
84+
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
85+
#endif
86+
87+
// Avoid multiple includes of array_buffer_native_module symbols
88+
#ifndef array_buffer_native_module_H
89+
#define array_buffer_native_module_H
90+
91+
#import <Foundation/Foundation.h>
92+
#import <RCTRequired/RCTRequired.h>
93+
#import <RCTTypeSafety/RCTConvertHelpers.h>
94+
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
95+
#import <React/RCTBridgeModule.h>
96+
#import <React/RCTCxxConvert.h>
97+
#import <React/RCTManagedPointer.h>
98+
#import <ReactCommon/RCTTurboModule.h>
99+
#import <optional>
100+
#import <vector>
101+
102+
103+
104+
#endif // array_buffer_native_module_H
105+
",
106+
}
107+
`;
108+
68109
exports[`GenerateModuleHObjCpp can generate fixture complex_objects 1`] = `
69110
Map {
70111
"complex_objects.h" => "/**

packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJavaSpec-test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public abstract class NativeSampleTurboModuleSpec extends ReactContextBaseJavaMo
4141
}
4242
`;
4343
44+
exports[`GenerateModuleJavaSpec can generate fixture array_buffer_native_module 1`] = `Map {}`;
45+
4446
exports[`GenerateModuleJavaSpec can generate fixture complex_objects 1`] = `
4547
Map {
4648
"java/com/facebook/fbreact/specs/NativeSampleTurboModuleSpec.java" => "

packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniCpp-test.js.snap

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,34 @@ std::shared_ptr<TurboModule> SampleWithUppercaseName_ModuleProvider(const std::s
3535
}
3636
`;
3737
38+
exports[`GenerateModuleJniCpp can generate fixture array_buffer_native_module 1`] = `
39+
Map {
40+
"jni/array_buffer_native_module-generated.cpp" => "
41+
/**
42+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
43+
*
44+
* Do not edit this file as changes may cause incorrect behavior and will be lost
45+
* once the code is regenerated.
46+
*
47+
* @generated by codegen project: GenerateModuleJniCpp.js
48+
*/
49+
50+
#include \\"array_buffer_native_module.h\\"
51+
52+
namespace facebook::react {
53+
54+
55+
56+
std::shared_ptr<TurboModule> array_buffer_native_module_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
57+
58+
return nullptr;
59+
}
60+
61+
} // namespace facebook::react
62+
",
63+
}
64+
`;
65+
3866
exports[`GenerateModuleJniCpp can generate fixture complex_objects 1`] = `
3967
Map {
4068
"jni/complex_objects-generated.cpp" => "

packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,6 @@ Map {
8686
8787
namespace facebook::react {
8888
89-
/**
90-
* JNI C++ class for module 'NativeSampleTurboModule'
91-
*/
92-
class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public JavaTurboModule {
93-
public:
94-
NativeSampleTurboModuleSpecJSI(const JavaTurboModule::InitParams &params);
95-
};
9689
9790
9891
JSI_EXPORT

packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleMm-test.js.snap

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,28 @@ namespace facebook::react {
4040
}
4141
`;
4242
43+
exports[`GenerateModuleMm can generate fixture array_buffer_native_module 1`] = `
44+
Map {
45+
"array_buffer_native_module-generated.mm" => "/**
46+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
47+
*
48+
* Do not edit this file as changes may cause incorrect behavior and will be lost
49+
* once the code is regenerated.
50+
*
51+
* @generated by codegen project: GenerateModuleObjCpp
52+
*
53+
* We create an umbrella header (and corresponding implementation) here since
54+
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
55+
* must have a single output. More files => more genrule()s => slower builds.
56+
*/
57+
58+
#import \\"array_buffer_native_module.h\\"
59+
60+
61+
",
62+
}
63+
`;
64+
4365
exports[`GenerateModuleMm can generate fixture complex_objects 1`] = `
4466
Map {
4567
"complex_objects-generated.mm" => "/**

packages/react-native-compatibility-check/src/__tests__/__snapshots__/ErrorFormatting-test.js.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ Object {
271271
"errorCode": "addedProps",
272272
"message": "NativeModuleTest: Object added required properties, which native will not provide
273273
-- afterMismatchGeneric
274+
-- arrayBufferType
274275
-- booleanType
275276
-- exampleFunction
276277
-- simpleArray

0 commit comments

Comments
 (0)