mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
lib,test: handle new Iterator global
Refs: https://github.com/v8/v8/commit/80fb7673eb2ddd2494edf6a491b943e574743d2c PR-URL: https://github.com/nodejs/node/pull/51362 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
3 files changed
+4
No files matched your search
@@ -65,6 +65,8 @@ rules:
|
||||
# disabled with --without-intl build flag.
|
||||
- name: Intl
|
||||
message: Use `const { Intl } = globalThis;` instead of the global.
|
||||
- name: Iterator
|
||||
message: Use `const { Iterator } = globalThis;` instead of the global.
|
||||
- name: MessageChannel
|
||||
message: Use `const { MessageChannel } = require('internal/worker/io');` instead of the global.
|
||||
- name: MessageEvent
|
||||
|
||||
@@ -63,6 +63,7 @@ const intrinsics = new Set([
|
||||
'SharedArrayBuffer',
|
||||
'Atomics',
|
||||
'WebAssembly',
|
||||
'Iterator',
|
||||
]);
|
||||
|
||||
if (global.gc) {
|
||||
|
||||
@@ -632,6 +632,7 @@ const builtins = [
|
||||
'Int32Array',
|
||||
'Int8Array',
|
||||
...(common.hasIntl ? ['Intl'] : []),
|
||||
'Iterator',
|
||||
'inspector',
|
||||
'isFinite',
|
||||
'isNaN',
|
||||
|
||||
Reference in new issue
Block a user