|
| 1 | +import * as path from 'path'; |
1 | 2 | import { yarn, CdkCliIntegTestsWorkflow } from 'cdklabs-projen-project-types';
|
2 | 3 | import * as pj from 'projen';
|
3 | 4 | import { Stability } from 'projen/lib/cdk';
|
@@ -142,6 +143,14 @@ function jestOptionsForProject(options: pj.javascript.JestOptions): pj.javascrip
|
142 | 143 | };
|
143 | 144 | }
|
144 | 145 |
|
| 146 | +function transitiveFeaturesAndFixes(thisPkg: string, depPkgs: string[]) { |
| 147 | + return pj.ReleasableCommits.featuresAndFixes([ |
| 148 | + '.', |
| 149 | + ...depPkgs.map(p => path.relative(`packages/${thisPkg}`, `packages/${p}`)) |
| 150 | + ].join(' ')); |
| 151 | +} |
| 152 | + |
| 153 | + |
145 | 154 | const repoProject = new yarn.Monorepo({
|
146 | 155 | projenrcTs: true,
|
147 | 156 | name: 'aws-cdk-cli',
|
@@ -791,6 +800,8 @@ const cli = configureProject(
|
791 | 800 |
|
792 | 801 | // Append a specific version string for testing
|
793 | 802 | nextVersionCommand: 'tsx ../../projenrc/next-version.ts maybeRc',
|
| 803 | + |
| 804 | + releasableCommits: transitiveFeaturesAndFixes('aws-cdk', [cloudAssemblySchema.name, cloudFormationDiff.name]), |
794 | 805 | }),
|
795 | 806 | );
|
796 | 807 |
|
@@ -923,8 +934,7 @@ const cliLib = configureProject(
|
923 | 934 | devDeps: ['aws-cdk-lib', cli, 'constructs'],
|
924 | 935 | disableTsconfig: true,
|
925 | 936 | nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson} append:-alpha.0`,
|
926 |
| - // Watch 2 directories at once |
927 |
| - releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../../${cli.name}`), |
| 937 | + releasableCommits: transitiveFeaturesAndFixes('@aws-cdk/cli-lib-alpha', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]), |
928 | 938 | eslintOptions: {
|
929 | 939 | dirs: ['lib'],
|
930 | 940 | ignorePatterns: [
|
@@ -1081,7 +1091,7 @@ const toolkitLib = configureProject(
|
1081 | 1091 | 'typedoc',
|
1082 | 1092 | ],
|
1083 | 1093 | // Watch 2 directories at once
|
1084 |
| - releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../../${cli.name}`), |
| 1094 | + releasableCommits: transitiveFeaturesAndFixes('@aws-cdk/toolkit-lib', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]), |
1085 | 1095 | eslintOptions: {
|
1086 | 1096 | dirs: ['lib'],
|
1087 | 1097 | ignorePatterns: [
|
@@ -1200,8 +1210,7 @@ const cdkCliWrapper = configureProject(
|
1200 | 1210 | srcdir: 'lib',
|
1201 | 1211 | devDeps: ['aws-cdk-lib', cli, 'constructs', '@aws-cdk/integ-runner'],
|
1202 | 1212 | nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson}`,
|
1203 |
| - // Watch 2 directories at once |
1204 |
| - releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../../${cli.name}`), |
| 1213 | + releasableCommits: transitiveFeaturesAndFixes('@aws-cdk/cdk-cli-wrapper', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]), |
1205 | 1214 |
|
1206 | 1215 | jestOptions: jestOptionsForProject({
|
1207 | 1216 | jestConfig: {
|
@@ -1231,8 +1240,7 @@ const cdkAliasPackage = configureProject(
|
1231 | 1240 | srcdir: 'lib',
|
1232 | 1241 | deps: [cli],
|
1233 | 1242 | nextVersionCommand: `tsx ../../projenrc/next-version.ts copyVersion:../../${cliPackageJson}`,
|
1234 |
| - // Watch 2 directories at once |
1235 |
| - releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../${cli.name}`), |
| 1243 | + releasableCommits: transitiveFeaturesAndFixes('cdk', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]), |
1236 | 1244 | }),
|
1237 | 1245 | );
|
1238 | 1246 | void cdkAliasPackage;
|
|
0 commit comments