awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
alangpierce avatar

alangpierce/sucrase

0
View on GitHub↗
5,860 stars·154 forks·TypeScript·MIT·24 viewssucrase.io↗

Sucrase

Sucrase is a high-speed transpilation tool that compiles modern JavaScript, TypeScript, JSX, and Flow to standard JavaScript for modern runtimes. It operates as a fast alternative to Babel, using a single-pass scanner and tokenizer that strips type annotations and applies only requested syntax transforms without building an AST or performing type checking.

The tool differentiates itself through a zero-type-checking pipeline that omits type checking entirely, relying on the assumption that input code is already valid for the target runtime. It uses scanner-based tokenization and single-pass code generation to produce output from the token stream without building an intermediate representation, and applies only transform-selective compilation for JSX, TypeScript, Flow, and imports while leaving other modern syntax unchanged.

Sucrase provides a command-line interface for running code directly, mirroring directories with transforms, and integrating into build tool workflows. It supports syntax-level transforms for converting TypeScript, Flow, JSX, modern JavaScript, and ES modules into standard JavaScript, including ES module conversion to CommonJS, JSX compilation for React, and removal of Flow and TypeScript type annotations. The tool integrates with Webpack, Gulp, Jest, Rollup, and Broccoli via direct API calls without requiring a plugin system.

Features

  • JavaScript to TypeScript Migration - Strips TypeScript type annotations and compiles syntax to standard JavaScript for direct execution.
  • Type-Checking Skipping Pipelines - Omits type checking entirely, relying on the assumption that input code is already valid for the target runtime.
  • Flow Compilers - Removes Flow type annotations and compiles the remaining code to standard JavaScript that runs without a type checker.
  • JavaScript Transpilers - An alternative to Babel that compiles modern JavaScript, TypeScript, JSX, and Flow to standard JavaScript for modern runtimes.
  • JavaScript Transpilation - Compiles modern JavaScript, TypeScript, JSX, and Flow to standard JS at high speed for development and production builds.
  • Type Annotation Stripping - Removes TypeScript type annotations and compiles features like enums to plain JavaScript without type checking.
  • CommonJS Converters - Transforms import and export statements into require and module.exports calls with options for dynamic import preservation.
  • Type Annotation Stripping - Parses only enough structure to identify and remove type annotations, avoiding full AST construction for faster output.
  • Single-Pass Generators - Generates output code in one pass from the token stream without building an intermediate representation or AST.
  • Single-Pass Tokenizers - Tokenizes source code in a single pass using a hand-written scanner that skips type annotations for speed.
  • TypeScript Compilation Without Type Checking - Strips TypeScript type annotations and compiles TypeScript-specific features to plain JavaScript without type checking.
  • TypeScript Compilation Without Type Checking - Strips TypeScript type annotations and compiles syntax to plain JavaScript for quick execution without a type checker.
  • CommonJS Converters - Converts ES module import/export syntax into CommonJS require/module.exports calls.
  • CommonJS Converters - Converts ES module import and export statements into CommonJS require and module.exports calls for Node.js compatibility.
  • JSX Compilers - Transforms JSX syntax into JavaScript function calls for React or custom pragmas in modern browser environments.
  • JSX Transformers - Transforms JSX syntax into standard JavaScript function calls for React or custom pragmas.
  • Selective - Applies only requested syntax transforms for JSX, TypeScript, Flow, and imports while leaving other modern syntax unchanged.
  • Direct API Integrations - Integrates with Webpack, Gulp, Jest, Rollup, and Broccoli via direct API calls without requiring a plugin system.
  • Directory Structure Mirroring - Provides a CLI command that mirrors a source directory to an output directory while applying code transforms.
  • Build Tool Integrations - Integrates with Webpack, Gulp, Jest, Rollup, and Broccoli via direct API calls without requiring a plugin system.
  • Build Tool Integrations - Plugs into Webpack, Gulp, Jest, Rollup, and Broccoli to incorporate transpilation into existing workflows.
  • Downlevel Compilers - Compiles newer JS features such as optional chaining, nullish coalescing, class fields, and numeric separators to older syntax.
  • ES Module to CommonJS Converters - Converts ES module import/export syntax into CommonJS require/module.exports calls for Node.js compatibility.
  • On-the-Fly Execution Hooks - Executes TypeScript or JSX files on-the-fly without a separate build step using a require hook and CLI binary.

