ember-codemod-v1-to-v2 0.8.0 → 0.9.1

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="packages/ui/buttons"
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=<path/to/your/project>
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="docs-app"
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="test-app-for-ui-buttons"
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=<path/to/your/project>
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.1-core/docs/porting-addons-to-v2.md). The blueprints were derived from [`@embroider/addon-blueprint`](https://github.com/embroider-build/addon-blueprint).
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-proposal-class-properties"
7
+ "@babel/plugin-transform-class-properties"
8
8
  ]
9
9
  }
@@ -1,6 +1,5 @@
1
1
  import { Addon } from '@embroider/addon-dev/rollup';
2
2
  import { babel } from '@rollup/plugin-babel';
3
- import { nodeResolve } from '@rollup/plugin-node-resolve';
4
3
  import copy from 'rollup-plugin-copy';
5
4
 
6
5
  const addon = new Addon({
@@ -42,11 +41,6 @@ export default {
42
41
  extensions,
43
42
  }),
44
43
 
45
- // Allows rollup to resolve imports of files with the specified extensions
46
- nodeResolve({
47
- extensions,
48
- }),
49
-
50
44
  // Ensure that standalone .hbs files are properly integrated as Javascript.
51
45
  addon.hbs(),
52
46
 
@@ -16,12 +16,11 @@ 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',
24
- '@rollup/plugin-node-resolve',
25
24
  'concurrently',
26
25
  'rollup',
27
26
  'rollup-plugin-copy',
@@ -1,14 +1,13 @@
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'],
9
9
  ['@embroider/addon-shim', '1.8.5'],
10
10
  ['@rollup/plugin-babel', '6.0.3'],
11
- ['@rollup/plugin-node-resolve', '15.1.0'],
12
11
  ['concurrently', '8.2.0'],
13
12
  ['ember-auto-import', '2.6.3'],
14
13
  ['ember-cli-babel', '7.26.11'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-codemod-v1-to-v2",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
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.1",
32
- "@codemod-utils/json": "^0.3.2",
33
- "strip-json-comments": "^5.0.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.6",
38
- "@codemod-utils/tests": "^0.2.4",
37
+ "@babel/core": "^7.22.9",
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": "^5.61.0",
46
- "@typescript-eslint/parser": "^5.61.0",
45
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
46
+ "@typescript-eslint/parser": "^6.0.0",
47
47
  "concurrently": "^8.2.0",
48
- "eslint": "^8.44.0",
48
+ "eslint": "^8.45.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": "^4.2.1",
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": "^2.8.8",
57
+ "prettier": "^3.0.0",
58
58
  "typescript": "^5.1.6"
59
59
  },
60
60
  "engines": {
61
- "node": ">= 16"
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": {