feat: Compatibility with specifier imports #211
Merged
timfish merged 6 commits intonodejs:mainfrom Oct 9, 2025
Merged
Conversation
jsumners-nr
previously approved these changes
Oct 2, 2025
Contributor
jsumners-nr
left a comment
There was a problem hiding this comment.
Looks reasonable with linting fixed.
timfish
reviewed
Oct 2, 2025
21de0c1 to
a153042
Compare
watson
reviewed
Oct 3, 2025
timfish
previously approved these changes
Oct 3, 2025
AbhiPrasad
previously approved these changes
Oct 5, 2025
BridgeAR
reviewed
Oct 5, 2025
lib/get-exports.js
Outdated
| return null | ||
| } | ||
| } | ||
| } catch (error) { |
Member
There was a problem hiding this comment.
Suggested change
| } catch (error) { | |
| } catch { |
Alternatively, we could also just add the cause
895825e to
d31e359
Compare
BridgeAR
reviewed
Oct 6, 2025
3a000d2 to
1f7a010
Compare
1f7a010 to
2022e5e
Compare
timfish
previously approved these changes
Oct 7, 2025
jsumners-nr
previously approved these changes
Oct 7, 2025
timfish
previously approved these changes
Oct 8, 2025
BridgeAR
previously approved these changes
Oct 8, 2025
Member
BridgeAR
left a comment
There was a problem hiding this comment.
LGTM, while I think we should add the cause to the error we create in the catch clause.
Contributor
Author
Completely missed this, should I go ahead and add it? |
Member
|
@pabloerhard I would suggest yes, or we have a separate PR? It should be fast to get a new LG one way or the other. |
ad9a9bf
jsumners-nr
approved these changes
Oct 9, 2025
timfish
approved these changes
Oct 9, 2025
BridgeAR
approved these changes
Oct 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds compatibility with specifiers, for example:
module.exports = require('#main-entry-point');These specifiers are defined inside the package.json file and can reference either a local file or an external module.
The proposed solution works as follows: whenever a require call begins with # (all specifiers must start with #), locates the package.json, extracts the corresponding reference from the imports field, and sets the newUrl with the resolved path, maintains any original process after that.