2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-23 20:40:40 +03:00

chore(release): v1.6.8 (#6303)

Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-03-15 18:31:56 +02:00
committed by GitHub
parent 2656612bc1
commit ab3f0f9a94
17 changed files with 359 additions and 315 deletions
+19
View File
@@ -1,5 +1,24 @@
# Changelog # Changelog
## [1.6.8](https://github.com/axios/axios/compare/v1.6.7...v1.6.8) (2024-03-15)
### Bug Fixes
* **AxiosHeaders:** fix AxiosHeaders conversion to an object during config merging ([#6243](https://github.com/axios/axios/issues/6243)) ([2656612](https://github.com/axios/axios/commit/2656612bc10fe2757e9832b708ed773ab340b5cb))
* **import:** use named export for EventEmitter; ([7320430](https://github.com/axios/axios/commit/7320430aef2e1ba2b89488a0eaf42681165498b1))
* **vulnerability:** update follow-redirects to 1.15.6 ([#6300](https://github.com/axios/axios/issues/6300)) ([8786e0f](https://github.com/axios/axios/commit/8786e0ff55a8c68d4ca989801ad26df924042e27))
### Contributors to this release
- <img src="https://avatars.githubusercontent.com/u/4814473?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+4572/-3446 (#6238 )")
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+30/-0 (#6231 )")
- <img src="https://avatars.githubusercontent.com/u/68230846?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Mitchell](https://github.com/Creaous "+9/-9 (#6300 )")
- <img src="https://avatars.githubusercontent.com/u/53797821?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Emmanuel](https://github.com/mannoeu "+2/-2 (#6196 )")
- <img src="https://avatars.githubusercontent.com/u/44109284?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Lucas Keller](https://github.com/ljkeller "+3/-0 (#6194 )")
- <img src="https://avatars.githubusercontent.com/u/72791488?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Aditya Mogili](https://github.com/ADITYA-176 "+1/-1 ()")
- <img src="https://avatars.githubusercontent.com/u/46135319?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Miroslav Petrov](https://github.com/petrovmiroslav "+1/-1 (#6243 )")
## [1.6.7](https://github.com/axios/axios/compare/v1.6.6...v1.6.7) (2024-01-25) ## [1.6.7](https://github.com/axios/axios/compare/v1.6.6...v1.6.7) (2024-01-25)
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "axios", "name": "axios",
"main": "./dist/axios.js", "main": "./dist/axios.js",
"version": "1.6.7", "version": "1.6.8",
"homepage": "https://axios-http.com", "homepage": "https://axios-http.com",
"authors": [ "authors": [
"Matt Zabriskie" "Matt Zabriskie"
+315 -289
View File
@@ -1,330 +1,381 @@
// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors // Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) : typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory()); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
})(this, (function () { 'use strict'; })(this, (function () { 'use strict';
function ownKeys(object, enumerableOnly) { function _iterableToArrayLimit(r, l) {
var keys = Object.keys(object); var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (Object.getOwnPropertySymbols) { if (null != t) {
var symbols = Object.getOwnPropertySymbols(object); var e,
enumerableOnly && (symbols = symbols.filter(function (sym) { n,
return Object.getOwnPropertyDescriptor(object, sym).enumerable; i,
})), keys.push.apply(keys, symbols); u,
a = [],
f = !0,
o = !1;
try {
if (i = (t = t.call(r)).next, 0 === l) {
if (Object(t) !== t) return;
f = !1;
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = !0, n = r;
} finally {
try {
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
} }
return keys;
} }
function _objectSpread2(target) { function ownKeys(e, r) {
for (var i = 1; i < arguments.length; i++) { var t = Object.keys(e);
var source = null != arguments[i] ? arguments[i] : {}; if (Object.getOwnPropertySymbols) {
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { var o = Object.getOwnPropertySymbols(e);
_defineProperty(target, key, source[key]); r && (o = o.filter(function (r) {
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { return Object.getOwnPropertyDescriptor(e, r).enumerable;
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); })), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
_defineProperty(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
}); });
} }
return target; return e;
} }
function _regeneratorRuntime() { function _regeneratorRuntime() {
_regeneratorRuntime = function () { _regeneratorRuntime = function () {
return exports; return e;
}; };
var exports = {}, var t,
Op = Object.prototype, e = {},
hasOwn = Op.hasOwnProperty, r = Object.prototype,
$Symbol = "function" == typeof Symbol ? Symbol : {}, n = r.hasOwnProperty,
iteratorSymbol = $Symbol.iterator || "@@iterator", o = Object.defineProperty || function (t, e, r) {
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", t[e] = r.value;
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; },
function define(obj, key, value) { i = "function" == typeof Symbol ? Symbol : {},
return Object.defineProperty(obj, key, { a = i.iterator || "@@iterator",
value: value, c = i.asyncIterator || "@@asyncIterator",
u = i.toStringTag || "@@toStringTag";
function define(t, e, r) {
return Object.defineProperty(t, e, {
value: r,
enumerable: !0, enumerable: !0,
configurable: !0, configurable: !0,
writable: !0 writable: !0
}), obj[key]; }), t[e];
} }
try { try {
define({}, ""); define({}, "");
} catch (err) { } catch (t) {
define = function (obj, key, value) { define = function (t, e, r) {
return obj[key] = value; return t[e] = r;
}; };
} }
function wrap(innerFn, outerFn, self, tryLocsList) { function wrap(t, e, r, n) {
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, var i = e && e.prototype instanceof Generator ? e : Generator,
generator = Object.create(protoGenerator.prototype), a = Object.create(i.prototype),
context = new Context(tryLocsList || []); c = new Context(n || []);
return generator._invoke = function (innerFn, self, context) { return o(a, "_invoke", {
var state = "suspendedStart"; value: makeInvokeMethod(t, r, c)
return function (method, arg) { }), a;
if ("executing" === state) throw new Error("Generator is already running");
if ("completed" === state) {
if ("throw" === method) throw arg;
return doneResult();
}
for (context.method = method, context.arg = arg;;) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
if ("suspendedStart" === state) throw state = "completed", context.arg;
context.dispatchException(context.arg);
} else "return" === context.method && context.abrupt("return", context.arg);
state = "executing";
var record = tryCatch(innerFn, self, context);
if ("normal" === record.type) {
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
return {
value: record.arg,
done: context.done
};
}
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
}
};
}(innerFn, self, context), generator;
} }
function tryCatch(fn, obj, arg) { function tryCatch(t, e, r) {
try { try {
return { return {
type: "normal", type: "normal",
arg: fn.call(obj, arg) arg: t.call(e, r)
}; };
} catch (err) { } catch (t) {
return { return {
type: "throw", type: "throw",
arg: err arg: t
}; };
} }
} }
exports.wrap = wrap; e.wrap = wrap;
var ContinueSentinel = {}; var h = "suspendedStart",
l = "suspendedYield",
f = "executing",
s = "completed",
y = {};
function Generator() {} function Generator() {}
function GeneratorFunction() {} function GeneratorFunction() {}
function GeneratorFunctionPrototype() {} function GeneratorFunctionPrototype() {}
var IteratorPrototype = {}; var p = {};
define(IteratorPrototype, iteratorSymbol, function () { define(p, a, function () {
return this; return this;
}); });
var getProto = Object.getPrototypeOf, var d = Object.getPrototypeOf,
NativeIteratorPrototype = getProto && getProto(getProto(values([]))); v = d && d(d(values([])));
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); v && v !== r && n.call(v, a) && (p = v);
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
function defineIteratorMethods(prototype) { function defineIteratorMethods(t) {
["next", "throw", "return"].forEach(function (method) { ["next", "throw", "return"].forEach(function (e) {
define(prototype, method, function (arg) { define(t, e, function (t) {
return this._invoke(method, arg); return this._invoke(e, t);
}); });
}); });
} }
function AsyncIterator(generator, PromiseImpl) { function AsyncIterator(t, e) {
function invoke(method, arg, resolve, reject) { function invoke(r, o, i, a) {
var record = tryCatch(generator[method], generator, arg); var c = tryCatch(t[r], t, o);
if ("throw" !== record.type) { if ("throw" !== c.type) {
var result = record.arg, var u = c.arg,
value = result.value; h = u.value;
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
invoke("next", value, resolve, reject); invoke("next", t, i, a);
}, function (err) { }, function (t) {
invoke("throw", err, resolve, reject); invoke("throw", t, i, a);
}) : PromiseImpl.resolve(value).then(function (unwrapped) { }) : e.resolve(h).then(function (t) {
result.value = unwrapped, resolve(result); u.value = t, i(u);
}, function (error) { }, function (t) {
return invoke("throw", error, resolve, reject); return invoke("throw", t, i, a);
}); });
} }
reject(record.arg); a(c.arg);
} }
var previousPromise; var r;
this._invoke = function (method, arg) { o(this, "_invoke", {
function callInvokeWithMethodAndArg() { value: function (t, n) {
return new PromiseImpl(function (resolve, reject) { function callInvokeWithMethodAndArg() {
invoke(method, arg, resolve, reject); return new e(function (e, r) {
}); invoke(t, n, e, r);
});
}
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
}
});
}
function makeInvokeMethod(e, r, n) {
var o = h;
return function (i, a) {
if (o === f) throw new Error("Generator is already running");
if (o === s) {
if ("throw" === i) throw a;
return {
value: t,
done: !0
};
}
for (n.method = i, n.arg = a;;) {
var c = n.delegate;
if (c) {
var u = maybeInvokeDelegate(c, n);
if (u) {
if (u === y) continue;
return u;
}
}
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
if (o === h) throw o = s, n.arg;
n.dispatchException(n.arg);
} else "return" === n.method && n.abrupt("return", n.arg);
o = f;
var p = tryCatch(e, r, n);
if ("normal" === p.type) {
if (o = n.done ? s : l, p.arg === y) continue;
return {
value: p.arg,
done: n.done
};
}
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
} }
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
}; };
} }
function maybeInvokeDelegate(delegate, context) { function maybeInvokeDelegate(e, r) {
var method = delegate.iterator[context.method]; var n = r.method,
if (undefined === method) { o = e.iterator[n];
if (context.delegate = null, "throw" === context.method) { if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; var i = tryCatch(o, e.iterator, r.arg);
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
} var a = i.arg;
return ContinueSentinel; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
}
var record = tryCatch(method, delegate.iterator, context.arg);
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
var info = record.arg;
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
} }
function pushTryEntry(locs) { function pushTryEntry(t) {
var entry = { var e = {
tryLoc: locs[0] tryLoc: t[0]
}; };
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
} }
function resetTryEntry(entry) { function resetTryEntry(t) {
var record = entry.completion || {}; var e = t.completion || {};
record.type = "normal", delete record.arg, entry.completion = record; e.type = "normal", delete e.arg, t.completion = e;
} }
function Context(tryLocsList) { function Context(t) {
this.tryEntries = [{ this.tryEntries = [{
tryLoc: "root" tryLoc: "root"
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); }], t.forEach(pushTryEntry, this), this.reset(!0);
} }
function values(iterable) { function values(e) {
if (iterable) { if (e || "" === e) {
var iteratorMethod = iterable[iteratorSymbol]; var r = e[a];
if (iteratorMethod) return iteratorMethod.call(iterable); if (r) return r.call(e);
if ("function" == typeof iterable.next) return iterable; if ("function" == typeof e.next) return e;
if (!isNaN(iterable.length)) { if (!isNaN(e.length)) {
var i = -1, var o = -1,
next = function next() { i = function next() {
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
return next.value = undefined, next.done = !0, next; return next.value = t, next.done = !0, next;
}; };
return next.next = next; return i.next = i;
} }
} }
return { throw new TypeError(typeof e + " is not iterable");
next: doneResult
};
} }
function doneResult() { return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
value: GeneratorFunctionPrototype,
configurable: !0
}), o(GeneratorFunctionPrototype, "constructor", {
value: GeneratorFunction,
configurable: !0
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
var e = "function" == typeof t && t.constructor;
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
}, e.mark = function (t) {
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
}, e.awrap = function (t) {
return { return {
value: undefined, __await: t
done: !0
}; };
} }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
var ctor = "function" == typeof genFun && genFun.constructor;
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
}, exports.mark = function (genFun) {
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
}, exports.awrap = function (arg) {
return {
__await: arg
};
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
return this; return this;
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
void 0 === PromiseImpl && (PromiseImpl = Promise); void 0 === i && (i = Promise);
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); var a = new AsyncIterator(wrap(t, r, n, o), i);
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
return result.done ? result.value : iter.next(); return t.done ? t.value : a.next();
}); });
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
return this; return this;
}), define(Gp, "toString", function () { }), define(g, "toString", function () {
return "[object Generator]"; return "[object Generator]";
}), exports.keys = function (object) { }), e.keys = function (t) {
var keys = []; var e = Object(t),
for (var key in object) keys.push(key); r = [];
return keys.reverse(), function next() { for (var n in e) r.push(n);
for (; keys.length;) { return r.reverse(), function next() {
var key = keys.pop(); for (; r.length;) {
if (key in object) return next.value = key, next.done = !1, next; var t = r.pop();
if (t in e) return next.value = t, next.done = !1, next;
} }
return next.done = !0, next; return next.done = !0, next;
}; };
}, exports.values = values, Context.prototype = { }, e.values = values, Context.prototype = {
constructor: Context, constructor: Context,
reset: function (skipTempReset) { reset: function (e) {
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
}, },
stop: function () { stop: function () {
this.done = !0; this.done = !0;
var rootRecord = this.tryEntries[0].completion; var t = this.tryEntries[0].completion;
if ("throw" === rootRecord.type) throw rootRecord.arg; if ("throw" === t.type) throw t.arg;
return this.rval; return this.rval;
}, },
dispatchException: function (exception) { dispatchException: function (e) {
if (this.done) throw exception; if (this.done) throw e;
var context = this; var r = this;
function handle(loc, caught) { function handle(n, o) {
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
} }
for (var i = this.tryEntries.length - 1; i >= 0; --i) { for (var o = this.tryEntries.length - 1; o >= 0; --o) {
var entry = this.tryEntries[i], var i = this.tryEntries[o],
record = entry.completion; a = i.completion;
if ("root" === entry.tryLoc) return handle("end"); if ("root" === i.tryLoc) return handle("end");
if (entry.tryLoc <= this.prev) { if (i.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc"), var c = n.call(i, "catchLoc"),
hasFinally = hasOwn.call(entry, "finallyLoc"); u = n.call(i, "finallyLoc");
if (hasCatch && hasFinally) { if (c && u) {
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
} else if (hasCatch) { } else if (c) {
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
} else { } else {
if (!hasFinally) throw new Error("try statement without catch or finally"); if (!u) throw new Error("try statement without catch or finally");
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
} }
} }
} }
}, },
abrupt: function (type, arg) { abrupt: function (t, e) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) { for (var r = this.tryEntries.length - 1; r >= 0; --r) {
var entry = this.tryEntries[i]; var o = this.tryEntries[r];
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
var finallyEntry = entry; var i = o;
break; break;
} }
} }
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
var record = finallyEntry ? finallyEntry.completion : {}; var a = i ? i.completion : {};
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
}, },
complete: function (record, afterLoc) { complete: function (t, e) {
if ("throw" === record.type) throw record.arg; if ("throw" === t.type) throw t.arg;
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
}, },
finish: function (finallyLoc) { finish: function (t) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) { for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var entry = this.tryEntries[i]; var r = this.tryEntries[e];
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
} }
}, },
catch: function (tryLoc) { catch: function (t) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) { for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var entry = this.tryEntries[i]; var r = this.tryEntries[e];
if (entry.tryLoc === tryLoc) { if (r.tryLoc === t) {
var record = entry.completion; var n = r.completion;
if ("throw" === record.type) { if ("throw" === n.type) {
var thrown = record.arg; var o = n.arg;
resetTryEntry(entry); resetTryEntry(r);
} }
return thrown; return o;
} }
} }
throw new Error("illegal catch attempt"); throw new Error("illegal catch attempt");
}, },
delegateYield: function (iterable, resultName, nextLoc) { delegateYield: function (e, r, n) {
return this.delegate = { return this.delegate = {
iterator: values(iterable), iterator: values(e),
resultName: resultName, resultName: r,
nextLoc: nextLoc nextLoc: n
}, "next" === this.method && (this.arg = undefined), ContinueSentinel; }, "next" === this.method && (this.arg = t), y;
} }
}, exports; }, e;
} }
function _typeof(obj) { function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : String(i);
}
function _typeof(o) {
"@babel/helpers - typeof"; "@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof obj; return typeof o;
} : function (obj) { } : function (o) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(obj); }, _typeof(o);
} }
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try { try {
@@ -367,7 +418,7 @@
descriptor.enumerable = descriptor.enumerable || false; descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true; descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true; if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor); Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
} }
} }
function _createClass(Constructor, protoProps, staticProps) { function _createClass(Constructor, protoProps, staticProps) {
@@ -379,6 +430,7 @@
return Constructor; return Constructor;
} }
function _defineProperty(obj, key, value) { function _defineProperty(obj, key, value) {
key = _toPropertyKey(key);
if (key in obj) { if (key in obj) {
Object.defineProperty(obj, key, { Object.defineProperty(obj, key, {
value: value, value: value,
@@ -409,30 +461,6 @@
function _iterableToArray(iter) { function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
} }
function _iterableToArrayLimit(arr, i) {
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
if (_i == null) return;
var _arr = [];
var _n = true;
var _d = false;
var _s, _e;
try {
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _unsupportedIterableToArray(o, minLen) { function _unsupportedIterableToArray(o, minLen) {
if (!o) return; if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen); if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -766,8 +794,8 @@
* *
* @returns {Object} Result of all merge properties * @returns {Object} Result of all merge properties
*/ */
function /* obj1, obj2, obj3, ... */ function merge( /* obj1, obj2, obj3, ... */
merge() { ) {
var _ref2 = isContextDefined(this) && this || {}, var _ref2 = isContextDefined(this) && this || {},
caseless = _ref2.caseless; caseless = _ref2.caseless;
var result = {}; var result = {};
@@ -2735,7 +2763,7 @@
} }
var headersToObject = function headersToObject(thing) { var headersToObject = function headersToObject(thing) {
return thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing; return thing instanceof AxiosHeaders$1 ? _objectSpread2({}, thing) : thing;
}; };
/** /**
@@ -2838,7 +2866,7 @@
return config; return config;
} }
var VERSION = "1.6.7"; var VERSION = "1.6.8";
var validators$1 = {}; var validators$1 = {};
@@ -2944,38 +2972,36 @@
*/ */
_createClass(Axios, [{ _createClass(Axios, [{
key: "request", key: "request",
value: function () { value: (function () {
var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) { var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) {
var dummy, stack; var dummy, stack;
return _regeneratorRuntime().wrap(function _callee$(_context) { return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) { while (1) switch (_context.prev = _context.next) {
switch (_context.prev = _context.next) { case 0:
case 0: _context.prev = 0;
_context.prev = 0; _context.next = 3;
_context.next = 3; return this._request(configOrUrl, config);
return this._request(configOrUrl, config); case 3:
case 3: return _context.abrupt("return", _context.sent);
return _context.abrupt("return", _context.sent); case 6:
case 6: _context.prev = 6;
_context.prev = 6; _context.t0 = _context["catch"](0);
_context.t0 = _context["catch"](0); if (_context.t0 instanceof Error) {
if (_context.t0 instanceof Error) { Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
// slice off the Error: ... line // slice off the Error: ... line
stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
if (!_context.t0.stack) { if (!_context.t0.stack) {
_context.t0.stack = stack; _context.t0.stack = stack;
// match without the 2 top stack lines // match without the 2 top stack lines
} else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { } else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
_context.t0.stack += '\n' + stack; _context.t0.stack += '\n' + stack;
}
} }
throw _context.t0; }
case 10: throw _context.t0;
case "end": case 10:
return _context.stop(); case "end":
} return _context.stop();
} }
}, _callee, this, [[0, 6]]); }, _callee, this, [[0, 6]]);
})); }));
@@ -2983,7 +3009,7 @@
return _request2.apply(this, arguments); return _request2.apply(this, arguments);
} }
return request; return request;
}() }())
}, { }, {
key: "_request", key: "_request",
value: function _request(configOrUrl, config) { value: function _request(configOrUrl, config) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -1,4 +1,4 @@
// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors // Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors
'use strict'; 'use strict';
function bind(fn, thisArg) { function bind(fn, thisArg) {
@@ -2553,7 +2553,7 @@ function dispatchRequest(config) {
}); });
} }
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing; const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
/** /**
* Config-specific merge-function which creates a new config-object * Config-specific merge-function which creates a new config-object
@@ -2655,7 +2655,7 @@ function mergeConfig(config1, config2) {
return config; return config;
} }
const VERSION = "1.6.7"; const VERSION = "1.6.8";
const validators$1 = {}; const validators$1 = {};
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -1,4 +1,4 @@
// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors // Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors
function bind(fn, thisArg) { function bind(fn, thisArg) {
return function wrap() { return function wrap() {
return fn.apply(thisArg, arguments); return fn.apply(thisArg, arguments);
@@ -2551,7 +2551,7 @@ function dispatchRequest(config) {
}); });
} }
const headersToObject = (thing) => thing instanceof AxiosHeaders$2 ? thing.toJSON() : thing; const headersToObject = (thing) => thing instanceof AxiosHeaders$2 ? { ...thing } : thing;
/** /**
* Config-specific merge-function which creates a new config-object * Config-specific merge-function which creates a new config-object
@@ -2653,7 +2653,7 @@ function mergeConfig$1(config1, config2) {
return config; return config;
} }
const VERSION$1 = "1.6.7"; const VERSION$1 = "1.6.8";
const validators$1 = {}; const validators$1 = {};
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -6
View File
@@ -1,4 +1,4 @@
// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors // Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors
'use strict'; 'use strict';
const FormData$1 = require('form-data'); const FormData$1 = require('form-data');
@@ -10,7 +10,7 @@ const util = require('util');
const followRedirects = require('follow-redirects'); const followRedirects = require('follow-redirects');
const zlib = require('zlib'); const zlib = require('zlib');
const stream = require('stream'); const stream = require('stream');
const EventEmitter = require('events'); const events = require('events');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -22,7 +22,6 @@ const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects); const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);
const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib); const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream); const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);
const EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
function bind(fn, thisArg) { function bind(fn, thisArg) {
return function wrap() { return function wrap() {
@@ -2019,7 +2018,7 @@ function buildFullPath(baseURL, requestedURL) {
return requestedURL; return requestedURL;
} }
const VERSION = "1.6.7"; const VERSION = "1.6.8";
function parseProtocol(url) { function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -2662,7 +2661,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
} }
// temporary internal emitter until the AxiosRequest class will be implemented // temporary internal emitter until the AxiosRequest class will be implemented
const emitter = new EventEmitter__default["default"](); const emitter = new events.EventEmitter();
const onFinished = () => { const onFinished = () => {
if (config.cancelToken) { if (config.cancelToken) {
@@ -3652,7 +3651,7 @@ function dispatchRequest(config) {
}); });
} }
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing; const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
/** /**
* Config-specific merge-function which creates a new config-object * Config-specific merge-function which creates a new config-object
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
export const VERSION = "1.6.7"; export const VERSION = "1.6.8";
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "axios", "name": "axios",
"version": "1.6.7", "version": "1.6.8",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "axios", "name": "axios",
"version": "1.6.7", "version": "1.6.8",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.6",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "axios", "name": "axios",
"version": "1.6.7", "version": "1.6.8",
"description": "Promise based HTTP client for the browser and node.js", "description": "Promise based HTTP client for the browser and node.js",
"main": "index.js", "main": "index.js",
"exports": { "exports": {