Commit Graph

12 Commits

Author SHA1 Message Date
Helio Frota 42246ce36b chore: Update uuid dependency
Signed-off-by: Helio Frota <00hf11@gmail.com>
2020-04-30 12:34:30 -03:00
Lance Ball 5110ad4c67 src,fix: drop support for v0.2 and clean up contenttype
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>
2020-04-28 17:37:49 -03:00
Lance Ball 3f238a0124
src: add eslint configuration and npm script
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>
2020-04-22 10:15:05 -04:00
Lance Ball aa2cef6e3c
deps: update old and remove unused dependencies
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>
2020-04-20 14:53:53 -04:00
Daniel Bevenius df85189a64 Use const instead of var where applicable
Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2020-04-20 09:54:25 +02:00
Fabio José 15616995c3 Fixes: #33
Add the special handling in the getData() method

Signed-off-by: Fabio José <fabiojose@gmail.com>
2019-09-01 10:50:55 -03:00
Fabio José 2ad2249724 Remove comment code and check for string type of data attribute
Signed-off-by: Fabio José <fabiojose@gmail.com>
2019-08-06 11:17:07 -03:00
Fabio José 4fdba57069 Checking for datacontentencoding
Signed-off-by: Fabio José <fabiojose@gmail.com>
2019-08-04 09:35:57 -03:00
Fabio José 0225c358f8 Default value for _caller argument
Signed-off-by: Fabio José <fabiojose@gmail.com>
2019-08-02 14:25:21 -03:00
Fabio José d692f416b6 Fix code style: missing parens, double quote and semicolon
Signed-off-by: Fabio José <fabiojose@gmail.com>
2019-07-29 09:50:28 -03:00
Fabio José 374c0a233c New functions for fun
Signed-off-by: Fabio José <fabiojose@gmail.com>
2019-07-29 09:33:37 -03:00
Fabio José b8f1012d1d Implementing the spec 0.3 attributes
Signed-off-by: Fabio José <fabiojose@gmail.com>
2019-07-28 21:53:34 -03:00