1 | ## 8.12.1 (2024-07-03)
|
---|
2 |
|
---|
3 | ### Bug fixes
|
---|
4 |
|
---|
5 | Fix a regression that caused Acorn to no longer run on Node versions <8.10.
|
---|
6 |
|
---|
7 | ## 8.12.0 (2024-06-14)
|
---|
8 |
|
---|
9 | ### New features
|
---|
10 |
|
---|
11 | Support ES2025 duplicate capture group names in regular expressions.
|
---|
12 |
|
---|
13 | ### Bug fixes
|
---|
14 |
|
---|
15 | Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error.
|
---|
16 |
|
---|
17 | Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name.
|
---|
18 |
|
---|
19 | Properly recognize \"use strict\" when preceded by a string with an escaped newline.
|
---|
20 |
|
---|
21 | Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors.
|
---|
22 |
|
---|
23 | Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled.
|
---|
24 |
|
---|
25 | Properly normalize line endings in raw strings of invalid template tokens.
|
---|
26 |
|
---|
27 | Properly track line numbers for escaped newlines in strings.
|
---|
28 |
|
---|
29 | Fix a bug that broke line number accounting after a template literal with invalid escape sequences.
|
---|
30 |
|
---|
31 | ## 8.11.3 (2023-12-29)
|
---|
32 |
|
---|
33 | ### Bug fixes
|
---|
34 |
|
---|
35 | Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error.
|
---|
36 |
|
---|
37 | Make sure `onToken` get an `import` keyword token when parsing `import.meta`.
|
---|
38 |
|
---|
39 | Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes.
|
---|
40 |
|
---|
41 | ## 8.11.2 (2023-10-27)
|
---|
42 |
|
---|
43 | ### Bug fixes
|
---|
44 |
|
---|
45 | Fix a bug that caused regular expressions after colon tokens to not be properly tokenized in some circumstances.
|
---|
46 |
|
---|
47 | ## 8.11.1 (2023-10-26)
|
---|
48 |
|
---|
49 | ### Bug fixes
|
---|
50 |
|
---|
51 | Fix a regression where `onToken` would receive 'name' tokens for 'new' keyword tokens.
|
---|
52 |
|
---|
53 | ## 8.11.0 (2023-10-26)
|
---|
54 |
|
---|
55 | ### Bug fixes
|
---|
56 |
|
---|
57 | 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.
|
---|
58 |
|
---|
59 | 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.
|
---|
60 |
|
---|
61 | ### New features
|
---|
62 |
|
---|
63 | Upgrade to Unicode 15.1.
|
---|
64 |
|
---|
65 | Use a set of new, much more precise, TypeScript types.
|
---|
66 |
|
---|
67 | ## 8.10.0 (2023-07-05)
|
---|
68 |
|
---|
69 | ### New features
|
---|
70 |
|
---|
71 | Add a `checkPrivateFields` option that disables strict checking of private property use.
|
---|
72 |
|
---|
73 | ## 8.9.0 (2023-06-16)
|
---|
74 |
|
---|
75 | ### Bug fixes
|
---|
76 |
|
---|
77 | Forbid dynamic import after `new`, even when part of a member expression.
|
---|
78 |
|
---|
79 | ### New features
|
---|
80 |
|
---|
81 | Add Unicode properties for ES2023.
|
---|
82 |
|
---|
83 | Add support for the `v` flag to regular expressions.
|
---|
84 |
|
---|
85 | ## 8.8.2 (2023-01-23)
|
---|
86 |
|
---|
87 | ### Bug fixes
|
---|
88 |
|
---|
89 | Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`.
|
---|
90 |
|
---|
91 | Fix an exception when passing no option object to `parse` or `new Parser`.
|
---|
92 |
|
---|
93 | Fix incorrect parse error on `if (0) let\n[astral identifier char]`.
|
---|
94 |
|
---|
95 | ## 8.8.1 (2022-10-24)
|
---|
96 |
|
---|
97 | ### Bug fixes
|
---|
98 |
|
---|
99 | Make type for `Comment` compatible with estree types.
|
---|
100 |
|
---|
101 | ## 8.8.0 (2022-07-21)
|
---|
102 |
|
---|
103 | ### Bug fixes
|
---|
104 |
|
---|
105 | Allow parentheses around spread args in destructuring object assignment.
|
---|
106 |
|
---|
107 | Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them.
|
---|
108 |
|
---|
109 | ### New features
|
---|
110 |
|
---|
111 | Support hashbang comments by default in ECMAScript 2023 and later.
|
---|
112 |
|
---|
113 | ## 8.7.1 (2021-04-26)
|
---|
114 |
|
---|
115 | ### Bug fixes
|
---|
116 |
|
---|
117 | Stop handling `"use strict"` directives in ECMAScript versions before 5.
|
---|
118 |
|
---|
119 | Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked.
|
---|
120 |
|
---|
121 | Add missing type for `tokTypes`.
|
---|
122 |
|
---|
123 | ## 8.7.0 (2021-12-27)
|
---|
124 |
|
---|
125 | ### New features
|
---|
126 |
|
---|
127 | Support quoted export names.
|
---|
128 |
|
---|
129 | Upgrade to Unicode 14.
|
---|
130 |
|
---|
131 | Add support for Unicode 13 properties in regular expressions.
|
---|
132 |
|
---|
133 | ### Bug fixes
|
---|
134 |
|
---|
135 | 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.
|
---|
136 |
|
---|
137 | ## 8.6.0 (2021-11-18)
|
---|
138 |
|
---|
139 | ### Bug fixes
|
---|
140 |
|
---|
141 | Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment.
|
---|
142 |
|
---|
143 | ### New features
|
---|
144 |
|
---|
145 | Support class private fields with the `in` operator.
|
---|
146 |
|
---|
147 | ## 8.5.0 (2021-09-06)
|
---|
148 |
|
---|
149 | ### Bug fixes
|
---|
150 |
|
---|
151 | Improve context-dependent tokenization in a number of corner cases.
|
---|
152 |
|
---|
153 | Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number).
|
---|
154 |
|
---|
155 | Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators.
|
---|
156 |
|
---|
157 | Fix wrong end locations stored on SequenceExpression nodes.
|
---|
158 |
|
---|
159 | Implement restriction that `for`/`of` loop LHS can't start with `let`.
|
---|
160 |
|
---|
161 | ### New features
|
---|
162 |
|
---|
163 | Add support for ES2022 class static blocks.
|
---|
164 |
|
---|
165 | Allow multiple input files to be passed to the CLI tool.
|
---|
166 |
|
---|
167 | ## 8.4.1 (2021-06-24)
|
---|
168 |
|
---|
169 | ### Bug fixes
|
---|
170 |
|
---|
171 | 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.
|
---|
172 |
|
---|
173 | ## 8.4.0 (2021-06-11)
|
---|
174 |
|
---|
175 | ### New features
|
---|
176 |
|
---|
177 | A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context.
|
---|
178 |
|
---|
179 | ## 8.3.0 (2021-05-31)
|
---|
180 |
|
---|
181 | ### New features
|
---|
182 |
|
---|
183 | Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher.
|
---|
184 |
|
---|
185 | Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag.
|
---|
186 |
|
---|
187 | ## 8.2.4 (2021-05-04)
|
---|
188 |
|
---|
189 | ### Bug fixes
|
---|
190 |
|
---|
191 | Fix spec conformity in corner case 'for await (async of ...)'.
|
---|
192 |
|
---|
193 | ## 8.2.3 (2021-05-04)
|
---|
194 |
|
---|
195 | ### Bug fixes
|
---|
196 |
|
---|
197 | Fix an issue where the library couldn't parse 'for (async of ...)'.
|
---|
198 |
|
---|
199 | Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances.
|
---|
200 |
|
---|
201 | ## 8.2.2 (2021-04-29)
|
---|
202 |
|
---|
203 | ### Bug fixes
|
---|
204 |
|
---|
205 | 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.
|
---|
206 |
|
---|
207 | ## 8.2.1 (2021-04-24)
|
---|
208 |
|
---|
209 | ### Bug fixes
|
---|
210 |
|
---|
211 | Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse.
|
---|
212 |
|
---|
213 | ## 8.2.0 (2021-04-24)
|
---|
214 |
|
---|
215 | ### New features
|
---|
216 |
|
---|
217 | Add support for ES2022 class fields and private methods.
|
---|
218 |
|
---|
219 | ## 8.1.1 (2021-04-12)
|
---|
220 |
|
---|
221 | ### Various
|
---|
222 |
|
---|
223 | Stop shipping source maps in the NPM package.
|
---|
224 |
|
---|
225 | ## 8.1.0 (2021-03-09)
|
---|
226 |
|
---|
227 | ### Bug fixes
|
---|
228 |
|
---|
229 | Fix a spurious error in nested destructuring arrays.
|
---|
230 |
|
---|
231 | ### New features
|
---|
232 |
|
---|
233 | Expose `allowAwaitOutsideFunction` in CLI interface.
|
---|
234 |
|
---|
235 | Make `allowImportExportAnywhere` also apply to `import.meta`.
|
---|
236 |
|
---|
237 | ## 8.0.5 (2021-01-25)
|
---|
238 |
|
---|
239 | ### Bug fixes
|
---|
240 |
|
---|
241 | Adjust package.json to work with Node 12.16.0 and 13.0-13.6.
|
---|
242 |
|
---|
243 | ## 8.0.4 (2020-10-05)
|
---|
244 |
|
---|
245 | ### Bug fixes
|
---|
246 |
|
---|
247 | Make `await x ** y` an error, following the spec.
|
---|
248 |
|
---|
249 | Fix potentially exponential regular expression.
|
---|
250 |
|
---|
251 | ## 8.0.3 (2020-10-02)
|
---|
252 |
|
---|
253 | ### Bug fixes
|
---|
254 |
|
---|
255 | Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`.
|
---|
256 |
|
---|
257 | ## 8.0.2 (2020-09-30)
|
---|
258 |
|
---|
259 | ### Bug fixes
|
---|
260 |
|
---|
261 | Make the TypeScript types reflect the current allowed values for `ecmaVersion`.
|
---|
262 |
|
---|
263 | Fix another regexp/division tokenizer issue.
|
---|
264 |
|
---|
265 | ## 8.0.1 (2020-08-12)
|
---|
266 |
|
---|
267 | ### Bug fixes
|
---|
268 |
|
---|
269 | Provide the correct value in the `version` export.
|
---|
270 |
|
---|
271 | ## 8.0.0 (2020-08-12)
|
---|
272 |
|
---|
273 | ### Bug fixes
|
---|
274 |
|
---|
275 | Disallow expressions like `(a = b) = c`.
|
---|
276 |
|
---|
277 | Make non-octal escape sequences a syntax error in strict mode.
|
---|
278 |
|
---|
279 | ### New features
|
---|
280 |
|
---|
281 | The package can now be loaded directly as an ECMAScript module in node 13+.
|
---|
282 |
|
---|
283 | Update to the set of Unicode properties from ES2021.
|
---|
284 |
|
---|
285 | ### Breaking changes
|
---|
286 |
|
---|
287 | 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.
|
---|
288 |
|
---|
289 | Some changes to method signatures that may be used by plugins.
|
---|
290 |
|
---|
291 | ## 7.4.0 (2020-08-03)
|
---|
292 |
|
---|
293 | ### New features
|
---|
294 |
|
---|
295 | Add support for logical assignment operators.
|
---|
296 |
|
---|
297 | Add support for numeric separators.
|
---|
298 |
|
---|
299 | ## 7.3.1 (2020-06-11)
|
---|
300 |
|
---|
301 | ### Bug fixes
|
---|
302 |
|
---|
303 | Make the string in the `version` export match the actual library version.
|
---|
304 |
|
---|
305 | ## 7.3.0 (2020-06-11)
|
---|
306 |
|
---|
307 | ### Bug fixes
|
---|
308 |
|
---|
309 | Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail.
|
---|
310 |
|
---|
311 | ### New features
|
---|
312 |
|
---|
313 | Add support for optional chaining (`?.`).
|
---|
314 |
|
---|
315 | ## 7.2.0 (2020-05-09)
|
---|
316 |
|
---|
317 | ### Bug fixes
|
---|
318 |
|
---|
319 | Fix precedence issue in parsing of async arrow functions.
|
---|
320 |
|
---|
321 | ### New features
|
---|
322 |
|
---|
323 | Add support for nullish coalescing.
|
---|
324 |
|
---|
325 | Add support for `import.meta`.
|
---|
326 |
|
---|
327 | Support `export * as ...` syntax.
|
---|
328 |
|
---|
329 | Upgrade to Unicode 13.
|
---|
330 |
|
---|
331 | ## 6.4.1 (2020-03-09)
|
---|
332 |
|
---|
333 | ### Bug fixes
|
---|
334 |
|
---|
335 | More carefully check for valid UTF16 surrogate pairs in regexp validator.
|
---|
336 |
|
---|
337 | ## 7.1.1 (2020-03-01)
|
---|
338 |
|
---|
339 | ### Bug fixes
|
---|
340 |
|
---|
341 | Treat `\8` and `\9` as invalid escapes in template strings.
|
---|
342 |
|
---|
343 | Allow unicode escapes in property names that are keywords.
|
---|
344 |
|
---|
345 | Don't error on an exponential operator expression as argument to `await`.
|
---|
346 |
|
---|
347 | More carefully check for valid UTF16 surrogate pairs in regexp validator.
|
---|
348 |
|
---|
349 | ## 7.1.0 (2019-09-24)
|
---|
350 |
|
---|
351 | ### Bug fixes
|
---|
352 |
|
---|
353 | Disallow trailing object literal commas when ecmaVersion is less than 5.
|
---|
354 |
|
---|
355 | ### New features
|
---|
356 |
|
---|
357 | 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.
|
---|
358 |
|
---|
359 | ## 7.0.0 (2019-08-13)
|
---|
360 |
|
---|
361 | ### Breaking changes
|
---|
362 |
|
---|
363 | 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).
|
---|
364 |
|
---|
365 | Makes 10 (ES2019) the default value for the `ecmaVersion` option.
|
---|
366 |
|
---|
367 | ## 6.3.0 (2019-08-12)
|
---|
368 |
|
---|
369 | ### New features
|
---|
370 |
|
---|
371 | `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.
|
---|
372 |
|
---|
373 | ## 6.2.1 (2019-07-21)
|
---|
374 |
|
---|
375 | ### Bug fixes
|
---|
376 |
|
---|
377 | Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
|
---|
378 |
|
---|
379 | Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances.
|
---|
380 |
|
---|
381 | ## 6.2.0 (2019-07-04)
|
---|
382 |
|
---|
383 | ### Bug fixes
|
---|
384 |
|
---|
385 | Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
|
---|
386 |
|
---|
387 | Disallow binding `let` in patterns.
|
---|
388 |
|
---|
389 | ### New features
|
---|
390 |
|
---|
391 | Support bigint syntax with `ecmaVersion` >= 11.
|
---|
392 |
|
---|
393 | Support dynamic `import` syntax with `ecmaVersion` >= 11.
|
---|
394 |
|
---|
395 | Upgrade to Unicode version 12.
|
---|
396 |
|
---|
397 | ## 6.1.1 (2019-02-27)
|
---|
398 |
|
---|
399 | ### Bug fixes
|
---|
400 |
|
---|
401 | Fix bug that caused parsing default exports of with names to fail.
|
---|
402 |
|
---|
403 | ## 6.1.0 (2019-02-08)
|
---|
404 |
|
---|
405 | ### Bug fixes
|
---|
406 |
|
---|
407 | Fix scope checking when redefining a `var` as a lexical binding.
|
---|
408 |
|
---|
409 | ### New features
|
---|
410 |
|
---|
411 | Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins.
|
---|
412 |
|
---|
413 | ## 6.0.7 (2019-02-04)
|
---|
414 |
|
---|
415 | ### Bug fixes
|
---|
416 |
|
---|
417 | Check that exported bindings are defined.
|
---|
418 |
|
---|
419 | Don't treat `\u180e` as a whitespace character.
|
---|
420 |
|
---|
421 | Check for duplicate parameter names in methods.
|
---|
422 |
|
---|
423 | Don't allow shorthand properties when they are generators or async methods.
|
---|
424 |
|
---|
425 | Forbid binding `await` in async arrow function's parameter list.
|
---|
426 |
|
---|
427 | ## 6.0.6 (2019-01-30)
|
---|
428 |
|
---|
429 | ### Bug fixes
|
---|
430 |
|
---|
431 | The content of class declarations and expressions is now always parsed in strict mode.
|
---|
432 |
|
---|
433 | Don't allow `let` or `const` to bind the variable name `let`.
|
---|
434 |
|
---|
435 | Treat class declarations as lexical.
|
---|
436 |
|
---|
437 | Don't allow a generator function declaration as the sole body of an `if` or `else`.
|
---|
438 |
|
---|
439 | Ignore `"use strict"` when after an empty statement.
|
---|
440 |
|
---|
441 | Allow string line continuations with special line terminator characters.
|
---|
442 |
|
---|
443 | Treat `for` bodies as part of the `for` scope when checking for conflicting bindings.
|
---|
444 |
|
---|
445 | Fix bug with parsing `yield` in a `for` loop initializer.
|
---|
446 |
|
---|
447 | Implement special cases around scope checking for functions.
|
---|
448 |
|
---|
449 | ## 6.0.5 (2019-01-02)
|
---|
450 |
|
---|
451 | ### Bug fixes
|
---|
452 |
|
---|
453 | Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type.
|
---|
454 |
|
---|
455 | Don't treat `let` as a keyword when the next token is `{` on the next line.
|
---|
456 |
|
---|
457 | Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on.
|
---|
458 |
|
---|
459 | ## 6.0.4 (2018-11-05)
|
---|
460 |
|
---|
461 | ### Bug fixes
|
---|
462 |
|
---|
463 | Further improvements to tokenizing regular expressions in corner cases.
|
---|
464 |
|
---|
465 | ## 6.0.3 (2018-11-04)
|
---|
466 |
|
---|
467 | ### Bug fixes
|
---|
468 |
|
---|
469 | Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression.
|
---|
470 |
|
---|
471 | Remove stray symlink in the package tarball.
|
---|
472 |
|
---|
473 | ## 6.0.2 (2018-09-26)
|
---|
474 |
|
---|
475 | ### Bug fixes
|
---|
476 |
|
---|
477 | Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
|
---|
478 |
|
---|
479 | ## 6.0.1 (2018-09-14)
|
---|
480 |
|
---|
481 | ### Bug fixes
|
---|
482 |
|
---|
483 | Fix wrong value in `version` export.
|
---|
484 |
|
---|
485 | ## 6.0.0 (2018-09-14)
|
---|
486 |
|
---|
487 | ### Bug fixes
|
---|
488 |
|
---|
489 | Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
|
---|
490 |
|
---|
491 | Forbid `new.target` in top-level arrow functions.
|
---|
492 |
|
---|
493 | Fix issue with parsing a regexp after `yield` in some contexts.
|
---|
494 |
|
---|
495 | ### New features
|
---|
496 |
|
---|
497 | The package now comes with TypeScript definitions.
|
---|
498 |
|
---|
499 | ### Breaking changes
|
---|
500 |
|
---|
501 | The default value of the `ecmaVersion` option is now 9 (2018).
|
---|
502 |
|
---|
503 | Plugins work differently, and will have to be rewritten to work with this version.
|
---|
504 |
|
---|
505 | The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
|
---|
506 |
|
---|
507 | ## 5.7.3 (2018-09-10)
|
---|
508 |
|
---|
509 | ### Bug fixes
|
---|
510 |
|
---|
511 | Fix failure to tokenize regexps after expressions like `x.of`.
|
---|
512 |
|
---|
513 | Better error message for unterminated template literals.
|
---|
514 |
|
---|
515 | ## 5.7.2 (2018-08-24)
|
---|
516 |
|
---|
517 | ### Bug fixes
|
---|
518 |
|
---|
519 | Properly handle `allowAwaitOutsideFunction` in for statements.
|
---|
520 |
|
---|
521 | Treat function declarations at the top level of modules like let bindings.
|
---|
522 |
|
---|
523 | Don't allow async function declarations as the only statement under a label.
|
---|
524 |
|
---|
525 | ## 5.7.0 (2018-06-15)
|
---|
526 |
|
---|
527 | ### New features
|
---|
528 |
|
---|
529 | Upgraded to Unicode 11.
|
---|
530 |
|
---|
531 | ## 5.6.0 (2018-05-31)
|
---|
532 |
|
---|
533 | ### New features
|
---|
534 |
|
---|
535 | Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
|
---|
536 |
|
---|
537 | Allow binding-less catch statements when ECMAVersion >= 10.
|
---|
538 |
|
---|
539 | Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
|
---|
540 |
|
---|
541 | ## 5.5.3 (2018-03-08)
|
---|
542 |
|
---|
543 | ### Bug fixes
|
---|
544 |
|
---|
545 | A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
|
---|
546 |
|
---|
547 | ## 5.5.2 (2018-03-08)
|
---|
548 |
|
---|
549 | ### Bug fixes
|
---|
550 |
|
---|
551 | 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.
|
---|
552 |
|
---|
553 | ## 5.5.1 (2018-03-06)
|
---|
554 |
|
---|
555 | ### Bug fixes
|
---|
556 |
|
---|
557 | Fix misleading error message for octal escapes in template strings.
|
---|
558 |
|
---|
559 | ## 5.5.0 (2018-02-27)
|
---|
560 |
|
---|
561 | ### New features
|
---|
562 |
|
---|
563 | The identifier character categorization is now based on Unicode version 10.
|
---|
564 |
|
---|
565 | Acorn will now validate the content of regular expressions, including new ES9 features.
|
---|
566 |
|
---|
567 | ## 5.4.0 (2018-02-01)
|
---|
568 |
|
---|
569 | ### Bug fixes
|
---|
570 |
|
---|
571 | Disallow duplicate or escaped flags on regular expressions.
|
---|
572 |
|
---|
573 | Disallow octal escapes in strings in strict mode.
|
---|
574 |
|
---|
575 | ### New features
|
---|
576 |
|
---|
577 | Add support for async iteration.
|
---|
578 |
|
---|
579 | Add support for object spread and rest.
|
---|
580 |
|
---|
581 | ## 5.3.0 (2017-12-28)
|
---|
582 |
|
---|
583 | ### Bug fixes
|
---|
584 |
|
---|
585 | Fix parsing of floating point literals with leading zeroes in loose mode.
|
---|
586 |
|
---|
587 | Allow duplicate property names in object patterns.
|
---|
588 |
|
---|
589 | Don't allow static class methods named `prototype`.
|
---|
590 |
|
---|
591 | Disallow async functions directly under `if` or `else`.
|
---|
592 |
|
---|
593 | Parse right-hand-side of `for`/`of` as an assignment expression.
|
---|
594 |
|
---|
595 | Stricter parsing of `for`/`in`.
|
---|
596 |
|
---|
597 | Don't allow unicode escapes in contextual keywords.
|
---|
598 |
|
---|
599 | ### New features
|
---|
600 |
|
---|
601 | Parsing class members was factored into smaller methods to allow plugins to hook into it.
|
---|
602 |
|
---|
603 | ## 5.2.1 (2017-10-30)
|
---|
604 |
|
---|
605 | ### Bug fixes
|
---|
606 |
|
---|
607 | Fix a token context corruption bug.
|
---|
608 |
|
---|
609 | ## 5.2.0 (2017-10-30)
|
---|
610 |
|
---|
611 | ### Bug fixes
|
---|
612 |
|
---|
613 | Fix token context tracking for `class` and `function` in property-name position.
|
---|
614 |
|
---|
615 | Make sure `%*` isn't parsed as a valid operator.
|
---|
616 |
|
---|
617 | Allow shorthand properties `get` and `set` to be followed by default values.
|
---|
618 |
|
---|
619 | Disallow `super` when not in callee or object position.
|
---|
620 |
|
---|
621 | ### New features
|
---|
622 |
|
---|
623 | Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
|
---|
624 |
|
---|
625 | ## 5.1.2 (2017-09-04)
|
---|
626 |
|
---|
627 | ### Bug fixes
|
---|
628 |
|
---|
629 | Disable parsing of legacy HTML-style comments in modules.
|
---|
630 |
|
---|
631 | Fix parsing of async methods whose names are keywords.
|
---|
632 |
|
---|
633 | ## 5.1.1 (2017-07-06)
|
---|
634 |
|
---|
635 | ### Bug fixes
|
---|
636 |
|
---|
637 | Fix problem with disambiguating regexp and division after a class.
|
---|
638 |
|
---|
639 | ## 5.1.0 (2017-07-05)
|
---|
640 |
|
---|
641 | ### Bug fixes
|
---|
642 |
|
---|
643 | Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
|
---|
644 |
|
---|
645 | Parse zero-prefixed numbers with non-octal digits as decimal.
|
---|
646 |
|
---|
647 | Allow object/array patterns in rest parameters.
|
---|
648 |
|
---|
649 | Don't error when `yield` is used as a property name.
|
---|
650 |
|
---|
651 | Allow `async` as a shorthand object property.
|
---|
652 |
|
---|
653 | ### New features
|
---|
654 |
|
---|
655 | Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
|
---|
656 |
|
---|
657 | ## 5.0.3 (2017-04-01)
|
---|
658 |
|
---|
659 | ### Bug fixes
|
---|
660 |
|
---|
661 | Fix spurious duplicate variable definition errors for named functions.
|
---|
662 |
|
---|
663 | ## 5.0.2 (2017-03-30)
|
---|
664 |
|
---|
665 | ### Bug fixes
|
---|
666 |
|
---|
667 | A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
|
---|
668 |
|
---|
669 | ## 5.0.0 (2017-03-28)
|
---|
670 |
|
---|
671 | ### Bug fixes
|
---|
672 |
|
---|
673 | Raise an error for duplicated lexical bindings.
|
---|
674 |
|
---|
675 | Fix spurious error when an assignement expression occurred after a spread expression.
|
---|
676 |
|
---|
677 | Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
|
---|
678 |
|
---|
679 | Allow labels in front or `var` declarations, even in strict mode.
|
---|
680 |
|
---|
681 | ### Breaking changes
|
---|
682 |
|
---|
683 | 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`.
|
---|
684 |
|
---|
685 | ## 4.0.11 (2017-02-07)
|
---|
686 |
|
---|
687 | ### Bug fixes
|
---|
688 |
|
---|
689 | Allow all forms of member expressions to be parenthesized as lvalue.
|
---|
690 |
|
---|
691 | ## 4.0.10 (2017-02-07)
|
---|
692 |
|
---|
693 | ### Bug fixes
|
---|
694 |
|
---|
695 | Don't expect semicolons after default-exported functions or classes, even when they are expressions.
|
---|
696 |
|
---|
697 | Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
|
---|
698 |
|
---|
699 | ## 4.0.9 (2017-02-06)
|
---|
700 |
|
---|
701 | ### Bug fixes
|
---|
702 |
|
---|
703 | Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
|
---|
704 |
|
---|
705 | ## 4.0.8 (2017-02-03)
|
---|
706 |
|
---|
707 | ### Bug fixes
|
---|
708 |
|
---|
709 | Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
|
---|
710 |
|
---|
711 | ## 4.0.7 (2017-02-02)
|
---|
712 |
|
---|
713 | ### Bug fixes
|
---|
714 |
|
---|
715 | Accept invalidly rejected code like `(x).y = 2` again.
|
---|
716 |
|
---|
717 | Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
|
---|
718 |
|
---|
719 | ## 4.0.6 (2017-02-02)
|
---|
720 |
|
---|
721 | ### Bug fixes
|
---|
722 |
|
---|
723 | Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
|
---|
724 |
|
---|
725 | ## 4.0.5 (2017-02-02)
|
---|
726 |
|
---|
727 | ### Bug fixes
|
---|
728 |
|
---|
729 | Disallow parenthesized pattern expressions.
|
---|
730 |
|
---|
731 | Allow keywords as export names.
|
---|
732 |
|
---|
733 | Don't allow the `async` keyword to be parenthesized.
|
---|
734 |
|
---|
735 | Properly raise an error when a keyword contains a character escape.
|
---|
736 |
|
---|
737 | Allow `"use strict"` to appear after other string literal expressions.
|
---|
738 |
|
---|
739 | Disallow labeled declarations.
|
---|
740 |
|
---|
741 | ## 4.0.4 (2016-12-19)
|
---|
742 |
|
---|
743 | ### Bug fixes
|
---|
744 |
|
---|
745 | Fix crash when `export` was followed by a keyword that can't be
|
---|
746 | exported.
|
---|
747 |
|
---|
748 | ## 4.0.3 (2016-08-16)
|
---|
749 |
|
---|
750 | ### Bug fixes
|
---|
751 |
|
---|
752 | Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
|
---|
753 |
|
---|
754 | Properly parse properties named `async` in ES2017 mode.
|
---|
755 |
|
---|
756 | Fix bug where reserved words were broken in ES2017 mode.
|
---|
757 |
|
---|
758 | ## 4.0.2 (2016-08-11)
|
---|
759 |
|
---|
760 | ### Bug fixes
|
---|
761 |
|
---|
762 | Don't ignore period or 'e' characters after octal numbers.
|
---|
763 |
|
---|
764 | Fix broken parsing for call expressions in default parameter values of arrow functions.
|
---|
765 |
|
---|
766 | ## 4.0.1 (2016-08-08)
|
---|
767 |
|
---|
768 | ### Bug fixes
|
---|
769 |
|
---|
770 | Fix false positives in duplicated export name errors.
|
---|
771 |
|
---|
772 | ## 4.0.0 (2016-08-07)
|
---|
773 |
|
---|
774 | ### Breaking changes
|
---|
775 |
|
---|
776 | The default `ecmaVersion` option value is now 7.
|
---|
777 |
|
---|
778 | A number of internal method signatures changed, so plugins might need to be updated.
|
---|
779 |
|
---|
780 | ### Bug fixes
|
---|
781 |
|
---|
782 | The parser now raises errors on duplicated export names.
|
---|
783 |
|
---|
784 | `arguments` and `eval` can now be used in shorthand properties.
|
---|
785 |
|
---|
786 | Duplicate parameter names in non-simple argument lists now always produce an error.
|
---|
787 |
|
---|
788 | ### New features
|
---|
789 |
|
---|
790 | The `ecmaVersion` option now also accepts year-style version numbers
|
---|
791 | (2015, etc).
|
---|
792 |
|
---|
793 | Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
|
---|
794 |
|
---|
795 | Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
|
---|
796 |
|
---|
797 | ## 3.3.0 (2016-07-25)
|
---|
798 |
|
---|
799 | ### Bug fixes
|
---|
800 |
|
---|
801 | Fix bug in tokenizing of regexp operator after a function declaration.
|
---|
802 |
|
---|
803 | Fix parser crash when parsing an array pattern with a hole.
|
---|
804 |
|
---|
805 | ### New features
|
---|
806 |
|
---|
807 | Implement check against complex argument lists in functions that enable strict mode in ES7.
|
---|
808 |
|
---|
809 | ## 3.2.0 (2016-06-07)
|
---|
810 |
|
---|
811 | ### Bug fixes
|
---|
812 |
|
---|
813 | Improve handling of lack of unicode regexp support in host
|
---|
814 | environment.
|
---|
815 |
|
---|
816 | Properly reject shorthand properties whose name is a keyword.
|
---|
817 |
|
---|
818 | ### New features
|
---|
819 |
|
---|
820 | Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
|
---|
821 |
|
---|
822 | ## 3.1.0 (2016-04-18)
|
---|
823 |
|
---|
824 | ### Bug fixes
|
---|
825 |
|
---|
826 | Properly tokenize the division operator directly after a function expression.
|
---|
827 |
|
---|
828 | Allow trailing comma in destructuring arrays.
|
---|
829 |
|
---|
830 | ## 3.0.4 (2016-02-25)
|
---|
831 |
|
---|
832 | ### Fixes
|
---|
833 |
|
---|
834 | Allow update expressions as left-hand-side of the ES7 exponential operator.
|
---|
835 |
|
---|
836 | ## 3.0.2 (2016-02-10)
|
---|
837 |
|
---|
838 | ### Fixes
|
---|
839 |
|
---|
840 | Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
|
---|
841 |
|
---|
842 | ## 3.0.0 (2016-02-10)
|
---|
843 |
|
---|
844 | ### Breaking changes
|
---|
845 |
|
---|
846 | The default value of the `ecmaVersion` option is now 6 (used to be 5).
|
---|
847 |
|
---|
848 | Support for comprehension syntax (which was dropped from the draft spec) has been removed.
|
---|
849 |
|
---|
850 | ### Fixes
|
---|
851 |
|
---|
852 | `let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
|
---|
853 |
|
---|
854 | A parenthesized class or function expression after `export default` is now parsed correctly.
|
---|
855 |
|
---|
856 | ### New features
|
---|
857 |
|
---|
858 | When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
|
---|
859 |
|
---|
860 | The identifier character ranges are now based on Unicode 8.0.0.
|
---|
861 |
|
---|
862 | Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
|
---|
863 |
|
---|
864 | ## 2.7.0 (2016-01-04)
|
---|
865 |
|
---|
866 | ### Fixes
|
---|
867 |
|
---|
868 | Stop allowing rest parameters in setters.
|
---|
869 |
|
---|
870 | Disallow `y` rexexp flag in ES5.
|
---|
871 |
|
---|
872 | Disallow `\00` and `\000` escapes in strict mode.
|
---|
873 |
|
---|
874 | Raise an error when an import name is a reserved word.
|
---|
875 |
|
---|
876 | ## 2.6.2 (2015-11-10)
|
---|
877 |
|
---|
878 | ### Fixes
|
---|
879 |
|
---|
880 | Don't crash when no options object is passed.
|
---|
881 |
|
---|
882 | ## 2.6.0 (2015-11-09)
|
---|
883 |
|
---|
884 | ### Fixes
|
---|
885 |
|
---|
886 | Add `await` as a reserved word in module sources.
|
---|
887 |
|
---|
888 | Disallow `yield` in a parameter default value for a generator.
|
---|
889 |
|
---|
890 | Forbid using a comma after a rest pattern in an array destructuring.
|
---|
891 |
|
---|
892 | ### New features
|
---|
893 |
|
---|
894 | Support parsing stdin in command-line tool.
|
---|
895 |
|
---|
896 | ## 2.5.0 (2015-10-27)
|
---|
897 |
|
---|
898 | ### Fixes
|
---|
899 |
|
---|
900 | Fix tokenizer support in the command-line tool.
|
---|
901 |
|
---|
902 | Stop allowing `new.target` outside of functions.
|
---|
903 |
|
---|
904 | Remove legacy `guard` and `guardedHandler` properties from try nodes.
|
---|
905 |
|
---|
906 | Stop allowing multiple `__proto__` properties on an object literal in strict mode.
|
---|
907 |
|
---|
908 | Don't allow rest parameters to be non-identifier patterns.
|
---|
909 |
|
---|
910 | Check for duplicate paramter names in arrow functions.
|
---|