Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: convert to esm only #184

Merged
merged 2 commits into from
Jun 9, 2022
Merged

feat!: convert to esm only #184

merged 2 commits into from
Jun 9, 2022

Conversation

wemeetagain
Copy link
Member

@wemeetagain wemeetagain commented Jun 9, 2022

  • Upgrade libp2p dependencies
    • Includes updating the libp2p peer discovery layer
  • Use ESM only
  • Lint test files

Migration help:

For consuming projects, there are two options:

  1. If you upgrade your library to use ESM, you can import discv5 using import ... from ... syntax.
    eg:
// using es modules
import { Discv5 } from "@chainsafe/discv5";

// use `Discv5`
  1. If your project is using commonjs imports, you will need to use await import syntax to import discv5.
    eg:
// using commonjs

const { Discv5 } = await import("@chainsafe/discv5")

// use `Discv5`

@wemeetagain wemeetagain requested a review from a team as a code owner June 9, 2022 17:54
Copy link
Contributor

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me!

Copy link
Contributor

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants