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

refactor(Worklets): JavaScript NativeReanimatedModule #6557

Merged
merged 11 commits into from
Oct 29, 2024

Conversation

tjzel
Copy link
Collaborator

@tjzel tjzel commented Sep 27, 2024

Summary

Requires:

QoL refactor that will allow easier NativeWorkletsModule embedment.

Summary:

NativeReanimated.ts -> ReanimatedModule/NativeReanimated.ts
js-reanimated/ -> ReanimatedModule/js-reanimated

NativeReanimatedModule and JSReanimatedModule aren't exported anymore. The only way to obtain them is via createReanimatedModule, that should yield less error prone code. NativeWorkletsModule will follow the same pattern.

Test plan

  • CI green :shrek:

Sorry, something went wrong.

@tjzel tjzel changed the title @tjzel/worklets/merge type files refactor: JavaScript NativeReanimatedModule Sep 27, 2024
@tjzel tjzel force-pushed the @tjzel/worklets/merge-type-files branch from 969b4bb to 3c08411 Compare September 30, 2024 08:00
@tjzel tjzel changed the base branch from main to @tjzel/worklets/javascript-modules-refactor September 30, 2024 08:08
github-merge-queue bot pushed a commit that referenced this pull request Sep 30, 2024
## Summary

If docs need to extract internal types like this we better just export
them publicly.

Fixes CI on:

- #6556
- #6557

## Test plan

🚀
@tjzel tjzel marked this pull request as ready for review September 30, 2024 09:15
@tjzel tjzel changed the title refactor: JavaScript NativeReanimatedModule refactor(Worklets): JavaScript NativeReanimatedModule Oct 3, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 24, 2024
## Summary

Required by:
- #6557

`NativeReanimatedModule` depends on types from Layout Animations - this
makes impossible to embed its interface in `commonTypes.ts` since they
can't have any imports. I merged some types to prevent circular
dependencies.

## Test plan

- [x] CI Green
Base automatically changed from @tjzel/worklets/javascript-modules-refactor to main October 24, 2024 09:01
Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@tomekzaw
Copy link
Member

I'd like to review this PR prior to merging

@tomekzaw
Copy link
Member

Also, could you please give a general overview of the changes (e.g. which classes/functions/files have been renamed, which files have been moved to another directory) in the PR description? 🙏

@tjzel tjzel added this pull request to the merge queue Oct 29, 2024
Merged via the queue into main with commit 5f58cb2 Oct 29, 2024
9 checks passed
@tjzel tjzel deleted the @tjzel/worklets/merge-type-files branch October 29, 2024 14:22
github-merge-queue bot pushed a commit that referenced this pull request Nov 19, 2024
This pull request is one of many which replace

- #6378

since that PR is extensive and too difficult to review.

## Summary

Adding a second Native Module for Worklets.

It's initial responsibility for now is forwarding `valueUnpackerCode` to
Reanimated Module. While it seems silly, it's a good start since it sets
up the whole pipeline of:

```tree
typescript
├── android
│   └── cpp
└── ios
    └── cpp
```
(I was too lazy to use mermaid, long live `mkdir -p`)

Follow up PRs will move more and more responsibilities from Reanimated
to Worklets.

Requires:

- #6556
- #6557 

## Test plan

- [x] All GitHub Actions pass
- [x] Compatibility Github Action passes
- [x] debug Android works
- [x] release Android works
- [x] debug iOS works
- [x] release iOS works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants