@vkontakte/vkui-codemods 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/cli.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ Options:
|
|
|
34
34
|
-V, --version output the version number
|
|
35
35
|
-l --list list available codemods
|
|
36
36
|
--all apply all available codemods
|
|
37
|
-
|
|
37
|
+
--tv, --transforms-version <transformsVersion> vkui major version transforms (available versions: "6", "7")
|
|
38
38
|
-p --path [paths...] file paths where codemods need to apply (space separated list), default: current
|
|
39
39
|
directory
|
|
40
40
|
--input-file <file> apply codemods only to file/directory listed in the file
|
|
@@ -48,9 +48,9 @@ Options:
|
|
|
48
48
|
-h, --help display help for command
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
###
|
|
51
|
+
### `--tv (--transforms-version)`
|
|
52
52
|
|
|
53
|
-
Если приложение запустить без опции
|
|
53
|
+
Если приложение запустить без опции `--tv (--transforms-version)`, скрипт попытается автоматически определить версию, на которую необходимо мигрировать. Если этого сделать не удалось - нужно будет выбрать версию из предложенного списка.
|
|
54
54
|
|
|
55
55
|
### `--all`
|
|
56
56
|
|
|
@@ -109,5 +109,5 @@ npx @vkontakte/vkui-codemods --path src/App.tsx src/Main.tsx --all
|
|
|
109
109
|
Следующий скрипт запустит миграции компонентов `Flex` и `Separator` при обновлении на версию VKUI v7 в текущей директории:
|
|
110
110
|
|
|
111
111
|
```shell
|
|
112
|
-
npx @vkontakte/vkui-codemods flex separator
|
|
112
|
+
npx @vkontakte/vkui-codemods flex separator --tv 7
|
|
113
113
|
```
|
package/dist/cli.js
CHANGED
|
@@ -106,7 +106,7 @@ var runCli = function () { return __awaiter(void 0, void 0, void 0, function ()
|
|
|
106
106
|
.usage("".concat(chalk_1.default.green('[codemod-names...]')))
|
|
107
107
|
.option('-l --list', 'list available codemods')
|
|
108
108
|
.option('--all', 'apply all available codemods')
|
|
109
|
-
.option('
|
|
109
|
+
.option('--tv, --transforms-version <transformsVersion>', 'vkui major version transforms (available versions: "6", "7")')
|
|
110
110
|
.option('-p --path [paths...]', 'file paths where codemods need to apply (space separated list), default: current directory')
|
|
111
111
|
.option('--input-file <file>', 'apply codemods only to file/directory listed in the file')
|
|
112
112
|
.option('--log-file <file>', 'log migration instructions with required manual changes to the file instead of the console')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/vkui-codemods",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Codemods for automatic VKUI major version upgrade",
|
|
5
5
|
"repository": "https://github.com/VKCOM/VKUI",
|
|
6
6
|
"homepage": "https://vkui.io/",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@types/cross-spawn": "^6.0.6",
|
|
28
28
|
"@types/jest": "^30.0.0",
|
|
29
29
|
"@types/jscodeshift": "^17.3.0",
|
|
30
|
-
"@types/node": "^24.1
|
|
30
|
+
"@types/node": "^24.2.1",
|
|
31
31
|
"@types/prompts": "^2.4.9",
|
|
32
32
|
"jest": "^30.0.5"
|
|
33
33
|
},
|