From fca5a7344d2e205663873b577d5d91f203dd9d14 Mon Sep 17 00:00:00 2001 From: Rico Hermans Date: Thu, 28 Sep 2023 20:16:10 +0200 Subject: [PATCH] fix: reduce load time of JavaScript library, for real (#27314) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a follow-up to https://github.com/aws/aws-cdk/pull/27217 The check we needed to perform was inverted 😖 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-dynamodb/lib/replica-handler/.is_custom_resource | 0 .../lib/provider-framework/runtime/.is_custom_resource | 0 tools/@aws-cdk/lazify/bin/lazify.ts | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 packages/aws-cdk-lib/aws-dynamodb/lib/replica-handler/.is_custom_resource create mode 100644 packages/aws-cdk-lib/custom-resources/lib/provider-framework/runtime/.is_custom_resource diff --git a/packages/aws-cdk-lib/aws-dynamodb/lib/replica-handler/.is_custom_resource b/packages/aws-cdk-lib/aws-dynamodb/lib/replica-handler/.is_custom_resource new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/aws-cdk-lib/custom-resources/lib/provider-framework/runtime/.is_custom_resource b/packages/aws-cdk-lib/custom-resources/lib/provider-framework/runtime/.is_custom_resource new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/tools/@aws-cdk/lazify/bin/lazify.ts b/tools/@aws-cdk/lazify/bin/lazify.ts index 21b39730eedb5..45df45e379659 100644 --- a/tools/@aws-cdk/lazify/bin/lazify.ts +++ b/tools/@aws-cdk/lazify/bin/lazify.ts @@ -17,7 +17,7 @@ async function main() { } }, // Skip directories marked as 'custom resource's, so we don't affect asset hashes - async (d) => path.basename(d) !== 'node_modules' && await fs.pathExists(path.join(d, '.is_custom_resource'))); + async (d) => path.basename(d) !== 'node_modules' && ! await fs.pathExists(path.join(d, '.is_custom_resource'))); } }