Parses the built dist/*.js with rollup's parser and collects every
require()/createRequire() call made with a string literal, then checks
that each bare specifier names a Node builtin or a package.json
dependencies entry. That is the contract a consumer's install has to
satisfy, and nothing else was checking it.
Parsing instead of grepping matters here: vendor.js repeats several of
those specifiers inside doc comments and code-generation strings, so a
text scan reports micromatch, picomatch, braces and ajv subpaths as
findings that are not really there.
Run against the dependencies block before the previous commit, the test
fails with:
- []
+ [
+ "dist/vendor.js requires \"form-data\" (package \"form-data\")",
+ ]
The scan stays on dist/. external/ ships copies of blessed and
blessed-contrib whose terminal widget requires pty.js and term.js behind
a try/catch, which is a separate question from what the bundle needs.