Skip to content

Conversation

@tjzel
Copy link
Collaborator

@tjzel tjzel commented May 8, 2024

About

This pull request finally moves Reanimated repo to desired monorepo structure.

The migration process will be divided into steps, so then code review would be feasible.

Summary

This particular pull request does only the following:

  • Creates a monorepo structure
  • Moves current contents of the repository, excluding .git, to packages/react-native-reanimated.
  • Creates a copy of the LICENSE, .gitignore in the root of the repository.

When reviewing, please only take those changes into account - clone this repository and browse the files.

After this PR monorepo's functionalities are not utilized. packages/react-native-reanimated still has its own node_modules and yarn.lock, as well as embedded packages. This will be changed in the following PRs.

Also, a number of scripts/CI won't work either due to path differences. This will also be amended in the upcoming PRs.

Test plan

Run yarn in the root of the repository, yarn && yarn build && yarn build:app in packages/react-native-reanimated and build the Example app as usual. It's working as expected.

Steps achieved towards monorepo

  • All CI pass
  • Precommit scripts work properly
  • react-native-reanimated is a separate workspace which uses hoisted node_modules
  • app is a separate workspace which uses hoisted node_modules
  • paper example is a separate workspace which uses hoisted node_modules
  • fabric example is a separate workspace which uses hoisted node_modules
  • web example is a separate workspace which uses hoisted node_modules
  • macos example is a separate workspace which uses hoisted node_modules
  • next example is a separate workspace which uses hoisted node_modules
  • reanimated eslint plugin is a separate workspace which uses hoisted node_modules
  • the npm package builds and works as expected
  • reanimated2 directory is removed
  • TypeScript, ESLint and Prettier configs are unified and only extended when necessary in workspaces

tjzel and others added 5 commits May 29, 2024 18:25
## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992

## Summary

Moving `.github` directory to the root of the project, alongside with
fixes that regard new repository structures.

This pull request won't fix CIs which are being tackled in
- #5996 

## Test plan

No CI should fail on a step related to the change of the monorepo
structure.

## Steps achieved towards monorepo

- [ ] All CI pass
- [ ] Precommit scripts work properly
- [ ] react-native-reanimated is a separate workspace which uses hoisted
node_modules
- [ ] app is a separate workspace which uses hoisted node_modules
- [ ] paper example is a separate workspace which uses hoisted
node_modules
- [ ] fabric example is a separate workspace which uses hoisted
node_modules
- [ ] web example is a separate workspace which uses hoisted
node_modules
- [ ] macos example is a separate workspace which uses hoisted
node_modules
- [ ] example is a separate workspace which uses hoisted node_modules
- [ ] reanimated eslint plugin is a separate workspace which uses
hoisted node_modules
- [ ] the npm package builds and works as expected
- [ ] reanimated2 directory is removed
- [ ] TypeScript, ESLint and Prettier configs are unified and only
extended when necessary in workspaces
## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993

## Summary

This particular pull requests moves the precommit husky script to the
root directory to enable it. It also extracts `lint-staged`
configuration from `packages/react-native-reanimated` to a separate file
for it to be less polluted.

## Test plan

