enhanced-resolve icon indicating copy to clipboard operation
enhanced-resolve copied to clipboard

perf: utilize throwIfNoEntry in sync mode

Open markjm opened this issue 3 years ago • 4 comments

Resolves https://github.com/webpack/enhanced-resolve/issues/316

Additionally fixing a few types and updating graceful-fs to support the new option. Thankfully, stat being null (vs throwing) is already being handled correctly.

cc @alexander-akait - graceful-fs has been updated now so this is unblocked

markjm avatar Jan 06 '22 01:01 markjm

Actually - need to wait on this to figure out how to upgrade graceful-fs in webpack in a non-breaking way

markjm avatar Jan 06 '22 01:01 markjm

Codecov Report

Base: 95.18% // Head: 95.18% // No change to project coverage :thumbsup:

Coverage data is based on head (96be62d) compared to base (651e578). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #324   +/-   ##
=======================================
  Coverage   95.18%   95.18%           
=======================================
  Files          40       40           
  Lines        1661     1661           
=======================================
  Hits         1581     1581           
  Misses         80       80           
Impacted Files Coverage Δ
lib/Resolver.js 88.00% <ø> (ø)
lib/DirectoryExistsPlugin.js 100.00% <100.00%> (ø)
lib/FileExistsPlugin.js 95.45% <100.00%> (ø)
lib/ModulesInHierarchicalDirectoriesPlugin.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jan 06 '22 12:01 codecov[bot]

Was this blocked on https://github.com/webpack/webpack/pull/15118? If so, are all blockers resolved now?

ehoogeveen-medweb avatar Sep 08 '22 08:09 ehoogeveen-medweb

Yes, all blockers are resolved - the only concern would be if folks are using an older 4.xx version of webpack which doesnt contain the change you linked, but only upgraded enhanced-resolve. Any new installations of webpack would pick up this version, which is fine, but a repo with locked webpack version which tries to upgrade this would see some breakage.

That may be so niche of a break that its not worth considering, but I would defer to @sokra to decide how to integrate these changes.

Further note - this version works just fine "standalone", the potential issue comes because webpack passes in its own fs, and earlier versions of webpack fs contains a bug related to this setting.

markjm avatar Sep 08 '22 19:09 markjm

Any new installations of webpack would pick up this version, which is fine, but a repo with locked webpack version which tries to upgrade this would see some breakage.

In the unlikely event of upgrading only enhanced-resolve, but not graceful-fs or webpack, we can expect people to update graceful-fs to fix the bug they are running into.

sokra avatar Nov 09 '22 10:11 sokra

Thanks @sokra - mind publishing a new version w this change?

markjm avatar Nov 18 '22 22:11 markjm