acorn
npmv8.18.0TypeScriptECMAScript parser
Safe to adopt
Yes — acorn scores well across adoption, maintenance, weight, supply chain, and licensing. 221.9M downloads per week and 19 known dependents. Last published 44 days ago. 7 releases in the last 2 years.
- AAdoption: grade A, Excellent.
221.9M downloads per week and 19 known dependents.
- AMaintenance: grade A, Excellent.
Last published 44 days ago. 7 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 552 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 3 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding acorn to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=0.4.0
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the acorn README.
import * as acorn from "acorn"Used by
Popular packages that depend on acorn.
Promise based HTTP client for the browser and node.js
Next generation testing framework powered by Vite
ECMAScript (ESTree) AST walker
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
TypeScript execution environment and REPL for node.js, with source map support
Missing ECMAScript module utils for Node.js
Support for `import <defer|source>` phase syntax in Acorn
AST-aware v8-to-istanbul
Cybernetically enhanced web apps
Error-tolerant ECMAScript parser
ECMAScript code generator
Parse in reverse
Determine whether an AST node is a reference
Acorn plugin that parses TypeScript
An Esprima-compatible JavaScript parser built on Acorn
Runtime typescript and ESM support for Node.js
Modern, fast React.js JSX parser
Let’s get serious about color
Bare bones Promises/A+ implementation
Relationship graph
Dependencies (left) and dependents (right) of acorn.
Frequently installed together
TypeScript definitions for estree
Prettier is an opinionated code formatter
TypeScript definitions for node
Next generation testing framework powered by Vite
Types for the TypeScript-ESTree AST spec
An AST-based pattern checker for JavaScript.
Encode/decode sourcemap mappings
A tool for walking ASTs
Acorn plugin that parses TypeScript
UI for Vitest
Modify strings, generate sourcemaps
Trace the original position through a source map
Release history
5 releases in the last two years, typically about 95 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 8.18.0latest | 1 month ago | 552 KB | MIT |
| 8.17.0 | 3 months ago | 550 KB | MIT |
| 8.16.0 | 6 months ago | 546 KB | MIT |
| 8.15.0 | 1 year ago | 542 KB | MIT |
| 8.14.1 | 1 year ago | 535 KB | MIT |
| 8.14.0 | 1 year ago | 534 KB | MIT |
| 8.13.0 | 1 year ago | 526 KB | MIT |
| 8.12.1 | 2 years ago | 525 KB | MIT |
| 8.12.0 | 2 years ago | 525 KB | MIT |
| 8.11.3 | 2 years ago | 519 KB | MIT |
| 8.11.2 | 2 years ago | 518 KB | MIT |
| 8.11.1 | 2 years ago | 518 KB | MIT |
| 8.11.0 | 2 years ago | 518 KB | MIT |
| 8.10.0 | 3 years ago | 482 KB | MIT |
| 8.9.0 | 3 years ago | 481 KB | MIT |
Overview
acorn is an npm package that eCMAScript parser. It is extremely widely used, with about 221.9M downloads per week and 19 known dependents in the graph. The latest version is 8.18.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need eCMAScript parser and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (221.9M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Zero runtime dependencies — minimal footprint.
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use acorn?
Yes — acorn scores well across adoption, maintenance, weight, supply chain, and licensing. 221.9M downloads per week and 19 known dependents. Last published 44 days ago. 7 releases in the last 2 years.
How do I install acorn?
Run `npm install acorn` to add acorn to your npm project.
What license is acorn released under?
acorn is distributed under the MIT license.
How popular is acorn?
acorn has approximately 221,927,287 downloads per week and 19 known dependent packages.
Is acorn still maintained?
The most recent release of acorn (v8.18.0) was published 1 month ago.
Does acorn run install scripts?
No. acorn does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.