acorn

A tiny, fast JavaScript parser that turns source code into ESTree-compliant abstract syntax trees.

Library
npm
v8.18.0
11,432stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
67/100Good
Development Activity64
Maintenance28
Community76
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
86/100Excellent
Architecture90
Code Quality88
Innovation85
Learning Curve60

Acorn is a small, fast JavaScript parser written entirely in JavaScript. Given a string of source code, it produces an abstract syntax tree that conforms to the ESTree specification, supporting the full range of finalized ECMAScript features from ES3 through the latest stage-4 additions.

Designed to be embedded, Acorn is the parsing engine behind a large slice of the JavaScript toolchain — bundlers, linters, transpilers, and static-analysis tools rely on it to read code. Its extensible plugin architecture lets consumers redefine parser behavior to support JSX, custom syntax, and experimental proposals without forking the core.

What You Get

  • A single parse(input, options) function that returns an ESTree-compliant AST
  • Full support for finalized ECMAScript syntax from ES3 through the latest stage-4 features, selectable via ecmaVersion
  • A standalone tokenizer and low-level Parser class you can drive directly
  • An extensible plugin system via Parser.extend() for JSX, types, and custom dialects
  • Companion packages acorn-loose (error-tolerant parsing) and acorn-walk (tree traversal)

Common Use Cases

  • Powering bundlers and build tools that need to read and transform JavaScript modules
  • Building linters, formatters, and static-analysis tools on top of an ESTree AST
  • Writing codemods and source transformations that inspect or rewrite code structurally
  • Prototyping JavaScript dialects and experimental syntax through parser plugins

Under The Hood

Architecture - Acorn is built around a single Parser class defined in src/state.js whose behavior is composed from separate concern-focused modules that each augment the prototype: statement.js, expression.js, lval.js, location.js, and scope.js are imported for their side effects in src/index.js, extending the parser with recursive-descent methods. parse() constructs a Parser, tokenizes on demand through tokenize.js/tokentype.js/tokencontext.js, and walks the grammar to emit Node objects (node.js) matching the ESTree spec. Extensibility is a first-class design goal: Parser.extend() returns subclasses so plugins can override individual methods.

Tech Stack - The library is pure JavaScript (99.9% of the repo) with zero runtime dependencies, authored as ES modules under src/ and bundled with Rollup (rollup.config.mjs) into CommonJS, ESM, and TypeScript-typed distributions. The monorepo also houses acorn-loose and acorn-walk, tooling uses ESLint (eslint.config.mjs), and the package targets Node >=0.4.0, reflecting an emphasis on broad compatibility.

Code Quality - The codebase is mature and well-factored, splitting parsing concerns across focused files with clear naming (readToken, parseStatement, parseExpression). Test coverage is extensive: test/ holds dozens of feature-specific suites (regexp per ECMAScript year, class features, import attributes, top-level await, etc.) run via node test/run.js, plus a Test262 conformance runner (bin/run_test262.js) that validates against the official ECMAScript test suite.

API Design - The public surface is intentionally small — most consumers only need parse(input, {ecmaVersion}) — while power users can reach for the standalone tokenizer, the low-level Parser class, and the Parser.extend() plugin mechanism. Options are numerous but well-documented in the README, and ESM builds ship TypeScript definitions for editor autocompletion. The plugin API requires understanding Acorn’s internals and can break across releases, which is the main ergonomic cost of its flexibility.

Used by 25 apps in this directory

TypeScript
99%
Other

Activepieces

Automation · AI Assistants

23,887

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
65
Dependency
Built with
TypeScript99%
Updated today
TypeScript
66%
Apache 2.0

Appsmith

Developer Tools · Automation · No Code Platforms

40,707

Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.

View details
94
Repo Health
79
Technical
68
Dependency
Built with
TypeScript66%
Java22%
Updated today
C++
46%
ZLIB

Armory

Game Development

3,316

Open-source 3D game engine that lives inside Blender, letting you model, script, and ship cross-platform games without ever leaving your design tool.

View details
76
Repo Health
63
Technical
0
Dependency
Built with
C++46%
Python19%
Haxe17%
Updated 1 months ago
Rust
67%
MIT

Bun

Developer Tools

95,452

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
JavaScript
99%
Other

ChartBrew

Analytics · Databases

4,041

Open-source reporting platform to build live dashboards from SQL, NoSQL, APIs, and SaaS tools with an AI assistant that creates charts from natural language.

View details
90
Repo Health
83
Technical
65
Dependency
Built with
JavaScript99%
Updated 6 days ago
TypeScript
45%
Other

Convex Backend

Developer Tools · Databases

12,394

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
88
Repo Health
82
Technical
70
Dependency
Built with
TypeScript45%
Rust43%
Updated today
TypeScript
89%
Other

FastGPT

AI Agents · AI Development

29,387

Build, debug, and deploy knowledge-based AI agents with a visual workflow editor, RAG retrieval, and support for any OpenAI-compatible LLM.

View details
93
Repo Health
84
Technical
70
Dependency
Built with
TypeScript89%
Updated today
TypeScript
67%
MIT

Hoppscotch

Developer Tools

80,055

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
91
Repo Health
83
Technical
66
Dependency
Built with
TypeScript67%
Vue23%
Updated 3 days ago
TypeScript
89%
Apache 2.0

HyperFrames

AI Development · AI Design Tools

41,625

Turn plain HTML and CSS into deterministic, pixel-perfect MP4 videos — authored by humans or AI agents, rendered by headless Chrome and FFmpeg.

View details
82
Repo Health
83
Technical
65
Dependency
Built with
TypeScript89%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search