Skip to content

Commit 6ff803d

Browse files
ronagBridgeAR
authored andcommitted
fs: fix (temporary) for esm package
Fix to unblock CITGM. See, standard-things/esm#821. PR-URL: #28957 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent e6353bd commit 6ff803d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/internal/fs/utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ function Stats(dev, mode, nlink, uid, gid, rdev, blksize,
346346
Object.setPrototypeOf(Stats.prototype, StatsBase.prototype);
347347
Object.setPrototypeOf(Stats, StatsBase);
348348

349+
// HACK: Workaround for https://github.com/standard-things/esm/issues/821.
350+
// TODO(ronag): Remove this as soon as `esm` publishes a fixed version.
351+
Stats.prototype.isFile = StatsBase.prototype.isFile;
352+
349353
Stats.prototype._checkModeProperty = function(property) {
350354
if (isWindows && (property === S_IFIFO || property === S_IFBLK ||
351355
property === S_IFSOCK)) {

0 commit comments

Comments
 (0)