Skip to content

Commit

Permalink
Merge pull request #34 from cloudevents/develop
Browse files Browse the repository at this point in the history
Fixies and Changelog
  • Loading branch information
fabiojose authored Aug 23, 2019
2 parents 06927a9 + ea779e8 commit 5ba6cf7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [0.3.1]

### Fixed

- Axios version to `0.18.1` due the CVE-2019-10742
- Fix the `subject` attribute unmarshal error: issue
[#32](https://github.com/cloudevents/sdk-javascript/issues/32)
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ ahead of `master`.

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

## Changelog

Always update the [CHANGELOG.md](./CHANGELOG.md), following
[this semantics](https://keepachangelog.com/en/1.0.0/).

## Pull Requests

Guidelines about how to perform pull requests.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
[![downloads](https://img.shields.io/npm/dy/cloudevents-sdk.svg)](https://www.npmjs.com/package/cloudevents-sdk)
[![npm version](https://img.shields.io/npm/v/cloudevents-sdk.svg)](https://www.npmjs.com/package/cloudevents-sdk)
[![dependencies](https://david-dm.org/cloudevents/sdk-javascript.svg)](https://david-dm.org/cloudevents/sdk-javascript)
[![vulnerabilities](https://snyk.io/test/github/cloudevents/sdk-javascript/badge.svg)](https://snyk.io/test/github/cloudevents/sdk-javascript)

# sdk-javascript

Official CloudEvents' SDK for JavaScript.

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

__Checkout the [changelog](./CHANGELOG.md) to see what's going on!__

## Contributing

Before create an awesome PR, please read our [guidelines](./CONTRIBUTING.md).
Expand Down
4 changes: 4 additions & 0 deletions lib/bindings/http/receiver_structured_0_3.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ setterByAttribute[Constants.STRUCTURED_ATTRS_03.CONTENT_TYPE] = {
name: "dataContentType",
parser: (v) => v
};
setterByAttribute[Constants.STRUCTURED_ATTRS_03.SUBJECT] = {
name: "subject",
parser: (v) => v
};
setterByAttribute[Constants.STRUCTURED_ATTRS_03.DATA] = {
name: "data",
parser: (v) => v
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudevents-sdk",
"version": "0.3.0",
"version": "0.3.1",
"description": "CloudEvents SDK for JavaScript",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"homepage": "https://github.com/cloudevents/sdk-javascript#readme",
"dependencies": {
"ajv": "^6.7.0",
"axios": "0.18.0",
"axios": "0.18.1",
"is-empty": "1.2.0",
"uri-js": "4.2.2",
"uuid": "3.3.2"
Expand Down
5 changes: 3 additions & 2 deletions test/bindings/http/unmarshaller_0_3_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const webhook = "https://cloudevents.io/webhook";
const contentType = "application/cloudevents+json; charset=utf-8";
const now = new Date();
const schemaurl = "http://cloudevents.io/schema.json";

const subject = "subject.ext";
const ceContentType = "application/json";

const data = {
Expand Down Expand Up @@ -118,9 +118,10 @@ describe("HTTP Transport Binding Unmarshaller for CloudEvents v0.3", () => {
new Cloudevent(v03.Spec)
.type(type)
.source(source)
.contenttype(ceContentType)
.dataContentType(ceContentType)
.time(now)
.schemaurl(schemaurl)
.subject(subject)
.data(data)
.toString();

Expand Down

0 comments on commit 5ba6cf7

Please sign in to comment.