Skip to content

fs: restore fs patchability in ESM loader#62835

Open
joyeecheung wants to merge 1 commit intonodejs:mainfrom
joyeecheung:fs-lookup
Open

fs: restore fs patchability in ESM loader#62835
joyeecheung wants to merge 1 commit intonodejs:mainfrom
joyeecheung:fs-lookup

Conversation

@joyeecheung
Copy link
Copy Markdown
Member

Temporarily restore fs patchability in ESM loader as a workaround for helping downstream projects that depend on this undocumented hidden contract transition into using hook proper APIs. This patch intentionally avoids adding a test and instead adds warning comments to hopefully steer new code away from depending on it.

Refs: #62012

Temporarily restore fs patchability in ESM loader as a workaround
for helping downstream projects that depend on this undocumented
hidden contract transition into using hook proper APIs. This patch
intentionally avoids adding a test and instead adds warning
comments to hopefully steer new code away from depending on it.
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Apr 19, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.63%. Comparing base (dfe438d) to head (79a7b4c).
⚠️ Report is 58 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62835      +/-   ##
==========================================
- Coverage   89.81%   89.63%   -0.19%     
==========================================
  Files         699      706       +7     
  Lines      216379   219148    +2769     
  Branches    41366    41981     +615     
==========================================
+ Hits       194340   196424    +2084     
- Misses      14139    14617     +478     
- Partials     7900     8107     +207     
Files with missing lines Coverage Δ
lib/internal/modules/esm/load.js 91.62% <100.00%> (+0.15%) ⬆️
lib/internal/modules/esm/resolve.js 99.04% <100.00%> (+<0.01%) ⬆️
lib/internal/modules/esm/translators.js 97.68% <100.00%> (+0.01%) ⬆️

... and 77 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants