Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.0 #1838

Closed
wants to merge 102 commits into from
Closed

Release 4.0 #1838

wants to merge 102 commits into from

Conversation

ariya
Copy link
Contributor

@ariya ariya commented Jun 9, 2017

See #1589 for the details.

When parsing `export default class`, treat it as a real class declaration
and do not perform the two-step process (parse as a class expression and then
mutate the node into a class declaration).

Fixes jquery#1570
Closes jquerygh-1571
Various fixes necessary to satistify strict null checking:

* Safeguard against possible null value
* Initialize values before they are used
* Annotate arrays because there is no type widening anymore

Other TypeScript 2.0 features being utilized:

* Use `readonly` property feature whenever appropriate
* Remove unused local variables
* Remove unused function parameters
* Unify return paths

Also, bump TypeScript formatter to the version that uses TypeScript 2.

Fixes jquery#1569
Closes jquerygh-1572
`parse` is still supported but the use of it is discouraged.
The consumer must choose between `parseScript` and `parseModule` to perform
a syntactical analysis on a script or a module, respectively.

Fixes jquery#1576
Closes jquerygh-1577
Instead of `Identifier`, use `IdentifierName` in `ExportSpecifier`.

Fixes jquery#1578
Closes jquerygh-1580
For every test case, the source type is indicated by the file name's suffix:
.module.js indicates a module, otherwise it is a script.

Fixes jquery#1593
Closes jquerygh-1594
* `async` for function declarations/expressions, methods, and arrow expressions
* A new `await` expression

Fixes jquery#1079
Closes jquerygh-1597
The right place to do this is before parsing any statement list item,
not just a specific, smaller set of statements.

Fixes jquery#1596
Closes jquerygh-1609
Reentry to the JSX world means that the last lookahead token being collected
needs to be excluded.

Fixes jquery#1613
Closes jquerygh-1614
ariya and others added 23 commits June 7, 2017 21:43
This fixes the problem with incorrect node type in the parameters
(object expression vs object pattern, etc).

Fix jquery#1751
Fix jquery#1748
Closes jquerygh-1753
This fixes issues with redeyed, but unfortunately documentjs needs to be
excluded (outdated, tests can't run with modern Node.js anymore).

Closes jquerygh-1798
Only a real lexing should throw an exception for an unknown JSX token.
This ensures that a non-empty expression container does not cause any
problem.

Fixes jquery#1786
Closes jquerygh-1816
Instead of trying to handle it by itself, the special lexer for JSX should
simply defer to the vanilla lexer if it can't understand the upcoming token.

Fix jquery#1815
Closes jquerygh-1820
This is also now enforced via TSLint's prefer-const (with TSLint
dependency bumped to v5).

Fix jquery#1817
Closes jquerygh-1823
Were specified as "token" and "comments" in the description of the parse method

Closes jquerygh-1832
@ariya ariya changed the base branch from master to 4.x June 9, 2017 12:00
@ariya
Copy link
Contributor Author

ariya commented Jun 9, 2017

Please ignore this confusing commit view from GitHub interface, I had to reconstruct this special 4.0 branch because the master branch already contains some implementation of ES2018 support which we don't want to include in 4.0 (it's focused only ES2017).

@ariya ariya requested a review from mikesherov June 9, 2017 22:32
@mikesherov
Copy link
Member

👍 Awesome!

ariya added a commit that referenced this pull request Jun 10, 2017
@ariya
Copy link
Contributor Author

ariya commented Jun 10, 2017

Merged!

@ariya ariya closed this Jun 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants