fs: restore javascript realpath implementation
Checklist
-
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
fs
Description of change
Libuv realpath
implementation brought a lot of problems described here https://github.com/nodejs/node/issues/7726. This restores old JS implementation of realpath
and realpathSync
, adding new API, with options
in place of cache
.
This requires #7846 to land, as it reverts changes to fs
on which old JS implementation depended. This PR is about 3rd and 4th commit which bring back old realpath
implementation with support for the new API.
First two commits are from https://github.com/nodejs/node/pull/7846, reverting some changes to fs
that landed after JS realpath
implementation was dropped.
Third commit reverts https://github.com/nodejs/node/commit/b488b19eaf2b2e7a3ca5eccd2445e245847a5f76 bringing back JS implementation of realpath
and realpathSync
.
Fourth commit updates old implementation. It removes the cache and implements new realpath
API (support for encoding
parameter).
This cannot land before #7846. In case #7846 does not make it, this can be easily updated.