Skip to content

refactor(@schematics/angular): improve code quality in jasmine-vitest transformer#31693

Merged
clydin merged 1 commit intoangular:mainfrom
clydin:refactor/jasmine-vitest-code-quality
Nov 4, 2025
Merged

refactor(@schematics/angular): improve code quality in jasmine-vitest transformer#31693
clydin merged 1 commit intoangular:mainfrom
clydin:refactor/jasmine-vitest-code-quality

Conversation

@clydin
Copy link
Member

@clydin clydin commented Nov 4, 2025

This commit introduces several code quality improvements to the test-file-transformer.ts file within the Jasmine to Vitest schematic. These changes enhance readability, maintainability, and performance without altering the existing behavior.

Key improvements include:

  • Module-level transformer arrays: The callExpressionTransformers, propertyAccessExpressionTransformers, and expressionStatementTransformers arrays have been refactored to be module-level constants. This ensures they are initialized only once when the module is loaded, improving performance, and clearly separates static configuration from dynamic execution logic.
  • Comprehensive JSDoc comments: Extensive JSDoc comments have been added or updated throughout the file, including a file-level overview, detailed explanations for module-level constants, and updated documentation for key functions. This significantly improves code clarity and maintainability for future development.

… transformer

This commit introduces several code quality improvements to the `test-file-transformer.ts` file within the Jasmine to Vitest schematic. These changes enhance readability, maintainability, and performance without altering the existing behavior.

Key improvements include:
- **Module-level transformer arrays:** The `callExpressionTransformers`, `propertyAccessExpressionTransformers`, and `expressionStatementTransformers` arrays have been refactored to be module-level constants. This ensures they are initialized only once when the module is loaded, improving performance, and clearly separates static configuration from dynamic execution logic.
- **Comprehensive JSDoc comments:** Extensive JSDoc comments have been added or updated throughout the file, including a file-level overview, detailed explanations for module-level constants, and updated documentation for key functions. This significantly improves code clarity and maintainability for future development.
@clydin clydin added the target: rc This PR is targeted for the next release-candidate label Nov 4, 2025
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 4, 2025
@clydin clydin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 4, 2025
@clydin clydin merged commit f4895d6 into angular:main Nov 4, 2025
35 checks passed
@clydin
Copy link
Member Author

clydin commented Nov 4, 2025

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the refactor/jasmine-vitest-code-quality branch November 4, 2025 21:20
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants