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

Basic support for ESM (rebased) #3550

Merged
merged 20 commits into from
Feb 10, 2023
Merged

Basic support for ESM (rebased) #3550

merged 20 commits into from
Feb 10, 2023

Conversation

fvictorio
Copy link
Member

@fvictorio fvictorio commented Jan 6, 2023

This PR is almost the same as #3211, but with a better commit structure.

Commits:

  • The first commit upgrades typescript and ts-node. This is an artifact of a previous attempt, where we added some basic support for typescript with ES modules. We rolled that back, but I kept the upgrades since it's useful to do it now and then anyway. This also includes two minor fixes related to these new versions.
  • The second commit has the most important logic of the PR. It adds support for hardhat.config.cjs files and makes the necessary changes in the test task.
  • The third commit has the tests for the changes in the second commit. I included them in a separate commit because there are several new fixture projects and that adds a lot of noise.
  • The fourth commit improves how Hardhat's project creation works and shows different options when the package.json has type: module.

The other two commits add a new guide and the changeset.

To-do:

  • Update Foundry guide to say that any option can be used. That is enabled by this PR because of the improvements to project initialization. Canceled, this didn't make sense in retrospect.
  • Use top-level await in the ESM+JS sample project

@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2023

🦋 Changeset detected

Latest commit: 47820af

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@nomiclabs/hardhat-vyper Patch
@nomicfoundation/hardhat-toolbox Patch
hardhat Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 10, 2023 at 10:15PM (UTC)
hardhat-storybook ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 10, 2023 at 10:15PM (UTC)

This case is already handled by Hardhat
@alcuadrado alcuadrado merged commit 34379e9 into main Feb 10, 2023
@alcuadrado alcuadrado deleted the esm-rebased branch February 10, 2023 22:35
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:ready This issue is ready to be worked on
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants