Esprima
Do not start with it. 9th of 9 JavaScript parsers and codemods.
Esprima is a pioneering ECMAScript parser, but it is effectively abandoned. The last release was 4.0.1 in July 2018, it stops at ES2017, and an OpenJS proposal to archive it has been open since 2024. Its very large download count comes from old transitive installs, mostly js-yaml 3.x. For new work, pick Acorn, Babel parser, Oxc or Meriyah.
Best for: Only legacy codebases that already depend on it and parse code no newer than ES2017.
Scores
Overall2.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 1.5, likely 0.5 to 2.5
Esprima is unmaintained and cannot parse syntax from 2018 onwards, so it fails on much of today's JavaScript. Acorn, Babel parser, Oxc and Meriyah all do the same job better and are active. Keep it only where it is pulled in transitively, and start new work with a maintained parser.
- github.com/jquery/esprima/issues/2127: An archive proposal is pending.
- github.com/jquery/esprima/issues: Modern syntax is unsupported.
- peers: Acorn, Babel, Oxc and Meriyah are all released in 2026 with active commits.
GPT-6.2 Sol: 3.3, likely 2.4 to 4.4
Esprima remains serviceable when an existing tool expects its exact AST and the input stays within ES2017. For new work, Acorn covers modern JavaScript with ESTree output, and Babel parser handles TypeScript and JSX. The years without a release and the confirmed syntax gaps make those peers stronger choices, though strict compatibility with an older tool can still justify Esprima.
- npm.latestPublishedAt, github.commitsLastYear, peers latestPublishedAt: Esprima’s stable build dates to 2018 while both recommended peers shipped in 2026.
- github.com/jquery/esprima/blob/4.0.1/README.md: The stable release documents ES2017 and ESTree support.
- github.com/acornjs/acorn/blob/master/acorn/README.md: Acorn offers current ECMAScript parsing and ESTree output.
- babeljs.io/docs/babel-parser: Babel parser documents TypeScript, JSX, and modern JavaScript support.
Needed by many3.1
How many developers need a tool for this job?
Claude Opus 5.5: 3.0, likely 2.0 to 4.0
Parsing JavaScript into a tree is a tooling niche, and Esprima covers only its JavaScript half. It cannot handle TypeScript or modern syntax, so it fits fewer projects than its category does.
- category.job: The job covers JavaScript and TypeScript; Esprima parses JavaScript only.
- github.com/jquery/esprima/issues: Open issues report that it cannot parse modern syntax.
GPT-6.2 Sol: 3.1, likely 2.0 to 4.3
Parsers underpin linters and build tools, and developers usually choose one directly when writing tooling or codemods. Esprima’s ES2017 ceiling narrows that group further, especially given how much TypeScript respondents use in the 2025 State of JavaScript survey. The survey does not measure how many teams still need to parse older JavaScript.
- 2025.stateofjs.com/en-US/usage: Shows substantial TypeScript use and widespread build steps among respondents.
- github.com/jquery/esprima/blob/4.0.1/README.md: The stable release documents ES2017 and experimental JSX support.
Helps a lot3.0
How well does it do the job for those who need it?
Claude Opus 5.5: 2.0, likely 1.0 to 3.0
The stable 4.0.1 release stops at ES2017. It fails on optional chaining, class fields, static properties, BigInt and dynamic import, which are common in today's code. It has no TypeScript types. Every peer parses modern code that Esprima rejects.
- github.com/jquery/esprima/issues: Open issues from 2021 to 2025 on optional chaining, class fields, BigInt and import().
- npm latestVersion: 4.0.1 was published in July 2018.
- npm hasTypes: It ships no bundled types.
- github.com/prantlf/ecmascript-parser-benchmark: Its speed is close to Acorn's, but only on old syntax.
GPT-6.2 Sol: 4.0, likely 3.2 to 5.3
Esprima has a simple, documented ESTree API with source locations and limited error recovery. Version 4.0.1 rejects optional chaining and object spread, lacks TypeScript parsing, and relies on community declarations for typed calls. A small independent benchmark found it competitive with Acorn on older inputs and slower than Meriyah. The score varies most with how tightly a team can control its input syntax.
- docs.esprima.org/en/4.0/syntactic-analysis.html: Documents parser options, source locations, and the limits of tolerant mode.
- github.com/jquery/esprima/issues/2112: Users report optional chaining failures in existing workflows.
- github.com/jquery/esprima/issues/2034: A user reports object spread failing to parse.
- github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/esprima/index.d.ts: Separate community declarations cover the parser API.
- github.com/prantlf/ecmascript-parser-benchmark: Independent timings cover two JavaScript fixtures across several parsers.
Holds up over time1.2
Will it still be a good choice in two years?
Claude Opus 5.5: 0.5, likely 0.0 to 1.5
There have been no commits since April 2023, no release since 2018, and no commits or releases in the last year. The OpenJS Foundation proposed archiving it because it could not reach the maintainers, and an 'Is this project abandoned?' issue is open. The ecosystem has moved to Acorn/Espree, Babel and Oxc.
- github.com/jquery/esprima/issues/2127: The OpenJS proposal to archive, opened in 2024, is still open.
- github pushedAt: The last push was in April 2023.
- github commitsLastYear: 0 commits and 0 releases in the last year.
- chromium.googlesource.com/devtools/devtools-frontend/+/bce304d2da495630d5115dcaf576e397ee67cb97/node_modules/espree/README.md: ESLint's Espree left Esprima and moved to Acorn.
GPT-6.2 Sol: 1.8, likely 0.9 to 2.9
The last npm publish was in July 2018, and the bundle records zero commits or releases in the past year. A request for optional chaining has been open since 2022, while Acorn and Babel parser both shipped updates in 2026. OpenJS hosting and the stable API give existing users some continuity, but the pace of maintenance makes a catch-up release unlikely.
- github.pushedAt, github.commitsLastYear, github.releasesLastYear, npm.latestPublishedAt: The last push was in 2023, and the latest npm release dates to 2018.
- github.com/jquery/esprima/issues/2112: The optional chaining request remains open.
- openjsf.org/projects: OpenJS lists Esprima as an At-Large project.
- peers Acorn and Babel parser latestPublishedAt and commitsLastYear: Both peers shipped and committed changes in the past year.
Used widely5.2
How many use it, and is that growing?
Claude Opus 5.5: 4.0, likely 2.5 to 5.5
About 608M downloads in 4 weeks and 1.5M dependent repos look huge, but almost all of it is transitive, mainly from js-yaml 3.x through older test and build tooling. The yearly ratio of about 2.26 is well below the 4.1 median, so it is losing ground. There is no social attention (0 Bluesky posts, 0 Hacker News stories), and few people choose it directly today.
- npm downloadsLast4Weeks: 608M now against 269M a year ago, a ratio of about 2.26, below the 4.1 median.
- dependents: 1.54M repos and 4,458 packages, mostly legacy and transitive.
- cobalt.googlesource.com/cobalt/+/22.lts.stable/src/third_party/devtools/node_modules/js-yaml/package.json: js-yaml 3.x depends on esprima ^4.0.0.
- bluesky posts: 0 posts, against 84 for Oxc and 18 for Babel.
GPT-6.2 Sol: 6.3, likely 4.6 to 7.8
The bundle records about 1.54 million dependent repositories, ahead of Acorn and behind Babel parser. Recast and Escodegen install Esprima automatically, and build servers repeat installs, so the number of projects that chose it directly is hard to estimate. Downloads reached 608 million in four weeks, up 2.26 times year over year. That trails the catalog median of 4.1 times, Acorn, and Babel parser, indicating a loss of relative ground.
- dependents.repos, dependents.packages, peers dependentRepos: ecosyste.ms found 1.54 million dependent repositories and 4,458 dependent packages.
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers download counts: Esprima grew 2.26 times against a catalog median of 4.1 times.
- github.com/benjamn/recast/blob/master/package.json: Recast lists Esprima as a runtime dependency.
- github.com/estools/escodegen/blob/master/package.json: Escodegen also installs Esprima as a runtime dependency.
Vouched for3.4
Who stands behind it being good?
Claude Opus 5.5: 2.0, likely 1.0 to 3.5
In the past it was the reference ESTree parser, and ESLint and Istanbul built on it. Those projects have since moved away. No current survey, framework or company points to it as a choice today.
- chromium.googlesource.com/devtools/devtools-frontend/+/bce304d2da495630d5115dcaf576e397ee67cb97/node_modules/espree/README.md: ESLint forked away from it and then moved to Acorn.
- hackerNews stories: No current discussion.
- ESTree history: Its AST format started ESTree, an old endorsement.
GPT-6.2 Sol: 4.8, likely 3.4 to 6.0
Recast still selects Esprima as its default parser, and an independent benchmark found its speed competitive on older JavaScript. ESLint reports that it moved away after falling behind on language features and now builds its parser on Acorn. Recent evidence of teams choosing Esprima for modern projects is scarce, which keeps the range wide.
- github.com/benjamn/recast/blob/master/lib/options.ts: Recast’s implementation still defaults to Esprima.
- github.com/prantlf/ecmascript-parser-benchmark: Independent tests show competitive performance on a small set of older inputs.
- github.com/eslint/js/blob/main/packages/espree/README.md: ESLint documents its move from Esprima to an Acorn-based parser.
Safe5.5
How safe is it to depend on?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
It has no advisories, no dependencies and a permissive BSD-2-Clause licence, so the attack surface is small. But the Scorecard is 3.9 with Maintained at 0, and nobody is responsive, so any future bug or vulnerability would stay unfixed. Its parse failures on modern code are also a reliability risk.
- advisories total: 0 advisories.
- npm dependencies: 0 runtime dependencies.
- scorecard score: 3.9 overall, with Maintained, Branch-Protection and Token-Permissions at 0.
- github.com/jquery/esprima/issues/2127: The maintainers could not be reached.
GPT-6.2 Sol: 6.0, likely 4.6 to 7.4
The package has zero runtime dependencies, a permissive BSD-2-Clause licence, and no advisories in OSV or Snyk. Its OpenSSF Scorecard is 3.9, with weak code review and zero scores for branch protection and fuzzing. OpenJS provides a disclosure route, but the package lists one maintainer and years without a release leave future patch response uncertain.
- npm.dependencies, npm.license, advisories.total: Zero runtime dependencies, BSD-2-Clause licence, and zero OSV advisories.
- scorecard.score, scorecard.checks: Weak review and maintenance checks, with release signing and packaging unassessed.
- app.unpkg.com/esprima%404.0.1/files/package.json: The published manifest lists one maintainer and a prepublish build.
- security.snyk.io/package/npm/esprima/4.0.1: Snyk lists no direct vulnerabilities for version 4.0.1.
- cna.openjsf.org: Esprima is in scope for coordinated vulnerability disclosure.
Good
- It has no runtime dependencies and a permissive BSD-2-Clause licence.
- It produces the standard ESTree-style AST, with tokens, comments and location data.
- It has a long, clean security record with no known advisories.
- On ES2017 code it is still a fast, well-tested pure-JS parser.
Bad
- It cannot parse optional chaining, class fields, BigInt, dynamic import or other ES2018+ syntax.
- There has been no release since 2018, no commits since 2023, and maintainers have not answered the foundation.
- It ships no TypeScript types and cannot parse TypeScript.
- Its downloads come almost entirely from old transitive installs such as js-yaml 3.x, not from new choices.
The numbers
- npm downloads, 4 weeks
- 608M ×2.3 in a year
- GitHub stars
- 7.1k
- Commits, 12 months
- 0
- npm version
- 4.0.1 Jul 2018
- Versions, 12 months
- 0
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 3.9 out of 10, Nov 2026
- Licence
- BSD-2-Clause
Read on 21 November 2026 from GitHub (jquery/esprima), npm (esprima), OSV and the OpenSSF Scorecard.
JavaScript parsers and codemods
- 8.0Babel parser
- 7.8Oxc parser
- 7.5ast-grep
- 7.1Acorn
- 7.1Recast
- 7.0ts-morph
- 6.4jscodeshift
- 6.3Meriyah
- 2.4Esprima