eslint / eslint

Find and fix problems in your JavaScript code.
https://eslint.org
MIT License
24.39k stars 4.4k forks source link

fix: don't crash when `fs.readFile` returns promise from another realm #18416

Closed mdjermanovic closed 1 week ago

mdjermanovic commented 2 weeks ago

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update [X] Bug fix (template) [ ] New rule (template) [ ] Changes an existing rule (template) [ ] Add autofix to a rule [ ] Add a CLI option [ ] Add something to the core [ ] Other, please explain:

Fixes #18407

What changes did you make? (Give an overview)

Updated @humanwhocodes/retry dependency to the latest v0.2.4 that includes the fix for #18407 and added a test that fails with v0.2.3.

Also updates lib/eslint/eslint.js to use require("fs/promises") instead of require("fs").promises.

Is there anything you'd like reviewers to focus on?

netlify[bot] commented 2 weeks ago

Deploy Preview for docs-eslint ready!

Name Link
Latest commit 0b8b96b3a4d2388ee103bb9e589380b4425892e0
Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/66389b421db8b00008923f53
Deploy Preview https://deploy-preview-18416--docs-eslint.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.