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

remove condition preventing core moduleIds from resolver #252

Merged

Conversation

iambumblehead
Copy link
Owner

@iambumblehead iambumblehead commented Oct 13, 2023

Per the resolver spec, the resolver should handle builtin module names

PACKAGE_RESOLVE(packageSpecifier, parentURL)
...
3. If packageSpecifier is a Node.js builtin module name, then
. 1. Return the string "node:" concatenated with packageSpecifier.

This PR removes a condition that prevented the resolver from being called with builtin moduleIds and

  • slightly simplifies esmock, esmock calls the resolver with any moduleId
  • anticipates that the resolver is spec compliant and handles builtin moduleIds

@iambumblehead iambumblehead merged commit 7f03aea into main Oct 13, 2023
8 checks passed
@iambumblehead iambumblehead deleted the remove-condition-preventing-coremoduleids-from-resolver branch October 13, 2023 19:09
@iambumblehead
Copy link
Owner Author

its published :) esmock is improved

@koshic
Copy link
Collaborator

koshic commented Oct 13, 2023

Yeah, thx again! ) Now my turn - to tweak pnp resolver a bit and provide wiki example.

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