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] Update imports to not import from common package root #3345

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

simensma-fresh
Copy link
Collaborator

@simensma-fresh simensma-fresh commented Dec 13, 2024

Objective

MDS-CHORE

The "@mds/common" namespace is polluted with a lot of exports. Some of these have naming collisions that in some cases might cause unforeseen bugs.

This PR updates a fair few imports to be more specific with the goal of eventually get rid of those warnings, which in turn will unblock further improvements such as the use of rspack.

Note: There's still a lot of imports left to fix, but gotta start somewhere

@simensma-fresh simensma-fresh marked this pull request as draft December 13, 2024 22:05
@simensma-fresh simensma-fresh changed the title [CHORE] Update imports to not import from common package root DRAFT - [CHORE] Update imports to not import from common package root Dec 13, 2024
matbusby-fw
matbusby-fw previously approved these changes Dec 16, 2024
Copy link
Collaborator

@matbusby-fw matbusby-fw left a comment

Choose a reason for hiding this comment

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

Nice! Yeah, I've been trying to clean these up when I come accross them, but it's nice to get more of them at once!

@taraepp
Copy link
Collaborator

taraepp commented Dec 16, 2024

Nice. How do you feel about either removing or disabling the Compare Common Redux folder / common-folder-compare PR check? I think it's outlived its usefulness.

taraepp
taraepp previously approved these changes Dec 16, 2024
Copy link

Quality Gate Passed Quality Gate passed for 'bcgov-sonarcloud_mds_minespace-web'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
86.8% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Copy link

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_common'

Failed conditions
70.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_core-web'

Failed conditions
76.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@simensma-fresh simensma-fresh changed the title DRAFT - [CHORE] Update imports to not import from common package root [CHORE] Update imports to not import from common package root Dec 17, 2024
@simensma-fresh simensma-fresh marked this pull request as ready for review December 17, 2024 18:16
@simensma-fresh
Copy link
Collaborator Author

simensma-fresh commented Dec 17, 2024

@matbusby-fw @taraepp Updated this to deal with the rest of the imports. Also nuked the exports in @mds/common/constants, which fixed all the conflicting export warnings.

Agreed that it would be nice to get rid of the common package check. I updated it to ignore whitespace changes to make it a bit less intrusive, but think we should hold off removing it until all the TSF components are out of there

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this file simply be deleted?

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