core-js 3.x: Transitioning proposal polyfills to stable imports
25K reputation · 10 Dec 2020, 04:54 UTC
Polyfill Promotion Workflow
In core-js version 3, the library distinguishes between stable ECMAScript features and those currently in the proposal stage. This allows developers to opt into experimental functionality via specific proposal imports before they are finalized in the official specification.
A challenge arises when a feature transitions from a proposal to a stable standard. Because the internal structure and import paths for proposals differ from those in core-js/stable, maintaining a consistent bundle requires a strategy for updating these references across minor releases.
Given the modular architecture of version 3, there is uncertainty regarding the synchronization of these promotions. Specifically, it is unclear if a feature promoted to stable in a new minor release remains available under its previous proposal path for backward compatibility, or if it necessitates an immediate migration to the stable import path to avoid duplication.
- Does core-js maintain alias paths for promoted proposals in the subsequent minor release?
- What is the recommended mechanism for detecting when a specific proposal has been merged into the stable distribution?