Skip to content

Commit

Permalink
fs: fix (temporary) for esm package
Browse files Browse the repository at this point in the history
Fix to unblock CITGM. See,
standard-things/esm#821.

PR-URL: nodejs#28957
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
ronag authored and Trott committed Aug 7, 2019
1 parent f1478e1 commit 320402c
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 @@ -345,6 +345,10 @@ function Stats(dev, mode, nlink, uid, gid, rdev, blksize,
Object.setPrototypeOf(Stats.prototype, StatsBase.prototype);
Object.setPrototypeOf(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 320402c

Please sign in to comment.