Skip to content

Commit a48d3db

Browse files
authored
refactor: move util into shared library (#183)
Mostly moving and import updates. Renamed a couple of functions. Added some more AI generated test cases for utils. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent 806d851 commit a48d3db

File tree

86 files changed

+560
-138
lines changed

Some content is hidden

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

86 files changed

+560
-138
lines changed

.projenrc.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,18 @@ const tmpToolkitHelpers = configureProject(
688688
parent: repo,
689689
name: '@aws-cdk/tmp-toolkit-helpers',
690690
description: 'A temporary package to hold code shared between aws-cdk and @aws-cdk/toolkit-lib',
691-
deps: [],
692691
devDeps: [
693692
cdkBuildTools,
693+
'@types/archiver',
694+
'@types/glob',
695+
'@types/semver',
696+
'fast-check',
697+
],
698+
deps: [
699+
'archiver',
700+
'glob',
701+
'semver',
702+
'yaml@^1',
694703
],
695704
tsconfig: {
696705
compilerOptions: {
@@ -708,6 +717,7 @@ tmpToolkitHelpers.package.addField('exports', {
708717
'.': './lib/index.js',
709718
'./package.json': './package.json',
710719
'./api': './lib/api/index.js',
720+
'./util': './lib/util/index.js',
711721
});
712722

713723
//////////////////////////////////////////////////////////////////////
@@ -1245,6 +1255,8 @@ toolkitLib.postCompileTask.exec('node build-tools/bundle.mjs');
12451255
// Smoke test built JS files
12461256
toolkitLib.postCompileTask.exec('node ./lib/index.js >/dev/null 2>/dev/null </dev/null');
12471257
toolkitLib.postCompileTask.exec('node ./lib/api/aws-cdk.js >/dev/null 2>/dev/null </dev/null');
1258+
toolkitLib.postCompileTask.exec('node ./lib/api/shared-public.js >/dev/null 2>/dev/null </dev/null');
1259+
toolkitLib.postCompileTask.exec('node ./lib/private/util.js >/dev/null 2>/dev/null </dev/null');
12481260

12491261
// Do include all .ts files inside init-templates
12501262
toolkitLib.npmignore?.addPatterns(

packages/@aws-cdk/tmp-toolkit-helpers/.projen/deps.json

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

packages/@aws-cdk/tmp-toolkit-helpers/.projen/tasks.json

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

packages/@aws-cdk/tmp-toolkit-helpers/package.json

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './api';
2+
export * from './util';

packages/aws-cdk/lib/util/archive.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/util/archive.ts

File renamed without changes.

packages/aws-cdk/lib/util/arrays.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/util/arrays.ts

File renamed without changes.

packages/aws-cdk/lib/util/bool.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/util/bool.ts

File renamed without changes.

packages/aws-cdk/lib/util/bytes.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/util/bytes.ts

File renamed without changes.

packages/aws-cdk/lib/util/cloudformation.ts renamed to packages/@aws-cdk/tmp-toolkit-helpers/src/util/cloudformation.ts

File renamed without changes.

0 commit comments

Comments
 (0)