Skip to content

Commit 015e801

Browse files
lib: replace Set global by the primordials
1 parent e9695d9 commit 015e801

File tree

15 files changed

+19
-0
lines changed

15 files changed

+19
-0
lines changed

lib/.eslintrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ rules:
2929
message: "Use `const { Reflect } = primordials;` instead of the global."
3030
- name: Symbol
3131
message: "Use `const { Symbol } = primordials;` instead of the global."
32+
- name: Set
33+
message: "Use `const { Set } = primordials;` instead of the global."
3234
no-restricted-syntax:
3335
# Config copied from .eslintrc.js
3436
- error

lib/_stream_readable.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const {
2727
NumberIsNaN,
2828
ObjectDefineProperty,
2929
ObjectSetPrototypeOf,
30+
Set,
3031
SymbolAsyncIterator,
3132
Symbol
3233
} = primordials;

lib/internal/fs/rimraf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
const {
1010
Promise,
11+
Set,
1112
} = primordials;
1213

1314
const { Buffer } = require('buffer');

lib/internal/http2/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const {
1212
ObjectPrototypeHasOwnProperty,
1313
Promise,
1414
ReflectGetPrototypeOf,
15+
Set,
1516
Symbol,
1617
} = primordials;
1718

lib/internal/http2/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const {
66
Number,
77
ObjectCreate,
88
ObjectKeys,
9+
Set,
910
Symbol,
1011
} = primordials;
1112

lib/internal/inspector_async_hook.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
let hook;
44
let config;
55

6+
const {
7+
Set,
8+
} = primordials;
9+
610
function lazyHookCreation() {
711
const inspector = internalBinding('inspector');
812
const { createHook } = require('async_hooks');

lib/internal/modules/esm/create_dynamic_module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const {
55
ArrayPrototypeMap,
66
JSONStringify,
77
ObjectCreate,
8+
Set,
89
} = primordials;
910

1011
const debug = require('internal/util/debuglog').debuglog('esm');

lib/internal/process/per_thread.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const {
1212
ObjectFreeze,
1313
ObjectGetOwnPropertyDescriptors,
1414
RegExpPrototypeTest,
15+
Set,
1516
SetPrototypeHas,
1617
StringPrototypeReplace,
1718
} = primordials;

lib/internal/repl/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const {
44
MathMin,
5+
Set,
56
Symbol,
67
} = primordials;
78

lib/internal/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const {
1212
ObjectSetPrototypeOf,
1313
Promise,
1414
ReflectConstruct,
15+
Set,
1516
Symbol,
1617
SymbolFor,
1718
} = primordials;

0 commit comments

Comments
 (0)