-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
refactor: use ParsedModule and improve MediaTypes enum #7456
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.
LGTM, thank you @kitsonk. I have only one nitpick - take it or leave it.
CC @kdy1 please take a look at |
Seems to close #7168 |
@bartlomieju yes, closes #7168 and cleans up any "magical" logic we had to use. |
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.
LGTM
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'm not sure, mainly because of ErrBox.
Except it, I think it would fit for high level api for swc.
This PR introduced the
ParsedModule
abstraction which holds the entire state for a parsed module and moves all related code toast.rs
instead of the semi-cryptically namedswc_utils.rs
. This also improves and makesMediaType
more idiomatic in Rust.