Skip to content

Commit 88c931a

Browse files
Angular Migration Tool: Update Texts (#1008)
1 parent 7af3cab commit 88c931a

File tree

9 files changed

+43
-25
lines changed

9 files changed

+43
-25
lines changed

CHANGELOG.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1-
## v1.11.0
1+
## v1.12.1
2+
3+
- `migrate` command descriptions were updated.
4+
- Added dependency fixes.
5+
6+
## v1.12.0
7+
8+
- The `migrate` command was added to DevExtreme CLI.
9+
- The `angular-config-components` schematic was added to DevExtreme Schematics.
10+
11+
## v1.11.2
212

3-
The requirements for DevExtreme CLI were updated:
13+
- Minor improvements.
14+
15+
## v1.11.1
16+
17+
- Minor improvements.
18+
19+
## v1.11.0
420

5-
- Node.js v20.19.0 or later
6-
- npm v9.6.0 or later
21+
- The requirements for DevExtreme CLI were updated:
22+
- Node.js v20.19.0 or later.
23+
- npm v9.6.0 or later.

packages/devextreme-cli/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const run = async(commands, options) => {
4141
await application.run(commands, options, devextremeConfig.read());
4242
} else if(application.isMigrationCommand(commands[0])) {
4343
if(!commands[1]) {
44-
console.error('Please specify a change name for migration.');
44+
console.error('Please specify a migration command.');
4545
printHelp('migrate');
4646
return;
4747
}

packages/devextreme-cli/src/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const handleWrongAppType = (appType, command) => {
1919
};
2020

2121
const handleWrongChangeName = (changeName, command) => {
22-
console.error(`The '${changeName}' change name is not valid`);
22+
console.error(`Invalid migration command: ${changeName}`);
2323
printHelp(command);
2424
};
2525

packages/devextreme-cli/src/applications/application.angular.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ const migrateConfigComponents = async(options = {}) => {
194194
if(!collectionPath) {
195195
const prompts = require('prompts');
196196

197-
console.log(`\nThe '${collectionName}' package is required to run this command.`);
197+
console.log(`\nRequired package is missing: '${collectionName}'`);
198198

199199
const response = await prompts({
200200
type: 'confirm',
@@ -204,7 +204,7 @@ const migrateConfigComponents = async(options = {}) => {
204204
});
205205

206206
if(!response.install) {
207-
console.log('Migration cancelled. Install devextreme-schematics manually and rerun the command.');
207+
console.log('Migration was canceled.');
208208
process.exit(1);
209209
}
210210
}

packages/devextreme-cli/src/commands.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@
5151
}, {
5252
"name": "migrate",
5353
"description": "Migration commands for DevExtreme applications",
54-
"usage": "devextreme migrate <change name> [options]",
54+
"usage": "devextreme migrate <migration command> [options]",
5555
"arguments": [{
5656
"name": "angular-config-components",
57-
"description": "Migrate to the latest DevExtreme configuration components.",
57+
"description": "Migrates DevExtreme Angular applications to named configuration components.",
5858
"options": [{
5959
"name": "--include",
60-
"description": "Template file glob patterns to include (default: **/*.html). You can pass multiple patterns as a comma-separated string (e.g. \"**/a.html,**/b.html\") or as an array (e.g. [\"**/a.html\",\"**/b.html\"])."
60+
"description": "Template file glob patterns to include (default: **/*.html). You can pass multiple patterns as a comma-separated string (\"**/a.html,**/b.html\") or as an array ([\"**/a.html\",\"**/b.html\"])."
6161
}, {
6262
"name": "--script-include",
63-
"description": "TypeScript/JavaScript file glob patterns to scan for inline templates (default: **/*.ts,**/*.js). You can pass multiple patterns as a comma-separated string or as an array. Pass an empty value ('' or []) to disable."
63+
"description": "TypeScript/JavaScript file glob patterns to scan for inline templates (default: **/*.ts,**/*.js). You can pass multiple patterns as a comma-separated string or as an array. Pass an empty value to disable ('' or [])."
6464
}, {
6565
"name": "--dry",
66-
"description": "Run in dry mode to preview changes without applying them (default: false)."
66+
"description": "Run in dry mode to preview changes."
6767
}]
6868
}]
6969
}, {

packages/devextreme-schematics/src/migrate-config-components/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This schematic automatically migrates generic configuration components to named
1010

1111
### Via DevExtreme CLI (Recommended)
1212

13-
You can run the migration command from any directory, including both inside and outside Angular workspaces:
13+
You can run the migration command from any directory, both inside and outside Angular workspaces:
1414

1515
```bash
1616
devextreme migrate angular-config-components

packages/devextreme-schematics/src/migrate-config-components/schema.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/schema",
33
"$id": "SchematicsDevextremeMigrateConfigComponents",
4-
"title": "Migrate to the latest DevExtreme configuration components.",
4+
"title": "Migrates DevExtreme Angular applications to named configuration components.",
55
"type": "object",
66
"properties": {
77
"include": {
@@ -16,13 +16,14 @@
1616
{ "type": "array", "items": { "type": "string" } },
1717
{ "type": "string" }
1818
],
19-
"description": "Glob(s) of TS/JS files to scan for inline templates (default: ['**/*.ts','**/*.js']; set empty ('' or []) to disable)"
19+
"description": "Glob(s) of TS/JS files to scan for inline templates (default: ['**/*.ts','**/*.js']). To disable, set to '' or []."
2020
},
2121
"dry": {
2222
"oneOf": [
2323
{ "type": "boolean", "default": false },
2424
{ "type": "string", "enum": ["true", "false"], "default": "false" }
25-
]
25+
],
26+
"description": "Run in dry mode to preview changes."
2627
}
2728
}
2829
}

packages/devextreme-schematics/src/migrate-config-components/template-migrator.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ export async function applyInlineComponentTemplateMigrations(
8181
? `Resolution attempts:\n${tsResolutionErrors.map(e => ' - ' + e).join('\n')}\n`
8282
: '';
8383
exec.logger.warn(
84-
'[config-migrator] Failed to import TypeScript. Skipping inline template migration.\n' +
84+
'[config-migrator] Skipping inline template migration.\n' +
8585
errorDetails +
86-
'The schematic attempted to import TypeScript from the following locations:\n' +
86+
'Failed to import TypeScript from the following locations:\n' +
8787
' 1. Project node_modules\n' +
8888
' 2. Global node_modules\n' +
8989
' 3. Temporary installation (npm cache)\n\n' +
90-
'To resolve this issue, install TypeScript.\n\n' +
91-
'Project install:\n' +
90+
'To resolve this issue, install TypeScript manually.\n\n' +
91+
'Project installation:\n' +
9292
' npm install typescript --save-dev\n\n' +
93-
'Global install:\n' +
93+
'Global installation:\n' +
9494
' npm install -g typescript\n\n'
9595
);
9696
return;

packages/devextreme-schematics/src/utility/typescript-resolver.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function resolveTypeScript(): TypeScriptResolutionResult {
2727
};
2828
}
2929
} catch (err) {
30-
errors.push(`Project resolution failed: ${err?.message || err}`);
30+
errors.push(`Failed to import TypeScript from project: ${err?.message || err}`);
3131
}
3232

3333
try {
@@ -40,7 +40,7 @@ export function resolveTypeScript(): TypeScriptResolutionResult {
4040
};
4141
}
4242
} catch (err) {
43-
errors.push(`Global resolution failed: ${err?.message || err}`);
43+
errors.push(`Failed to import TypeScript from global node_modules: ${err?.message || err}`);
4444
}
4545

4646
try {
@@ -53,7 +53,7 @@ export function resolveTypeScript(): TypeScriptResolutionResult {
5353
};
5454
}
5555
} catch (err) {
56-
errors.push(`Temporary install failed: ${err?.message || err}`);
56+
errors.push(`Failed to import TypeScript from temporary installation (npm cache): ${err?.message || err}`);
5757
}
5858

5959
return {

0 commit comments

Comments
 (0)