Acorn-JSX is a plugin for Acorn that provides an alternative, faster parser for React.js JSX syntax. It’s useful for tools that need to parse JavaScript into a JSX AST, for example language services or code analysis, rather than transpiling directly to ES5.
Project status
- Maintenance status: acorn-jsx shows signs of quiet or dormant maintenance today, with the most recent upstream push dated 2022-12-04, and no newer update summaries shown since 2020-09-07.
- Update cadence: earlier updates came in bursts (notably 2017-2018 and then 2020-02 and 2020-09), but the evidence provided indicates a multi-year gap (since 2022 at the latest) rather than an ongoing, steady cadence.
AI summary generated
Recent updates
5.3.1
Release 5.3.1 contains a small code change plus a new regression test related to parsing JSX inside generator yield expressions. No release notes were provided, so the behavior change is only evident from the code diff.
5.3.0
Release 5.3.0 updates the project’s toolchain and compatibility matrix to support newer Acorn versions, most notably Acorn 8. There are no release notes provided, and the code diff only shows changes to CI configuration, package dependency declarations, and the test suite.
5.2.0
Release 5.2.0 tightens the JSX parser so that certain characters are no longer accepted as raw JSX text. In addition to the documented JSXText restriction, the codebase includes a non-trivial internal refactor around how `acorn` token types are created, cached, and exposed to other plugins.
Breaking5.0.1
Release 5.0.1 is a small patch intended to restore compatibility with Node.js 4.x. The code changes are focused on runtime syntax compatibility (removing a default parameter) and minor module import adjustments.
5.0.0
Release 5.0.0 is described only as an upgrade for compatibility with a newer acorn. The diff shows a much larger refactor: the JSX plugin implementation has been moved into index.js, the packaging model changed to depend on acorn via peerDependencies, and the public usage API in README and tests was updated accordingly.
Breaking4.1.1
Release 4.1.1 fixes how acorn-jsx represents JSX fragments in the produced AST. Specifically, fragment nodes that were introduced as incorrect element node types in 4.1.0 are now emitted with the correct fragment node types.
Breaking4.1.0
Release 4.1.0 adds support for JSX fragments. This enables developers to use JSX fragment syntax without additional wrappers.
Features