aws-lambda-nodejs: charset
props not work
#32649
Labels
@aws-cdk/aws-lambda-nodejs
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
potential-regression
Marking this issue as a potential regression to be checked by team member
Describe the bug
When building TypeScript/JavaScript with
aws-lambda-nodejs
, the parameter (Charset.UTF8) that does not escape non-ASCII characters does not work.Regression Issue
Last Known Working CDK Version
v2.85.0
Expected Behavior
If UTF8 is specified for charset,
--charset=utf8
is passed to esbuild so that characters are output without escaping.example expected output
Current Behavior
Even if UTF8 parameters are passed, escaped strings are always output.
example current output
Reproduction Steps
Restores the process of setting the deleted charset.
...this.props.banner ? [`--banner:js=${JSON.stringify(this.props.banner)}`] : [], ...this.props.footer ? [`--footer:js=${JSON.stringify(this.props.footer)}`] : [], + ...this.props.charset ? [`--charset=${this.props.charset}`] : [], ...this.props.mainFields ? [`--main-fields=${this.props.mainFields.join(',')}`] : [],
https://github.com/aws/aws-cdk/blob/v2.173.2/packages/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.ts#L260-L262
Possible Solution
No response
Additional Information/Context
The following commit confirms that it has been removed.
3f1f974
file:
packages/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.ts
CDK CLI Version
2.173.2
Framework Version
No response
Node.js Version
v22.11.0
OS
macOS
Language
TypeScript
Language Version
No response
Other information
Example stack code
The text was updated successfully, but these errors were encountered: