Socket
Socket
Sign inDemoInstall

clipanion-v3-codemod

Package Overview
Dependencies
290
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    clipanion-v3-codemod

Clipanion v2 to v3 codemod


Version published
Weekly downloads
3
Maintainers
1
Install size
6.72 MB
Created
Weekly downloads
 

Readme

Source

clipanion-v3-codemod

Clipanion v2 to v3 codemod

npm GitHub Actions Node Workflow License


clipanion-v3-codemod is a Clipanion v2 to v3 codemod written with jscodeshift. It can migrate most Clipanion v2 code, with a few exceptions (warnings will be emitted):

  • static schema (and Command.Schema) - has to be manually migrated to Typanion
  • multiple option decorators on the same class property - this isn't supported by Clipanion v3

Features

  • Transforms Command.* class property decorators into Option.* class property initializers
  • Transforms Command.Path decorators into static paths
  • Transforms Command.Entries.* to Builtins.*Command
  • Transforms Command.addPath fallback usage into push calls to the Command.paths static property
  • Transforms Command.addOption fallback usage into Option.* initializers

Installation

Using Yarn:

yarn add clipanion-v3-codemod jscodeshift -D

Using npm:

npm install clipanion-v3-codemod jscodeshift -D

TypeScript type definitions are included out-of-the-box.

Usage

Using with Yarn:

yarn jscodeshift -t $(yarn node -p "require.resolve('clipanion-v3-codemod')") <path>

Using with npx:

npx jscodeshift -t $(node -p "require.resolve('clipanion-v3-codemod')") <path>

Keywords

FAQs

Last updated on 13 Sep 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc