Skip to content

Commit 131d961

Browse files
Sebastien-AhkrinBethGriggs
authored andcommitted
lib: replace Set global by the primordials
PR-URL: #31154 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent e955606 commit 131d961

File tree

13 files changed

+17
-0
lines changed

13 files changed

+17
-0
lines changed

‎lib/.eslintrc.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ rules:
2727
message: "Use `const{Promise } = primordials;` instead of the global."
2828
- name: Reflect
2929
message: "Use `const{Reflect } = primordials;` instead of the global."
30+
- name: Set
31+
message: "Use `const{Set } = primordials;` instead of the global."
3032
- name: Symbol
3133
message: "Use `const{Symbol } = primordials;` instead of the global."
3234
- name: WeakMap

‎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{

‎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
lethook;
44
letconfig;
55

6+
const{
7+
Set,
8+
}=primordials;
9+
610
functionlazyHookCreation(){
711
constinspector=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
constdebug=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
SetPrototype,
1617
SetPrototypeHas,
1718
StringPrototypeReplace,

‎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;

‎lib/internal/util/comparisons.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const{
1414
ObjectPrototypeHasOwnProperty,
1515
ObjectPrototypePropertyIsEnumerable,
1616
ObjectPrototypeToString,
17+
Set,
1718
StringPrototypeValueOf,
1819
SymbolPrototypeValueOf,
1920
}=primordials;

‎lib/internal/util/inspect.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const{
3434
ObjectPrototypePropertyIsEnumerable,
3535
ObjectSeal,
3636
RegExpPrototypeToString,
37+
Set,
3738
SetPrototypeValues,
3839
StringPrototypeValueOf,
3940
SymbolPrototypeToString,

0 commit comments

Comments
(0)