Skip to content

Commit 53c1fe6

Browse files
authored
fix: isolated peer upgrades break upgrade workflows (#629)
As for example seen in: cdk8s-team/cdk8s-hasura#407 The workflow upgrades the peer dependency: ``` cdk8s-plus-27: ^2.7.61 -> ^2.7.66 ``` But leaves the devDependency unchanged: ``` cdk8s-plus-27: 2.7.61 ``` And then the install fails because its requirements are not satisfied. Instead, don't upgrade peer dependencies automtically. If we need to do a peerDependency upgrade, we will do it by hand. Fixes #
1 parent b351b0f commit 53c1fe6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.projen/tasks.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/projects/node.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ export function buildNodeProjectDefaultOptions(options: Cdk8sTeamNodeProjectOpti
8686
const depsUpgradeOptions: UpgradeDependenciesOptions = {
8787
taskName: 'upgrade-runtime-dependencies',
8888
pullRequestTitle: 'upgrade runtime dependencies',
89-
// only include peer and runtime because we will created a non release trigerring PR for the rest
90-
types: [DependencyType.PEER, DependencyType.RUNTIME, DependencyType.OPTIONAL],
89+
// only include plain dependency because we will created a non release triggering PR for the rest
90+
// NOTE: we explicitly do NOT upgrade PEER dependencies. We want the widest range of compatibility possible,
91+
// and by bumping peer dependencies we force the customer to also unnecessarily upgrade, which they may not want
92+
// to do. Never mind that peerDependencies are usually also devDependencies, so it doesn't make sense to upgrade
93+
// them without also upgrading devDependencies.
94+
types: [DependencyType.RUNTIME, DependencyType.OPTIONAL],
9195
workflowOptions: {
9296
schedule: UpgradeDependenciesSchedule.expressions([UPGRADE_RUNTIME_DEPENDENCIES_SCHEDULE]),
9397
},

0 commit comments

Comments
 (0)