Various fixes/improvements to Karma to Vitest update migration#33114
Various fixes/improvements to Karma to Vitest update migration#33114clydin merged 4 commits intoangular:mainfrom
Conversation
…est migration This commit resolves a race condition in the Karma-to-Vitest migration where shared configuration files were deleted prematurely within the schematic transaction. Previously, the routine erased the target file upon discovering it was identical to boilerplate, which blinded other referring projects to extraction metadata. The solution introduces analysis object caching so AST parsing occurs exactly once per discrete path. Deletion operations are deferred and batch-executed at the end of workspace processing. This mechanism guarantees continuous readability across iterating dependencies and yields operational speed improvements via memoized checks.
…s in karma config analyzer Updates the AST analyzer to accept static backtick strings that do not contain runtime expressions. Previously, even simple template literals resulted in a fallback warning flag, triggering manual migration overrides unnecessarily.
…test migration Automates the transition of developer test configurations from Jasmine typing providers to Vitest globals definitions. The tool parses each collected tsconfig path and actively relocates 'vitest/globals' into the compiler options type list while removing the 'jasmine' package.
d57a877 to
c89ae32
Compare
There was a problem hiding this comment.
Code Review
This pull request enhances the Karma to Vitest migration schematic by adding support for template literals in Karma configurations, implementing a caching mechanism for shared configuration files, and automatically updating TypeScript configuration types from Jasmine to Vitest globals. It also introduces detection for non-Chromium browsers to trigger Istanbul coverage and provides a detailed migration summary. Feedback suggests improving the browser detection logic to be more inclusive of custom Chrome launchers and ensuring the coverageProvider is explicitly set to istanbul when non-Chromium browsers are identified.
…ovider for Vitest migration Recognize non-Chromium browser usage during the Karma to Vitest migration. While Node-based and Chromium environments can leverage @vitest/coverage-v8, browser-based test runs using engines such as Firefox or WebKit natively necessitate istanbul instrumentation.
c89ae32 to
afd24b5
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
See individual commits.