Skip to content

Commit 628b04c

Browse files
authored
chore: ensure correct major version for some more packages (#670)
Definitely keeping the following additional packages on the current major version: ``` @aws-cdk/cli-plugin-contract @aws-cdk/cloudformation-diff @aws-cdk/integ-runner ``` --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent e8fe1c9 commit 628b04c

File tree

4 files changed

+54
-12
lines changed

4 files changed

+54
-12
lines changed

.projenrc.ts

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import { RecordPublishingTimestamp } from './projenrc/record-publishing-timestam
1717
import { DocType, S3DocsPublishing } from './projenrc/s3-docs-publishing';
1818
import { TypecheckTests } from './projenrc/TypecheckTests';
1919

20+
// #region shared config
21+
2022
// 5.7 sometimes gives a weird error in `ts-jest` in `@aws-cdk/cli-lib-alpha`
2123
// https://github.com/microsoft/TypeScript/issues/60159
2224
const TYPESCRIPT_VERSION = '5.6';
@@ -97,10 +99,6 @@ function configureProject<A extends pj.typescript.TypeScriptProject>(x: A): A {
9799

98100
const POWERFUL_RUNNER = 'aws-cdk_ubuntu-latest_16-core';
99101

100-
const workflowRunsOn = [
101-
POWERFUL_RUNNER,
102-
];
103-
104102
// Ignore patterns that apply both to the CLI and to cli-lib
105103
const ADDITIONAL_CLI_IGNORE_PATTERNS = [
106104
'db.json.gz',
@@ -203,6 +201,10 @@ function transitiveToolkitPackages(thisPkg: string) {
203201
return transitiveFeaturesAndFixes(thisPkg, toolkitPackages.filter(name => name !== thisPkg));
204202
}
205203

204+
// #endregion
205+
//////////////////////////////////////////////////////////////////////
206+
// #region Monorepo
207+
206208
const repoProject = new yarn.Monorepo({
207209
projenrcTs: true,
208210
name: 'aws-cdk-cli',
@@ -232,7 +234,7 @@ const repoProject = new yarn.Monorepo({
232234
},
233235

234236
workflowNodeVersion: 'lts/*',
235-
workflowRunsOn,
237+
workflowRunsOn: [POWERFUL_RUNNER],
236238
gitignore: ['.DS_Store', '.tools'],
237239

238240
autoApproveUpgrades: true,
@@ -367,7 +369,9 @@ function genericCdkProps(props: GenericProps = {}) {
367369
} satisfies Partial<yarn.TypeScriptWorkspaceOptions>;
368370
}
369371

372+
// #endregion
370373
//////////////////////////////////////////////////////////////////////
374+
// #region @aws-cdk/cloud-assembly-schema
371375

372376
const cloudAssemblySchema = configureProject(
373377
new yarn.TypeScriptWorkspace({
@@ -438,14 +442,17 @@ new JsiiBuild(cloudAssemblySchema, {
438442
cloudAssemblySchema.addPackageIgnore('**/scripts');
439443
})();
440444

445+
// #endregion
441446
//////////////////////////////////////////////////////////////////////
447+
// #region @aws-cdk/cloudformation-diff
442448

443449
const cloudFormationDiff = configureProject(
444450
new yarn.TypeScriptWorkspace({
445451
...genericCdkProps(),
446452
parent: repo,
447453
name: '@aws-cdk/cloudformation-diff',
448454
description: 'Utilities to diff CDK stacks against CloudFormation templates',
455+
majorVersion: 2,
449456
srcdir: 'lib',
450457
devDeps: [
451458
'fast-check',
@@ -483,7 +490,9 @@ const cloudFormationDiff = configureProject(
483490
}),
484491
);
485492

493+
// #endregion
486494
//////////////////////////////////////////////////////////////////////
495+
// #region @aws-cdk/cx-api
487496

488497
// cx-api currently is generated from `aws-cdk-lib` at build time. Not breaking
489498
// this dependency right now.
@@ -520,7 +529,9 @@ const cxApi = overrideEslint(
520529
);
521530
*/
522531

532+
// #endregion
523533
//////////////////////////////////////////////////////////////////////
534+
// #region @aws-cdk/yarn-cling
524535

525536
const yarnCling = configureProject(
526537
new yarn.TypeScriptWorkspace({
@@ -550,7 +561,9 @@ const yarnCling = configureProject(
550561
);
551562
yarnCling.testTask.prependExec('ln -sf ../../cdk test/test-fixture/jsii/node_modules/');
552563

564+
// #endregion
553565
//////////////////////////////////////////////////////////////////////
566+
// #region @aws-cdk/user-input-gen
554567

555568
const yargsGen = configureProject(
556569
new yarn.TypeScriptWorkspace({
@@ -572,7 +585,9 @@ const yargsGen = configureProject(
572585
}),
573586
);
574587

588+
// #endregion
575589
//////////////////////////////////////////////////////////////////////
590+
// #region @aws-cdk/cli-plugin-contract
576591

577592
// This should be deprecated, but only after the move
578593
const cliPluginContract = configureProject(
@@ -581,6 +596,7 @@ const cliPluginContract = configureProject(
581596
parent: repo,
582597
name: '@aws-cdk/cli-plugin-contract',
583598
description: 'Contract between the CLI and authentication plugins, for the exchange of AWS credentials',
599+
majorVersion: 2,
584600
srcdir: 'lib',
585601
deps: [
586602
],
@@ -594,7 +610,9 @@ const cliPluginContract = configureProject(
594610
}),
595611
);
596612

613+
// #endregion
597614
//////////////////////////////////////////////////////////////////////
615+
// #region @aws-cdk/cdk-assets-lib
598616

599617
const cdkAssetsLib = configureProject(
600618
new yarn.TypeScriptWorkspace({
@@ -676,14 +694,17 @@ cdkAssetsLib.gitignore.addPatterns(
676694
// This package happens do something only slightly naughty
677695
cdkAssetsLib.eslint?.addRules({ 'jest/no-export': ['off'] });
678696

697+
// #endregion
679698
//////////////////////////////////////////////////////////////////////
699+
// #region cdk-assets
680700

681701
const cdkAssetsCli = configureProject(
682702
new yarn.TypeScriptWorkspace({
683703
...genericCdkProps(),
684704
parent: repo,
685705
name: 'cdk-assets',
686706
description: 'CDK Asset Publishing Tool',
707+
majorVersion: 4,
687708
srcdir: 'lib',
688709
deps: [
689710
cdkAssetsLib,
@@ -710,7 +731,6 @@ const cdkAssetsCli = configureProject(
710731
},
711732
include: ['bin/**/*.ts'],
712733
},
713-
majorVersion: 4,
714734

715735
jestOptions: jestOptionsForProject({
716736
jestConfig: {
@@ -743,7 +763,9 @@ new BundleCli(cdkAssetsCli, {
743763
minifyWhitespace: true,
744764
});
745765

766+
// #endregion
746767
//////////////////////////////////////////////////////////////////////
768+
// #region @aws-cdk/toolkit-lib
747769

748770
const TOOLKIT_LIB_EXCLUDE_PATTERNS = [
749771
'lib/init-templates/*/typescript/*/*.template.ts',
@@ -763,6 +785,7 @@ const toolkitLib = configureProject(
763785
parent: repo,
764786
name: '@aws-cdk/toolkit-lib',
765787
description: 'AWS CDK Programmatic Toolkit Library',
788+
majorVersion: 1,
766789
srcdir: 'lib',
767790
peerDeps: [
768791
cliPluginContract.customizeReference({ versionType: 'any-minor' }), // allow consumers to easily de-depulicate this
@@ -868,7 +891,6 @@ const toolkitLib = configureProject(
868891
rootDir: '.', // shouldn't be required but something broke... check again once we have gotten rid of the tmpToolkitHelpers package
869892
},
870893
},
871-
majorVersion: 1,
872894
nextVersionCommand: 'tsx ../../../projenrc/next-version.ts maybeRc',
873895
}),
874896
);
@@ -1045,14 +1067,17 @@ toolkitLib.addTask('publish-local', {
10451067
receiveArgs: true,
10461068
});
10471069

1070+
// #endregion
10481071
//////////////////////////////////////////////////////////////////////
1072+
// #region aws-cdk
10491073

10501074
const cli = configureProject(
10511075
new yarn.TypeScriptWorkspace({
10521076
...genericCdkProps(),
10531077
parent: repo,
10541078
name: 'aws-cdk',
10551079
description: 'AWS CDK CLI, the command line tool for CDK apps',
1080+
majorVersion: 2,
10561081
srcdir: 'lib',
10571082
devDeps: [
10581083
yargsGen,
@@ -1189,7 +1214,6 @@ const cli = configureProject(
11891214
nextVersionCommand: 'tsx ../../projenrc/next-version.ts neverMajor maybeRc',
11901215

11911216
releasableCommits: transitiveToolkitPackages('aws-cdk'),
1192-
majorVersion: 2,
11931217
}),
11941218
);
11951219

@@ -1303,7 +1327,9 @@ for (const tsconfig of [cli.tsconfig, cli.tsconfigDev]) {
13031327
tsconfig?.addExclude('vendor/**/*');
13041328
}
13051329

1330+
// #endregion
13061331
//////////////////////////////////////////////////////////////////////
1332+
// #region @aws-cdk/cli-lib-alpha
13071333

13081334
const CLI_LIB_EXCLUDE_PATTERNS = [
13091335
'lib/init-templates/*/typescript/*/*.template.ts',
@@ -1316,12 +1342,12 @@ const cliLibAlpha = configureProject(
13161342
name: '@aws-cdk/cli-lib-alpha',
13171343
entrypoint: 'lib/main.js', // Bundled entrypoint
13181344
description: 'AWS CDK Programmatic CLI library',
1345+
majorVersion: 2,
13191346
srcdir: 'lib',
13201347
devDeps: ['aws-cdk-lib', cli.customizeReference({ versionType: 'exact' }), 'constructs'],
13211348
disableTsconfig: true,
13221349
nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson} append:-alpha.0`,
13231350
releasableCommits: transitiveToolkitPackages('@aws-cdk/cli-lib-alpha'),
1324-
majorVersion: 2,
13251351
eslintOptions: {
13261352
dirs: ['lib'],
13271353
ignorePatterns: [
@@ -1411,7 +1437,9 @@ for (const tsconfig of [cliLibAlpha.tsconfigDev]) {
14111437
}
14121438
}
14131439

1440+
// #endregion
14141441
//////////////////////////////////////////////////////////////////////
1442+
// #region @aws-cdk/cdk-cli-wrapper
14151443

14161444
const cdkCliWrapper = configureProject(
14171445
new yarn.TypeScriptWorkspace({
@@ -1453,7 +1481,9 @@ const cdkCliWrapper = configureProject(
14531481
})();
14541482
*/
14551483

1484+
// #endregion
14561485
//////////////////////////////////////////////////////////////////////
1486+
// #region cdk
14571487

14581488
const cdkAliasPackage = configureProject(
14591489
new yarn.TypeScriptWorkspace({
@@ -1475,14 +1505,17 @@ const cdkAliasPackage = configureProject(
14751505
);
14761506
void cdkAliasPackage;
14771507

1508+
// #endregion
14781509
//////////////////////////////////////////////////////////////////////
1510+
// #region @aws-cdk/integ-runner
14791511

14801512
const integRunner = configureProject(
14811513
new yarn.TypeScriptWorkspace({
14821514
...genericCdkProps(),
14831515
parent: repo,
14841516
name: '@aws-cdk/integ-runner',
14851517
description: 'CDK Integration Testing Tool',
1518+
majorVersion: 2,
14861519
srcdir: 'lib',
14871520
deps: [
14881521
cloudAssemblySchema.customizeReference({ versionType: 'any-future' }),
@@ -1566,7 +1599,9 @@ new BundleCli(integRunner, {
15661599
minifyWhitespace: true,
15671600
});
15681601

1602+
// #endregion
15691603
//////////////////////////////////////////////////////////////////////
1604+
// #region @aws-cdk-testing/cli-integ
15701605

15711606
const cliInteg = configureProject(
15721607
new yarn.TypeScriptWorkspace({
@@ -1675,7 +1710,9 @@ cliInteg.npmignore?.addPatterns('!resources/**/*');
16751710
cliInteg.postCompileTask.exec('yarn-cling');
16761711
cliInteg.gitignore.addPatterns('npm-shrinkwrap.json');
16771712

1713+
// #endregion
16781714
//////////////////////////////////////////////////////////////////////
1715+
// #region shared setup
16791716

16801717
// The pj.github.Dependabot component is only for a single Node project,
16811718
// but we need multiple non-Node projects
@@ -1778,3 +1815,5 @@ repoProject.github?.tryFindWorkflow('pull-request-lint')?.file?.patch(
17781815
);
17791816

17801817
repo.synth();
1818+
1819+
// #endregion

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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 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: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)