You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted at #21492 (comment) , the version of wp-polyfill shipped in WordPress today is associated with @babel/polyfill@7.4.4. The latest version of @babel/polyfill is 7.8.7. It's assumed this would use a newer version of core-js and thus, polyfills for more new language features in use today in Gutenberg.
A few cases have occurred where a desire or attempt is made to use new language features which are newer than are shipped in polyfills:
This may become an increasingly common scenario, as the availability and usage of newer language features starts to increase.
Implementation Notes:
Note that @babel/polyfill is officially deprecated. This doesn't necessarily mean we couldn't still choose to upgrade from 7.4.4 to 7.8.7 (the latest and probably last version).
Alternatively, at its core, @babel/polyfill is essentially a small wrapper around core-js (source). We could choose to use core-js directly.
Since this is a script handle shipped already with Core, it would inevitably need an upstream patch. It could be done sooner in Gutenberg following the pattern such as in #14400 / Trac#48121.
Related: #21492 (comment)
As noted at #21492 (comment) , the version of
wp-polyfillshipped in WordPress today is associated with@babel/polyfill@7.4.4. The latest version of@babel/polyfillis7.8.7. It's assumed this would use a newer version ofcore-jsand thus, polyfills for more new language features in use today in Gutenberg.A few cases have occurred where a desire or attempt is made to use new language features which are newer than are shipped in polyfills:
Array#flat(Cover: Add Padding Styles #21492 (comment))Object.fromEntries(Add Block Pattern Categories support #22164 (comment))This may become an increasingly common scenario, as the availability and usage of newer language features starts to increase.
Implementation Notes:
Note that
@babel/polyfillis officially deprecated. This doesn't necessarily mean we couldn't still choose to upgrade from 7.4.4 to 7.8.7 (the latest and probably last version).Alternatively, at its core,
@babel/polyfillis essentially a small wrapper aroundcore-js(source). We could choose to usecore-jsdirectly.Since this is a script handle shipped already with Core, it would inevitably need an upstream patch. It could be done sooner in Gutenberg following the pattern such as in #14400 / Trac#48121.