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: The upstream last push was 2022-12-04, but the most recent versioned updates shown here are from 2020-02-26 (v5.2.0), suggesting the project is likely in a slower, maintenance-oriented phase rather than high-velocity development.
- Update cadence (from available evidence): Versioned updates appear infrequent (notable gaps of about 1 to 2+ years between v5.0.0 and v5.2.0), and no newer version than 5.2.0 is evidenced in the provided update list.
AI summary generated Today
Recent updates
5.2.0
2/26/2020Release 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
11/20/2018Release 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
11/20/2018Release 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
1/16/2018Release 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
11/11/2017Release 4.1.0 adds support for JSX fragments. This enables developers to use JSX fragment syntax without additional wrappers.
Features