Skip to content
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

Fixies and Changelog #34

Merged
merged 13 commits into from
Aug 23, 2019
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