File tree 13 files changed +29
-3
lines changed
13 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 11
11
- error
12
12
- name : Array
13
13
message : " Use `const { Array } = primordials;` instead of the global."
14
+ - name : ArrayBuffer
15
+ message : " Use `const { ArrayBuffer } = primordials;` instead of the global."
14
16
- name : BigInt
15
17
message : " Use `const { BigInt } = primordials;` instead of the global."
16
18
- name : BigInt64Array
@@ -47,6 +49,12 @@ rules:
47
49
message : " Use `const { Symbol } = primordials;` instead of the global."
48
50
- name : Uint16Array
49
51
message : " Use `const { Uint16Array } = primordials;` instead of the global."
52
+ - name : Uint32Array
53
+ message : " Use `const { Uint32Array } = primordials;` instead of the global."
54
+ - name : Uint8Array
55
+ message : " Use `const { Uint8Array } = primordials;` instead of the global."
56
+ - name : Uint8ClampedArray
57
+ message : " Use `const { Uint8ClampedArray } = primordials;` instead of the global."
50
58
- name : WeakMap
51
59
message : " Use `const { WeakMap } = primordials;` instead of the global."
52
60
- name : WeakSet
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ const {
39
39
ObjectSetPrototypeOf,
40
40
SymbolSpecies,
41
41
SymbolToPrimitive,
42
+ Uint8Array,
42
43
Uint8ArrayPrototype,
43
44
} = primordials ;
44
45
@@ -400,7 +401,7 @@ function SlowBuffer(length) {
400
401
return createUnsafeBuffer ( length ) ;
401
402
}
402
403
403
- ObjectSetPrototypeOf ( SlowBuffer . prototype , Uint8Array . prototype ) ;
404
+ ObjectSetPrototypeOf ( SlowBuffer . prototype , Uint8ArrayPrototype ) ;
404
405
ObjectSetPrototypeOf ( SlowBuffer , Uint8Array ) ;
405
406
406
407
function allocate ( size ) {
Original file line number Diff line number Diff line change 5
5
Float32Array,
6
6
MathFloor,
7
7
Number,
8
+ Uint8Array,
8
9
} = primordials ;
9
10
10
11
const {
Original file line number Diff line number Diff line change 5
5
ObjectDefineProperty,
6
6
ObjectSetPrototypeOf,
7
7
Symbol,
8
+ Uint8Array,
8
9
} = primordials ;
9
10
10
11
const {
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ const {
10
10
ObjectGetOwnPropertyDescriptors,
11
11
Symbol,
12
12
SymbolToStringTag,
13
+ Uint32Array,
14
+ Uint8Array,
13
15
} = primordials ;
14
16
15
17
const {
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ const {
15
15
ReflectGetPrototypeOf,
16
16
Set,
17
17
Symbol,
18
+ Uint32Array,
19
+ Uint8Array,
18
20
} = primordials ;
19
21
20
22
const {
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const {
17
17
SetPrototype,
18
18
SetPrototypeHas,
19
19
StringPrototypeReplace,
20
+ Uint32Array,
20
21
} = primordials ;
21
22
22
23
const {
Original file line number Diff line number Diff line change 2
2
3
3
const {
4
4
SymbolIterator,
5
+ Uint8Array,
5
6
} = primordials ;
6
7
7
8
const { Buffer } = require ( 'buffer' ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const {
20
20
StringPrototypeValueOf,
21
21
SymbolPrototypeValueOf,
22
22
SymbolToStringTag,
23
+ Uint8Array,
23
24
} = primordials ;
24
25
25
26
const { compare } = internalBinding ( 'buffer' ) ;
Original file line number Diff line number Diff line change @@ -52,6 +52,10 @@ const {
52
52
SymbolIterator,
53
53
SymbolToStringTag,
54
54
Uint16Array,
55
+ Uint32Array,
56
+ Uint8Array,
57
+ Uint8ArrayPrototype,
58
+ Uint8ClampedArray,
55
59
uncurryThis,
56
60
} = primordials ;
57
61
@@ -132,7 +136,7 @@ const mapSizeGetter = uncurryThis(
132
136
ObjectGetOwnPropertyDescriptor ( MapPrototype , 'size' ) . get ) ;
133
137
const typedArraySizeGetter = uncurryThis (
134
138
ObjectGetOwnPropertyDescriptor (
135
- ObjectGetPrototypeOf ( Uint8Array . prototype ) , 'length' ) . get ) ;
139
+ ObjectGetPrototypeOf ( Uint8ArrayPrototype ) , 'length' ) . get ) ;
136
140
137
141
let hexSlice ;
138
142
Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ const {
5
5
ObjectGetOwnPropertyDescriptor,
6
6
ObjectGetPrototypeOf,
7
7
SymbolToStringTag,
8
+ Uint8ArrayPrototype,
8
9
uncurryThis,
9
10
} = primordials ;
10
11
11
- const TypedArrayPrototype = ObjectGetPrototypeOf ( Uint8Array . prototype ) ;
12
+ const TypedArrayPrototype = ObjectGetPrototypeOf ( Uint8ArrayPrototype ) ;
12
13
13
14
const TypedArrayProto_toStringTag =
14
15
uncurryThis (
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ const {
11
11
PromiseResolve,
12
12
Symbol,
13
13
SymbolFor,
14
+ Uint32Array,
14
15
} = primordials ;
15
16
16
17
const EventEmitter = require ( 'events' ) ;
Original file line number Diff line number Diff line change 22
22
'use strict' ;
23
23
24
24
const {
25
+ ArrayBuffer,
25
26
Error,
26
27
MathMax,
27
28
NumberIsFinite,
@@ -33,6 +34,7 @@ const {
33
34
ObjectKeys,
34
35
ObjectSetPrototypeOf,
35
36
Symbol,
37
+ Uint32Array,
36
38
} = primordials ;
37
39
38
40
const {
You can’t perform that action at this time.
0 commit comments