feat(@angular/build): move istanbul-lib-instrument to optional peer dependency#32935
Open
clydin wants to merge 3 commits intoangular:mainfrom
Open
feat(@angular/build): move istanbul-lib-instrument to optional peer dependency#32935clydin wants to merge 3 commits intoangular:mainfrom
clydin wants to merge 3 commits intoangular:mainfrom
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.
packages/angular/build/src/tools/esbuild/javascript-transformer-worker.ts
Show resolved
Hide resolved
…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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.