Skip to content

Commit

Permalink
lib,test: handle new Iterator global
Browse files Browse the repository at this point in the history
Refs: v8/v8@80fb767
PR-URL: #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>
  • Loading branch information
targos committed Mar 31, 2024
1 parent cdc4437 commit 351495e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/common/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const intrinsics = new Set([
'SharedArrayBuffer',
'Atomics',
'WebAssembly',
'Iterator',
]);

if (global.gc) {
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-repl-tab-complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ const builtins = [
'Int32Array',
'Int8Array',
...(common.hasIntl ? ['Intl'] : []),
'Iterator',
'inspector',
'isFinite',
'isNaN',
Expand Down

0 comments on commit 351495e

Please sign in to comment.