diff --git a/packages/polyfills/CHANGELOG.md b/packages/polyfills/CHANGELOG.md index 901ff4c255..5b52dee4af 100644 --- a/packages/polyfills/CHANGELOG.md +++ b/packages/polyfills/CHANGELOG.md @@ -7,6 +7,15 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +## Breaking change + +- Removed the deprecated dependency `@babel/polyfill` and move to `core-js@^3.0.0`. +- Removed the `@shopify/polyfill/url` polyfill since it's automatically provided with `core-js`. + +**Note**: This new version need at least `sewing-kit@^0.120.0`. + +## [1.1.7] - 2020-01-31 + - Update `package.json` published `files` patterns. [#1233](https://github.com/Shopify/quilt/pull/1233) ## [1.1.5] - 2019-11-25 diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 71ef79f15e..0386c1c77f 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -24,17 +24,17 @@ }, "homepage": "https://github.com/Shopify/quilt/blob/master/packages/polyfills/README.md", "dependencies": { - "@babel/polyfill": "^7.0.0", "@shopify/useful-types": "^2.1.4", "browser-unhandled-rejection": "^1.0.2", "caniuse-api": "^3.0.0", + "core-js": "^3.6.4", "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.5", "tslib": "^1.9.3", - "url-polyfill": "^1.1.7", "whatwg-fetch": "^3.0.0" }, "devDependencies": { diff --git a/packages/polyfills/src/base.ts b/packages/polyfills/src/base.ts index c7c823054d..34bd72ce1c 100644 --- a/packages/polyfills/src/base.ts +++ b/packages/polyfills/src/base.ts @@ -1 +1,2 @@ -require('@babel/polyfill'); +import 'core-js/stable'; +import 'regenerator-runtime/runtime'; diff --git a/packages/polyfills/src/url.browser.ts b/packages/polyfills/src/url.browser.ts deleted file mode 100644 index 2a6ee1d723..0000000000 --- a/packages/polyfills/src/url.browser.ts +++ /dev/null @@ -1 +0,0 @@ -require('url-polyfill'); diff --git a/packages/polyfills/src/url.jest.ts b/packages/polyfills/src/url.jest.ts deleted file mode 100644 index 50f51015a5..0000000000 --- a/packages/polyfills/src/url.jest.ts +++ /dev/null @@ -1 +0,0 @@ -// URL and URLSearchParams available as globals by default. diff --git a/packages/polyfills/src/url.node.ts b/packages/polyfills/src/url.node.ts deleted file mode 100644 index 50f51015a5..0000000000 --- a/packages/polyfills/src/url.node.ts +++ /dev/null @@ -1 +0,0 @@ -// URL and URLSearchParams available as globals by default. diff --git a/yarn.lock b/yarn.lock index 933f77ec0c..f0debbb790 100644 --- a/yarn.lock +++ b/yarn.lock @@ -765,14 +765,6 @@ "@babel/helper-regex" "^7.4.4" regexpu-core "^4.6.0" -"@babel/polyfill@^7.0.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.6.0.tgz#6d89203f8b6cd323e8d946e47774ea35dc0619cc" - integrity sha512-q5BZJI0n/B10VaQQvln1IlDK3BTBJFbADx7tv+oXDPIDZuTo37H5Adb9jhlXm/fEN4Y7/64qD9mnrJJG7rmaTw== - dependencies: - core-js "^2.6.5" - regenerator-runtime "^0.13.2" - "@babel/preset-env@^7.4.3": version "7.6.3" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.6.3.tgz#9e1bf05a2e2d687036d24c40e4639dc46cef2271" @@ -3552,15 +3544,15 @@ 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.5.0, core-js@^2.6.5: +core-js@^2.0.0, core-js@^2.4.0, core-js@^2.5.0: version "2.6.10" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f" integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA== -core-js@^3.0.1, core-js@^3.1.4: - version "3.3.2" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.2.tgz#cd42da1d7b0bb33ef11326be3a721934277ceb42" - integrity sha512-S1FfZpeBchkhyoY76YAdFzKS4zz9aOK7EeFaNA2aJlyXyA+sgqz6xdxmLPGXEAf0nF44MVN1kSjrA9Kt3ATDQg== +core-js@^3.0.1, core-js@^3.1.4, core-js@^3.6.4: + version "3.6.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" + integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -9237,6 +9229,11 @@ regenerator-runtime@^0.13.2: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== +regenerator-runtime@^0.13.5: + version "0.13.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== + regenerator-transform@^0.14.0: version "0.14.1" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" @@ -10782,11 +10779,6 @@ url-parse-lax@^1.0.0: dependencies: prepend-http "^1.0.1" -url-polyfill@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/url-polyfill/-/url-polyfill-1.1.7.tgz#402ee84360eb549bbeb585f4c7971e79a31de9e3" - integrity sha512-ZrAxYWCREjmMtL8gSbSiKKLZZticgihCvVBtrFbUVpyoETt8GQJeG2okMWA8XryDAaHMjJfhnc+rnhXRbI4DXA== - url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"