diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5162d586f..5c6dc2a9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: ci +name: CI on: push: branches: @@ -12,8 +12,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master @@ -22,8 +22,8 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master @@ -40,8 +40,8 @@ jobs: node: [lts/*] fail-fast: true steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - uses: ipfs/aegir/actions/cache-node-modules@master @@ -49,13 +49,14 @@ jobs: - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: flags: node + files: .coverage/*,packages/*/.coverage/* test-chrome: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master @@ -63,13 +64,14 @@ jobs: - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: flags: chrome + files: .coverage/*,packages/*/.coverage/* test-chrome-webworker: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master @@ -77,13 +79,14 @@ jobs: - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: flags: chrome-webworker + files: .coverage/*,packages/*/.coverage/* test-firefox: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master @@ -91,13 +94,14 @@ jobs: - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: flags: firefox + files: .coverage/*,packages/*/.coverage/* test-firefox-webworker: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master @@ -105,13 +109,14 @@ jobs: - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: flags: firefox-webworker + files: .coverage/*,packages/*/.coverage/* test-webkit: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master @@ -119,13 +124,14 @@ jobs: - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: flags: webkit + files: .coverage/*,packages/*/.coverage/* test-electron-main: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master @@ -133,13 +139,14 @@ jobs: - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: flags: electron-main + files: .coverage/*,packages/*/.coverage/* test-electron-renderer: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master @@ -147,6 +154,7 @@ jobs: - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 with: flags: electron-renderer + files: .coverage/*,packages/*/.coverage/* release: runs-on: ubuntu-latest @@ -160,11 +168,15 @@ jobs: test-electron-renderer ] if: github.event_name == 'push' && github.ref == 'refs/heads/main' + permissions: + contents: write + id-token: write + pull-requests: write steps: - - uses: GoogleCloudPlatform/release-please-action@v2 + - uses: google-github-actions/release-please-action@v3 id: release with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.UCI_GITHUB_TOKEN || github.token }} command: manifest release-type: node manifest-file: .release-please-manifest.json @@ -178,10 +190,10 @@ jobs: { "type": "deps", "section": "Dependencies", "hidden": false }, { "type": "refactor", "section": "Refactors", "hidden": false } ] - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: lts/* registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml new file mode 100644 index 000000000..bd00f090c --- /dev/null +++ b/.github/workflows/semantic-pull-request.yml @@ -0,0 +1,12 @@ +name: Semantic PR + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + uses: pl-strflt/.github/.github/workflows/reusable-semantic-pull-request.yml@v0.3 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e9167170d..0a23a8e19 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{"packages/helia":"2.0.2","packages/interface":"2.0.0","packages/interop":"1.0.2"} \ No newline at end of file +{"packages/helia":"2.1.0","packages/interface":"2.1.0","packages/interop":"1.1.0"} \ No newline at end of file diff --git a/.release-please.json b/.release-please.json index 8d7205414..35bf765b9 100644 --- a/.release-please.json +++ b/.release-please.json @@ -1,6 +1,5 @@ { "plugins": ["node-workspace"], - "group-pull-request-title-pattern": "chore: release ${component}", "packages": { "packages/helia": {}, "packages/interface": {}, diff --git a/README.md b/README.md index 1a0ed7cb9..61e60f6d8 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,21 @@

-# helia - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/helia.svg?style=flat-square)](https://codecov.io/gh/ipfs/helia) [![CI](https://img.shields.io/github/actions/workflow/status/ipfs/helia/main.yml?branch=main\&style=flat-square)](https://github.com/ipfs/helia/actions/workflows/main.yml?query=branch%3Amain) -## 🌟 Usage +[Helia](https://github.com/ipfs/helia) is a lean, modular, and modern TypeScript implementation of IPFS for the prolific JS and browser environments. + +See the [Manifesto](https://github.com/ipfs/helia/wiki/Manifesto), the [FAQ](https://github.com/ipfs/helia/wiki/FAQ), and the [State of IPFS in JS blog post from October 2022](https://blog.ipfs.tech/state-of-ipfs-in-js/) for more info. + +# 🌟 Usage A quick overview of how to get different types of data in and out of your Helia node. -### 🪢 Strings +## 🪢 Strings You can use the [@helia/strings](https://www.npmjs.com/package/@helia/strings) module to easily add and get strings from your Helia node: @@ -34,7 +36,7 @@ console.log(await s.get(myImmutableAddress)) // hello world ``` -### 🌃 JSON +## 🌃 JSON The [@helia/json](https://www.npmjs.com/package/@helia/json) module lets you add or get plain JS objects: @@ -52,7 +54,7 @@ console.log(await j.get(myImmutableAddress)) // { hello: 'world' } ``` -### 🌠 DAG-JSON +## 🌠 DAG-JSON The [@helia/dag-json](https://www.npmjs.com/package/@helia/dag-json) allows you to store references to linked objects as @@ -79,7 +81,7 @@ console.log(await d.get(retrievedObject.link)) // { hello: 'world' } ``` -### 🌌 DAG-CBOR +## 🌌 DAG-CBOR [@helia/dag-cbor](https://www.npmjs.com/package/@helia/dag-cbor) works in a similar way to `@helia/dag-json` but stores objects using @@ -106,52 +108,24 @@ console.log(await d.get(retrievedObject.link)) // { hello: 'world' } ``` -### 🐾 Next steps +# 🐾 Next steps Check out the [helia-examples](https://github.com/ipfs-examples/helia-examples) repo for how to do mostly anything with your Helia node. -## Table of contents - -- [🌟 Usage](#-usage) - - [🪢 Strings](#-strings) - - [🌃 JSON](#-json) - - [🌠 DAG-JSON](#-dag-json) - - [🌌 DAG-CBOR](#-dag-cbor) - - [🐾 Next steps](#-next-steps) -- [🥅 Purpose and goals](#-purpose-and-goals) -- [🏃‍♀️ Getting Started](#️-getting-started) -- [📗 Project Docs](#-project-docs) -- [📒 API Docs](#-api-docs) -- [📐 System diagram](#-system-diagram) -- [🏭 Code Structure](#-code-structure) -- [📣 Project status](#-project-status) -- [🛣️ Roadmap](#️-roadmap) -- [👫 Get involved](#-get-involved) - - [🤲 Contribute](#-contribute) -- [🛍️ Notable Consumers/Users](#️-notable-consumersusers) -- [🌞 Branding](#-branding) -- [🪪 License](#-license) - -## 🥅 Purpose and goals - -A lean, modular, and modern implementation of IPFS for the prolific JS and browser environments. - -See the [Manifesto](https://github.com/ipfs/helia/wiki/Manifesto), the [FAQ](https://github.com/ipfs/helia/wiki/FAQ), and the [State of IPFS in JS blog post from October 2022](https://blog.ipfs.tech/state-of-ipfs-in-js/) for more info. - -## 🏃‍♀️ Getting Started +# 🏃‍♀️ Getting Started Check out the [Helia examples repo](https://github.com/ipfs-examples/helia-examples#examples), which covers a wide variety of use cases. If you feel something has been missed, follow the [contribution guide](https://github.com/ipfs-examples/helia-examples#contributing) and create a PR to the examples repo. -## 📗 Project Docs +# 📗 Project Docs - See the [project wiki](https://github.com/ipfs/helia/wiki). -## 📒 API Docs +# 📒 API Docs - https://ipfs.github.io/helia -## 📐 System diagram +# 📐 System diagram ```mermaid graph TD; @@ -164,22 +138,26 @@ graph TD; IPNS-->Datastore; subgraph helia [Helia] Datastore - Blockstore-->Bitswap; + Blockstore-->BlockBrokers; + BlockBrokers-->Bitswap; + BlockBrokers-->TrustlessGateways; Libp2p-->DHT; Libp2p-->PubSub; Libp2p-->IPNI; Libp2p-->Reframe; end - Blockstore-->BlockStorage["File system/IDB/S3/etc"] - Datastore-->DataStorage["Level/S3/IDB/etc"] + Blockstore-->BlockStorage["File system/IDB/S3/etc"]; + Datastore-->DataStorage["Level/S3/IDB/etc"]; Bitswap-->Network; + TrustlessGateways-->Gateway1; + TrustlessGateways-->GatewayN; DHT-->Network; PubSub-->Network; IPNI-->Network; Reframe-->Network; ``` -## 🏭 Code Structure +# 🏭 Code Structure Helia embraces a modular approach and encourages users to bring their own implementations of interfacing libraries to suit their needs. Helia also ships supplemental libraries and tools including: - [`@helia/UnixFS`](https://github.com/ipfs/helia-unixfs) @@ -198,19 +176,20 @@ This repo itself is made up of these packages: - [`/packages/helia`](./packages/helia) An implementation of the Helia API - [`/packages/interop`](./packages/interop) Interop tests for Helia -## 📣 Project status +# 📣 Project status Helia v1 shipped in 202303 (see [releases](https://github.com/ipfs/helia/releases)), and development keeps on trucking as we work on initiatives in the [roadmap](#roadmap) and make performance improvements and bug fixes along the way. -## 🛣️ Roadmap +# 🛣️ Roadmap Please find and comment on [the Roadmap here](https://github.com/ipfs/helia/issues/5). -## 👫 Get involved -* Watch our Helia Demo Day presentations [here](https://www.youtube.com/playlist?list=PLuhRWgmPaHtQAnt8INOe5-kV9TLVaUJ9v) -* We are sharing about the progress at periodic [Helia Demos](https://lu.ma/helia). This is a good place to find out the latest and learn of ways to get involved. We'd love to see you there! -* Pick up one of the [issues](https://github.com/ipfs/helia/issues). -* Come chat in Filecoin Slack #ip-js. (Yes, we should bridge this to other chat enviornments. Please comment [here](https://github.com/ipfs/helia/issues/33) if you'd like this.) +# 👫 Get involved + +- Watch our Helia Demo Day presentations [here](https://www.youtube.com/playlist?list=PLuhRWgmPaHtQAnt8INOe5-kV9TLVaUJ9v) +- We are sharing about the progress at periodic [Helia Demos](https://lu.ma/helia). This is a good place to find out the latest and learn of ways to get involved. We'd love to see you there! +- Pick up one of the [issues](https://github.com/ipfs/helia/issues). +- Come chat in Filecoin Slack #ip-js. (Yes, we should bridge this to other chat enviornments. Please comment [here](https://github.com/ipfs/helia/issues/33) if you'd like this.) -### 🤲 Contribute +# 🤲 Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/helia/issues). @@ -222,15 +201,15 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) -## 🛍️ Notable Consumers/Users +# 🛍️ Notable Consumers/Users - See [Projects using Helia](https://github.com/ipfs/helia/wiki/Projects-using-Helia). -## 🌞 Branding +# 🌞 Branding - See [Branding](https://github.com/ipfs/helia/wiki/Branding). -## 🪪 License +# 🪪 License Licensed under either of diff --git a/package.json b/package.json index e477a22c4..bf11c3223 100644 --- a/package.json +++ b/package.json @@ -33,11 +33,11 @@ "release": "run-s build docs:no-publish npm:release docs", "npm:release": "aegir exec --bail false npm -- publish", "release:rc": "aegir release-rc", - "docs": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs -- --exclude packages/interop --excludeExternals", - "docs:no-publish": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false -- --exclude packages/interop" + "docs": "aegir docs", + "docs:no-publish": "aegir docs --publish false" }, "devDependencies": { - "aegir": "^40.0.8", + "aegir": "^41.0.0", "npm-run-all": "^4.1.5", "typedoc-plugin-mdn-links": "^3.0.3" }, diff --git a/packages/helia/.aegir.js b/packages/helia/.aegir.js index 6361cc84a..84e4b05d0 100644 --- a/packages/helia/.aegir.js +++ b/packages/helia/.aegir.js @@ -1,5 +1,5 @@ -import { circuitRelayServer } from 'libp2p/circuit-relay' -import { identifyService } from 'libp2p/identify' +import { circuitRelayServer } from '@libp2p/circuit-relay-v2' +import { identify } from '@libp2p/identify' import { WebSockets } from '@multiformats/mafmt' import { CID } from 'multiformats/cid' import { sha256 } from 'multiformats/hashes/sha2' @@ -11,16 +11,23 @@ const options = { before: async () => { // use dynamic import otherwise the source may not have been built yet const { createHelia } = await import('./dist/src/index.js') + const { bitswap } = await import('./dist/src/block-brokers/index.js') const helia = await createHelia({ + blockBrokers: [ + bitswap() + ], libp2p: { addresses: { listen: [ `/ip4/127.0.0.1/tcp/0/ws` ] }, + connectionManager: { + inboundConnectionThreshold: Infinity + }, services: { - identify: identifyService(), + identify: identify(), relay: circuitRelayServer({ reservations: { maxReservations: Infinity, diff --git a/packages/helia/CHANGELOG.md b/packages/helia/CHANGELOG.md index 621f97ebd..bdb0846ba 100644 --- a/packages/helia/CHANGELOG.md +++ b/packages/helia/CHANGELOG.md @@ -6,6 +6,38 @@ * **dev:** bump aegir from 39.0.13 to 40.0.8 ([#198](https://github.com/ipfs/helia/issues/198)) ([4d75ecf](https://github.com/ipfs/helia/commit/4d75ecffb79e5177da35d3106e42dac7bc63153a)) * update sibling dependencies ([beb10b5](https://github.com/ipfs/helia/commit/beb10b5590d66d1d5bef9b5e890b888263df2c92)) +## [2.1.0](https://www.github.com/ipfs/helia/compare/helia-v2.0.3...helia-v2.1.0) (2023-11-06) + + +### Features + +* configurable block brokers ([#280](https://www.github.com/ipfs/helia/issues/280)) ([0749cbf](https://www.github.com/ipfs/helia/commit/0749cbf99745ea6ab4363f1b5d635634ca0ddcfa)) +* GatewayBlockBroker prioritizes & tries all gateways ([#281](https://www.github.com/ipfs/helia/issues/281)) ([9bad21b](https://www.github.com/ipfs/helia/commit/9bad21bd59fe6d1ba4a137db5a46bd2ead5238c3)) +* use trustless-gateway.link by default ([#299](https://www.github.com/ipfs/helia/issues/299)) ([bf11efa](https://www.github.com/ipfs/helia/commit/bf11efa4875f3b8f844511d70122983fc46b4f88)) + + +### Bug Fixes + +* listen on ip6 addresses ([#271](https://www.github.com/ipfs/helia/issues/271)) ([7ef5e79](https://www.github.com/ipfs/helia/commit/7ef5e79620f043522ff0dacc260af1fe83e5d77e)) +* remove trustless-gateway.link ([#301](https://www.github.com/ipfs/helia/issues/301)) ([0343725](https://www.github.com/ipfs/helia/commit/03437255213b14f5931aed91e8555d7fb7f92926)) +* replace IPNI gateway with delegated routing client ([#297](https://www.github.com/ipfs/helia/issues/297)) ([57d580d](https://www.github.com/ipfs/helia/commit/57d580da26c5e28852cc9fe4d0d80adb36699ece)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @helia/interface bumped from ^2.0.0 to ^2.1.0 + +### [2.0.3](https://www.github.com/ipfs/helia/compare/helia-v2.0.2...helia-v2.0.3) (2023-09-18) + + +### Bug Fixes + +* export libp2p service return type ([#263](https://www.github.com/ipfs/helia/issues/263)) ([76769cf](https://www.github.com/ipfs/helia/commit/76769cf33e06746f998b4f16b52d3e2a6a7a20a8)) +* try circuit relay transport first ([#267](https://www.github.com/ipfs/helia/issues/267)) ([d5e9c3c](https://www.github.com/ipfs/helia/commit/d5e9c3c45c8dc3e63969105b785f6a836820a1f8)) +* update attempt to add helia to identify agent version ([#268](https://www.github.com/ipfs/helia/issues/268)) ([6dc7d55](https://www.github.com/ipfs/helia/commit/6dc7d55cd3099785417a7a2c99db755e856bd59a)) + ### [2.0.2](https://www.github.com/ipfs/helia/compare/helia-v2.0.1...helia-v2.0.2) (2023-09-14) @@ -329,4 +361,4 @@ * The following workspace dependencies were updated * dependencies - * @helia/interface bumped from ~0.0.0 to ^0.1.0 + * @helia/interface bumped from ~0.0.0 to ^0.1.0 \ No newline at end of file diff --git a/packages/helia/README.md b/packages/helia/README.md index b277a178c..39305c142 100644 --- a/packages/helia/README.md +++ b/packages/helia/README.md @@ -4,8 +4,6 @@

-# helia - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/helia.svg?style=flat-square)](https://codecov.io/gh/ipfs/helia) @@ -13,13 +11,24 @@ > An implementation of IPFS in JavaScript -## Table of contents +## About + +Exports a `createHelia` function that returns an object that implements the Helia API. + +Pass it to other modules like @helia/unixfs to make files available on the distributed web. + +### Example -- [Install](#install) - - [Browser ` ``` -## API Docs - -- - ## License Licensed under either of diff --git a/packages/interop/package.json b/packages/interop/package.json index 1c3f85637..588b54075 100644 --- a/packages/interop/package.json +++ b/packages/interop/package.json @@ -1,6 +1,6 @@ { "name": "@helia/interop", - "version": "1.0.2", + "version": "1.1.0", "description": "Interop tests for Helia", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/helia/tree/master/packages/interop#readme", @@ -11,6 +11,10 @@ "bugs": { "url": "https://github.com/ipfs/helia/issues" }, + "publishConfig": { + "access": "public", + "provenance": true + }, "keywords": [ "IPFS" ], @@ -31,6 +35,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -48,22 +53,23 @@ "test:electron-main": "aegir test -t electron-main" }, "devDependencies": { - "@chainsafe/libp2p-noise": "^13.0.0", - "@chainsafe/libp2p-yamux": "^5.0.0", - "@helia/interface": "^2.0.0", - "@libp2p/tcp": "^8.0.2", - "@libp2p/websockets": "^7.0.2", + "@chainsafe/libp2p-noise": "^14.0.0", + "@chainsafe/libp2p-yamux": "^6.0.1", + "@helia/interface": "^2.1.0", + "@libp2p/identify": "^1.0.1", + "@libp2p/tcp": "^9.0.1", + "@libp2p/websockets": "^8.0.1", "@multiformats/sha3": "^3.0.0", - "aegir": "^40.0.8", + "aegir": "^41.0.0", "blockstore-core": "^4.0.0", "datastore-core": "^9.0.0", - "helia": "^2.0.2", + "helia": "^2.1.0", "ipfsd-ctl": "^13.0.0", "it-all": "^3.0.2", "it-to-buffer": "^4.0.1", - "kubo": "^0.22.0", + "kubo": "^0.24.0", "kubo-rpc-client": "^3.0.1", - "libp2p": "^0.46.6", + "libp2p": "^1.0.1", "multiformats": "^12.0.1" }, "browser": { diff --git a/packages/interop/test/fixtures/create-helia.browser.ts b/packages/interop/test/fixtures/create-helia.browser.ts index 38864c445..6f42ff962 100644 --- a/packages/interop/test/fixtures/create-helia.browser.ts +++ b/packages/interop/test/fixtures/create-helia.browser.ts @@ -1,12 +1,13 @@ import { noise } from '@chainsafe/libp2p-noise' import { yamux } from '@chainsafe/libp2p-yamux' +import { identify } from '@libp2p/identify' import { webSockets } from '@libp2p/websockets' import { all } from '@libp2p/websockets/filters' import { MemoryBlockstore } from 'blockstore-core' import { MemoryDatastore } from 'datastore-core' import { createHelia, type HeliaInit } from 'helia' +import { bitswap } from 'helia/block-brokers' import { createLibp2p } from 'libp2p' -import { identifyService } from 'libp2p/identify' import type { Helia } from '@helia/interface' export async function createHeliaNode (init?: Partial): Promise { @@ -28,7 +29,7 @@ export async function createHeliaNode (init?: Partial): Promise): Promise): Promise { @@ -29,12 +30,15 @@ export async function createHeliaNode (init?: Partial): Promise