@expofp/utils 3.5.2 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib/load-script.js
CHANGED
|
@@ -64,7 +64,7 @@ async function loadInNode(scriptUrl, signal) {
|
|
|
64
64
|
catch (err) {
|
|
65
65
|
// Node / WHATWG fetch uses AbortError on abort
|
|
66
66
|
if (isAbortError(err)) {
|
|
67
|
-
throw new Error('Script load aborted');
|
|
67
|
+
throw new Error('Script load aborted', { cause: err });
|
|
68
68
|
}
|
|
69
69
|
throw err;
|
|
70
70
|
}
|
|
@@ -81,7 +81,7 @@ async function loadInNode(scriptUrl, signal) {
|
|
|
81
81
|
}
|
|
82
82
|
catch (err) {
|
|
83
83
|
if (isAbortError(err)) {
|
|
84
|
-
throw new Error('Script load aborted');
|
|
84
|
+
throw new Error('Script load aborted', { cause: err });
|
|
85
85
|
}
|
|
86
86
|
throw err;
|
|
87
87
|
}
|
package/dist/lib/short-hash.js
CHANGED
|
@@ -10,6 +10,7 @@ function toBase62(bytes) {
|
|
|
10
10
|
const u8 = bytes instanceof ArrayBuffer ? new Uint8Array(bytes) : bytes;
|
|
11
11
|
// Convert bytes -> BigInt (no Buffer required)
|
|
12
12
|
let num = 0n;
|
|
13
|
+
// eslint-disable-next-line compat/compat
|
|
13
14
|
for (const b of u8)
|
|
14
15
|
num = (num << 8n) + BigInt(b);
|
|
15
16
|
if (num === 0n)
|