got 14.4.1 → 14.4.3

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { Buffer } from 'node:buffer';
3
2
  import type PCancelable from 'p-cancelable';
4
3
  import { RequestError } from '../core/errors.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { Timings } from '@szmarczak/http-timer';
3
2
  import type Options from './options.js';
4
3
  import type { TimeoutError as TimedOutTimeoutError } from './timed-out.js';
@@ -1,8 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- /// <reference types="node" resolution-mode="require"/>
4
- /// <reference types="node" resolution-mode="require"/>
5
- /// <reference types="node" resolution-mode="require"/>
6
1
  import { Duplex } from 'node:stream';
7
2
  import { type ClientRequest } from 'node:http';
8
3
  import type { Socket } from 'node:net';
@@ -5,8 +5,7 @@ import http, { ServerResponse } from 'node:http';
5
5
  import timer from '@szmarczak/http-timer';
6
6
  import CacheableRequest, { CacheError as CacheableCacheError, } from 'cacheable-request';
7
7
  import decompressResponse from 'decompress-response';
8
- import is from '@sindresorhus/is';
9
- import { getStreamAsBuffer } from 'get-stream';
8
+ import is, { isBuffer } from '@sindresorhus/is';
10
9
  import { FormDataEncoder, isFormData as isFormDataLike } from 'form-data-encoder';
11
10
  import getBodySize from './utils/get-body-size.js';
12
11
  import isFormData from './utils/is-form-data.js';
@@ -627,10 +626,8 @@ export default class Request extends Duplex {
627
626
  }
628
627
  try {
629
628
  // Errors are emitted via the `error` event
630
- const rawBody = await getStreamAsBuffer(from);
631
- // TODO: Switch to this:
632
- // let rawBody = await from.toArray();
633
- // rawBody = Buffer.concat(rawBody);
629
+ const fromArray = await from.toArray();
630
+ const rawBody = isBuffer(fromArray.at(0)) ? Buffer.concat(fromArray) : Buffer.from(fromArray.join(''));
634
631
  // On retry Request is destroyed with no error, therefore the above will successfully resolve.
635
632
  // So in order to check if this was really successfull, we need to check if it has been properly ended.
636
633
  if (!this.isAborted) {
@@ -735,13 +732,13 @@ export default class Request extends Duplex {
735
732
  }
736
733
  })();
737
734
  }
