Do our own HTML escaping using replace(), makes the escaping less aggressive
[jst.git] / CHANGELOG.md
1 ## 6.0.2 (2018-09-26)
2
3 ### Bug fixes
4
5 Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
6
7 ## 6.0.1 (2018-09-14)
8
9 ### Bug fixes
10
11 Fix wrong value in `version` export.
12
13 ## 6.0.0 (2018-09-14)
14
15 ### Bug fixes
16
17 Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
18
19 Forbid `new.target` in top-level arrow functions.
20
21 Fix issue with parsing a regexp after `yield` in some contexts.
22
23 ### New features
24
25 The package now comes with TypeScript definitions.
26
27 ### Breaking changes
28
29 The default value of the `ecmaVersion` option is now 9 (2018).
30
31 Plugins work differently, and will have to be rewritten to work with this version.
32
33 The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
34
35 ## 5.7.3 (2018-09-10)
36
37 ### Bug fixes
38
39 Fix failure to tokenize regexps after expressions like `x.of`.
40
41 Better error message for unterminated template literals.
42
43 ## 5.7.2 (2018-08-24)
44
45 ### Bug fixes
46
47 Properly handle `allowAwaitOutsideFunction` in for statements.
48
49 Treat function declarations at the top level of modules like let bindings.
50
51 Don't allow async function declarations as the only statement under a label.
52
53 ## 5.7.0 (2018-06-15)
54
55 ### New features
56
57 Upgraded to Unicode 11.
58
59 ## 5.6.0 (2018-05-31)
60
61 ### New features
62
63 Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
64
65 Allow binding-less catch statements when ECMAVersion >= 10.
66
67 Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
68
69 ## 5.5.3 (2018-03-08)
70
71 ### Bug fixes
72
73 A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
74
75 ## 5.5.2 (2018-03-08)
76
77 ### Bug fixes
78
79 A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
80
81 ## 5.5.1 (2018-03-06)
82
83 ### Bug fixes
84
85 Fix misleading error message for octal escapes in template strings.
86
87 ## 5.5.0 (2018-02-27)
88
89 ### New features
90
91 The identifier character categorization is now based on Unicode version 10.
92
93 Acorn will now validate the content of regular expressions, including new ES9 features.
94
95 ## 5.4.0 (2018-02-01)
96
97 ### Bug fixes
98
99 Disallow duplicate or escaped flags on regular expressions.
100
101 Disallow octal escapes in strings in strict mode.
102
103 ### New features
104
105 Add support for async iteration.
106
107 Add support for object spread and rest.
108
109 ## 5.3.0 (2017-12-28)
110
111 ### Bug fixes
112
113 Fix parsing of floating point literals with leading zeroes in loose mode.
114
115 Allow duplicate property names in object patterns.
116
117 Don't allow static class methods named `prototype`.
118
119 Disallow async functions directly under `if` or `else`.
120
121 Parse right-hand-side of `for`/`of` as an assignment expression.
122
123 Stricter parsing of `for`/`in`.
124
125 Don't allow unicode escapes in contextual keywords.
126
127 ### New features
128
129 Parsing class members was factored into smaller methods to allow plugins to hook into it.
130
131 ## 5.2.1 (2017-10-30)
132
133 ### Bug fixes
134
135 Fix a token context corruption bug.
136
137 ## 5.2.0 (2017-10-30)
138
139 ### Bug fixes
140
141 Fix token context tracking for `class` and `function` in property-name position.
142
143 Make sure `%*` isn't parsed as a valid operator.
144
145 Allow shorthand properties `get` and `set` to be followed by default values.
146
147 Disallow `super` when not in callee or object position.
148
149 ### New features
150
151 Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
152
153 ## 5.1.2 (2017-09-04)
154
155 ### Bug fixes
156
157 Disable parsing of legacy HTML-style comments in modules.
158
159 Fix parsing of async methods whose names are keywords.
160
161 ## 5.1.1 (2017-07-06)
162
163 ### Bug fixes
164
165 Fix problem with disambiguating regexp and division after a class.
166
167 ## 5.1.0 (2017-07-05)
168
169 ### Bug fixes
170
171 Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
172
173 Parse zero-prefixed numbers with non-octal digits as decimal.
174
175 Allow object/array patterns in rest parameters.
176
177 Don't error when `yield` is used as a property name.
178
179 Allow `async` as a shorthand object property.
180
181 ### New features
182
183 Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
184
185 ## 5.0.3 (2017-04-01)
186
187 ### Bug fixes
188
189 Fix spurious duplicate variable definition errors for named functions.
190
191 ## 5.0.2 (2017-03-30)
192
193 ### Bug fixes
194
195 A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
196
197 ## 5.0.0 (2017-03-28)
198
199 ### Bug fixes
200
201 Raise an error for duplicated lexical bindings.
202
203 Fix spurious error when an assignement expression occurred after a spread expression.
204
205 Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
206
207 Allow labels in front or `var` declarations, even in strict mode.
208
209 ### Breaking changes
210
211 Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`.
212
213 ## 4.0.11 (2017-02-07)
214
215 ### Bug fixes
216
217 Allow all forms of member expressions to be parenthesized as lvalue.
218
219 ## 4.0.10 (2017-02-07)
220
221 ### Bug fixes
222
223 Don't expect semicolons after default-exported functions or classes, even when they are expressions.
224
225 Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
226
227 ## 4.0.9 (2017-02-06)
228
229 ### Bug fixes
230
231 Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
232
233 ## 4.0.8 (2017-02-03)
234
235 ### Bug fixes
236
237 Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
238
239 ## 4.0.7 (2017-02-02)
240
241 ### Bug fixes
242
243 Accept invalidly rejected code like `(x).y = 2` again.
244
245 Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
246
247 ## 4.0.6 (2017-02-02)
248
249 ### Bug fixes
250
251 Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
252
253 ## 4.0.5 (2017-02-02)
254
255 ### Bug fixes
256
257 Disallow parenthesized pattern expressions.
258
259 Allow keywords as export names.
260
261 Don't allow the `async` keyword to be parenthesized.
262
263 Properly raise an error when a keyword contains a character escape.
264
265 Allow `"use strict"` to appear after other string literal expressions.
266
267 Disallow labeled declarations.
268
269 ## 4.0.4 (2016-12-19)
270
271 ### Bug fixes
272
273 Fix crash when `export` was followed by a keyword that can't be
274 exported.
275
276 ## 4.0.3 (2016-08-16)
277
278 ### Bug fixes
279
280 Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
281
282 Properly parse properties named `async` in ES2017 mode.
283
284 Fix bug where reserved words were broken in ES2017 mode.
285
286 ## 4.0.2 (2016-08-11)
287
288 ### Bug fixes
289
290 Don't ignore period or 'e' characters after octal numbers.
291
292 Fix broken parsing for call expressions in default parameter values of arrow functions.
293
294 ## 4.0.1 (2016-08-08)
295
296 ### Bug fixes
297
298 Fix false positives in duplicated export name errors.
299
300 ## 4.0.0 (2016-08-07)
301
302 ### Breaking changes
303
304 The default `ecmaVersion` option value is now 7.
305
306 A number of internal method signatures changed, so plugins might need to be updated.
307
308 ### Bug fixes
309
310 The parser now raises errors on duplicated export names.
311
312 `arguments` and `eval` can now be used in shorthand properties.
313
314 Duplicate parameter names in non-simple argument lists now always produce an error.
315
316 ### New features
317
318 The `ecmaVersion` option now also accepts year-style version numbers
319 (2015, etc).
320
321 Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
322
323 Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
324
325 ## 3.3.0 (2016-07-25)
326
327 ### Bug fixes
328
329 Fix bug in tokenizing of regexp operator after a function declaration.
330
331 Fix parser crash when parsing an array pattern with a hole.
332
333 ### New features
334
335 Implement check against complex argument lists in functions that enable strict mode in ES7.
336
337 ## 3.2.0 (2016-06-07)
338
339 ### Bug fixes
340
341 Improve handling of lack of unicode regexp support in host
342 environment.
343
344 Properly reject shorthand properties whose name is a keyword.
345
346 ### New features
347
348 Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
349
350 ## 3.1.0 (2016-04-18)
351
352 ### Bug fixes
353
354 Properly tokenize the division operator directly after a function expression.
355
356 Allow trailing comma in destructuring arrays.
357
358 ## 3.0.4 (2016-02-25)
359
360 ### Fixes
361
362 Allow update expressions as left-hand-side of the ES7 exponential operator.
363
364 ## 3.0.2 (2016-02-10)
365
366 ### Fixes
367
368 Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
369
370 ## 3.0.0 (2016-02-10)
371
372 ### Breaking changes
373
374 The default value of the `ecmaVersion` option is now 6 (used to be 5).
375
376 Support for comprehension syntax (which was dropped from the draft spec) has been removed.
377
378 ### Fixes
379
380 `let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
381
382 A parenthesized class or function expression after `export default` is now parsed correctly.
383
384 ### New features
385
386 When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
387
388 The identifier character ranges are now based on Unicode 8.0.0.
389
390 Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
391
392 ## 2.7.0 (2016-01-04)
393
394 ### Fixes
395
396 Stop allowing rest parameters in setters.
397
398 Disallow `y` rexexp flag in ES5.
399
400 Disallow `\00` and `\000` escapes in strict mode.
401
402 Raise an error when an import name is a reserved word.
403
404 ## 2.6.2 (2015-11-10)
405
406 ### Fixes
407
408 Don't crash when no options object is passed.
409
410 ## 2.6.0 (2015-11-09)
411
412 ### Fixes
413
414 Add `await` as a reserved word in module sources.
415
416 Disallow `yield` in a parameter default value for a generator.
417
418 Forbid using a comma after a rest pattern in an array destructuring.
419
420 ### New features
421
422 Support parsing stdin in command-line tool.
423
424 ## 2.5.0 (2015-10-27)
425
426 ### Fixes
427
428 Fix tokenizer support in the command-line tool.
429
430 Stop allowing `new.target` outside of functions.
431
432 Remove legacy `guard` and `guardedHandler` properties from try nodes.
433
434 Stop allowing multiple `__proto__` properties on an object literal in strict mode.
435
436 Don't allow rest parameters to be non-identifier patterns.
437
438 Check for duplicate paramter names in arrow functions.