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
@@ -67,6 +69,12 @@ rules:
67
69
message : " Use `const { URIError } = primordials;` instead of the global."
68
70
- name : Uint16Array
69
71
message : " Use `const { Uint16Array } = primordials;` instead of the global."
72
+ - name : Uint32Array
73
+ message : " Use `const { Uint32Array } = primordials;` instead of the global."
74
+ - name : Uint8Array
75
+ message : " Use `const { Uint8Array } = primordials;` instead of the global."
76
+ - name : Uint8ClampedArray
77
+ message : " Use `const { Uint8ClampedArray } = primordials;` instead of the global."
70
78
- name : WeakMap
71
79
message : " Use `const { WeakMap } = primordials;` instead of the global."
72
80
- 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
@@ -403,7 +404,7 @@ function SlowBuffer(length) {
403
404
return createUnsafeBuffer ( length ) ;
404
405
}
405
406
406
- ObjectSetPrototypeOf ( SlowBuffer . prototype , Uint8Array . prototype ) ;
407
+ ObjectSetPrototypeOf ( SlowBuffer . prototype , Uint8ArrayPrototype ) ;
407
408
ObjectSetPrototypeOf ( SlowBuffer , Uint8Array ) ;
408
409
409
410
function allocate ( size ) {
Original file line number Diff line number Diff line change 6
6
Float64Array,
7
7
MathFloor,
8
8
Number,
9
+ Uint8Array,
9
10
} = primordials ;
10
11
11
12
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 @@ -18,6 +18,7 @@ const {
18
18
SetPrototype,
19
19
SetPrototypeHas,
20
20
StringPrototypeReplace,
21
+ Uint32Array,
21
22
} = primordials ;
22
23
23
24
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 @@ -58,6 +58,10 @@ const {
58
58
SymbolIterator,
59
59
SymbolToStringTag,
60
60
Uint16Array,
61
+ Uint32Array,
62
+ Uint8Array,
63
+ Uint8ArrayPrototype,
64
+ Uint8ClampedArray,
61
65
uncurryThis,
62
66
} = primordials ;
63
67
@@ -138,7 +142,7 @@ const mapSizeGetter = uncurryThis(
138
142
ObjectGetOwnPropertyDescriptor ( MapPrototype , 'size' ) . get ) ;
139
143
const typedArraySizeGetter = uncurryThis (
140
144
ObjectGetOwnPropertyDescriptor (
141
- ObjectGetPrototypeOf ( Uint8Array . prototype ) , 'length' ) . get ) ;
145
+ ObjectGetPrototypeOf ( Uint8ArrayPrototype ) , 'length' ) . get ) ;
142
146
143
147
let hexSlice ;
144
148
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 @@ -14,6 +14,7 @@ const {
14
14
String,
15
15
Symbol,
16
16
SymbolFor,
17
+ Uint32Array,
17
18
} = primordials ;
18
19
19
20
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