Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

feat!: upgrade to esm libp2p/ipfs #462

Merged
merged 88 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
46b7554
feat: upgrade to esm libp2p/ipfs
achingbrain May 9, 2022
4314291
chore: upgrade ipfsd-ctl
achingbrain May 9, 2022
99e5750
fix: update files
achingbrain May 9, 2022
f28aaeb
fix: deps
achingbrain May 9, 2022
a316b01
chore: update test
achingbrain May 10, 2022
b6191c7
chore: run browser interop tests
achingbrain May 10, 2022
72248b7
chore: update files tests
achingbrain May 12, 2022
2ec9f4e
chore: refactor ipns pubsub tests to remove asserting on failure
achingbrain May 13, 2022
347fb03
chore: only run one dht test temporarily
achingbrain May 13, 2022
d328428
chore: run more tests
achingbrain May 13, 2022
fd977dd
chore: run more tests
achingbrain May 13, 2022
a14d853
chore: longer delay
achingbrain May 13, 2022
c8970fb
chore: delay after creating network?
achingbrain May 13, 2022
316abaf
chore: revert
achingbrain May 13, 2022
0487037
chore: fewer tests
achingbrain May 13, 2022
afe6577
chore: wip
achingbrain May 13, 2022
6c68ded
chore: check routing tables before test
achingbrain May 13, 2022
4177511
chore: run more
achingbrain May 13, 2022
40a51b2
chore: check routing tables before tests
achingbrain May 13, 2022
6954e3a
chore: shorten timeout
achingbrain May 13, 2022
2552897
chore: wait for all nodes to be connected
achingbrain May 13, 2022
104df78
chore: update test
achingbrain May 13, 2022
59ec9f1
fix: skip flaky test
achingbrain May 26, 2022
e4b86d3
chore: fix ws filters
achingbrain Jun 22, 2022
9ef44ef
chore: correct from type
achingbrain Jun 24, 2022
fe1ee57
chore: update deps
achingbrain Jun 28, 2022
0c01130
chore: update deps
achingbrain Jun 29, 2022
b3bc8d2
chore: update deps
achingbrain Aug 11, 2022
ca5e256
chore: update project config
achingbrain Aug 15, 2022
71cdf22
chore: update project config
achingbrain Aug 15, 2022
9484a32
chore: do not add peer id to printed addr
achingbrain Aug 15, 2022
baaab3f
chore: update config
achingbrain Aug 15, 2022
7ad1c2f
chore: update files
achingbrain Aug 15, 2022
6a3585e
chore: try delay
achingbrain Aug 17, 2022
f717d75
chore: still flaky
achingbrain Aug 17, 2022
48f138c
chore: fix routing table check
achingbrain Aug 17, 2022
1a6a2ab
chore: shim test
achingbrain Aug 17, 2022
44284d4
chore: add missing import
achingbrain Aug 17, 2022
6ec6ae2
chore: shim test
achingbrain Aug 17, 2022
d7788ac
chore: update deps
achingbrain Sep 7, 2022
e5bb9e4
chore: add missing dep
achingbrain Sep 7, 2022
714b05a
chore: use unified ci
achingbrain Sep 7, 2022
37687f6
chore: update go-ipfs
achingbrain Sep 8, 2022
685e614
chore: update test commands
achingbrain Sep 9, 2022
5dce340
docs: update readme
achingbrain Sep 9, 2022
22b14a6
chore: make relay daemon executable
achingbrain Sep 9, 2022
14d2689
Merge remote-tracking branch 'origin/master' into feat/upgrade-to-esm…
achingbrain Sep 9, 2022
7b14b56
chore: should be exectutable
achingbrain Sep 9, 2022
69f341d
chore: use random identity file
achingbrain Sep 10, 2022
70e5cb7
chore: fix electron
achingbrain Sep 10, 2022
f96545f
fix: download relay daemon on demand
achingbrain Sep 10, 2022
aa362c4
chore: remove postinstall
achingbrain Sep 10, 2022
cde64f7
chore: remove correct relay daemon
achingbrain Sep 10, 2022
c597b3d
chore: remove correct relay daemon
achingbrain Sep 10, 2022
8837211
chore: remove invalid paths
achingbrain Sep 10, 2022
62c2f7b
chore: fix browsers
achingbrain Sep 10, 2022
08d20e2
chore: update lockfile
achingbrain Sep 10, 2022
0e2341e
chore: add debug log
achingbrain Sep 10, 2022
7660bc3
chore: tweak timeouts
achingbrain Sep 10, 2022
9454c8e
chore: tweak timeouts
achingbrain Sep 10, 2022
64d9993
chore: debug node
achingbrain Sep 10, 2022
8a307ab
chore: more logging
achingbrain Sep 12, 2022
3f8197f
chore: fewer logs
achingbrain Sep 12, 2022
81e7517
chore: update multiaddr
achingbrain Sep 12, 2022
3420e75
chore: update multiaddr
achingbrain Sep 12, 2022
02d25fd
chore: patch multiaddr
achingbrain Sep 13, 2022
3dcb3db
chore: add patch-package
achingbrain Sep 13, 2022
7259693
chore: more patch
achingbrain Sep 13, 2022
fa45519
chore: more patch
achingbrain Sep 13, 2022
e95e846
chore: more patch
achingbrain Sep 13, 2022
5aea371
chore: more patch
achingbrain Sep 13, 2022
6bb327d
chore: try older node
achingbrain Sep 13, 2022
543568b
chore: more patch
achingbrain Sep 13, 2022
20bf299
chore: restore builds
achingbrain Sep 13, 2022
cfc79b6
chore: remove patch
achingbrain Sep 13, 2022
90b0070
chore: update test
achingbrain Sep 13, 2022
7e04ec8
chore: update lockfile
achingbrain Sep 13, 2022
9e1278f
chore: just run failing mac test
achingbrain Sep 13, 2022
3a00b08
chore: reduce logging
achingbrain Sep 13, 2022
b393ee9
chore: run all test
achingbrain Sep 13, 2022
c7067a8
chore: enable other platforms
achingbrain Sep 13, 2022
f693dd0
chore: fix up exchange files on windows to not use filesystem
achingbrain Sep 16, 2022
985f042
chore: restore depth
achingbrain Sep 16, 2022
623fc48
chore: decrease timeout
achingbrain Sep 16, 2022
11f5a90
chore: linting
achingbrain Sep 16, 2022
84cc965
chore: timeout is already set
achingbrain Sep 16, 2022
5e8d78b
chore: reject with expection failure
achingbrain Sep 16, 2022
4251b6d
chore: timeout publisher and subscriber individually
achingbrain Sep 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 28 additions & 16 deletions .aegir.cjs → .aegir.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
'use strict'
import path from 'path'
import { createServer } from 'ipfsd-ctl'
import { sigServer } from '@libp2p/webrtc-star-signalling-server'
import { fileURLToPath } from 'url'
import { resolve } from 'import-meta-resolve'

