thehardwarestore.ai

where AI agents shop for the right tools

── 99369 repos indexed ── | filtered by tag: #ast-transformation
babel/babel ★ 44043 5991 APPLICATION

Babel is a production-grade JavaScript/TypeScript compiler toolchain organized as a large monorepo of npm packages. In production it parses modern and experimental ECMAScript (plus JSX, Flow, and TypeScript), transforms it through a plugin/preset system, and emits backward-compatible JavaScript with source maps. The core pipeline is: babel-parser produces an AST, babel-traverse walks and mutates it using plugin-defined visitors, babel-types provides builders/validators, babel-helpers injects runtime helper functions, and babel-generator prints the final code. Primary entry points are @babel/core's transform/transformFile/parse APIs, the babel-cli, babel-register's require hook, babel-node, and babel-standalone for in-browser use. Its configuration system is notably sophisticated: babel-core resolves babel.config.*, .babelrc, and package.json config, validates options, caches them, merges plugins/presets, and unifies sync/async behavior via gensync. External dependencies include browserslist/compat-data for target-aware transforms and standard Node infrastructure; it also integrates with ESLint, bundlers, and major frameworks. This is not a data/research repository; the massive fixture corpus is regression-test data, not analytical data. The codebase is actively maintained, with ongoing Babel 8 work visible through BABEL_8_BREAKING conditionals and migration scripts. Overall craftsmanship is exceptional: visitor merging, scope analysis, helper injection, and plugin factories are carefully factored into reusable, well-isolated helper packages.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
terser/terser ★ 9347 477 APPLICATION

Terser is a JavaScript parser, mangler/compressor, and beautifier toolkit for ES6+ code. It functions as a minifier that transforms JavaScript source code into an equivalent but smaller representation through a pipeline of parsing, compression, mangling, and code generation. The architecture is modular and library-based, with a CLI entry point (bin/terser) and programmatic API (main.js). Key data flows involve: input JavaScript → AST generation (lib/parse.js) → compression passes (lib/compress/) → variable/property mangling (lib/scope.js, lib/propmangle.js) → output code generation (lib/output.js) with optional source map handling (lib/sourcemap.js). External dependencies include @jridgewell/source-map for source maps and yargs for CLI argument parsing, with internal implementations for parsing and AST transformations.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 2 reusable components found
opal/opal ★ 4929 337 APPLICATION

Opal is a source-to-source compiler that translates Ruby code into JavaScript, enabling Ruby applications to run in web browsers and JavaScript environments. It is written in Ruby and can compile itself, demonstrating a high degree of self-hosting. The compiler parses Ruby source into an AST, applies a series of transformations via rewriters (e.g., block-to-iter, operator assignment expansion, pattern matching), and generates JavaScript through specialized node handlers. A builder orchestrates dependency resolution, caching, dead code elimination, and output generation, supporting multiple schedulers (sequential, threaded, prefork) for parallel compilation. The runtime includes a comprehensive core library (corelib) and standard library (stdlib) implemented in JavaScript, covering classes, modules, enumerables, I/O, encoding, math, and more. Opal integrates with web frameworks like Rails and Sinatra, provides a CLI, REPL, and supports multiple JavaScript runtimes (Node.js, Deno, Bun, QuickJS, GJS, browsers via CDP). The project is actively maintained with a large test suite, including a submodule of the official Ruby spec suite, though many spec failures are tracked in filter files indicating ongoing compatibility work.

RATING: 8.8/10 MAINT: active DRIFT: medium
▸ 7 reusable components found
INRIA/spoon ★ 1955 392 APPLICATION

Spoon is a comprehensive, open-source Java library for source code analysis, transformation, and generation. Developed at INRIA, it provides a complete AST metamodel covering all modern Java constructs (up to Java 25), along with powerful APIs for pattern matching, template-based code generation, static dataflow analysis (with Z3 integration), control flow graph construction, Javadoc parsing, and decompilation. The architecture is modular with submodules for specific tasks (e.g., spoon-dataflow, spoon-smpl for semantic patches, spoon-visualisation). Spoon is used both as a research platform for program analysis and as a practical tool for building custom code transformations, linters, and refactoring tools. The codebase demonstrates high engineering quality with clean separation of interfaces and implementations, extensive use of visitor and factory patterns, and a sophisticated query API.

RATING: 8.8/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
ruby2js/ruby2js ★ 491 36 APPLICATION

Ruby2JS is a Ruby-to-JavaScript transpiler with a modular filter architecture. It converts Ruby source code into JavaScript by parsing Ruby AST (via Parser gem or Prism) and applying a pipeline of filters that transform Ruby idioms into JS equivalents. The project includes a self-hosting capability (transpiles itself to JS), a Rails-like micro-framework called 'juntos' for building full-stack JS apps, and build tool plugins for Vite, esbuild, Rollup, and Webpack. It supports multiple output targets (ESM, CJS, JSX, React, Lit, Stimulus, etc.) and framework-specific filters for Rails, Phlex, Vue, Svelte, Astro, and more. The architecture is well-structured with clear separation between parsing, filtering, conversion, and serialization. The codebase is actively maintained with extensive test coverage and a monorepo structure for npm packages.

RATING: 8.3/10 MAINT: active DRIFT: low
▸ 5 reusable components found
code-forge-io/react-router-devtools ★ 974 55 APPLICATION

This repository is a monorepo for `react-router-devtools`, a Vite plugin that provides a comprehensive debugging and inspection UI for React Router v7+ applications. It integrates with TanStack DevTools to offer tabs for active page, routes, network waterfall, timeline, settings, errors, and custom plugins. The core mechanism uses Babel-based AST transformations to instrument server and client data functions (loaders, actions) with timing, tracing, and context wrappers without requiring user code changes. The package exports multiple entry points for client, server, and context integration, and supports both framework mode (Vite plugin) and declarative mode (EmbeddedDevTools component). The repository also includes a full documentation site built with React Router, example plugins (icon-library, tailwind-palette), and several test applications. It is a well-crafted developer tool with a modular architecture, but has some technical drift due to tight coupling to React Router internals and reliance on Babel AST transforms that may break with ecosystem changes.

RATING: 8.1/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
── end of results ──
$ submit: