-
Notifications
You must be signed in to change notification settings - Fork 476
chore: monorepo setup #1002
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
chore: monorepo setup #1002
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
@@ -23,6 +23,7 @@ jobs: | |||
run: yarn | |||
- name: Run test ${{ matrix.test-name }} | |||
run: yarn test:${{ matrix.test-name }} | |||
working-directory: packages/default-storage-backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use prefixes so packages get grouped together? I.e. storage-backend-*
, storage-core
, etc.
working-directory: packages/default-storage-backend | |
working-directory: packages/storage-backend-default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought more about TYPE_OF_STORAGE-storage-backend convention. We already have other storage called sqlite-storage-backend
. Besides, I don't think we will have more storages in this monorepo anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would look a lot nicer in the directory if we stick to the storage-<category>-<implementation> convention though:
storage-backend-default # What we have in 1.x
storage-backend-mmkv # Maybe?
storage-backend-os-prefs # NSUserDefaults (iOS) or SharedPreference (Android)
storage-backend-sqlite # SQLite
storage-core # JS
storage-types # TypeScript interfaces
But I suppose we could also change this later, so I'll let you decide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should remain in root so that it gets applied to the whole repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good
How do you use this formatter anyway? Simply calling CLI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you should be able to run clang-format
from anywhere. I usually do clang-format -i $(git ls-files '*.cpp' '*.h' '*.m' '*.mm')
so that it doesn't pick up files from node_modules
etc.
@@ -168,3 +177,4 @@ jobs: | |||
git config user.email ${{ secrets.GH_BOT_EMAIL }} | |||
git config user.name ${{ secrets.GH_BOT_NAME }} | |||
yarn semantic-release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for later: We should look into replacing semantic-release
with something that understands monorepos. In rnx-kit, Changesets has been working very well for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, will remember that 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Thanks for putting this together.
🎉 This PR is included in version 1.19.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Moving to monorepo!
Scoping dependencies to each workspace (no hoist) as for now. In upcoming PRs will possibly move example to different workspace.