ember-codemod-v1-to-v2 1.1.0 → 1.2.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.
@@ -9,7 +9,6 @@
9
9
  }
10
10
  ],
11
11
  <% } %> "@embroider/addon-dev/template-colocation-plugin",
12
- "@babel/plugin-transform-class-static-block",
13
12
  [
14
13
  "babel-plugin-ember-template-compilation",
15
14
  {
@@ -17,7 +16,13 @@
17
16
  "transforms": []
18
17
  }
19
18
  ],
20
- ["@babel/plugin-proposal-decorators", { "version": "legacy" }],
21
- "@babel/plugin-transform-class-properties"
19
+ [
20
+ "module:decorator-transforms",
21
+ {
22
+ "runtime": {
23
+ "import": "decorator-transforms/runtime"
24
+ }
25
+ }
26
+ ]
22
27
  ]
23
28
  }
@@ -2,6 +2,7 @@
2
2
  // These will *not* be published as part of your addon, so be careful that your published code does not rely on them!
3
3
  <% if (options.packages.addon.hasGlint) { %>
4
4
  import '@glint/environment-ember-loose';
5
+ // import '@glint/environment-ember-template-imports';
5
6
 
6
7
  declare module '@glint/environment-ember-loose/registry' {
7
8
  // Remove this once entries have been added! 👇
@@ -14,7 +14,7 @@ export function updateDependencies(packageJson, options) {
14
14
  Array.from(packagesToDelete).forEach((packageName) => {
15
15
  dependencies.delete(packageName);
16
16
  });
17
- const packagesToInstall = ['@embroider/addon-shim'];
17
+ const packagesToInstall = ['@embroider/addon-shim', 'decorator-transforms'];
18
18
  packagesToInstall.forEach((packageName) => {
19
19
  const version = getVersion(packageName, options);
20
20
  dependencies.set(packageName, version);
@@ -16,9 +16,6 @@ export function updateDevDependencies(packageJson, options) {
16
16
  devDependencies.clear();
17
17
  const packagesToInstall = new Set([
18
18
  '@babel/core',
19
- '@babel/plugin-proposal-decorators',
20
- '@babel/plugin-transform-class-properties',
21
- '@babel/plugin-transform-class-static-block',
22
19
  '@babel/runtime',
23
20
  '@embroider/addon-dev',
24
21
  '@rollup/plugin-babel',
@@ -11,6 +11,7 @@ function setCompilerOptions(tsConfigJson, options) {
11
11
  compilerOptions.set('allowImportingTsExtensions', true);
12
12
  compilerOptions.set('allowJs', true);
13
13
  compilerOptions.set('declarationDir', 'declarations');
14
+ compilerOptions.set('rootDir', './src');
14
15
  if (!packages.addon.hasGlint) {
15
16
  compilerOptions.set('declaration', true);
16
17
  compilerOptions.set('emitDeclarationOnly', true);
@@ -1,24 +1,22 @@
1
1
  import { decideVersion } from '@codemod-utils/blueprints';
2
2
  const latestVersions = new Map([
3
- ['@babel/core', '7.23.2'],
4
- ['@babel/plugin-proposal-decorators', '7.22.15'],
5
- ['@babel/plugin-transform-class-properties', '7.22.5'],
6
- ['@babel/plugin-transform-class-static-block', '7.22.11'],
7
- ['@babel/plugin-transform-typescript', '7.22.15'],
8
- ['@babel/runtime', '7.23.2'],
9
- ['@embroider/addon-dev', '4.1.1'],
10
- ['@embroider/addon-shim', '1.8.6'],
11
- ['@embroider/test-setup', '3.0.2'],
3
+ ['@babel/core', '7.23.6'],
4
+ ['@babel/plugin-transform-typescript', '7.23.6'],
5
+ ['@babel/runtime', '7.23.6'],
6
+ ['@embroider/addon-dev', '4.1.3'],
7
+ ['@embroider/addon-shim', '1.8.7'],
8
+ ['@embroider/test-setup', '3.0.3'],
12
9
  ['@rollup/plugin-babel', '6.0.4'],
13
- ['@tsconfig/ember', '3.0.2'],
10
+ ['@tsconfig/ember', '3.0.3'],
14
11
  ['babel-plugin-ember-template-compilation', '2.2.1'],
15
12
  ['concurrently', '8.2.2'],
16
- ['ember-auto-import', '2.6.3'],
13
+ ['decorator-transforms', '1.0.1'],
14
+ ['ember-auto-import', '2.7.1'],
17
15
  ['ember-cli-babel', '8.1.0'],
18
16
  ['ember-cli-htmlbars', '6.3.0'],
19
- ['rollup', '4.3.0'],
17
+ ['rollup', '4.9.1'],
20
18
  ['rollup-plugin-copy', '3.5.0'],
21
- ['typescript', '5.2.2'],
19
+ ['typescript', '5.3.3'],
22
20
  ]);
23
21
  export function getVersion(packageName, options) {
24
22
  const { packages } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-codemod-v1-to-v2",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Codemod to convert Ember addons to v2 addon format",
5
5
  "keywords": [
6
6
  "codemod",
@@ -29,32 +29,32 @@
29
29
  "dependencies": {
30
30
  "@codemod-utils/blueprints": "^1.1.0",
31
31
  "@codemod-utils/files": "^1.1.0",
32
- "@codemod-utils/json": "^1.1.1",
32
+ "@codemod-utils/json": "^1.1.3",
33
33
  "strip-json-comments": "^5.0.1",
34
34
  "yargs": "^17.7.2"
35
35
  },
36
36
  "devDependencies": {
37
- "@babel/core": "^7.23.2",
37
+ "@babel/core": "^7.23.6",
38
38
  "@codemod-utils/tests": "^1.1.1",
39
39
  "@sondr3/minitest": "^0.1.2",
40
40
  "@tsconfig/node18": "^18.2.2",
41
41
  "@tsconfig/strictest": "^2.0.2",
42
- "@types/node": "^18.18.7",
43
- "@types/yargs": "^17.0.30",
44
- "@typescript-eslint/eslint-plugin": "^6.10.0",
45
- "@typescript-eslint/parser": "^6.10.0",
42
+ "@types/node": "^18.19.3",
43
+ "@types/yargs": "^17.0.32",
44
+ "@typescript-eslint/eslint-plugin": "^6.15.0",
45
+ "@typescript-eslint/parser": "^6.15.0",
46
46
  "concurrently": "^8.2.2",
47
- "eslint": "^8.53.0",
48
- "eslint-config-prettier": "^9.0.0",
47
+ "eslint": "^8.56.0",
48
+ "eslint-config-prettier": "^9.1.0",
49
49
  "eslint-import-resolver-typescript": "^3.6.1",
50
- "eslint-plugin-import": "^2.29.0",
51
- "eslint-plugin-n": "^16.3.0",
52
- "eslint-plugin-prettier": "^5.0.1",
50
+ "eslint-plugin-import": "^2.29.1",
51
+ "eslint-plugin-n": "^16.5.0",
52
+ "eslint-plugin-prettier": "^5.1.0",
53
53
  "eslint-plugin-simple-import-sort": "^10.0.0",
54
54
  "eslint-plugin-typescript-sort-keys": "^3.1.0",
55
55
  "lerna-changelog": "^2.2.0",
56
- "prettier": "^3.0.3",
57
- "typescript": "^5.2.2"
56
+ "prettier": "^3.1.1",
57
+ "typescript": "^5.3.3"
58
58
  },
59
59
  "engines": {
60
60
  "node": "18.* || >= 20"