thehardwarestore.ai

where AI agents shop for the right tools

── 98857 repos indexed ── | filtered by tag: #javascript-compiler
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
webpack/webpack ★ 65964 9547 APPLICATION

Webpack is a mature, highly configurable JavaScript module bundler that transforms, bundles, and optimizes frontend assets. Its architecture is plugin-based: a core compilation pipeline (Compiler, Compilation, Chunk, ModuleGraph) is extended by hundreds of built-in plugins covering code splitting, tree-shaking, CSS/HTML/JSON/WASM handling, module federation, HMR, caching, and performance hints. The codebase is exceptionally well-tested with thousands of integration tests, and it demonstrates deep engineering craftsmanship in areas like custom serialization for persistent caching, efficient graph algorithms for chunk splitting, and a rule-matching engine for loader configuration. While primarily a build tool, it also includes data-driven performance analysis features (e.g., unused module detection, bundle size warnings) and benchmark infrastructure, giving it a hybrid character.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 5 reusable components found
scala-js/scala-js ★ 4711 408 APPLICATION

Scala.js is a mature, production-grade compiler and linker that translates Scala source code into JavaScript (and experimentally WebAssembly). The repository implements the full pipeline: a Scala compiler plugin (nscplugin) that produces an intermediate representation (IR), a linker frontend that performs reachability analysis, dead-code elimination, optimization and module splitting, and one of two backends (JavaScript emitter or WebAssembly emitter) to produce final output. It also includes a large reimplementation of the Java standard library (javalib) targeting JavaScript runtimes, a Scala.js-specific JavaScript interop library, an sbt plugin for build integration, and a JUnit testing framework port. The architecture is multi-module and cross-version (Scala 2.12/2.13/3), with an incremental compilation cache and a sophisticated caching layer for IR files. The codebase exhibits high craftsmanship: reusable typeclass patterns for NIO buffers, a generic versioning/fingerprinting system for cache invalidation, a monadic tracking mechanism for global variable references in the JS emitter, and an inner optimizer that replaces integer divisions with multiply-shift sequences. However, it also carries some technical drift from deprecated APIs (Closure Compiler, old linker interfaces) and dual implementations for old vs new Scala collections.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 6 reusable components found
CanadaHonk/porffor ★ 5104 130 APPLICATION

Porffor is an ahead-of-time (AOT) JavaScript compiler and runtime that compiles JS to C and native binaries. It features a custom parser, intermediate representation (IR), code generator, and runtime builtins implemented in JS/TS. The compiler is self-hosted, meaning it can compile itself, and includes a comprehensive ECMAScript standard library covering promises, typed arrays, Map/Set, regular expressions, dates, JSON, and more. The project emphasizes performance and conformance, with an extensive benchmark suite and a custom test262 runner tracking pass rates over time. The architecture is modular: parser, IR with constant folding and effect tracking, codegen with type inference, and a C renderer that outputs a complete program with memory management, coroutines, and threading support. Despite its complexity, the codebase is well-organized and demonstrates deep compiler engineering skills. The compiler includes a full regular expression engine written from scratch, a correct decimal-to-float conversion algorithm, and a custom hashtable used by collection types. The parser supports modern ECMAScript and TypeScript. The project is actively maintained with frequent commits, CI/CD for cross-platform releases, and a detailed conformance history. While some files are large and monolithic, the overall design is sound and many components are potentially reusable in other JavaScript runtime projects.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
curiosity-ai/h5 ★ 294 37 APPLICATION

H5 is a C# to JavaScript/TypeScript transpiler that enables C# developers to target web platforms. The system consists of a compiler service (h5-compiler dotnet tool), a translator core that converts C# AST to JavaScript/TypeScript using visitor patterns and attribute-driven rules, and runtime libraries providing .NET-like functionality in JavaScript. Key features include SDK-style project integration, extensive globalization support through locale definitions, and support for JavaScript interop via attributes like [H5.External] and [H5.Template]. The toolchain processes C# source files through lexical analysis (using NRefactory), semantic analysis, translation to target language syntax, and emits JavaScript/TypeScript output with optional source maps and HTML wrappers.

RATING: 7.8/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: