diff --git a/packages/polyfills/CHANGELOG.md b/packages/polyfills/CHANGELOG.md index e39b4dbc0b..32e1e79511 100644 --- a/packages/polyfills/CHANGELOG.md +++ b/packages/polyfills/CHANGELOG.md @@ -7,6 +7,8 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +- Replace deprecated `babel-polyfills` in favor of `core-js` and `regenerator-runtime`. [#1660](https://github.com/Shopify/quilt/pull/1660) + ## [1.2.4] - 2020-10-20 - Updated `tslib` dependency to `^1.14.1`. [#1657](https://github.com/Shopify/quilt/pull/1657) diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 668b1ce37e..550746569a 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -24,15 +24,16 @@ }, "homepage": "https://github.com/Shopify/quilt/blob/master/packages/polyfills/README.md", "dependencies": { - "@babel/polyfill": "^7.10.1", "@shopify/useful-types": "^2.2.1", "browser-unhandled-rejection": "^1.0.2", "caniuse-api": "^3.0.0", + "core-js": "^3.6.5", "formdata-polyfill": "^3.0.18", "intersection-observer": "^0.5.1", "intl-pluralrules": "^0.2.1", "mutationobserver-shim": "^0.3.3", "node-fetch": "^2.3.0", + "regenerator-runtime": "^0.13.7", "tslib": "^1.14.1", "url-polyfill": "^1.1.7", "whatwg-fetch": "^3.0.0" diff --git a/packages/polyfills/src/base.ts b/packages/polyfills/src/base.ts index c7c823054d..ed8a1e9d48 100644 --- a/packages/polyfills/src/base.ts +++ b/packages/polyfills/src/base.ts @@ -1 +1,2 @@ -require('@babel/polyfill'); +require('core-js/stable'); +require('regenerator-runtime/runtime'); diff --git a/yarn.lock b/yarn.lock index 8000e0d47f..5f6def6cd7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1292,14 +1292,6 @@ "@babel/helper-create-regexp-features-plugin" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" -"@babel/polyfill@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.10.1.tgz#d56d4c8be8dd6ec4dce2649474e9b707089f739f" - integrity sha512-TviueJ4PBW5p48ra8IMtLXVkDucrlOZAIZ+EXqS3Ot4eukHbWiqcn7DcqpA1k5PcKtmJ4Xl9xwdv6yQvvcA+3g== - dependencies: - core-js "^2.6.5" - regenerator-runtime "^0.13.4" - "@babel/preset-env@^7.10.4": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.11.5.tgz#18cb4b9379e3e92ffea92c07471a99a2914e4272" @@ -5231,7 +5223,7 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= -core-js@^2.0.0, core-js@^2.4.0, core-js@^2.6.5: +core-js@^2.0.0, core-js@^2.4.0: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== @@ -12165,6 +12157,11 @@ regenerator-runtime@^0.13.4: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== +regenerator-runtime@^0.13.7: + version "0.13.7" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" + integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== + regenerator-transform@^0.14.2: version "0.14.5" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4"