738
- else if (event === 'abort') {
735
+ else if (event === 'abort' || event === 'destroy') {
739
736
  // The empty catch is needed here in case when
740
737
  // it rejects before it's `await`ed in `_makeRequest`.
741
738
  (async () => {
742
739
  try {
743
740
  const request = (await result);
744
- request.once('abort', handler);
741
+ request.once(event, handler);
745
742
  }
746
743
  catch { }
747
744
  })();
@@ -794,7 +791,7 @@ export default class Request extends Duplex {
794
791
  // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
795
792
  delete headers[key];
796
793
  }
797
- else if (is.null_(headers[key])) {
794
+ else if (is.null(headers[key])) {
798
795
  throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`);
799
796
  }
800
797
  }
@@ -1,11 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- /// <reference types="node" resolution-mode="require"/>
4
- /// <reference types="node" resolution-mode="require"/>
5
- /// <reference types="node" resolution-mode="require"/>
6
- /// <reference types="node" resolution-mode="require"/>
7
- /// <reference types="node" resolution-mode="require"/>
8
- /// <reference types="node" resolution-mode="require"/>
9
1
  import type { Buffer } from 'node:buffer';
10
2
  import { checkServerIdentity, type SecureContextOptions, type DetailedPeerCertificate } from 'node:tls';
11
3
  import https, { type RequestOptions as HttpsRequestOptions, type Agent as HttpsAgent } from 'node:https';
@@ -1139,7 +1131,7 @@ export default class Options {
1139
1131
  h2session: http2wrapper.ClientHttp2Session | undefined;
1140
1132
  decompress: boolean;
1141
1133
  prefixUrl: string | URL;
1142
- body: string | Readable | Buffer | Generator<unknown, any, unknown> | AsyncGenerator<unknown, any, unknown> | FormDataLike | undefined;
1134
+ body: string | Readable | Buffer | Generator<unknown, any, any> | AsyncGenerator<unknown, any, any> | FormDataLike | undefined;
1143
1135
  form: Record<string, any> | undefined;
1144
1136
  url: string | URL | undefined;
1145
1137
  cookieJar: PromiseCookieJar | ToughCookieJar | undefined;
@@ -1151,7 +1143,7 @@ export default class Options {
1151
1143
  (hostname: string, callback: (error: NodeJS.ErrnoException | null, address: string, family: import("cacheable-lookup").IPFamily) => void): void;
1152
1144
  (hostname: string, options: import("cacheable-lookup").LookupOptions & {
1153
1145
  all: true;
1154
- }, callback: (error: NodeJS.ErrnoException | null, result: readonly import("cacheable-lookup").EntryObject[]) => void): void;
1146
+ }, callback: (error: NodeJS.ErrnoException | null, result: ReadonlyArray<import("cacheable-lookup").EntryObject>) => void): void;
1155
1147
  (hostname: string, options: import("cacheable-lookup").LookupOptions, callback: (error: NodeJS.ErrnoException | null, address: string, family: import("cacheable-lookup").IPFamily) => void): void;
1156
1148
  } | undefined;
1157
1149
  dnsCache: boolean | CacheableLookup | undefined;
@@ -1203,7 +1195,7 @@ export default class Options {
1203
1195
  (hostname: string, callback: (error: NodeJS.ErrnoException | null, address: string, family: import("cacheable-lookup").IPFamily) => void): void;
1204
1196
  (hostname: string, options: import("cacheable-lookup").LookupOptions & {
1205
1197
  all: true;
1206
- }, callback: (error: NodeJS.ErrnoException | null, result: readonly import("cacheable-lookup").EntryObject[]) => void): void;
1198
+ }, callback: (error: NodeJS.ErrnoException | null, result: ReadonlyArray<import("cacheable-lookup").EntryObject>) => void): void;
1207
1199
  (hostname: string, options: import("cacheable-lookup").LookupOptions, callback: (error: NodeJS.ErrnoException | null, address: string, family: import("cacheable-lookup").IPFamily) => void): void;
1208
1200
  } | undefined;
1209
1201
  family: DnsLookupIpVersion;
@@ -1218,19 +1210,19 @@ export default class Options {
1218
1210
  h2session: http2wrapper.ClientHttp2Session | undefined;
1219
1211
  _defaultAgent?: http.Agent | undefined;
1220
1212
  auth?: string | null | undefined;
1221
- defaultPort?: string | number | undefined;
1222
- hints?: number | undefined;
1213
+ defaultPort?: number | string | undefined;
1214
+ hints?: import("dns").LookupOptions["hints"];
1223
1215
  host?: string | null | undefined;
1224
1216
  hostname?: string | null | undefined;
1225
1217
  insecureHTTPParser?: boolean | undefined;
1226
1218
  localPort?: number | undefined;
1227
1219
  path?: string | null | undefined;
1228
- port?: string | number | null | undefined;
1220
+ port?: number | string | null | undefined;
1229
1221
  protocol?: string | null | undefined;
1230
1222
  signal?: AbortSignal | undefined;
1231
1223
  socketPath?: string | undefined;
1232
- uniqueHeaders?: (string | string[])[] | undefined;
1233
- joinDuplicateHeaders?: boolean | undefined;
1224
+ uniqueHeaders?: Array<string | string[]> | undefined;
1225
+ joinDuplicateHeaders?: boolean;
1234
1226
  ALPNCallback?: ((arg: {
1235
1227
  servername: string;
1236
1228
  protocols: string[];
@@ -1243,10 +1235,10 @@ export default class Options {
1243
1235
  sessionIdContext?: string | undefined;
1244
1236
  ticketKeys?: Buffer | undefined;
1245
1237
  servername?: string | undefined;
1246
- shared?: boolean | undefined;
1247
- cacheHeuristic?: number | undefined;
1248
- immutableMinTimeToLive?: number | undefined;
1249
- ignoreCargoCult?: boolean | undefined;
1238
+ shared?: boolean;
1239
+ cacheHeuristic?: number;
1240
+ immutableMinTimeToLive?: number;
1241
+ ignoreCargoCult?: boolean;
1250
1242
  };
1251
1243
  getRequestFunction(): RequestFunction | typeof https.request | undefined;
1252
1244
  getFallbackRequestFunction(): RequestFunction | typeof https.request | undefined;
@@ -15,7 +15,7 @@ function validateSearchParameters(searchParameters) {
15
15
  // eslint-disable-next-line guard-for-in
16
16
  for (const key in searchParameters) {
17
17
  const value = searchParameters[key];
18
- assert.any([is.string, is.number, is.boolean, is.null_, is.undefined], value);
18
+ assert.any([is.string, is.number, is.boolean, is.null, is.undefined], value);
19
19
  }
20
20
  }
21
21
  const globalCache = new Map();
@@ -413,7 +413,7 @@ export default class Options {
413
413
  return this._internals.request;
414
414
  }
415
415
  set request(value) {
416
- assert.any([is.function_, is.undefined], value);
416
+ assert.any([is.function, is.undefined], value);
417
417
  this._internals.request = value;
418
418
  }
419
419
  /**
@@ -730,8 +730,8 @@ export default class Options {
730
730
  return;
731
731
  }
732
732
  let { setCookie, getCookieString } = value;
733
- assert.function_(setCookie);
734
- assert.function_(getCookieString);
733
+ assert.function(setCookie);
734
+ assert.function(getCookieString);
735
735
  /* istanbul ignore next: Horrible `tough-cookie` v3 check */
736
736
  if (setCookie.length === 4 && getCookieString.length === 0) {
737
737
  setCookie = promisify(setCookie.bind(value));
@@ -871,7 +871,7 @@ export default class Options {
871
871
  return this._internals.dnsLookup;
872
872
  }
873
873
  set dnsLookup(value) {
874
- assert.any([is.function_, is.undefined], value);
874
+ assert.any([is.function, is.undefined], value);
875
875
  this._internals.dnsLookup = value;
876
876
  }
877
877
  /**
@@ -961,7 +961,7 @@ export default class Options {
961
961
  assert.any([is.array, is.undefined], hooks);
962
962
  if (hooks) {
963
963
  for (const hook of hooks) {
964
- assert.function_(hook);
964
+ assert.function(hook);
965
965
  }
966
966
  }
967
967
  if (this._merging) {
@@ -993,7 +993,7 @@ export default class Options {
993
993
  return this._internals.followRedirect;
994
994
  }
995
995
  set followRedirect(value) {
996
- assert.any([is.boolean, is.function_], value);
996
+ assert.any([is.boolean, is.function], value);
997
997
  this._internals.followRedirect = value;
998
998
  }
999
999
  get followRedirects() {
@@ -1199,7 +1199,7 @@ export default class Options {
1199
1199
  return this._internals.parseJson;
1200
1200
  }
1201
1201
  set parseJson(value) {
1202
- assert.function_(value);
1202
+ assert.function(value);
1203
1203
  this._internals.parseJson = value;
1204
1204
  }
1205
1205
  /**
@@ -1247,7 +1247,7 @@ export default class Options {
1247
1247
  return this._internals.stringifyJson;
1248
1248
  }
1249
1249
  set stringifyJson(value) {
1250
- assert.function_(value);
1250
+ assert.function(value);
1251
1251
  this._internals.stringifyJson = value;
1252
1252
  }
1253
1253
  /**
@@ -1277,7 +1277,7 @@ export default class Options {
1277
1277
  }
1278
1278
  set retry(value) {
1279
1279
  assert.plainObject(value);
1280
- assert.any([is.function_, is.undefined], value.calculateDelay);
1280
+ assert.any([is.function, is.undefined], value.calculateDelay);
1281
1281
  assert.any([is.number, is.undefined], value.maxRetryAfter);
1282
1282
  assert.any([is.number, is.undefined], value.limit);
1283
1283
  assert.any([is.array, is.undefined], value.methods);
@@ -1331,7 +1331,7 @@ export default class Options {
1331
1331
  return this._internals.createConnection;
1332
1332
  }
1333
1333
  set createConnection(value) {
1334
- assert.any([is.function_, is.undefined], value);
1334
+ assert.any([is.function, is.undefined], value);
1335
1335
  this._internals.createConnection = value;
1336
1336
  }
1337
1337
  /**
@@ -1369,7 +1369,7 @@ export default class Options {
1369
1369
  set https(value) {
1370
1370
  assert.plainObject(value);
1371
1371
  assert.any([is.boolean, is.undefined], value.rejectUnauthorized);
1372
- assert.any([is.function_, is.undefined], value.checkServerIdentity);
1372
+ assert.any([is.function, is.undefined], value.checkServerIdentity);
1373
1373
  assert.any([is.string, is.object, is.array, is.undefined], value.certificateAuthority);
1374
1374
  assert.any([is.string, is.object, is.array, is.undefined], value.key);
1375
1375
  assert.any([is.string, is.object, is.array, is.undefined], value.certificate);
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { Buffer } from 'node:buffer';
3
2
  import type { IncomingMessageWithTimings, Timings } from '@szmarczak/http-timer';
4
3
  import { RequestError } from './errors.js';
@@ -22,7 +21,7 @@ export type PlainResponse = {
22
21
  /**
23
22
  The remote IP address.
24
23
 
25
- This is hopefully a temporary limitation, see [lukechilds/cacheable-request#86](https://github.com/lukechilds/cacheable-request/issues/86).
24
+ This is hopefully a temporary limitation, see [lukechilds/cacheable-request#86](https://web.archive.org/web/20220804165050/https://github.com/jaredwray/cacheable-request/issues/86).
26
25
 
27
26
  __Note__: Not available when the response is cached.
28
27
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { ClientRequest } from 'node:http';
3
2
  declare const reentry: unique symbol;
4
3
  type TimedOutOptions = {
@@ -1,3 +1,2 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { ClientRequestArgs } from 'node:http';
3
2
  export default function getBodySize(body: unknown, headers: ClientRequestArgs['headers']): Promise<number | undefined>;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
1
  import type { Writable, Readable } from 'node:stream';
4
2
  import type { ClientRequest } from 'node:http';
5
3
  declare function isClientRequest(clientRequest: Writable | Readable): clientRequest is ClientRequest;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { Readable } from 'node:stream';
3
2
  type FormData = {
4
3
  getBoundary: () => string;
@@ -1,4 +1,4 @@
1
1
  import is from '@sindresorhus/is';
2
2
  export default function isFormData(body) {
3
- return is.nodeStream(body) && is.function_(body.getBoundary);
3
+ return is.nodeStream(body) && is.function(body.getBoundary);
4
4
  }
@@ -1,3 +1,2 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { EventEmitter } from 'node:events';
3
2
  export default function proxyEvents(from: EventEmitter, to: EventEmitter, events: Readonly<string[]>): () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { EventEmitter } from 'node:events';
3
2
  type Origin = EventEmitter;
4
3
  type Event = string | symbol;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { UrlWithStringQuery } from 'node:url';
3
2
  export type LegacyUrlOptions = {
4
3
  protocol: string;
@@ -1,12 +1,9 @@
1
+ import { setTimeout as delay } from 'node:timers/promises';
1
2
  import is, { assert } from '@sindresorhus/is';
2
3
  import asPromise from './as-promise/index.js';
3
4
  import Request from './core/index.js';
4
5
  import Options from './core/options.js';
5
- // The `delay` package weighs 10KB (!)
6
- const delay = async (ms) => new Promise(resolve => {
7
- setTimeout(resolve, ms);
8
- });
9
- const isGotInstance = (value) => is.function_(value);
6
+ const isGotInstance = (value) => is.function(value);
10
7
  const aliases = [
11
8
  'get',
12
9
  'post',
@@ -33,9 +30,9 @@ const create = (defaults) => {
33
30
  const lastHandler = (normalized) => {
34
31
  // Note: `options` is `undefined` when `new Options(...)` fails
35
32
  request.options = normalized;
36
- request._noPipe = !normalized.isStream;
33
+ request._noPipe = !normalized?.isStream;
37
34
  void request.flush();
38
- if (normalized.isStream) {
35
+ if (normalized?.isStream) {
39
36
  return request;
40
37
  }
41
38
  promise ||= asPromise(request);
@@ -45,7 +42,7 @@ const create = (defaults) => {
45
42
  const iterateHandlers = (newOptions) => {
46
43
  const handler = defaults.handlers[iteration++] ?? lastHandler;
47
44
  const result = handler(newOptions, iterateHandlers);
48
- if (is.promise(result) && !request.options.isStream) {
45
+ if (is.promise(result) && !request.options?.isStream) {
49
46
  promise ||= asPromise(request);
50
47
  if (result !== promise) {
51
48
  const descriptors = Object.getOwnPropertyDescriptors(promise);
@@ -93,10 +90,10 @@ const create = (defaults) => {
93
90
  let normalizedOptions = new Options(url, options, defaults.options);
94
91
  normalizedOptions.resolveBodyOnly = false;
95
92
  const { pagination } = normalizedOptions;
96
- assert.function_(pagination.transform);
97
- assert.function_(pagination.shouldContinue);
98
- assert.function_(pagination.filter);
99
- assert.function_(pagination.paginate);
93
+ assert.function(pagination.transform);
94
+ assert.function(pagination.shouldContinue);
95
+ assert.function(pagination.filter);
96
+ assert.function(pagination.paginate);
100
97
  assert.number(pagination.countLimit);
101
98
  assert.number(pagination.requestLimit);
102
99
  assert.number(pagination.backoff);
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { Buffer } from 'node:buffer';
3
2
  import type { Spread } from 'type-fest';
4
3
  import type { CancelableRequest } from './as-promise/types.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "got",
3
- "version": "14.4.1",
3
+ "version": "14.4.3",
4
4
  "description": "Human-friendly and powerful HTTP request library for Node.js",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/got",
@@ -48,60 +48,60 @@
48
48
  "ky"
49
49
  ],
50
50
  "dependencies": {
51
- "@sindresorhus/is": "^6.3.1",
51
+ "@sindresorhus/is": "^7.0.1",
52
52
  "@szmarczak/http-timer": "^5.0.1",
53
53
  "cacheable-lookup": "^7.0.0",
54
54
  "cacheable-request": "^12.0.1",
55
55
  "decompress-response": "^6.0.0",
56
56
  "form-data-encoder": "^4.0.2",
57
- "get-stream": "^8.0.1",
58
57
  "http2-wrapper": "^2.2.1",
59
58
  "lowercase-keys": "^3.0.0",
60
59
  "p-cancelable": "^4.0.1",
61
60
  "responselike": "^3.0.0",
62
- "type-fest": "^4.19.0"
61
+ "type-fest": "^4.26.1"
63
62
  },
64
63
  "devDependencies": {
65
64
  "@hapi/bourne": "^3.0.0",
66
- "@sindresorhus/tsconfig": "^5.0.0",
65
+ "@sindresorhus/tsconfig": "^6.0.0",
67
66
  "@sinonjs/fake-timers": "^11.2.2",
68
67
  "@types/benchmark": "^2.1.5",
69
- "@types/express": "^4.17.21",
70
- "@types/node": "^20.12.12",
68
+ "@types/express": "^5.0.0",
69
+ "@types/node": "^22.7.5",
71
70
  "@types/pem": "^1.14.4",
72
71
  "@types/readable-stream": "^4.0.14",
73
72
  "@types/request": "^2.48.12",
74
73
  "@types/sinon": "^17.0.2",
75
74
  "@types/sinonjs__fake-timers": "^8.1.5",
76
75
  "ava": "^5.3.1",
77
- "axios": "^1.6.8",
76
+ "axios": "^1.7.7",
78
77
  "benchmark": "^2.1.4",
79
78
  "bluebird": "^3.7.2",
80
- "body-parser": "^1.20.2",
79
+ "body-parser": "^1.20.3",
81
80
  "create-cert": "^1.0.6",
82
81
  "create-test-server": "^3.0.1",
83
- "del-cli": "^5.1.0",
82
+ "del-cli": "^6.0.0",
84
83
  "delay": "^6.0.0",
85
- "expect-type": "^0.19.0",
86
- "express": "^4.19.2",
84
+ "expect-type": "^1.0.0",
85
+ "express": "^4.21.1",
87
86
  "form-data": "^4.0.0",
88
87
  "formdata-node": "^6.0.3",
89
- "nock": "^13.5.4",
88
+ "get-stream": "^9.0.1",
89
+ "nock": "^13.5.5",
90
90
  "node-fetch": "^3.3.2",
91
91
  "np": "^10.0.5",
92
- "nyc": "^15.1.0",
92
+ "nyc": "^17.1.0",
93
93
  "p-event": "^6.0.1",
94
94
  "pem": "^1.14.8",
95
95
  "pify": "^6.1.0",
96
96
  "readable-stream": "^4.4.2",
97
97
  "request": "^2.88.2",
98
- "sinon": "^18.0.0",
98
+ "sinon": "^19.0.2",
99
99
  "slow-stream": "0.0.4",
100
100
  "tempy": "^3.1.0",
101
101
  "then-busboy": "^5.2.1",
102
102
  "tough-cookie": "^4.1.4",
103
- "tsx": "^4.10.4",
104
- "typescript": "^5.4.5",
103
+ "tsx": "^4.19.1",
104
+ "typescript": "^5.6.3",
105
105
  "xo": "^0.56.0"
106
106
  },
107
107
  "ava": {
package/readme.md CHANGED
@@ -5,6 +5,8 @@
5
5
  <br>
6
6
  <br>
7
7
  <br>
8
+ <br>
9
+ <hr>
8
10
  <p>
9
11
  <p>
10
12
  <sup>
@@ -13,41 +15,6 @@
13
15
  </p>
14
16
  <br>
15
17
  <br>
16
- <a href="https://retool.com/?utm_campaign=sindresorhus">
17
- <img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="220">
18
- </a>
19
- <br>
20
- <br>
21
- <br>
22
- <a href="https://strapi.io/?ref=sindresorhus">
23
- <div>
24
- <img src="https://sindresorhus.com/assets/thanks/strapi-logo-white-bg.png" width="200" alt="Strapi">
25
- </div>
26
- <b>Strapi is the leading open-source headless CMS.</b>
27
- <div>
28
- <sup>It’s 100% JavaScript, fully customizable, and developer-first.</sup>
29
- </div>
30
- </a>
31
- <br>
32
- <br>
33
- <br>
34
- <a href="https://serpapi.com#gh-light-mode-only">
35
- <div>
36
- <img src="https://sindresorhus.com/assets/thanks/serpapi-logo-light.svg" width="130" alt="SerpApi">
37
- </div>
38
- <b>API to get search engine results with ease.</b>
39
- </a>
40
- <a href="https://serpapi.com#gh-dark-mode-only">
41
- <div>
42
- <img src="https://sindresorhus.com/assets/thanks/serpapi-logo-dark.svg" width="120" alt="SerpApi">
43
- </div>
44
- <b>API to get search engine results with ease.</b>
45
- </a>
46
- <br>
47
- <br>
48
- <br>
49
- <br>
50
- <br>
51
18
  <a href="https://www.fame.fi#gh-light-mode-only">
52
19
  <img src="https://sindresorhus.com/assets/thanks/fame-logo-light.svg" width="200" alt="Fame Helsinki">
53
20
  </a>
@@ -58,8 +25,28 @@
58
25
  <br>
59
26
  <br>
60
27
  <br>
61
- <br>
28
+ <a href="https://encore.dev?utm_campaign=github_repo&utm_medium=referral&utm_content=sindre&utm_source=github">
29
+ <div>
30
+ <picture>
31
+ <source width="230" media="(prefers-color-scheme: dark)" srcset="https://sindresorhus.com/assets/thanks/encore-logo-dark.svg">
32
+ <source width="230" media="(prefers-color-scheme: light)" srcset="https://sindresorhus.com/assets/thanks/encore-logo-light.svg">
33
+ <img width="230" src="https://sindresorhus.com/assets/thanks/encore-logo-light.svg" alt="Encore logo">
34
+ </picture>
35
+ </div>
36
+ <b>The development platform for building type-safe distributed systems</b>
37
+ <div>
38
+ <sup>End-to-end tooling from local development to automated DevOps and infrastructure in your AWS/GCP.</sup>
39
+ </div>
40
+ <br>
41
+ <br>
42
+ </a>
62
43
  </p>
44
+ <hr>
45
+ <br>
46
+ <br>
47
+ <br>
48
+ <br>
49
+ <br>
63
50
  <br>
64
51
  <br>
65
52
  </div>
@@ -185,14 +172,14 @@ By default, Got will retry on failure. To disable this option, set [`options.ret
185
172
 
186
173
  | | `got` | [`node-fetch`][n0] | [`ky`][k0] | [`axios`][a0] | [`superagent`][s0] |
187
174
  |-----------------------|:-------------------:|:--------------------:|:------------------------:|:------------------:|:----------------------:|
188
- | HTTP/2 support | :heavy_check_mark:¹ | :x: | :x: | :x: | :heavy_check_mark:\*\* |
175
+ | HTTP/2 support | :heavy_check_mark:¹ | :x: | :heavy_check_mark: | :x: | :heavy_check_mark:\*\* |
189
176
  | Browser support | :x: | :heavy_check_mark:\* | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
190
177
  | Promise API | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
191
178
  | Stream API | :heavy_check_mark: | Node.js only | :x: | :x: | :heavy_check_mark: |
192
179
  | Pagination API | :heavy_check_mark: | :x: | :x: | :x: | :x: |
193
180
  | Request cancelation | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
194
181
  | RFC compliant caching | :heavy_check_mark: | :x: | :x: | :x: | :x: |
195
- | Cookies (out-of-the-box) | :heavy_check_mark: | :x: | :x: | :x: | :x: |
182
+ | Cookies (out-of-the-box) | :heavy_check_mark: | :x: | :x: | :x: | :x: |
196
183
  | Follows redirects | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
197
184
  | Retries on failure | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :heavy_check_mark: |
198
185
  | Progress events | :heavy_check_mark: | :x: | :heavy_check_mark:\*\*\* | Browser only | :heavy_check_mark: |
@@ -321,11 +308,11 @@ By default, Got will retry on failure. To disable this option, set [`options.ret
321
308
  [s7]: https://www.npmjs.com/package/visionmedia?activeTab=dependents
322
309
 
323
310
  <!-- INSTALL SIZE -->
324
- [gis]: https://badgen.net/packagephobia/install/got?color=blue&label
325
- [kis]: https://badgen.net/packagephobia/install/ky?color=blue&label
326
- [nis]: https://badgen.net/packagephobia/install/node-fetch?color=blue&label
327
- [ais]: https://badgen.net/packagephobia/install/axios?color=blue&label
328
- [sis]: https://badgen.net/packagephobia/install/superagent?color=blue&label
311
+ [gis]: https://packagephobia.com/badge?p=got
312
+ [kis]: https://packagephobia.com/badge?p=ky
313
+ [nis]: https://packagephobia.com/badge?p=node-fetch
314
+ [ais]: https://packagephobia.com/badge?p=axios
315
+ [sis]: https://packagephobia.com/badge?p=superagent
329
316
 
330
317
  [g8]: https://packagephobia.com/result?p=got
331
318
  [k8]: https://packagephobia.com/result?p=ky
@@ -374,7 +361,7 @@ By default, Got will retry on failure. To disable this option, set [`options.ret
374
361
 
375
362
  [Click here][InstallSizeOfTheDependencies] to see the install size of the Got dependencies.
376
363
 
377
- [InstallSizeOfTheDependencies]: https://packagephobia.com/result?p=@sindresorhus/is@4.0.1,@szmarczak/http-timer@4.0.5,@types/cacheable-request@6.0.1,@types/responselike@1.0.0,cacheable-lookup@6.0.0,cacheable-request@7.0.2,decompress-response@6.0.0,get-stream@6.0.1,http2-wrapper@2.0.5,lowercase-keys@2.0.0,p-cancelable@2.1.1,responselike@2.0.0
364
+ [InstallSizeOfTheDependencies]: https://packagephobia.com/result?p=@sindresorhus/is@7.0.0,@szmarczak/http-timer@5.0.1,cacheable-lookup@7.0.0,cacheable-request@12.0.1,decompress-response@6.0.0,form-data-encoder@4.0.2,http2-wrapper@2.2.1,lowercase-keys@3.0.0,p-cancelable@4.0.1,responselike@3.0.0,type-fest@4.19.0
378
365
 
379
366
  ## Maintainers
380
367
 
@@ -412,12 +399,12 @@ By default, Got will retry on failure. To disable this option, set [`options.ret
412
399
  <tr>
413
400
  <td align="center">
414
401
  <a href="http://karaokes.moe">
415
- <img width="140" valign="middle" src="https://camo.githubusercontent.com/6860e5fa4684c14d8e1aa65df0aba4e6808ea1a9/687474703a2f2f6b6172616f6b65732e6d6f652f6173736574732f696d616765732f696e6465782e706e67">
402
+ <img width="140" valign="middle" src="https://karaokes.moe/assets/images/index.png">
416
403
  </a>
417
404
  </td>
418
405
  <td align="center">
419
406
  <a href="https://github.com/renovatebot/renovate">
420
- <img width="150" valign="middle" src="https://camo.githubusercontent.com/7c2dc41a8407d4cfa700f762a1abf46b232858ae7e3a2bf5aee7d9f36416127c/68747470733a2f2f6170702e72656e6f76617465626f742e636f6d2f696d616765732f72656e6f766174655f3636305f3232302e6a7067">
407
+ <img width="150" valign="middle" src="https://avatars.githubusercontent.com/u/38656520?s=200&v=4">
421
408
  </a>
422
409
  </td>
423
410
  <td align="center">
@@ -442,11 +429,6 @@ By default, Got will retry on failure. To disable this option, set [`options.ret
442
429
  <img width="150" valign="middle" src="https://user-images.githubusercontent.com/29518613/91814036-97fb9500-ec44-11ea-8c6c-d198cc23ca29.png">
443
430
  </a>
444
431
  </td>
445
- <td align="center">
446
- <a href="https://apify.com">
447
- <img width="150" valign="middle" src="https://user-images.githubusercontent.com/23726914/128673143-958b5930-b677-40ef-8087-5698a0c29c45.png">
448
- </a>
449
- </td>
450
432
  </tr>
451
433
  </tbody>
452
434
  </table>
@@ -496,7 +478,3 @@ By default, Got will retry on failure. To disable this option, set [`options.ret
496
478
  > We’re using Got at Radity. Thanks for such an amazing work!
497
479
  >
498
480
  > — <a href="https://github.com/MirzayevFarid">Mirzayev Farid</a>
499
-
500
- > Got has been a crucial component of Apify's scraping for years. We use it to extract data from billions of web pages every month, and we really appreciate the powerful API and extensibility, which allowed us to build our own specialized HTTP client on top of Got. The support has always been stellar too.
501
- >
502
- > — <a href="https://github.com/mnmkng">Ondra Urban</a>