Comparing targets
edgefit compare answers a different question from check: not "what breaks on this runtime" but "which runtime fits this project best". It scans once per target and prints one table of the APIs your project reaches.
npx edgefit compare --entry src/index.tsedgefit compare · entry src/index.ts
API workerd bun deno
node:fs.watch ✗ ✓ ✓
✓ supported ~ mismatch or mocked ✗ unsupported ! missing per Web API data ? unknown – not reached or ignored
1 error, 0 warningsChoosing targets
By default every target is compared except deno-deploy, whose column would be the same as deno. Name the targets you want as arguments:
npx edgefit compare workerd bunRows
Only APIs with a finding on at least one target are shown. Two flags add more:
--allalso lists the APIs every target supports, which gives you the full picture of what your project touches.--verboselists the packages and findings behind each row.
What – means
A dash means the target never reaches the API, or the finding was ignored or turned off in your config. The first case is real and common: a package can export a different file per runtime through export conditions, so one target may never load the code that uses the API.
JSON and exit codes
--format json prints:
{
"version": 1,
"targets": ["workerd", "bun", "deno"],
"apis": [
{
"api": "node:fs.watch",
"packages": ["chokidar"],
"results": { "workerd": "unsupported", "bun": "supported", "deno": "supported" }
}
]
}Like check, compare exits with 1 when any target has an error-level finding.