source: imaps-frontend/node_modules/acorn/CHANGELOG.md@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 21.7 KB
Line 
1## 8.12.1 (2024-07-03)
2
3### Bug fixes
4
5Fix 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
11Support ES2025 duplicate capture group names in regular expressions.
12
13### Bug fixes
14
15Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error.
16
17Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name.
18
19Properly recognize \"use strict\" when preceded by a string with an escaped newline.
20
21Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors.
22
23Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled.
24
25Properly normalize line endings in raw strings of invalid template tokens.
26
27Properly track line numbers for escaped newlines in strings.
28
29Fix 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
35Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error.
36
37Make sure `onToken` get an `import` keyword token when parsing `import.meta`.
38
39Fix 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
45Fix 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
51Fix 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
57Fix 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
59Fix 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
63Upgrade to Unicode 15.1.
64
65Use a set of new, much more precise, TypeScript types.
66
67## 8.10.0 (2023-07-05)
68
69### New features
70
71Add a `checkPrivateFields` option that disables strict checking of private property use.
72
73## 8.9.0 (2023-06-16)
74
75### Bug fixes
76
77Forbid dynamic import after `new`, even when part of a member expression.
78
79### New features
80
81Add Unicode properties for ES2023.
82
83Add support for the `v` flag to regular expressions.
84
85## 8.8.2 (2023-01-23)
86
87### Bug fixes
88
89Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`.
90
91Fix an exception when passing no option object to `parse` or `new Parser`.
92
93Fix incorrect parse error on `if (0) let\n[astral identifier char]`.
94
95## 8.8.1 (2022-10-24)
96
97### Bug fixes
98
99Make type for `Comment` compatible with estree types.
100
101## 8.8.0 (2022-07-21)
102
103### Bug fixes
104
105Allow parentheses around spread args in destructuring object assignment.
106
107Fix 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
111Support hashbang comments by default in ECMAScript 2023 and later.
112
113## 8.7.1 (2021-04-26)
114
115### Bug fixes
116
117Stop handling `"use strict"` directives in ECMAScript versions before 5.
118
119Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked.
120
121Add missing type for `tokTypes`.
122
123## 8.7.0 (2021-12-27)
124
125### New features
126
127Support quoted export names.
128
129Upgrade to Unicode 14.
130
131Add support for Unicode 13 properties in regular expressions.
132
133### Bug fixes
134
135Use 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
141Fix 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
145Support class private fields with the `in` operator.
146
147## 8.5.0 (2021-09-06)
148
149### Bug fixes
150
151Improve context-dependent tokenization in a number of corner cases.
152
153Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number).
154
155Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators.
156
157Fix wrong end locations stored on SequenceExpression nodes.
158
159Implement restriction that `for`/`of` loop LHS can't start with `let`.
160
161### New features
162
163Add support for ES2022 class static blocks.
164
165Allow multiple input files to be passed to the CLI tool.
166
167## 8.4.1 (2021-06-24)
168
169### Bug fixes
170
171Fix 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
177A 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
183Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher.
184
185Add 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
191Fix spec conformity in corner case 'for await (async of ...)'.
192
193## 8.2.3 (2021-05-04)
194
195### Bug fixes
196
197Fix an issue where the library couldn't parse 'for (async of ...)'.
198
199Fix 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
205Fix 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
211Fix 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
217Add support for ES2022 class fields and private methods.
218
219## 8.1.1 (2021-04-12)
220
221### Various
222
223Stop shipping source maps in the NPM package.
224
225## 8.1.0 (2021-03-09)
226
227### Bug fixes
228
229Fix a spurious error in nested destructuring arrays.
230
231### New features
232
233Expose `allowAwaitOutsideFunction` in CLI interface.
234
235Make `allowImportExportAnywhere` also apply to `import.meta`.
236
237## 8.0.5 (2021-01-25)
238
239### Bug fixes
240
241Adjust 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
247Make `await x ** y` an error, following the spec.
248
249Fix potentially exponential regular expression.
250
251## 8.0.3 (2020-10-02)
252
253### Bug fixes
254
255Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`.
256
257## 8.0.2 (2020-09-30)
258
259### Bug fixes
260
261Make the TypeScript types reflect the current allowed values for `ecmaVersion`.
262
263Fix another regexp/division tokenizer issue.
264
265## 8.0.1 (2020-08-12)
266
267### Bug fixes
268
269Provide the correct value in the `version` export.
270
271## 8.0.0 (2020-08-12)
272
273### Bug fixes
274
275Disallow expressions like `(a = b) = c`.
276
277Make non-octal escape sequences a syntax error in strict mode.
278
279### New features
280
281The package can now be loaded directly as an ECMAScript module in node 13+.
282
283Update to the set of Unicode properties from ES2021.
284
285### Breaking changes
286
287The `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
289Some changes to method signatures that may be used by plugins.
290
291## 7.4.0 (2020-08-03)
292
293### New features
294
295Add support for logical assignment operators.
296
297Add support for numeric separators.
298
299## 7.3.1 (2020-06-11)
300
301### Bug fixes
302
303Make the string in the `version` export match the actual library version.
304
305## 7.3.0 (2020-06-11)
306
307### Bug fixes
308
309Fix 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
313Add support for optional chaining (`?.`).
314
315## 7.2.0 (2020-05-09)
316
317### Bug fixes
318
319Fix precedence issue in parsing of async arrow functions.
320
321### New features
322
323Add support for nullish coalescing.
324
325Add support for `import.meta`.
326
327Support `export * as ...` syntax.
328
329Upgrade to Unicode 13.
330
331## 6.4.1 (2020-03-09)
332
333### Bug fixes
334
335More carefully check for valid UTF16 surrogate pairs in regexp validator.
336
337## 7.1.1 (2020-03-01)
338
339### Bug fixes
340
341Treat `\8` and `\9` as invalid escapes in template strings.
342
343Allow unicode escapes in property names that are keywords.
344
345Don't error on an exponential operator expression as argument to `await`.
346
347More carefully check for valid UTF16 surrogate pairs in regexp validator.
348
349## 7.1.0 (2019-09-24)
350
351### Bug fixes
352
353Disallow trailing object literal commas when ecmaVersion is less than 5.
354
355### New features
356
357Add 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
363Changes 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
365Makes 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
377Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
378
379Fix 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
385Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
386
387Disallow binding `let` in patterns.
388
389### New features
390
391Support bigint syntax with `ecmaVersion` >= 11.
392
393Support dynamic `import` syntax with `ecmaVersion` >= 11.
394
395Upgrade to Unicode version 12.
396
397## 6.1.1 (2019-02-27)
398
399### Bug fixes
400
401Fix bug that caused parsing default exports of with names to fail.
402
403## 6.1.0 (2019-02-08)
404
405### Bug fixes
406
407Fix scope checking when redefining a `var` as a lexical binding.
408
409### New features
410
411Split 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
417Check that exported bindings are defined.
418
419Don't treat `\u180e` as a whitespace character.
420
421Check for duplicate parameter names in methods.
422
423Don't allow shorthand properties when they are generators or async methods.
424
425Forbid binding `await` in async arrow function's parameter list.
426
427## 6.0.6 (2019-01-30)
428
429### Bug fixes
430
431The content of class declarations and expressions is now always parsed in strict mode.
432
433Don't allow `let` or `const` to bind the variable name `let`.
434
435Treat class declarations as lexical.
436
437Don't allow a generator function declaration as the sole body of an `if` or `else`.
438
439Ignore `"use strict"` when after an empty statement.
440
441Allow string line continuations with special line terminator characters.
442
443Treat `for` bodies as part of the `for` scope when checking for conflicting bindings.
444
445Fix bug with parsing `yield` in a `for` loop initializer.
446
447Implement special cases around scope checking for functions.
448
449## 6.0.5 (2019-01-02)
450
451### Bug fixes
452
453Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type.
454
455Don't treat `let` as a keyword when the next token is `{` on the next line.
456
457Fix 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
463Further improvements to tokenizing regular expressions in corner cases.
464
465## 6.0.3 (2018-11-04)
466
467### Bug fixes
468
469Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression.
470
471Remove stray symlink in the package tarball.
472
473## 6.0.2 (2018-09-26)
474
475### Bug fixes
476
477Fix 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
483Fix wrong value in `version` export.
484
485## 6.0.0 (2018-09-14)
486
487### Bug fixes
488
489Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
490
491Forbid `new.target` in top-level arrow functions.
492
493Fix issue with parsing a regexp after `yield` in some contexts.
494
495### New features
496
497The package now comes with TypeScript definitions.
498
499### Breaking changes
500
501The default value of the `ecmaVersion` option is now 9 (2018).
502
503Plugins work differently, and will have to be rewritten to work with this version.
504
505The 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
511Fix failure to tokenize regexps after expressions like `x.of`.
512
513Better error message for unterminated template literals.
514
515## 5.7.2 (2018-08-24)
516
517### Bug fixes
518
519Properly handle `allowAwaitOutsideFunction` in for statements.
520
521Treat function declarations at the top level of modules like let bindings.
522
523Don'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
529Upgraded to Unicode 11.
530
531## 5.6.0 (2018-05-31)
532
533### New features
534
535Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
536
537Allow binding-less catch statements when ECMAVersion >= 10.
538
539Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
540
541## 5.5.3 (2018-03-08)
542
543### Bug fixes
544
545A _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
551A 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
557Fix misleading error message for octal escapes in template strings.
558
559## 5.5.0 (2018-02-27)
560
561### New features
562
563The identifier character categorization is now based on Unicode version 10.
564
565Acorn 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
571Disallow duplicate or escaped flags on regular expressions.
572
573Disallow octal escapes in strings in strict mode.
574
575### New features
576
577Add support for async iteration.
578
579Add support for object spread and rest.
580
581## 5.3.0 (2017-12-28)
582
583### Bug fixes
584
585Fix parsing of floating point literals with leading zeroes in loose mode.
586
587Allow duplicate property names in object patterns.
588
589Don't allow static class methods named `prototype`.
590
591Disallow async functions directly under `if` or `else`.
592
593Parse right-hand-side of `for`/`of` as an assignment expression.
594
595Stricter parsing of `for`/`in`.
596
597Don't allow unicode escapes in contextual keywords.
598
599### New features
600
601Parsing 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
607Fix a token context corruption bug.
608
609## 5.2.0 (2017-10-30)
610
611### Bug fixes
612
613Fix token context tracking for `class` and `function` in property-name position.
614
615Make sure `%*` isn't parsed as a valid operator.
616
617Allow shorthand properties `get` and `set` to be followed by default values.
618
619Disallow `super` when not in callee or object position.
620
621### New features
622
623Support [`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
629Disable parsing of legacy HTML-style comments in modules.
630
631Fix parsing of async methods whose names are keywords.
632
633## 5.1.1 (2017-07-06)
634
635### Bug fixes
636
637Fix problem with disambiguating regexp and division after a class.
638
639## 5.1.0 (2017-07-05)
640
641### Bug fixes
642
643Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
644
645Parse zero-prefixed numbers with non-octal digits as decimal.
646
647Allow object/array patterns in rest parameters.
648
649Don't error when `yield` is used as a property name.
650
651Allow `async` as a shorthand object property.
652
653### New features
654
655Implement 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
661Fix spurious duplicate variable definition errors for named functions.
662
663## 5.0.2 (2017-03-30)
664
665### Bug fixes
666
667A 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
673Raise an error for duplicated lexical bindings.
674
675Fix spurious error when an assignement expression occurred after a spread expression.
676
677Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
678
679Allow labels in front or `var` declarations, even in strict mode.
680
681### Breaking changes
682
683Parse 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
689Allow all forms of member expressions to be parenthesized as lvalue.
690
691## 4.0.10 (2017-02-07)
692
693### Bug fixes
694
695Don't expect semicolons after default-exported functions or classes, even when they are expressions.
696
697Check 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
703Fix 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
709Solve 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
715Accept invalidly rejected code like `(x).y = 2` again.
716
717Don'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
723Fix 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
729Disallow parenthesized pattern expressions.
730
731Allow keywords as export names.
732
733Don't allow the `async` keyword to be parenthesized.
734
735Properly raise an error when a keyword contains a character escape.
736
737Allow `"use strict"` to appear after other string literal expressions.
738
739Disallow labeled declarations.
740
741## 4.0.4 (2016-12-19)
742
743### Bug fixes
744
745Fix crash when `export` was followed by a keyword that can't be
746exported.
747
748## 4.0.3 (2016-08-16)
749
750### Bug fixes
751
752Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
753
754Properly parse properties named `async` in ES2017 mode.
755
756Fix bug where reserved words were broken in ES2017 mode.
757
758## 4.0.2 (2016-08-11)
759
760### Bug fixes
761
762Don't ignore period or 'e' characters after octal numbers.
763
764Fix 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
770Fix false positives in duplicated export name errors.
771
772## 4.0.0 (2016-08-07)
773
774### Breaking changes
775
776The default `ecmaVersion` option value is now 7.
777
778A number of internal method signatures changed, so plugins might need to be updated.
779
780### Bug fixes
781
782The parser now raises errors on duplicated export names.
783
784`arguments` and `eval` can now be used in shorthand properties.
785
786Duplicate parameter names in non-simple argument lists now always produce an error.
787
788### New features
789
790The `ecmaVersion` option now also accepts year-style version numbers
791(2015, etc).
792
793Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
794
795Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
796
797## 3.3.0 (2016-07-25)
798
799### Bug fixes
800
801Fix bug in tokenizing of regexp operator after a function declaration.
802
803Fix parser crash when parsing an array pattern with a hole.
804
805### New features
806
807Implement 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
813Improve handling of lack of unicode regexp support in host
814environment.
815
816Properly reject shorthand properties whose name is a keyword.
817
818### New features
819
820Visitors 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
826Properly tokenize the division operator directly after a function expression.
827
828Allow trailing comma in destructuring arrays.
829
830## 3.0.4 (2016-02-25)
831
832### Fixes
833
834Allow update expressions as left-hand-side of the ES7 exponential operator.
835
836## 3.0.2 (2016-02-10)
837
838### Fixes
839
840Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
841
842## 3.0.0 (2016-02-10)
843
844### Breaking changes
845
846The default value of the `ecmaVersion` option is now 6 (used to be 5).
847
848Support 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
854A parenthesized class or function expression after `export default` is now parsed correctly.
855
856### New features
857
858When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
859
860The identifier character ranges are now based on Unicode 8.0.0.
861
862Plugins 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
868Stop allowing rest parameters in setters.
869
870Disallow `y` rexexp flag in ES5.
871
872Disallow `\00` and `\000` escapes in strict mode.
873
874Raise an error when an import name is a reserved word.
875
876## 2.6.2 (2015-11-10)
877
878### Fixes
879
880Don't crash when no options object is passed.
881
882## 2.6.0 (2015-11-09)
883
884### Fixes
885
886Add `await` as a reserved word in module sources.
887
888Disallow `yield` in a parameter default value for a generator.
889
890Forbid using a comma after a rest pattern in an array destructuring.
891
892### New features
893
894Support parsing stdin in command-line tool.
895
896## 2.5.0 (2015-10-27)
897
898### Fixes
899
900Fix tokenizer support in the command-line tool.
901
902Stop allowing `new.target` outside of functions.
903
904Remove legacy `guard` and `guardedHandler` properties from try nodes.
905
906Stop allowing multiple `__proto__` properties on an object literal in strict mode.
907
908Don't allow rest parameters to be non-identifier patterns.
909
910Check for duplicate paramter names in arrow functions.
Note: See TracBrowser for help on using the repository browser.