Registry / devops / hardhat-v3-migration-validator

hardhat-v3-migration-validator

JSON →
library0.1.1jsnpmunverified

Post-migration correctness validator for Hardhat V2 → V3 migrations. Version 0.1.1 answers whether a Hardhat repo is actually V3-ready, not just migrated. Single-file, zero-dependency Node.js CLI (Node 18+). Checks dependency surfaces, CJS/ESM mismatches, config shapes, plugin ecosystem upgrades, and ethers v5 remnants. Complements Nomic Foundation's migration skill effort. Runs in under 5 seconds on large monorepos, never mutates the repo, and produces both JSON and Markdown reports with a five-level severity model (BLOCKER, HIGH, MEDIUM, LOW, INFO). Designed for Hardhat developers completing V2→V3 migration.

npm install hardhat-v3-migration-validator
INSTALL
IMPORT
SIG · HARDHAT-V3-MIGRATI
H
hardhat-v3-migration-validator
devopsjavascriptv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI invocation
npx hardhat-v3-migration-validator --project .
npx hardhat-v3-migration-validator
CLI tool; does not export JavaScript API. Must be run via npx or directly with node validate-hardhat-v3.mjs.
Direct execution
node validate-hardhat-v3.mjs --project .
node validate-hardhat-v3.js --project .
Source file uses .mjs extension for ESM compatibility. Ensure Node.js 18+.
Skip execution checks
npx hardhat-v3-migration-validator --project . --no-exec
npx hardhat-v3-migration-validator --project . --skip-exec
Flag is --no-exec, not --skip-exec.
Include low severity
npx hardhat-v3-migration-validator --project . --include-low
npx hardhat-v3-migration-validator --project . --low
Flag is --include-low, not --low.

Run the validator on a Hardhat project directory with default settings.

cd /path/to/hardhat-repo npx hardhat-v3-migration-validator --project . # Check exit code: 0=PASS, 1=HIGH findings, 2=BLOCKER findings # View report: cat hardhat-v3-validator-report.md
Debug
Known issues
gotchaTool requires Node.js 18+. Older versions will fail with syntax errors or missing APIs.
fix
Upgrade Node.js to 18 or later.
affects: <18
gotchaThe tool never mutates the repo; it only reads files. Some users expect auto-fix functionality which is not provided.
fix
Manual remediation based on report findings.
affects: all
gotchaThe --project flag defaults to current directory if omitted. Running from wrong directory may produce misleading results.
fix
Always specify --project <path> explicitly.
affects: all
gotchaExecution checks (--no-exec flag disabled) run npm/hardhat commands; may fail if npm is not available or the project is in a broken state.
fix
Use --no-exec to skip execution checks if npm is unavailable.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'node:fs' or similar Node.js 18+ API not found
Old Node.js version (<18) missing ESM support or built-in module
fix
Upgrade Node.js to version 18 or later.
SyntaxError: Cannot use import statement outside a module
Running the .mjs file directly without Node.js ESM support or using wrong file extension
fix
Ensure Node.js 18+ and run with: node validate-hardhat-v3.mjs
npx: command not found: hardhat-v3-migration-validator
Package not installed or not in npm cache; npx failed to fetch
fix
Run: npx hardhat-v3-migration-validator@0.1.1 --project .
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
Bingbot
1
Resources
hardhat-v3-migration-validator — npm install hardhat-v3-migration-validator · libregistry