Use case
Framework
Owner
Correct Ts Specifiers
This package transforms import specifiers in source-code from the broken state TypeScript's compiler (
tsc
) required (prior TypeScript v5.7 RC) into proper ones. This is useful when source-code is processed by standards-compliant software like Node.js. This is a one-and-done process, and the updated source-code should be committed to your version control (ex git); thereafter, source-code import statements should be authored compliant with the ECMAScript (JavaScript) standard.React/Update React Imports
This codemod transforms React imports to use named imports instead of default or namespace imports. This helps reduce bundle size by allowing better tree-shaking of unused React exports.
Import Change Js To Ts Extensions
This codemod changes
.js
to.ts
file extension in relative, top-level imports. If no.js
file extension was previously used, it adds.ts
file extension instead.Import Add Js Extensions
This codemod adds
.js
file extension to relative, top-level imports.Deno Replace Import Assertions
This codemod helps migrate JavaScript/TypeScript files from using the deprecated import assertions syntax to the updated import attributes syntax. The change aligns with the updated proposal for import attributes and ensures compatibility with newer versions of runtimes like Deno 2 and modern browsers that have already removed support for import assertions.
Deno Remove Node:Process Import
This codemod removes redundant import process from 'node:process'; statements, as process is now globally available in Deno v2
Deno Import STL Types
This codemod updates deprecated Deno typescript interfaces in your codebase. It automatically imports the necessary typscript interfaces from the standard library
Remix/2/React Router/Upgrade
This codemod automates most of the manual steps outlined in the Remix to React Router upgrade guide.
React Router/6/UseHistory To UseNavigate
This codemod migrates
useHistory
touseNavigate
in React Router codebases. It replacesuseHistory
imports and updates all instances ofhistory.push
,history.replace
,go
,goBack
, andgoForward
to align with theuseNavigate
API.React Router/6/Switch To Routes
This codemod updates
Switch
components toRoutes
in React Router, in line with React Router v6 and newer. It also adjusts the imports, replacingSwitch
withRoutes
inreact-router-dom
import statements.React Router/6/Migrate StaticRouter Import
This codemod updates imports of
StaticRouter
to use thereact-router-dom/server
package instead ofreact-router-dom
, in line with updated React Router requirements.React Router/6/Replace UseRouteMatchWithUseMatch
This codemod updates
useRouteMatch
calls to the neweruseMatch
function inreact-router-dom
. It also adjusts any arguments passed touseRouteMatch
, changingstrict
toend
andsensitive
tocaseSensitive
. Additionally, it ensures that imports are updated to reflect the removal ofuseRouteMatch
.React Router/5.1/Redirect To Navigate
This codemod updates deprecated
Redirect
components fromreact-router-dom
to the modernNavigate
API. It also updates the imports by replacingRedirect
withNavigate
.React Router/6/React Router Config To Use Routes
This codemod helps update code that uses
react-router-config
to the modernuseRoutes
API fromreact-router-dom
. It removesrenderRoutes
from imports and replaces it withuseRoutes
. Manual adjustments might be required after running the codemod, especially if other customizations exist in your routing logic.Minimatch To Named Imports
Example
This codemod turns default import statements for minimatch to named imports.
React Router/7/Update Imports
In v7 the react-router and react-router-dom packages are combined so this codemod import everything directly from "react-router" except for the RouterProvider exception.
Reka Ui/Import Update
The primary change in imports is replacing radix-vue with reka-ui.
Webpack/V5/Migration Recipe
This recipe is a set of codemods that will help migrate webpack v4 to v5.
Webpack/V5/Json Imports To Default Imports
This codemod migrates imports from JSON modules that use named exports to use default exports instead.
Remix Js/V2/Remix 1 Replace Response With Create Readable Stream
ne place this is likely to surface and require a change is your app/entry.server.tsx file, where you'll also need to convert the Node PassThrough into a web ReadableStream via createReadableStreamFromReadable