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

misc: Move to monorepo structure and Yarn V3 #4057

Merged
merged 45 commits into from
Sep 4, 2024
Merged

Conversation

krystofwoldrich
Copy link
Member

@krystofwoldrich krystofwoldrich commented Aug 29, 2024

📢 Type of change

  • Refactoring

📜 Description

This PR change the repository structure to use monorepo setup.

The new structure:

  • / -> monorepo root private package
  • /samples -> sampel application, expo, rn...
  • /packages -> RN SDK packages
  • /dev-packages -> dev packages, ts-3.8 test runner, e2e tests components and runner
  • /performance-tests -> applications used for measuring performance in CI

This PR updates the repository to use Yarn V3, as with Yarn V1 the sample applications would not run due to dependencies conflicts. And the original nohoist would not fix the issue. With nmHoistingLimits: workspaces the RN and Expo application are working correctly.

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • All tests passing
  • No breaking changes

🔮 Next steps

  • Test the publish of @sentry/react-native does introduce unexpected (no) changes compared to version 6.0.0-alpha.0
  • Verify version gets correctly bumped in all dependencies

#skip-changelog

This is a internal change the SDK package published should be unchanged.

Copy link
Contributor

github-actions bot commented Sep 2, 2024

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 401.98 ms 445.34 ms 43.36 ms
Size 7.15 MiB 8.33 MiB 1.19 MiB

Copy link
Contributor

github-actions bot commented Sep 2, 2024

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1232.49 ms 1239.14 ms 6.65 ms
Size 2.36 MiB 3.08 MiB 732.30 KiB

@krystofwoldrich krystofwoldrich marked this pull request as ready for review September 2, 2024 12:51
Copy link
Contributor

github-actions bot commented Sep 2, 2024

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1239.37 ms 1236.35 ms -3.02 ms
Size 2.92 MiB 3.64 MiB 738.25 KiB

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice work! LGTM from monorepo and publishing perspective. Noted down some things to keep in mind when we add more packages but we can do this whenever it's necessary.

Btw: We added this New SDK (package) Checklist to our monorepo docs to keep in mind what to do in which order. Some things are very JS SDK-specific but the general oder of actions and things to keep in mind should apply to this monorepo as well.

- name: Pack
run: yarn pack
run: |
cp README.md packages/core
Copy link
Member

Choose a reason for hiding this comment

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

l (no action required):
Are you keeping the readme of the SDK top level and you copy it to the package to get it into the tarball? No objections btw, just curious.

In the JS SDK monorepo we keep a Readme per package but I guess that's only gonna become necessary if you have more than one package.

.craft.yml Outdated
Copy link
Member

Choose a reason for hiding this comment

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

No immediate action required since you only publish one package at the moment. Once you have more than one pkg, I'd recommend to create one NPM target per package and release in package dependency order.

Copy link
Contributor

github-actions bot commented Sep 3, 2024

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 448.80 ms 456.00 ms 7.20 ms
Size 17.74 MiB 20.06 MiB 2.33 MiB

@krystofwoldrich krystofwoldrich merged commit ddcabff into v6 Sep 4, 2024
59 of 60 checks passed
@krystofwoldrich krystofwoldrich deleted the kw/change-to-monorepo branch September 4, 2024 10:20
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.

2 participants