Surfaced during v4 onboarding.
Scanner gap
walkAST (in src) detects only ~5 of the ~40 ES features actually used in test/testfile.js (it finds Promise, Array.includes, Object.entries, Array.flat, Object.fromEntries, and misses the rest). The es<version>.test.js suite originally asserted that every feature in the entire MDN catalog for all later ES versions appears in result.polyfills, which could never pass given the scanner's real output. During onboarding those tests were rewritten to the correct version-gating invariant they were trying to express — (A) nothing at-or-below the target is polyfilled, (B) every polyfilled feature belongs to a strictly-newer version — which is honest (does NOT assert full detection, so it doesn't mask this gap) and catches real regressions. Improving walkAST's coverage of the feature catalog is the real follow-up.
Also changed during onboarding (worth a review)
src/lib/polyfillSources.js had a dead require("node-fetch") (not in deps/lockfile → MODULE_NOT_FOUND made the whole suite unloadable); switched to global fetch (Node 18+). Only used in the untested source === "cloudflare" branch.
test/index.test.js was overwriting + deleting the shared committed fixture test/testfile.js in beforeAll/afterAll, which races destructively under the per-file-parallel runner; pointed it at a dedicated test/index.testfile.js.
Surfaced during v4 onboarding.
Scanner gap
walkAST(insrc) detects only ~5 of the ~40 ES features actually used intest/testfile.js(it findsPromise,Array.includes,Object.entries,Array.flat,Object.fromEntries, and misses the rest). Thees<version>.test.jssuite originally asserted that every feature in the entire MDN catalog for all later ES versions appears inresult.polyfills, which could never pass given the scanner's real output. During onboarding those tests were rewritten to the correct version-gating invariant they were trying to express — (A) nothing at-or-below the target is polyfilled, (B) every polyfilled feature belongs to a strictly-newer version — which is honest (does NOT assert full detection, so it doesn't mask this gap) and catches real regressions. ImprovingwalkAST's coverage of the feature catalog is the real follow-up.Also changed during onboarding (worth a review)
src/lib/polyfillSources.jshad a deadrequire("node-fetch")(not in deps/lockfile →MODULE_NOT_FOUNDmade the whole suite unloadable); switched to globalfetch(Node 18+). Only used in the untestedsource === "cloudflare"branch.test/index.test.jswas overwriting + deleting the shared committed fixturetest/testfile.jsinbeforeAll/afterAll, which races destructively under the per-file-parallel runner; pointed it at a dedicatedtest/index.testfile.js.