fix(@angular/cli): add packages with built-in schematics to devDependencies only - #33702
Merged
alan-agius4 merged 1 commit intoJul 30, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request modifies the ng add command logic to skip confirmation and installation tasks when a package does not have schematics, and updates E2E tests to assert that packages like Tailwind CSS and Vitest are correctly added to devDependencies instead of dependencies. Feedback on the pull request highlights a critical issue where the new skip logic based on context.hasSchematics introduces a security regression by bypassing installation confirmation for built-in schematics, and breaks installation entirely for non-schematic packages. It is recommended to adjust the skip logic to target only packages handled by built-in schematics.
…encies only When running `ng add` on a package that does not provide a native `ng-add` schematic but is handled by a built-in schematic (e.g. `tailwindcss` or `@vitest/browser-*`), the CLI previously installed the package into `dependencies` before executing the built-in schematic. With this change, built-in schematics specify their target dependency section (`devDependencies`), so `ng add` installs them as `devDependencies` and omits them from `dependencies`. Closes angular#33701
alan-agius4
force-pushed
the
fix-33701-ng-add-dev-dependencies
branch
from
July 30, 2026 13:10
dab6d6e to
ac4b67a
Compare
dgp1130
approved these changes
Jul 30, 2026
Collaborator
Author
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.
When running
ng addon a package that does not provide a nativeng-addschematic but is handled by a built-in schematic (e.g.tailwindcssor@vitest/browser-*), the CLI previously installed the package intodependenciesbefore executing the built-in schematic.With this change, built-in schematics specify their target dependency section (
devDependencies), song addinstalls them asdevDependenciesand omits them fromdependencies.Closes #33701