Skip to content

Commit d38e11c

Browse files
committed
chore: move integ-runner over
2 parents 6a01f80 + a139c52 commit d38e11c

File tree

248 files changed

+17017
-131
lines changed

Some content is hidden

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

248 files changed

+17017
-131
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/deps.json

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

.projenrc.ts

Lines changed: 128 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function configureProject<A extends pj.typescript.TypeScriptProject>(x: A): A {
3333
x.addDevDeps(
3434
'@typescript-eslint/eslint-plugin@^8',
3535
'@typescript-eslint/parser@^8',
36-
'@stylistic/eslint-plugin',
36+
'@stylistic/eslint-plugin@^3',
3737
'@cdklabs/eslint-plugin',
3838
'eslint-plugin-import',
3939
'eslint-plugin-jest',
@@ -86,6 +86,15 @@ const ADDITIONAL_CLI_IGNORE_PATTERNS = [
8686

8787
const CLI_SDK_V3_RANGE = '^3';
8888

89+
const defaultTsOptions = {
90+
target: 'ES2020',
91+
module: 'commonjs',
92+
lib: ['es2020', 'dom'],
93+
incremental: true,
94+
esModuleInterop: false,
95+
skipLibCheck: true,
96+
};
97+
8998
/**
9099
* Shared jest config
91100
*
@@ -412,7 +421,7 @@ const cloudFormationDiff = configureProject(
412421
// (EDIT: or should it? We're going to bundle it into aws-cdk-lib)
413422
tsconfig: {
414423
compilerOptions: {
415-
esModuleInterop: false,
424+
...defaultTsOptions,
416425
},
417426
},
418427

@@ -480,6 +489,11 @@ const yargsGen = configureProject(
480489
deps: ['@cdklabs/typewriter', 'prettier@^2.8', 'lodash.clonedeep'],
481490
devDeps: ['@types/semver', '@types/yarnpkg__lockfile', '@types/lodash.clonedeep', '@types/prettier@^2'],
482491
minNodeVersion: '17.0.0', // Necessary for 'structuredClone'
492+
tsconfig: {
493+
compilerOptions: {
494+
...defaultTsOptions,
495+
},
496+
},
483497
}),
484498
);
485499

@@ -502,6 +516,11 @@ const nodeBundle = configureProject(
502516
},
503517
},
504518
}),
519+
tsconfig: {
520+
compilerOptions: {
521+
...defaultTsOptions,
522+
},
523+
},
505524
}),
506525
);
507526
// Too many console statements
@@ -574,21 +593,13 @@ const cdkAssets = configureProject(
574593
],
575594
tsconfigDev: {
576595
compilerOptions: {
577-
target: 'ES2020',
578-
module: 'commonjs',
579-
lib: ['es2020', 'dom'],
580-
incremental: true,
581-
esModuleInterop: false,
596+
...defaultTsOptions,
582597
},
583598
include: ['bin/**/*.ts'],
584599
},
585600
tsconfig: {
586601
compilerOptions: {
587-
target: 'ES2020',
588-
module: 'commonjs',
589-
lib: ['es2020', 'dom'],
590-
incremental: true,
591-
esModuleInterop: false,
602+
...defaultTsOptions,
592603
rootDir: undefined,
593604
outDir: undefined,
594605
},
@@ -665,9 +676,10 @@ const tmpToolkitHelpers = configureProject(
665676
tsconfig: {
666677
compilerOptions: {
667678
target: 'es2022',
668-
lib: ['es2022', 'esnext.disposable'],
679+
lib: ['es2022', 'esnext.disposable', 'dom'],
669680
module: 'NodeNext',
670681
esModuleInterop: false,
682+
skipLibCheck: true,
671683
},
672684
},
673685
}),
@@ -787,6 +799,8 @@ const cli = configureProject(
787799
},
788800
tsconfig: {
789801
compilerOptions: {
802+
...defaultTsOptions,
803+
790804
// Changes the meaning of 'import' for libraries whose top-level export is a function
791805
// 'aws-cdk' has been written against `false` for interop
792806
esModuleInterop: false,
@@ -1153,9 +1167,10 @@ const toolkitLib = configureProject(
11531167
tsconfig: {
11541168
compilerOptions: {
11551169
target: 'es2022',
1156-
lib: ['es2022', 'esnext.disposable'],
1170+
lib: ['es2022', 'esnext.disposable', 'dom'],
11571171
module: 'NodeNext',
11581172
esModuleInterop: false,
1173+
skipLibCheck: true,
11591174
},
11601175
},
11611176
}),
@@ -1278,7 +1293,7 @@ const cdkCliWrapper = configureProject(
12781293
name: '@aws-cdk/cdk-cli-wrapper',
12791294
description: 'CDK CLI Wrapper Library',
12801295
srcdir: 'lib',
1281-
devDeps: ['aws-cdk-lib', cli, 'constructs', '@aws-cdk/integ-runner'],
1296+
devDeps: [],
12821297
nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson}`,
12831298
releasableCommits: transitiveToolkitPackages('@aws-cdk/cdk-cli-wrapper'),
12841299

@@ -1289,15 +1304,23 @@ const cdkCliWrapper = configureProject(
12891304
},
12901305
},
12911306
}),
1307+
1308+
tsconfig: {
1309+
compilerOptions: {
1310+
...defaultTsOptions,
1311+
}
1312+
},
12921313
}),
12931314
);
12941315

1316+
/* Can't have this -- the integ-runner depends on this package
12951317
(() => {
12961318
const integ = cdkCliWrapper.addTask('integ', {
12971319
exec: 'integ-runner --language javascript',
12981320
});
12991321
cdkCliWrapper.testTask.spawn(integ);
13001322
})();
1323+
*/
13011324

13021325
//////////////////////////////////////////////////////////////////////
13031326

@@ -1317,6 +1340,96 @@ void cdkAliasPackage;
13171340

13181341
//////////////////////////////////////////////////////////////////////
13191342

1343+
const integRunner = configureProject(
1344+
new yarn.TypeScriptWorkspace({
1345+
...genericCdkProps(),
1346+
parent: repo,
1347+
name: '@aws-cdk/integ-runner',
1348+
description: 'CDK Integration Testing Tool',
1349+
srcdir: 'lib',
1350+
deps: [
1351+
cloudAssemblySchema.customizeReference({ versionType: 'exact' }),
1352+
cxApi,
1353+
cdkCliWrapper.customizeReference({ versionType: 'exact' }),
1354+
cli.customizeReference({ versionType: 'exact' }),
1355+
cdkAssets.customizeReference({ versionType: 'exact' }),
1356+
cloudFormationDiff.customizeReference({ versionType: 'exact' }),
1357+
'workerpool@^6',
1358+
'chokidar@^3',
1359+
'chalk@^4',
1360+
'fs-extra@^9',
1361+
'yargs@^16',
1362+
'@aws-cdk/aws-service-spec',
1363+
'@aws-sdk/client-cloudformation@^3',
1364+
],
1365+
devDeps: [
1366+
'aws-cdk-lib',
1367+
'@types/fs-extra',
1368+
'@types/mock-fs@^4',
1369+
'mock-fs@^5',
1370+
'@types/workerpool@^6',
1371+
'@types/yargs',
1372+
'constructs@^10',
1373+
'@aws-cdk/integ-tests-alpha@2.184.1-alpha.0',
1374+
],
1375+
allowPrivateDeps: true,
1376+
tsconfig: {
1377+
compilerOptions: {
1378+
...defaultTsOptions,
1379+
}
1380+
},
1381+
}),
1382+
);
1383+
integRunner.gitignore?.addPatterns(
1384+
// Ignore this symlink, we recreate it at test time
1385+
'test/test-archive-follow/data/linked',
1386+
1387+
// These files are needed for unit tests
1388+
'!test/test-data/cdk-integ.out*/',
1389+
1390+
'!**/*.snapshot/**/asset.*/*.js',
1391+
'!**/*.snapshot/**/asset.*/*.d.ts',
1392+
'!**/*.snapshot/**/asset.*/**',
1393+
1394+
'lib/recommended-feature-flags.json',
1395+
);
1396+
integRunner.tsconfig?.addInclude('lib/*.json');
1397+
integRunner.tsconfig?.addInclude('lib/init-templates/*/*/add-project.hook.ts');
1398+
integRunner.tsconfig?.addExclude('lib/init-templates/*/typescript/**/*.ts');
1399+
integRunner.tsconfig?.addExclude('test/language-tests/**/integ.*.ts');
1400+
1401+
integRunner.preCompileTask.prependExec('./build-tools/generate.sh');
1402+
1403+
new BundleCli(integRunner, {
1404+
externals: {
1405+
optionalDependencies: [
1406+
'fsevents',
1407+
],
1408+
dependencies: [
1409+
'@aws-cdk/aws-service-spec',
1410+
'aws-cdk',
1411+
],
1412+
},
1413+
allowedLicenses: [
1414+
'Apache-2.0',
1415+
'MIT',
1416+
'BSD-3-Clause',
1417+
'ISC',
1418+
'BSD-2-Clause',
1419+
'0BSD',
1420+
'MIT OR Apache-2.0',
1421+
],
1422+
dontAttribute: '^@aws-cdk/|^@cdklabs/|^cdk-assets$|^cdk-cli-wrapper$',
1423+
test: 'bin/integ-runner --version',
1424+
entryPoints: [
1425+
'lib/index.js',
1426+
'lib/workers/extract/index.js',
1427+
],
1428+
minifyWhitespace: true,
1429+
});
1430+
1431+
//////////////////////////////////////////////////////////////////////
1432+
13201433
// The pj.github.Dependabot component is only for a single Node project,
13211434
// but we need multiple non-Node projects
13221435
new pj.YamlFile(repo, '.github/dependabot.yml', {

aws-cdk-cli.code-workspace

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

package.json

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

0 commit comments

Comments
 (0)