fix: remove undocumented legacy callbacks#18
Merged
gr2m merged 1 commit intoprobot:masterfrom Sep 17, 2020
DavidJFelix:patch-1
Merged
fix: remove undocumented legacy callbacks#18gr2m merged 1 commit intoprobot:masterfrom DavidJFelix:patch-1
gr2m merged 1 commit intoprobot:masterfrom
DavidJFelix:patch-1
Conversation
`context.done` is from the pre-node4.10 runtime days of lambda, it was deprecated in favor of callback, which is optionally sidelined in favor of an async/promise-based return. If the function receives no callback and returns a promise or is marked as async, you should simply return/throw in order to actuate the callbacks.
Contributor
Author
|
@tcbyrd mind taking a look at this? |
gr2m
approved these changes
Sep 17, 2020
Contributor
gr2m
left a comment
There was a problem hiding this comment.
I'll trust you on this one :)
|
🎉 This PR is included in version 0.5.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
mattcan
added a commit
to mattcan/serverless-lambda
that referenced
this pull request
Nov 5, 2020
When the `done` function was removed in probot#18, the tests were not updated
mattcan
added a commit
to mattcan/serverless-lambda
that referenced
this pull request
Nov 5, 2020
Continues work started in probot#18
gr2m
pushed a commit
that referenced
this pull request
Nov 5, 2020
* fix: broken tests from #18 When the `done` function was removed in #18, the tests were not updated * fix: TypeError when converting null or undefined This will fix #34 by setting a default value on the `lowerCaseKeys` function. You can get into this state when setting up a test/demo incorrectly or using a lambda warmer (like serverless-warmup). I am immediately returning because then a clear error can be shown. Co-authored-by Mauricio Mercado <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
context.doneis from the pre-node4.10 runtime days of lambda, it was deprecated in favor of callback, which is optionally sidelined in favor of an async/promise-based return. If the function receives no callback and returns a promise or is marked as async, you should simply return/throw in order to actuate the callbacks.Proof that it's no longer even in the documentation
See the note above the typings
While they do technically work... I think relying on them is a bad idea.