Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1b6f98e

Browse files
cexbrayatjkrems
authored andcommitted
refactor(@angular/cli): remove non runnable migrations in mcp modernize tool
The `test-bed-get` migration is not runnable via `ng g @angular/core` and references an non-existing documentation page. `zoneless` does not exist for now (Angular v20.2.0-rc.0). (cherry picked from commit 0f26944)
1 parent f89aa0a commit 1b6f98e

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

‎packages/angular/cli/src/commands/mcp/tools/modernize.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ const TRANSFORMATIONS: Array<Transformation> = [
2929
'Converts tags for elements with no content to be self-closing (e.g., `<app-foo></app-foo>` becomes `<app-foo />`).',
3030
documentationUrl: 'https://angular.dev/reference/migrations/self-closing-tags',
3131
},
32-
{
33-
name: 'test-bed-get',
34-
description:
35-
'Updates `TestBed.get` to the preferred and type-safe `TestBed.inject` in TypeScript test files.',
36-
documentationUrl: 'https://angular.dev/guide/testing/dependency-injection',
37-
},
3832
{
3933
name: 'inject',
4034
description: 'Converts usages of constructor-based injection to the inject() function.',
@@ -70,11 +64,6 @@ const TRANSFORMATIONS: Array<Transformation> = [
7064
'3. Run `ng g @angular/core:standalone` and select "Bootstrap the project using standalone APIs"',
7165
documentationUrl: 'https://angular.dev/reference/migrations/standalone',
7266
},
73-
{
74-
name: 'zoneless',
75-
description: 'Migrates the application to be zoneless.',
76-
documentationUrl: 'https://angular.dev/guide/zoneless',
77-
},
7867
];
7968

8069
const modernizeInputSchema = z.object({

‎packages/angular/cli/src/commands/mcp/tools/modernize_spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ describe('Modernize Tool', () => {
3535

3636
it('should return instructions for multiple transformations', async () => {
3737
const instructions = await getInstructions({
38-
transformations: ['self-closing-tags-migration', 'test-bed-get'],
38+
transformations: ['self-closing-tags-migration', 'inject'],
3939
});
4040

4141
const expectedInstructions = [
4242
'To run the self-closing-tags-migration migration, execute the following command: ' +
4343
'`ng generate @angular/core:self-closing-tags-migration`.\nFor more information, ' +
4444
'see https://angular.dev/reference/migrations/self-closing-tags.',
45-
'To run the test-bed-get migration, execute the following command: ' +
46-
'`ng generate @angular/core:test-bed-get`.\nFor more information, ' +
47-
'see https://angular.dev/guide/testing/dependency-injection.',
45+
'To run the inject migration, execute the following command: ' +
46+
'`ng generate @angular/core:inject`.\nFor more information, ' +
47+
'see https://angular.dev/reference/migrations/inject-function.',
4848
];
4949

5050
expect(instructions?.sort()).toEqual(expectedInstructions.sort());

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /