Skip to content

Commit 5ba6cf7

Browse files
authored
Merge pull request #34 from cloudevents/develop
Fixies and Changelog
2 parents 06927a9 + ea779e8 commit 5ba6cf7

File tree

6 files changed

+30
-4
lines changed

6 files changed

+30
-4
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6+
7+
## [0.3.1]
8+
9+
### Fixed
10+
11+
- Axios version to `0.18.1` due the CVE-2019-10742
12+
- Fix the `subject` attribute unmarshal error: issue
13+
[#32](https://github.com/cloudevents/sdk-javascript/issues/32)

CONTRIBUTING.md

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ ahead of `master`.
1212

1313
- [Gitflow](https://nvie.com/posts/a-successful-git-branching-model/) by @nvie
1414

15+
## Changelog
16+
17+
Always update the [CHANGELOG.md](./CHANGELOG.md), following
18+
[this semantics](https://keepachangelog.com/en/1.0.0/).
19+
1520
## Pull Requests
1621

1722
Guidelines about how to perform pull requests.

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
[![downloads](https://img.shields.io/npm/dy/cloudevents-sdk.svg)](https://www.npmjs.com/package/cloudevents-sdk)
66
[![npm version](https://img.shields.io/npm/v/cloudevents-sdk.svg)](https://www.npmjs.com/package/cloudevents-sdk)
77
[![dependencies](https://david-dm.org/cloudevents/sdk-javascript.svg)](https://david-dm.org/cloudevents/sdk-javascript)
8+
[![vulnerabilities](https://snyk.io/test/github/cloudevents/sdk-javascript/badge.svg)](https://snyk.io/test/github/cloudevents/sdk-javascript)
89

910
# sdk-javascript
1011

1112
Official CloudEvents' SDK for JavaScript.
1213

1314
<img src="https://github.com/cncf/artwork/blob/master/projects/cloudevents/horizontal/color/cloudevents-horizontal-color.png" width="300" height="58" alt="CloudEvents logo">
1415

16+
__Checkout the [changelog](./CHANGELOG.md) to see what's going on!__
17+
1518
## Contributing
1619

1720
Before create an awesome PR, please read our [guidelines](./CONTRIBUTING.md).

lib/bindings/http/receiver_structured_0_3.js

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ setterByAttribute[Constants.STRUCTURED_ATTRS_03.CONTENT_TYPE] = {
5151
name: "dataContentType",
5252
parser: (v) => v
5353
};
54+
setterByAttribute[Constants.STRUCTURED_ATTRS_03.SUBJECT] = {
55+
name: "subject",
56+
parser: (v) => v
57+
};
5458
setterByAttribute[Constants.STRUCTURED_ATTRS_03.DATA] = {
5559
name: "data",
5660
parser: (v) => v

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloudevents-sdk",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "CloudEvents SDK for JavaScript",
55
"main": "index.js",
66
"scripts": {
@@ -32,7 +32,7 @@
3232
"homepage": "https://github.com/cloudevents/sdk-javascript#readme",
3333
"dependencies": {
3434
"ajv": "^6.7.0",
35-
"axios": "0.18.0",
35+
"axios": "0.18.1",
3636
"is-empty": "1.2.0",
3737
"uri-js": "4.2.2",
3838
"uuid": "3.3.2"

test/bindings/http/unmarshaller_0_3_tests.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const webhook = "https://cloudevents.io/webhook";
99
const contentType = "application/cloudevents+json; charset=utf-8";
1010
const now = new Date();
1111
const schemaurl = "http://cloudevents.io/schema.json";
12-
12+
const subject = "subject.ext";
1313
const ceContentType = "application/json";
1414

1515
const data = {
@@ -118,9 +118,10 @@ describe("HTTP Transport Binding Unmarshaller for CloudEvents v0.3", () => {
118118
new Cloudevent(v03.Spec)
119119
.type(type)
120120
.source(source)
121-
.contenttype(ceContentType)
121+
.dataContentType(ceContentType)
122122
.time(now)
123123
.schemaurl(schemaurl)
124+
.subject(subject)
124125
.data(data)
125126
.toString();
126127

0 commit comments

Comments
 (0)