Commit Graph

8 Commits

Author SHA1 Message Date
Lance Ball 4281797b28
fixup: remove stray import
Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-08 16:03:57 -04:00
Lance Ball c5ad706308
fix: handle big integers in incoming events
An event may have data that contains a BigInt. The builtin `JSON` parser
for JavaScript does not handle the `BigInt` types. The introduced
`json-bigint` dependency (34k) does.

Fixes: https://github.com/cloudevents/sdk-javascript/issues/489

Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-08 15:56:08 -04:00
Lucas Holmquist 2cb9364a25
feat!: remove node 12 and node 14 (#545)
* feat!: remove node 12 and node 14

Node 12 has been EOL since the end of April 2022 and Node 14 just became EOL at the end of April 2023

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2023-05-03 11:10:47 -04:00
Lance Ball 320354f750
chore: update cucumber dependency and remove prettier (#453)
The combination of prettier and eslint was causing some conflicting error
messages in formatting between VSCode and using npm in the CLI. For the most
part, there were only a couple of required formatting changes that prettier
was covering, so the change is minor.

The cucumber dependency had a major version bump and was carrying some unsafe
dependencies in the older version. This commit bumps to the new version and
makes appropriate configuration changes.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-12-22 10:45:35 -05:00
Remi Cattiau 80d987c1f6
chore: add copyrights header and lint rules (#418)
Signed-off-by: Remi Cattiau <remi@cattiau.com>
2021-05-14 09:28:49 -04:00
Lance Ball db4be6b1da
src: be more forgiving parsing JSON as a string (#417)
* src: be more forgiving parsing JSON as a string

A simple string is considered valid JSON. However, our parsers do
not accept that unless the string has quotation marks. This commit
modifies the parser to look for strings declared as application/json
which do not begin with '[' '{' or '"' and surrounds them with
quotes.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-13 12:46:36 -04:00
Grant Timmerman a6124cc350
refactor: simplify parser logic and duplicated code (#269)
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
2020-07-24 15:08:52 -04:00
Lance Ball dca2811627
test: inplement the cucumber conformance tests from cloudevents/spec (#238)
This commit adds cucumber-js conformance steps and includes the cucumber
tests in 'npm test'.

Signed-off-by: Lance Ball <lball@redhat.com>
2020-07-13 09:47:02 -04:00