Skip to content

Commit 4635d02

Browse files
authored
chore: use non-caret dependency versions (#246)
Monorepo dependencies were using carets `^`; for most of these it didn't matter because the resulting artifact was bundled anyway, but for at least one it does matter: * `cdk -> aws-cdk`: should use the exact same version, otherwise running `npx [email protected]` may accidentally execute `[email protected]`. Also making the `cloud-assembly-schema` references exact; probably doesn't matter since we're bundling most of these but it does show the intention of shipping exactly one version. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent 30a2a29 commit 4635d02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4032
-22
lines changed

.projenrc.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ const cdkAssets = configureProject(
536536
description: 'CDK Asset Publishing Tool',
537537
srcdir: 'lib',
538538
deps: [
539-
cloudAssemblySchema,
539+
cloudAssemblySchema.customizeReference({ versionType: 'exact' }),
540540
cxApi,
541541
'archiver',
542542
'glob',
@@ -722,8 +722,8 @@ const cli = configureProject(
722722
'xml-js',
723723
],
724724
deps: [
725-
cloudAssemblySchema,
726-
cloudFormationDiff,
725+
cloudAssemblySchema.customizeReference({ versionType: 'exact' }),
726+
cloudFormationDiff.customizeReference({ versionType: 'exact' }),
727727
cxApi,
728728
'@aws-cdk/region-info',
729729
'archiver',
@@ -962,7 +962,7 @@ const cliLib = configureProject(
962962
entrypoint: 'lib/main.js', // Bundled entrypoint
963963
description: 'AWS CDK Programmatic CLI library',
964964
srcdir: 'lib',
965-
devDeps: ['aws-cdk-lib', cli, 'constructs'],
965+
devDeps: ['aws-cdk-lib', cli.customizeReference({ versionType: 'exact' }), 'constructs'],
966966
disableTsconfig: true,
967967
nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson} append:-alpha.0`,
968968
releasableCommits: transitiveToolkitPackages('@aws-cdk/cli-lib-alpha'),
@@ -1060,6 +1060,8 @@ const toolkitLib = configureProject(
10601060
srcdir: 'lib',
10611061
deps: [
10621062
cloudAssemblySchema,
1063+
// Purposely a ^ dependency so that clients selecting old toolkit library
1064+
// versions still might get upgrades to this dependency.
10631065
cloudFormationDiff,
10641066
cxApi,
10651067
'@aws-cdk/region-info',
@@ -1093,6 +1095,7 @@ const toolkitLib = configureProject(
10931095
'@smithy/util-waiter',
10941096
'archiver',
10951097
'camelcase@^6', // Non-ESM
1098+
// Purposely a ^ dependency so that clients get upgrades to this library.
10961099
cdkAssets,
10971100
'cdk-from-cfn',
10981101
'chalk@^4',
@@ -1305,7 +1308,7 @@ const cdkAliasPackage = configureProject(
13051308
name: 'cdk',
13061309
description: 'AWS CDK Toolkit',
13071310
srcdir: 'lib',
1308-
deps: [cli],
1311+
deps: [cli.customizeReference({ versionType: 'exact' })],
13091312
nextVersionCommand: `tsx ../../projenrc/next-version.ts copyVersion:../../${cliPackageJson}`,
13101313
releasableCommits: transitiveToolkitPackages('cdk'),
13111314
}),

package.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cdk-cli-wrapper/.projen/tasks.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cli-plugin-contract/.projen/tasks.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cloud-assembly-schema/.projen/tasks.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cloudformation-diff/.projen/tasks.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export declare function parseCliArgs(args?: string[]): {
2+
tests: string[] | undefined;
3+
app: (string | undefined);
4+
testRegex: string[] | undefined;
5+
testRegions: string[];
6+
originalRegions: string[] | undefined;
7+
profiles: string[] | undefined;
8+
runUpdateOnFailed: boolean;
9+
fromFile: string | undefined;
10+
exclude: boolean;
11+
maxWorkers: number;
12+
list: boolean;
13+
directory: string;
14+
inspectFailures: boolean;
15+
verbosity: number;
16+
verbose: boolean;
17+
clean: boolean;
18+
force: boolean;
19+
dryRun: boolean;
20+
disableUpdateWorkflow: boolean;
21+
language: string[] | undefined;
22+
watch: boolean;
23+
};
24+
export declare function main(args: string[]): Promise<void>;
25+
export declare function cli(args?: string[]): void;

0 commit comments

Comments
 (0)