-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update deps, fix types, pass a logger stub to yamux
Update dependencies and fix various breaking changes introduced by those dependency updates: - Change type of Conn to Duplex<Uint8Array | Uint8ArrayList> - Pass a logger stub to yamux as it's now required. The logger stub should not be necessary once these are fixed: - ChainSafe/js-libp2p-yamux#69 - libp2p/js-libp2p#2275 - ChainSafe/js-libp2p-yamux#70 Signed-off-by: Christian Stewart <christian@aperture.us>
- Loading branch information
Showing
11 changed files
with
637 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,5 @@ yarn-error.log* | |
*.test | ||
|
||
vendor/ | ||
debug.test | ||
debug.test | ||
.aider* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { ComponentLogger, Logger } from '@libp2p/interface' | ||
|
||
// https://github.com/libp2p/js-libp2p/issues/2276 | ||
// https://github.com/libp2p/js-libp2p/blob/bca8d6e689b47d85dda74082ed72e671139391de/packages/logger/src/index.ts#L86 | ||
// https://github.com/libp2p/js-libp2p/issues/2275 | ||
// https://github.com/ChainSafe/js-libp2p-yamux/issues/69 | ||
export function createDisabledLogger(namespace: string): Logger { | ||
const logger = (): void => {} | ||
logger.enabled = false | ||
logger.color = '' | ||
logger.diff = 0 | ||
logger.log = (): void => {} | ||
logger.namespace = namespace | ||
logger.destroy = () => true | ||
logger.extend = () => logger | ||
logger.debug = logger | ||
logger.error = logger | ||
logger.trace = logger | ||
|
||
return logger | ||
} | ||
|
||
export function createDisabledComponentLogger(): ComponentLogger { | ||
return { forComponent: createDisabledLogger } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.