-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: replace useBuiltIns with polyfill-regenerator
- preset-env's useBuiltIns isn't pure, so it pollutes the global env when used - TSDX is used by libraries, and libraries really shouldn't pollute their consumers' global envs - so use the fairly recent babel-plugin-polyfill-regenerator with its usage-pure option instead - since we're not using useBuiltIns, we don't need core-js either, and can remove it, reverting back to the previous behavior - this ensures that the PR is less breaking and does not really introduce new behavior, just replaces async-to-promises with regenerator - useBuiltIns was previously unset, i.e. defaulted to false, so @babel/polyfill was an extraneous package and we don't need to add that back - change the rollup-plugin-commonjs usage to account for existence of bundled regenerator-runtime instead of core-js - core-js is removed now. not sure why this didn't error / wasn't needed for regenerator-runtime with useBuiltIns - existing generator test was erroring without this due to CJS usage - also add a comment to explain the plugin's usage - ensure that customOptions.targets is passed into polyfill-regenerator's config so it's the same targets as preset-env - so there's some work/discussion upstream in Babel on consolidating targets, but maybe we should have polyfill-regenerator inherit preset-env's targets if it were customized... - problem with that is that it may be breaking once we switch babelPluginTsdx to an actual preset... - modify existing generator integration test to account for the fact that regenerator is bundled automatically now - babel-plugin-transform-runtime is no longer useful for this purpose and will be removed in the next commit
- Loading branch information
Showing
5 changed files
with
64 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,12 +40,12 @@ | |
semver "^5.4.1" | ||
source-map "^0.5.0" | ||
|
||
"@babel/generator@^7.11.0", "@babel/generator@^7.9.0": | ||
version "7.11.4" | ||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.4.tgz#1ec7eec00defba5d6f83e50e3ee72ae2fee482be" | ||
integrity sha512-Rn26vueFx0eOoz7iifCN2UHT6rGtnkSGWSoDRIy8jZN3B91PzeSULbswfLoOWuTuAcNwpG/mxy+uCTDnZ9Mp1g== | ||
"@babel/generator@^7.11.0", "@babel/generator@^7.11.5", "@babel/generator@^7.9.0": | ||
version "7.11.6" | ||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.6.tgz#b868900f81b163b4d464ea24545c61cbac4dc620" | ||
integrity sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA== | ||
dependencies: | ||
"@babel/types" "^7.11.0" | ||
"@babel/types" "^7.11.5" | ||
jsesc "^2.5.1" | ||
source-map "^0.5.0" | ||
|
||
|
@@ -105,6 +105,20 @@ | |
"@babel/types" "^7.10.5" | ||
lodash "^4.17.19" | ||
|
||
"@babel/helper-define-polyfill-provider@^0.0.3": | ||
version "0.0.3" | ||
resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.0.3.tgz#df9da66285b884ce66417abdd0b6ca91198149bd" | ||
integrity sha512-dULDd/APiP4JowYDAMosecKOi/1v+UId99qhBGiO3myM29KtAVKS/R3x3OJJNBR0FeYB1BcYb2dCwkhqvxWXXQ== | ||
dependencies: | ||
"@babel/helper-compilation-targets" "^7.10.4" | ||
"@babel/helper-module-imports" "^7.10.4" | ||
"@babel/helper-plugin-utils" "^7.10.4" | ||
"@babel/traverse" "^7.11.5" | ||
debug "^4.1.1" | ||
lodash.debounce "^4.0.8" | ||
resolve "^1.14.2" | ||
semver "^6.1.2" | ||
|
||
"@babel/helper-explode-assignable-expression@^7.10.4": | ||
version "7.11.4" | ||
resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.11.4.tgz#2d8e3470252cc17aba917ede7803d4a7a276a41b" | ||
|
@@ -256,10 +270,10 @@ | |
chalk "^2.0.0" | ||
js-tokens "^4.0.0" | ||
|
||
"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.7.5", "@babel/parser@^7.9.0": | ||
version "7.11.4" | ||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.4.tgz#6fa1a118b8b0d80d0267b719213dc947e88cc0ca" | ||
integrity sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA== | ||
"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.11.5", "@babel/parser@^7.7.5", "@babel/parser@^7.9.0": | ||
version "7.11.5" | ||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037" | ||
integrity sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q== | ||
|
||
"@babel/plugin-proposal-async-generator-functions@^7.10.4": | ||
version "7.10.5" | ||
|
@@ -829,25 +843,25 @@ | |
"@babel/parser" "^7.10.4" | ||
"@babel/types" "^7.10.4" | ||
|
||
"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.4", "@babel/traverse@^7.9.0": | ||
version "7.11.0" | ||
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24" | ||
integrity sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg== | ||
"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.5", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.4", "@babel/traverse@^7.9.0": | ||
version "7.11.5" | ||
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.5.tgz#be777b93b518eb6d76ee2e1ea1d143daa11e61c3" | ||
integrity sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ== | ||
dependencies: | ||
"@babel/code-frame" "^7.10.4" | ||
"@babel/generator" "^7.11.0" | ||
"@babel/generator" "^7.11.5" | ||
"@babel/helper-function-name" "^7.10.4" | ||
"@babel/helper-split-export-declaration" "^7.11.0" | ||
"@babel/parser" "^7.11.0" | ||
"@babel/types" "^7.11.0" | ||
"@babel/parser" "^7.11.5" | ||
"@babel/types" "^7.11.5" | ||
debug "^4.1.0" | ||
globals "^11.1.0" | ||
lodash "^4.17.19" | ||
|
||
"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.9.0": | ||
version "7.11.0" | ||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" | ||
integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA== | ||
"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.11.5", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.9.0": | ||
version "7.11.5" | ||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d" | ||
integrity sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q== | ||
dependencies: | ||
"@babel/helper-validator-identifier" "^7.10.4" | ||
lodash "^4.17.19" | ||
|
@@ -1881,6 +1895,13 @@ babel-plugin-macros@^2.6.1: | |
cosmiconfig "^6.0.0" | ||
resolve "^1.12.0" | ||
|
||
babel-plugin-polyfill-regenerator@^0.0.4: | ||
version "0.0.4" | ||
resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.0.4.tgz#588641af9a2cb4e299b1400c47672a4a104d2459" | ||
integrity sha512-+/uCzO9JTYVZVGCpZpVAQkgPGt2zkR0VYiZvJ4aVoCe4ccgpKvNQqcjzAgQzSsjK64Jhc5hvrCR3l0087BevkA== | ||
dependencies: | ||
"@babel/helper-define-polyfill-provider" "^0.0.3" | ||
|
||
babel-plugin-replace-identifiers@^0.1.1: | ||
version "0.1.1" | ||
resolved "https://registry.yarnpkg.com/babel-plugin-replace-identifiers/-/babel-plugin-replace-identifiers-0.1.1.tgz#38819617d814ab0e4b35cfa373e40758b359f68f" | ||
|
@@ -2540,7 +2561,7 @@ core-js-pure@^3.0.0: | |
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.4.7.tgz#c998e1892da9949200c7452cbd33c0df95be9f54" | ||
integrity sha512-Am3uRS8WCdTFA3lP7LtKR0PxgqYzjAMGKXaZKSNSC/8sqU0Wfq8R/YzoRs2rqtOVEunfgH+0q3O0BKOg0AvjPw== | ||
|
||
core-js@^2.4.0, core-js@^2.6.5: | ||
core-js@^2.4.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== | ||
|
@@ -5348,6 +5369,11 @@ lodash.camelcase@^4.3.0: | |
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" | ||
integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= | ||
|
||
lodash.debounce@^4.0.8: | ||
version "4.0.8" | ||
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" | ||
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= | ||
|
||
[email protected], lodash.memoize@^4.1.2: | ||
version "4.1.2" | ||
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" | ||
|