-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning while bundling with esbuild #3325
Comments
Hey @blacha thank-you for reaching out to us with your issue. The warning generated actually doesn't make sense to me as XML can be an Object too and it can be empty. https://github.com/aws/aws-sdk-js/blob/master/lib/xml/node_parser.js#L142 I think it should be an issue for https://github.com/evanw/esbuild Feel free to reach out if you think differently. |
@ajredniwja I think this is a issue with the Since Some examples
if the goal is to check if the object is |
Reopening as part of reviewing PR #3430
I'll go through some history to answer this question |
The line in question is: aws-sdk-js/lib/xml/node_parser.js Line 142 in b3b33bf
The commit which added that line is c794ac5 From quick analysis, it appears that author wanted to check if array length is 1 and the key at index 0 is |
Verified that esbuild is now able to bundle aws-sdk in $ yarn add aws-sdk esbuild
$ yarn list aws-sdk
yarn list v1.22.4
warning package.json: No license field
warning No license field
warning Filtering by arguments is deprecated. Please use the pattern option instead.
└─ [email protected]
✨ Done in 0.10s.
$ echo "require('aws-sdk')" > index.js
$ ./node_modules/.bin/esbuild --bundle index.js --platform=node --outdir=dist |
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
I recently switched to using https://github.com/evanw/esbuild to bundle some of my javascript lambdas & libs which include aws-sdk, when bundling I receive the following warning
Specifically, https://github.com/aws/aws-sdk-js/blob/master/lib/xml/node_parser.js#L142
Does
x === ['$']
ever return true?Is the issue in the browser/Node.js?
Node.js
If on Node.js, are you running this on AWS Lambda?
Both Lambda & Nodejs
Details of the browser/Node.js version
v14.4.0
SDK version number
2.699.0 & 2.704.0
To Reproduce (observed behavior)
Expected behavior
bundled without warnings
Screenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: