-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
module: add module.customConditions #57688
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
9efaba7
to
6f23b07
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57688 +/- ##
==========================================
+ Coverage 90.23% 90.24% +0.01%
==========================================
Files 630 630
Lines 185245 185261 +16
Branches 36301 36304 +3
==========================================
+ Hits 167154 167192 +38
- Misses 11006 11012 +6
+ Partials 7085 7057 -28
🚀 New features to boost your workflow:
|
6f23b07
to
6bbb2e1
Compare
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 think in order to address the primordial issue, you need to use SafeSet
within getUserConditions
, and then within the getter, wrap the output of getUserConditions
in Set
.
This should help with nodejs#57688 and others
I put up #57723 as a potential way to easily convert a SafeSet to a user-exposable Set, which might help this PR. |
This should help with nodejs#57688 and others
6bbb2e1
to
cae9e94
Compare
Thanks for the reviews! |
1bb3c15
to
66cc00b
Compare
Add module.customConditions which exposes the custom resolution conditions specified by the user. Fixes: nodejs#55824
66cc00b
to
0789c21
Compare
Thanks, I've updated the code! |
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.
How would i polyfill this in a node that doesn’t have it? Would i have to trawl through NODE_OPTIONS and process.argv and the config file, or is there an easier way?
As far as I know, that’s the only way. |
Add
module.customConditions
which exposes the custom resolution conditions specified by the user.Fixes: #55824