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

chore: restructure shared and react to use /core package #838

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

yeager-eren
Copy link
Collaborator

@yeager-eren yeager-eren commented Aug 15, 2024

Summary

Update all imports from core to import from core/legacy and move some functionality from /shared to /core.

In long term we will remove wallets-shared, a part of this PR is moving core-related functionality to wallets-ocre. And also this PR prefixed all the legacy core with legacyThenSomething to make sure we are flagging them and give a notice they are deprecated and will be removed in next major version.

Aliasing

In those packages who imported types or functions from legacy code, you will see I'm aliasing the legacySomething to legacySomething as something, this is because I wanted to update only imports and not the usages. I believe this is more appropriate way to reduce the changes.

core/legacy/package.json

module system other than node16 and bundler doesn't have support for package.json's exports field. For backward-compatibility reasons we needed a workaround. I checked some repositories and all of them used the way thar I used in this PR. here is an example.

How did you test this change?

It shouldn't have any side effect on user side. it can affect our building process. so make sure the project will be build correctly.

Related PRs

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Implemented a user interface (UI) change, referencing our Figma design to ensure pixel-perfect precision.

Copy link
Collaborator

@RyukTheCoder RyukTheCoder left a comment

Choose a reason for hiding this comment

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

LGTM

@yeager-eren yeager-eren merged commit afacbc4 into next Aug 19, 2024
5 checks passed
@yeager-eren yeager-eren deleted the chore/restructure-shared-and-core-for-hub branch August 19, 2024 06:40
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