Skip to content

Commit 2839460

Browse files
committed
refactor: switch npm to kubo
cc ipfs/npm-kubo#51 cc ipfs/kubo#8959
1 parent 64a8ff3 commit 2839460

File tree

8 files changed

+29
-29
lines changed

8 files changed

+29
-29
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Default behavior can be tweaked via env variables below.
149149

150150
#### `IPFS_GO_EXEC`
151151

152-
It is possible to test against arbitrary versions by tweaking `go-ipfs` in `devDependencies` section of `package.json` and applying the change via `npm i`.
152+
It is possible to test against arbitrary versions by tweaking `kubo` in `devDependencies` section of `package.json` and applying the change via `npm i`.
153153

154154
One can also override the binary used in e2e tests by providing a path to an alternative one via `IPFS_GO_EXEC`:
155155

package-lock.json

+20-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
"esm": "^3.2.25",
177177
"fake-indexeddb": "^3.1.8",
178178
"get-port": "^5.1.1",
179-
"go-ipfs": "^0.20.0",
179+
"kubo": "0.22.0",
180180
"http-proxy": "^1.18.1",
181181
"http-server": "^14.1.1",
182182
"ipfs": "0.58.3",

src/bundles/identity.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe.skip('identity.js', function () {
1818
18 | const ipfsHttpModule = await import('ipfs-http-client')
1919
> 19 | const { createController } = await import('ipfsd-ctl')
2020
| ^
21-
20 | const ipfsBin = (await import('go-ipfs')).default.path()
21+
20 | const ipfsBin = (await import('kubo')).default.path()
2222
21 | console.log('ipfsBin: ', ipfsBin)
2323
22 | /**
2424
@@ -33,7 +33,7 @@ describe.skip('identity.js', function () {
3333
// console.log('kuboRpcModule: ', kuboRpcModule)
3434
const kuboRpcModule = await import('kubo-rpc-client')
3535
const { createController } = await import('ipfsd-ctl')
36-
const ipfsBin = (await import('go-ipfs')).default.path()
36+
const ipfsBin = (await import('kubo')).default.path()
3737
console.log('ipfsBin: ', ipfsBin)
3838
/**
3939
* This test allows for a manual run of the Kubo daemon to reproduce and

test/e2e/ipns.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { test, expect } from './setup/coverage.js'
22
import { createController } from 'ipfsd-ctl'
3-
import { path as getGoIpfsPath } from 'go-ipfs'
3+
import { path as getGoIpfsPath } from 'kubo'
44
import * as kuboRpcModule from 'kubo-rpc-client'
55

66
// TODO: Fix parallelism of these tests

test/e2e/peers.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test } from './setup/coverage.js'
22
import { createController } from 'ipfsd-ctl'
33
import * as kuboRpcModule from 'kubo-rpc-client'
4-
import { path as getGoIpfsPath } from 'go-ipfs'
4+
import { path as getGoIpfsPath } from 'kubo'
55

66
const addConnection = 'text=Add connection'
77

test/e2e/remote-api.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createServer } from 'http'
55
import httpProxy from 'http-proxy'
66
import basicAuth from 'basic-auth'
77
import toUri from 'multiaddr-to-uri'
8-
import { path as getGoIpfsPath } from 'go-ipfs'
8+
import { path as getGoIpfsPath } from 'kubo'
99
import * as kuboRpcModule from 'kubo-rpc-client'
1010
const { createProxyServer } = httpProxy
1111

@@ -51,7 +51,7 @@ test.describe('Remote API tests', () => {
5151
rpcUrl = new URL(remoteApiUrl).toString() // normalization for browsers
5252
proxy.on('proxyReq', (proxyReq, req, res, options) => {
5353
// swap Origin before passing to the real API
54-
// This way internal check of go-ipfs does get triggered (403 Forbidden on Origin mismatch)
54+
// This way internal check of kubo does get triggered (403 Forbidden on Origin mismatch)
5555
proxyReq.setHeader('Origin', remoteApiUrl)
5656
proxyReq.setHeader('Referer', remoteApiUrl)
5757
proxyReq.setHeader('Host', new URL(remoteApiUrl).host)

test/e2e/setup/ipfs-backend.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async function run (rpcPort) {
3737
},
3838
{
3939
go: {
40-
ipfsBin: process.env.IPFS_GO_EXEC || (await import('go-ipfs')).default.path()
40+
ipfsBin: process.env.IPFS_GO_EXEC || (await import('kubo')).default.path()
4141
}
4242
})
4343

0 commit comments

Comments
 (0)