mirror of
https://github.com/lancedikson/bowser
synced 2026-09-23 12:34:58 +00:00
fix: bundled.js is not ES5 — restore ES5 output and guard it (#632)
This commit is contained in:
@@ -77,6 +77,14 @@ check('constant maps are exposed', function () {
|
||||
|
||||
// The src/*.js files are ES module sources, so they resolve but do not execute
|
||||
// under require(). Bundlers are the real consumer here. Assert resolution only.
|
||||
//
|
||||
// This is also why publint warns on every `pkg.exports["./src/*"]` entry, and
|
||||
// why these paths fail under Yarn PnP (ERR_REQUIRE_CYCLE_MODULE) and on Node
|
||||
// below 20.19, which has no module-syntax detection. Verified identical on
|
||||
// 2.14.1, so it is longstanding rather than new. The obvious fix — a nested
|
||||
// `src/package.json` with `"type": "module"` — would stop `@babel/register`
|
||||
// from loading `src/` and take the whole AVA suite with it, so the wart stays
|
||||
// until the test tooling moves off `require()` hooks.
|
||||
[
|
||||
'bowser.js', 'constants.js', 'parser.js', 'parser-browsers.js',
|
||||
'parser-engines.js', 'parser-os.js', 'parser-platforms.js', 'utils.js',
|
||||
|
||||
Reference in New Issue
Block a user