Mmanishjha-04

meteor/v3/api-rename-express-migration

No description available

Legacy
meteorv3migration
Public
12 downloads
0 stars
How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

This codemod automates the process of updating API names from Connect to Express in your project. The codemod is specifically designed to align your codebase with the new naming conventions introduced after switching from Connect to Express in Meteor 3.0.

You can find the implementation of this codemod in the Studio here.

Overview

This codemod updates the following API names:

  • WebApp.connectHandlers.use(middleware) is now WebApp.handlers.use(middleware).
  • WebApp.rawConnectHandlers.use(middleware) is now WebApp.rawHandlers.use(middleware).
  • WebApp.connectApp is now WebApp.expressApp.

Examples

Example 1: Updating Middleware Handlers

This codemod updates the API names for middleware handlers.

Before

ts

After

ts

Example 2: Updating WebApp Instance

This codemod updates the WebApp.connectApp to the new WebApp.expressApp.

Before

ts

After

ts

Ready to contribute?

Build your own codemod and share it with the community.