Skip to content

Commit

Permalink
done macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
tjzel committed May 17, 2024
1 parent b0cd46b commit 9795ba8
Show file tree
Hide file tree
Showing 3,712 changed files with 795,148 additions and 10,580 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 3 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ module.exports = {
tsconfigRootDir: __dirname,
},
extends: ['plugin:@typescript-eslint/recommended-type-checked'],
plugins: ['eslint-plugin-tsdoc'],
rules: {
'tsdoc/syntax': 'error',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
Expand Down Expand Up @@ -51,14 +53,7 @@ module.exports = {
'plugin:import/typescript',
'plugin:react-hooks/recommended',
],
plugins: [
'react',
'react-native',
'import',
'jest',
'@typescript-eslint',
'eslint-plugin-tsdoc',
],
plugins: ['react', 'react-native', 'import', 'jest', '@typescript-eslint'],
env: {
'react-native/react-native': true,
'jest/globals': true,
Expand All @@ -81,7 +76,6 @@ module.exports = {
'no-use-before-define': 'off',
eqeqeq: 'error',
'no-unreachable': 'error',
'tsdoc/syntax': 'error',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"packages/reanimated-web-example",
"packages/eslint-plugin-reanimated",
"packages/reanimated-fabric-example",
"packages/reanimated-next-example"
"packages/reanimated-next-example",
"packages/reanimated-macos-example"
]
},
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,12 @@ ShareableObject::ShareableObject(jsi::Runtime &rt, const jsi::Object &object)
data_.emplace_back(key.utf8(rt), value);
}
#if REACT_NATIVE_MINOR_VERSION >= 71
if (object.hasNativeState(rt)) {
nativeState_ = object.getNativeState(rt);
try {
if (object.hasNativeState(rt)) {
nativeState_ = object.getNativeState(rt);
}
} catch (...) {
// Temporary workaround until upstream fix is merged.
}
#endif
}
Expand All @@ -213,9 +217,13 @@ ShareableObject::ShareableObject(
const jsi::Value &nativeStateSource)
: ShareableObject(rt, object) {
#if REACT_NATIVE_MINOR_VERSION >= 71
if (nativeStateSource.isObject() &&
nativeStateSource.asObject(rt).hasNativeState(rt)) {
nativeState_ = nativeStateSource.asObject(rt).getNativeState(rt);
try {
if (nativeStateSource.isObject() &&
nativeStateSource.asObject(rt).hasNativeState(rt)) {
nativeState_ = nativeStateSource.asObject(rt).getNativeState(rt);
}
} catch (...) {
// Temporary workaround until upstream fix is merged.
}
#endif
}
Expand All @@ -227,8 +235,12 @@ jsi::Value ShareableObject::toJSValue(jsi::Runtime &rt) {
rt, data_[i].first.c_str(), data_[i].second->getJSValue(rt));
}
#if REACT_NATIVE_MINOR_VERSION >= 71
if (nativeState_ != nullptr) {
obj.setNativeState(rt, nativeState_);
try {
if (nativeState_ != nullptr) {
obj.setNativeState(rt, nativeState_);
}
} catch (...) {
// Temporary workaround until upstream fix is merged.
}
#endif
return obj;
Expand Down
3 changes: 0 additions & 3 deletions packages/react-native-reanimated/MacOSExample/App.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions packages/react-native-reanimated/MacOSExample/tsconfig.json

This file was deleted.

Loading

0 comments on commit 9795ba8

Please sign in to comment.