Skip to content

Commit

Permalink
lib,test: handle new Iterator global
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Mar 30, 2024
1 parent d5ac47e commit c131f74
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 c131f74

Please sign in to comment.