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 nodejs#51081
  • Loading branch information
jeremymeng authored and targos committed Feb 20, 2024
1 parent 83f581d commit a8d2d56
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 a8d2d56

Please sign in to comment.