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

salt-codemod

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

salt-codemod

Codemod to help upgrade Salt design system packages

  • 0.1.0-alpha.1
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
0
Weekly downloads
 
Created
Source

Code mod for Salt Design System packages, features include

  • Upgrade @salt-ds/* to latest version
  • React props migration due to deprecation, or warning when not possible
  • Import statement updates due to components being moved from lab to core
  • CSS variable renames due to deprecation
  • Warn invalid Salt CSS variables
npx salt-codemod --dryRun

Options

Use --help to see all available options.

The script will first attempt to upgrade all @salt-ds/* packages using npm-check-updates. You can skip it via --skipUpgrade.

JavaScript files are included based on tsConfig.json using ts-morph, which can be cusmised via --tsconfig "./another/path/tsConfig.json". You may override this entirely and provide files by --tsSourceGlob, which may help in a monorepo setup.

Invalid CSS variables are extracted from @salt-ds/theme/index.css, which path can be changed using --themeCss. By default all *.css|ts|tsx will be included for scanning and processing, you can change it using --cssModeGlob.

There is --mode option available if you just want to run React or CSS part of the codemod.

Local development

yarn to install all dependencies.

Run npm link in the root folder, then you'll able to run salt-codemod as if it's a command. npm unlink to undo.

FAQs

Package last updated on 03 Nov 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