Skip to content

Move packages from v-next/ to packages/#8096

Merged
alcuadrado merged 29 commits intomainfrom
v-next-to-packages
Mar 31, 2026
Merged

Move packages from v-next/ to packages/#8096
alcuadrado merged 29 commits intomainfrom
v-next-to-packages

Conversation

@alcuadrado
Copy link
Copy Markdown
Member

This PR moves the packages from v-next/ to packages/, and updates all the settings, scripts, github action, etc accordingly. It also adds changesets to release all of them as patch versions.

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 vnext

only 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-vendored is being re-released on this branch, but the merge-group release detection still excludes it from the “releasable packages” set. scripts/lib/packages.ts:8 explicitly filters out hardhat-vendored, while this branch adds a changeset for it in .changeset/packages-nomicfoundation-hardhat-vendored.md:1. check-changeset-added still runs scripts/validate-merge-group.ts:28 on merge_group via .github/workflows/check-changeset-added.yml:33, and that script relies on readAllReleasablePackages() to detect whether a release PR is present. As written, a release PR that only bumps @nomicfoundation/hardhat-vendored will 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.

Copilot AI review requested due to automatic review settings March 30, 2026 21:07
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 30, 2026

🦋 Changeset detected

Latest commit: 60e0ddc

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

This PR includes changesets to release 25 packages
Name Type
hardhat Patch
@nomicfoundation/ignition-core Patch
@nomicfoundation/ignition-ui Patch
@nomicfoundation/hardhat-ignition-ethers Patch
@nomicfoundation/hardhat-ignition Patch
@nomicfoundation/hardhat-ignition-viem Patch
@nomicfoundation/hardhat-errors Patch
@nomicfoundation/hardhat-ethers-chai-matchers Patch
@nomicfoundation/hardhat-ethers Patch
@nomicfoundation/hardhat-foundry Patch
@nomicfoundation/hardhat-keystore Patch
@nomicfoundation/hardhat-ledger Patch
@nomicfoundation/hardhat-mocha Patch
@nomicfoundation/hardhat-network-helpers Patch
@nomicfoundation/hardhat-node-test-reporter Patch
@nomicfoundation/hardhat-node-test-runner Patch
@nomicfoundation/hardhat-toolbox-mocha-ethers Patch
@nomicfoundation/hardhat-toolbox-viem Patch
@nomicfoundation/hardhat-typechain Patch
@nomicfoundation/hardhat-utils Patch
@nomicfoundation/hardhat-vendored Patch
@nomicfoundation/hardhat-verify Patch
@nomicfoundation/hardhat-viem-assertions Patch
@nomicfoundation/hardhat-viem Patch
@nomicfoundation/hardhat-zod-utils Patch

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

@alcuadrado alcuadrado requested review from Copilot and kanej and removed request for Copilot March 30, 2026 21:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 at packages/.
  • 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

Comment thread .github/workflows/ci.yml
Comment on lines +17 to +20
is-v3:
runs-on: ubuntu-latest
outputs:
is_v_next: ${{ steps.check.outputs.folder_exists }}
is_v3: ${{ steps.check.outputs.version_starts_with_3 }}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you have any idea how complex is to do a major release of Hardhat?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Implementing a new Hardhat major - 2 weeks tops.

Comment thread .github/workflows/ci.yml
Comment thread packages/hardhat-foundry/package.json
@alcuadrado
Copy link
Copy Markdown
Member Author

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.

@github-actions
Copy link
Copy Markdown
Contributor

hardhat

Total size of the bundle: 246M
Total number of dependencies (including transitive): 48

List of dependencies (sorted by size)
238M	total
37M	@nomicfoundation/edr-linux-x64-musl
37M	@nomicfoundation/edr-linux-x64-gnu
34M	@nomicfoundation/edr-linux-arm64-musl
34M	@nomicfoundation/edr-linux-arm64-gnu
25M	@nomicfoundation/edr-darwin-x64
24M	@nomicfoundation/edr-win32-x64-msvc
21M	@nomicfoundation/edr-darwin-arm64
7.3M	@sentry/core
5.2M	zod
2.7M	micro-eth-signer
1.9M	@noble/curves
1.7M	undici
1.2M	@noble/hashes
1.1M	@nomicfoundation/hardhat-utils
884K	@nomicfoundation/hardhat-vendored
864K	@streamparser/json
624K	micro-packed
592K	tsx
580K	@nomicfoundation/hardhat-errors
492K	@scure/bip39
476K	@nomicfoundation/edr
408K	json-stream-stringify
368K	ethereum-cryptography
344K	fast-equals
332K	@streamparser/json-node
320K	enquirer
320K	@nomicfoundation/hardhat-zod-utils
288K	semver
200K	ws
180K	chokidar
176K	get-tsconfig
168K	esbuild
168K	@scure/base
136K	adm-zip
96K	@scure/bip32
92K	chalk
72K	@nomicfoundation/solidity-analyzer
68K	debug
60K	readdirp
56K	rfdc
48K	ansi-colors
44K	resolve.exports
40K	resolve-pkg-maps
36K	p-map
24K	strip-ansi
24K	env-paths
24K	ansi-regex
20K	ms

@alcuadrado alcuadrado added no docs needed This PR doesn't require links to documentation no peer bump needed labels Mar 30, 2026
@alcuadrado
Copy link
Copy Markdown
Member Author

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)

Copy link
Copy Markdown
Member

@kanej kanej left a comment

Choose a reason for hiding this comment

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

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.

Copilot AI review requested due to automatic review settings March 31, 2026 14:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 36 out of 2287 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/ci.yml
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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
@alcuadrado alcuadrado added this pull request to the merge queue Mar 31, 2026
Merged via the queue into main with commit e257464 Mar 31, 2026
284 checks passed
@alcuadrado alcuadrado deleted the v-next-to-packages branch March 31, 2026 15:15
@github-actions github-actions Bot mentioned this pull request Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no docs needed This PR doesn't require links to documentation no peer bump needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants