feat(@angular/build): move istanbul-lib-instrument to optional peer dependency - #32935
Conversation
eda39ae to
9353d53
Compare
…library generator dependencies Update addTestRunnerDependencies to include istanbul-lib-instrument when generating new applications or libraries with the Karma test runner.
9c6bc65 to
07f6b50
Compare
There was a problem hiding this comment.
Code Review
This pull request transitions istanbul-lib-instrument to an optional dependency and implements dynamic loading within the JavaScript transformer worker. It includes a new migration schematic to automatically add the package to projects utilizing Karma for code coverage. Feedback suggests improving the error handling when the package is missing by providing more specific instructions to the user on how to resolve the issue.
…ependency Move `istanbul-lib-instrument` from dependencies to optional peer dependencies. This helps reduce the transitive dependency count for new projects. BREAKING CHANGE: `istanbul-lib-instrument` is now an optional peer dependency. Projects using karma with code coverage enabled will need to ensure that istanbul-lib-instrument is installed. Note: `ng update` will automatically add this dependency during the update process.
Add a new schematic migration to automatically add istanbul-lib-instrument to devDependencies for projects that use Karma. Covered builders: - @angular-devkit/build-angular:karma - @angular/build:karma - @angular/build:unit-test (when runner is 'karma')
07f6b50 to
ae952c4
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Move
istanbul-lib-instrumentfrom dependencies to optional peer dependencies. This helps reduce the transitive dependency count for new projects.BREAKING CHANGE:
istanbul-lib-instrumentis now an optional peer dependency.Projects using karma with code coverage enabled will need to ensure that
istanbul-lib-instrumentis installed. Note:ng updatewill automatically add this dependency during the update process.