Move packages from v-next/ to packages/#8096
Conversation
🦋 Changeset detectedLatest commit: 60e0ddc The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
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 |
There was a problem hiding this comment.
Pull request overview
This PR migrates publishable packages from v-next/ into packages/, updating repository metadata, tooling configs, and GitHub workflows to match the new layout, and adds changesets to release patch versions after the move.
Changes:
- Update package metadata (
homepage,repository.directory) to point atpackages/. - Adjust tooling/workflows (CI, release, regression tests, cspell, peer-bumps, docs) away from
v-next/. - Add changesets for patch releases for moved packages.
Reviewed changes
Copilot reviewed 36 out of 2287 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/hardhat-ignition-ethers/package.json | Update homepage/repository directory to packages/ path |
| packages/hardhat-foundry/package.json | Update homepage/repository directory to packages/ path |
| packages/hardhat-ethers/package.json | Update homepage/repository directory to packages/ path |
| packages/hardhat-ethers-chai-matchers/package.json | Update homepage/repository directory to packages/ path |
| packages/hardhat-errors/package.json | Update homepage/repository directory to packages/ path |
| packages/example-project/test/contracts/Counter.t.sol | Update comment path reference from v-next/ to packages/ |
| packages/example-project/package.json | Update homepage/repository directory to packages/ path |
| packages/config/package.json | Update homepage/repository directory to packages/ path |
| cspell.config.mts | Update globbing/ignore paths from v-next/ to packages/ |
| CLAUDE.md | Update repository layout docs from v-next/ to packages/ |
| .peer-bumps.json | Update excluded folders list to packages/ locations |
| .github/workflows/release.yml | Update pnpm filters from v-next/** to packages/** |
| .github/workflows/regression-tests.yml | Update working directory/artifact paths and normalize quoting |
| .github/workflows/ci.yml | Rename/gate CI jobs and update paths from v-next/ to packages/ |
| .claude/commands/analyze-peer-bump.md | Update docs to refer to ./packages/* layout |
| .changeset/packages-nomicfoundation-hardhat-zod-utils.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-viem.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-viem-assertions.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-verify.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-vendored.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-utils.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-typechain.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-toolbox-viem.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-toolbox-mocha-ethers.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-node-test-runner.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-node-test-reporter.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-network-helpers.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-mocha.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-ledger.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-keystore.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-foundry.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-ethers.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-ethers-chai-matchers.md | Add patch changeset for folder move |
| .changeset/packages-nomicfoundation-hardhat-errors.md | Add patch changeset for folder move |
| .changeset/packages-ignition.md | Add patch changesets for Ignition-related packages after move |
| .changeset/packages-hardhat.md | Add patch changeset for hardhat after move |
| is-v3: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| is_v_next: ${{ steps.check.outputs.folder_exists }} | ||
| is_v3: ${{ steps.check.outputs.version_starts_with_3 }} |
There was a problem hiding this comment.
The workflow’s gating is tied to packages/hardhat/package.json having a version that starts with "3". This will silently disable downstream CI jobs (dependency checks, script tests, package matrix) as soon as the major version changes (e.g., 4.0.0), even though the repo layout (packages/) may still be the same. Consider gating on repository layout (e.g., existence of ./packages/hardhat/package.json or ./packages directory) instead of a hard-coded major version, so CI continues to run reliably across future version bumps.
There was a problem hiding this comment.
Do you have any idea how complex is to do a major release of Hardhat?
There was a problem hiding this comment.
Implementing a new Hardhat major - 2 weeks tops.
|
To be able to use the "Files changed" tab you can exclude the first commit from the diff. There's a menu on the top left. |
hardhatTotal size of the bundle: List of dependencies (sorted by size) |
|
I also validated that the changes in the workflow don't break neither the required checks list, nor the merge queue (they are configured using the same list of jobs) |
kanej
left a comment
There was a problem hiding this comment.
I have read through the commits - other than the first. I have no comments.
I did a quick test of version for release, and publishing to verdaccio.
I am happy to approve, but I don't want this merged before we do a full release based on main.
33ced0f to
60e0ddc
Compare
| run: | | ||
| if [ -d "./v-next" ]; then | ||
| echo "folder_exists=true" >> $GITHUB_OUTPUT | ||
| if jq -e '.version | startswith("3")' packages/hardhat/package.json > /dev/null; then |
There was a problem hiding this comment.
jq writes errors to stderr if packages/hardhat/package.json is missing or malformed; this can create noisy logs during workflow execution. Consider redirecting stderr as well (or guarding with a test -f check) so the “not v3” path stays clean and intentional.
| if jq -e '.version | startswith("3")' packages/hardhat/package.json > /dev/null; then | |
| if test -f packages/hardhat/package.json && jq -e '.version | startswith("3")' packages/hardhat/package.json > /dev/null 2>&1; then |
This PR moves the packages from
v-next/topackages/, and updates all the settings, scripts, github action, etc accordingly. It also adds changesets to release all of them aspatchversions.It was created with one commit per action for easier reviewing and rebasing (of other PRs).
As a quick check, running this in the root:
pnpm clean rm -rf node_modules packages/*/node_modules rg --smart-case --files-with-matches --hidden v-next rg --smart-case --files-with-matches --hidden vnextonly matches
.git.I asked Opus 4.6 and gpt-5.4 to review it, and this is the only comment that gpt made:
Medium:
@nomicfoundation/hardhat-vendoredis being re-released on this branch, but themerge-grouprelease detection still excludes it from the “releasable packages” set.scripts/lib/packages.ts:8explicitly filters outhardhat-vendored, while this branch adds a changeset for it in.changeset/packages-nomicfoundation-hardhat-vendored.md:1.check-changeset-addedstill runsscripts/validate-merge-group.ts:28onmerge_groupvia.github/workflows/check-changeset-added.yml:33, and that script relies onreadAllReleasablePackages()to detect whether a release PR is present. As written, a release PR that only bumps@nomicfoundation/hardhat-vendoredwill be invisible to that guard, so it can be merged together with feature PRs that also carry changesets, which is exactly the case this workflow is supposed to reject.