Skip to content

Commit

Permalink
fix: remove abort controller deps (#162)
Browse files Browse the repository at this point in the history
`AbortController` and `AbortSignal` are supported in browsers and
node 14+ so the extra deps aren't necessary any more.
  • Loading branch information
achingbrain authored Jan 13, 2022
1 parent 55f5abc commit 2282249
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
},
"license": "MIT",
"dependencies": {
"abort-controller": "^3.0.0",
"any-signal": "^2.1.0",
"any-signal": "^3.0.0",
"buffer": "^6.0.1",
"electron-fetch": "^1.7.2",
"err-code": "^3.0.1",
Expand All @@ -59,14 +58,13 @@
"it-to-stream": "^1.0.0",
"merge-options": "^3.0.4",
"nanoid": "^3.1.20",
"native-abort-controller": "^1.0.3",
"native-fetch": "^3.0.0",
"node-fetch": "https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz",
"react-native-fetch-api": "^2.0.0",
"stream-to-it": "^0.2.2"
},
"devDependencies": {
"aegir": "^35.0.1",
"aegir": "^36.1.1",
"delay": "^5.0.0",
"events": "^3.3.0",
"ipfs-unixfs": "^6.0.4",
Expand Down
1 change: 0 additions & 1 deletion src/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { fetch, Request, Headers } = require('./http/fetch')
const { TimeoutError, HTTPError } = require('./http/error')
const merge = require('merge-options').bind({ ignoreUndefined: true })
const { URL, URLSearchParams } = require('iso-url')
const { AbortController } = require('native-abort-controller')
const anySignal = require('any-signal')

/**
Expand Down
1 change: 0 additions & 1 deletion test/http.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const HTTP = require('../src/http')
// @ts-ignore
const toStream = require('it-to-stream')
const delay = require('delay')
const { AbortController } = require('native-abort-controller')
const drain = require('it-drain')
const all = require('it-all')
const { isBrowser, isWebWorker, isReactNative } = require('../src/env')
Expand Down

0 comments on commit 2282249

Please sign in to comment.