File tree Expand file tree Collapse file tree
src/commands/mcp/tools/onpush-zoneless-migration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ ts_project(
7070 "//:node_modules/@types/semver" ,
7171 "//:node_modules/@types/yargs" ,
7272 "//:node_modules/@types/yarnpkg__lockfile" ,
73- "//:node_modules/fast-glob" ,
7473 "//:node_modules/listr2" ,
7574 "//:node_modules/semver" ,
7675 "//:node_modules/typescript" ,
Original file line number Diff line number Diff line change 77 */
88
99import { glob } from 'fast-glob' ;
10- import * as fs from 'fs' ;
11- import { dirname , join } from 'path' ;
10+ import * as fs from 'node: fs' ;
11+ import { dirname , join } from 'node: path' ;
1212import ts from 'typescript' ;
1313import { createFixResponseForZoneTests , createProvideZonelessForTestsSetupPrompt } from './prompts' ;
1414import { MigrationResponse } from './types' ;
Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.dev/license
77 */
88
9- import * as fs from 'fs' ;
9+ import * as fs from 'node: fs' ;
1010import ts from 'typescript' ;
1111
1212/**
Original file line number Diff line number Diff line change 88
99import { RequestHandlerExtra } from '@modelcontextprotocol/sdk/shared/protocol' ;
1010import { ServerNotification , ServerRequest } from '@modelcontextprotocol/sdk/types' ;
11- import { glob } from 'fast-glob ' ;
12- import * as fs from 'fs' ;
11+ import { glob } from 'node:fs/promises ' ;
12+ import * as fs from 'node: fs' ;
1313import ts from 'typescript' ;
1414import { z } from 'zod' ;
1515import { declareTool } from '../tool-registry' ;
@@ -53,8 +53,10 @@ export async function registerZonelessMigrationTool(
5353 const zoneFiles = new Set < ts . SourceFile > ( ) ;
5454
5555 if ( fs . statSync ( fileOrDirPath ) . isDirectory ( ) ) {
56- const allFiles = await glob ( `${ fileOrDirPath } /**/*.ts` ) ;
57- files = allFiles . map ( createSourceFile ) ;
56+ const allFiles = glob ( `${ fileOrDirPath } /**/*.ts` ) ;
57+ for await ( const file of allFiles ) {
58+ files . push ( createSourceFile ( file ) ) ;
59+ }
5860 } else {
5961 files = [ createSourceFile ( fileOrDirPath ) ] ;
6062 const maybeTestFile = await getTestFilePath ( fileOrDirPath ) ;
You can’t perform that action at this time.
0 commit comments