axios 0.35.0 → 0.36.0

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/esm/axios.js CHANGED
@@ -1,4 +1,4 @@
1
- // axios v0.35.0 Copyright (c) 2026 Matt Zabriskie
1
+ // axios v0.36.0 Copyright (c) 2026 Matt Zabriskie
2
2
  var bind = function bind(fn, thisArg) {
3
3
  return function wrap() {
4
4
  return fn.apply(thisArg, arguments);
@@ -1196,8 +1196,8 @@ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
1196
1196
  this.handlers.push({
1197
1197
  fulfilled: fulfilled,
1198
1198
  rejected: rejected,
1199
- synchronous: options ? options.synchronous : false,
1200
- runWhen: options ? options.runWhen : null
1199
+ synchronous: options && utils.hasOwnProperty(options, 'synchronous') ? options.synchronous : false,
1200
+ runWhen: options && utils.hasOwnProperty(options, 'runWhen') ? options.runWhen : null
1201
1201
  });
1202
1202
  return this.handlers.length - 1;
1203
1203
  };
@@ -1514,9 +1514,21 @@ var isAbsoluteURL = function isAbsoluteURL(url) {
1514
1514
  * @returns {string} The combined URL
1515
1515
  */
1516
1516
  var combineURLs = function combineURLs(baseURL, relativeURL) {
1517
- return relativeURL
1518
- ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1519
- : baseURL;
1517
+ if (!relativeURL) {
1518
+ return baseURL;
1519
+ }
1520
+
1521
+ var base = baseURL.replace(/\/?\/$/, '');
1522
+
1523
+ if (/^\/*$/.test(base)) {
1524
+ // A base made only of slashes points at the root of the current origin.
1525
+ // Drop leading slashes, backslashes, tabs and newlines from the relative
1526
+ // URL as well: URL parsers ignore tabs and newlines and treat '\' as '/',
1527
+ // so leaving them would turn the result into a protocol-relative URL.
1528
+ return '/' + relativeURL.replace(/^[\/\\\t\n\r]+/, '');
1529
+ }
1530
+
1531
+ return base + '/' + relativeURL.replace(/^\/+/, '');
1520
1532
  };
1521
1533
 
1522
1534
  /**
@@ -2514,7 +2526,7 @@ var mergeConfig = function mergeConfig(config1, config2) {
2514
2526
  };
2515
2527
 
2516
2528
  var data = {
2517
- "version": "0.35.0"
2529
+ "version": "0.36.0"
2518
2530
  };
2519
2531
 
2520
2532
  var VERSION = data.version;