npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-upgrade-tool

v1.0.36

Published

Tool to aid in Vue 2 -> Vue 3 migration

Downloads

731

Readme

vue-upgrade-tool

NPM License NPM Version GitHub Actions Workflow Status

A codemod built on vue-metamorph to upgrade Vue 2 projects to Vue 3.

It will upgrade JS/TS files, SFCs, and unit tests.

[!IMPORTANT] Results are not guaranteed to be perfect! You should manually verify every single change this tool made. There are probably edge cases I missed here. Please open a GitHub Issue if you spot something it did wrong, or if it should have transformed/reported on something and didn't!

[!NOTE] vue-metamorph does not print well-formatted code when making changes. Use a formatting tool such as eslint or prettier to fix formatting in accordance with your project's code style conventions

Usage

Since the list of manual migrations can be large depending on your project, it's recommended to pipe the output into a file.

npx vue-upgrade-tool --files 'src/**/*' > vue_upgrade_output

To run only some transformations, lookup their IDs in the table below or find them using npx vue-upgrade-tool --list-plugins, then pass them via the --plugins flag using a micromatch pattern. To use multiple micromatch patterns, pass --plugins multiple times:

npx vue-upgrade-tool --files 'src/**/*' --plugins 'vue-*' --plugins 'test-utils-*' > vue_upgrade_output

Vue

| Plugin | Plugin Name | Migration Type | Migration Guide | | - | - | - | - | | new emits option | vue-emits-sfc / vue-emits-non-sfc | automatic | Link | | array watchers should be deep | vue-array-watch | automatic | Link | | data option must return a function | vue-data-function | automatic | Link | | component options wrapped with defineComponent() | vue-defineComponent | automatic | Link | | Vue.delete() / this.$delete() rewritten to delete expression | vue-delete | automatic | Link | | remove .native modifier from v-on directives | vue-v-on-native | automatic | Link | | remove functional component markers | vue-functional-component | automatic | Link | | render function h() | vue-contextual-h |automatic | Link | | hook: events renamed to vue: | vue-hook-events | automatic | Link | | $nextTick() | vue-nextTick | automatic | Link | | $scopedSlots removed | vue-scoped-slots | automatic | Link | | Vue.set() removed | vue-set / vue-set-manual | automatic | Link | | v-bind:foo.sync becomes v-model:foo | vue-v-bind-sync | automatic | Link | | $listeners removed | vue-remove-$listeners / vue-remove-$listeners-manual | automatic / manual | Link | | destroyed and beforeDestroy lifecycle hooks renamed | vue-lifecycle-hooks | automatic | Link | | v-model updates | vue-v-model | automatic | Link | | transition-group no longer renders a root element | vue-transition-group-root-element | automatic | Link | | transition props were renamed | vue-transition-props | automatic | Link | | is attribute can only be used on a <component> tag | vue-is-attribute | manual | Link | | $children removed | vue-$children | manual | Link | | v-if / v-for precedence changed | vue-if-for-precedence | manual | Link | | vue filters removed | vue-filters | manual | Link | | global application instance / app instantiation | vue-globals | manual | Link |

Vue Router

| Plugin | Plugin Name | Migration Type | Migration Guide | | - | - | - | - | | vue-router instantiation changed (WIP) | vue-router-instantiation | automatic | Link | | currentRoute.something becomes currentRoute.value.something | not yet implemented | automatic | Link | | onReady replaced with isReady | vue-router-onReady | automatic | Link | | router.getMatchedComponents() removed | vue-router-getMatchedComponents' | automatic | Link | | passing slot content to router-view | vue-router-view-slot-content | automatic | Link | | RouteConfig, Location, Route types renamed | not yet implemented | automatic | Link | | router.app removed | vue-router-router.app | manual | Link | | catch-all routes syntax changed | vue-router-catch-all | manual | Link | | append prop in router-link removed | vue-router-link-props | manual | Link | | event and tag props in router-link removed | vue-router-link-props | manual | Link | | exact prop in router-link removed | vue-router-link-props | manual | Link | | router.match() removed | vue-router-match | manual | Link |

Vuex

| Plugin | Plugin Name |Migration Type | Migration Guide | | - | - | - | - | | Store instantiation changed | vuex-instantiation | automatic | Link |

Vue Test Utils

| Plugin | Plugin Name |Migration Type | Migration Guide | | - | - | - | - | | propsData mount option renamed to props | test-utils-propsData | automatic | Link | | new global mount option | test-utils-global-mount-options | automatic | Link | | wrapper.destroy() renamed to wrapper.unmount() | test-utils-wrapper-destroy | automatic | Link | | scopedSlots option merged with slots | test-utils-scoped-slots-mount-option | automatic | Link | | createLocalVue removed | test-utils-createLocalVue | manual | Link | | Wrapper APIs removed | test-utils-removed-wrapper-apis | manual | Link |