chore: remove ipfs-utils dep (#953)

* chore: remove ipfs-utils dep

We only use it for the env detection, so use [wherearewe](https://www.npmjs.com/package/wherearewe)
instead which is that, but pulled out into a tiny module.

The `TextDecoder` class is global everywhere we support so we don't
need to pull it in from `ipfs-utils` and it's been removed from v8
anyway.

* chore: update ipfs-http-client
This commit is contained in:
Alex Potsides
2021-06-11 09:01:40 +01:00
committed by GitHub
parent cd152f122f
commit 2a6a635f13
8 changed files with 12 additions and 14 deletions

View File

@ -8,7 +8,7 @@ const { Multiaddr } = require('multiaddr')
const log = Object.assign(debug('libp2p:nat'), {
error: debug('libp2p:nat:err')
})
const { isBrowser } = require('ipfs-utils/src/env')
const { isBrowser } = require('wherearewe')
const retry = require('p-retry')
// @ts-ignore private-api does not export types
const isPrivateIp = require('private-ip')