◐ Shell
clean mode source ↗

tools: add BigInt to globals · nodejs/node@7f70fe8

Original file line numberDiff line numberDiff line change

@@ -243,6 +243,7 @@ module.exports = {

243243

'node-core/no-unescaped-regexp-dot': 'error',

244244

},

245245

globals: {

246+

BigInt: false,

246247

COUNTER_HTTP_CLIENT_REQUEST: false,

247248

COUNTER_HTTP_CLIENT_RESPONSE: false,

248249

COUNTER_HTTP_SERVER_REQUEST: false,

Original file line numberDiff line numberDiff line change

@@ -160,7 +160,6 @@ Stats.prototype._checkModeProperty = function(property) {

160160

return false; // Some types are not available on Windows

161161

}

162162

if (typeof this.mode === 'bigint') { // eslint-disable-line valid-typeof

163-

// eslint-disable-next-line no-undef

164163

return (this.mode & BigInt(S_IFMT)) === BigInt(property);

165164

}

166165

return (this.mode & S_IFMT) === property;

Original file line numberDiff line numberDiff line change

@@ -31,7 +31,6 @@ function verifyStats(bigintStats, numStats) {

3131

`difference of ${key}.getTime() should < 2.\n` +

3232

`Number version ${time}, BigInt version ${time2}n`);

3333

} else if (key === 'mode') {

34-

// eslint-disable-next-line no-undef

3534

assert.strictEqual(bigintStats[key], BigInt(val));

3635

assert.strictEqual(

3736

bigintStats.isBlockDevice(),

@@ -65,7 +64,6 @@ function verifyStats(bigintStats, numStats) {

6564

assert.strictEqual(bigintStats[key], undefined);

6665

assert.strictEqual(numStats[key], undefined);

6766

} else if (Number.isSafeInteger(val)) {

68-

// eslint-disable-next-line no-undef

6967

assert.strictEqual(bigintStats[key], BigInt(val));

7068

} else {

7169

assert(