superagent 5.2.2 → 6.1.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.eslintrc +4 -2
- package/.github/FUNDING.yml +4 -0
- package/.lib.eslintrc +4 -1
- package/README.md +7 -3
- package/dist/superagent.js +924 -64
- package/dist/superagent.min.js +1 -1
- package/docs/index.md +32 -1
- package/docs/tail.html +1 -1
- package/docs/test.html +3085 -3547
- package/index.html +554 -1
- package/lib/agent-base.js +9 -5
- package/lib/client.js +6 -4
- package/lib/is-object.js +1 -1
- package/lib/node/agent.js +3 -3
- package/lib/node/http2wrapper.js +3 -2
- package/lib/node/index.js +24 -8
- package/lib/node/parsers/image.js +1 -1
- package/lib/node/parsers/json.js +1 -1
- package/lib/node/parsers/text.js +1 -1
- package/lib/node/parsers/urlencoded.js +1 -1
- package/lib/node/response.js +1 -1
- package/lib/node/unzip.js +1 -1
- package/lib/request-base.js +63 -34
- package/lib/response-base.js +1 -1
- package/lib/utils.js +51 -17
- package/package.json +37 -31
package/.dist.eslintrc
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"no-useless-escape": "off",
|
|
19
19
|
"no-cond-assign": "off",
|
|
20
20
|
"no-redeclare": "off",
|
|
21
|
-
"node/no-exports-assign": "off"
|
|
21
|
+
"node/no-exports-assign": "off",
|
|
22
|
+
"no-unsafe-finally": "off"
|
|
22
23
|
},
|
|
23
24
|
"globals": {
|
|
24
25
|
"regeneratorRuntime": "writable"
|
|
@@ -29,7 +30,8 @@
|
|
|
29
30
|
"Array.from",
|
|
30
31
|
"Symbol",
|
|
31
32
|
"Object.getOwnPropertySymbols",
|
|
32
|
-
"Object.setPrototypeOf"
|
|
33
|
+
"Object.setPrototypeOf",
|
|
34
|
+
"Set"
|
|
33
35
|
]
|
|
34
36
|
}
|
|
35
37
|
}
|
package/.lib.eslintrc
CHANGED
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
"node/no-unsupported-features/node-builtins": "off",
|
|
12
12
|
"no-func-assign": "off",
|
|
13
13
|
"no-global-assign": ["error", {"exceptions": ["exports"]}],
|
|
14
|
-
"
|
|
14
|
+
"no-fallthrough": "off",
|
|
15
|
+
"no-constant-condition": "off",
|
|
16
|
+
"node/no-exports-assign": "off",
|
|
17
|
+
"no-unsafe-finally": "off"
|
|
15
18
|
},
|
|
16
19
|
"overrides": [
|
|
17
20
|
{
|
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ Browser-ready versions of this module are available via [jsdelivr][], [unpkg][],
|
|
|
83
83
|
This is the solution for you if you're just using `<script>` tags everywhere!
|
|
84
84
|
|
|
85
85
|
```html
|
|
86
|
-
<script src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Promise,Symbol,Object.setPrototypeOf,Object.getOwnPropertySymbols"></script>
|
|
86
|
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Promise,Symbol,Object.setPrototypeOf,Object.getOwnPropertySymbols,Set"></script>
|
|
87
87
|
<script src="https://cdn.jsdelivr.net/npm/superagent"></script>
|
|
88
88
|
<!-- if you wish to use unpkg.com instead: -->
|
|
89
89
|
<!-- <script src="https://unpkg.com/superagent"></script> -->
|
|
@@ -159,11 +159,11 @@ If you are using [browserify][], [webpack][], [rollup][], or another bundler, th
|
|
|
159
159
|
We recommend using <https://polyfill.io> (specifically with the bundle mentioned in [VanillaJS](#vanillajs) above):
|
|
160
160
|
|
|
161
161
|
```html
|
|
162
|
-
<script src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Promise,Symbol,Object.setPrototypeOf,Object.getOwnPropertySymbols"></script>
|
|
162
|
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Promise,Symbol,Object.setPrototypeOf,Object.getOwnPropertySymbols,Set"></script>
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
* IE 9-10 requires a polyfill for `Promise`, `Array.from`, `Symbol`, `Object.getOwnPropertySymbols`, and `Object.setPrototypeOf`
|
|
166
|
-
* IE 9 requires a polyfill for `window.FormData` (we recommend [formdata-polyfill][])
|
|
166
|
+
* IE 9 requires a polyfill for `window.FormData` (we recommend [formdata-polyfill][]) and `Set`
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
## Plugins
|
|
@@ -212,6 +212,10 @@ For SuperAgent extensions such as couchdb and oauth visit the [wiki](https://git
|
|
|
212
212
|
|
|
213
213
|
Our breaking changes are mostly in rarely used functionality and from stricter error handling.
|
|
214
214
|
|
|
215
|
+
* [5.x to 6.x](https://github.com/visionmedia/superagent/releases/tag/v6.0.0):
|
|
216
|
+
* Retry behavior is still opt-in, however we now have a more fine-grained list of status codes and error codes that we retry against (see updated docs)
|
|
217
|
+
* A specific issue with Content-Type matching not being case-insensitive is fixed
|
|
218
|
+
* Set is now required for IE 9, see [Required Browser Features](#required-browser-features) for more insight
|
|
215
219
|
* [4.x to 5.x](https://github.com/visionmedia/superagent/releases/tag/v5.0.0):
|
|
216
220
|
* We've implemented the build setup of [Lass](https://lass.js.org) to simplify our stack and linting
|
|
217
221
|
* Unminified browserified build size has been reduced from 48KB to 20KB (via `tinyify` and the latest version of Babel using `@babel/preset-env` and `.browserslistrc`)
|