const path = require('path')
const createServer = require('ipfsd-ctl').createServer
const signaller = require('libp2p-webrtc-star-signalling-server')
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const ipfsModule = await resolve(process.env.IPFS_JS_HTTP_MODULE || 'ipfs', import.meta.url)
const ipfsHttpModule = await resolve(process.env.IPFS_JS_HTTP_MODULE || 'ipfs-http-client', import.meta.url)

async function findGoIpfsBin () {
if (process.env.IPFS_GO_EXEC != null) {
return process.env.IPFS_GO_EXEC
}

const modulePath = await resolve(process.env.IPFS_GO_IPFS_MODULE || 'go-ipfs', import.meta.url)
const module = await import(modulePath.replace('file://', ''))

return module.path()
}

/** @type {import('aegir').Options["build"]["config"]} */
const esbuild = {
Expand All @@ -11,33 +26,29 @@ const esbuild = {
{
name: 'node built ins',
setup (build) {
build.onResolve({ filter: /^stream$/ }, () => {
return { path: require.resolve('readable-stream') }
})

build.onResolve({ filter: /^ipfs$/ }, () => {
return { path: require.resolve(process.env.IPFS_JS_MODULE || 'ipfs') }
return { path: ipfsModule.replace('file://', '') }
})
build.onResolve({ filter: /^ipfs-http-client$/ }, () => {
return { path: require.resolve(process.env.IPFS_JS_HTTP_MODULE || 'ipfs-http-client') }
return { path: ipfsHttpModule.replace('file://', '') }
})
}
}
]
}

const ipfsHttpModule = require(process.env.IPFS_JS_HTTP_MODULE || 'ipfs-http-client')
const ipfsModule = require(process.env.IPFS_JS_MODULE || 'ipfs')

/** @type {import('aegir').PartialOptions} */
module.exports = {
export default {
test: {
browser: {
config: {
buildConfig: esbuild
}
},
async before (options) {
const ipfsHttpModule = await import(process.env.IPFS_JS_HTTP_MODULE || 'ipfs-http-client')
const ipfsModule = await import(process.env.IPFS_JS_MODULE || 'ipfs')

if (options.runner !== 'node') {
const ipfsdServer = await createServer({
host: '127.0.0.1',
Expand All @@ -48,7 +59,7 @@ module.exports = {
ipfsHttpModule
}, {
go: {
ipfsBin: process.env.IPFS_GO_EXEC || require(process.env.IPFS_GO_IPFS_MODULE || 'go-ipfs').path()
ipfsBin: await findGoIpfsBin()
},
js: {
ipfsOptions: {
Expand All @@ -65,11 +76,12 @@ module.exports = {
}
}).start()

const signallingServer = await signaller.start({
const signallingServer = await sigServer({
port: 24642,
host: '0.0.0.0',
metrics: false
})

return {
ipfsdServer,
signallingServer
Expand Down
Loading