这是一个抽象语法树(AST)转换工具套件,旨在自动化将源代码迁移到较新版本 React 的过程。它提供了一组脚本,以编程方式修改代码结构,用现代等效项替换已弃用的 API 和组件模式。
The main features of reactjs/react-codemod are: API Version Migration Scripts, AST Transformation Tools, AST-Based Source Transformations, Automated Large-Scale Refactoring, Framework Version Migrators, Automated Migration Codemods, Source Code Transformation Engines, JavaScript Source Transformers.
Open-source alternatives to reactjs/react-codemod include: facebookarchive/codemod — Codemod is a set of software tools for performing structural source code transformations. It functions as an automated… immunant/c2rust — c2rust is a source-to-source translation suite and C-to-Rust transpiler designed to convert C source code and… react/metro — Metro is a JavaScript bundler designed for React Native environments. It functions as a system for resolving… airbnb/ts-migrate — ts-migrate is an automated migration tool designed to transform JavaScript source code into compiling TypeScript… openrewrite/rewrite — OpenRewrite is an automated refactoring engine and source-to-source migration framework. It uses a lossless semantic… browserify/browserify-handbook — The browserify-handbook is a comprehensive documentation guide for Browserify, a CommonJS module bundler and…
Codemod is a set of software tools for performing structural source code transformations. It functions as an automated codebase migration tool that utilizes abstract syntax tree manipulations rather than simple regular expressions to execute large-scale refactors across multiple files. The project distinguishes itself through an interactive transformation interface that provides colored diffs, allowing users to manually review, accept, or modify each match. It also supports a distributed refactoring workflow, which enables the segmentation of a codebase into assigned work blocks to divide mig
ts-migrate is an automated migration tool designed to transform JavaScript source code into compiling TypeScript files. It functions as a code migration framework that uses abstract syntax trees to perform large-scale refactoring and structural changes across a project. The tool provides a customizable framework for defining plugin-based transformation rules, allowing for the automation of specific code changes. It includes specialized engines for converting JSDoc type definitions into native TypeScript annotations and a utility for suppressing compiler errors by inserting type assertions or
c2rust is a source-to-source translation suite and C-to-Rust transpiler designed to convert C source code and libraries into functionally equivalent unsafe Rust code. It operates as a pipeline that preserves original behavior and data structures, producing translated code that compiles as compatible shared libraries or Rust crates. The system includes an automated Rust refactoring framework that uses pattern-based AST rewriting to transform unsafe Rust into safe, idiomatic constructs. It utilizes an ownership inference engine to determine when raw pointers can be converted into safe reference
Metro is a JavaScript bundler designed for React Native environments. It functions as a system for resolving dependencies, transforming source code, and packaging JavaScript and assets into bundles for execution. The project includes a development bundler server that hosts assets via HTTP and provides hot module replacement. It features a module resolver that handles platform-specific file extensions and a source code transformer that converts code into tree structures for optimization and minification. The toolset covers programmatic bundle generation, source map creation, and file system c