NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #62 most downloaded on npm
ECMAScript parser
Last release 2 months ago
28 Jul 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 56 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
14 years old
140 releases · first in 2012
Fix wrong value in version export.
Fix wrong value in version export.
Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
Forbid new.target in top-level arrow functions.
Fix issue with parsing a regexp after yield in some contexts.
The package now comes with TypeScript definitions.
The default value of the ecmaVersion option is now 9 (2018).
Plugins work differently, and will have to be rewritten to work with this version.
The loose parser and walker have been moved into separate packages (acorn-loose and acorn-walk).
One column per quarter.
Nothing published for this version
Fix failure to tokenize regexps after expressions like x.of.
Fix failure to tokenize regexps after expressions like x.of.
Better error message for unterminated template literals.
Properly handle allowAwaitOutsideFunction in for statements.
Properly handle allowAwaitOutsideFunction in for statements.
Treat function declarations at the top level of modules like let bindings.
Don't allow async function declarations as the only statement under a label.
Nothing published for this version
### New features Upgraded to Unicode 11.
Upgraded to Unicode 11.
Nothing published for this version
Nothing published for this version
Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
Allow binding-less catch statements when ECMAVersion >= 10.
Add allowAwaitOutsideFunction option for parsing top-level await.
A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
A second republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
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.
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.
Fix misleading error message for octal escapes in template strings.
Fix misleading error message for octal escapes in template strings.
The identifier character categorization is now based on Unicode version 10.
The identifier character categorization is now based on Unicode version 10.
Acorn will now validate the content of regular expressions, including new ES9 features.
Nothing published for this version
Disallow duplicate or escaped flags on regular expressions.
Disallow duplicate or escaped flags on regular expressions.
Disallow octal escapes in strings in strict mode.
Add support for async iteration.
Add support for object spread and rest.
Fix parsing of floating point literals with leading zeroes in loose mode.
Fix parsing of floating point literals with leading zeroes in loose mode.
Allow duplicate property names in object patterns.
Don't allow static class methods named prototype.
Disallow async functions directly under if or else.
Parse right-hand-side of for/of as an assignment expression.
Stricter parsing of for/in.
Don't allow unicode escapes in contextual keywords.
Parsing class members was factored into smaller methods to allow plugins to hook into it.
Fix a token context corruption bug.
Fix a token context corruption bug.
Fix token context tracking for class and function in property-name position.
Fix token context tracking for class and function in property-name position.
Make sure %* isn't parsed as a valid operator.
Allow shorthand properties get and set to be followed by default values.
Disallow super when not in callee or object position.
Support directive property on directive expression statements.
Disable parsing of legacy HTML-style comments in modules.
Disable parsing of legacy HTML-style comments in modules.
Fix parsing of async methods whose names are keywords.
Fix problem with disambiguating regexp and division after a class.
Fix problem with disambiguating regexp and division after a class.
Fix tokenizing of regexps in an object-desctructuring for/of loop and after yield.
Fix tokenizing of regexps in an object-desctructuring for/of loop and after yield.
Parse zero-prefixed numbers with non-octal digits as decimal.
Allow object/array patterns in rest parameters.
Don't error when yield is used as a property name.
Allow async as a shorthand object property.
Implement the template literal revision proposal for ES9.
Fix spurious duplicate variable definition errors for named functions.
Fix spurious duplicate variable definition errors for named functions.
A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
Nothing published for this version
Raise an error for duplicated lexical bindings.
Raise an error for duplicated lexical bindings.
Fix spurious error when an assignement expression occurred after a spread expression.
Accept regular expressions after of (in for/of), yield (in a generator), and braced arrow functions.
Allow labels in front or var declarations, even in strict mode.
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.
Nothing published for this version
Allow all forms of member expressions to be parenthesized as lvalue.
Allow all forms of member expressions to be parenthesized as lvalue.
Don't expect semicolons after default-exported functions or classes, even when they are expressions.
Don't expect semicolons after default-exported functions or classes, even when they are expressions.
Check for use of 'use strict' directives in non-simple parameter functions, even when already in strict mode.
Fix incorrect error raised for parenthesized simple assignment targets, so that (x) = 1 parses again.
Fix incorrect error raised for parenthesized simple assignment targets, so that (x) = 1 parses again.
Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet
Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
Accept invalidly rejected code like (x).y = 2 again.
Accept invalidly rejected code like (x).y = 2 again.
Don't raise an error when a function inside strict code has a non-simple parameter list.
Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
Disallow parenthesized pattern expressions.
Disallow parenthesized pattern expressions.
Allow keywords as export names.
Don't allow the async keyword to be parenthesized.
Properly raise an error when a keyword contains a character escape.
Allow "use strict" to appear after other string literal expressions.
Disallow labeled declarations.
Fix crash when export was followed by a keyword that can't be exported.
Fix crash when export was followed by a keyword that can't be
exported.
Allow regular function declarations inside single-statement if branches in loose mode. Forbid them entirely in strict mode.
Allow regular function declarations inside single-statement if branches in loose mode. Forbid them entirely in strict mode.
Properly parse properties named async in ES2017 mode.
Fix bug where reserved words were broken in ES2017 mode.
Don't ignore period or 'e' characters after octal numbers.
Don't ignore period or 'e' characters after octal numbers.
Fix broken parsing for call expressions in default parameter values of arrow functions.
Fix false positives in duplicated export name errors.
Fix false positives in duplicated export name errors.
The default ecmaVersion option value is now 7.
The default ecmaVersion option value is now 7.
A number of internal method signatures changed, so plugins might need to be updated.
The parser now raises errors on duplicated export names.
arguments and eval can now be used in shorthand properties.
Duplicate parameter names in non-simple argument lists now always produce an error.
The ecmaVersion option now also accepts year-style version numbers
(2015, etc).
Support for async/await syntax when ecmaVersion is >= 8.
Support for trailing commas in call expressions when ecmaVersion is >= 8.
Fix bug in tokenizing of regexp operator after a function declaration.
Fix bug in tokenizing of regexp operator after a function declaration.
Fix parser crash when parsing an array pattern with a hole.
Implement check against complex argument lists in functions that enable strict mode in ES7.
Improve handling of lack of unicode regexp support in host environment.
Improve handling of lack of unicode regexp support in host environment.
Properly reject shorthand properties whose name is a keyword.
Visitors created with visit.make now have their base as prototype, rather than copying properties into a fresh object.
Properly tokenize the division operator directly after a function expression.
Properly tokenize the division operator directly after a function expression.
Allow trailing comma in destructuring arrays.
Allow update expressions as left-hand-side of the ES7 exponential operator.
Allow update expressions as left-hand-side of the ES7 exponential operator.
Fix bug that accidentally made undefined a reserved word when parsing ES7.
Fix bug that accidentally made undefined a reserved word when parsing ES7.
The default value of the ecmaVersion option is now 6 (used to be 5).
The default value of the ecmaVersion option is now 6 (used to be 5).
Support for comprehension syntax (which was dropped from the draft spec) has been removed.
let and yield are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
A parenthesized class or function expression after export default is now parsed correctly.
When ecmaVersion is set to 7, Acorn will parse the exponentiation operator (**).
The identifier character ranges are now based on Unicode 8.0.0.
Plugins can now override the raiseRecoverable method to override the way non-critical errors are handled.
Stop allowing rest parameters in setters.
Stop allowing rest parameters in setters.
Disallow y rexexp flag in ES5.
Disallow \00 and \000 escapes in strict mode.
Raise an error when an import name is a reserved word.
Nothing published for this version
Don't crash when no options object is passed.
Don't crash when no options object is passed.
Add await as a reserved word in module sources.
Add await as a reserved word in module sources.
Disallow yield in a parameter default value for a generator.
Forbid using a comma after a rest pattern in an array destructuring.
Support parsing stdin in command-line tool.
Nothing published for this version
Fix tokenizer support in the command-line tool.
Fix tokenizer support in the command-line tool.
Stop allowing new.target outside of functions.
Remove legacy guard and guardedHandler properties from try nodes.
Stop allowing multiple __proto__ properties on an object literal in strict mode.
Don't allow rest parameters to be non-identifier patterns.
Check for duplicate paramter names in arrow functions.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →