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 marco-ippolito committed Feb 27, 2024
1 parent 71a809b commit 4368d29
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 4368d29

Please sign in to comment.