Compatibility data
The quality of edgefit's results is the quality of its data. This page explains where the data lives, how to change it, and how it is kept honest.
Where it lives
Everything is in data:
| Path | What it is |
|---|---|
source.json | Every data source with its URL, version, commit and license |
workers-nodejs-compat-matrix/ | The vendored matrix: a Node baseline and one dump per runtime |
runtime-compat-data/ | The vendored Web API data, as published |
dom-globals.json | The DOM globals, and the names of them that each runtime has |
overrides/<target>.json | Curated corrections per target |
suggestions.json | Reviewed fixes for packages and APIs, see Suggested fixes |
allowlists/<target>.json | For a runtime with no dump: what its documentation allows |
edgefit targets prints what source.json says, so users can see exactly which data produced their results.
Override files
The matrix only records whether an API exists. Override files record what happens when it is called:
{
"modules": {
"child_process": {
"status": "unsupported",
"note": "every child_process function throws ERR_METHOD_NOT_IMPLEMENTED; Workers cannot spawn processes",
"source": "child_process.ts",
"except": []
}
},
"present": {
"v8": {
"note": "loads with nodejs_compat; the matrix does not list the module, so its members are not measured",
"source": "v8.ts"
}
},
"apis": {
"fs.watch": {
"status": "unsupported",
"note": "file watching is not implemented; throws ERR_UNSUPPORTED_OPERATION",
"source": "internal/internal_fs_callback.ts"
}
}
}modulescovers a whole module, minus the members inexcept.apiscovers one member.presentrecords a module that the matrix does not list but that loads on the target. An import of the module gives no finding, so itsnoteis for maintainers only. Its members are not measured, so a use of one isunknown, unless anapisentry covers it. The probe looks each module up and reports one that no longer loads.statusisunsupported,mocked,mismatchorsupported.noteis the detail line users see. Say what happens, in plain words.sourceis a path relative to the source URL insource.json, pinned to the runtime version. It becomes theseelink in reports.missingHarmless(optional, withsupported) marks an API that is missing on the runtime while the code that uses it works without it, such asfs.F_OKon Deno. The runtime probe then does not report the missing API as a stale entry. Say in thenotewhy it is harmless.options(optional, withmismatch) lists the options that make a call fail. Withoptions, only a call that passes one of them is a finding. An item is one of these:- A key, such as
"ALPNProtocols". It matches when the value is always defined: a literal other thanundefined, an array, an object, a function, a class, a template, anewobject, a known value, or a?:,||or??that always gives one of these. - An object with a
keyand avalue, such as{ "key": "rejectUnauthorized", "value": false }. The value is a boolean, a number or a string. edgefit matches only this literal value. When the runtime throws for each truthy value, as workerd does forenableTrace, listtrue, and know that other truthy values such as1are not found. - An object with a
keyand agate, for an option that fails only while a workerd compatibility flag is on:{ "key": "checkServerIdentity", "gate": { "flag": "throw_on_not_implemented_tls_options", "disableFlag": "no_throw_on_not_implemented_tls_options", "date": "2026-06-16" } }. The option then fails fromdatewithnodejs_compat, or withflag, and not withdisableFlag. WithoutdisableFlag, the disable flag isflagwithenable_replaced bydisable_. Other targets do not read the gate.
edgefit stops with an error when
optionsis not a list, when the list is empty, when an item has a wrong type, or when the status is notmismatch.- A key, such as
validatesFirst(optional) marks a stub that checks its arguments before it throws, as workerd'svm.compileFunctiondoes. The runtime probe then does not take an argument error for a working implementation.
Adding or changing an entry
- Find the code in the runtime's source at the pinned version, not at
main. - Add the entry with a
notethat describes the behavior and asourcethat points to that file. - Add or update a test in
testthat shows the finding. - In the pull request, link the lines you read.
Entries without a source are not accepted. The whole point of an override is that anyone can check it.
Runtimes without a dump
Vercel Edge has no matrix dump, so allowlists/vercel-edge.json lists what its documentation allows and a provider (src/data/providers/allowlist.ts) builds a dump from the Node baseline with everything else removed. The file has one list per kind of evidence:
modulesmaps each allowed module to the members that exist on it (or totruefor all of them). The documentation says which modules; the members come frommembers.sources, two pieces of the vendor's own code that list them.globalsare the names in the documentation's tables, andBuffer.languageGlobalsare the ECMAScript builtins of a fresh V8 context, andemulatorGlobalsare web globals the vendor's emulator has and the tables omit.witnessGlobalsare globals the production witness measured in every entry of the platform, and the tables omit.docs.moduleDescriptionsare hashes of the documentation's description of each module, so the weekly check notices a changed sentence.emulatorpins the emulator release.
A list that falls behind the platform reports an API as missing that exists, never the reverse, so a mistake here shows to users as a false error. Keep the source.json date in step with the page you read.
DOM globals
dom-globals.json has two parts. names holds each global that lib.dom.d.ts of TypeScript declares as a var, let, const, function or class, and lib.webworker.d.ts does not, without toString, which every object has. presentOn holds, for each runtime, the names from names that the runtime also has. Build presentOn with typeof globalThis[name] on the version that source.json pins for the runtime. Build the netlify list from the production witness, see Production witness. Name each version in the note of the source.
A name in names that a runtime does not list in presentOn is a missing global for that runtime. edgefit reports a read of it only when the read runs as the module loads. A name that runtime-compat-data also lists is decided by that data. For workerd, Bun and Deno, the weekly probe looks the missing names up, so a runtime that adds a DOM global shows in the drift issue. The Netlify and Vercel columns are not probed.
Runtime probes
Reading source by hand is slow and misses things, so a workflow checks the overrides against the real runtimes. It lives in .github/workflows/probe.yml and runs weekly and on demand.
For each of Bun, Deno and workerd, it installs the runtime, imports each API inside it, calls functions with no arguments and constructs classes, and classifies what happens:
| Outcome | Result |
|---|---|
| Import or member lookup fails | missing |
Throws ERR_NOT_IMPLEMENTED, ERR_METHOD_NOT_IMPLEMENTED, ERR_UNSUPPORTED_OPERATION, or "not implemented" | unsupported |
Throws an argument error such as ERR_INVALID_ARG_TYPE | implemented |
| Returns, or throws anything else | inconclusive |
Dangerous APIs such as process.exit, child_process.* and fs writes are only looked up, never called.
The workflow runs twice per runtime:
- pinned probes the versions in
source.jsonand lists every disagreement with the overrides, the matrix, the Web API data and the DOM globals data in the job summary. - latest probes the newest release and lists what differs from the pinned data. For workerd it uses the newest compatibility date that release accepts, since newer dates turn features on.
Both channels also look up every API the runtime's data marks as missing (Web APIs like crypto.subtle.getPublicKey included, and each global counted once), without calling it. For workerd, Bun and Deno this includes each DOM global that the runtime lacks according to dom-globals.json, such as DOMParser, except the ones that the Web API data decides. They also look up each module that present records. A missing API that exists in the newest release is the clearest sign that the data is behind. The latest channel reports four kinds of drift:
- APIs the data marks missing that now exist
- curated stubs that now work, which means the probe got an argument error from real code (an inconclusive result is not counted)
mockedentries the targeted check found implemented- modules recorded as
presentthat no longer load
Every Monday, and on a manual run with open-issue ticked, a last job collects the latest results and keeps one issue, labelled data, up to date with them. It opens the issue when there is drift, edits it on later weeks, and closes it when the data agrees with the newest releases again.
The maintenance runbook explains how to read the drift issue and what to do about each list.
Nothing is committed automatically. Probe results are evidence for reviewers. edgefit itself never reads them when checking a project, so results only ever come from the reviewed override files.
The probe code is in scripts/probe.
Production witness
Netlify and Vercel publish no runtime to install, so a small function deployed on each platform reports what production has. The Witness workflow (.github/workflows/witness.yml) deploys it to a Netlify site as an edge function, and to a Vercel project as middleware and as an edge route. Run the workflow by hand when the witness code or its list of APIs changes. Only this workflow needs the platform tokens.
The witness only looks APIs up. It never calls them, because the endpoint is public. It reports:
- the Deno version (Netlify), and each place the runtime reports a version as evidence. Netlify hides
Deno.version.deno, so the version can be missing. - the names on the global object. On a Vercel edge route,
globalThishides most of its own names, so only the middleware names are compared. - a lookup of each API in its list: every module and member in the Node baseline on Netlify, and the members of the allowed modules on Vercel
- on Vercel,
typeofof each global the data keeps. The build writes this as static code, because on an edge routeglobalThisis a copy that lacks most globals, while a bare name resolves through the real scope, as in user code. It also measures a few candidate globals that the data does not keep (vercelCandidatesinscripts/probe/witness/spec.mjs). A defined candidate is reported as a global to review. The middleware's own names includerequire, which is left out, because it cannot load a module. - whether
eval,new Function,WebAssembly.compileandWebAssembly.instantiatefrom bytes run - on Vercel, whether the
requireglobal loads a module - on Netlify, the
run,writeandenvpermissions,Deno.execPath(), whether a subprocess runs, and whether a file write runs in/tmp, in the working directory and in/
The weekly Probe run reads the witness with no secret, in the witness jobs, and compares the answer with the data in the job summary. Each answer has a hash of the list of APIs that the witness was built with. When the hash does not match the repository, the summary says to redeploy. The witness is not part of the drift issue. A witness that does not answer gives a warning, so you can remove the witness and the results do not change.
A data entry that rests on the witness needs a source that does not expire, and run logs and artifacts do. Commit the reviewed answer under scripts/probe/witness/answers, named for the platform and the date, and link it from the entry: the layer's url in source.json points at the answers folder at a pinned commit, and each entry's source is the file name. When a layer's url is another page, such as the platform's docs, an entry that rests on the witness gives the full link to the answer at a pinned commit as its source. An absolute source replaces the layer's url. The folder is outside data, so it does not ship in the package. An unsupported override with "absent": true says that the API does not exist on the target, as when the matrix lacks it, so a use that checks for the API first is not reported.
The code is in scripts/probe/witness.
Bumping a data source
The matrix provider's repository may lag behind the runtimes. Check its newest commit first: if it has newer dumps, vendor those. If it does not, regenerate the runtime dumps with its own scripts, at the commit source.json names:
- Run the Dump data workflow with the runtime versions you want. It checks out the provider at the commit in
source.jsonand runs its dump scripts on Linux, which is how the provider makes them. - Download its
runtime-dumpsartifact. Do not dump on a laptop: macOS lacks Linux-only constants and a terminal changesprocess.stdin, so the dump would disagree with the probe. The maintenance runbook has the details, and how to dump by hand in a container. - Copy the three dumps to
data/workers-nodejs-compat-matrix, keeping the file formatting. - In
source.json, updategeneratedAt, the runtime versions, the workerd compatibility date, and the override sources' tags. Say innotehow the data was generated. - Check that every override
sourcestill exists at the new tag. Files move: Bun'ssrc/bun.jsbecamesrc/jsc. - Probe the DOM globals again with
typeof globalThis[name]on the new version, and update its column indata/dom-globals.json, see DOM globals. Then review every override against the new source, and run apinnedprobe on the new versions (see below). It lists overrides that no longer match. A stub that now works is removed, and one that changed is corrected. A stub that validates its arguments before it throws gets"validatesFirst": true, so the probe does not read its argument error as a working implementation. - Run the tests and compare results on the fixture projects. Explain every change in the pull request.