Huáng Jùnliàng
1011e58c6c
update: preset-env-fixtures ( #11218 )
...
Co-authored-by: Kai Cataldo <kai@kaicataldo.com>
2020-03-05 15:01:29 -05:00
Nicolò Ribaudo
7127330f02
Allow using preset-env with newer versions of compat-data ( #11201 )
...
* Use ~ for preset-env's @babel/compat-data dependency
* Revert "Use ~ for preset-env's @babel/compat-data dependency"
This reverts commit e7d57c7894095d381670cddfbbce06bd2a480a32.
* Allow using `preset-env` with newer versions of `compat-data`
2020-03-05 02:35:31 +01:00
Nicolò Ribaudo
a192c0fcd3
Update preset-env fixture
2020-02-24 22:29:03 +01:00
Nicolò Ribaudo
4b045819b8
Mark wrapNativeSuper and wrapRegExp as pure ( #11134 )
2020-02-21 09:15:59 +01:00
Huáng Jùnliàng
1613418f9b
Update preset-env builtin-definitions ( #10929 )
...
* chore: build corejs3-proposals.json from core-js-compat
* fix: include finished proposals by default
* update test fixtures
* update test fixtures
* chore: rename scripts
* fix: add standarized entries for finished proposals
* refactor: remove unused finished proposals json
* revert test fixtures update
* test against corejs 3.6
* fix: move corejs builtin definitions to babel/compat-data
2020-02-17 19:30:53 +01:00
Nicolò Ribaudo
d21e2217d5
Skip newlines around inline #__PURE__ annotations ( #11133 )
...
* Skip newlines around #__PURE__ annotations
* Update tests
2020-02-13 19:16:33 +01:00
Nicolò Ribaudo
a4d5c6253e
Update preset-env fixtures ( #11120 )
2020-02-10 23:32:31 +09:00
Nicolò Ribaudo
0ae61f060a
Update fixtures again ( #11094 )
2020-02-04 23:09:38 +01:00
Nicolò Ribaudo
bd1daa756e
Update fixtures after browserslist release ( #11091 )
2020-02-04 09:19:14 +01:00
Nicolò Ribaudo
916429b516
Avoid compiling the _typeof helper with itself ( #11049 )
...
* Avoid compiling the typeof helper with itself
* Update fixtures
2020-01-27 22:02:34 +01:00
Nicolò Ribaudo
2e5594d562
Update failing tests after last merged PR
2020-01-24 23:07:34 +01:00
Nicolò Ribaudo
1815c34987
Update preset-env fixtures ( #11040 )
2020-01-21 22:46:49 +01:00
Nicolò Ribaudo
3daab41e61
Re-generate preset-env fixtures ( #11016 )
...
* Fix plugin ordering in preset-env
* Update stdout fixtures
* Comments [skip ci]
2020-01-16 10:49:30 -05:00
Nicolò Ribaudo
a677d59a63
Archive syntax plugins enabled by default ( #10820 )
...
* Remove syntax plugins enabled by default
Moved to babel-archive: babel/babel-archive@8f23ddce03
- `@babel/plugin-syntax-async-generators`
- `@babel/plugin-syntax-bigint`
- `@babel/plugin-syntax-dynamic-import`
- `@babel/plugin-syntax-json-strings`
- `@babel/plugin-syntax-nullish-coalescing-operator`
- `@babel/plugin-syntax-object-rest-spread`
- `@babel/plugin-syntax-optional-catch-binding`
- `@babel/plugin-syntax-optional-chaining`
* Fix build script
* Fix jest config
* Remove archived plugins from tests
2020-01-13 00:31:48 +01:00
Huáng Jùnliàng
a1310333f7
chore: update corejs fixtures ( #10983 )
2020-01-11 09:23:58 +01:00
James Beavers
80aa7dc3c6
Add optional-chaining and nullish-coalescing to preset-env ( #10811 )
...
* Add support for optional-chaining (stage 4) in present-env
* revert babel-preset-env built-in-modules.json
* add shipped proposal syntax map entry, optional chaining
* update remaining syntax plugin references, proposal description
* Add support for nullish coalescing operator in preset-env
* selectively enable sort-keys rule
* enforce sort-keys on shipped-proposals
* don't use Object.entries()
* Update fixtures
2020-01-10 22:07:43 +01:00
Nicolò Ribaudo
04354d1556
Extract targets parser and compat data from preset-env ( #10899 )
...
* Extract targets parser and compat data from preset-env
* Review by Jùnliàng
* isItemRequired -> targetsSupported
* Export isRequired
2020-01-10 03:15:20 +01:00
Huáng Jùnliàng
9f148a1603
chore: update caniuse-usage fixtures ( #10974 )
2020-01-10 00:38:21 +01:00
Huáng Jùnliàng
09cb4273bc
update corejs-compat fixtures ( #10967 )
...
* update corejs-compat fixtures
* chore: bump core-js-compat to 3.6.2
2020-01-07 18:43:14 +01:00
Huáng Jùnliàng
03d163a0d9
Use chrome data when android is absent ( #10790 )
...
* chore: rename test folder
* chore: add test case
* fix: use chrome support data when android is absent
* chore: add type annotation
* chore: add testcases last 2 versions not ie
* chore: bump browerslist to v4.8.2
* chore: update test fixtures
* chore: update test fixtures
2020-01-03 18:26:27 -05:00
Nicolò Ribaudo
30f3b07ebf
Replace custom "findSuggestion" function with "levenary" ( #10924 )
...
* Replace custom "findSuggestion" function with "levenary"
* Update
2019-12-26 00:45:26 +01:00
Nicolò Ribaudo
c0d0bf2e5e
Update core-js fixtures
2019-12-19 01:28:41 +01:00
Nicolò Ribaudo
2884bac44b
Use async-to-generator even when regenerator is enabled ( #10839 )
...
While it isn't technically needed because regenerator already handles
async functions, it doesn't play well with the Promise detection logic
used by @babel/preset-env's useBuiltIns and @babel/transform-runtime.
The plugin exclusion logic isn't removed, because
1) it will be useful when merging @babel/preset-modules
into @babel/preset-env
2) if/when regenerator will support injecting a custom promise,
we can enable this optimization again
2019-12-09 16:54:25 -05:00
Huáng Jùnliàng
b7989419c7
Update corejs fixtures ( #10846 )
...
* chore: add update-env-corejs-fixture recipe
* chore: update corejs fixtures
2019-12-09 19:50:34 +01:00
Huáng Jùnliàng
4436ffd604
Revert "Add ".js" extension to injected polyfill imports ( #10549 )" ( #10835 )
...
This reverts commit d3a37b5d08074c007268eb15a11ae432165bad5d.
2019-12-07 23:05:35 +01:00
shimataro
d3a37b5d08
Add ".js" extension to injected polyfill imports ( #10549 )
...
* Node modules compatibility: add ".js" extension to imported polyfills
* Update fixtures
* add extensions on calling `addDefaultImport()`, not in the function.
2019-12-06 13:30:23 +01:00
Jaroslav Kubicek
a6e8b3843b
chore: update snapshot for corejs3 targets unit test
2019-11-29 14:49:08 -05:00
Kai Cataldo
a6d134804a
Unify build step for ESLint packages ( #10723 )
2019-11-16 10:15:15 +01:00
Huáng Jùnliàng
e1839e5ec9
Circumvent typeof transform for umd build template ( #10701 )
...
* add test case
* fix: circumvent typeof transform
* chore: update test fixtures
2019-11-13 22:47:56 +01:00
4geru koichi uchinishi
d9fd07929a
chore: add missing new line to fixture ( #10697 )
2019-11-12 11:08:35 -05:00
chrishinrichs
70c0ed512a
Fix: Don't call Object.keys on non-objects (babel#10482) ( #10683 )
2019-11-08 21:31:46 -06:00
Nicolò Ribaudo
d25262ec4b
Correctly delegate .return() in async generator ( #10422 )
...
* Correctly delegate .return() in async generator
* Add catch param
* minNodeVersion
* Add another test
2019-11-05 00:35:40 +01:00
Nicolò Ribaudo
861844761f
[preset-env] Don't use async-to-generator when already using re… ( #9481 )
...
* [preset-env] Don't use async-to-generator when already using regenerator
* Add tests
* Update fixtures
2019-11-04 22:53:53 +01:00
Nicolò Ribaudo
4e6a4b08bb
Create @babel/plugin-syntax-top-level-await ( #10573 )
2019-10-29 23:27:56 +01:00
Huáng Jùnliàng
8ffca0475a
Merge multiple regex transform plugin ( #10447 )
...
* feat: implement create-regexp-features-plugin
* fix: test input is not effective
* refactor: leverage create-regexp-features-plugin
* test: add more test cases
* test: update test fixture
* chore: add type annotation to features
* test: add regression test for issue 9892
* add regression test for issue 9199
* address review comments from Nicolò
* address review comments from Brian
* small tweaks
* Enable dotAllFlag when flags includes u
2019-10-29 22:58:04 +01:00
Micah Zoltu
198b4a0fbd
Changes UMD callsite to be more likely to pass in the intended… ( #10477 )
...
* Changes UMD callsite to be more likely to pass in the intended object.
Fixes #10476
Note: This PR should be considered pseudocode and used as an illustration of the proposed fix. I do not know nearly enough about this project to know if this is an appropriate solution to the problem, nor do I have the confidence to update the tests appropriately.
* Update tests
2019-10-29 22:19:49 +01:00
Huáng Jùnliàng
01927babe2
chore: update web.immediate support fixtures ( #10612 )
2019-10-29 16:23:59 +01:00
ExE Boss
43065a9e24
fix(babel‑helpers/interopRequireWildcard): Avoid double nullis… ( #10585 )
...
* fix(babel‑helpers/interopRequireWildcard): Avoid double nullish check
* Update fixtures
2019-10-24 23:14:44 +02:00
samuel kwok
fe258dec04
fix: _interopRequireWildcard should only cache objects ( #10574 )
...
* fix: [#10561 ] _interopRequireWildcard should cache object only
* fix: narrow down cache restriction to object/function type
* test: add interop require null module case
2019-10-19 12:01:38 +02:00
Nicolò Ribaudo
272d85d0ad
Inject core-js@3 imports in Program:exit instead of on post() ( #10146 )
...
* Inject corejs3 imports in Program:exit instead of post
This allows them to be requeued and transformed by other plugins.
* Also entry
* Rebase
* Update packages/babel-preset-env/src/polyfills/corejs3/entry-plugin.js [skip ci]
Co-Authored-By: Brian Ng <bng412@gmail.com>
2019-10-15 23:46:10 +02:00
Nicolò Ribaudo
1b19608a5a
Update fixtures for core-js new version
2019-10-14 00:59:02 +02:00
Nicolò Ribaudo
99035ca96e
Don't use args rest/spread to hoist super method calls ( #9939 )
...
* Don't use args rest/spread to hoist super method calls
* Hoist this in hoisted super method calls
* Make the code more readable
Review by edoardocavazza
2019-10-11 10:18:54 +02:00
Brian Ng
57ae306457
Bump flow@0.108.0 ( #10516 )
2019-10-02 12:13:58 -05:00
Huáng Jùnliàng
256fa5aa04
chore: bump regexpu-core to version 4.6.0 ( #10439 )
...
* chore: update test fixtures
* chore: test against regexpu-core 4.6.0
* chore: bump regexpu-core dependency
2019-09-13 17:51:24 +02:00
Tan Li Hau
8027dca501
fix object rest in array pattern ( #10275 )
...
* fix object rest in array pattern
* update test fixtures
* early return
* use path.stop() at the right path
2019-09-10 15:18:45 +02:00
Huáng Jùnliàng
b64cb9aaf1
fix: early return when instance is not iterable ( #10396 )
...
* fix: early return when instance is not iterable
* chore: update test fixtures
* fix: gaurd against arguments for old browsers
2019-09-06 18:09:57 +02:00
Nicolò Ribaudo
3e8a5c5e28
Use "validateLogs" for preset-env's debug fixtures ( #10401 )
...
* Add ability to ignore output to the test runner
* Use normal fixtures instead of custom debug-fixtures in preset-env
2019-09-06 17:32:20 +02:00
Bin Xin
5c859b1117
Don't polyfill if evaluation is not confident ( #10397 )
2019-09-06 00:29:19 +02:00
Bin Xin
29734b924a
Don't allow instance properties transformation on namespace ( #10372 )
2019-09-05 10:32:57 -05:00
Adam Ramberg
fcb77de901
[preset-env] Include / exclude module plugins properly ( #10218 )
...
* Include / exclude module plugins properly
* Use filter-items to excl / incl module plugins
* Move transform selection to getModulesPluginNames
* Remove unnecessary spread operator
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* Adjust tests to changes in #10218
2019-09-05 15:58:29 +02:00