Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,16 @@ export class ApplyOverrides {
if (field === 'peerDependencies') {
delete this.allPackagesDependencies.devPackageDependencies[pkgName];
delete this.allPackagesDependencies.packageDependencies[pkgName];
// @types/* packages should not be added to components at all when in env peers.
// When a component is installed in a workspace, its env is installed as well.
// Packages listed as peers in env.jsonc become runtime dependencies of the env itself,
// so they're always installed alongside the env. Since @types/* packages are only needed
// for TypeScript compilation (which the env handles), there's no need for components
// to have them in their own dependencies.
if (pkgName.startsWith('@types/')) {
delete this.allPackagesDependencies.peerPackageDependencies[pkgName];
Comment thread
davidfirst marked this conversation as resolved.
Outdated
return;
}
if (existsInCompsDeps) {
this.allDependencies.dependencies = this.allDependencies.dependencies.filter(
(dep) => dep.packageName !== pkgName
Expand Down
Loading