You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ Inspired by [react-codemod](https://github.com/reactjs/react-codemod).
37
37
38
38
### Transformation List
39
39
40
+
-`new-component-api`
40
41
-`vue-class-component-v8`
41
42
-`new-global-api`
42
43
-`vue-router-v4`
@@ -69,6 +70,11 @@ Inspired by [react-codemod](https://github.com/reactjs/react-codemod).
69
70
-`v-bind-order-sensitive`
70
71
-`v-for-v-if-precedence-changed`
71
72
-`remove-listeners`
73
+
-`v-bind-sync`
74
+
-`remove-v-on-native`
75
+
-`router-link-event-tag`
76
+
-`router-link-exact`
77
+
-`router-view-keep-alive-transition`
72
78
73
79
### Migrating from Vue 2 to Vue 3
74
80
@@ -92,8 +98,6 @@ Legend of annotations:
92
98
93
99
#### Fixable in ESLint
94
100
95
-
-[RFC05: Replace `v-bind`'s `.sync` with a `v-model` argument](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0005-replace-v-bind-sync-with-v-model-argument.md)
96
-
- Can be detected and fixed by the [`vue/no-deprecated-v-bind-sync`](https://eslint.vuejs.org/rules/no-deprecated-v-bind-sync.html) ESLint rule
97
101
-[RFC14: Remove `keyCode` support in `v-on`](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0014-drop-keycode-support.md)
98
102
- Can be detected and fixed by the [`vue/no-deprecated-v-on-number-modifiers`](https://eslint.vuejs.org/rules/no-deprecated-v-on-number-modifiers.html) ESLint rule
99
103
-`config.keyCode` can be supported in the compat build. It is also detectable with the [`vue/no-deprecated-vue-config-keycodes`](https://eslint.vuejs.org/rules/no-deprecated-vue-config-keycodes.html) ESLint rule
@@ -126,6 +130,13 @@ Legend of annotations:
126
130
2. If there's exactly one entry file and one root instance, but several other files are also using `Vue.*`, then transform the entry file to export the root instance, import it in other files and transform them with the imported root instance;
127
131
3. If there are more than one entry file or root instances, then the user needs to manually export the root instances, re-apply this codemod to those non-entry files with an argument designating the root instance.
128
132
- 🔵 Detect and warn on `optionMergeStrategies` behavior change
133
+
-[RFC04: Global API treeshaking](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0004-global-api-treeshaking.md)
134
+
- implemented as **`tree-shaking`**
135
+
-`Vue.nextTick()` -> `nextTick()`
136
+
-`Vue.observable()` -> `reactive()`
137
+
-`Vue.version` -> `version`
138
+
-[RFC05: Replace `v-bind`'s `.sync` with a `v-model` argument](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0005-replace-v-bind-sync-with-v-model-argument.md)
139
+
- Can be detected and fixed by the [`vue/no-deprecated-v-bind-sync`](https://eslint.vuejs.org/rules/no-deprecated-v-bind-sync.html) ESLint rule
129
140
-[RFC07: Functional and async components API change](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0007-functional-async-api-change.md)
130
141
- 🔵 a compatibility mode can be provided for functional components for one-at-a-time migration
131
142
- Can be detected by the [`vue/no-deprecated-functional-template`](https://eslint.vuejs.org/rules/no-deprecated-functional-template.html) ESLint rule
@@ -137,6 +148,10 @@ Legend of annotations:
137
148
- 🔵 It's possible to provide a compat plugin that patches render functions and make them expose a 2.x compatible arguments, and can be turned off in each component for a one-at-a-time migration process.
138
149
- 🔴 It's also possible to provide a codemod that auto-converts `h` calls to use the new VNode data format, since the mapping is pretty mechanical.
139
150
- 🔴 Functional components using context will likely have to be manually migrated, but a similar adaptor can be provided.
151
+
-[RFC09: Global mounting/configuration API change](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0009-global-api-change.md)
152
+
-`Vue.component` will be changed to `app.component` and it will be applied in the way of plugin, implemented as **`new-component-api`**
153
+
-`Vue.use` -> `createApp().use`
154
+
- 🔴 other api maybe need to be adjusted manually
140
155
-[RFC12: Custom directive API change](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0012-custom-directive-api-change.md)
141
156
-`bind` -> `beforeMount`
142
157
-`inserted` -> `mounted`
@@ -199,8 +214,6 @@ Legend of annotations:
199
214
200
215
> Note: there are just rough ideas. Amendments may or may not be proposed, depending on the implementation progress of this repo.
201
216
202
-
- 🔵 [RFC04: Global API treeshaking](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0004-global-api-treeshaking.md) & [RFC09: Global mounting/configuration API change](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0009-global-api-change.md)
203
-
-`Vue.extend` can be supported in a compat runtime as an alias to `defineComponent`
204
217
- 🔵 [RFC11: Component `v-model` API change](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0011-v-model-api-change.md)
205
218
- I don't have a clear idea on how to progressively migrate the `v-model` API because both the author and consumer of the components need to change their ways to use this API, according to the current RFC. So we might need a compatibility layer in the runtime.
0 commit comments