-
Notifications
You must be signed in to change notification settings - Fork 1.3k
examples(nodejs): bump to the latest 3.x version of cloudevents SDK #2769
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
examples(nodejs): bump to the latest 3.x version of cloudevents SDK #2769
Conversation
A few changes to the API were made in the recent release of the SDK. This commit updates the dependency and modifies the source to work with the new API.
I guess we have no test automation here and i'll have to manually check this is sound? 😅 |
Actually @csantanapr would you mind giving this a look? You're more knowledgeable on this front than I am. The changes look good on the surface though, thanks @lance! |
@markusthoemmes new release of the module is landing soon. Maybe this should hold and I can update the PR when that is published. |
Thanks for the ping @markusthoemmes @lance next time just open an issue I'm happy to update the sample or just assigned me as reviewer to your PR. I'll give the code a try. @lance how "soon" is the new update landing and how it changes your PR? We can always merge this PR and do another when the updates to the SDK lands. |
@csantanapr there are 3.2.1 and 4.0.0 releases imminent - should land this week or early next at the latest. In 4.0.0 there are some major interface changes that affect how a user receives CE messagaes. If you want to land this PR now, that's not a problem. |
@lance oh I thought it was more like a 3.3 bump not a major API release. With 2.x 3.x and 4.x release so close together it looks like the SDK is having a lot of fun turns. I would preferred end users just ignore and not be aware of 3.x and focus on 4.x. The more API changes the less trust on the library. |
Signed-off-by: Lance Ball <[email protected]>
@csantanapr I went ahead and just bumped to 3.2.0. The 4.x version is still pending release. |
I will review it @lance with 3.x then |
@@ -15,11 +15,10 @@ limitations under the License. | |||
*/ | |||
|
|||
const express = require('express') | |||
const { CloudEvent, HTTPEmitter, HTTPReceiver } = require('cloudevents-sdk') | |||
const { CloudEvent, Emitter, HTTP, headersFor } = require('cloudevents') |
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.
Small nit headersFor
is an unused variable
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.
Fixed
/lgtm |
/approve |
Signed-off-by: Lance Ball <[email protected]>
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: csantanapr, lance The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…native#2769) * examples(nodejs): bump to the latest 3.x version of cloudevents SDK A few changes to the API were made in the recent release of the SDK. This commit updates the dependency and modifies the source to work with the new API. * squash: bump cloudevents to 3.2.0 Signed-off-by: Lance Ball <[email protected]> * fixup: incorporate PR feedback Signed-off-by: Lance Ball <[email protected]>
A few changes to the API were made in the recent release of the SDK. This commit updates the dependency and modifies the source to work with the new API.
Proposed Changes
cloudevents
module version 3.1.0CloudEvent
instance in the response body inreceiveAndReply()