Skip to content

Commit 9f69d03

Browse files
authored
Merge branch 'main' into mrgrain/s3-publish
2 parents 9f2de53 + 50b14fd commit 9f69d03

File tree

17 files changed

+191
-45
lines changed

17 files changed

+191
-45
lines changed

.github/workflows/release.yml

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

.projen/tasks.json

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

.projenrc.ts

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as path from 'path';
12
import { yarn, CdkCliIntegTestsWorkflow } from 'cdklabs-projen-project-types';
23
import * as pj from 'projen';
34
import { Stability } from 'projen/lib/cdk';
@@ -143,6 +144,13 @@ function jestOptionsForProject(options: pj.javascript.JestOptions): pj.javascrip
143144
};
144145
}
145146

147+
function transitiveFeaturesAndFixes(thisPkg: string, depPkgs: string[]) {
148+
return pj.ReleasableCommits.featuresAndFixes([
149+
'.',
150+
...depPkgs.map(p => path.relative(`packages/${thisPkg}`, `packages/${p}`)),
151+
].join(' '));
152+
}
153+
146154
const repoProject = new yarn.Monorepo({
147155
projenrcTs: true,
148156
name: 'aws-cdk-cli',
@@ -217,8 +225,6 @@ const repoProject = new yarn.Monorepo({
217225
},
218226
});
219227

220-
new AdcPublishing(repoProject);
221-
222228
// Eslint for projen config
223229
// @ts-ignore
224230
repoProject.eslint = new pj.javascript.Eslint(repoProject, {
@@ -228,6 +234,12 @@ repoProject.eslint = new pj.javascript.Eslint(repoProject, {
228234
fileExtensions: ['.ts', '.tsx'],
229235
lintProjenRc: false,
230236
});
237+
// always lint projen files as part of the build
238+
if (repoProject.eslint?.eslintTask) {
239+
repoProject.tasks.tryFind('build')?.spawn(repoProject.eslint?.eslintTask);
240+
}
241+
242+
new AdcPublishing(repoProject);
231243

232244
const repo = configureProject(repoProject);
233245

@@ -792,6 +804,8 @@ const cli = configureProject(
792804

793805
// Append a specific version string for testing
794806
nextVersionCommand: 'tsx ../../projenrc/next-version.ts maybeRc',
807+
808+
releasableCommits: transitiveFeaturesAndFixes('aws-cdk', [cloudAssemblySchema.name, cloudFormationDiff.name]),
795809
}),
796810
);
797811

@@ -924,8 +938,7 @@ const cliLib = configureProject(
924938
devDeps: ['aws-cdk-lib', cli, 'constructs'],
925939
disableTsconfig: true,
926940
nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson} append:-alpha.0`,
927-
// Watch 2 directories at once
928-
releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../../${cli.name}`),
941+
releasableCommits: transitiveFeaturesAndFixes('@aws-cdk/cli-lib-alpha', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]),
929942
eslintOptions: {
930943
dirs: ['lib'],
931944
ignorePatterns: [
@@ -1007,9 +1020,7 @@ const TOOLKIT_LIB_EXCLUDE_PATTERNS = [
10071020

10081021
const toolkitLib = configureProject(
10091022
new yarn.TypeScriptWorkspace({
1010-
...genericCdkProps({
1011-
private: true,
1012-
}),
1023+
...genericCdkProps(),
10131024
parent: repo,
10141025
name: '@aws-cdk/toolkit-lib',
10151026
description: 'AWS CDK Programmatic Toolkit Library',
@@ -1082,7 +1093,7 @@ const toolkitLib = configureProject(
10821093
'typedoc',
10831094
],
10841095
// Watch 2 directories at once
1085-
releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../../${cli.name}`),
1096+
releasableCommits: transitiveFeaturesAndFixes('@aws-cdk/toolkit-lib', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]),
10861097
eslintOptions: {
10871098
dirs: ['lib'],
10881099
ignorePatterns: [
@@ -1218,8 +1229,7 @@ const cdkCliWrapper = configureProject(
12181229
srcdir: 'lib',
12191230
devDeps: ['aws-cdk-lib', cli, 'constructs', '@aws-cdk/integ-runner'],
12201231
nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson}`,
1221-
// Watch 2 directories at once
1222-
releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../../${cli.name}`),
1232+
releasableCommits: transitiveFeaturesAndFixes('@aws-cdk/cdk-cli-wrapper', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]),
12231233

12241234
jestOptions: jestOptionsForProject({
12251235
jestConfig: {
@@ -1249,8 +1259,7 @@ const cdkAliasPackage = configureProject(
12491259
srcdir: 'lib',
12501260
deps: [cli],
12511261
nextVersionCommand: `tsx ../../projenrc/next-version.ts copyVersion:../../${cliPackageJson}`,
1252-
// Watch 2 directories at once
1253-
releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../${cli.name}`),
1262+
releasableCommits: transitiveFeaturesAndFixes('cdk', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]),
12541263
}),
12551264
);
12561265
void cdkAliasPackage;

packages/@aws-cdk/cli-lib-alpha/.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.

packages/@aws-cdk/toolkit-lib/.gitignore

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

packages/@aws-cdk/toolkit-lib/.npmignore

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

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

Lines changed: 9 additions & 0 deletions
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: 52 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/stack-assembly.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class StackAssembly extends CloudAssembly implements ICloudAssemblySource
2727
throw new ToolkitError('This app contains no stacks');
2828
}
2929

30-
const extend = convertExtend(selector.extend);
30+
const extend = expandToExtendEnum(selector.expand);
3131
const patterns = sanitizePatterns(selector.patterns ?? []);
3232

3333
switch (selector.strategy) {
@@ -94,7 +94,7 @@ export class StackAssembly extends CloudAssembly implements ICloudAssemblySource
9494
}
9595
}
9696

97-
function convertExtend(extend?: ExpandStackSelection): CliExtendedStackSelection | undefined {
97+
function expandToExtendEnum(extend?: ExpandStackSelection): CliExtendedStackSelection | undefined {
9898
switch (extend) {
9999
case ExpandStackSelection.DOWNSTREAM:
100100
return CliExtendedStackSelection.Downstream;

packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/stack-selector.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ export interface StackSelector {
8282
patterns?: string[];
8383

8484
/**
85-
* Extend the selection to upstream/downstream stacks.
86-
* @default ExtendedStackSelection.None only select the specified/matched stacks
85+
* Expand the selection to upstream/downstream stacks.
86+
* @default ExpandStackSelection.None only select the specified/matched stacks
8787
*/
88-
extend?: ExpandStackSelection;
88+
expand?: ExpandStackSelection;
8989

9090
/**
9191
* By default, we throw an exception if the assembly contains no stacks.

0 commit comments

Comments
 (0)