Skip to content

Commit

Permalink
fix: status page supports webrtc (#2180)
Browse files Browse the repository at this point in the history
* feat: use @multiformats/multiaddr
* deps: update multiaddr-to-uri
* deps: update ipld-explorer-components

This also updates ipld-explorer-components to 5.2.0 which will allow us to remove a lot of old deps (part of #1965)
  • Loading branch information
SgtPooki authored Dec 1, 2023
1 parent 7a3388e commit ff75d4e
Show file tree
Hide file tree
Showing 28 changed files with 4,312 additions and 3,785 deletions.
4 changes: 2 additions & 2 deletions @types/ipfs/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
declare module 'ipfs' {
import type CID from 'cids'
import type Multiaddr from 'multiaddr'
import type { CID } from 'multiformats/cid'
import type { Multiaddr } from '@multiformats/multiaddr'
import type { Buffer } from 'buffer'

declare export interface IPFSService extends CoreService {
Expand Down
26 changes: 23 additions & 3 deletions config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ const PURE_ESM_MODULES = [
'ipfs-geoip',
// 'ipld-explorer-components',
'@chainsafe/is-ip',
'dag-jose'
'@multiformats/multiaddr',
'@libp2p/interface',
'dag-jose',
'uint8arrays'
]

/**
Expand Down Expand Up @@ -136,8 +139,25 @@ const configOverride = {
setupFiles: [...config.setupFiles, 'fake-indexeddb/auto'],
moduleNameMapper: {
...config.moduleNameMapper,
'multiformats/basics': '<rootDir>/node_modules/multiformats/src/basics.js'
}
'multiformats/basics': '<rootDir>/node_modules/multiformats/src/basics.js',
'@libp2p/interface/errors': '<rootDir>/node_modules/@libp2p/interface/dist/src/errors.js',
'multiformats/bases/base32': '<rootDir>/node_modules/multiformats/src/bases/base32.js',
'multiformats/bases/base58': '<rootDir>/node_modules/multiformats/src/bases/base58.js',
'multiformats/cid': '<rootDir>/node_modules/multiformats/src/cid.js',
'multiformats/hashes/digest': '<rootDir>/node_modules/multiformats/src/hashes/digest.js',
'uint8arrays/alloc': '<rootDir>/node_modules/uint8arrays/dist/src/alloc.js',
'uint8arrays/concat': '<rootDir>/node_modules/uint8arrays/dist/src/concat.js',
'uint8arrays/equals': '<rootDir>/node_modules/uint8arrays/dist/src/equals.js',
'uint8arrays/from-string': '<rootDir>/node_modules/uint8arrays/dist/src/from-string.js',
'uint8arrays/to-string': '<rootDir>/node_modules/uint8arrays/dist/src/to-string.js',
'@chainsafe/is-ip/parse': '<rootDir>/node_modules/@chainsafe/is-ip/lib/parse.js',
// eslint-disable-next-line quote-props
'eventemitter3': '<rootDir>/node_modules/eventemitter3/dist/eventemitter3.esm.js'
},
transformIgnorePatterns: [
'node_module/(?!(eventemitter3)/).+\\.(js|jsx|mjs|cjs|ts|tsx)$',
'^.+\\.module\\.(css|sass|scss)$' // default
]
})
}
}
Expand Down
Loading

0 comments on commit ff75d4e

Please sign in to comment.