diff --git a/README.md b/README.md index 26f102b64..fb246d9d2 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ Default behavior can be tweaked via env variables below. #### `IPFS_GO_EXEC` -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`. +It is possible to test against arbitrary versions by tweaking `kubo` in `devDependencies` section of `package.json` and applying the change via `npm i`. One can also override the binary used in e2e tests by providing a path to an alternative one via `IPFS_GO_EXEC`: diff --git a/package-lock.json b/package-lock.json index 1ee3a91ef..f6141ad14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -145,7 +145,6 @@ "esm": "^3.2.25", "fake-indexeddb": "^3.1.8", "get-port": "^5.1.1", - "go-ipfs": "^0.20.0", "http-proxy": "^1.18.1", "http-server": "^14.1.1", "ipfs": "0.58.3", @@ -153,6 +152,7 @@ "ipfsd-ctl": "^12.2.2", "jest": "^28.1.3", "jest-watch-typeahead": "^2.0.0", + "kubo": "0.22.0", "multiformats": "^11.0.2", "multihashing-async": "^1.0.0", "npm-run-all": "^4.1.5", @@ -31840,25 +31840,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/go-ipfs": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/go-ipfs/-/go-ipfs-0.20.0.tgz", - "integrity": "sha512-tQNehjHlaPoG6V3Fv5dPnRkOsAvDFYBcdCRPsK/MtOMIxuvZk7XOotuRq7nFS+iSkECpopAjFCFHa7QZRq+REQ==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "cachedir": "^2.3.0", - "got": "^11.7.0", - "gunzip-maybe": "^1.4.2", - "hasha": "^5.2.2", - "pkg-conf": "^3.1.0", - "tar-fs": "^2.1.0", - "unzip-stream": "^0.3.0" - }, - "bin": { - "ipfs": "bin/ipfs" - } - }, "node_modules/good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", @@ -44533,6 +44514,25 @@ "node": ">= 8" } }, + "node_modules/kubo": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/kubo/-/kubo-0.22.0.tgz", + "integrity": "sha512-GF07EfSw6NUts56QYbyX8slZ2e9NuwtVQK7bHIdSF5P2UJMr6TFo+Yp/DixXikvLb5UW2DfSMsSNErMrMAmouQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "cachedir": "^2.3.0", + "got": "^11.7.0", + "gunzip-maybe": "^1.4.2", + "hasha": "^5.2.2", + "pkg-conf": "^3.1.0", + "tar-fs": "^2.1.0", + "unzip-stream": "^0.3.0" + }, + "bin": { + "ipfs": "bin/ipfs" + } + }, "node_modules/kubo-rpc-client": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/kubo-rpc-client/-/kubo-rpc-client-3.0.1.tgz", diff --git a/package.json b/package.json index 5e04444d7..554b35951 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,7 @@ "esm": "^3.2.25", "fake-indexeddb": "^3.1.8", "get-port": "^5.1.1", - "go-ipfs": "^0.20.0", + "kubo": "0.22.0", "http-proxy": "^1.18.1", "http-server": "^14.1.1", "ipfs": "0.58.3", diff --git a/src/bundles/identity.test.js b/src/bundles/identity.test.js index db247acc8..2770e4d7c 100644 --- a/src/bundles/identity.test.js +++ b/src/bundles/identity.test.js @@ -18,7 +18,7 @@ describe.skip('identity.js', function () { 18 | const ipfsHttpModule = await import('ipfs-http-client') > 19 | const { createController } = await import('ipfsd-ctl') | ^ - 20 | const ipfsBin = (await import('go-ipfs')).default.path() + 20 | const ipfsBin = (await import('kubo')).default.path() 21 | console.log('ipfsBin: ', ipfsBin) 22 | /** @@ -33,7 +33,7 @@ describe.skip('identity.js', function () { // console.log('kuboRpcModule: ', kuboRpcModule) const kuboRpcModule = await import('kubo-rpc-client') const { createController } = await import('ipfsd-ctl') - const ipfsBin = (await import('go-ipfs')).default.path() + const ipfsBin = (await import('kubo')).default.path() console.log('ipfsBin: ', ipfsBin) /** * This test allows for a manual run of the Kubo daemon to reproduce and diff --git a/test/e2e/ipns.test.js b/test/e2e/ipns.test.js index 2967d0ac6..e54a715dd 100644 --- a/test/e2e/ipns.test.js +++ b/test/e2e/ipns.test.js @@ -1,6 +1,6 @@ import { test, expect } from './setup/coverage.js' import { createController } from 'ipfsd-ctl' -import { path as getGoIpfsPath } from 'go-ipfs' +import { path as getGoIpfsPath } from 'kubo' import * as kuboRpcModule from 'kubo-rpc-client' // TODO: Fix parallelism of these tests diff --git a/test/e2e/peers.test.js b/test/e2e/peers.test.js index 0dd74e33e..21784eca9 100644 --- a/test/e2e/peers.test.js +++ b/test/e2e/peers.test.js @@ -1,7 +1,7 @@ import { test } from './setup/coverage.js' import { createController } from 'ipfsd-ctl' import * as kuboRpcModule from 'kubo-rpc-client' -import { path as getGoIpfsPath } from 'go-ipfs' +import { path as getGoIpfsPath } from 'kubo' const addConnection = 'text=Add connection' diff --git a/test/e2e/remote-api.test.js b/test/e2e/remote-api.test.js index 0ec08d4fe..24c08eecf 100644 --- a/test/e2e/remote-api.test.js +++ b/test/e2e/remote-api.test.js @@ -5,7 +5,7 @@ import { createServer } from 'http' import httpProxy from 'http-proxy' import basicAuth from 'basic-auth' import toUri from 'multiaddr-to-uri' -import { path as getGoIpfsPath } from 'go-ipfs' +import { path as getGoIpfsPath } from 'kubo' import * as kuboRpcModule from 'kubo-rpc-client' const { createProxyServer } = httpProxy @@ -51,7 +51,7 @@ test.describe('Remote API tests', () => { rpcUrl = new URL(remoteApiUrl).toString() // normalization for browsers proxy.on('proxyReq', (proxyReq, req, res, options) => { // swap Origin before passing to the real API - // This way internal check of go-ipfs does get triggered (403 Forbidden on Origin mismatch) + // This way internal check of kubo does get triggered (403 Forbidden on Origin mismatch) proxyReq.setHeader('Origin', remoteApiUrl) proxyReq.setHeader('Referer', remoteApiUrl) proxyReq.setHeader('Host', new URL(remoteApiUrl).host) diff --git a/test/e2e/setup/ipfs-backend.js b/test/e2e/setup/ipfs-backend.js index 68aeb8847..52eb4f9e9 100644 --- a/test/e2e/setup/ipfs-backend.js +++ b/test/e2e/setup/ipfs-backend.js @@ -37,7 +37,7 @@ async function run (rpcPort) { }, { go: { - ipfsBin: process.env.IPFS_GO_EXEC || (await import('go-ipfs')).default.path() + ipfsBin: process.env.IPFS_GO_EXEC || (await import('kubo')).default.path() } })