Registry / devops / vue-upgrade-tool

vue-upgrade-tool

JSON →
library1.0.37jsnpmunverified

A codemod tool for automatically migrating Vue 2 projects to Vue 3. Version 1.0.37 is the current stable release. Built on vue-metamorph, it upgrades JS/TS files, single-file components (SFCs), and unit tests. Provides over 15 plugins covering common breaking changes like emits option, data function, v-on .native removal, render function API, and more. Results require manual verification. Community-maintained on GitHub with active development.

npm install vue-upgrade-tool
INSTALL
IMPORT
SIG · VUE-UPGRADE-TOOL
V
vue-upgrade-tool
devopsjavascriptv1.0.37
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vue-upgrade-tool (CLI)
✓ npx vue-upgrade-tool --files 'src/**/*'
✗ npm install -g vue-upgrade-tool && vue-upgrade-tool
Use npx to avoid global install; project-specific usage is recommended.

Run all Vue and test-utils transformation plugins on all .vue files in src/ and save output to a file for review.

npx vue-upgrade-tool --files 'src/**/*.vue' --plugins 'vue-*' --plugins 'test-utils-*' > vue_upgrade_output.txt
Debug
Known issues
deprecatedThe `--plugins` flag accepts micromatch patterns; if you pass a comma-separated list it may not work as expected.
fix
Use multiple `--plugins` flags (e.g., `--plugins 'vue-*' --plugins 'test-utils-*'`) instead of a single comma-separated value.
affects: >=0.1.0
gotchaThe tool does not format code; output may have inconsistent formatting.
fix
Run a formatter like Prettier or ESLint after applying changes.
affects: >=0.1.0
gotchaResults are not guaranteed perfect; always manually verify each change.
fix
Review the output file and test your application after migration.
affects: >=0.1.0
breakingPlugin IDs changed between versions; refer to the plugin list with `--list-plugins`.
fix
Use `npx vue-upgrade-tool --list-plugins` to see current plugin names.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'vue-upgrade-tool'
Global install without npx or missing local dependency.
fix
Use `npx vue-upgrade-tool` or install locally with `npm install --save-dev vue-upgrade-tool`.
The `--files` pattern matched no files
Incorrect glob pattern or no files in specified directory.
fix
Check the pattern with a tool like `glob`; ensure files exist in the path.
Unrecognized plugin: 'vue-emits'
Plugin name changed or missing pattern.
fix
Use `vue-emits-sfc` or `vue-emits-non-sfc` as the plugin ID; run `--list-plugins` for exact names.
Upgrade
Version history
1.0.37latest on npm
Audit
Dependencies
vue-metamorphrequiredCore transformation engine for all codemod plugins
Agent activity
10 hits · last 30 days
node
10
Resources
vue-upgrade-tool — npm install vue-upgrade-tool · libregistry