Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3b8459d
xplat RN: fix flow for useSyncExternalStore
Mar 17, 2023
342c0be
docs: Fix a few typos (#36372)
timgates42 Mar 17, 2023
a389373
Enable JVM Unit Tests for Gradle
cortinico Mar 17, 2023
5cbabe3
Use the default `build` task rather than `buildAll`
cortinico Mar 17, 2023
d904164
Make robolectric tests run in offline mode (#36510)
cortinico Mar 17, 2023
b0c30ad
Fix test_buck by using RuntimeEnvironment.application (#36515)
cortinico Mar 17, 2023
790df10
Fix check of "reduce motion" setting on android (#36508)
baranga Mar 17, 2023
346de2d
Compile the GTest suite with CMake (#36477)
cortinico Mar 17, 2023
bfee3d9
Ensure trailing leave/out events are fired after a cancel event
vincentriemer Mar 17, 2023
728e8a0
Ensure that pointercancel events have a zeroed location
vincentriemer Mar 17, 2023
cd048d4
Deploy 0.202.0 to xplat
evanyeung Mar 17, 2023
ccaa3a6
translation auto-update for i18n/instagram-sandbox.config.json on master
Mar 18, 2023
c19b167
translation auto-update for i18n/twilight.config.json on master
Mar 18, 2023
d4a0f60
translation auto-update for i18n/fb4a.config.json on master
Mar 18, 2023
3116bfd
translation auto-update for i18n/adsmanager.config.json on master
Mar 18, 2023
4a05f68
translation auto-update for i18n/anna.config.json on master
Mar 18, 2023
e5b97f0
Don't register Babel in Jest preprocessor (#36522)
robhogan Mar 18, 2023
0ae5e50
Support mixed props for components
genkikondo Mar 19, 2023
9678900
Fix reference to old `template/package.json` path
robhogan Mar 20, 2023
b9c64f3
Bulk detect/correct (most of the) typos and misspells in RN core code
rshest Mar 20, 2023
0eff8d6
Support PNPM and workspace setups with pod install (#36485)
robhogan Mar 20, 2023
0c5c07f
fix: add missing lineBreakStrategyIOS types for Text, TextInput (#36526)
jeongshin Mar 20, 2023
a0fa3c7
Move Jest preprocessor up to workspace root, remove public metro-reac…
robhogan Mar 20, 2023
4ad5fe3
Define types for missing methods in nativeFabricUIManager
rubennorte Mar 20, 2023
e4d83a1
Implement basic version of HTMLCollection
rubennorte Mar 20, 2023
c4b84ba
Implement basic version of NodeList
rubennorte Mar 20, 2023
a8b5ff8
Implement basic version of DOMRectList
rubennorte Mar 20, 2023
cd65a32
Add skeletons for ReadOnlyNode, ReadOnlyElement and ReactNativeElement
rubennorte Mar 20, 2023
65e61f3
Enable Address and Undefined Behavior Sanitizers (#36443)
Saadnajmi Mar 20, 2023
dacb159
RN: add @react-native/tester as a workspace to xplat/js/public (#36531)
hoxyq Mar 20, 2023
9d18b4e
refactor: move README.md in prepack, instead of having two copies (#3…
hoxyq Mar 20, 2023
c35675b
fix[align-package-version]: fixed updating application dependencies f…
hoxyq Mar 20, 2023
c9db994
fix: added missing `InheritParentConfig: true` to .clang-tidy configs…
hoxyq Mar 20, 2023
4b6b706
Update paths in a new setup to fix nightlies (#36535)
hoxyq Mar 20, 2023
2f25261
Merge TS & Flow parsers' logic for `Partial` case to `emitPartial` fn…
Pranav-yadav Mar 20, 2023
221aacd
Move getCommandOptions and getOptions to parsers commons (#36413)
tarunrajput Mar 20, 2023
4e27e46
Merge commit '221aacd72d110f576c03773eeaef52b8e2bd5aeb' into 0.72-mer…
Aug 22, 2023
d19f061
Update .flowconfig.macos for 0.202.0
Aug 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ jobs:

- run:
name: Build & Test React Native using Gradle
command: ./gradlew buildAll
command: ./gradlew build

- report_bundle_size:
platform: android
Expand Down Expand Up @@ -1512,9 +1512,9 @@ jobs:

cp -r $HERMES_WS_DIR/win64-bin/* ./packages/react-native/sdks/hermesc/win64-bin/.
cp -r $HERMES_WS_DIR/linux64-bin/* ./packages/react-native/sdks/hermesc/linux64-bin/.
mkdir -p ./ReactAndroid/external-artifacts/artifacts/
cp $HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz ./ReactAndroid/external-artifacts/artifacts/hermes-ios-debug.tar.gz
cp $HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz ./ReactAndroid/external-artifacts/artifacts/hermes-ios-release.tar.gz
mkdir -p ./packages/react-native/ReactAndroid/external-artifacts/artifacts/
cp $HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-ios-debug.tar.gz
cp $HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-ios-release.tar.gz

- run_yarn
- download_gradle_dependencies
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ untyped-import
untyped-type-import

[version]
^0.201.0
^0.202.0
2 changes: 1 addition & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ untyped-import
untyped-type-import

[version]
^0.201.0
^0.202.0
2 changes: 1 addition & 1 deletion .flowconfig.macos
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ untyped-import
untyped-type-import

[version]
^0.201.0
^0.202.0
11 changes: 1 addition & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,9 @@ tasks.register("cleanAll", Delete::class.java) {
delete(rootProject.file("./packages/rn-tester/android/app/.cxx"))
}

tasks.register("buildAll") {
tasks.register("build") {
description = "Build and test all the React Native relevant projects."
dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":build"))
// This builds both the React Native framework for both debug and release
dependsOn(":packages:react-native:ReactAndroid:assemble")
// This creates all the Maven artifacts and makes them available in the /android folder
dependsOn(":packages:react-native:ReactAndroid:installArchives")
// This builds RN Tester for Hermes/JSC for debug and release
dependsOn(":packages:rn-tester:android:app:assemble")
// This compiles the Unit Test sources (without running them as they're partially broken)
dependsOn(":packages:react-native:ReactAndroid:compileDebugUnitTestSources")
dependsOn(":packages:react-native:ReactAndroid:compileReleaseUnitTestSources")
}

tasks.register("downloadAll") {
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
transform: {
'^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$':
'<rootDir>/packages/react-native/jest/assetFileTransformer.js',
'.*': './packages/react-native/jest/private/preprocessor.js',
'.*': './jest/preprocessor.js',
},
setupFiles: ['./packages/react-native/jest/local-setup.js'],
fakeTimers: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ const nodeFiles = new RegExp(
'/metro(?:-[^/]*)?/', // metro, metro-core, metro-source-map, metro-etc.
].join('|'),
);
const nodeOptions = babelRegisterOnly.config([nodeFiles]);

babelRegisterOnly([]);
// Use metro-babel-register to build the Babel configuration we need for Node
// files, but Jest takes care of hooking require so we don't actually register
// Babel here.
const nodeOptions = babelRegisterOnly.config([nodeFiles]);

const transformer = require('metro-react-native-babel-transformer');
module.exports = {
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@
"@babel/generator": "^7.20.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.2.1",
"@reactions/component": "^2.0.2",
"@types/react": "^18.0.18",
"@typescript-eslint/parser": "^5.30.5",
"async": "^3.2.2",
"babel-plugin-transform-flow-enums":"^0.0.2",
"clang-format": "^1.8.0",
"connect": "^3.6.5",
"coveralls": "^3.1.1",
Expand All @@ -77,16 +79,17 @@
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-redundant-undefined": "^0.4.0",
"eslint-plugin-relay": "^1.8.3",
"flow-bin": "^0.201.0",
"flow-bin": "^0.202.0",
"hermes-eslint": "0.8.0",
"inquirer": "^7.1.0",
"jest": "^29.2.1",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.14.0",
"metro-babel-register": "0.75.1",
"metro-memory-fs": "0.75.1",
"mock-fs": "^5.1.4",
"metro-react-native-babel-transformer": "0.75.1",
"mkdirp": "^0.5.1",
"mock-fs": "^5.1.4",
"prettier": "^2.4.1",
"react": "18.2.0",
"react-test-renderer": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/

import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
import type {UnsafeMixed} from 'react-native/Libraries/Types/CodegenTypes';

type NativeProps = $ReadOnly<{|
...ViewProps,

// Props
mixedProp?: UnsafeMixed,
|}>;

export default (codegenNativeComponent<NativeProps>(
'MixedPropNativeComponentView',
): HostComponent<NativeProps>);
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,34 @@ namespace react {



} // namespace react
} // namespace facebook
",
}
`;

exports[`GenerateComponentDescriptorH can generate for 'MixedPropNativeComponent.js' 1`] = `
Object {
"ComponentDescriptors.h": "
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateComponentDescriptorH.js
*/

#pragma once

#include <react/renderer/components/RNCodegenModuleFixtures/ShadowNodes.h>
#include <react/renderer/core/ConcreteComponentDescriptor.h>

namespace facebook {
namespace react {

using MixedPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor<MixedPropNativeComponentViewShadowNode>;

} // namespace react
} // namespace facebook
",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,31 @@ NS_ASSUME_NONNULL_END",
}
`;

exports[`GenerateComponentHObjCpp can generate for 'MixedPropNativeComponent.js' 1`] = `
Object {
"RCTComponentViewHelpers.h": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateComponentHObjCpp.js
*/

#import <Foundation/Foundation.h>
#import <React/RCTDefines.h>
#import <React/RCTLog.h>

NS_ASSUME_NONNULL_BEGIN

@protocol RCTMixedPropNativeComponentViewViewProtocol <NSObject>

@end

NS_ASSUME_NONNULL_END",
}
`;

exports[`GenerateComponentHObjCpp can generate for 'MultiNativePropNativeComponent.js' 1`] = `
Object {
"RCTComponentViewHelpers.h": "/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,31 @@ void InterfaceOnlyNativeComponentViewEventEmitter::onChange(OnChange event) cons
});
}

} // namespace react
} // namespace facebook
",
}
`;

exports[`GenerateEventEmitterCpp can generate for 'MixedPropNativeComponent.js' 1`] = `
Object {
"EventEmitters.cpp": "
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateEventEmitterCpp.js
*/

#include <react/renderer/components/RNCodegenModuleFixtures/EventEmitters.h>

namespace facebook {
namespace react {



} // namespace react
} // namespace facebook
",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,40 @@ class JSI_EXPORT InterfaceOnlyNativeComponentViewEventEmitter : public ViewEvent
};

void onChange(OnChange value) const;
};

} // namespace react
} // namespace facebook
",
}
`;

exports[`GenerateEventEmitterH can generate for 'MixedPropNativeComponent.js' 1`] = `
Object {
"EventEmitters.h": "
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateEventEmitterH.js
*/
#pragma once

#include <react/renderer/components/view/ViewEventEmitter.h>
#include <jsi/jsi.h>

namespace facebook {
namespace react {

class JSI_EXPORT MixedPropNativeComponentViewEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;




};

} // namespace react
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,39 @@ InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps(
}
`;

exports[`GeneratePropsCpp can generate for 'MixedPropNativeComponent.js' 1`] = `
Object {
"Props.cpp": "
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GeneratePropsCpp.js
*/

#include <react/renderer/components/RNCodegenModuleFixtures/Props.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/propsConversions.h>

namespace facebook {
namespace react {

MixedPropNativeComponentViewProps::MixedPropNativeComponentViewProps(
const PropsParserContext &context,
const MixedPropNativeComponentViewProps &sourceProps,
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),

mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {}))
{}

} // namespace react
} // namespace facebook
",
}
`;

exports[`GeneratePropsCpp can generate for 'MultiNativePropNativeComponent.js' 1`] = `
Object {
"Props.cpp": "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,42 @@ class JSI_EXPORT InterfaceOnlyNativeComponentViewProps final : public ViewProps
}
`;

exports[`GeneratePropsH can generate for 'MixedPropNativeComponent.js' 1`] = `
Object {
"Props.h": "
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GeneratePropsH.js
*/
#pragma once

#include <jsi/jsi.h>
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>

namespace facebook {
namespace react {

class JSI_EXPORT MixedPropNativeComponentViewProps final : public ViewProps {
public:
MixedPropNativeComponentViewProps() = default;
MixedPropNativeComponentViewProps(const PropsParserContext& context, const MixedPropNativeComponentViewProps &sourceProps, const RawProps &rawProps);

#pragma mark - Props

folly::dynamic mixedProp{};
};

} // namespace react
} // namespace facebook
",
}
`;

exports[`GeneratePropsH can generate for 'MultiNativePropNativeComponent.js' 1`] = `
Object {
"Props.h": "
Expand Down
Loading