
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
zent-codemod
Advanced tools
**⚠️ Codemods are not guaranteed to be safe for all inputs, you must review the output.**
⚠️ Codemods are not guaranteed to be safe for all inputs, you must review the output.
Before using zent-codemod in your project, please CLEAN WORKING TREE of git to allow rollback after transform.
It's NOT guaranteed that all breaking changes detected. Anyway, It's necessary to look through Change Log.
⚠️ Codemods inferences components that be used in a file by analyzing import statements. This means the components which be imported by object destruction like const { Trigger } = Popover CANNOT be discovered by analyzer.
explicit-optional-props: Explicitly pass optional props whose default value has breaking change.
legacy-to-compat: Move legacy components to @zent/compat.
refactor-loading: Transform Loading elements as much as possible. Only for --target 7
remove-deprecated-props: Remove deprecated props.
rename-props: Rename props whose name has been change.
rename-string: Rename literal string of some props which has been renamed.
switch-boolean-props: Switch props which is boolean type as much as possible, and rename them ( if necessary ).
cannot-transform: list the changes cannot be transformed.
run yarn test to see the testing transform.
zent-codemod [transformer] [pattern] [options]
# use configuration file
zent-codemod
# run specified transformer with pattern
zent-codemod \
legacy-to-compat \
"./src/**/*.{js,jsx,tsx}" \
-t 7
# run all transformers
zent-codemod all "./src/**/*.+(js,jsx,tsx)"
falsefalseoutput enabled, default is typescript'auto' | 'single' | 'double' is valid, default is autofalse{
  "pattern": "**/*",
  "transformers": ["legacy-to-compat"],
  "options": {
    "target": 8,
    "silent": false,
    "output": false,
    "color": "typescript",
    "quote": "auto",
    "force": false
  }
}
FAQs
**⚠️ Codemods are not guaranteed to be safe for all inputs, you must review the output.**
We found that zent-codemod demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.