Skip to content

fs: warn instead of throwing if no callback

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

fs

Description of change

https://github.com/nodejs/node/commit/9359de9dd2eae06ed5afcb75dad9bd4c466eb69d made sure that if no callback function is passed to asynchronous functions, the system will throw.

But, this breaks a lot of existing modules including npm (Refer: https://github.com/nodejs/node/pull/7846). Till all the necessary dependencies use the async functions properly, no module can work.

So, this patch issues a deprecation warning, instead of throwing and the throwing behaviour will be restored in the next major release.


cc @ChALkeR @nodejs/collaborators @nodejs/ctc

Merge request reports

Loading