Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pcln-codemods

Package Overview
Dependencies
Maintainers
0
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pcln-codemods

This package uses a modified version of Facebook's [react-codemod](https://github.com/reactjs/react-codemod) to run JSCodeshift transforms that can help you upgrade projects from DS4 to DS5.

  • 3.0.39
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
70
decreased by-82.28%
Maintainers
0
Weekly downloads
 
Created
Source

pcln-codemods

This package uses a modified version of Facebook's react-codemod to run JSCodeshift transforms that can help you upgrade projects from DS4 to DS5.

Usage

npx pcln-codemods <transform> <path> [...options]

  • transform - name of transform, see available transforms below.
  • path - files or directory to transform
  • use the --dry option for a dry-run and use --print to print the output for comparison

This will start an interactive wizard, and then run the specified transform.

Included Transforms

Note: It's recommended to run the transforms in this order because some props conflict (e.g. align on Flex and Text) and may require manual intervention after running each transform.

  • rename-deprecated-props-flex
  • rename-deprecated-props-text
  • button-fullwidth-to-width
  • stamp-variation-solid-to-fill

Caution: These codemods will not catch everything (e.g. passing a variable as a prop instead of a primitive value). Please review the changes they produce carefully and confirm that they'll behave as expected.

button-fullwidth-to-width

Replaces the fullWidth prop with width={1} on Button elements.

npx pcln-codemods button-fullwidth-to-width <path>
rename-deprecated-props-flex

Renames deprecated props on Flex elements.

  • align
  • wrap
  • justify
npx pcln-codemods rename-deprecated-props-flex <path>
rename-deprecated-props-text

Renames deprecated props on Text elements.

  • align
npx pcln-codemods rename-deprecated-props-text <path>
stamp-variation-solid-to-fill

Replaces the deprecated solid variation on Stamp elements with fill.

npx pcln-codemods stamp-variation-solid-to-fill <path>

FAQs

Package last updated on 04 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc