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

Add diagnostic logging to determine import assertion use #3389

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Jan 21, 2025

The specification for import assertions strongly recommends that embedders reject import attributes and types they do not understand/implement. This is because import attributes can alter the interpretation of a module and are considered to be part of the unique key for caching a module. Throwing an error for things we do not understand is the safest thing to do. However, historically we have not followed this guideline in the spec and it's not clear if enforcing that constraint would be breaking so let's first try to determine if anyone is making use of import assertions. If we're lucky, we won't receive any hits on this and we can start enforcing the rule without a compat flag.

@jasnell jasnell requested review from a team as code owners January 21, 2025 22:00
@jasnell
Copy link
Member Author

jasnell commented Jan 21, 2025

@jasnell jasnell merged commit 4b4d7ee into main Jan 21, 2025
17 checks passed
@jasnell jasnell deleted the jasnell/moar-work-on-new-module-registry branch January 21, 2025 22:30
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