48ae34f1be108431029e95786c2722f593f5f001ebc9c67ed30e1175f9e5e4a57a3db5a552d950e5bc844ec5fb3c3bc64b6aacc0ededdd6de6453340036aee 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  1. ## 8.15.0 (2025-06-08)
  2. ### New features
  3. Support `using` and `await using` syntax.
  4. The `AnyNode` type is now defined in such a way that plugins can extend it.
  5. ### Bug fixes
  6. Fix an issue where the `bigint` property of literal nodes for non-decimal bigints had the wrong format.
  7. The `acorn` CLI tool no longer crashes when emitting a tree that contains a bigint.
  8. ## 8.14.1 (2025-03-05)
  9. ### Bug fixes
  10. Fix an issue where `await` expressions in class field initializers were inappropriately allowed.
  11. Properly allow await inside an async arrow function inside a class field initializer.
  12. Mention the source file name in syntax error messages when given.
  13. Properly add an empty `attributes` property to every form of `ExportNamedDeclaration`.
  14. ## 8.14.0 (2024-10-27)
  15. ### New features
  16. Support ES2025 import attributes.
  17. Support ES2025 RegExp modifiers.
  18. ### Bug fixes
  19. Support some missing Unicode properties.
  20. ## 8.13.0 (2024-10-16)
  21. ### New features
  22. Upgrade to Unicode 16.0.
  23. ## 8.12.1 (2024-07-03)
  24. ### Bug fixes
  25. Fix a regression that caused Acorn to no longer run on Node versions <8.10.
  26. ## 8.12.0 (2024-06-14)
  27. ### New features
  28. Support ES2025 duplicate capture group names in regular expressions.
  29. ### Bug fixes
  30. Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error.
  31. Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name.
  32. Properly recognize \"use strict\" when preceded by a string with an escaped newline.
  33. Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors.
  34. Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled.
  35. Properly normalize line endings in raw strings of invalid template tokens.
  36. Properly track line numbers for escaped newlines in strings.
  37. Fix a bug that broke line number accounting after a template literal with invalid escape sequences.
  38. ## 8.11.3 (2023-12-29)
  39. ### Bug fixes
  40. Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error.
  41. Make sure `onToken` get an `import` keyword token when parsing `import.meta`.
  42. Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes.
  43. ## 8.11.2 (2023-10-27)
  44. ### Bug fixes
  45. Fix a bug that caused regular expressions after colon tokens to not be properly tokenized in some circumstances.
  46. ## 8.11.1 (2023-10-26)
  47. ### Bug fixes
  48. Fix a regression where `onToken` would receive 'name' tokens for 'new' keyword tokens.
  49. ## 8.11.0 (2023-10-26)
  50. ### Bug fixes
  51. Fix an issue where tokenizing (without parsing) an object literal with a property named `class` or `function` could, in some circumstance, put the tokenizer into an invalid state.
  52. Fix an issue where a slash after a call to a propery named the same as some keywords would be tokenized as a regular expression.
  53. ### New features
  54. Upgrade to Unicode 15.1.
  55. Use a set of new, much more precise, TypeScript types.
  56. ## 8.10.0 (2023-07-05)
  57. ### New features
  58. Add a `checkPrivateFields` option that disables strict checking of private property use.
  59. ## 8.9.0 (2023-06-16)
  60. ### Bug fixes
  61. Forbid dynamic import after `new`, even when part of a member expression.
  62. ### New features
  63. Add Unicode properties for ES2023.
  64. Add support for the `v` flag to regular expressions.
  65. ## 8.8.2 (2023-01-23)
  66. ### Bug fixes
  67. Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`.
  68. Fix an exception when passing no option object to `parse` or `new Parser`.
  69. Fix incorrect parse error on `if (0) let\n[astral identifier char]`.
  70. ## 8.8.1 (2022-10-24)
  71. ### Bug fixes
  72. Make type for `Comment` compatible with estree types.
  73. ## 8.8.0 (2022-07-21)
  74. ### Bug fixes
  75. Allow parentheses around spread args in destructuring object assignment.
  76. Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them.
  77. ### New features
  78. Support hashbang comments by default in ECMAScript 2023 and later.
  79. ## 8.7.1 (2021-04-26)
  80. ### Bug fixes
  81. Stop handling `"use strict"` directives in ECMAScript versions before 5.
  82. Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked.
  83. Add missing type for `tokTypes`.
  84. ## 8.7.0 (2021-12-27)
  85. ### New features
  86. Support quoted export names.
  87. Upgrade to Unicode 14.
  88. Add support for Unicode 13 properties in regular expressions.
  89. ### Bug fixes
  90. Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code.
  91. ## 8.6.0 (2021-11-18)
  92. ### Bug fixes
  93. Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment.
  94. ### New features
  95. Support class private fields with the `in` operator.
  96. ## 8.5.0 (2021-09-06)
  97. ### Bug fixes
  98. Improve context-dependent tokenization in a number of corner cases.
  99. Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number).
  100. Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators.
  101. Fix wrong end locations stored on SequenceExpression nodes.
  102. Implement restriction that `for`/`of` loop LHS can't start with `let`.
  103. ### New features
  104. Add support for ES2022 class static blocks.
  105. Allow multiple input files to be passed to the CLI tool.
  106. ## 8.4.1 (2021-06-24)
  107. ### Bug fixes
  108. Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources.
  109. ## 8.4.0 (2021-06-11)
  110. ### New features
  111. A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context.
  112. ## 8.3.0 (2021-05-31)
  113. ### New features
  114. Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher.
  115. Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag.
  116. ## 8.2.4 (2021-05-04)
  117. ### Bug fixes
  118. Fix spec conformity in corner case 'for await (async of ...)'.
  119. ## 8.2.3 (2021-05-04)
  120. ### Bug fixes
  121. Fix an issue where the library couldn't parse 'for (async of ...)'.
  122. Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances.
  123. ## 8.2.2 (2021-04-29)
  124. ### Bug fixes
  125. Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield.
  126. ## 8.2.1 (2021-04-24)
  127. ### Bug fixes
  128. Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse.
  129. ## 8.2.0 (2021-04-24)
  130. ### New features
  131. Add support for ES2022 class fields and private methods.
  132. ## 8.1.1 (2021-04-12)
  133. ### Various
  134. Stop shipping source maps in the NPM package.
  135. ## 8.1.0 (2021-03-09)
  136. ### Bug fixes
  137. Fix a spurious error in nested destructuring arrays.
  138. ### New features
  139. Expose `allowAwaitOutsideFunction` in CLI interface.
  140. Make `allowImportExportAnywhere` also apply to `import.meta`.
  141. ## 8.0.5 (2021-01-25)
  142. ### Bug fixes
  143. Adjust package.json to work with Node 12.16.0 and 13.0-13.6.
  144. ## 8.0.4 (2020-10-05)
  145. ### Bug fixes
  146. Make `await x ** y` an error, following the spec.
  147. Fix potentially exponential regular expression.
  148. ## 8.0.3 (2020-10-02)
  149. ### Bug fixes
  150. Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`.
  151. ## 8.0.2 (2020-09-30)
  152. ### Bug fixes
  153. Make the TypeScript types reflect the current allowed values for `ecmaVersion`.
  154. Fix another regexp/division tokenizer issue.
  155. ## 8.0.1 (2020-08-12)
  156. ### Bug fixes
  157. Provide the correct value in the `version` export.
  158. ## 8.0.0 (2020-08-12)
  159. ### Bug fixes
  160. Disallow expressions like `(a = b) = c`.
  161. Make non-octal escape sequences a syntax error in strict mode.
  162. ### New features
  163. The package can now be loaded directly as an ECMAScript module in node 13+.
  164. Update to the set of Unicode properties from ES2021.
  165. ### Breaking changes
  166. The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release.
  167. Some changes to method signatures that may be used by plugins.
  168. ## 7.4.0 (2020-08-03)
  169. ### New features
  170. Add support for logical assignment operators.
  171. Add support for numeric separators.
  172. ## 7.3.1 (2020-06-11)
  173. ### Bug fixes
  174. Make the string in the `version` export match the actual library version.
  175. ## 7.3.0 (2020-06-11)
  176. ### Bug fixes
  177. Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail.
  178. ### New features
  179. Add support for optional chaining (`?.`).
  180. ## 7.2.0 (2020-05-09)
  181. ### Bug fixes
  182. Fix precedence issue in parsing of async arrow functions.
  183. ### New features
  184. Add support for nullish coalescing.
  185. Add support for `import.meta`.
  186. Support `export * as ...` syntax.
  187. Upgrade to Unicode 13.
  188. ## 6.4.1 (2020-03-09)
  189. ### Bug fixes
  190. More carefully check for valid UTF16 surrogate pairs in regexp validator.
  191. ## 7.1.1 (2020-03-01)
  192. ### Bug fixes
  193. Treat `\8` and `\9` as invalid escapes in template strings.
  194. Allow unicode escapes in property names that are keywords.
  195. Don't error on an exponential operator expression as argument to `await`.
  196. More carefully check for valid UTF16 surrogate pairs in regexp validator.
  197. ## 7.1.0 (2019-09-24)
  198. ### Bug fixes
  199. Disallow trailing object literal commas when ecmaVersion is less than 5.
  200. ### New features
  201. Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on.
  202. ## 7.0.0 (2019-08-13)
  203. ### Breaking changes
  204. Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression).
  205. Makes 10 (ES2019) the default value for the `ecmaVersion` option.
  206. ## 6.3.0 (2019-08-12)
  207. ### New features
  208. `sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard.
  209. ## 6.2.1 (2019-07-21)
  210. ### Bug fixes
  211. Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
  212. Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances.
  213. ## 6.2.0 (2019-07-04)
  214. ### Bug fixes
  215. Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
  216. Disallow binding `let` in patterns.
  217. ### New features
  218. Support bigint syntax with `ecmaVersion` >= 11.
  219. Support dynamic `import` syntax with `ecmaVersion` >= 11.
  220. Upgrade to Unicode version 12.
  221. ## 6.1.1 (2019-02-27)
  222. ### Bug fixes
  223. Fix bug that caused parsing default exports of with names to fail.
  224. ## 6.1.0 (2019-02-08)
  225. ### Bug fixes
  226. Fix scope checking when redefining a `var` as a lexical binding.
  227. ### New features
  228. Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins.
  229. ## 6.0.7 (2019-02-04)
  230. ### Bug fixes
  231. Check that exported bindings are defined.
  232. Don't treat `\u180e` as a whitespace character.
  233. Check for duplicate parameter names in methods.
  234. Don't allow shorthand properties when they are generators or async methods.
  235. Forbid binding `await` in async arrow function's parameter list.
  236. ## 6.0.6 (2019-01-30)
  237. ### Bug fixes
  238. The content of class declarations and expressions is now always parsed in strict mode.
  239. Don't allow `let` or `const` to bind the variable name `let`.
  240. Treat class declarations as lexical.
  241. Don't allow a generator function declaration as the sole body of an `if` or `else`.
  242. Ignore `"use strict"` when after an empty statement.
  243. Allow string line continuations with special line terminator characters.
  244. Treat `for` bodies as part of the `for` scope when checking for conflicting bindings.
  245. Fix bug with parsing `yield` in a `for` loop initializer.
  246. Implement special cases around scope checking for functions.
  247. ## 6.0.5 (2019-01-02)
  248. ### Bug fixes
  249. Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type.
  250. Don't treat `let` as a keyword when the next token is `{` on the next line.
  251. Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on.
  252. ## 6.0.4 (2018-11-05)
  253. ### Bug fixes
  254. Further improvements to tokenizing regular expressions in corner cases.
  255. ## 6.0.3 (2018-11-04)
  256. ### Bug fixes
  257. Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression.
  258. Remove stray symlink in the package tarball.
  259. ## 6.0.2 (2018-09-26)
  260. ### Bug fixes
  261. Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
  262. ## 6.0.1 (2018-09-14)
  263. ### Bug fixes
  264. Fix wrong value in `version` export.
  265. ## 6.0.0 (2018-09-14)
  266. ### Bug fixes
  267. Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
  268. Forbid `new.target` in top-level arrow functions.
  269. Fix issue with parsing a regexp after `yield` in some contexts.
  270. ### New features
  271. The package now comes with TypeScript definitions.
  272. ### Breaking changes
  273. The default value of the `ecmaVersion` option is now 9 (2018).
  274. Plugins work differently, and will have to be rewritten to work with this version.
  275. The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
  276. ## 5.7.3 (2018-09-10)
  277. ### Bug fixes
  278. Fix failure to tokenize regexps after expressions like `x.of`.
  279. Better error message for unterminated template literals.
  280. ## 5.7.2 (2018-08-24)
  281. ### Bug fixes
  282. Properly handle `allowAwaitOutsideFunction` in for statements.
  283. Treat function declarations at the top level of modules like let bindings.
  284. Don't allow async function declarations as the only statement under a label.
  285. ## 5.7.0 (2018-06-15)
  286. ### New features
  287. Upgraded to Unicode 11.
  288. ## 5.6.0 (2018-05-31)
  289. ### New features
  290. Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
  291. Allow binding-less catch statements when ECMAVersion >= 10.
  292. Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
  293. ## 5.5.3 (2018-03-08)
  294. ### Bug fixes
  295. A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
  296. ## 5.5.2 (2018-03-08)
  297. ### Bug fixes
  298. 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.
  299. ## 5.5.1 (2018-03-06)
  300. ### Bug fixes
  301. Fix misleading error message for octal escapes in template strings.
  302. ## 5.5.0 (2018-02-27)
  303. ### New features
  304. The identifier character categorization is now based on Unicode version 10.
  305. Acorn will now validate the content of regular expressions, including new ES9 features.
  306. ## 5.4.0 (2018-02-01)
  307. ### Bug fixes
  308. Disallow duplicate or escaped flags on regular expressions.
  309. Disallow octal escapes in strings in strict mode.
  310. ### New features
  311. Add support for async iteration.
  312. Add support for object spread and rest.
  313. ## 5.3.0 (2017-12-28)
  314. ### Bug fixes
  315. Fix parsing of floating point literals with leading zeroes in loose mode.
  316. Allow duplicate property names in object patterns.
  317. Don't allow static class methods named `prototype`.
  318. Disallow async functions directly under `if` or `else`.
  319. Parse right-hand-side of `for`/`of` as an assignment expression.
  320. Stricter parsing of `for`/`in`.
  321. Don't allow unicode escapes in contextual keywords.
  322. ### New features
  323. Parsing class members was factored into smaller methods to allow plugins to hook into it.
  324. ## 5.2.1 (2017-10-30)
  325. ### Bug fixes
  326. Fix a token context corruption bug.
  327. ## 5.2.0 (2017-10-30)
  328. ### Bug fixes
  329. Fix token context tracking for `class` and `function` in property-name position.
  330. Make sure `%*` isn't parsed as a valid operator.
  331. Allow shorthand properties `get` and `set` to be followed by default values.
  332. Disallow `super` when not in callee or object position.
  333. ### New features
  334. Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
  335. ## 5.1.2 (2017-09-04)
  336. ### Bug fixes
  337. Disable parsing of legacy HTML-style comments in modules.
  338. Fix parsing of async methods whose names are keywords.
  339. ## 5.1.1 (2017-07-06)
  340. ### Bug fixes
  341. Fix problem with disambiguating regexp and division after a class.
  342. ## 5.1.0 (2017-07-05)
  343. ### Bug fixes
  344. Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
  345. Parse zero-prefixed numbers with non-octal digits as decimal.
  346. Allow object/array patterns in rest parameters.
  347. Don't error when `yield` is used as a property name.
  348. Allow `async` as a shorthand object property.
  349. ### New features
  350. Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
  351. ## 5.0.3 (2017-04-01)
  352. ### Bug fixes
  353. Fix spurious duplicate variable definition errors for named functions.
  354. ## 5.0.2 (2017-03-30)
  355. ### Bug fixes
  356. A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
  357. ## 5.0.0 (2017-03-28)
  358. ### Bug fixes
  359. Raise an error for duplicated lexical bindings.
  360. Fix spurious error when an assignement expression occurred after a spread expression.
  361. Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
  362. Allow labels in front or `var` declarations, even in strict mode.
  363. ### Breaking changes
  364. 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`.
  365. ## 4.0.11 (2017-02-07)
  366. ### Bug fixes
  367. Allow all forms of member expressions to be parenthesized as lvalue.
  368. ## 4.0.10 (2017-02-07)
  369. ### Bug fixes
  370. Don't expect semicolons after default-exported functions or classes, even when they are expressions.
  371. Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
  372. ## 4.0.9 (2017-02-06)
  373. ### Bug fixes
  374. Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
  375. ## 4.0.8 (2017-02-03)
  376. ### Bug fixes
  377. Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
  378. ## 4.0.7 (2017-02-02)
  379. ### Bug fixes
  380. Accept invalidly rejected code like `(x).y = 2` again.
  381. Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
  382. ## 4.0.6 (2017-02-02)
  383. ### Bug fixes
  384. Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
  385. ## 4.0.5 (2017-02-02)
  386. ### Bug fixes
  387. Disallow parenthesized pattern expressions.
  388. Allow keywords as export names.
  389. Don't allow the `async` keyword to be parenthesized.
  390. Properly raise an error when a keyword contains a character escape.
  391. Allow `"use strict"` to appear after other string literal expressions.
  392. Disallow labeled declarations.
  393. ## 4.0.4 (2016-12-19)
  394. ### Bug fixes
  395. Fix crash when `export` was followed by a keyword that can't be
  396. exported.
  397. ## 4.0.3 (2016-08-16)
  398. ### Bug fixes
  399. Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
  400. Properly parse properties named `async` in ES2017 mode.
  401. Fix bug where reserved words were broken in ES2017 mode.
  402. ## 4.0.2 (2016-08-11)
  403. ### Bug fixes
  404. Don't ignore period or 'e' characters after octal numbers.
  405. Fix broken parsing for call expressions in default parameter values of arrow functions.
  406. ## 4.0.1 (2016-08-08)
  407. ### Bug fixes
  408. Fix false positives in duplicated export name errors.
  409. ## 4.0.0 (2016-08-07)
  410. ### Breaking changes
  411. The default `ecmaVersion` option value is now 7.
  412. A number of internal method signatures changed, so plugins might need to be updated.
  413. ### Bug fixes
  414. The parser now raises errors on duplicated export names.
  415. `arguments` and `eval` can now be used in shorthand properties.
  416. Duplicate parameter names in non-simple argument lists now always produce an error.
  417. ### New features
  418. The `ecmaVersion` option now also accepts year-style version numbers
  419. (2015, etc).
  420. Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
  421. Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
  422. ## 3.3.0 (2016-07-25)
  423. ### Bug fixes
  424. Fix bug in tokenizing of regexp operator after a function declaration.
  425. Fix parser crash when parsing an array pattern with a hole.
  426. ### New features
  427. Implement check against complex argument lists in functions that enable strict mode in ES7.
  428. ## 3.2.0 (2016-06-07)
  429. ### Bug fixes
  430. Improve handling of lack of unicode regexp support in host
  431. environment.
  432. Properly reject shorthand properties whose name is a keyword.
  433. ### New features
  434. Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
  435. ## 3.1.0 (2016-04-18)
  436. ### Bug fixes
  437. Properly tokenize the division operator directly after a function expression.
  438. Allow trailing comma in destructuring arrays.
  439. ## 3.0.4 (2016-02-25)
  440. ### Fixes
  441. Allow update expressions as left-hand-side of the ES7 exponential operator.
  442. ## 3.0.2 (2016-02-10)
  443. ### Fixes
  444. Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
  445. ## 3.0.0 (2016-02-10)
  446. ### Breaking changes
  447. The default value of the `ecmaVersion` option is now 6 (used to be 5).
  448. Support for comprehension syntax (which was dropped from the draft spec) has been removed.
  449. ### Fixes
  450. `let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
  451. A parenthesized class or function expression after `export default` is now parsed correctly.
  452. ### New features
  453. When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
  454. The identifier character ranges are now based on Unicode 8.0.0.
  455. Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
  456. ## 2.7.0 (2016-01-04)
  457. ### Fixes
  458. Stop allowing rest parameters in setters.
  459. Disallow `y` rexexp flag in ES5.
  460. Disallow `\00` and `\000` escapes in strict mode.
  461. Raise an error when an import name is a reserved word.
  462. ## 2.6.2 (2015-11-10)
  463. ### Fixes
  464. Don't crash when no options object is passed.
  465. ## 2.6.0 (2015-11-09)
  466. ### Fixes
  467. Add `await` as a reserved word in module sources.
  468. Disallow `yield` in a parameter default value for a generator.
  469. Forbid using a comma after a rest pattern in an array destructuring.
  470. ### New features
  471. Support parsing stdin in command-line tool.
  472. ## 2.5.0 (2015-10-27)
  473. ### Fixes
  474. Fix tokenizer support in the command-line tool.
  475. Stop allowing `new.target` outside of functions.
  476. Remove legacy `guard` and `guardedHandler` properties from try nodes.
  477. Stop allowing multiple `__proto__` properties on an object literal in strict mode.
  478. Don't allow rest parameters to be non-identifier patterns.
  479. Check for duplicate paramter names in arrow functions.