Skip to content

Commit f130a33

Browse files
jeremymengmarco-ippolito
authored andcommitted
Revert "fs: remove workaround for esm package"
This reverts commit 95b1989. It appears that the workaround is still needed: issue #51081 Backport-PR-URL: #51390 PR-URL: #50907 Fixes: #51081 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent 71a809b commit f130a33

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/internal/fs/utils.js

+4
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,10 @@ function Stats(dev, mode, nlink, uid, gid, rdev, blksize,
500500
ObjectSetPrototypeOf(Stats.prototype, StatsBase.prototype);
501501
ObjectSetPrototypeOf(Stats, StatsBase);
502502

503+
// HACK: Workaround for https://github.com/standard-things/esm/issues/821.
504+
// TODO(ronag): Remove this as soon as `esm` publishes a fixed version.
505+
Stats.prototype.isFile = StatsBase.prototype.isFile;
506+
503507
Stats.prototype._checkModeProperty = function(property) {
504508
if (isWindows && (property === S_IFIFO || property === S_IFBLK ||
505509
property === S_IFSOCK)) {

0 commit comments

Comments
 (0)