11820 Commits

Author SHA1 Message Date
Henry Zhu
f1d774b34f v7.0.0-rc.2 v7.0.0-rc.2 2018-08-21 15:22:07 -04:00
Jarda Snajdr
8874c5c481 Add missing es7.promise.finally polyfill when using useBuiltIns: usage (#8500)
Usage of a `finally` instance method should trigger import of the `es7.promise.finally` polyfill, but it doesn't. This PR adds the missing definition and a test.
2018-08-21 14:53:11 -04:00
Yi Li
b439013cd4 Fix trailingComments for FunctionExpression that is CallExpression arguments (#8488) 2018-08-21 12:29:11 -05:00
Nicolò Ribaudo
f8b0a5579f Remove File#resolveModuleSource (#8470) 2018-08-20 12:14:55 -07:00
Logan Smyth
2a4f162366
Merge pull request #8485 from loganfsmyth/caller-option
Allow preset-env to toggle module handling based on flags from the caller (like babel-loader)
2018-08-20 10:44:11 -07:00
Brian Ng
55295cc545
Add initial ES2019 and saf12/elec3 support in env (#8438) 2018-08-20 12:32:18 -05:00
Nicolò Ribaudo
59e9c6322b Remove hub.file usage from babel-core 2018-08-20 19:30:29 +02:00
Yongxu Ren
0fd3da110d Rewrite Hub as interface #5047 2018-08-20 19:30:29 +02:00
Logan Smyth
d60c5e1736 Expose caller.supportsStaticESM as a flag to change preset-env behavior. 2018-08-20 10:27:55 -07:00
Logan Smyth
90bebe7186 Pass the caller.name option in Babel's own callers. 2018-08-20 10:27:54 -07:00
Logan Smyth
8d6ed7e0aa Expose an api.caller(...) handler for presets to access caller metadata. 2018-08-20 10:27:54 -07:00
Logan Smyth
8f4bae8ea4 Expose optional caller metadata to Babel ignore/only/test/include/exclude functions. 2018-08-20 10:27:54 -07:00
Logan Smyth
2c3c12fdf7 Enforce a limited set of cache key values for plugins/presets for future caching. 2018-08-20 10:12:19 -07:00
Logan Smyth
25d2f59018 Ensure that presets properly flatten their options. 2018-08-20 10:12:19 -07:00
Logan Smyth
3a399d1eb9
Cache individual programmatic descriptors along with the overall list. (#8494) 2018-08-20 10:08:21 -07:00
Logan Smyth
c2a2e24965
Take top-level config source into consideration when processing nested env/overrides. (#8493) 2018-08-19 21:46:09 -07:00
Logan Smyth
ef68114d67 Fix typo in sourcemap filtering. 2018-08-19 16:37:29 -07:00
Logan Smyth
ca639b4262
Preserve 'false'-options for disabled plugins/presets so that callers can use that to toggle behavior. (#8474) 2018-08-19 16:22:27 -07:00
wtgtybhertgeghgtwtg
7a51d72345 Bump js-tokens in @babel/highlight. (#8490) 2018-08-19 07:35:16 -04:00
dnalborczyk
ab8555a867 Update dependencies (#8364) 2018-08-17 10:26:25 -05:00
Nicolò Ribaudo
0136a26af7
Fix conflict in tests (#8486) 2018-08-17 11:36:10 +02:00
Yeonghoon Park
c75a00bd56 Fix default descriptor setting for class properties with decorators (#7429)
(legacy decorators)
2018-08-17 10:49:03 +02:00
Logan Smyth
ffa8e6cbae
Allow babel-plugin/preset to be in package names outside the prefix, when used in a scope. (#8473) 2018-08-16 15:13:52 -07:00
Nikolay Emrikh
5043ec78bc Fixes setter paratemer default value (#8479)
* Fixes setter paratemer default value

* Not changes doesn't mutate loose variable
2018-08-16 01:54:50 -04:00
Nicolò Ribaudo
3989213e37
Remove unused file (#8472) 2018-08-15 09:08:28 +02:00
Nicolò Ribaudo
d79b5eeeff
Require decoratorsBeforeExport option for decorators (#8465)
* Require decoratorsBeforeExport option for syntax-decorators

* Also babylon

* Enable test
2018-08-15 09:04:52 +02:00
Logan Smyth
1e0b649485
Allow transform-runtime to insert runtime references with absolute paths. (#8435) 2018-08-14 16:11:19 -07:00
Laxman
8c65230258 Fix link to babel-parser (#8464) [skip ci] 2018-08-13 15:54:07 +02:00
Mauro Bringolf
427aff559f Fix decorators interop bug with class field tdz
Co-authored-by: Jan Buschtöns <jan@buschtoens.me>
2018-08-13 08:57:09 +02:00
wtgtybhertgeghgtwtg
de16ac08be Remove lodash where it isn't used. (#8446) 2018-08-09 23:21:41 -04:00
Henry Zhu
0a958861c9 v7.0.0-rc.1 v7.0.0-rc.1 2018-08-09 16:06:08 -04:00
Henry Zhu
904bcaffe3
fix peer deps [skip ci] (#8445)
Should be anything 7.x
2018-08-09 15:59:14 -04:00
宋铄运
e855987c51 update sponsor [skip ci] (#8444)
Add issue.sh sponsor from Patreon
2018-08-09 15:58:28 -04:00
Henry Zhu
8b1406127a v7.0.0-rc.0 v7.0.0-rc.0 2018-08-09 11:56:00 -04:00
Henry Zhu
c8bb450032
remove proposals polyfills from default import [skip ci] (#8440)
The default import is replaced with only polyfills that are Stage 4; this is in alignment with how we have removed the Stage presets. This also would mean we would need to add new imports when necessary, but that can be in a future release.
2018-08-09 11:43:45 -04:00
Logan Smyth
b6db036ff7 Require v1.1.0 so that correct filter params are passed. (#8436)
PR #8418 introduced some new logic that uses the third parameter of `fs-readdir-recursive`'s `filter` option, the current directory, but missed that our dependencies only required `^1.0.0`, while that parameter was actually added in `1.1.0`. This means that if some other dependency forced a downgrade in the version to satisfy some range, or the user already had 1.0.0 module installed locally, it could cause problems,
2018-08-07 23:28:36 -04:00
Sam Grace
6476a0d089 Whitelist experimental-modules flag for babel-node (#8336) [skip ci] 2018-08-06 11:45:38 -04:00
Henry Zhu
6695f5e2f7 v7.0.0-beta.56 v7.0.0-beta.56 2018-08-03 21:02:42 -04:00
Henry Zhu
86ce2e4e0d remove old deps [skip ci] 2018-08-03 20:42:45 -04:00
Henry Zhu
8cffbbae75
Split @babel/runtime into 2 modules via @babel/runtime-corejs2 (#8266)
In Babel 6, we had `@babel/runtime` which _always_ uses `core-js` in its helpers, meaning that anyone who wants to use our helpers in a centralized modular way had to also use core-js, which isn't always ideal.

Early in the Babel 7 alpha, we added a `useBuiltins: true` option that would use separate copies of the helpers that would skip loading `core-js`, but this _still_ requires users to have an indirect npm dependency on `core-js`.

This PR splits our setup into two separate runtimes:

* ```
  'plugins': [
    ['transform-runtime'],
  ]
  ```
  with `npm install --save @babel/runtime` that just includes our helpers, and relies on users to globally polyfill any APIs they need.
* ```
  'plugins': [
    ['transform-runtime', { corejs: 2 }],
  ]
  ```
  with `npm install --save @babel/runtime-corejs2` that includes everything `@babel/runtime` does, but also includes a passthrough API for `corejs@2.x` and rewrites all of the helper modules to reference `core-js`.
2018-08-03 15:13:33 -04:00
Jan Schmidle
cb51704745 Babel cli fix recursion in file mode (#8418)
* added test case

* remove unnessecary parameter

* check for type directory as well in readRecursive filter
2018-08-03 09:06:27 -07:00
Logan Smyth
a8224d40e2 Split @babel/runtime into two separate runtime modules. 2018-08-02 19:25:07 -07:00
Logan Smyth
3210a7a873 Default to non-corejs helpers. 2018-08-02 19:24:41 -07:00
Logan Smyth
9c598a8e28 Build an explicit runtime. 2018-08-02 19:23:47 -07:00
Logan Smyth
a149466001 Move build-dist script to the runtime transform. 2018-08-02 19:23:47 -07:00
Logan Smyth
ec8330870e Refactor the runtime build-dist script. 2018-08-02 19:22:23 -07:00
Logan Smyth
363c5923f0 Remove unused options.json file. 2018-08-02 19:21:40 -07:00
Logan Smyth
8173b6e694
Merge pull request #8398 from loganfsmyth/helper-whitelisting
Only reference helpers from external/runtime helpers if they are known to be available.
2018-08-02 19:20:56 -07:00
Logan Smyth
e2d64f146c Only reference helpers from external helpers or runtime helpers if they are known to be available. 2018-08-02 18:44:56 -07:00
Logan Smyth
9392783738 Remove helpersNamespace in favor of helperGenerator. 2018-08-02 18:44:56 -07:00