Skip to content

Commit a4895e4

Browse files
committed
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).
1 parent f6a6efd commit a4895e4

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-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: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,13 @@ 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'],
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.',
4845
];
4946

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

0 commit comments

Comments
 (0)