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
  • Loading branch information
jeremymeng committed Jan 5, 2024
1 parent fc10f88 commit 1c408b0
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 @@ -498,6 +498,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 1c408b0

Please sign in to comment.