Tags: acornjs/acorn
Tags
Version 8.15.0 ### New features Support `using` and `await using` syntax. The `AnyNode` type is now defined in such a way that plugins can extend it. ### Bug fixes Fix an issue where the `bigint` property of literal nodes for non-decimal bigints had the wrong format. The `acorn` CLI tool no longer crashes when emitting a tree that contains a bigint.
Version 8.14.1 ### Bug fixes Fix an issue where `await` expressions in class field initializers were inappropriately allowed. Properly allow await inside an async arrow function inside a class field initializer. Mention the source file name in syntax error messages when given. Properly add an empty `attributes` property to every form of `ExportNamedDeclaration`.
Version 8.12.0 ### New features Support ES2025 duplicate capture group names in regular expressions. ### Bug fixes Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error. Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name. Properly recognize \"use strict\" when preceded by a string with an escaped newline. Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors. Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled. Properly normalize line endings in raw strings of invalid template tokens. Properly track line numbers for escaped newlines in strings. Fix a bug that broke line number accounting after a template literal with invalid escape sequences.
Version 8.11.3 ### Bug fixes Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error. Make sure `onToken` get an `import` keyword token when parsing `import.meta`. Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes.
Version 8.11.0 ### Bug fixes 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. 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. ### New features Upgrade to Unicode 15.1. Use a set of new, much more precise, TypeScript types.
PreviousNext