Skip to content

docs: import FaultTolerance from @libp2p/interface - #3676

Open
imitater-dou wants to merge 1 commit into
libp2p:mainfrom
imitater-dou:docs/fault-tolerance-import
Open

imitater-dou wants to merge 1 commit into
libp2p:mainfrom
imitater-dou:docs/fault-tolerance-import

Conversation

@imitater-dou

Copy link
Copy Markdown
Contributor

Description

The "Configuring Transport Manager" example in doc/CONFIGURATION.md imports FaultTolerance from @libp2p/interface-transport. That is a pre-monorepo package whose last release was v4.0.3 in June 2023, and libp2p no longer depends on it. The enum is now exported from @libp2p/interface, which is also where packages/libp2p/src/transport-manager.ts imports it from. This PR changes the import in the example.

Repro on main:

$ grep -n "FaultTolerance } from" doc/CONFIGURATION.md
737:import { FaultTolerance } from '@libp2p/interface-transport'
$ grep -n "export enum FaultTolerance" packages/interface/src/transport.ts
122:export enum FaultTolerance {
$ grep -n "transport.ts" packages/interface/src/index.ts
996:export * from './transport.ts'
$ grep -n "FaultTolerance" packages/libp2p/src/transport-manager.ts | head -1
1:import { FaultTolerance, InvalidParametersError, NotStartedError } from '@libp2p/interface'
$ npm view @libp2p/interface-transport version
4.0.3
$ npm view @libp2p/interface-transport time.modified
2023-06-19T13:48:21.846Z

Notes & open questions

This is a docs-only, one-line change.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works (N/A, docs only)

The transport manager example in doc/CONFIGURATION.md imports
`FaultTolerance` from `@libp2p/interface-transport`, a pre-monorepo
package last published in 2023 (v4.0.3) that libp2p no longer depends
on. The enum is exported from `@libp2p/interface`
(packages/interface/src/transport.ts) and is what
packages/libp2p/src/transport-manager.ts imports.

Signed-off-by: ADou <ikun3.1415927@gmail.com>
@imitater-dou
imitater-dou requested a review from a team as a code owner October 19, 2026 07:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant