Skip to content

Commit c6535c0

Browse files
Sebastien-Ahkrintargos
authored andcommitted
lib: replace Symbol global by the primordials Symbol
PR-URL: #30737 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent d4d6172 commit c6535c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+88
-2
lines changed

lib/.eslintrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ rules:
2323
message: "Use `const { Object } = primordials;` instead of the global."
2424
- name: Reflect
2525
message: "Use `const { Reflect } = primordials;` instead of the global."
26+
- name: Symbol
27+
message: "Use `const { Symbol } = primordials;` instead of the global."
2628
no-restricted-syntax:
2729
# Config copied from .eslintrc.js
2830
- error

lib/_http_agent.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const {
2525
ObjectKeys,
2626
ObjectSetPrototypeOf,
2727
ObjectValues,
28+
Symbol,
2829
} = primordials;
2930

3031
const net = require('net');

lib/_http_common.js

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

2424
const {
2525
MathMin,
26+
Symbol,
2627
} = primordials;
2728
const { setImmediate } = require('timers');
2829

lib/_http_outgoing.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const {
2828
ObjectKeys,
2929
ObjectPrototypeHasOwnProperty,
3030
ObjectSetPrototypeOf,
31+
Symbol,
3132
} = primordials;
3233

3334
const { getDefaultHighWaterMark } = require('internal/streams/state');

lib/_http_server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
const {
2525
ObjectKeys,
2626
ObjectSetPrototypeOf,
27+
Symbol,
2728
} = primordials;
2829

2930
const net = require('net');

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+
Symbol,
3031
} = primordials;
3132

3233
module.exports = Readable;

lib/_stream_writable.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const {
2929
Array,
3030
ObjectDefineProperty,
3131
ObjectSetPrototypeOf,
32+
Symbol,
3233
} = primordials;
3334

3435
module.exports = Writable;

lib/_tls_wrap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const {
2525
ObjectAssign,
2626
ObjectDefineProperty,
2727
ObjectSetPrototypeOf,
28+
Symbol,
2829
} = primordials;
2930

3031
const {

lib/async_hooks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const {
44
NumberIsSafeInteger,
55
ReflectApply,
6+
Symbol,
67
} = primordials;
78

89
const {

lib/buffer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const {
3434
ObjectDefineProperties,
3535
ObjectDefineProperty,
3636
ObjectSetPrototypeOf,
37+
Symbol,
3738
} = primordials;
3839

3940
const {

0 commit comments

Comments
 (0)