Skip to content

Commit 33292d1

Browse files
authored
fix(toolkit-lib): dependency constraints are too strict (#514)
Due to a bug, we set constraints for dependency for other monorepo packages to "any future minor version" (i.e. `^1.2.3`) forcing consumers to always use latest packages with the toolkit-lib. What we wanted to do is constrain the use to "any minor version", including already published ones, i.e. `^1`. This change needed an upgrade of our projen Monorepo project type, which is also part of this PR. The API changed slightly here, hence the update of other values. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent d452163 commit 33292d1

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

.projenrc.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ const cdkAssets = configureProject(
601601
description: 'CDK Asset Publishing Tool',
602602
srcdir: 'lib',
603603
deps: [
604-
cloudAssemblySchema.customizeReference({ versionType: 'minimal' }),
604+
cloudAssemblySchema.customizeReference({ versionType: 'any-future' }),
605605
cxApi,
606606
'archiver',
607607
'glob',
@@ -708,13 +708,13 @@ const toolkitLib = configureProject(
708708
},
709709
},
710710
peerDeps: [
711-
cliPluginContract.customizeReference({ versionType: 'major' }), // allow consumers to easily de-depulicate this
711+
cliPluginContract.customizeReference({ versionType: 'any-minor' }), // allow consumers to easily de-depulicate this
712712
],
713713
deps: [
714-
cloudAssemblySchema, // @todo need to find the minmal required version
715-
cloudFormationDiff.customizeReference({ versionType: 'major' }), // allow consumers with old toolkit-lib versions to get upgrades
716-
cdkAssets.customizeReference({ versionType: 'major' }), // allow consumers with old toolkit-lib versions to get upgrades
717-
`${cxApi}@^2`, // allow consumers with old toolkit-lib versions to get upgrades
714+
cloudAssemblySchema.customizeReference({ versionType: 'any-future' }), // needs to be newer than what this was build with
715+
cloudFormationDiff.customizeReference({ versionType: 'any-minor' }), // stay within the same MV, otherwise any should work
716+
cdkAssets.customizeReference({ versionType: 'any-minor' }), // stay within the same MV, otherwise any should work
717+
`${cxApi}@^2`, // stay within the same MV, otherwise any should work
718718
`@aws-sdk/client-appsync@${CLI_SDK_V3_RANGE}`,
719719
`@aws-sdk/client-cloudformation@${CLI_SDK_V3_RANGE}`,
720720
`@aws-sdk/client-cloudwatch-logs@${CLI_SDK_V3_RANGE}`,
@@ -1047,7 +1047,7 @@ const cli = configureProject(
10471047
'xml-js',
10481048
],
10491049
deps: [
1050-
cloudAssemblySchema.customizeReference({ versionType: 'minimal' }),
1050+
cloudAssemblySchema.customizeReference({ versionType: 'any-future' }),
10511051
cloudFormationDiff.customizeReference({ versionType: 'exact' }),
10521052
cxApi,
10531053
toolkitLib,
@@ -1466,7 +1466,7 @@ const integRunner = configureProject(
14661466
description: 'CDK Integration Testing Tool',
14671467
srcdir: 'lib',
14681468
deps: [
1469-
cloudAssemblySchema.customizeReference({ versionType: 'minimal' }),
1469+
cloudAssemblySchema.customizeReference({ versionType: 'any-future' }),
14701470
cxApi,
14711471
cdkCliWrapper.customizeReference({ versionType: 'exact' }),
14721472
cli.customizeReference({ versionType: 'exact' }),

package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/integ-runner/.projen/tasks.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/toolkit-lib/.projen/tasks.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/aws-cdk/.projen/tasks.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cdk-assets/.projen/tasks.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yarn.lock

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

0 commit comments

Comments
 (0)