This commit updates the 0.1 and 0.3 sources to use the specversion
available in schema definitions.
Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
Enforce the use of `let` and `const` by using elsint rules.
When creating the eslint configuration, I had assumed that
`extends: eslint:recommended` would have covered this, but
apparently not!
Existing usage of `var` fixed with `npm run lint -- --fix`.
Fixes: https://github.com/cloudevents/sdk-javascript/issues/97
Signed-off-by: Lance Ball <lball@redhat.com>
The code coverage publishing in package.json works fine on non-ubuntu systems.
However, in Ubuntu `/bin/sh` is symlinked to `/bin/dash` which doesn't support
everything supported by `/bin/bash` - specifically `-o pipefail`.
This commit changes the code coverage script to explicitly use `bash` instead.
Fixes: https://github.com/cloudevents/sdk-javascript/issues/81
Signed-off-by: Lance Ball <lball@redhat.com>
This commit adds the `standard-version` module for managing releases.
When running `npm run release` the following steps are taken.
1. Retreive the current version of your repository by looking at package.json.
2. Bump the version in package.json based on the commits.
3. Prepends to the CHANGELOG based on the commits (uses conventional-changelog under the hood).
4. Create a new commit including the package.json and updated CHANGELOG.
5. Create a new tag with the new version number.
This works best if all commits follow the Conventional Commits specification.
https://www.conventionalcommits.org/en/v1.0.0/
Fixes: https://github.com/cloudevents/sdk-javascript/issues/56
Signed-off-by: Lance Ball <lball@redhat.com>
This commit updates the http unmarshaller tests to use the constants
available in lib/bindings/http/constants.js.
Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
This commit removes support for the v0.2 specification. It also removes the
`contenttype` attribute from the `CloudEvent` object. While the HTTP protocol
binding specifies that in binary mode, the `datacontenttype` attribute should
map to the HTTP Content-Type header, that doesn't mean that the `CloudEvent`
object should have a `contenttype` property.
Fixes: https://github.com/cloudevents/sdk-javascript/issues/61
Fixes: https://github.com/cloudevents/sdk-javascript/issues/66
Signed-off-by: Lance Ball <lball@redhat.com>
Automatically fixed > 2000 issues. The remaining 200+ issues need
to be fixed by hand. Additionally, all strings are double quotes
which is not typically standard and I wonder about fixing that too.
Signed-off-by: Lance Ball <lball@redhat.com>
This commit updates all of the dependencies in package.json to
their most recent versions. It also removes dependencies that were
specified in package.json but not used - or only used in a
`require()` statement.
These changes have some ripple effects. Istanbul has not been
supported for some time, so it has been replaced with nyc.
The code coverage reporting tool from codacy has been updated
as well. This could not be tested without having the API token.
Finally, the CI job has been modified to run tests on Node.js
versions 10x and 12x. All older versions of Node.js are no longer
maintained.
Signed-off-by: Lance Ball <lball@redhat.com>
This commit modifies both of the 1.0 emitters so that they may
accept typed objects as a part of the configuration. When using
mTLS in Node, you need to provide an `Agent` to the underlying
HTTP handler. In this case, Axios will pass this object along to
Node.js when it is provided.
Fixes: https://github.com/cloudevents/sdk-javascript/issues/48
Signed-off-by: Lance Ball <lball@redhat.com>
This commit removes the API documentation for the fromString Cloudevent
function as it does not seem to exist.
Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>