File tree Expand file tree Collapse file tree 8 files changed +34
-1
lines changed
Expand file tree Collapse file tree 8 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 2121 message : " Use `const { Boolean } = primordials;` instead of the global."
2222 - name : Error
2323 message : " Use `const { Error } = primordials;` instead of the global."
24+ - name : EvalError
25+ message : " Use `const { EvalError } = primordials;` instead of the global."
2426 - name : Float32Array
2527 message : " Use `const { Float32Array } = primordials;` instead of the global."
2628 - name : Float64Array
@@ -43,6 +45,10 @@ rules:
4345 message : " Use `const { Object } = primordials;` instead of the global."
4446 - name : Promise
4547 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."
4652 - name : Reflect
4753 message : " Use `const { Reflect } = primordials;` instead of the global."
4854 - name : RegExp
@@ -53,6 +59,12 @@ rules:
5359 message : " Use `const { String } = primordials;` instead of the global."
5460 - name : Symbol
5561 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."
5668 - name : Uint16Array
5769 message : " Use `const { Uint16Array } = primordials;` instead of the global."
5870 - name : WeakMap
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ const {
5353 ReflectGet,
5454 SafeSet,
5555 String,
56+ TypeError,
5657} = primordials ;
5758
5859// Set up process.moduleLoadList.
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const Buffer = require('buffer').Buffer;
44const {
55 ArrayPrototypeForEach,
66 Error,
7+ EvalError,
78 FunctionPrototypeCall,
89 ObjectAssign,
910 ObjectCreate,
@@ -13,8 +14,13 @@ const {
1314 ObjectGetPrototypeOf,
1415 ObjectKeys,
1516 ObjectPrototypeToString,
17+ RangeError,
18+ ReferenceError,
1619 SafeSet,
1720 SymbolToStringTag,
21+ SyntaxError,
22+ TypeError,
23+ URIError,
1824} = primordials ;
1925
2026const kSerializedError = 0 ;
Original file line number Diff line number Diff line change @@ -21,10 +21,14 @@ const {
2121 NumberIsInteger,
2222 ObjectDefineProperty,
2323 ObjectKeys,
24+ RangeError,
2425 String,
2526 StringPrototypeStartsWith,
2627 Symbol,
2728 SymbolFor,
29+ SyntaxError,
30+ TypeError,
31+ URIError,
2832 WeakMap,
2933} = primordials ;
3034
Original file line number Diff line number Diff line change 77 SafeWeakMap,
88 SafeMap,
99 SymbolToStringTag,
10+ TypeError,
1011} = primordials ;
1112
1213class ERR_INVALID_THIS extends TypeError {
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ primordials.SafePromise = makeSafe(
125125 'Boolean' ,
126126 'Date' ,
127127 'Error' ,
128+ 'EvalError' ,
128129 'Float32Array' ,
129130 'Float64Array' ,
130131 'Function' ,
@@ -134,10 +135,15 @@ primordials.SafePromise = makeSafe(
134135 'Map' ,
135136 'Number' ,
136137 'Object' ,
138+ 'RangeError' ,
139+ 'ReferenceError' ,
137140 'RegExp' ,
138141 'Set' ,
139142 'String' ,
140143 'Symbol' ,
144+ 'SyntaxError' ,
145+ 'TypeError' ,
146+ 'URIError' ,
141147 'Uint16Array' ,
142148 'Uint32Array' ,
143149 'Uint8Array' ,
Original file line number Diff line number Diff line change 99 ObjectSetPrototypeOf,
1010 SafePromise,
1111 Symbol,
12+ TypeError,
1213 WeakMap,
1314} = primordials ;
1415
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ const {
6060 Set,
6161 StringPrototypeIncludes,
6262 Symbol,
63+ SyntaxError,
64+ SyntaxErrorPrototype,
6365 WeakSet,
6466} = primordials ;
6567
@@ -1600,7 +1602,7 @@ function defineDefaultCommands(repl) {
16001602function Recoverable ( err ) {
16011603 this . err = err ;
16021604}
1603- ObjectSetPrototypeOf ( Recoverable . prototype , SyntaxError . prototype ) ;
1605+ ObjectSetPrototypeOf ( Recoverable . prototype , SyntaxErrorPrototype ) ;
16041606ObjectSetPrototypeOf ( Recoverable , SyntaxError ) ;
16051607
16061608module . exports = {
You can’t perform that action at this time.
0 commit comments