axios 1.6.6 → 1.6.8
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.
Potentially problematic release.
This version of axios might be problematic. Click here for more details.
- package/CHANGELOG.md +31 -0
- package/README.md +5 -2
- package/dist/axios.js +322 -299
- package/dist/axios.js.map +1 -1
- package/dist/axios.min.js +1 -1
- package/dist/axios.min.js.map +1 -1
- package/dist/browser/axios.cjs +17 -17
- package/dist/browser/axios.cjs.map +1 -1
- package/dist/esm/axios.js +17 -17
- package/dist/esm/axios.js.map +1 -1
- package/dist/esm/axios.min.js +1 -1
- package/dist/esm/axios.min.js.map +1 -1
- package/dist/node/axios.cjs +19 -20
- package/dist/node/axios.cjs.map +1 -1
- package/lib/adapters/http.js +1 -1
- package/lib/core/Axios.js +14 -11
- package/lib/core/mergeConfig.js +1 -1
- package/lib/defaults/index.js +0 -3
- package/lib/env/data.js +1 -1
- package/package.json +25 -25
package/lib/adapters/http.js
CHANGED
@@ -19,7 +19,7 @@ import fromDataURI from '../helpers/fromDataURI.js';
|
|
19
19
|
import stream from 'stream';
|
20
20
|
import AxiosHeaders from '../core/AxiosHeaders.js';
|
21
21
|
import AxiosTransformStream from '../helpers/AxiosTransformStream.js';
|
22
|
-
import EventEmitter from 'events';
|
22
|
+
import {EventEmitter} from 'events';
|
23
23
|
import formDataToStream from "../helpers/formDataToStream.js";
|
24
24
|
import readBlob from "../helpers/readBlob.js";
|
25
25
|
import ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';
|
package/lib/core/Axios.js
CHANGED
@@ -39,17 +39,20 @@ class Axios {
|
|
39
39
|
try {
|
40
40
|
return await this._request(configOrUrl, config);
|
41
41
|
} catch (err) {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
42
|
+
if (err instanceof Error) {
|
43
|
+
let dummy;
|
44
|
+
|
45
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
|
46
|
+
|
47
|
+
// slice off the Error: ... line
|
48
|
+
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
49
|
+
|
50
|
+
if (!err.stack) {
|
51
|
+
err.stack = stack;
|
52
|
+
// match without the 2 top stack lines
|
53
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
|
54
|
+
err.stack += '\n' + stack
|
55
|
+
}
|
53
56
|
}
|
54
57
|
|
55
58
|
throw err;
|
package/lib/core/mergeConfig.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
import utils from '../utils.js';
|
4
4
|
import AxiosHeaders from "./AxiosHeaders.js";
|
5
5
|
|
6
|
-
const headersToObject = (thing) => thing instanceof AxiosHeaders ? thing
|
6
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
7
7
|
|
8
8
|
/**
|
9
9
|
* Config-specific merge-function which creates a new config-object
|
package/lib/defaults/index.js
CHANGED
package/lib/env/data.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const VERSION = "1.6.
|
1
|
+
export const VERSION = "1.6.8";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "axios",
|
3
|
-
"version": "1.6.
|
3
|
+
"version": "1.6.8",
|
4
4
|
"description": "Promise based HTTP client for the browser and node.js",
|
5
5
|
"main": "index.js",
|
6
6
|
"exports": {
|
@@ -80,41 +80,41 @@
|
|
80
80
|
},
|
81
81
|
"homepage": "https://axios-http.com",
|
82
82
|
"devDependencies": {
|
83
|
-
"@babel/core": "^7.
|
84
|
-
"@babel/preset-env": "^7.
|
85
|
-
"@commitlint/cli": "^17.
|
86
|
-
"@commitlint/config-conventional": "^17.
|
83
|
+
"@babel/core": "^7.23.9",
|
84
|
+
"@babel/preset-env": "^7.23.9",
|
85
|
+
"@commitlint/cli": "^17.8.1",
|
86
|
+
"@commitlint/config-conventional": "^17.8.1",
|
87
87
|
"@release-it/conventional-changelog": "^5.1.1",
|
88
88
|
"@rollup/plugin-babel": "^5.3.1",
|
89
89
|
"@rollup/plugin-commonjs": "^15.1.0",
|
90
90
|
"@rollup/plugin-json": "^4.1.0",
|
91
|
-
"@rollup/plugin-multi-entry": "^4.
|
91
|
+
"@rollup/plugin-multi-entry": "^4.1.0",
|
92
92
|
"@rollup/plugin-node-resolve": "^9.0.0",
|
93
|
-
"abortcontroller-polyfill": "^1.7.
|
93
|
+
"abortcontroller-polyfill": "^1.7.5",
|
94
94
|
"auto-changelog": "^2.4.0",
|
95
|
-
"body-parser": "^1.20.
|
96
|
-
"chalk": "^5.
|
95
|
+
"body-parser": "^1.20.2",
|
96
|
+
"chalk": "^5.3.0",
|
97
97
|
"coveralls": "^3.1.1",
|
98
98
|
"cross-env": "^7.0.3",
|
99
99
|
"dev-null": "^0.1.1",
|
100
100
|
"dtslint": "^4.2.1",
|
101
101
|
"es6-promise": "^4.2.8",
|
102
|
-
"eslint": "^8.
|
103
|
-
"express": "^4.18.
|
104
|
-
"formdata-node": "^5.0.
|
105
|
-
"formidable": "^2.
|
102
|
+
"eslint": "^8.56.0",
|
103
|
+
"express": "^4.18.2",
|
104
|
+
"formdata-node": "^5.0.1",
|
105
|
+
"formidable": "^2.1.2",
|
106
106
|
"fs-extra": "^10.1.0",
|
107
107
|
"get-stream": "^3.0.0",
|
108
108
|
"gulp": "^4.0.2",
|
109
109
|
"gzip-size": "^7.0.0",
|
110
|
-
"handlebars": "^4.7.
|
111
|
-
"husky": "^8.0.
|
110
|
+
"handlebars": "^4.7.8",
|
111
|
+
"husky": "^8.0.3",
|
112
112
|
"istanbul-instrumenter-loader": "^3.0.1",
|
113
|
-
"jasmine-core": "^2.
|
113
|
+
"jasmine-core": "^2.99.1",
|
114
114
|
"karma": "^6.3.17",
|
115
|
-
"karma-chrome-launcher": "^3.
|
115
|
+
"karma-chrome-launcher": "^3.2.0",
|
116
116
|
"karma-firefox-launcher": "^2.1.2",
|
117
|
-
"karma-jasmine": "^1.1.
|
117
|
+
"karma-jasmine": "^1.1.2",
|
118
118
|
"karma-jasmine-ajax": "^0.1.13",
|
119
119
|
"karma-rollup-preprocessor": "^7.0.8",
|
120
120
|
"karma-safari-launcher": "^1.0.0",
|
@@ -122,12 +122,12 @@
|
|
122
122
|
"karma-sinon": "^1.0.5",
|
123
123
|
"karma-sourcemap-loader": "^0.3.8",
|
124
124
|
"memoizee": "^0.4.15",
|
125
|
-
"minimist": "^1.2.
|
126
|
-
"mocha": "^10.
|
125
|
+
"minimist": "^1.2.8",
|
126
|
+
"mocha": "^10.3.0",
|
127
127
|
"multer": "^1.4.4",
|
128
|
-
"pretty-bytes": "^6.
|
129
|
-
"release-it": "^15.
|
130
|
-
"rollup": "^2.
|
128
|
+
"pretty-bytes": "^6.1.1",
|
129
|
+
"release-it": "^15.11.0",
|
130
|
+
"rollup": "^2.79.1",
|
131
131
|
"rollup-plugin-auto-external": "^2.0.0",
|
132
132
|
"rollup-plugin-bundle-size": "^1.0.3",
|
133
133
|
"rollup-plugin-terser": "^7.0.2",
|
@@ -135,7 +135,7 @@
|
|
135
135
|
"stream-throttle": "^0.1.3",
|
136
136
|
"string-replace-async": "^3.0.2",
|
137
137
|
"terser-webpack-plugin": "^4.2.3",
|
138
|
-
"typescript": "^4.
|
138
|
+
"typescript": "^4.9.5"
|
139
139
|
},
|
140
140
|
"browser": {
|
141
141
|
"./lib/adapters/http.js": "./lib/helpers/null.js",
|
@@ -146,7 +146,7 @@
|
|
146
146
|
"unpkg": "dist/axios.min.js",
|
147
147
|
"typings": "./index.d.ts",
|
148
148
|
"dependencies": {
|
149
|
-
"follow-redirects": "^1.15.
|
149
|
+
"follow-redirects": "^1.15.6",
|
150
150
|
"form-data": "^4.0.0",
|
151
151
|
"proxy-from-env": "^1.1.0"
|
152
152
|
},
|