File tree 8 files changed +34
-1
lines changed
8 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 21
21
message : " Use `const { Boolean } = primordials;` instead of the global."
22
22
- name : Error
23
23
message : " Use `const { Error } = primordials;` instead of the global."
24
+ - name : EvalError
25
+ message : " Use `const { EvalError } = primordials;` instead of the global."
24
26
- name : Float32Array
25
27
message : " Use `const { Float32Array } = primordials;` instead of the global."
26
28
- name : Float64Array
@@ -43,6 +45,10 @@ rules:
43
45
message : " Use `const { Object } = primordials;` instead of the global."
44
46
- name : Promise
45
47
message : " Use `const { Promise } = primordials;` instead of the global."
48
+ - name : RangeError
49
+ message : " Use `const { RangeError } = primordials;` instead of the global."
50
+ - name : ReferenceError
51
+ message : " Use `const { ReferenceError } = primordials;` instead of the global."
46
52
- name : Reflect
47
53
message : " Use `const { Reflect } = primordials;` instead of the global."
48
54
- name : RegExp
@@ -53,6 +59,12 @@ rules:
53
59
message : " Use `const { String } = primordials;` instead of the global."
54
60
- name : Symbol
55
61
message : " Use `const { Symbol } = primordials;` instead of the global."
62
+ - name : SyntaxError
63
+ message : " Use `const { SyntaxError } = primordials;` instead of the global."
64
+ - name : TypeError
65
+ message : " Use `const { TypeError } = primordials;` instead of the global."
66
+ - name : URIError
67
+ message : " Use `const { URIError } = primordials;` instead of the global."
56
68
- name : Uint16Array
57
69
message : " Use `const { Uint16Array } = primordials;` instead of the global."
58
70
- name : WeakMap
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ const {
53
53
ReflectGet,
54
54
SafeSet,
55
55
String,
56
+ TypeError,
56
57
} = primordials ;
57
58
58
59
// Set up process.moduleLoadList.
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const Buffer = require('buffer').Buffer;
4
4
const {
5
5
ArrayPrototypeForEach,
6
6
Error,
7
+ EvalError,
7
8
FunctionPrototypeCall,
8
9
ObjectAssign,
9
10
ObjectCreate,
@@ -13,8 +14,13 @@ const {
13
14
ObjectGetPrototypeOf,
14
15
ObjectKeys,
15
16
ObjectPrototypeToString,
17
+ RangeError,
18
+ ReferenceError,
16
19
SafeSet,
17
20
SymbolToStringTag,
21
+ SyntaxError,
22
+ TypeError,
23
+ URIError,
18
24
} = primordials ;
19
25
20
26
const kSerializedError = 0 ;
Original file line number Diff line number Diff line change @@ -21,10 +21,14 @@ const {
21
21
NumberIsInteger,
22
22
ObjectDefineProperty,
23
23
ObjectKeys,
24
+ RangeError,
24
25
String,
25
26
StringPrototypeStartsWith,
26
27
Symbol,
27
28
SymbolFor,
29
+ SyntaxError,
30
+ TypeError,
31
+ URIError,
28
32
WeakMap,
29
33
} = primordials ;
30
34
Original file line number Diff line number Diff line change 7
7
SafeWeakMap,
8
8
SafeMap,
9
9
SymbolToStringTag,
10
+ TypeError,
10
11
} = primordials ;
11
12
12
13
class ERR_INVALID_THIS extends TypeError {
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ primordials.SafePromise = makeSafe(
125
125
'Boolean' ,
126
126
'Date' ,
127
127
'Error' ,
128
+ 'EvalError' ,
128
129
'Float32Array' ,
129
130
'Float64Array' ,
130
131
'Function' ,
@@ -134,10 +135,15 @@ primordials.SafePromise = makeSafe(
134
135
'Map' ,
135
136
'Number' ,
136
137
'Object' ,
138
+ 'RangeError' ,
139
+ 'ReferenceError' ,
137
140
'RegExp' ,
138
141
'Set' ,
139
142
'String' ,
140
143
'Symbol' ,
144
+ 'SyntaxError' ,
145
+ 'TypeError' ,
146
+ 'URIError' ,
141
147
'Uint16Array' ,
142
148
'Uint32Array' ,
143
149
'Uint8Array' ,
Original file line number Diff line number Diff line change 9
9
ObjectSetPrototypeOf,
10
10
SafePromise,
11
11
Symbol,
12
+ TypeError,
12
13
WeakMap,
13
14
} = primordials ;
14
15
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ const {
60
60
Set,
61
61
StringPrototypeIncludes,
62
62
Symbol,
63
+ SyntaxError,
64
+ SyntaxErrorPrototype,
63
65
WeakSet,
64
66
} = primordials ;
65
67
@@ -1600,7 +1602,7 @@ function defineDefaultCommands(repl) {
1600
1602
function Recoverable ( err ) {
1601
1603
this . err = err ;
1602
1604
}
1603
- ObjectSetPrototypeOf ( Recoverable . prototype , SyntaxError . prototype ) ;
1605
+ ObjectSetPrototypeOf ( Recoverable . prototype , SyntaxErrorPrototype ) ;
1604
1606
ObjectSetPrototypeOf ( Recoverable , SyntaxError ) ;
1605
1607
1606
1608
module . exports = {
You can’t perform that action at this time.
0 commit comments