Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 18, 2021
1 parent 30aad38 commit 49c605c
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Expand Up @@ -24,7 +24,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
# - uses: codecov/codecov-action@v1
# - uses: codecov/codecov-action@v2
# if: matrix.os == 'ubuntu-latest' && matrix.node-version == 16
# with:
# fail_ci_if_error: true
8 changes: 4 additions & 4 deletions benchmark/index.ts
Expand Up @@ -118,18 +118,18 @@ suite.add('got - promise', {
}).add('node-fetch - promise', {
defer: true,
fn: async (deferred: {resolve: () => void}) => {
const response = await fetch(url, fetchOptions);
const response = await fetch(urlString, fetchOptions);
await response.text();

deferred.resolve();
},
}).add('node-fetch - stream', {
defer: true,
fn: async (deferred: {resolve: () => void}) => {
const {body} = await fetch(url, fetchOptions);
const {body} = await fetch(urlString, fetchOptions);

body.resume();
body.once('end', () => {
body!.resume();
body!.once('end', () => {
deferred.resolve();
});
},
Expand Down
27 changes: 13 additions & 14 deletions package.json
Expand Up @@ -51,7 +51,7 @@
"cacheable-lookup": "^6.0.4",
"cacheable-request": "^7.0.2",
"decompress-response": "^6.0.0",
"form-data-encoder": "^1.6.0",
"form-data-encoder": "1.6.0",
"get-stream": "^6.0.1",
"http2-wrapper": "^2.1.9",
"lowercase-keys": "^3.0.0",
Expand All @@ -61,20 +61,19 @@
"devDependencies": {
"@hapi/bourne": "^2.0.0",
"@sindresorhus/tsconfig": "^2.0.0",
"@sinonjs/fake-timers": "^8.0.1",
"@sinonjs/fake-timers": "^8.1.0",
"@types/benchmark": "^2.1.1",
"@types/express": "^4.17.13",
"@types/node": "^16.11.3",
"@types/node-fetch": "^2.5.12",
"@types/node": "^16.11.7",
"@types/pem": "^1.9.6",
"@types/pify": "^5.0.1",
"@types/readable-stream": "^2.3.11",
"@types/request": "^2.48.7",
"@types/sinon": "^10.0.4",
"@types/sinonjs__fake-timers": "^6.0.4",
"@types/sinon": "^10.0.6",
"@types/sinonjs__fake-timers": "^8.1.0",
"@types/tough-cookie": "^4.0.1",
"ava": "^3.15.0",
"axios": "^0.23.0",
"axios": "^0.24.0",
"benchmark": "^2.1.4",
"bluebird": "^3.7.2",
"body-parser": "^1.19.0",
Expand All @@ -85,24 +84,24 @@
"express": "^4.17.1",
"form-data": "^4.0.0",
"formdata-node": "^4.3.1",
"nock": "^13.1.4",
"node-fetch": "^2.6.5",
"nock": "^13.2.1",
"node-fetch": "^3.1.0",
"np": "^7.5.0",
"nyc": "^15.1.0",
"p-event": "^4.2.0",
"p-event": "^5.0.1",
"pem": "^1.14.4",
"pify": "^5.0.0",
"readable-stream": "^3.6.0",
"request": "^2.88.2",
"sinon": "^11.1.2",
"sinon": "^12.0.1",
"slow-stream": "0.0.4",
"tempy": "^2.0.0",
"then-busboy": "^5.1.1",
"to-readable-stream": "^3.0.0",
"tough-cookie": "^4.0.0",
"ts-node": "^10.3.1",
"typescript": "4.4.4",
"xo": "^0.45.0"
"ts-node": "^10.4.0",
"typescript": "4.5.2",
"xo": "^0.46.4"
},
"types": "dist/source",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion test/arguments.ts
@@ -1,7 +1,7 @@
import {parse, URL, URLSearchParams} from 'url';
import test from 'ava';
import {Handler} from 'express';
import pEvent from 'p-event';
import {pEvent} from 'p-event';
import got, {Options, RequestError, StrictOptions} from '../source/index.js';
import withServer, {withBodyParsingServer} from './helpers/with-server.js';
import invalidUrl from './helpers/invalid-url.js';
Expand Down
2 changes: 1 addition & 1 deletion test/cache.ts
Expand Up @@ -3,7 +3,7 @@ import {promisify} from 'util';
import {Agent} from 'http';
import {gzip} from 'zlib';
import test from 'ava';
import pEvent from 'p-event';
import {pEvent} from 'p-event';
import getStream from 'get-stream';
import {Handler} from 'express';
import nock from 'nock';
Expand Down
6 changes: 3 additions & 3 deletions test/cancel.ts
Expand Up @@ -3,7 +3,7 @@ import {EventEmitter} from 'events';
import stream, {Readable as ReadableStream} from 'stream';
import test from 'ava';
import delay from 'delay';
import pEvent from 'p-event';
import {pEvent} from 'p-event';
import getStream from 'get-stream';
import {Handler} from 'express';
import got, {CancelError, TimeoutError} from '../source/index.js';
Expand Down Expand Up @@ -187,7 +187,7 @@ test.serial('cancel immediately', withServerAndFakeTimers, async (t, server, got
test('recover from cancelation using cancelable promise attribute', async t => {
// Canceled before connection started
const p = got('http://example.com');
const recover = p.catch((error: Error) => { // eslint-disable-line promise/prefer-await-to-then
const recover = p.catch((error: Error) => {
if (p.isCanceled) {
return;
}
Expand All @@ -203,7 +203,7 @@ test('recover from cancelation using cancelable promise attribute', async t => {
test('recover from cancellation using error instance', async t => {
// Canceled before connection started
const p = got('http://example.com');
const recover = p.catch((error: Error) => { // eslint-disable-line promise/prefer-await-to-then
const recover = p.catch((error: Error) => {
if (error instanceof CancelError) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion test/http.ts
Expand Up @@ -7,7 +7,7 @@ import test from 'ava';
import {Handler} from 'express';
import nock from 'nock';
import getStream from 'get-stream';
import pEvent from 'p-event';
import {pEvent} from 'p-event';
import got, {HTTPError, ReadError, RequestError} from '../source/index.js';
import withServer from './helpers/with-server.js';

Expand Down
2 changes: 1 addition & 1 deletion test/https.ts
@@ -1,7 +1,7 @@
import process from 'process';
import tls, {DetailedPeerCertificate} from 'tls';
import test from 'ava';
import pEvent from 'p-event';
import {pEvent} from 'p-event';
import pify from 'pify';
import pem from 'pem';
import got from '../source/index.js';
Expand Down
2 changes: 1 addition & 1 deletion test/post.ts
Expand Up @@ -7,7 +7,7 @@ import fsPromises from 'fs/promises';
import path from 'path';
import test from 'ava';
import delay from 'delay';
import pEvent from 'p-event';
import {pEvent} from 'p-event';
import {Handler} from 'express';
import {parse, Body, BodyEntryPath, BodyEntryRawValue, isBodyFile} from 'then-busboy';
import {FormData as FormDataNode, Blob, File} from 'formdata-node';
Expand Down
2 changes: 1 addition & 1 deletion test/retry.ts
Expand Up @@ -7,7 +7,7 @@ import test from 'ava';
import is from '@sindresorhus/is';
import {Handler} from 'express';
import getStream from 'get-stream';
import pEvent from 'p-event';
import {pEvent} from 'p-event';
import got, {HTTPError, TimeoutError} from '../source/index.js';
import Request from '../source/core/index.js';
import withServer from './helpers/with-server.js';
Expand Down
2 changes: 1 addition & 1 deletion test/stream.ts
Expand Up @@ -9,7 +9,7 @@ import test from 'ava';
import {Handler} from 'express';
import toReadableStream from 'to-readable-stream';
import getStream from 'get-stream';
import pEvent from 'p-event';
import {pEvent} from 'p-event';
import FormData from 'form-data';
import is from '@sindresorhus/is';
import delay from 'delay';
Expand Down
2 changes: 1 addition & 1 deletion test/timeout.ts
Expand Up @@ -9,7 +9,7 @@ import test from 'ava';
import delay from 'delay';
import CacheableLookup from 'cacheable-lookup';
import {Handler} from 'express';
import pEvent from 'p-event';
import {pEvent} from 'p-event';
import got, {RequestError, TimeoutError} from '../source/index.js';
import timedOut from '../source/core/timed-out.js';
import slowDataStream from './helpers/slow-data-stream.js';
Expand Down

0 comments on commit 49c605c

Please sign in to comment.