Skip to content

chore: replace babel-polyfill with core-js for tests - #32

Merged
mcollina merged 1 commit into
mainfrom
chore/babel-polyfill-to-core-js
Nov 26, 2026
Merged

mcollina merged 1 commit into
mainfrom
chore/babel-polyfill-to-core-js

Conversation

@mcollina

Copy link
Copy Markdown
Member

Replace the deprecated babel-polyfill (babel 6) dev dependency with core-js.

  • Swap devDependencies: remove babel-polyfill@^6.23.0, add core-js@^3.51.0.
  • Change the test harness's require('babel-polyfill') to require('core-js/stable') across the common test modules and the build replacements template.
  • Whitelist the web globals core-js may expose (self, URL, URLSearchParams) in the harness's global-leak check.

core-js/stable provides the same ES built-in polyfills the Node 8.9.4-era harness relies on (Array.from, Array.prototype.includes, Symbol, Promise, Map/Set/WeakMap/WeakSet, Reflect, etc.) for the old Node.js runtimes still exercised in CI.

Fixes #17

babel-polyfill (babel 6) is deprecated. Swap the test harness over to
core-js/stable, which provides the same ES built-in polyfills used by the
Node 8.9.4-era harness (Array.from, Array.prototype.includes, Symbol,
Promise, Map/Set/WeakMap/WeakSet, Reflect, etc.) for the older Node.js
runtimes still exercised in CI.

Whitelist the web globals core-js may expose (self, URL, URLSearchParams)
in the harness's global-leak check.
@mcollina
mcollina merged commit c72d61d into main Nov 26, 2026
90 of 91 checks passed
@mcollina
mcollina deleted the chore/babel-polyfill-to-core-js branch November 26, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant