hardhat
hardhat copied to clipboard
[WIP - not ready for review] feat: add watcher to hardhat node
- [ ] Because this PR includes a bug fix, relevant tests have been included.
- [ ] Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
- [x] I didn't do anything of this.
This PR adds build info watcher to the node task. It uses chokidar instead of built-in fs.watch because https://github.com/paulmillr/chokidar?tab=readme-ov-file#why
The way we use watcher here is very similar to how we used it in HH2. See https://github.com/NomicFoundation/hardhat/blob/b914c6c00f1ef8e47a895bb75a38b766882d792c/packages/hardhat-core/src/builtin-tasks/utils/watch.ts
The main differences are that we now handle changes to both build info files and their outputs, and that we also react to the change events in addition to the add events.
🦋 Changeset detected
Latest commit: c5301dee06be8e160621feeae8339ff625a79a02
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 21 packages
| Name | Type |
|---|---|
| hardhat | Patch |
| @nomicfoundation/hardhat-errors | Patch |
| @nomicfoundation/hardhat-ethers-chai-matchers | Patch |
| @nomicfoundation/hardhat-ignition | Patch |
| @nomicfoundation/ignition-core | Patch |
| @nomicfoundation/hardhat-ignition-ethers | Patch |
| @nomicfoundation/ignition-ui | Patch |
| @nomicfoundation/hardhat-ignition-viem | Patch |
| @nomicfoundation/hardhat-keystore | Patch |
| @nomicfoundation/hardhat-mocha | Patch |
| @nomicfoundation/hardhat-network-helpers | Patch |
| @nomicfoundation/hardhat-node-test-reporter | Patch |
| @nomicfoundation/hardhat-node-test-runner | Patch |
| @nomicfoundation/hardhat-test-utils | Patch |
| @nomicfoundation/hardhat-typechain | Patch |
| @nomicfoundation/hardhat-utils | Patch |
| @nomicfoundation/hardhat-toolbox-mocha-ethers | Patch |
| @nomicfoundation/hardhat-verify | Patch |
| @nomicfoundation/hardhat-viem | Patch |
| @nomicfoundation/hardhat-viem-assertions | 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| hardhat | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 14, 2025 8:38pm |
hardhat
Total size of the bundle: 196M
Total number of dependencies (including transitive): 48
List of dependencies (sorted by size)
190M total
24M @ignored/edr-optimism-linux-x64-musl
24M @ignored/edr-optimism-linux-x64-gnu
22M @ignored/edr-optimism-win32-x64-msvc
21M @ignored/edr-optimism-linux-arm64-musl
21M @ignored/edr-optimism-linux-arm64-gnu
20M esbuild
18M @ignored/edr-optimism-darwin-x64
17M @ignored/edr-optimism-darwin-arm64
6.2M @sentry/core
2.7M micro-eth-signer
2.6M zod
1.9M @noble/curves
1.7M undici
1.2M @noble/hashes
864K @streamparser/json
860K @nomicfoundation/hardhat-utils
624K micro-packed
592K tsx
544K fast-equals
544K @nomicfoundation/hardhat-errors
492K @scure/bip39
408K json-stream-stringify
368K ethereum-cryptography
348K @ignored/edr
332K @streamparser/json-node
320K enquirer
304K @ignored/edr-optimism
288K semver
196K ws
180K chokidar
168K @scure/base
136K get-tsconfig
136K adm-zip
96K @scure/bip32
92K chalk
72K @nomicfoundation/solidity-analyzer
68K debug
64K @nomicfoundation/hardhat-zod-utils
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
This is replaced by https://github.com/NomicFoundation/hardhat/pull/6928