ember-codemod-v1-to-v2 1.4.0 → 1.5.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.
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
// up your addon's public API. Also make sure your package.json#exports
|
|
21
21
|
// is aligned to the config here.
|
|
22
22
|
// See https://github.com/embroider-build/embroider/blob/main/docs/v2-faq.md#how-can-i-define-the-public-exports-of-my-addon
|
|
23
|
-
addon.publicEntrypoints(['**/*.js', 'index.
|
|
23
|
+
<% if (options.packages.addon.hasTypeScript) { %>addon.publicEntrypoints(['**/*.js', 'index.ts'<% if (options.packages.addon.hasGlint) {%>, 'template-registry.ts'<% } %>]),<% } else { %>addon.publicEntrypoints(['**/*.js', 'index.js']),<% } %>
|
|
24
24
|
|
|
25
25
|
// These are the modules that should get reexported into the traditional
|
|
26
26
|
// "app" tree. Things in here should also be in publicEntrypoints above, but
|
|
@@ -12,7 +12,16 @@ function moveAddonFolder(options) {
|
|
|
12
12
|
}
|
|
13
13
|
function moveAddonTestSupportFolder(options) {
|
|
14
14
|
const { locations, projectRoot } = options;
|
|
15
|
-
|
|
15
|
+
let filePaths = findFiles('addon-test-support/index.{js,ts}', {
|
|
16
|
+
projectRoot,
|
|
17
|
+
});
|
|
18
|
+
if (filePaths.length === 1) {
|
|
19
|
+
const oldPath = filePaths[0];
|
|
20
|
+
const newPath = `${locations.addon}/src/test-support${oldPath.endsWith('.ts') ? '.ts' : 'js'}`;
|
|
21
|
+
moveFiles(new Map([[oldPath, newPath]]), options);
|
|
22
|
+
}
|
|
23
|
+
filePaths = findFiles('addon-test-support/**/*', {
|
|
24
|
+
ignoreList: ['addon-test-support/index.{js,ts}'],
|
|
16
25
|
projectRoot,
|
|
17
26
|
});
|
|
18
27
|
const filePathMap = mapFilePaths(filePaths, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-codemod-v1-to-v2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Codemod to convert Ember addons to v2 addon format",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codemod",
|
|
@@ -39,14 +39,14 @@
|
|
|
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.
|
|
42
|
+
"@types/node": "^18.19.47",
|
|
43
43
|
"@types/yargs": "^17.0.33",
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
45
|
-
"@typescript-eslint/parser": "^8.
|
|
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
51
|
"eslint-plugin-n": "^17.10.2",
|
|
52
52
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -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",
|