Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wp-fork to version 2.9.1 #18

Merged
merged 125 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
eb2a4df
Add EasingFactoryFunction type to .d.ts (#2979)
kkafar Feb 9, 2022
2003772
Check for NaN (#2980)
piaskowyk Feb 9, 2022
b6bab4e
Update definition (#2981)
piaskowyk Feb 9, 2022
8b537bb
Catch & ignore IllegalViewOperationException in AnimationsManager#rem…
kkafar Feb 9, 2022
4351a65
Add macro for JSI spec exported functions (#2978)
jakub-gonet Feb 9, 2022
7debc31
Add link to events.md (#2958)
hasanfd Feb 11, 2022
561f4d5
Handle "Slow animations" option in simulators (#2931)
jakub-gonet Feb 11, 2022
4efcb12
Fix crash when handling event containing NaN or INF values (#2992)
michaelknoch Feb 11, 2022
87a10e5
Add reactInstanceManager getter (#2863)
wfolini Feb 11, 2022
1c4bb85
feat: added withInitialValues modifier (#2799)
gorhom Feb 15, 2022
bd333e5
Bump follow-redirects from 1.14.7 to 1.14.8 in /docs (#2996)
dependabot[bot] Feb 15, 2022
342cb5b
react-native 0.68 (#2987)
piaskowyk Feb 16, 2022
ff65219
Update dependencies versions (0) (#2986)
kkafar Feb 16, 2022
1043359
Update dev dependencies && update jest snapshots (1) (#2988)
kkafar Feb 16, 2022
ef7b40b
Fix Java lint on JDK 16+ (#3004)
jakub-gonet Feb 16, 2022
8c6fabb
Bump ajv from 6.10.2 to 6.12.6 in /Example (#2997)
dependabot[bot] Feb 16, 2022
3bb3161
Bump ajv from 6.10.2 to 6.12.6 (#2998)
dependabot[bot] Feb 16, 2022
0ebe015
fix: Add `performance.now()` to Babel plugin (#3006)
mrousavy Feb 16, 2022
7208440
corrected grammatical errors (#3013)
Rquaicoo Feb 19, 2022
a096d53
Fix typo (#3012)
kkafar Feb 19, 2022
58d73a6
Bump url-parse from 1.5.3 to 1.5.7 in /Example (#3015)
dependabot[bot] Feb 19, 2022
1a20271
Bump url-parse from 1.5.3 to 1.5.7 in /docs (#3016)
dependabot[bot] Feb 19, 2022
67ad6f9
Fix eslint errors (#3018)
piaskowyk Feb 21, 2022
d22fc8a
Added simple cleanup command (#3007)
piaskowyk Feb 21, 2022
f6e20bf
Update jest version (2) (#2990)
kkafar Feb 21, 2022
bbb4299
Autoinstall Android (#3005)
jakub-gonet Feb 21, 2022
a613a6a
Use `P extends object` in Animate props generic type (#3022)
jakub-gonet Feb 21, 2022
7956a10
Update path in d.ts after relocation (#2977)
piaskowyk Feb 22, 2022
164ba30
Operations order (#2580)
piaskowyk Feb 22, 2022
a870aa2
Fix failing CI (#3030)
piaskowyk Feb 23, 2022
864ee05
Bump prismjs from 1.25.0 to 1.27.0 in /docs (#3035)
dependabot[bot] Mar 4, 2022
c574b96
Bump url-parse from 1.5.7 to 1.5.10 in /docs (#3037)
dependabot[bot] Mar 4, 2022
b13215e
Build from source (#2933)
kkafar Mar 4, 2022
59fe597
Bump url-parse from 1.5.7 to 1.5.10 in /Example (#3038)
dependabot[bot] Mar 4, 2022
7c6e2d0
Bump plist from 3.0.1 to 3.0.4 in /Example (#3042)
dependabot[bot] Mar 4, 2022
b977543
Bump plist from 3.0.3 to 3.0.4 (#3043)
dependabot[bot] Mar 4, 2022
5bda7bf
Fix bezier & bezierFn mock in ReanimatedV2 (#3034)
notjosh Mar 4, 2022
e180201
fix: accept case insensitive flavor (#3041)
0akl3y Mar 7, 2022
6f8333d
Don't hardcode build dir (#3053)
janicduplessis Mar 8, 2022
516de18
Support reactNativeArchitectures (#3055)
janicduplessis Mar 8, 2022
e25d29a
Resolve react-native and other packages relative to reanimated packag…
janicduplessis Mar 8, 2022
4cf94c3
ConfigureProps by JSI (#3059)
piaskowyk Mar 18, 2022
86546e2
Update initial style every render (#2851)
piaskowyk Mar 18, 2022
63d88ee
Add @babel/preset-typescript to peerDependencies as it's used at runt…
levibuzolic Mar 18, 2022
d6d5f96
Added useAnimatedSensor() (#2868)
piaskowyk Mar 18, 2022
45c57a9
Release 2.5.0 (#3085)
piaskowyk Mar 21, 2022
d1386c7
Bump minimist from 1.2.5 to 1.2.6 in /docs (#3103)
dependabot[bot] Mar 28, 2022
ede2670
Bump ansi-regex from 4.1.0 to 4.1.1 in /Example (#3110)
dependabot[bot] Mar 28, 2022
50fff6f
Bump plist from 3.0.4 to 3.0.5 in /Example (#3109)
dependabot[bot] Mar 28, 2022
bf0cbff
Bump ansi-regex from 4.1.0 to 4.1.1 (#3108)
dependabot[bot] Mar 28, 2022
b7354c8
Bump plist from 3.0.4 to 3.0.5 (#3107)
dependabot[bot] Mar 28, 2022
1664f48
Remove Expo adapter (#3113)
Kudo Apr 1, 2022
e6b3064
moveAnimationByTime -> advanceAnimationByTime (#3116)
kirillzyusko Apr 1, 2022
e66b646
fix: typo in variable (#3112)
jeremybarbet Apr 1, 2022
9ab5fc4
Invalidate display link instead of pausing it when invalidating the n…
danilobuerger Apr 1, 2022
30c4451
fix: output not compatible with input type (#3098)
Apr 1, 2022
cd55e5e
add findIndex (#3114)
burakgormek Apr 1, 2022
cda9b5c
Reanimated 2.5.0 type check fix (#3101)
scyrych Apr 1, 2022
aa79ca2
Add declaration for toHaveAnimatedStyle to use custom matcher in TS f…
kirillzyusko Apr 1, 2022
8f57a41
Support agp 7+ (#3056)
janicduplessis Apr 1, 2022
1cf0920
Update RNReanimated.podspec (#3092)
socialsuiteDavid Apr 1, 2022
5d1d1e0
Fix typo in warning message (#3129)
tomekzaw Apr 4, 2022
cb55709
TvOS (#3135)
piaskowyk Apr 4, 2022
b3d39d6
Release 2.6.0 (#3137)
piaskowyk Apr 4, 2022
d492f0b
Bump cocoapods-downloader from 1.6.1 to 1.6.3 in /TVOSExample (#3140)
dependabot[bot] Apr 7, 2022
1a292f7
Update ConfigHelper.ts (#3139)
tomekzaw Apr 7, 2022
5601bc6
Remove `react-native-screens` from dependencies (#3149)
tomekzaw Apr 7, 2022
91d2e48
Use angle bracket imports (#3150)
tomekzaw Apr 8, 2022
4bab656
Remove gesture-gandler (#3152)
piaskowyk Apr 8, 2022
85b171c
Fix Expo dev menu (#3154)
piaskowyk Apr 8, 2022
a37c0e4
Remove `__reanimatedWorkletInit` function and `__worklet` property (#…
tomekzaw Apr 8, 2022
9e835eb
Bump moment from 2.29.1 to 2.29.2 in /Example (#3163)
dependabot[bot] Apr 9, 2022
ecf6706
Fix CI config for Java linter (#3160)
tomekzaw Apr 9, 2022
5199de4
Make @babel/preset-typescript a full dependency as it's used at runti…
levibuzolic Apr 11, 2022
2b8f716
Add @babel/core as peer dependency which is required by @babel/plugin…
AlexanderEggers Apr 11, 2022
5b3afa7
Add worklet to easing back return function (#3168)
gozdecoban Apr 11, 2022
e039995
fix: android layout reanimation null pointer exception (2959) (#3162)
jacobarvidsson Apr 11, 2022
08b4381
Release 2.7.0 (#3170)
piaskowyk Apr 11, 2022
38b1058
Fix typo in migration docs (#3155)
dylmye Apr 11, 2022
d6c7304
Load `RNGestureHandlerModule` lazily on iOS (#3166)
j-piasecki Apr 11, 2022
f0165b2
fix: Fix `useAnimatedSensor` return type (#3094)
mrousavy Apr 12, 2022
e4bc507
Add opts for relative source location (#3141)
jiulongw Apr 12, 2022
68f0b17
Fix JSCRuntime destroyed with a dangling API object (#3185)
lukmccall Apr 20, 2022
64d5909
Release 2.8.0 (#3189)
piaskowyk Apr 21, 2022
6898b30
Bump async from 2.6.3 to 2.6.4 in /docs (#3190)
dependabot[bot] Apr 25, 2022
ba47f95
Bump async from 2.6.3 to 2.6.4 in /TVOSExample (#3192)
dependabot[bot] Apr 26, 2022
f045173
Bump async from 2.6.1 to 2.6.4 in /Example (#3191)
dependabot[bot] Apr 26, 2022
77f805f
Pass worklet runtime pointer using ArrayBuffer (#3196)
wkozyra95 May 10, 2022
cc155bb
Fix jest tests (#3228)
graszka22 May 10, 2022
7cefb4b
Fix onScroll event handler (#3229)
graszka22 May 10, 2022
e8902a4
Update .gitignore
piaskowyk May 12, 2022
087b448
Cherry Pick v1
dependabot[bot] May 12, 2022
87c8a2f
Bump cross-fetch from 3.1.2 to 3.1.5 in /docs (#3203)
dependabot[bot] May 12, 2022
d5a9acf
Bump cross-fetch from 3.0.6 to 3.1.5 in /Example (#3202)
dependabot[bot] May 12, 2022
3b577d3
Docs [1] change of naming pattern (#3171)
piaskowyk May 12, 2022
acb0f43
Fix performance.now() in worklets (#3235)
graszka22 May 12, 2022
7c88caf
Fix Android remote debugging failure due to calling synchronous metho…
justin-tay May 12, 2022
82101d4
fix: missing v2 Extrapolation mock (#3293)
maxhungry Jun 13, 2022
868014b
Add bracket to KeyframeAnimations docs (#3289)
andrekovac Jun 14, 2022
68b3213
Bump simple-plist from 1.3.0 to 1.3.1 (#3282)
dependabot[bot] Jun 14, 2022
618e9a1
Bump eventsource from 1.1.0 to 1.1.1 in /docs (#3280)
dependabot[bot] Jun 14, 2022
c855fe7
Bump simple-plist from 1.1.1 to 1.3.1 in /Example (#3281)
dependabot[bot] Jun 14, 2022
7bf6d4f
Fixed typo. (#3268)
tomasaguiar Jun 14, 2022
488104d
Remove unimplemented type (#3254)
piaskowyk Jun 14, 2022
fd86adc
fix android rotation sensortype (#3275)
odogono Jun 24, 2022
dca24c4
docs: add clean cache note after adding babel plugin (#3327)
kacperkapusciak Jun 28, 2022
b230b23
docs: document withSpring options (#3328)
kacperkapusciak Jun 28, 2022
ff1d37d
Update scrollTo.md (#3308)
Norfeldt Jun 28, 2022
844d6c2
Bump jsdom from 16.4.0 to 16.7.0 in /Example (#3307)
dependabot[bot] Jun 28, 2022
7b12bd6
update yarn
piaskowyk Jun 28, 2022
6a3f9e7
Bump jpeg-js from 0.4.3 to 0.4.4 in /Example (#3299)
dependabot[bot] Jun 28, 2022
45457ff
🌲 Reduce bundle size on Web by 80% (#3278)
piaskowyk Jun 28, 2022
38dd3a5
Export rea1
piaskowyk Jun 28, 2022
5d16a61
fix: remove usage of global scoped rnMinorVersion variable (#3312)
kkafar Jun 28, 2022
778df23
Allow to run a sequence of one animation (#3306)
graszka22 Jun 29, 2022
026172d
Add `runOnUI` to mocks (#3261)
oliwheeler Jun 29, 2022
3f31281
fix: overriden style type in AnimatedProps (#3301)
magrinj Jun 30, 2022
3526d48
Bump RN to 69 (#3339)
piaskowyk Jun 30, 2022
ee2b99a
Update Cmake and exclude duplicated libs
piaskowyk Jul 1, 2022
0b231b0
Update package.json
piaskowyk Jul 1, 2022
f192704
Merge branch 'upstream-2.9.1' into wp-fork-2.9.1
Aug 11, 2022
1eebd5b
Add React Native Reanimated 0.69 hermes binary
Aug 11, 2022
c9175c8
Generate tarball
Aug 11, 2022
8e4b343
Update tarball
Aug 24, 2022
2193fe1
Remove previous version tarball
Oct 10, 2022
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
  •  
  •  
  •  
7 changes: 3 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ module.exports = {
'standard',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/flowtype',
'prettier/react',
'prettier/standard',
'plugin:import/typescript',
],
plugins: ['react', 'react-native', 'import', 'jest', '@typescript-eslint'],
Expand All @@ -17,7 +14,9 @@ module.exports = {
},
settings: {
'import/resolver': {
'babel-module': {},
'babel-module': {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Install NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r21d
- name: Set ANDROID_NDK
run: echo "ANDROID_NDK=$ANDROID_HOME/ndk-bundle" >> $GITHUB_ENV
- name: Accept licenses
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-npm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- name: Check out
uses: actions/checkout@v1

- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: '11'

- name: Install NDK
uses: nttld/setup-ndk@v1
Expand All @@ -38,7 +38,7 @@ jobs:
path: '*.tgz'

- name: Compress Android build output
run: zip -r android-build-output.zip android/build/
run: zip -r android-build-output.zip build_output

- name: Upload Android build folder
uses: actions/upload-artifact@v2
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/tv-os-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test tvOS build
on:
pull_request:
branches:
- main
paths:
- 'ios/**'
- 'Common/**'
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
env:
WORKING_DIRECTORY: TVOSExample
concurrency:
group: ios-tv-${{ github.ref }}
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
cache: 'yarn'
cache-dependency-path: 'TVOSExample/yarn.lock'
- name: Install Reanimated node dependencies
run: yarn
- name: Install node dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn
- name: Install pods
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
run: pod install
- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn tv-os
2 changes: 1 addition & 1 deletion .github/workflows/validate-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- main
paths:
- 'android/src/java**'
- 'android/src/main/java/**'
push:
branches:
- main
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ lib/
react-native-reanimated-tests.js

# eclipse
*.settings**
*.settings**
FabricExample
72 changes: 72 additions & 0 deletions Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#include "AnimatedSensorModule.h"
#include "MutableValue.h"
#include "ValueWrapper.h"

namespace reanimated {

AnimatedSensorModule::AnimatedSensorModule(
const PlatformDepMethodsHolder &platformDepMethodsHolder,
RuntimeManager *runtimeManager)
: platformRegisterSensorFunction_(platformDepMethodsHolder.registerSensor),
platformUnregisterSensorFunction_(
platformDepMethodsHolder.unregisterSensor),
runtimeManager_(runtimeManager) {}

AnimatedSensorModule::~AnimatedSensorModule() {
// It is called during app reload because app reload doesn't call hooks
// unmounting
for (auto sensorId : sensorsIds_) {
platformUnregisterSensorFunction_(sensorId);
}
}

jsi::Value AnimatedSensorModule::registerSensor(
jsi::Runtime &rt,
const jsi::Value &sensorType,
const jsi::Value &interval,
const jsi::Value &sensorDataContainer) {
std::shared_ptr<ShareableValue> sensorsData = ShareableValue::adapt(
rt, sensorDataContainer.getObject(rt), runtimeManager_);
auto &mutableObject =
ValueWrapper::asMutableValue(sensorsData->valueContainer);

std::function<void(double[])> setter;
if (sensorType.asNumber() == SensorType::ROTATION_VECTOR) {
setter = [&, mutableObject](double newValues[]) {
jsi::Runtime &runtime = *runtimeManager_->runtime.get();
jsi::Object value(runtime);
value.setProperty(runtime, "qw", newValues[0]);
value.setProperty(runtime, "qx", newValues[1]);
value.setProperty(runtime, "qy", newValues[2]);
value.setProperty(runtime, "qz", newValues[3]);
value.setProperty(runtime, "yaw", newValues[4]);
value.setProperty(runtime, "pitch", newValues[5]);
value.setProperty(runtime, "roll", newValues[6]);
mutableObject->setValue(runtime, std::move(value));
};
} else {
setter = [&, mutableObject](double newValues[]) {
jsi::Runtime &runtime = *runtimeManager_->runtime.get();
jsi::Object value(runtime);
value.setProperty(runtime, "x", newValues[0]);
value.setProperty(runtime, "y", newValues[1]);
value.setProperty(runtime, "z", newValues[2]);
mutableObject->setValue(runtime, std::move(value));
};
}

int sensorId = platformRegisterSensorFunction_(
sensorType.asNumber(), interval.asNumber(), setter);
if (sensorId != -1) {
sensorsIds_.insert(sensorId);
}
return jsi::Value(sensorId);
}

void AnimatedSensorModule::unregisterSensor(const jsi::Value &sensorId) {
// It is called during sensor hook unmounting
sensorsIds_.erase(sensorId.getNumber());
platformUnregisterSensorFunction_(sensorId.asNumber());
}

} // namespace reanimated
31 changes: 30 additions & 1 deletion Common/cpp/NativeModules/NativeReanimatedModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "JSIStoreValueUser.h"
#include "Mapper.h"
#include "MapperRegistry.h"
#include "MutableValue.h"
#include "ReanimatedHiddenHeaders.h"
#include "RuntimeDecorator.h"
#include "ShareableValue.h"
Expand Down Expand Up @@ -70,7 +71,10 @@ NativeReanimatedModule::NativeReanimatedModule(
mapperRegistry(std::make_shared<MapperRegistry>()),
eventHandlerRegistry(std::make_shared<EventHandlerRegistry>()),
requestRender(platformDepMethodsHolder.requestRender),
propObtainer(propObtainer) {
propObtainer(propObtainer),
animatedSensorModule(platformDepMethodsHolder, this),
configurePropsPlatformFunction(
platformDepMethodsHolder.configurePropsFunction) {
auto requestAnimationFrame = [=](FrameCallback callback) {
frameCallbacks.push_back(callback);
maybeRequestRender();
Expand All @@ -85,6 +89,8 @@ NativeReanimatedModule::NativeReanimatedModule(
platformDepMethodsHolder.scrollToFunction,
platformDepMethodsHolder.measuringFunction,
platformDepMethodsHolder.getCurrentTime,
platformDepMethodsHolder.registerSensor,
platformDepMethodsHolder.unregisterSensor,
platformDepMethodsHolder.setGestureStateFunction,
layoutAnimationsProxy);
onRenderCallback = [this](double timestampMs) {
Expand Down Expand Up @@ -243,6 +249,14 @@ jsi::Value NativeReanimatedModule::enableLayoutAnimations(
return jsi::Value::undefined();
}

jsi::Value NativeReanimatedModule::configureProps(
jsi::Runtime &rt,
const jsi::Value &uiProps,
const jsi::Value &nativeProps) {
configurePropsPlatformFunction(rt, uiProps, nativeProps);
return jsi::Value::undefined();
}

void NativeReanimatedModule::onEvent(
std::string eventName,
std::string eventAsString) {
Expand Down Expand Up @@ -298,4 +312,19 @@ void NativeReanimatedModule::onRender(double timestampMs) {
}
}

jsi::Value NativeReanimatedModule::registerSensor(
jsi::Runtime &rt,
const jsi::Value &sensorType,
const jsi::Value &interval,
const jsi::Value &sensorDataContainer) {
return animatedSensorModule.registerSensor(
rt, sensorType, interval, sensorDataContainer);
}

void NativeReanimatedModule::unregisterSensor(
jsi::Runtime &rt,
const jsi::Value &sensorId) {
animatedSensorModule.unregisterSensor(sensorId);
}

} // namespace reanimated
Loading