-
Notifications
You must be signed in to change notification settings - Fork 176
Description
Summary
Our E2E tests use a CDK construct that by default has a workaround for certain bundling issues when using ES modules:
powertools-lambda-typescript/packages/testing/src/resources/TestNodejsFunction.ts
Line 49 in 32bc066
| ? `import { createRequire } from 'module';const require = createRequire(import.meta.url);` |
This banner is necessary for some tests, particularly Tracer, but not all. We should remove this banner and see which tests actually require it or not.
Why is this needed?
This banner meant that we missed an issue when adding the InvokeStore to our utilities. This change will protect against any regressions
Which area does this relate to?
No response
Solution
Remove the banner and run the E2E tests and investigate whether any errors are due to bundling issues beyond our control (this is generally 3rd party dependencies that only ship with CJS build artefacts).
Acknowledgment
- This request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.