Skip to content

Commit 92de23d

Browse files
authored
chore(core): augmentations should use relative import (#26364)
Previously (accidentally) used the module name as a name for the import. This caused the build to fail with `error TS5055: Cannot write file 'aws-cdk-lib/aws-cloudwatch/index.d.ts' because it would overwrite input file.` Also exclude declaration files from the build, which makes it slightly faster (~20s). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 52e20c9 commit 92de23d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/aws-cdk-lib/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
},
6767
"jsii": {
6868
"excludeTypescript": [
69-
"scripts"
69+
"scripts",
70+
"**/*.d.ts"
7071
],
7172
"outdir": "dist",
7273
"targets": {

tools/@aws-cdk/spec2cdk/lib/cfn2ts/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export async function generateAll(
157157
importLocations: {
158158
core: options.coreImport,
159159
coreHelpers: `${options.coreImport}/lib/helpers-internal`,
160+
cloudwatch: options.cloudwatchImport,
160161
},
161162
},
162163
);

0 commit comments

Comments
 (0)