Skip to content

Commit 320402c

Browse files
ronagTrott
authored andcommitted
fs: fix (temporary) for esm package
Fix to unblock CITGM. See, standard-things/esm#821. PR-URL: #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>
1 parent f1478e1 commit 320402c

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
@@ -345,6 +345,10 @@ function Stats(dev, mode, nlink, uid, gid, rdev, blksize,
345345
Object.setPrototypeOf(Stats.prototype, StatsBase.prototype);
346346
Object.setPrototypeOf(Stats, StatsBase);
347347

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

0 commit comments

Comments
 (0)