12412 Commits

Author SHA1 Message Date
Daniel Tschinder
38ef4b7467
Add editorconfig for Makefile (#9623) 2019-03-04 14:26:22 -08:00
Nicolò Ribaudo
f195daa092
Don't add params of anonymous exported function decls to the outer scope (#9613)
* Don't add params of anonymous exported function decls to the outer scope

* Test
2019-03-01 00:09:49 +01:00
Daniel Tschinder
17f4195bcc
Allow any reserved word in export {} from specifiers (#9616) 2019-02-28 15:07:20 -08:00
Nicolò Ribaudo
f13f4adcbb
[TS] Disallow type casts in arrow parameters (#9612) 2019-02-28 23:58:27 +01:00
Evan Henley
d72f3aa758 [plugin-transform-typescript] Strip type imports used in Enums and object types (#9605)
* fix: strip type imports used in Enums and object types

* chore: update failing snapshot

* docs: correct TSPropertySignature comment

* fix: enum value should be considered a reference

* chore: add tests for TSPropertySignature and TSEnumMember
2019-02-28 22:03:12 +01:00
Daniel Tschinder
98ab1b6428
Refactor parsing object members (#9607)
* Refactor parsing object members

* Ensure decorators on rest don’t swallow decorators silently

* Use hasPrecedingLineBreak

* Add test for async with linebreak

* Update flow whitelist
2019-02-28 11:42:12 -08:00
Daniel Tschinder
208195f425
Disallow duplicate params in methods (#9599)
* Disallow duplicate params in methods

* Fix plugins
2019-02-27 15:54:07 -08:00
Daniel Tschinder
5cb280f986
Fix scope check for 2nd+ lexical bindings (#9600) 2019-02-27 15:53:28 -08:00
Nicolò Ribaudo
9aec606c69
Don't loose "this" in helper-call-delegate (#9601) 2019-02-28 00:34:48 +01:00
Nicolò Ribaudo
5c8cc0d536
Mark FOO in "var { x: FOO }˝ as a binding, not as a reference (#9492) 2019-02-27 00:17:11 +01:00
Daniel Tschinder
43eed1ac92
Check exported bindings are defined (#9589)
* Check exported bindings are defined

* Add tests

* Update flow whitelist

* Add tests for builtins
2019-02-26 13:28:10 -08:00
Sven Sauleau
e883ff295d
Merge pull request #9597 from danez/Update-charcodes
Update charcodes
2019-02-26 22:17:59 +01:00
Daniel Tschinder
c1e51e08d3
Update charcodes 2019-02-26 12:29:10 -08:00
Justin Ridgewell
039a74a8b9
preset-env: minimally supporting version (#9596)
* preset-env: minimally supporting version

This changes the "does browser support X" algorithm to "lowest version such that all higher versions support it".

Eg, given `{ chrome70: true, chrome60: false, chrome50: true }`, the lowest version is chrome70, not chrome50.

This is done to remove Tagged Template Literal support from Safari, which introduced a bug in Safari 12 but correctly implemented the feature in Safari 11-9.

* Add tests

* Fix tests

* Fix comment
2019-02-26 15:18:52 -05:00
Nicolò Ribaudo
a029071b8f
[TS] Correctly forget awaits after parsing async arrows with type args (#9593) 2019-02-26 20:35:18 +01:00
Daniel Tschinder
244e4580e9
Remove always false param allowExpressionBody (#9591) 2019-02-26 11:15:34 -08:00
Justin Ridgewell
e1ff4c47b9 preset-env: Sort versions before determining lowest (#9595)
Likely because of implicit `equals` (ie, Safari 12 support implies iOS Safari 12), the versions in the `res` hash are not always sorted in version order.

Doing a semver sort reveals some builtins have actually been supported a little longer than we thought!
2019-02-26 11:11:49 -08:00
Nicolò Ribaudo
0345c1bc1d
Use for..of Object.keys instead of for..in (#9518)
In https://github.com/babel/babel/issues/9511 (and #9495 is another symptom), @PavelKastornyy reported a node crash becaue the JavaScript heap run out of memory. The problem was that their code was adding enumerable properties to `Object.prototype`: it is something that shouldn't be done, but Babel shouldn't make node crash if someone adds them.
I reduced down the problem to `for...in` loops in `@babel/traverse` that grew the memory consumption exponentially because of that unexpected properties.
2019-02-26 20:09:02 +01:00
Brian Ng
f1ab6120d2
Bump Babel deps (#9590) 2019-02-26 11:21:00 -06:00
Florian Adonis
8f26f6df83 change var name for coherence (#9579) 2019-02-26 09:05:43 -06:00
Daniel Tschinder
d0e196d210
Treat for loop body as part of loop scope (#9586) 2019-02-25 18:30:51 -08:00
Daniel Tschinder
e6c1065d19
Fix strict mode prescanning with EmptyStatement (#9585) 2019-02-25 15:20:05 -08:00
Daniel Tschinder
45c96908e9
Update test262 (#9587)
* Update test262

* Also remove unrecognized tests from the whitelist
2019-02-25 15:10:48 -08:00
Brian Ng
434fd32c90
Update esm and electron mappings in preset-env (#9573) 2019-02-25 16:51:38 -06:00
Nicolò Ribaudo
0e3968124c
Remove unused file (eslint-local-rules.js) (#9583) 2019-02-25 21:51:17 +01:00
Daniel Tschinder
632552f55d
Minify bundles on circle for repl (#9582) 2019-02-25 11:52:40 -08:00
Daniel Tschinder
a7391144b3
Introduce scope tracking in the parser (#9493)
* Introduce scope tracking

* Fix tests

* Add new tests

* Remove constructor-super check from transform as it is now in parser

* Correctly handle class properties and class scope

* Fix duplicate name check

* Convert scope identifier storage to array

* Enter a new scope in typescript module blocks

* Add test for duplicate declaration

* Rename error for duplicate exports

* Treat class declarations as lexical declaration

* Update whitelist

* Add tests

* Fix scope tracking for function declarations

* Migrate try-catch duplicate error

* Fix test

* More tests

* One more test

* Make scope a separate class and fix review comments

* Do not allow new.target in top scope arrow function

* Correctly enter new scope for declare module and treat type aliases as lexical declarations

* Tests for typescript scope tracking to not mark type aliases as duplicate

* Fix flow scope tracking

* Remove ident from test names as redundant

* Add test case for var and function

* Improve error messages

* Improve literal regex
2019-02-25 11:04:52 -08:00
Babel Bot
918f149a63 Add v7.3.4 to CHANGELOG.md [skip ci] 2019-02-25 18:37:14 +00:00
Nicolò Ribaudo
1f6454cc90
v7.3.4 2019-02-25 19:29:12 +01:00
Nicolò Ribaudo
4540f2653b
Update CHAMGELOG.md using the "Trigger GitHub release" action (#9561)
Update CHANGELOG.md using the "Trigger GitHub release" action
2019-02-25 19:18:44 +01:00
Justin Ridgewell
fc1ea7f496 Revert "Parenthesized expressions (#8025)"
This reverts commit dd8b700a2c4c975584c7b2ea43023aa275c16167.
2019-02-25 19:03:00 +01:00
Barthélémy Ledoux
9f3457797f Fix TypeScript parsers missing token check (#9571) (#9572)
* Fix TypeScript parsers missing token check (#9571)

* fix unit test
2019-02-24 13:34:38 +01:00
Nicolò Ribaudo
0b01b5217b
Use correct "this" in static fields (#9508) 2019-02-24 08:14:49 +01:00
Denis Pushkarev
cade33c647 Update compat-table (#9566)
fix #9465
2019-02-23 12:47:43 +01:00
Erik Arvidsson
dd8b700a2c Parenthesized expressions (#8025)
* Add parser createParenthesizedExpressions option  …

When set to `true` we create `ParenthesizedExpression` nodes instead of
setting `extra.parenthesized`.

* Also update babel-parser.d.ts
2019-02-23 02:45:25 -05:00
Ian Craig
417e72ebfd Fix flow and TS types of babel-types is* type checks to accept null | undefined (#9539)
* babel-types is* type checks accept null | undefiend as value TS type

* Use | null | undefined instead of any, make Flow type nullable

* Also change flow types of generated src
2019-02-22 01:48:27 -08:00
Nicolò Ribaudo
b8d045f5cf
Update regenerator-transform (#9558) 2019-02-21 23:24:31 +01:00
Jacob Clark
879a59085b Pull in chokidar 2.0.4 to pull in patched braces (#9550)
chokidar 2.0.3 pulled in an older version of braces which is vulnerable to https://www.npmjs.com/advisories/786, this upgrades chokidar up a patch version where its dependencies have been updated resolving this vulnerability.
2019-02-20 15:07:24 +01:00
Daniel Tschinder
b32d271fee
Migrate some duplicate binding tests to traverse (#9532)
* Migrate try-catch duplicate error

* Remove exception for functions and let in the same scope

* Migrate duplicate bindings tests to traverse

* Add test for subscope and let/const

* Add more test cases
2019-02-19 21:25:49 -08:00
Nicolò Ribaudo
21eb0837e8
Update CHANGELOG.md [skip ci] 2019-02-19 23:50:22 +01:00
Daniel Tschinder
b78fdc0cb1
chore: Enable eqeqeq rule in eslint (#9541) 2019-02-18 21:16:42 -08:00
Daniel Tschinder
a1ea765b95
Make tests spec compliant and avoid duplicate declarations in input files (#9522) 2019-02-18 16:14:35 -08:00
Nicolò Ribaudo
39af228ac4
Add import/no-extraneous-dependencies to ESLint (#9533) 2019-02-19 00:48:19 +01:00
Sven Sauleau
7c0549a923
Merge pull request #9536 from irohitb/patch-1
Update SONG.md
2019-02-18 20:56:59 +01:00
Tim McClure
f44b29522c Remove transform-classes from priv method tests (#9537) 2019-02-18 19:57:29 +01:00
Rohit Bhatia
682534e475
Update SONG.md 2019-02-18 23:28:26 +05:30
Tan Li Hau
bbb4d7b6d7 Fix typescript generator params (#9524)
* Fix typescript generator params

* add TSOptionalType, TSRestType, add more test
2019-02-18 08:22:22 +01:00
Tan Li Hau
5bb1bb080f Fix flow babel-generator function parantheses (#9523) 2019-02-18 00:17:52 +01:00
Daniel Tschinder
058f057426
Also check AssignmentPatterns for export name (#9521) 2019-02-15 22:55:03 -08:00
Nicolò Ribaudo
d1fe2d05f4 v7.3.3 v7.3.3 2019-02-15 22:06:01 +01:00