Debian Codegraph @

vendor/mck89/peast/doc/changelog.md

raw
1 Changelog
2 ==========
3
4 #### 1.17.4
5 * Fixed warning on PHP 8.5 when handling large numbers
6
7 #### 1.17.3
8 * Fixed compatibility with PHP 8.5
9
10 #### 1.17.2
11 * Fixed bug where `const` declarations were allowed without an initializer
12
13 #### 1.17.1
14 * Fixed bug where `continue` and `break` were allowed outside iteration and `break` statements
15
16 #### 1.17.0
17 * Implemented ES2025 parser with import attributes
18
19 #### 1.16.3
20 * Removed implicitly nullable parameter declarations for PHP 8.4 compatibility
21
22 #### 1.16.2
23 * Fixed bug where a regex that started with `/=` raised a syntax error
24
25 #### 1.16.1
26 * Fixed bug where, in some situations, scanner allowed invalid characters after a slash
27
28 #### 1.16.0
29 * Implemented ES2024 parser, no new syntax features have been introduced
30 * Fixed bug when parsing sequence expressions using older ES versions
31
32 #### 1.15.4
33 * Fixed rendering of `let` and `const` inside `switch` cases that always require brackets
34
35 #### 1.15.3
36 * Fixed rendering of `let` and `const` inside `if`, `for` and `while` that always require brackets
37
38 #### 1.15.2
39 * Fixed bug where async keyword was lost when rendering an object async method
40
41 #### 1.15.1
42 * Fixed bug on hashbang comment detection
43
44 #### 1.15.0
45 * Implemented ES2022 parser with hashbang comments
46
47 #### 1.14.0
48 * Implemented comments rendering
49
50 #### 1.13.11
51 * Fixed a case of conditional expression parsed as a wrong optional chain
52
53 #### 1.13.10
54 * Added support for php 8.1
55 * Fixed parsing of multiline template literals in return statements
56
57 #### 1.13.9
58 * Implemented parsing of arbitrary module namespace identifier names
59
60 #### 1.13.8
61 * Fixed identifiers bug introduced in the last release
62
63 #### 1.13.7
64 * Implemented parsing of top level await
65 * Implemented parsing of `#field in obj` syntax
66 * Implemented parsing of class static block
67 * Aligned invalid octal numbers checks to the specification
68 * __BC break__: identifier tokens' value now report their raw name, this means that unicode escape sequences are reported as they are written in the code, without converting them to their corresponding characters. Identifier nodes have a new property called `rawName` that contains their raw name, including unconverted unicode escape sequences, while the `name` property still contains the converted value as before. Renderer now prints `rawName` for identifiers to prevent automatic conversion of escaped keywords.
69
70 #### 1.13.6
71 * Fixed parsing of adjacent JSX expressions
72 * Implemented parsing of JSX fragments inside elements
73
74 #### 1.13.5
75 * Fixed parsing of `get` and `set` as property names and class fields
76 * Fixed parsing of dot after number with exponential notation
77
78 #### 1.13.4
79 * Fixed bug when parsing surrogate pairs in php 7.4+
80
81 #### 1.13.3
82 * Added support for surrogate pairs in strings and templates
83
84 #### 1.13.2
85 * Fixed bug when parsing spread operator inside objects returned by arrow functions
86
87 #### 1.13.1
88 * Major performance improvements to parsing and tokenization
89
90 #### 1.13.0
91 * Implemented ES2022 parser with class fields and private class methods
92
93 #### 1.12.0
94 * Added options array to Traverser constructor and shortcut method on nodes
95 * Added Query class
96
97 #### 1.11.0
98 * Implemented ES2021 parser with logical assignment operators and numeric separators
99
100 #### 1.10.4
101 * Implemented parsing of coalescing operator
102 * Implemented parsing of optional chaining
103 * Fixed bug when parsing a semicolon on a new line after break and continue statements
104
105 #### 1.10.3
106 * Implemented parsing of `import.meta` syntax
107 * Implemented parsing of BigIntLiteral as objects keys
108
109 #### 1.10.2
110 * Implemented parsing of `export * as ns from "source"` syntax
111 * Fixed Renderer so that it won't trust computed flag in MemberExpression if property is not an Identifier
112
113 #### 1.10.1
114 * Fixed parsing of semicolon after do-while statement
115
116 #### 1.10.0
117 * Implemented ES2020 parser with dynamic import and BigInt
118 * Implemented handling of UTF-8 and UTF-16 BOM when parsing the source
119 * Fixed wrong rendering of unary and update expressions inside binary expressions in compact mode
120 * __BC break__: major refactoring to delete all parsers except the base one and replace them with new Features classes that specify enabled parser features. This will remove duplicated code and makes the parser easier to extend with new features.
121
122 #### 1.9.4
123 * Handled invalid UTF-8 characters in the source code by throwing an exception or replacing them with a substitution character by setting the new strictEncoding option to false
124 * Fixed bug when rendering object properties with equal key and value
125
126 #### 1.9.3
127 * Fixed another bug when rendering nested "if" statements with Compact formatter
128
129 #### 1.9.2
130 * Fixed rendering of nested "if" statements with Compact formatter
131
132 #### 1.9.1
133 * Fixed rendering of arrow functions that generates invalid code
134
135 #### 1.9
136 * Added ES2019 parser
137
138 #### 1.8.1
139 * Fixed parsing of regular expressions by disabling scan errors inside them
140 * Added LSM utility class to handle correctly punctuators and strings stop characters
141
142 #### 1.8
143 * Implemented parsing of JSX syntax
144
145 #### 1.7
146 * Implemented missing features of es2018: object rest and spread, async generators and async iteration
147
148 #### 1.6
149 * Fixed a lot of bugs and now Peast is compatible with all the [ECMAScript official tests](https://github.com/tc39/test262) for the implemented features. You can test Peast against ECMAScript tests using the [peast-test262](https://github.com/mck89/peast-test262) repository.
150 * Added ES2018 parser
151
152 #### 1.5
153 * Enabled JSON serialization of nodes and tokens using json_encode()
154 * Added parsing and handling of comments
155
156 #### 1.4
157 * Since EcmaScript dropped support for ES(Number) in favour of ES(Year) versions:
158 * `ES6` namespace have been replaced by `ES2015`
159 * `Peast::ES2015` method have been added to Peast main class, `Peast::ES6` method still exists to preserve BC and calls `Peast::ES2015` internally
160 * `ES7` namespace have been replaced by `ES2016`
161 * `Peast::ES2016` method have been added to Peast main class, `Peast::ES7` method still exists to preserve BC and calls `Peast::ES2016` internally
162 * `Peast::latest` method have been added to Peast main class to allow parsing with the latest EcmaScript version implemented
163 * Added ES2017 parser
164
165 #### 1.3
166 * Refactored parser to make it more extensible
167 * More accurate parsing of identifiers
168 * Added parsing of HTML comments if source is not a module
169 * Added some validations:
170 * Disallowed legacy octal escape syntax (\07) in templates
171 * Disallowed legacy octal escape syntax (\07) in strings if strict mode
172 * Disallowed legacy octal syntax (077) for numbers if strict mode
173 * Disallowed `delete` followed by single identifiers in strict mode
174 * Disallowed labelled function declarations in strict mode
175 * Allowed `if (...) function () {}` syntax if not in strict mode
176 * __BC break__: removed Function_ and Class_ interfaces and traits and replaced them with abstract classes
177 * __BC break__: if sourceEncoding is not specified, the parser won't try to autodetect it, but will assume UTF-8
178 * __BC break__: Literal is now an abstract class that is extended by the new classes for literals: StringLiteral, NumericLiteral, BooleanLiteral and NullLiteral
179
180 #### 1.2
181 * Added Renderer class
182
183 #### 1.1
184 * Added Traverser class
185
186 #### 1.0
187 * First release with ES6 and ES7 parsers