Skip to content

Switch to Yarn workspaces #507

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

Closed
wants to merge 6 commits into from
Closed

Switch to Yarn workspaces #507

wants to merge 6 commits into from

Conversation

cross19xx
Copy link
Contributor

Summary

Refactoring the codebase to use yarn workspaces. Resolved #493

Installation

@cross19xx cross19xx marked this pull request as draft August 15, 2020 09:34
@cross19xx
Copy link
Contributor Author

Steps leading to this change:

  • Moved eslint, jest and its dependencies to the project root

  • Moved .release-it.json, babel.config.js, dont-cleanup-after-each.js, pure.js, package.json, src and typings into packages/react-native-testing-library

  • Due to issues moving flow, I kept flow-typed and .flowconfig at the project root and installed flow-mono-cli. The symlinks are created after post install on the project root

  • Fixed docusaurus theme configuration by changing themeConfig.links to themeConfig.items in the docusaurus.config.js

  • All libraries that were installed in the project root had their versions changed to "*"

  • Switched all examples to use expo to reduce project size since expo did not require the android and ios directory

@thymikee
Copy link
Member

thymikee commented Aug 15, 2020

I'm not convinced we need flow-mono-cli. I'd like to have a single Flow instance looking over whole project from the root.
Also, the PR needs a rebase

@cross19xx
Copy link
Contributor Author

I'm not convinced we need flow-mono-cli. I'd like to have a single Flow instance looking over whole project from the root.
Also, the PR needs a rebase

It was more for future cases. In case another package was introduced which had different flow configurations from the global one

@thymikee
Copy link
Member

It was more for future cases

Such future may (most likely) never come. There's no reason to add more dependencies to the project "just in case". Only when necessary – e.g. we have long-term plan of supporting such use case. Which we don't.

@@ -36,21 +36,21 @@ jobs:
- attach_workspace:
at: ~/react-native-testing-library
- run: |
cd packages/react-native-testing-library
Copy link
Member

Choose a reason for hiding this comment

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

linting and type checks should go from the root, please remove and adjust configuration if needed

"json"
],
"rootDir": "./src"
"devDependencies": {
Copy link
Member

Choose a reason for hiding this comment

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

FYI, there's no need to differentiate between deps and devDeps in workspace root, I don't mind it though, your call :)

"jest": "*",
"react": "*",
"react-native": "*",
"react-test-renderer": "*",
Copy link
Member

Choose a reason for hiding this comment

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

can we get rid of * in our dev deps and bring back the versions we had in original package.json? I don't mind having * in examples though

@cross19xx cross19xx closed this Oct 11, 2020
@mdjastrzebski mdjastrzebski deleted the refactor/code-refactor branch April 25, 2024 09:48
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.

Convert repository to monorepository
2 participants