Star history

Star history chart for alangpierce/sucraseStar history chart for alangpierce/sucrase

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Sucrase

These projects share indexed features with Sucrase. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • babel/minifybabel avatar

    babel/minify

    4,376View on GitHub↗

    This project is an AST-based code optimizer and compressor for modern ECMAScript, JSX, and TypeScript source code. It functions as a JavaScript minifier that uses the Babel toolchain to reduce file size by removing unnecessary characters and whitespace while preserving program logic. The tool is distinguished by its ability to process experimental language proposals and transform modern syntax into browser-compatible versions. It provides specialized handling for React JSX transpilation and strips type annotations from TypeScript files to produce compressed production assets. The system cove

    JavaScript
    View on GitHub↗4,376
  • facebookarchive/prepackfacebookarchive avatar

    facebookarchive/prepack

    14,118View on GitHub↗

    Prepack is a build-time code evaluator and JavaScript bundle optimizer. It functions as a static analysis compiler that pre-evaluates static code and precalculates function results and global assignments during the build phase to accelerate startup times and reduce bundle size. The project specifically targets JSX optimization by processing syntax and node serialization to improve user interface rendering efficiency. It utilizes a partial evaluation engine and static execution analysis to replace runtime computations with precalculated constants. The tool covers a range of capabilities inclu

    JavaScriptjavascriptoptimization
    View on GitHub↗14,118
  • facebook/regeneratorfacebook avatar

    facebook/regenerator

    3,827View on GitHub↗

    Regenerator is a JavaScript generator transpiler and build-time code processor. It converts ECMAScript generator functions and asynchronous iteration into ES5 compatible state machines to ensure modern control flow works in legacy runtimes. The project functions as an ES5 compatibility transformer that rewrites advanced asynchronous patterns into standard JavaScript. It includes a runtime polyfill helper library to manage the iteration protocol and coordinate state transitions for the transpiled code. The tool provides capabilities for language transformation and asynchronous workflow polyfi

    JavaScript
    View on GitHub↗3,827
  • bogdan-lyashenko/under-the-hood-reactjsBogdan-Lyashenko avatar

    Bogdan-Lyashenko/Under-the-hood-ReactJS

    6,835View on GitHub↗

    This project is a technical breakdown and implementation of a user interface framework's internal architecture, focusing specifically on the mechanics of the virtual DOM, reconciliation, and component lifecycles. It serves as a resource for understanding how a core logic layer manages the transition from high-level component descriptions to physical browser elements. The project distinguishes itself by providing detailed visualizations, including flowcharts and block schemes, to map the reconciliation process and code execution paths. It explores how a platform-agnostic core can be adapted fo

    JavaScriptdebuggingfiberflow
    View on GitHub↗6,835
Compare all 30 related projects→

Frequently asked questions

What does alangpierce/sucrase do?

Sucrase is a high-speed transpilation tool that compiles modern JavaScript, TypeScript, JSX, and Flow to standard JavaScript for modern runtimes. It operates as a fast alternative to Babel, using a single-pass scanner and tokenizer that strips type annotations and applies only requested syntax transforms without building an AST or performing type checking.

What are the main features of alangpierce/sucrase?

The main features of alangpierce/sucrase are: JavaScript to TypeScript Migration, Type-Checking Skipping Pipelines, Flow Compilers, JavaScript Transpilers, JavaScript Transpilation, Type Annotation Stripping, CommonJS Converters, Single-Pass Generators.

Which projects share features with alangpierce/sucrase?

Projects with overlapping indexed features include: babel/minify — This project is an AST-based code optimizer and compressor for modern ECMAScript, JSX, and TypeScript source code. It… facebookarchive/prepack — Prepack is a build-time code evaluator and JavaScript bundle optimizer. It functions as a static analysis compiler… facebook/regenerator — Regenerator is a JavaScript generator transpiler and build-time code processor. It converts ECMAScript generator… gibbok/typescript-book — The Concise TypeScript Book: A Concise Guide to Effective Development in TypeScript. Free and Open Source. bogdan-lyashenko/under-the-hood-reactjs — This project is a technical breakdown and implementation of a user interface framework's internal architecture,… swc-project/swc — This project is a high-performance compiler written in Rust that transpiles TypeScript and ECMAScript into compatible…