From 698a83e1ca56e36c582741d3a288b6848b951157 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 4 Feb 2024 23:17:45 -0800 Subject: [PATCH] [Deps] update `array-buffer-byte-length`, `is-array-buffer`, `which-typed-array` --- Uint8Array.fromBase64/implementation.js | 4 ++-- Uint8Array.fromBase64Into/implementation.js | 4 ++-- Uint8Array.fromHex/implementation.js | 4 ++-- Uint8Array.fromHexInto/implementation.js | 4 ++-- Uint8Array.prototype.toBase64/implementation.js | 4 +--- aos/ArrayBufferByteLength.js | 4 +--- aos/DecodeBase64Chunk.js | 6 ++---- aos/FromBase64.js | 6 ++---- aos/FromHex.js | 4 ++-- aos/GetOptionsObject.js | 4 +--- aos/GetUint8ArrayBytes.js | 4 +--- aos/IsFixedLengthArrayBuffer.js | 4 +--- aos/IsResizableArrayBuffer.js | 4 +--- aos/IsTypedArrayOutOfBounds.js | 4 +--- aos/MakeTypedArrayWithBufferWitnessRecord.js | 4 +--- aos/SkipAsciiWhitespace.js | 4 +--- aos/TypedArrayLength.js | 4 +--- aos/ValidateUint8Array.js | 4 +--- aos/helpers/alphabetFromIdentifier.js | 4 +--- package.json | 7 ++++--- 20 files changed, 30 insertions(+), 57 deletions(-) diff --git a/Uint8Array.fromBase64/implementation.js b/Uint8Array.fromBase64/implementation.js index 0651b16..2625115 100644 --- a/Uint8Array.fromBase64/implementation.js +++ b/Uint8Array.fromBase64/implementation.js @@ -2,8 +2,8 @@ var GetIntrinsic = require('get-intrinsic'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); var $Uint8Array = GetIntrinsic('%Uint8Array%', true); var FromBase64 = require('../aos/FromBase64'); diff --git a/Uint8Array.fromBase64Into/implementation.js b/Uint8Array.fromBase64Into/implementation.js index 104e6d1..3bd9749 100644 --- a/Uint8Array.fromBase64Into/implementation.js +++ b/Uint8Array.fromBase64Into/implementation.js @@ -2,8 +2,8 @@ var GetIntrinsic = require('get-intrinsic'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); var $Uint8Array = GetIntrinsic('%Uint8Array%', true); var FromBase64 = require('../aos/FromBase64'); diff --git a/Uint8Array.fromHex/implementation.js b/Uint8Array.fromHex/implementation.js index f1986f7..90c5396 100644 --- a/Uint8Array.fromHex/implementation.js +++ b/Uint8Array.fromHex/implementation.js @@ -2,8 +2,8 @@ var GetIntrinsic = require('get-intrinsic'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); var $Uint8Array = GetIntrinsic('%Uint8Array%', true); var FromHex = require('../aos/FromHex'); diff --git a/Uint8Array.fromHexInto/implementation.js b/Uint8Array.fromHexInto/implementation.js index 9fc3bcc..0963554 100644 --- a/Uint8Array.fromHexInto/implementation.js +++ b/Uint8Array.fromHexInto/implementation.js @@ -2,8 +2,8 @@ var GetIntrinsic = require('get-intrinsic'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); var $Uint8Array = GetIntrinsic('%Uint8Array%', true); var FromHex = require('../aos/FromHex'); diff --git a/Uint8Array.prototype.toBase64/implementation.js b/Uint8Array.prototype.toBase64/implementation.js index 7fea29b..f7bfff8 100644 --- a/Uint8Array.prototype.toBase64/implementation.js +++ b/Uint8Array.prototype.toBase64/implementation.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); var Get = require('es-abstract/2023/Get'); var ValidateUint8Array = require('../aos/ValidateUint8Array'); diff --git a/aos/ArrayBufferByteLength.js b/aos/ArrayBufferByteLength.js index 2b9d3a9..355c2a3 100644 --- a/aos/ArrayBufferByteLength.js +++ b/aos/ArrayBufferByteLength.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); // https://tc39.es/ecma262/#sec-arraybufferbytelength diff --git a/aos/DecodeBase64Chunk.js b/aos/DecodeBase64Chunk.js index f62437d..84af07c 100644 --- a/aos/DecodeBase64Chunk.js +++ b/aos/DecodeBase64Chunk.js @@ -1,9 +1,7 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); var base64Map = { __proto__: null, diff --git a/aos/FromBase64.js b/aos/FromBase64.js index e034f3e..e35f4c0 100644 --- a/aos/FromBase64.js +++ b/aos/FromBase64.js @@ -1,9 +1,7 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); var callBound = require('call-bind/callBound'); diff --git a/aos/FromHex.js b/aos/FromHex.js index 3fbe1df..2bb237c 100644 --- a/aos/FromHex.js +++ b/aos/FromHex.js @@ -3,8 +3,8 @@ var GetIntrinsic = require('get-intrinsic'); var $parseInt = GetIntrinsic('%parseInt%'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); var modulo = require('es-abstract/2023/modulo'); var substring = require('es-abstract/2023/substring'); diff --git a/aos/GetOptionsObject.js b/aos/GetOptionsObject.js index 2636d36..7639030 100644 --- a/aos/GetOptionsObject.js +++ b/aos/GetOptionsObject.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); var OrdinaryObjectCreate = require('es-abstract/2023/OrdinaryObjectCreate'); var Type = require('es-abstract/2023/Type'); diff --git a/aos/GetUint8ArrayBytes.js b/aos/GetUint8ArrayBytes.js index 2664e6b..7769a76 100644 --- a/aos/GetUint8ArrayBytes.js +++ b/aos/GetUint8ArrayBytes.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); var callBound = require('call-bind/callBound'); diff --git a/aos/IsFixedLengthArrayBuffer.js b/aos/IsFixedLengthArrayBuffer.js index 1e8bf1b..41a8d91 100644 --- a/aos/IsFixedLengthArrayBuffer.js +++ b/aos/IsFixedLengthArrayBuffer.js @@ -1,8 +1,6 @@ 'use strict'; -// var GetIntrinsic = require('get-intrinsic'); - -// var $TypeError = GetIntrinsic('%TypeError%'); +// var $TypeError = require('es-errors/type'); var IsResizableArrayBuffer = require('./IsResizableArrayBuffer'); diff --git a/aos/IsResizableArrayBuffer.js b/aos/IsResizableArrayBuffer.js index fb0f0b3..5040b96 100644 --- a/aos/IsResizableArrayBuffer.js +++ b/aos/IsResizableArrayBuffer.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); var callBound = require('call-bind/callBound'); diff --git a/aos/IsTypedArrayOutOfBounds.js b/aos/IsTypedArrayOutOfBounds.js index c826896..49eee31 100644 --- a/aos/IsTypedArrayOutOfBounds.js +++ b/aos/IsTypedArrayOutOfBounds.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); var IsDetachedBuffer = require('es-abstract/2023/IsDetachedBuffer'); var TypedArrayElementSize = require('es-abstract/2023/TypedArrayElementSize'); diff --git a/aos/MakeTypedArrayWithBufferWitnessRecord.js b/aos/MakeTypedArrayWithBufferWitnessRecord.js index 78d4f1f..8f18dc1 100644 --- a/aos/MakeTypedArrayWithBufferWitnessRecord.js +++ b/aos/MakeTypedArrayWithBufferWitnessRecord.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); var ArrayBufferByteLength = require('./ArrayBufferByteLength'); var IsDetachedBuffer = require('es-abstract/2023/IsDetachedBuffer'); diff --git a/aos/SkipAsciiWhitespace.js b/aos/SkipAsciiWhitespace.js index 080dd29..4fa8c37 100644 --- a/aos/SkipAsciiWhitespace.js +++ b/aos/SkipAsciiWhitespace.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); var isInteger = require('es-abstract/helpers/isInteger'); diff --git a/aos/TypedArrayLength.js b/aos/TypedArrayLength.js index 4cc6558..8e8f042 100644 --- a/aos/TypedArrayLength.js +++ b/aos/TypedArrayLength.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); var floor = require('es-abstract/2023/floor'); var IsFixedLengthArrayBuffer = require('./IsFixedLengthArrayBuffer'); diff --git a/aos/ValidateUint8Array.js b/aos/ValidateUint8Array.js index 34de5d0..82ec7a5 100644 --- a/aos/ValidateUint8Array.js +++ b/aos/ValidateUint8Array.js @@ -1,8 +1,6 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); var whichTypedArray = require('which-typed-array'); diff --git a/aos/helpers/alphabetFromIdentifier.js b/aos/helpers/alphabetFromIdentifier.js index 0516811..4620c2c 100644 --- a/aos/helpers/alphabetFromIdentifier.js +++ b/aos/helpers/alphabetFromIdentifier.js @@ -3,9 +3,7 @@ var base64Characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var base64UrlCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'; -var GetIntrinsic = require('get-intrinsic'); - -var $TypeError = GetIntrinsic('%TypeError%'); +var $TypeError = require('es-errors/type'); module.exports = function alphabetFromIdentifier(alphabet) { if (alphabet === 'base64') { diff --git a/package.json b/package.json index 1e6e963..46e1fdd 100644 --- a/package.json +++ b/package.json @@ -73,17 +73,18 @@ "tape": "^5.7.4" }, "dependencies": { - "array-buffer-byte-length": "^1.0.0", + "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.5", "es-abstract": "^1.22.3", - "is-array-buffer": "^3.0.2", + "es-errors": "^1.1.0", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2", "safe-regex-test": "^1.0.2", "typed-array-buffer": "^1.0.0", "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "typedarray.prototype.slice": "^1.0.1", - "which-typed-array": "^1.1.13" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4"