Use case
Framework
Owner
@Nodejs/Correct Ts Specifiers
This package transforms import specifiers from the old
tsc
(TypeScript's compiler) requirement of using.js
file extensions in source-code to import files that are actually typescript; the corrected specifiers enable source-code to be runnable by standards-compliant software like Node.js.Vercel Postgres To Neon
This is a codemod created with
codemod init
.Correct Ts Specifiers
This package transforms import specifiers from the old
tsc
(TypeScript's compiler) requirement of using.js
file extensions in source-code to import files that are actually typescript; the corrected specifiers enable source-code to be runnable by standards-compliant software like Node.js.Goto To Location Href
Codemod Description
This codemod is designed to replace specific patterns in TypeScript files with updated code logic. It transforms instances of
goto($A)
intowindow.location.href = $A;
when the$A
value is a URL starting withhttp://
orhttps://
. This refactor makes external navigation more explicit by usingwindow.location.href
.Dynamic To Static Env Transformer
This codemod transforms import {$A} from '$env/dynamic/public'; and import {$A} from '$env/dynamic/private'; into their static counterparts, replacing them with import {$A} from '$env/static/public'; and import {$A} from '$env/static/private';, respectively. It ensures compatibility for prerendered pages and static deployments.
Replace Throw With Error Call
This codemod simplifies error handling and redirects in your TypeScript project by replacing
throw error()
andthrow redirect()
statements with direct calls toerror()
andredirect()
. This change aligns with modern practices and results in cleaner, more readable code.React Router/6/Update Relative Links
This codemod modernizes
Route
andLink
components in React Router by:- Removing the deprecated
exact
prop fromRoute
. - Updating
Route
to use theelement
prop. - Rewriting dynamic
Link
andRoute
paths that use template literals like${match.url}
and${match.path}
.
- Removing the deprecated
Webpack To Rspack/Migration Recipe
This recipe is a set of codemods that will help migrate from webpack to rspack.
Webpack To Rspack/Remove Url Loader To Type Asset Inline
Rspack implements Webpack 5's Asset Modules, using asset modules to replace url-loader to 'asset/inline' for better performance.
Fastify/5/MigrationRecipe
This recipe provides a set of codemods designed to assist with migrating to Fastify 5. Each codemod addresses specific changes and enhancements introduced in Fastify 5.
Fastify/5/Replace Hardcoded Url In Hasroute
This codemod highlights the shift in how routes with dynamic parameters should be referenced in
fastify.hasRoute
in Fastify v5.Meteor/V3/Add Await To Async Webapp Methods
Below are some webapp methods which are now async, thats why added await
Ethers/6/Utilities
This codemod does tranformation based on changes in the utils in ethers.js
Ethers/6/Providers
In addition to all the
ethers.providers.*
being moved toethers.*
, the biggest change developers need to keep in mind is that Web3Provider (which historically was used to wrap link-web3 providers) is now called BrowserProvider which is designed to wrap EIP-1193 providers, which is the standard that both modern Web3.js and injected providers offer.Fastify/4/Migration Recipe
This recipe is a set of codemods that will help migrate to Fastify 4.
Fastify/4/Url Params Optional
This codemod declares the optional parameters explicitly.
Msw/2/Upgrade Recipe
This recipe is a set of codemods that will upgrade your project from using msw v1 to v2.
Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
by@alexbit-codemodMsw/2/Type Args
There is a change to generic type interface of
rest.method()
calls. This codemod puts the generic arguments in the correct order to keep type safety.Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
by@codemod
Msw/2/Request Changes
Following the original msw upgrade guide, the signature of the request handler have changed. Some of the parameters have changed their type, some widely used objects are available directly on the callback argument object for convenience. Following changes are applied by this codemod:
Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
by@codemod
Msw/2/Callback Signature
Following the original msw upgrade guide, the signature of the request handler have changed. This codemod hard replaces the callback signature to the new one and cleans up unused variables.
Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
by@codemod