1437 Commits

Author SHA1 Message Date
Daniel Tschinder
0bbe1e1eec
Readd missin .eslinignore for IDEs 2016-10-15 10:33:05 +02:00
Sam Goldman
26809e8ce7 Property variance type annotations for Flow plugin (#161)
* Property variance type annotations for Flow plugin

Non-method properties and indexers of object types, declare class, and
interfaces can be "positive" or "negative." Class fields, but again not
methods, can also have variance.

This PR generalizes the variance annotations for type parameters into a
new node type, and reuses that node for those properties.

The code for object types is reused for interfaces and declare classes.
The changes there are straightfoward.

The code for class fields is reused for object literals, which do not
support variance annotations (currently). This code is a bit sketchy,
because we always parse variance annotations in the `parsePropertyName`
extension, then error in a the subsequent parse phase for object
literals (`parseObjPropValue`) or class methods (`parseClassMethod`).

* Remove bogus unreachable code, clarify variance parsing conditional

* Don't use a new node type for variance annotations

Adding a new node type, specifically changing the TypeParameter node's
variance property to be node-valued, is a breaking change. We might
choose to make this breaking change in a later version.

* s/start/variancePos
2016-10-14 23:13:27 +02:00
Moti Zilberman
b5877f04b1 Fix up #172 (#177)
* Update two esprima tests to the new "expected TOKEN" messages

* Update dynamic-import to use "expected (" error message
2016-10-14 16:50:07 -04:00
Henry Zhu
3525c00397 v6.12.0 changelog [skip ci] (#176) 2016-10-14 16:17:17 -04:00
Henry Zhu
a88a8e9c15 6.12.0 2016-10-14 16:14:54 -04:00
Henry Zhu
6b4a19d520 test fixes 2016-10-14 16:14:38 -04:00
Henry Zhu
9ecf763218 lint [skip ci] 2016-10-14 16:12:05 -04:00
Moti Zilberman
d3af158ba5 Annotate more errors with expected token (#172)
Expanding on #150, this allows `unexpected()` to accept the expected token type instead of a message string.
This overload is then used in a couple more places (that independently implement a logic similar to `expect()`'s) to construct an `Unexpected token, expected FOO` message.
2016-10-14 16:10:09 -04:00
Dan Harper
99fbcefa65 allow keyword in Flow object declaration property names with type parameters (#146) 2016-10-14 21:15:00 +02:00
Dan Harper
f7c1af1c1f allow keyword in object/class property names with Flow type parameters (#145) 2016-10-14 21:13:00 +02:00
Jordan Gensler
c63c1bc728 [dynamic-import] Implementing import() syntax (#163) 2016-10-14 14:54:21 -04:00
Daniel Tschinder
4c445fd5f8 Remove kcheck (#173) 2016-10-14 12:12:55 -04:00
Daniel Tschinder
b31834ad29 Allow typeAnnotations for yield epressions (#174) 2016-10-14 12:07:46 -04:00
Sam Goldman
44f77bd724 Add EmptyTypeAnnotation (#171)
I also noticed that there was missing test coverage for builtin types,
so I added a test for that, which includes the newly added type as well
as the other existing types.
2016-10-13 19:22:13 -04:00
Henry Zhu
c300230a59 v6.11.6 changelog [skip ci] 2016-10-12 19:39:59 -04:00
Henry Zhu
c6e36eff86 6.11.6 2016-10-12 19:37:16 -04:00
Jeroen Engels
e14f93d1bb Fix crash when exporting with destructuring and sparse array (#170)
* Create reproducible crash when exporting with destructuring and sparse array

* Fix crash when exporting with destructuring and sparse array
2016-10-12 19:36:08 -04:00
Henry Zhu
b1fc65530d v6.11.4 changelog [skip ci] 2016-10-12 11:58:11 -04:00
Henry Zhu
066826f7fa skipped v6.11.4 [skip ci] 2016-10-12 11:56:14 -04:00
Henry Zhu
ebe7c8a90c 6.11.5 2016-10-12 11:53:46 -04:00
Henry Zhu
b05bd7839a fixes [skip ci] 2016-10-12 11:52:26 -04:00
Henry Zhu
02d6cc6ccb v6.11.4 changelog [skip ci] (#168) 2016-10-12 11:50:40 -04:00
Henry Zhu
6e17a646ff changelog emoji [skip ci] 2016-10-12 11:33:19 -04:00
Daniel Tschinder
d4d6d05d25 Slightly better error messages (#150)
* Slightly better errors

Instead of "Unexpected token" we now print
"Unexpected token, expected <type.label>"
2016-10-12 10:38:26 -04:00
Kai Cataldo
4fc0a3839e Fix: Allow identifier async for default param in arrow expression (#165)
fixes #118
2016-10-12 10:46:40 +02:00
Kai Cataldo
7dd45f7465 Check for duplicate named exports in exported rest elements/properties (#164) 2016-10-10 10:10:16 -04:00
Henry Zhu
2697bfd820 clarify proposals [skip ci] 2016-10-06 19:38:43 -04:00
Daniel Tschinder
680f35f606 Update links to estree 2016-10-04 18:02:56 +02:00
Kai Cataldo
76e69277d7 Check for duplicate named exports in exported destructuring assignments (#144)
* Check for duplicate named exports in exported destructuring assignments

* Refactor duplicate error reporting

* Remove unnecessary check
2016-10-04 15:06:26 +02:00
Henry Zhu
7c2302a02f 6.11.4 2016-10-01 20:08:48 -04:00
Henry Zhu
5bac6e8ad9 Temporary rollback for erroring on trailing comma with spread (#154) 2016-10-01 20:08:25 -04:00
Henry Zhu
1285131e3e v6.11.3 changelog [skip ci] (#153)
* v6.11.3 changelog [skip ci]
2016-10-01 17:33:31 -04:00
Henry Zhu
45c68c7311 6.11.3 2016-10-01 16:33:29 -04:00
Henry Zhu
4847403b84 add npm run changelog 2016-10-01 16:33:10 -04:00
Daniel Tschinder
7877829fcb Add static errors for object rest (#149)
* Fix parsing object rest

This makes object-rest-spread behave according to spec and only
allow one rest operator and enforces it to be the last
param in the object.

Also move all object-rest-spread tests to a own folder.

* Show nicer error messages
2016-09-30 11:37:55 -04:00
jezell
9cc0981c51 get / set are valid property names in default assignment (#142) 2016-09-27 23:29:16 +02:00
Daniel Tschinder
4115bcb97d Fix travis 2016-09-26 10:05:16 +02:00
Henry Zhu
44d44a20f9 changelog update 2016-09-23 00:51:29 -04:00
Henry Zhu
a1c0ef220a Don't build on *.md change [skip ci] 2016-09-23 00:50:36 -04:00
Henry Zhu
6ce192d883 6.11.2 changelog [skip ci] 2016-09-23 00:49:06 -04:00
Henry Zhu
fbd3f6a183 6.11.2 2016-09-23 00:44:36 -04:00
Henry Zhu
1d04d12794 Don't do the duplicate check if not an identifier (#140) 2016-09-23 00:44:13 -04:00
Daniel Tschinder
101e9e5636 Fix styling 2016-09-22 22:31:30 +02:00
Daniel Tschinder
4b11aad516 6.11.1 (#138)
* Update CHANGELOG.md

* Update CHANGELOG.md
2016-09-22 22:30:41 +02:00
Henry Zhu
8a544542db 6.11.1 2016-09-22 16:01:02 -04:00
Daniel Tschinder
952d50faf9 Make exportIdentifiers and array so that base object properties are not accounted (#137) 2016-09-22 16:00:39 -04:00
Henry Zhu
3210bbbce0 6.11.0 2016-09-22 14:08:21 -04:00
Henry Zhu
b1584cac6a link to example pr [skip ci] 2016-09-22 14:05:20 -04:00
Henry Zhu
0ca8f167c7 6.11.0 changelog [skip ci] (#136)
* 6.11.0 changelog [skip ci]

* add examples [skip ci]
2016-09-22 14:03:44 -04:00
Moti Zilberman
774e6b446b Rephrase "assigning/binding to rvalue" errors to include context (#119) (#123)
* Rephrase "assigning/binding to rvalue" error messages with context (#119)

* Fix code style in parser/lval.js

* istanbul ignore some unused branches in parser/lval.js

* Fix code style again in parser/lval.js
2016-09-22 12:02:20 -04:00