Skip to content

Commit

Permalink
Revert "fs: remove workaround for esm package"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jeremymeng authored and marco-ippolito committed Feb 29, 2024
1 parent 71a809b commit f130a33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,10 @@ function Stats(dev, mode, nlink, uid, gid, rdev, blksize,
ObjectSetPrototypeOf(Stats.prototype, StatsBase.prototype);
ObjectSetPrototypeOf(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)) {
Expand Down

0 comments on commit f130a33

Please sign in to comment.