keq 5.2.0 → 5.2.2
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/CHANGELOG.md +8 -0
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 5.2.2
|
|
2
|
+
|
|
3
|
+
### Patch Changes
|
|
4
|
+
|
|
5
|
+
- b92c6e6: **Fix:** Prevent `getLocationId` from throwing `TypeError` when the call stack is shallower than expected (e.g. JavaScriptCore on iOS Safari omits async stack frames), which crashed every request in shallow-stack contexts. It now falls back to the deepest non-empty frame instead of calling `.trim()` on `undefined`.
|
|
6
|
+
|
|
7
|
+
## 5.2.1
|
|
8
|
+
|
|
1
9
|
## 5.2.0
|
|
2
10
|
|
|
3
11
|
## 5.1.0
|
package/dist/index.js
CHANGED
|
@@ -1105,7 +1105,14 @@ function fixContentType(contentType) {
|
|
|
1105
1105
|
function getLocationId(depth = 0) {
|
|
1106
1106
|
const err = /* @__PURE__ */ new Error();
|
|
1107
1107
|
if (!err.stack) return "";
|
|
1108
|
-
|
|
1108
|
+
const lines = err.stack.split("\n");
|
|
1109
|
+
const offset = depth + 2;
|
|
1110
|
+
if (lines[offset]) return lines[offset].trim();
|
|
1111
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
1112
|
+
const line = lines[i].trim();
|
|
1113
|
+
if (line) return line;
|
|
1114
|
+
}
|
|
1115
|
+
return "";
|
|
1109
1116
|
}
|
|
1110
1117
|
//#endregion
|
|
1111
1118
|
//#region src/request/utils/resolve-with.ts
|