The script should be working as expected. Try it by cloning the monorepo
and doing something bad in the code.
…code and paper example (#5999)

## Summary

## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993
- #5998

## Summary

This particular pull request moves `app` directory to a package called
`reanimated-app` and `Example` directory to `reanimated-paper-example`
package. It also makes use of hoisted `node_modules` for those two
packages and `react-native-reanimated`.

## Test plan

Run `reanimated-paper-example` on both iOS and Android to see that it
works.
tjzel added a commit that referenced this pull request Jun 5, 2024
…code and paper example (#5999)

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993
- #5998

This particular pull request moves `app` directory to a package called
`reanimated-app` and `Example` directory to `reanimated-paper-example`
package. It also makes use of hoisted `node_modules` for those two
packages and `react-native-reanimated`.

Run `reanimated-paper-example` on both iOS and Android to see that it
works.
## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993
- #5999

## Summary

This particular pull request setups our Web Example. I had serious
issues with re-configuring the previous one to work in monorepo and I
decided to build this one from scratch.

## Test plan

New Web Example should work just like the old one.

---------

Co-authored-by: Michał Bert <[email protected]>
tjzel and others added 9 commits June 5, 2024 16:10
## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993
- #5999
- #6008
- #6020

## Summary

This particular pull request takes `FabricExample` out of
`react-native-reanimated` workspace and turns it into a separate
package.

## Test plan

New FabricExample app should compile and work as expected.
## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993
- #5999
- #6008
- #6020
- #6023

## Summary

This particular pull request takes `NextExample` out of
`react-native-reanimated` workspace and turns it into a separate
package.

## Test plan

New NextExample app should compile and work as expected.
## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993
- #5999
- #6008
- #6020
- #6023

## Summary

This particular pull request takes `MacOSExample` out of
`react-native-reanimated` workspace and turns it into a separate
package.

## Test plan

New MacOSExample app should compile and work as expected.

---------

Co-authored-by: Krzysztof Piaskowy <[email protected]>
## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993
- #5999
- #6008
- #6020
- #6023
- #6029

## Summary

This particular pull request takes our docs out of
`react-native-reanimated` workspace and turns it into a separate
package. However, due to some issues that seem to stem from Docusaurus
and Yarn versions, it doesn't work as a workspace. For now we will use
it just like we did before, with its own `yarn.lock` etc. until we are
able to fix that.

## Test plan

Docs should compile and work as expected.

---------

Co-authored-by: Krzysztof Piaskowy <[email protected]>
## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993
- #5999
- #6008
- #6020
- #6023
- #6029
- #6051

## Summary

This particular pull request takes `TVOSExample` out of
`react-native-reanimated` workspace and turns it into a separate
package.

## Test plan

TVOSExample should compile and work as expected.

---------

Co-authored-by: Krzysztof Piaskowy <[email protected]>
## About

This pull request is a part of the effort of migrating to monorepo
structure:
- #5992
- #5993
- #5998
- #5999
- #6008
- #6020
- #6023
- #6029
- #6051
- #6053 

## Summary

This particular pull request takes removes `reanimated2` directory from
`src`.

## Test plan

Example apps should work as expected.

---------

Co-authored-by: Krzysztof Piaskowy <[email protected]>
Co-authored-by: Michał Bert <[email protected]>
## Summary

## Test plan

---------

Co-authored-by: Tomasz Żelawski <[email protected]>
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

<!-- Explain the motivation for this PR. Include "Fixes #<number>" if
applicable. -->

## Test plan

<!-- Provide a minimal but complete code snippet that can be used to
test out this change along with instructions how to run it and a
description of the expected behavior. -->

---------

Co-authored-by: szydlovsky <[email protected]>
Co-authored-by: Tomasz Żelawski <[email protected]>
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.

🔥

@tjzel tjzel added this pull request to the merge queue Jun 10, 2024
Merged via the queue into main with commit c6d999e Jun 10, 2024
@tjzel tjzel deleted the @tjzel/monorepo branch June 10, 2024 11:01
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
## About

This pull request finally moves Reanimated repo to desired monorepo
structure.

The migration process will be divided into steps, so then code review
would be feasible.

## Summary

This particular pull request does only the following:

- Creates a monorepo structure
- Moves current contents of the repository, excluding `.git`, to
`packages/react-native-reanimated`.
- Creates a copy of the `LICENSE, .gitignore` in the root of the
repository.

When reviewing, please only take those changes into account - clone this
repository and browse the files.

After this PR monorepo's functionalities are not utilized.
`packages/react-native-reanimated` still has its own `node_modules` and
`yarn.lock`, as well as embedded packages. This will be changed in the
following PRs.

Also, a number of scripts/CI won't work either due to path differences.
This will also be amended in the upcoming PRs.

## Test plan

Run `yarn` in the root of the repository, `yarn && yarn build && yarn
build:app` in `packages/react-native-reanimated` and build the Example
app as usual. It's working as expected.

## Steps achieved towards monorepo

- [ ] All CI pass
- [x] Precommit scripts work properly
- [x] react-native-reanimated is a separate workspace which uses hoisted
node_modules
- [x] app is a separate workspace which uses hoisted node_modules
- [x] paper example is a separate workspace which uses hoisted
node_modules
- [x] fabric example is a separate workspace which uses hoisted
node_modules
- [x] web example is a separate workspace which uses hoisted
node_modules
- [x] macos example is a separate workspace which uses hoisted
node_modules
- [x] next example is a separate workspace which uses hoisted
node_modules
- [x] reanimated eslint plugin is a separate workspace which uses
hoisted node_modules
- [x] the npm package builds and works as expected
- [x] reanimated2 directory is removed
- [x] TypeScript, ESLint and Prettier configs are unified and only
extended when necessary in workspaces

---------

Co-authored-by: Michał Bert <[email protected]>
Co-authored-by: Krzysztof Piaskowy <[email protected]>
Co-authored-by: Michał Bert <[email protected]>
Co-authored-by: szydlovsky <[email protected]>
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.

3 participants