-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: unflag resolve self #31002
module: unflag resolve self #31002
Conversation
//cc @nodejs/modules-active-members |
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.
RSLGTM if tests are green
Should #31009 land before this does? |
That would probably be slightly preferable, although they could land in either order, so long as the bug fix lands before the unflagging is released. |
I think we should land behavior changes before unflagging |
e963247
to
c190b53
Compare
The behaviour changes have landed in 8a96d05, so this is in theory ready to go now. |
c190b53
to
514a61d
Compare
Codecov Report
@@ Coverage Diff @@
## master #31002 +/- ##
=======================================
Coverage 97.33% 97.33%
=======================================
Files 189 189
Lines 63888 63888
=======================================
Hits 62184 62184
Misses 1704 1704 Continue to review full report at Codecov.
|
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.
LGTM if the modules team is good with it.
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.
LGTM but I think there's an orphaned file that could be deleted.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PR-URL: #31002 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Landed in c7f328f 🎉 |
PR-URL: #31002 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #31002 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #31002 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This major release is mostly about keeping import map for node module and writing importmap file separated. - replace generateImportMapForProjectPackage by getImportMapFromNodeModules - getImportMapFromNodeModules only return importmap, it does not write to filesystem anymore. - add getImportMapFromFile - add generateImportMapForProject - generate importmap for package self ref by default see nodejs/node#31002 - rename some parameter like favoredExports becoming packagesExportsPreference - ensure a package self reference is stronger than self dev dependency
Unflags the
--experimental-resolve-self
option, which allows packages to load their own"exports"
definitions through an import to their own package name.For CommonJS this approach is backwards-compatible because the own name resolution is only attempted after all other resolutions fail.Backwards compatibility is now ensured by only supporting own-name resolution when
"exports"
in the package.json is set. When it is, this resolution applies before any node_modules lookup checks.Opening now to discuss along with overall resolver stability concerns.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes