Skip to content

Commit 02ed713

Browse files
Sebastien-Ahkrintargos
authored andcommitted
lib: replace use of Error with primordials
PR-URL: #31163 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent e5b7d64 commit 02ed713

29 files changed

+34
-0
lines changed

lib/.eslintrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ rules:
1515
message: "Use `const { BigInt } = primordials;` instead of the global."
1616
- name: Boolean
1717
message: "Use `const { Boolean } = primordials;` instead of the global."
18+
- name: Error
19+
message: "Use `const { Error } = primordials;` instead of the global."
1820
- name: JSON
1921
message: "Use `const { JSON } = primordials;` instead of the global."
2022
- name: Math

lib/_http_client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
const {
2525
ArrayIsArray,
2626
Boolean,
27+
Error,
2728
NumberIsFinite,
2829
ObjectAssign,
2930
ObjectKeys,

lib/_http_server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'use strict';
2323

2424
const {
25+
Error,
2526
ObjectKeys,
2627
ObjectSetPrototypeOf,
2728
Symbol,

lib/assert.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
'use strict';
2222

2323
const {
24+
Error,
2425
ObjectAssign,
2526
ObjectIs,
2627
ObjectKeys,

lib/buffer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
const {
2525
Array,
2626
ArrayIsArray,
27+
Error,
2728
MathFloor,
2829
MathMin,
2930
MathTrunc,

lib/child_process.js

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

2424
const {
2525
ArrayIsArray,
26+
Error,
2627
NumberIsInteger,
2728
ObjectAssign,
2829
ObjectDefineProperty,

lib/domain.js

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

2929
const {
3030
Array,
31+
Error,
3132
ObjectDefineProperty,
3233
ReflectApply,
3334
Symbol,

lib/events.js

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

2424
const {
2525
Array,
26+
Error,
2627
MathMin,
2728
NumberIsNaN,
2829
ObjectCreate,

lib/internal/assert/assertion_error.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const {
4+
Error,
45
MathMax,
56
ObjectCreate,
67
ObjectDefineProperty,

lib/internal/async_hooks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const {
4+
Error,
45
FunctionPrototypeBind,
56
NumberIsSafeInteger,
67
ObjectDefineProperty,

0 commit comments

Comments
 (0)