Nicolò Ribaudo
0dbf99bedb
v7.5.2
2019-07-08 21:46:49 +02:00
Nicolò Ribaudo
f48b47c1f7
Do not trust Scope when removing TypeScript types ( #10174 )
...
* Do not trust Scope when removing TypeScript types
* Warn
* Update warning message
Co-Authored-By: Brian Ng <bng412@gmail.com>
* Add test
* Node 6
2019-07-08 21:44:26 +02:00
Nicolò Ribaudo
406a65c894
Don't rely on getOwnPropertyDescriptors in objectSpread2 ( #10171 )
2019-07-07 11:24:36 +02:00
Huáng Jùnliàng
075a50242d
fix: register injected importDeclaration ( #10172 )
2019-07-06 10:44:14 -05:00
Nicolò Ribaudo
d0519fa907
v7.5.1
2019-07-06 10:07:59 +02:00
Nicolò Ribaudo
24dde2e8e8
Fix objectSpread2 backward compatibility ( #10170 )
2019-07-06 09:48:36 +02:00
Wesley Wolfe
bff79e198a
Retain typescript export-from-source ( #10167 )
2019-07-05 20:47:55 +02:00
Nicolò Ribaudo
49da9a07c8
v7.5.0
2019-07-04 14:52:17 +02:00
Lidor Avitan
b06663320e
Update babel-preset-stage (0,1,2,3) readme files ( #10111 ) [skip ci]
...
* chore: update docs babel-preset-stage readme [ci skip]
* fix: by PR request change [ci skip]
2019-07-04 12:24:42 +02:00
Tan Li Hau
d50e78d45b
fix await and yield for do expression ( #10072 )
2019-07-03 09:54:39 -05:00
Artem Butusov
5b86353b35
Added es3 backward compatibility for react helper code ( #10155 )
...
* Added es3 backward compatibility for react helper code
* tweak comment [skip ci]
2019-07-03 16:49:20 +02:00
Tan Li Hau
f588e4ec47
BigInt type for Flow ( #10091 )
...
* flow BigIntLiteralTypeAnnotation
* numericSeparator for flow test plugins
* fix flow tuple
* fix code review
2019-07-03 16:48:46 +02:00
Brian Ng
cbb482e2f9
Bump compat-table and update preset-env mappings ( #10127 )
2019-07-03 09:37:06 -05:00
Sebastian Johansson
595a349174
Fix incorrect usage of $o instead of %o in debug ( #10157 )
...
It would end up printing the literal "$o" instead of the directory name.
2019-07-03 16:04:31 +02:00
Min ho Kim
0bf0ae3410
Fix typos ( #10153 )
2019-07-03 15:51:48 +02:00
Nicolò Ribaudo
ef3f555be9
Add proposal-dynamic-import to preset-env ( #10109 )
2019-06-30 13:58:50 +02:00
Nicolò Ribaudo
38f8bbac1a
Create @babel/plugin-proposal-dynamic-import ( #9552 )
...
* Create @babel/plugin-proposal-dynamic-import
* Use airbnb/babel-plugin-dynamic-import-node
Do not duplicate code, which will unavoidably lead
to bugs being fixed in one plugin and not in the other.
* Update error message
* Add error callback to amd interop
* Update babel-plugin-dynamic-import-node
2019-06-30 13:21:46 +02:00
Thiago Arrais
a4170b5e32
Transform for F# Pipeline ( #9984 )
...
* Transform for F#-style await
Inludes support for optimizing single-parameter arrow functions
* Wait until optimization before pushing placeholder into scope
2019-06-30 12:53:22 +02:00
James DiGioia
6b8a37c413
Implement f# pipeline in parser ( #9450 )
2019-06-30 12:53:22 +02:00
Wesley Wolfe
0a98814329
Implement TypeScript namespace support ( #9785 )
...
* Add module tests for typescript namespace transform
Fixes #8244 , fixes #10038
2019-06-30 12:15:09 +02:00
Nicolò Ribaudo
8bf9714d69
[legacy decorators] Allow decorating generator methods ( #9912 )
...
* [legacy decorators] Allow decorating generator methods
The old proposal used LeftHandSideExpression (instead of
AssignmentExpression) to satisfy this usecase:
e240cbc91a
* Update flow whitelist
2019-06-30 11:32:16 +02:00
Nicolò Ribaudo
ca67637da4
[@babel/parser] Add "allowUndeclaredExports" option ( #9864 )
...
Ref: https://github.com/babel/notes/blob/master/2019/04/09.md#export-changes-in-scope-pr-break-meteor-issue
2019-06-30 11:16:05 +02:00
Brian Ng
77fd7cd4c4
Allow defaults query in preset-env ( #8897 )
2019-06-30 11:00:43 +02:00
Tan Li Hau
1d3f9815df
fix import typeof in declare module ( #10132 )
2019-06-26 13:37:16 -05:00
Letladi Sebesho
31fc1d06bc
Babel cli test correction ( #10128 )
2019-06-25 15:38:32 -05:00
Bogdan Savluk
b8bb93a838
fix exportKind declaration in babel-types ( #10126 )
...
* fix exportKind types declaration for ExportNamedDeclaration and DeclareExportAllDeclaration in babel-types
* revert `let` in exportKind in babel-parser types
2019-06-25 22:29:38 +02:00
Erik Arvidsson
8f8a457798
Simplify the helpers for classPrivateField{Get,Set} ( #10117 )
...
No need to do the hash lookup twice. If the descriptor is not in the
WeakMap `get` returns `undefined`.
2019-06-22 00:23:26 +02:00
Pig Fang
11fa2461ce
Disallow "let" as name at lexical bindings ( #10099 )
...
* Disallow "let" as name at lexical bindings
* Simplify
* Clean up
2019-06-18 23:17:00 +02:00
Paul Comanici
505b2cc18d
Upgrade jest dependency ( #10107 )
2019-06-18 16:29:51 +02:00
Sven Sauleau
dcdf7c8fdd
[skip ci] docs: update readmes ( #10103 )
...
Using our READMEs auto generation, two packages were updated.
2019-06-17 10:57:28 +02:00
Tan Li Hau
fdbbb743b6
flow - allow type parameter defaults in function declarations ( #10084 )
...
* flow - allow type parameter defaults in function declarations
* fix flow test
* add intern_comments option
* fix flow parser test
* remove allowdefault from flowParseTypeParameterDeclaration
* rename test cases
2019-06-15 12:31:12 +02:00
Letladi Sebesho
6852bf6415
Change duplicate tests for @babel/highlight getChalk method ( #10093 )
...
* removed duplicate tests for @babel/highlight getChalk method
* changed second 'getChalk' test case for when colors are not supported
2019-06-15 09:04:35 +02:00
Maël Nison
d7801c644c
Prevents exception on PnP ( #9951 )
2019-06-02 00:55:44 +02:00
Mateusz Burzyński
84961ebb05
Refactor isImportTypeOnly helper function ( #10047 )
2019-05-31 23:54:44 +02:00
Martin Zlámal
ce4c374924
Fix printer for explicitly inexact Flow types ( #10041 )
...
Closes: https://github.com/babel/babel/issues/10040
2019-05-29 21:17:12 +02:00
Wesley Wolfe
8d492b159b
Use scope for typescript export removals. Fixes #10033 ( #10034 )
...
This also fixes enum not adding the respective declaration to the scope
during the typescript visitation.
Rewrites:
2080042808b18b005fb54aeaf9ab708f64cb1005 #9944
a6392bd636d07c41579ea5ab443152a09943e096 #10019
2019-05-29 08:36:04 +02:00
Tan Li Hau
b4c9cb0222
Fixed computed keys for class expression ( #10029 )
...
* test case for insertBefore for jsx
* fix unshiftContainer and insertBefore
* use path.scope.push
* add test making sure computedKeys var declaration at the right block
* add comment
* nit [skip ci]
2019-05-28 23:07:55 +02:00
Kagami Sascha Rosylight
a596da2822
Retry to fix object spread helper compatibility ( #9384 )
...
This reverts commit 43b83f8ed7545b9c049eeed85541fa162842fb8f.
Fix objectSpread helper breaking old codes
remove tests to regenerate later
renamed output
new name
try using word
add comment as requested
revert inline name changes
add 2 for consistency
Update packages/babel-helpers/src/helpers.js
Co-Authored-By: Daniel Tschinder <daniel@tschinder.de>
2019-05-25 12:57:13 +02:00
Nicolò Ribaudo
888b9f6940
Remove unused code in the TS parser plugin ( #10025 )
2019-05-25 08:46:01 +02:00
Tan Li Hau
b6486a22cb
fix destructuring rest with template literal ( #10013 )
...
* fix destructuring rest with template literal
* update test
2019-05-24 00:03:27 +02:00
Airat Aminev
a6392bd636
fix(typescript): erase default export if exporting a TS type ( #10019 )
2019-05-23 16:58:24 -05:00
Nicolò Ribaudo
87fb6c4a8b
Use injectInitialization to generate ts parameter properties ( #9610 )
2019-05-21 22:28:55 +02:00
Nicolò Ribaudo
33ab4f1661
v7.4.5
2019-05-21 19:38:26 +02:00
Daniel Tschinder
54d257c105
Fix location for optional params in arrow functions ( #9998 )
...
* Fix location with optional params in arrow functions
* add test
* Ensure rollup replaces NODE_ENV and create sourcemap in dev
* Ensure finishNod*() is never called twice on a node
* Fix check for already finished nodes
2019-05-21 18:53:13 +02:00
Matthew Robertson
9c06e4ed4d
avoid exceptions for control flow ( #9974 )
...
* avoid exceptions for control flow
* review feedback: remove conditional because we know it is "<"
* drop tsTryParseTypeArguments method
2019-05-21 17:23:53 +02:00
Daniel Tschinder
f5b8140580
Do not use lookahead when parsing construct signature declarations ( #9995 )
2019-05-20 23:27:41 -07:00
Daniel Tschinder
0430a48775
Update preset-env dependencies and fix fixtures ( #10002 )
...
* Fix fixtures after core-js update
* Update core-js, caniuse and compat-table
2019-05-20 23:27:19 -07:00
Matthew Schupack
45ca6751fa
use console.warn for warning ( #9992 )
...
* use console.warn for warning
* fix tests
2019-05-18 00:36:18 +02:00
Daniel Tschinder
b1826bf0a0
Only compute Position if not already in state ( #9989 )
...
* Only compute Position if not already in state
* Prioritize start locations
2019-05-17 15:32:34 -07:00
Airat Aminev
2080042808
fix(typescript): erase type exports ( #9944 )
...
* fix(typescript): erase type exports
* use Set instead of array for tracking and checking TS type declarations
* add a test for an interface exported before its declaration
2019-05-17 07:22:52 +02:00