ember-codemod-v1-to-v2 0.8.0 → 0.9.0
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
CHANGED
|
@@ -53,7 +53,7 @@ In most cases, I recommend running the codemod without any arguments (i.e. allow
|
|
|
53
53
|
By default, the package name decides where the addon package lives. Pass `--addon-location` to override the logic. This may be useful if you have a workspace with many addons.
|
|
54
54
|
|
|
55
55
|
```sh
|
|
56
|
-
npx ember-codemod-v1-to-v2 --addon-location
|
|
56
|
+
npx ember-codemod-v1-to-v2 --addon-location packages/ui/buttons
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
</details>
|
|
@@ -64,7 +64,7 @@ npx ember-codemod-v1-to-v2 --addon-location="packages/ui/buttons"
|
|
|
64
64
|
Pass `--root` to run the codemod on a project somewhere else (i.e. not in the current directory).
|
|
65
65
|
|
|
66
66
|
```sh
|
|
67
|
-
npx ember-codemod-v1-to-v2 --root
|
|
67
|
+
npx ember-codemod-v1-to-v2 --root <path/to/your/project>
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
</details>
|
|
@@ -75,7 +75,7 @@ npx ember-codemod-v1-to-v2 --root=<path/to/your/project>
|
|
|
75
75
|
By default, the test-app package lives in the folder `test-app`. Pass `--test-app-location` to override the logic.
|
|
76
76
|
|
|
77
77
|
```sh
|
|
78
|
-
npx ember-codemod-v1-to-v2 --test-app-location
|
|
78
|
+
npx ember-codemod-v1-to-v2 --test-app-location docs-app
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
</details>
|
|
@@ -86,7 +86,7 @@ npx ember-codemod-v1-to-v2 --test-app-location="docs-app"
|
|
|
86
86
|
By default, the test-app package is named `test-app`. Pass `--test-app-name` to override the logic. This may be useful if you have a workspace with many addons.
|
|
87
87
|
|
|
88
88
|
```sh
|
|
89
|
-
npx ember-codemod-v1-to-v2 --test-app-name
|
|
89
|
+
npx ember-codemod-v1-to-v2 --test-app-name test-app-for-ui-buttons
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
</details>
|
|
@@ -105,7 +105,7 @@ cd <path/to/cloned/repo>
|
|
|
105
105
|
pnpm build
|
|
106
106
|
|
|
107
107
|
# Run codemod
|
|
108
|
-
./dist/bin/ember-codemod-v1-to-v2.js --root
|
|
108
|
+
./dist/bin/ember-codemod-v1-to-v2.js --root <path/to/your/project>
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
You can also look at another codemod called [`ember-addon-migrator`](https://github.com/NullVoxPopuli/ember-addon-migrator).
|
|
@@ -125,7 +125,7 @@ If you have an open-sourced addon (v1 or v2) that I can use as a reference, reac
|
|
|
125
125
|
|
|
126
126
|
## Credits
|
|
127
127
|
|
|
128
|
-
The codemod steps were based on [Migrating an Ember addon to the next-gen v2 format](https://www.kaliber5.de/de/blog/v2-addon_en) and [Guide: Porting an Addon to v2](https://github.com/embroider-build/embroider/blob/v3.1.
|
|
128
|
+
The codemod steps were based on [Migrating an Ember addon to the next-gen v2 format](https://www.kaliber5.de/de/blog/v2-addon_en) and [Guide: Porting an Addon to v2](https://github.com/embroider-build/embroider/blob/v3.1.3-core/docs/porting-addons-to-v2.md). The blueprints were derived from [`@embroider/addon-blueprint`](https://github.com/embroider-build/addon-blueprint).
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
## License
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
"@embroider/addon-dev/template-colocation-plugin",<% if (options.packages.addon.hasTypeScript) { %>
|
|
5
5
|
["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],<% } %>
|
|
6
6
|
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
|
|
7
|
-
"@babel/plugin-
|
|
7
|
+
"@babel/plugin-transform-class-properties"
|
|
8
8
|
]
|
|
9
9
|
}
|
package/dist/src/migration/ember-addon/steps/update-addon-package-json/update-dev-dependencies.js
CHANGED
|
@@ -16,8 +16,8 @@ export function updateDevDependencies(packageJson, options) {
|
|
|
16
16
|
devDependencies.clear();
|
|
17
17
|
const packagesToInstall = new Set([
|
|
18
18
|
'@babel/core',
|
|
19
|
-
'@babel/plugin-proposal-class-properties',
|
|
20
19
|
'@babel/plugin-proposal-decorators',
|
|
20
|
+
'@babel/plugin-transform-class-properties',
|
|
21
21
|
'@babel/runtime',
|
|
22
22
|
'@embroider/addon-dev',
|
|
23
23
|
'@rollup/plugin-babel',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { decideVersion } from '@codemod-utils/blueprints';
|
|
2
2
|
const latestVersions = new Map([
|
|
3
3
|
['@babel/core', '7.22.6'],
|
|
4
|
-
['@babel/plugin-proposal-class-properties', '7.18.6'],
|
|
5
4
|
['@babel/plugin-proposal-decorators', '7.22.6'],
|
|
5
|
+
['@babel/plugin-transform-class-properties', '7.22.5'],
|
|
6
6
|
['@babel/preset-typescript', '7.22.5'],
|
|
7
7
|
['@babel/runtime', '7.22.6'],
|
|
8
8
|
['@embroider/addon-dev', '3.1.1'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-codemod-v1-to-v2",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Codemod to convert Ember addons to v2 addon format",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codemod",
|
|
@@ -28,37 +28,37 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@codemod-utils/blueprints": "^0.2.1",
|
|
31
|
-
"@codemod-utils/files": "^0.5.
|
|
32
|
-
"@codemod-utils/json": "^0.3.
|
|
33
|
-
"strip-json-comments": "^5.0.
|
|
31
|
+
"@codemod-utils/files": "^0.5.2",
|
|
32
|
+
"@codemod-utils/json": "^0.3.4",
|
|
33
|
+
"strip-json-comments": "^5.0.1",
|
|
34
34
|
"yargs": "^17.7.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@babel/core": "^7.22.
|
|
38
|
-
"@codemod-utils/tests": "^0.2.
|
|
37
|
+
"@babel/core": "^7.22.8",
|
|
38
|
+
"@codemod-utils/tests": "^0.2.5",
|
|
39
39
|
"@sondr3/minitest": "^0.1.1",
|
|
40
40
|
"@tsconfig/esm": "^1.0.4",
|
|
41
41
|
"@tsconfig/node16": "^16.1.0",
|
|
42
42
|
"@tsconfig/strictest": "^2.0.1",
|
|
43
43
|
"@types/node": "^16.11.7",
|
|
44
44
|
"@types/yargs": "^17.0.24",
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
46
|
-
"@typescript-eslint/parser": "^
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
46
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
47
47
|
"concurrently": "^8.2.0",
|
|
48
48
|
"eslint": "^8.44.0",
|
|
49
49
|
"eslint-config-prettier": "^8.8.0",
|
|
50
50
|
"eslint-import-resolver-typescript": "^3.5.5",
|
|
51
51
|
"eslint-plugin-import": "^2.27.5",
|
|
52
52
|
"eslint-plugin-n": "^16.0.1",
|
|
53
|
-
"eslint-plugin-prettier": "^
|
|
53
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
54
54
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
55
55
|
"eslint-plugin-typescript-sort-keys": "^2.3.0",
|
|
56
56
|
"lerna-changelog": "^2.2.0",
|
|
57
|
-
"prettier": "^
|
|
57
|
+
"prettier": "^3.0.0",
|
|
58
58
|
"typescript": "^5.1.6"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
61
|
+
"node": "16.* || >= 18"
|
|
62
62
|
},
|
|
63
63
|
"changelog": {
|
|
64
64
|
"labels": {
|
|
@@ -66,8 +66,7 @@
|
|
|
66
66
|
"bug": "Bug Fix",
|
|
67
67
|
"enhance: code": "Enhancement",
|
|
68
68
|
"enhance: dependency": "Internal",
|
|
69
|
-
"enhance: documentation": "Documentation"
|
|
70
|
-
"user feedback": "User Feedback"
|
|
69
|
+
"enhance: documentation": "Documentation"
|
|
71
70
|
}
|
|
72
71
|
},
|
|
73
72
|
"scripts": {
|