fs: fix (temporary) for esm package
Fix to unblock CITGM. See, https://github.com/standard-things/esm/issues/821. PR-URL: https://github.com/nodejs/node/pull/28957 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
parent
f1478e1789
commit
320402c1a1
@ -345,6 +345,10 @@ function Stats(dev, mode, nlink, uid, gid, rdev, blksize,
|
||||
Object.setPrototypeOf(Stats.prototype, StatsBase.prototype);
|
||||
Object.setPrototypeOf(Stats, StatsBase);
|
||||
|
||||
// HACK: Workaround for https://github.com/standard-things/esm/issues/821.
|
||||
// TODO(ronag): Remove this as soon as `esm` publishes a fixed version.
|
||||
Stats.prototype.isFile = StatsBase.prototype.isFile;
|
||||
|
||||
Stats.prototype._checkModeProperty = function(property) {
|
||||
if (isWindows && (property === S_IFIFO || property === S_IFBLK ||
|
||||
property === S_IFSOCK)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user