ember-codemod-v1-to-v2 1.3.1 → 1.4.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.
|
@@ -2,51 +2,83 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
root: true,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ecmaVersion: 'latest',<% if (!options.packages.addon.hasTypeScript) { %>
|
|
8
|
-
sourceType: 'module',
|
|
9
|
-
babelOptions: {
|
|
10
|
-
root: __dirname,
|
|
11
|
-
},<% } %>
|
|
12
|
-
},
|
|
13
|
-
plugins: ['ember'],
|
|
14
|
-
extends: [
|
|
15
|
-
'eslint:recommended',
|
|
16
|
-
'plugin:ember/recommended',
|
|
17
|
-
'plugin:prettier/recommended',
|
|
18
|
-
],
|
|
19
|
-
env: {
|
|
20
|
-
browser: true,
|
|
21
|
-
},
|
|
22
|
-
rules: {},
|
|
5
|
+
// Only use overrides
|
|
6
|
+
// https://github.com/ember-cli/eslint-plugin-ember?tab=readme-ov-file#gtsgjs
|
|
23
7
|
overrides: [
|
|
8
|
+
{
|
|
9
|
+
files: ['**/*.js'<%= options.packages.addon.hasTypeScript ? ", '**/*.ts'" : '' %>],
|
|
10
|
+
env: { browser: true },
|
|
11
|
+
parser: '<%= options.packages.addon.hasTypeScript ? '@typescript-eslint/parser' : '@babel/eslint-parser' %>',
|
|
12
|
+
parserOptions: {
|
|
13
|
+
ecmaVersion: 'latest',<% if (!options.packages.addon.hasTypeScript) { %>
|
|
14
|
+
sourceType: 'module',
|
|
15
|
+
babelOptions: {
|
|
16
|
+
root: __dirname,
|
|
17
|
+
},<% } %>
|
|
18
|
+
},
|
|
19
|
+
plugins: ['ember', 'import'],
|
|
20
|
+
extends: [
|
|
21
|
+
'eslint:recommended',
|
|
22
|
+
'plugin:ember/recommended',
|
|
23
|
+
'plugin:prettier/recommended',
|
|
24
|
+
],
|
|
25
|
+
rules: {
|
|
26
|
+
// require relative imports use full extensions
|
|
27
|
+
'import/extensions': ['error', 'always', { ignorePackages: true }],
|
|
28
|
+
// Add any custom rules here
|
|
29
|
+
},
|
|
30
|
+
},
|
|
24
31
|
<% if (options.packages.addon.hasTypeScript) { %> // ts files
|
|
25
32
|
{
|
|
26
|
-
files: ['**/*.ts'
|
|
33
|
+
files: ['**/*.ts'],
|
|
27
34
|
extends: [
|
|
35
|
+
'eslint:recommended',
|
|
36
|
+
'plugin:ember/recommended',
|
|
28
37
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
29
38
|
'plugin:@typescript-eslint/recommended',
|
|
39
|
+
'plugin:prettier/recommended',
|
|
30
40
|
],
|
|
31
41
|
rules: {
|
|
42
|
+
// require relative imports use full extensions
|
|
43
|
+
'import/extensions': ['error', 'always', { ignorePackages: true }],
|
|
32
44
|
// Add any custom rules here
|
|
33
45
|
},
|
|
34
46
|
},
|
|
35
|
-
// require relative imports use full extensions
|
|
36
47
|
{
|
|
37
|
-
files: ['
|
|
48
|
+
files: ['**/*.gts'],
|
|
49
|
+
parser: 'ember-eslint-parser',
|
|
50
|
+
plugins: ['ember', 'import'],
|
|
51
|
+
extends: [
|
|
52
|
+
'eslint:recommended',
|
|
53
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
54
|
+
'plugin:@typescript-eslint/recommended',
|
|
55
|
+
'plugin:ember/recommended',
|
|
56
|
+
'plugin:ember/recommended-gts',
|
|
57
|
+
'plugin:prettier/recommended',
|
|
58
|
+
],
|
|
38
59
|
rules: {
|
|
60
|
+
// require relative imports use full extensions
|
|
39
61
|
'import/extensions': ['error', 'always', { ignorePackages: true }],
|
|
62
|
+
// Add any custom rules here
|
|
40
63
|
},
|
|
41
64
|
},
|
|
42
|
-
<% }
|
|
43
|
-
|
|
44
|
-
|
|
65
|
+
<% } %> {
|
|
66
|
+
files: ['**/*.gjs'],
|
|
67
|
+
parser: 'ember-eslint-parser',
|
|
68
|
+
plugins: ['ember', 'import'],
|
|
69
|
+
extends: [
|
|
70
|
+
'eslint:recommended',
|
|
71
|
+
'plugin:ember/recommended',
|
|
72
|
+
'plugin:ember/recommended-gjs',
|
|
73
|
+
'plugin:prettier/recommended',
|
|
74
|
+
],
|
|
45
75
|
rules: {
|
|
76
|
+
// require relative imports use full extensions
|
|
46
77
|
'import/extensions': ['error', 'always', { ignorePackages: true }],
|
|
78
|
+
// Add any custom rules here
|
|
47
79
|
},
|
|
48
80
|
},
|
|
49
|
-
|
|
81
|
+
// node files
|
|
50
82
|
{
|
|
51
83
|
files: [
|
|
52
84
|
'./.eslintrc.cjs',
|
|
@@ -62,7 +94,11 @@ module.exports = {
|
|
|
62
94
|
node: true,
|
|
63
95
|
},
|
|
64
96
|
plugins: ['n'],
|
|
65
|
-
extends: [
|
|
97
|
+
extends: [
|
|
98
|
+
'eslint:recommended',
|
|
99
|
+
'plugin:n/recommended',
|
|
100
|
+
'plugin:prettier/recommended',
|
|
101
|
+
],
|
|
66
102
|
},
|
|
67
103
|
],
|
|
68
104
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { decideVersion } from '@codemod-utils/blueprints';
|
|
2
2
|
const latestVersions = new Map([
|
|
3
|
-
['@babel/core', '7.
|
|
4
|
-
['@babel/eslint-parser', '7.
|
|
5
|
-
['@babel/plugin-transform-typescript', '7.
|
|
6
|
-
['@babel/runtime', '7.
|
|
7
|
-
['@embroider/addon-dev', '
|
|
3
|
+
['@babel/core', '7.25.2'],
|
|
4
|
+
['@babel/eslint-parser', '7.25.1'],
|
|
5
|
+
['@babel/plugin-transform-typescript', '7.25.2'],
|
|
6
|
+
['@babel/runtime', '7.25.0'],
|
|
7
|
+
['@embroider/addon-dev', '5.0.0'],
|
|
8
8
|
['@embroider/addon-shim', '1.8.9'],
|
|
9
9
|
['@embroider/test-setup', '4.0.0'],
|
|
10
10
|
['@glint/core', '1.4.0'],
|
|
@@ -15,12 +15,12 @@ const latestVersions = new Map([
|
|
|
15
15
|
['@types/ember__component', '4.0.22'],
|
|
16
16
|
['@types/ember__object', '4.0.12'],
|
|
17
17
|
['@types/ember__service', '4.0.9'],
|
|
18
|
-
['@typescript-eslint/eslint-plugin', '
|
|
19
|
-
['@typescript-eslint/parser', '
|
|
18
|
+
['@typescript-eslint/eslint-plugin', '8.1.0'],
|
|
19
|
+
['@typescript-eslint/parser', '8.1.0'],
|
|
20
20
|
['babel-plugin-ember-template-compilation', '2.2.5'],
|
|
21
21
|
['concurrently', '8.2.2'],
|
|
22
22
|
['decorator-transforms', '2.0.0'],
|
|
23
|
-
['ember-auto-import', '2.7.
|
|
23
|
+
['ember-auto-import', '2.7.4'],
|
|
24
24
|
['ember-cli-babel', '8.1.0'],
|
|
25
25
|
['ember-cli-htmlbars', '6.3.0'],
|
|
26
26
|
['ember-template-lint', '6.0.0'],
|
|
@@ -28,12 +28,12 @@ const latestVersions = new Map([
|
|
|
28
28
|
['eslint-config-prettier', '9.1.0'],
|
|
29
29
|
['eslint-plugin-ember', '12.1.1'],
|
|
30
30
|
['eslint-plugin-import', '2.29.1'],
|
|
31
|
-
['eslint-plugin-n', '17.
|
|
32
|
-
['eslint-plugin-prettier', '5.1
|
|
33
|
-
['prettier', '3.3.
|
|
34
|
-
['rollup', '4.
|
|
31
|
+
['eslint-plugin-n', '17.10.2'],
|
|
32
|
+
['eslint-plugin-prettier', '5.2.1'],
|
|
33
|
+
['prettier', '3.3.3'],
|
|
34
|
+
['rollup', '4.20.0'],
|
|
35
35
|
['rollup-plugin-copy', '3.5.0'],
|
|
36
|
-
['typescript', '5.4
|
|
36
|
+
['typescript', '5.5.4'],
|
|
37
37
|
]);
|
|
38
38
|
export function getLatestVersion(packageName) {
|
|
39
39
|
if (!latestVersions.has(packageName)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-codemod-v1-to-v2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Codemod to convert Ember addons to v2 addon format",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codemod",
|
|
@@ -27,34 +27,34 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@codemod-utils/blueprints": "^1.1.
|
|
31
|
-
"@codemod-utils/files": "^2.0.
|
|
32
|
-
"@codemod-utils/json": "^1.1.
|
|
30
|
+
"@codemod-utils/blueprints": "^1.1.5",
|
|
31
|
+
"@codemod-utils/files": "^2.0.4",
|
|
32
|
+
"@codemod-utils/json": "^1.1.9",
|
|
33
33
|
"strip-json-comments": "^5.0.1",
|
|
34
34
|
"yargs": "^17.7.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@babel/core": "^7.
|
|
38
|
-
"@codemod-utils/tests": "^1.1.
|
|
37
|
+
"@babel/core": "^7.25.2",
|
|
38
|
+
"@codemod-utils/tests": "^1.1.7",
|
|
39
39
|
"@sondr3/minitest": "^0.1.2",
|
|
40
40
|
"@tsconfig/node18": "^18.2.4",
|
|
41
41
|
"@tsconfig/strictest": "^2.0.5",
|
|
42
|
-
"@types/node": "^18.19.
|
|
43
|
-
"@types/yargs": "^17.0.
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
45
|
-
"@typescript-eslint/parser": "^
|
|
42
|
+
"@types/node": "^18.19.47",
|
|
43
|
+
"@types/yargs": "^17.0.33",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
|
45
|
+
"@typescript-eslint/parser": "^8.3.0",
|
|
46
46
|
"concurrently": "^8.2.2",
|
|
47
47
|
"eslint": "^8.57.0",
|
|
48
48
|
"eslint-config-prettier": "^9.1.0",
|
|
49
|
-
"eslint-import-resolver-typescript": "^3.6.
|
|
49
|
+
"eslint-import-resolver-typescript": "^3.6.3",
|
|
50
50
|
"eslint-plugin-import": "^2.29.1",
|
|
51
|
-
"eslint-plugin-n": "^17.
|
|
52
|
-
"eslint-plugin-prettier": "^5.1
|
|
53
|
-
"eslint-plugin-simple-import-sort": "^12.1.
|
|
51
|
+
"eslint-plugin-n": "^17.10.2",
|
|
52
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
53
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
54
54
|
"eslint-plugin-typescript-sort-keys": "^3.2.0",
|
|
55
55
|
"lerna-changelog": "^2.2.0",
|
|
56
|
-
"prettier": "^3.3.
|
|
57
|
-
"typescript": "^5.4
|
|
56
|
+
"prettier": "^3.3.3",
|
|
57
|
+
"typescript": "^5.5.4"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": "18.* || >= 20"
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "./build.sh --production",
|
|
73
|
-
"lint": "concurrently
|
|
74
|
-
"lint:fix": "concurrently
|
|
73
|
+
"lint": "concurrently 'pnpm:lint:*(!fix)' --names 'lint:'",
|
|
74
|
+
"lint:fix": "concurrently 'pnpm:lint:*:fix' --names 'fix:'",
|
|
75
75
|
"lint:js": "eslint . --cache",
|
|
76
76
|
"lint:js:fix": "eslint . --fix",
|
|
77
77
|
"lint:types": "tsc --noEmit",
|