-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(aws-lambda-nodejs): support additional esbuild configurations #17788
Merged
mergify
merged 12 commits into
master
from
feat-aws-lambda-nodejs-support-additional-esbuild-configurations
Mar 10, 2022
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e22dcf8
feat: Added `esbuildArgs` prop and updated test
ryparker deed531
Added example to docs
ryparker ab98bae
Updated README
ryparker 9401d81
Using `Object.entries()` and wrapped arg value in double quotes
ryparker 5d13ddf
Merge branch 'master' into feat-aws-lambda-nodejs-support-additional-…
ryparker 8e974ce
Merge branch 'master' into feat-aws-lambda-nodejs-support-additional-…
ryparker 74d6a11
Update `esbuildArgs ` key: value type to include boolean
ryparker c8ea7ee
Updated `esbuildArgs` type doc example to configure `—log-limit`
ryparker e8ca3c7
Merge branch 'master' into feat-aws-lambda-nodejs-support-additional-…
ryparker 3e5d859
fix tests and replaced example uses of `—keep-names` with `—splitting`
ryparker 1784f0d
fix(README): JSON commas
ryparker ef2601a
Merge branch 'master' into feat-aws-lambda-nodejs-support-additional-…
ryparker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ should
value
be enclosed with double quotes?${key}="${value}"
to cover args where value is a path that can contain whitespaces? or should the user take care of this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah and what about args that don't have values like
--keep-names
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestions, I'll get those implemented. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jogold because the type for
esbuildArgs
is an object we can always expect a value being assigned to each key. I think it's reasonable to assume that the user will need to pass a truthy value into the value of those boolean args.i.g.
I'll update the type to
I added an example of this to the README example and updated tests for clarification. LMK if you think this is acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But
esbuild
doesn't accept this syntax in the CLI...You need to update the logic to treat the Booleans differently (output only the key)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not able to reproduce this error. See my tests below:
Could you share the command you're using to get that "Invalid build flag" error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK it works with
esbuild
>= 0.14.24 published 8 days ago.You can try with
npx [email protected] ...
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest this #19343