module: fix main lookup regression from #18728#18788
module: fix main lookup regression from #18728#18788guybedford wants to merge 1 commit intonodejs:masterfrom
Conversation
b419326 to
3e9066c
Compare
benjamingr
left a comment
There was a problem hiding this comment.
This can be fast tracked IMO
|
Also, that's weird @guybedford - it shouldn't be possible as far as I know :O http://coliru.stacked-crooked.com/a/efc7c335a197e56d |
|
@guybedford What was the regression? |
|
@jdalton the process of applying the package.json @benjamingr that is really odd then that there was not even a compiler warning, and seems like it could be a problem! Since we don't have compiler warnings for these cases, do you think I should just extend bool for these enums and switch their parity so they can be treated as booleans without breaking? Just thinking of maintainability here. |
|
Landed in 7748865 🎉 |
PR-URL: nodejs#18788 Refs: nodejs#18728 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
|
this should be backported with #18728 |
PR-URL: nodejs#18788 Refs: nodejs#18728 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: #18923 PR-URL: #18788 Refs: #18728 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#18788 Refs: nodejs#18728 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
There was a minor regression in #18728 in the package.json main resolution code path.
This includes a test and a fix, hopefully these sort of slips will become harder as the test coverage on the modules work increases.
@bnoordhuis one of the slips here was on the enum booleans being checked as booleans. I considered making them extend boolean, but I assumed the intention is that usage should always be explicit with these, although it's a shame this can't be caught by the compiler at all.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
modules