ember-codemod-v1-to-v2 0.7.1 → 0.7.2-alpha.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 +7 -9
- package/dist/src/utils/blueprints/blueprints-root.js +1 -1
- package/package.json +3 -4
- /package/{blueprints → dist/src/blueprints}/ember-addon/__addonLocation__/.eslintignore +0 -0
- /package/{blueprints → dist/src/blueprints}/ember-addon/__addonLocation__/addon-main.cjs +0 -0
- /package/{blueprints → dist/src/blueprints}/ember-addon/__addonLocation__/babel.config.json +0 -0
- /package/{blueprints → dist/src/blueprints}/ember-addon/__addonLocation__/rollup.config.mjs +0 -0
- /package/{blueprints → dist/src/blueprints}/ember-addon/__addonLocation__/unpublished-development-types/index.d.ts +0 -0
- /package/{blueprints → dist/src/blueprints}/ember-addon/__gitignore__ +0 -0
- /package/{blueprints → dist/src/blueprints}/ember-addon/__testAppLocation__/ember-cli-build.js +0 -0
- /package/{blueprints → dist/src/blueprints}/ember-addon/__testAppLocation__/types/global.d.ts +0 -0
- /package/{blueprints → dist/src/blueprints}/ember-addon/package.json +0 -0
- /package/{blueprints → dist/src/blueprints}/ember-addon/pnpm-workspace.yaml +0 -0
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ You can check [`ember-container-query`](https://github.com/ijlee2/ember-containe
|
|
|
20
20
|
Step 1. Quickly migrate to [v2 format](https://github.com/embroider-build/embroider/blob/main/ADDON-AUTHOR-GUIDE.md).<sup>1</sup>
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
cd <your/project
|
|
23
|
+
cd <path/to/your/project>
|
|
24
24
|
npx ember-codemod-v1-to-v2 <arguments>
|
|
25
25
|
```
|
|
26
26
|
|
|
@@ -38,8 +38,6 @@ Step 3. Review the test-app package.
|
|
|
38
38
|
|
|
39
39
|
Step 4. Review the workspace root including CI/CD.
|
|
40
40
|
|
|
41
|
-
Step 5. Celebrate.
|
|
42
|
-
|
|
43
41
|
<sup>1. Before running `ember-codemod-v1-to-v2`, consider [meeting the prerequisites](https://github.com/embroider-build/embroider/blob/v1.8.3/PORTING-ADDONS-TO-V2.md#part-3-prerequisites-for-v2-addon). You can run [`ember-codemod-pod-to-octane`](https://github.com/ijlee2/ember-codemod-pod-to-octane) to un-pod a v1 addon.</sup>
|
|
44
42
|
|
|
45
43
|
<sup>2. Files such as `.eslintrc.js`, `.gitignore`, `babel.config.json` (addon only), `config/environment.js` (test-app only), `ember-cli-build.js` (test-app only), `package.json`, `rollup.config.mjs` (addon only), `tsconfig.json`, etc.</sup>
|
|
@@ -52,10 +50,10 @@ In most cases, I recommend running the codemod without any arguments (i.e. allow
|
|
|
52
50
|
<details>
|
|
53
51
|
<summary>Optional: Specify the addon location</summary>
|
|
54
52
|
|
|
55
|
-
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
|
|
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.
|
|
56
54
|
|
|
57
55
|
```sh
|
|
58
|
-
npx ember-codemod-v1-to-v2 --addon-location="packages/ui
|
|
56
|
+
npx ember-codemod-v1-to-v2 --addon-location="packages/ui/buttons"
|
|
59
57
|
```
|
|
60
58
|
|
|
61
59
|
</details>
|
|
@@ -66,7 +64,7 @@ npx ember-codemod-v1-to-v2 --addon-location="packages/ui-buttons"
|
|
|
66
64
|
Pass `--root` to run the codemod on a project somewhere else (i.e. not in the current directory).
|
|
67
65
|
|
|
68
66
|
```sh
|
|
69
|
-
npx ember-codemod-v1-to-v2 --root=<your/project
|
|
67
|
+
npx ember-codemod-v1-to-v2 --root=<path/to/your/project>
|
|
70
68
|
```
|
|
71
69
|
|
|
72
70
|
</details>
|
|
@@ -77,7 +75,7 @@ npx ember-codemod-v1-to-v2 --root=<your/project/path>
|
|
|
77
75
|
By default, the test-app package lives in the folder `test-app`. Pass `--test-app-location` to override the logic.
|
|
78
76
|
|
|
79
77
|
```sh
|
|
80
|
-
npx ember-codemod-v1-to-v2 --test-app-location="docs"
|
|
78
|
+
npx ember-codemod-v1-to-v2 --test-app-location="docs-app"
|
|
81
79
|
```
|
|
82
80
|
|
|
83
81
|
</details>
|
|
@@ -101,13 +99,13 @@ The codemod is designed to cover typical uses of an Ember addon. It is not desig
|
|
|
101
99
|
To better meet your needs, consider cloning the repo and running the codemod locally.
|
|
102
100
|
|
|
103
101
|
```sh
|
|
104
|
-
cd <
|
|
102
|
+
cd <path/to/cloned/repo>
|
|
105
103
|
|
|
106
104
|
# Compile TypeScript
|
|
107
105
|
pnpm build
|
|
108
106
|
|
|
109
107
|
# Run codemod
|
|
110
|
-
./dist/bin/ember-codemod-v1-to-v2.js --root=<your/project
|
|
108
|
+
./dist/bin/ember-codemod-v1-to-v2.js --root=<path/to/your/project>
|
|
111
109
|
```
|
|
112
110
|
|
|
113
111
|
You can also look at another codemod called [`ember-addon-migrator`](https://github.com/NullVoxPopuli/ember-addon-migrator).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import { getFilePath } from '@codemod-utils/blueprints';
|
|
3
3
|
const fileURL = import.meta.url;
|
|
4
|
-
export const blueprintsRoot = join(getFilePath(fileURL), '
|
|
4
|
+
export const blueprintsRoot = join(getFilePath(fileURL), '../../blueprints');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-codemod-v1-to-v2",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2-alpha.2",
|
|
4
4
|
"description": "Codemod to convert Ember addons to v2 addon format",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codemod",
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
"test": "tests"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
-
"blueprints",
|
|
28
27
|
"dist"
|
|
29
28
|
],
|
|
30
29
|
"dependencies": {
|
|
@@ -72,13 +71,13 @@
|
|
|
72
71
|
}
|
|
73
72
|
},
|
|
74
73
|
"scripts": {
|
|
75
|
-
"build": "
|
|
74
|
+
"build": "./build.sh --production",
|
|
76
75
|
"changelog": "lerna-changelog",
|
|
77
76
|
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
|
|
78
77
|
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
|
|
79
78
|
"lint:js": "eslint . --cache",
|
|
80
79
|
"lint:js:fix": "eslint . --fix",
|
|
81
80
|
"lint:types": "tsc --noEmit",
|
|
82
|
-
"test": "
|
|
81
|
+
"test": "./build.sh --test && mt dist-for-testing --quiet"
|
|
83
82
|
}
|
|
84
83
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{blueprints → dist/src/blueprints}/ember-addon/__testAppLocation__/ember-cli-build.js
RENAMED
|
File without changes
|
/package/{blueprints → dist/src/blueprints}/ember-addon/__testAppLocation__/types/global.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|