From cd54c4239ec29182e30fd91634505df560d6e5f8 Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Fri, 22 Dec 2023 14:21:38 +0000 Subject: [PATCH] fix(core): core constructs fail with `Error: Cannot find module '../dist/core/.generated'` (#28467) #28251 added new files to `aws-cdk-lib/core/lib/dist/core` but this path was excluded from the npm package, causing the above error. This fix includes the generated file into the package. Closes #28465 Manually tested with a locally build package that includes the fix. image ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk-lib/.npmignore | 5 ++++- .../aws-cdk-lib/core/{lib => }/adr/acknowledge-warnings.md | 0 2 files changed, 4 insertions(+), 1 deletion(-) rename packages/aws-cdk-lib/core/{lib => }/adr/acknowledge-warnings.md (100%) diff --git a/packages/aws-cdk-lib/.npmignore b/packages/aws-cdk-lib/.npmignore index 60e48f52cdd0f..04bd4687b89d0 100644 --- a/packages/aws-cdk-lib/.npmignore +++ b/packages/aws-cdk-lib/.npmignore @@ -16,6 +16,7 @@ coverage build-tools dist !custom-resource-handlers/dist/ +!core/lib/dist/ scripts .LAST_BUILD .LAST_PACKAGE @@ -30,9 +31,11 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml - !*.lit.ts +# exclude additional documention +core/adr/ + # keep class map for cloudformation-include !cloudformation-include/cfn-types-2-classes.json diff --git a/packages/aws-cdk-lib/core/lib/adr/acknowledge-warnings.md b/packages/aws-cdk-lib/core/adr/acknowledge-warnings.md similarity index 100% rename from packages/aws-cdk-lib/core/lib/adr/acknowledge-warnings.md rename to packages/aws-cdk-lib/core/adr/acknowledge-warnings.md