5 Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
11 Fix wrong value in `version` export.
17 Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
19 Forbid `new.target` in top-level arrow functions.
21 Fix issue with parsing a regexp after `yield` in some contexts.
25 The package now comes with TypeScript definitions.
29 The default value of the `ecmaVersion` option is now 9 (2018).
31 Plugins work differently, and will have to be rewritten to work with this version.
33 The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
39 Fix failure to tokenize regexps after expressions like `x.of`.
41 Better error message for unterminated template literals.
47 Properly handle `allowAwaitOutsideFunction` in for statements.
49 Treat function declarations at the top level of modules like let bindings.
51 Don't allow async function declarations as the only statement under a label.
57 Upgraded to Unicode 11.
63 Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
65 Allow binding-less catch statements when ECMAVersion >= 10.
67 Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
73 A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
79 A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
85 Fix misleading error message for octal escapes in template strings.
91 The identifier character categorization is now based on Unicode version 10.
93 Acorn will now validate the content of regular expressions, including new ES9 features.
99 Disallow duplicate or escaped flags on regular expressions.
101 Disallow octal escapes in strings in strict mode.
105 Add support for async iteration.
107 Add support for object spread and rest.
109 ## 5.3.0 (2017-12-28)
113 Fix parsing of floating point literals with leading zeroes in loose mode.
115 Allow duplicate property names in object patterns.
117 Don't allow static class methods named `prototype`.
119 Disallow async functions directly under `if` or `else`.
121 Parse right-hand-side of `for`/`of` as an assignment expression.
123 Stricter parsing of `for`/`in`.
125 Don't allow unicode escapes in contextual keywords.
129 Parsing class members was factored into smaller methods to allow plugins to hook into it.
131 ## 5.2.1 (2017-10-30)
135 Fix a token context corruption bug.
137 ## 5.2.0 (2017-10-30)
141 Fix token context tracking for `class` and `function` in property-name position.
143 Make sure `%*` isn't parsed as a valid operator.
145 Allow shorthand properties `get` and `set` to be followed by default values.
147 Disallow `super` when not in callee or object position.
151 Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
153 ## 5.1.2 (2017-09-04)
157 Disable parsing of legacy HTML-style comments in modules.
159 Fix parsing of async methods whose names are keywords.
161 ## 5.1.1 (2017-07-06)
165 Fix problem with disambiguating regexp and division after a class.
167 ## 5.1.0 (2017-07-05)
171 Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
173 Parse zero-prefixed numbers with non-octal digits as decimal.
175 Allow object/array patterns in rest parameters.
177 Don't error when `yield` is used as a property name.
179 Allow `async` as a shorthand object property.
183 Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
185 ## 5.0.3 (2017-04-01)
189 Fix spurious duplicate variable definition errors for named functions.
191 ## 5.0.2 (2017-03-30)
195 A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
197 ## 5.0.0 (2017-03-28)
201 Raise an error for duplicated lexical bindings.
203 Fix spurious error when an assignement expression occurred after a spread expression.
205 Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
207 Allow labels in front or `var` declarations, even in strict mode.
211 Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`.
213 ## 4.0.11 (2017-02-07)
217 Allow all forms of member expressions to be parenthesized as lvalue.
219 ## 4.0.10 (2017-02-07)
223 Don't expect semicolons after default-exported functions or classes, even when they are expressions.
225 Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
227 ## 4.0.9 (2017-02-06)
231 Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
233 ## 4.0.8 (2017-02-03)
237 Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
239 ## 4.0.7 (2017-02-02)
243 Accept invalidly rejected code like `(x).y = 2` again.
245 Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
247 ## 4.0.6 (2017-02-02)
251 Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
253 ## 4.0.5 (2017-02-02)
257 Disallow parenthesized pattern expressions.
259 Allow keywords as export names.
261 Don't allow the `async` keyword to be parenthesized.
263 Properly raise an error when a keyword contains a character escape.
265 Allow `"use strict"` to appear after other string literal expressions.
267 Disallow labeled declarations.
269 ## 4.0.4 (2016-12-19)
273 Fix crash when `export` was followed by a keyword that can't be
276 ## 4.0.3 (2016-08-16)
280 Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
282 Properly parse properties named `async` in ES2017 mode.
284 Fix bug where reserved words were broken in ES2017 mode.
286 ## 4.0.2 (2016-08-11)
290 Don't ignore period or 'e' characters after octal numbers.
292 Fix broken parsing for call expressions in default parameter values of arrow functions.
294 ## 4.0.1 (2016-08-08)
298 Fix false positives in duplicated export name errors.
300 ## 4.0.0 (2016-08-07)
304 The default `ecmaVersion` option value is now 7.
306 A number of internal method signatures changed, so plugins might need to be updated.
310 The parser now raises errors on duplicated export names.
312 `arguments` and `eval` can now be used in shorthand properties.
314 Duplicate parameter names in non-simple argument lists now always produce an error.
318 The `ecmaVersion` option now also accepts year-style version numbers
321 Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
323 Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
325 ## 3.3.0 (2016-07-25)
329 Fix bug in tokenizing of regexp operator after a function declaration.
331 Fix parser crash when parsing an array pattern with a hole.
335 Implement check against complex argument lists in functions that enable strict mode in ES7.
337 ## 3.2.0 (2016-06-07)
341 Improve handling of lack of unicode regexp support in host
344 Properly reject shorthand properties whose name is a keyword.
348 Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
350 ## 3.1.0 (2016-04-18)
354 Properly tokenize the division operator directly after a function expression.
356 Allow trailing comma in destructuring arrays.
358 ## 3.0.4 (2016-02-25)
362 Allow update expressions as left-hand-side of the ES7 exponential operator.
364 ## 3.0.2 (2016-02-10)
368 Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
370 ## 3.0.0 (2016-02-10)
374 The default value of the `ecmaVersion` option is now 6 (used to be 5).
376 Support for comprehension syntax (which was dropped from the draft spec) has been removed.
380 `let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
382 A parenthesized class or function expression after `export default` is now parsed correctly.
386 When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
388 The identifier character ranges are now based on Unicode 8.0.0.
390 Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
392 ## 2.7.0 (2016-01-04)
396 Stop allowing rest parameters in setters.
398 Disallow `y` rexexp flag in ES5.
400 Disallow `\00` and `\000` escapes in strict mode.
402 Raise an error when an import name is a reserved word.
404 ## 2.6.2 (2015-11-10)
408 Don't crash when no options object is passed.
410 ## 2.6.0 (2015-11-09)
414 Add `await` as a reserved word in module sources.
416 Disallow `yield` in a parameter default value for a generator.
418 Forbid using a comma after a rest pattern in an array destructuring.
422 Support parsing stdin in command-line tool.
424 ## 2.5.0 (2015-10-27)
428 Fix tokenizer support in the command-line tool.
430 Stop allowing `new.target` outside of functions.
432 Remove legacy `guard` and `guardedHandler` properties from try nodes.
434 Stop allowing multiple `__proto__` properties on an object literal in strict mode.
436 Don't allow rest parameters to be non-identifier patterns.
438 Check for duplicate paramter names in arrow functions.