Skip to content

Commit

Permalink
Release 3.9.0-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
piaskowyk committed Apr 18, 2024
1 parent d0315ff commit 0f56737
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 48 deletions.
18 changes: 9 additions & 9 deletions Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"version": "0.0.1",
"private": true,
"scripts": {
"build": "yarn patch-package",
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint --max-warnings=0 .",
"start": "react-native start",
"test": "jest",
"postinstall": "patch-package"
"test": "jest"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.21.0",
Expand All @@ -18,22 +18,22 @@
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
"react": "18.2.0",
"react-native": "0.74.0-rc.4",
"react-native-gesture-handler": "git+https://github.com/software-mansion/react-native-gesture-handler.git#6808ca355af71ca2f1f6653b50e389c8b564c8ba",
"react-native": "0.74.0-rc.9",
"react-native-gesture-handler": "^2.16.0",
"react-native-pager-view": "^6.2.3",
"react-native-reanimated": "link:../",
"react-native-safe-area-context": "4.10.0-rc.1",
"react-native-screens": "git+https://github.com/software-mansion/react-native-screens.git#ddf267a4ce157dc60fa0bb94e8096c4d99f7e878",
"react-native-screens": "3.31.0-rc.1",
"react-native-svg": "^15.2.0-rc.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.74.75",
"@react-native/eslint-config": "0.74.75",
"@react-native/metro-config": "0.74.75",
"@react-native/typescript-config": "0.74.75",
"@react-native/babel-preset": "0.74.80",
"@react-native/eslint-config": "0.74.80",
"@react-native/metro-config": "0.74.80",
"@react-native/typescript-config": "0.74.80",
"@types/jest": "^29.2.1",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
Expand Down
14 changes: 7 additions & 7 deletions FabricExample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
"react": "18.2.0",
"react-native": "0.74.0-rc.4",
"react-native-gesture-handler": "git+https://github.com/software-mansion/react-native-gesture-handler.git#6808ca355af71ca2f1f6653b50e389c8b564c8ba",
"react-native": "0.74.0-rc.9",
"react-native-gesture-handler": "^2.16.0",
"react-native-pager-view": "^6.2.3",
"react-native-reanimated": "link:../",
"react-native-safe-area-context": "4.10.0-rc.1",
"react-native-screens": "git+https://github.com/software-mansion/react-native-screens.git#ddf267a4ce157dc60fa0bb94e8096c4d99f7e878",
"react-native-screens": "3.31.0-rc.1",
"react-native-svg": "^15.2.0-rc.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.74.75",
"@react-native/eslint-config": "0.74.75",
"@react-native/metro-config": "0.74.75",
"@react-native/typescript-config": "0.74.75",
"@react-native/babel-preset": "0.74.80",
"@react-native/eslint-config": "0.74.80",
"@react-native/metro-config": "0.74.80",
"@react-native/typescript-config": "0.74.80",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
Expand Down
34 changes: 8 additions & 26 deletions apple/REAModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ @implementation REAModule {
SingleInstanceChecker<REAModule> singleInstanceChecker_;
#endif // NDEBUG
bool hasListeners;
bool _isBridgeless;
}

@synthesize moduleRegistry = _moduleRegistry;
Expand Down Expand Up @@ -158,47 +159,33 @@ - (void)handleJavaScriptDidLoadNotification:(NSNotification *)notification

/*
* Taken from RCTNativeAnimatedTurboModule:
* In bridgeless mode, `setBridge` is never called during initialization. Instead this selector is invoked via
* BridgelessTurboModuleSetup.
* This selector is invoked via BridgelessTurboModuleSetup.
*/
- (void)setSurfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
{
_surfacePresenter = surfacePresenter;
_isBridgeless = true;
}

- (void)setBridge:(RCTBridge *)bridge
{
// This method isn't called on Bridgeless mode.
[super setBridge:bridge];

[bridge.uiManager.observerCoordinator addObserver:self];

// only within the first loading `self.bridge.surfacePresenter` exists
// during the reload `self.bridge.surfacePresenter` is null
_surfacePresenter = self.bridge.surfacePresenter;
if (self.bridge.surfacePresenter) {
_surfacePresenter = self.bridge.surfacePresenter;
}

#ifndef NDEBUG
[self setReaSurfacePresenter];
#endif // NDEBUG

[self setNodesManager:self.bridge];
}
_nodesManager = [[REANodesManager alloc] initWithModule:self bridge:bridge surfacePresenter:_surfacePresenter];

- (void)initialize
{
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleJavaScriptDidLoadNotification:)
name:RCTJavaScriptDidLoadNotification
object:nil];

[[self.moduleRegistry moduleForName:"EventDispatcher"] addDispatchObserver:self];

// [bridge.uiManager.observerCoordinator addObserver:self]; // TODO: Check if it's needed on new arch.
#ifndef NDEBUG
[self setReaSurfacePresenter];
#endif // NDEBUG

[self setNodesManager:nil];
}

#ifndef NDEBUG
Expand All @@ -213,11 +200,6 @@ - (void)setReaSurfacePresenter
}
#endif // NDEBUG

- (void)setNodesManager:(RCTBridge *)bridge
{
_nodesManager = [[REANodesManager alloc] initWithModule:self bridge:bridge surfacePresenter:_surfacePresenter];
}

#else // RCT_NEW_ARCH_ENABLED

- (void)setBridge:(RCTBridge *)bridge
Expand Down Expand Up @@ -295,7 +277,7 @@ - (void)sendEventWithName:(NSString *)eventName body:(id)body

RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(installTurboModule : (nonnull NSString *)valueUnpackerCode)
{
if (!self.bridge) {
if (_isBridgeless) {
#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED)
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)[RCTBridge currentBridge];
auto &rnRuntime = *(jsi::Runtime *)cxxBridge.runtime;
Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-reanimated",
"version": "3.9.0-rc.0",
"version": "3.9.0-rc.1",
"description": "More powerful alternative to Animated library for React Native.",
"scripts": {
"test": "yarn run format:js && yarn run lint:js && yarn run test:unit",
Expand Down Expand Up @@ -101,7 +101,10 @@
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/types": "^7.20.0",
"@react-native/eslint-config": "^0.72.2",
"@react-native/babel-preset": "0.74.80",
"@react-native/eslint-config": "0.74.80",
"@react-native/metro-config": "0.74.80",
"@react-native/typescript-config": "0.74.80",
"@testing-library/jest-native": "^4.0.4",
"@testing-library/react-hooks": "^8.0.0",
"@testing-library/react-native": "^7.1.0",
Expand Down Expand Up @@ -137,13 +140,13 @@
"eslint-plugin-tsdoc": "^0.2.17",
"husky": "^7.0.4",
"jest": "^29.0.0",
"lint-staged": "^11.2.0",
"lint-staged": "^15.2.2",
"madge": "^5.0.1",
"prettier": "^2.5.1",
"react": "18.2.0",
"react-native": "0.74.0-rc.4",
"react-native": "0.74.0-rc.9",
"react-native-builder-bob": "^0.18.3",
"react-native-gesture-handler": "git+https://github.com/software-mansion/react-native-gesture-handler.git#6808ca355af71ca2f1f6653b50e389c8b564c8ba",
"react-native-gesture-handler": "^2.16.0",
"react-native-web": "~0.18.12",
"react-test-renderer": "18.2.0",
"shelljs": "^0.8.5",
Expand Down
2 changes: 1 addition & 1 deletion src/reanimated2/platform-specific/jsVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* with the version used to build the native part of the library in runtime.
* Remember to keep this in sync with the version declared in `package.json`
*/
export const jsVersion = '3.9.0-rc.0';
export const jsVersion = '3.9.0-rc.1';

0 comments on commit 0f56737

Please sign in to comment.