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

separate export map from its builder #2985

Merged
merged 1 commit into from Mar 22, 2024

Conversation

soryy708
Copy link
Contributor

@soryy708 soryy708 commented Mar 18, 2024

ExportMap is currently a very large file that is hard to follow, and therefore hard to maintain.

I identified that its static methods, which are responsible for building instances of ExportMap, can be generalized to the builder software design pattern.

Lets make the separation, to make it clear that instances of ExportMap aren't coupled to any of the globals or procedures that are currently in ExportMap.js.

It's also good to rename the files and classes appropriately.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Assuming that the ExportMap class is moved without changes, this LGTM!

tests/src/core/getExports.js Outdated Show resolved Hide resolved
@ljharb ljharb force-pushed the export-map-separate-factory branch from cc1b19e to 7a28ba2 Compare March 22, 2024 00:00
@ljharb ljharb merged commit 7a28ba2 into import-js:main Mar 22, 2024
175 of 176 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants