got 12.6.0 → 12.6.1

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.
@@ -7,7 +7,7 @@ import timer from '@szmarczak/http-timer';
7
7
  import CacheableRequest, { CacheError as CacheableCacheError, } from 'cacheable-request';
8
8
  import decompressResponse from 'decompress-response';
9
9
  import is from '@sindresorhus/is';
10
- import { buffer as getBuffer } from 'get-stream';
10
+ import getStream from 'get-stream';
11
11
  import { FormDataEncoder, isFormData as isFormDataLike } from 'form-data-encoder';
12
12
  import getBodySize from './utils/get-body-size.js';
13
13
  import isFormData from './utils/is-form-data.js';
@@ -21,6 +21,7 @@ import { isResponseOk } from './response.js';
21
21
  import isClientRequest from './utils/is-client-request.js';
22
22
  import isUnixSocketURL from './utils/is-unix-socket-url.js';
23
23
  import { RequestError, ReadError, MaxRedirectsError, HTTPError, TimeoutError, UploadError, CacheError, AbortError, } from './errors.js';
24
+ const { buffer: getBuffer } = getStream;
24
25
  const supportsBrotli = is.string(process.versions.brotli);
25
26
  const methodsWithoutBody = new Set(['GET', 'HEAD']);
26
27
  const cacheableStore = new WeakableMap();
@@ -210,8 +211,8 @@ export default class Request extends Duplex {
210
211
  this.redirectUrls = [];
211
212
  this.retryCount = 0;
212
213
  this._stopRetry = noop;
213
- this.on('pipe', source => {
214
- if (source.headers) {
214
+ this.on('pipe', (source) => {
215
+ if (source?.headers) {
215
216
  Object.assign(this.options.headers, source.headers);
216
217
  }
217
218
  });
@@ -1235,6 +1235,7 @@ export default class Options {
1235
1235
  signal?: AbortSignal | undefined;
1236
1236
  socketPath?: string | undefined;
1237
1237
  uniqueHeaders?: (string | string[])[] | undefined;
1238
+ joinDuplicateHeaders?: boolean | undefined;
1238
1239
  clientCertEngine?: string | undefined;
1239
1240
  privateKeyEngine?: string | undefined;
1240
1241
  privateKeyIdentifier?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "got",
3
- "version": "12.6.0",
3
+ "version": "12.6.1",
4
4
  "description": "Human-friendly and powerful HTTP request library for Node.js",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/got",
package/readme.md CHANGED
@@ -29,38 +29,42 @@
29
29
  <br>
30
30
  <br>
31
31
  <br>
32
- <a href="https://www.useanvil.com/?utm_source=sindresorhus#gh-light-mode-only">
32
+ <a href="https://serpapi.com#gh-light-mode-only">
33
33
  <div>
34
- <img src="https://sindresorhus.com/assets/thanks/anvil-logo-light.svg" width="200" alt="Anvil">
34
+ <img src="https://sindresorhus.com/assets/thanks/serpapi-logo-light.svg" width="130" alt="SerpApi">
35
35
  </div>
36
- <br>
37
- <b>Paperwork that makes the data work.</b>
36
+ <b>API to get search engine results with ease.</b>
37
+ </a>
38
+ <a href="https://serpapi.com#gh-dark-mode-only">
38
39
  <div>
39
- <sub>
40
- Easy APIs for paperwork. PDF generation, e-signature and embeddable no-code webforms.
41
- <br>
42
- The easiest way to build paperwork automation into your product.
43
- </sub>
40
+ <img src="https://sindresorhus.com/assets/thanks/serpapi-logo-dark.svg" width="120" alt="SerpApi">
44
41
  </div>
42
+ <b>API to get search engine results with ease.</b>
45
43
  </a>
46
- <a href="https://www.useanvil.com/?utm_source=sindresorhus#gh-dark-mode-only">
44
+ <br>
45
+ <br>
46
+ <br>
47
+ <br>
48
+ <a href="https://dutchis.net/?ref=sindresorhus#gh-light-mode-only">
47
49
  <div>
48
- <img src="https://sindresorhus.com/assets/thanks/anvil-logo-dark.svg" width="200" alt="Anvil">
50
+ <img src="https://sindresorhus.com/assets/thanks/dutchis-logo-light.png" width="200" alt="DutchIS">
49
51
  </div>
50
52
  <br>
51
- <b>Paperwork that makes the data work.</b>
53
+ <b>VPS hosting with taste 😛</b>
54
+ </a>
55
+ <a href="https://dutchis.net/?ref=sindresorhus#gh-dark-mode-only">
52
56
  <div>
53
- <sub>
54
- Easy APIs for paperwork. PDF generation, e-signature and embeddable no-code webforms.
55
- <br>
56
- The easiest way to build paperwork automation into your product.
57
- </sub>
57
+ <img src="https://sindresorhus.com/assets/thanks/dutchis-logo-dark.png" width="200" alt="DutchIS">
58
58
  </div>
59
+ <br>
60
+ <b>VPS hosting with taste 😛</b>
59
61
  </a>
60
62
  <br>
61
63
  <br>
62
64
  <br>
63
65
  <br>
66
+ <br>
67
+ <br>
64
68
  </p>
65
69
  <br>
66
70
  <br>
@@ -305,13 +309,13 @@ By default, Got will retry on failure. To disable this option, set [`options.ret
305
309
  [gbg]: https://img.shields.io/github/issues-raw/sindresorhus/got/bug?color=darkred&label
306
310
  [kbg]: https://img.shields.io/github/issues-raw/sindresorhus/ky/bug?color=darkred&label
307
311
  [nbg]: https://img.shields.io/github/issues-raw/bitinn/node-fetch/bug?color=darkred&label
308
- [abg]: https://img.shields.io/github/issues-raw/axios/axios/type:confirmed%20bug?color=darkred&label
312
+ [abg]: https://img.shields.io/github/issues-raw/axios/axios/bug-fix?color=darkred&label
309
313
  [sbg]: https://img.shields.io/github/issues-raw/visionmedia/superagent/Bug?color=darkred&label
310
314
 
311
315
  [g6]: https://github.com/sindresorhus/got/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug
312
316
  [k6]: https://github.com/sindresorhus/ky/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug
313
317
  [n6]: https://github.com/bitinn/node-fetch/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug
314
- [a6]: https://github.com/axios/axios/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22type%3Aconfirmed+bug%22
318
+ [a6]: https://github.com/axios/axios/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22bug-fix%22
315
319
  [s6]: https://github.com/visionmedia/superagent/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3ABug
316
320
 
317
321
  <!-- DEPENDENTS -->