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

esm: fix inconsistency of importAssertion between resolve and load hook #55365

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yesmeck
Copy link

@yesmeck yesmeck commented Oct 12, 2024

As the documentation says, the context.importAssertion should be still supported and emit a warning. This is true for the load hook, but not correct for context of the resolve hook.

This PR is tring to fix the inconsistency.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Oct 12, 2024
@yesmeck yesmeck marked this pull request as ready for review October 12, 2024 11:09
…d hook

As the [documentation](https://nodejs.org/docs/latest/api/module.html#customization-hooks:~:text=The%20property%20context.importAssertions%20is%20replaced%20with%20context.importAttributes.%20Using%20the%20old%20name%20is%20still%20supported%20and%20will%20emit%20an%20experimental%20warning.) says, the `context.importAssertion` should be still supported and emit a warning. This is true for the load hook, but not correct for context of the resolve hook.

This PR is tring to fix the inconsistency.
@yesmeck yesmeck force-pushed the alias-import-assertion-for-resolve-hook branch from 8530577 to b923ecb Compare October 12, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants