Closed kraenhansen closed 1 year ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
e2d6419
) 83.09% compared to head (3cef847
) 83.09%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Thanks @kraenhansen - this LGTM (and @huntie), importing to run it through internal CI.
FWIW, enableHastePackages
is default-off from Metro 0.79, so hopefully these cases of unintentionally resolving via Haste should go away, but this is a good correctness fix nonetheless.
@robhogan merged this pull request in facebook/metro@7b1eb60676f0cfe22fcc224fd044fa3a7f2f94d9.
I'm wondering if we need to update the documentation based on this change 🤔
Summary
This fixes #1128 by calling the
resolvePackage
instead ofresolveModulePath
inresolveHasteName
. OnlyresolvePackage
has the code to resolve package "exports" and it callsresolveModulePath
as a fallback.Test plan
I've added a failing test which passed as the fix got implemented.