Commit Graph

785 Commits

Author SHA1 Message Date
github-actions[bot] 1995b5778e
chore(main): release 7.0.0 (#547)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-03 12:13:52 -04:00
Lance Ball 0120d224ab
chore: release 7.0.0 (#546)
Release-As: 7.0.0

Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-03 12:10:06 -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 4626529d56
fixup: resolve package-lock.json conflict (#544)
Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-03 09:29:55 -04:00
Lance Ball ec83abc827
chore: fix release-please-action (#543)
Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-03 09:29:41 -04:00
sskular-wonderlab 1cf8f8acae
540 fix node version (#541)
* build(deps-dev): bump webpack from 5.75.0 to 5.76.0

Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: include node v20.0.0 in package.json

Signed-off-by: Slavko Skular <slavko.skular@wonderlab-it.co.uk>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Slavko Skular <slavko.skular@wonderlab-it.co.uk>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-02 14:44:02 -04:00
Lucas Holmquist 343382ebde
chore: release 6.0.5 (#542)
Release-As: 6.0.5

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2023-05-02 14:38:31 -04:00
Lucas Holmquist c06ffc1963
chore: add the build script to the pretest script. (#539)
This small change allows a developer to just run npm install and then npm test without having to run the build step separately, which compiles the schema that is needed to run the tests successfully.

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2023-05-01 17:30:12 -04:00
Jordan Moore 7ff64f8b82
chore: Update CI action to node 18.x (#533)
* Update CI action to node 18.x

Signed-off-by: Jordan Moore <1930631+OneCricketeer@users.noreply.github.com>

* doc: update README

Signed-off-by: Jordan Moore <1930631+OneCricketeer@users.noreply.github.com>

---------

Signed-off-by: Jordan Moore <1930631+OneCricketeer@users.noreply.github.com>
2023-03-08 10:48:51 -05:00
Lucas Holmquist 870d2118cd 6.0.4 2023-02-16 11:28:58 -05:00
github-actions[bot] 78b8e0a372
chore: release 6.0.3 (#524)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-16 11:20:39 -05:00
Craig Dennis 953bc2a143 chore: Typos
Receive corrections

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2023-02-16 11:15:11 -05:00
viraj-s15 bc3aaca2ef chore: added the engines property to the package.json
Signed-off-by: viraj-s15 <veer15102003@gmail.com>

Co-authored-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2023-02-16 11:10:45 -05:00
Lucas Holmquist e5ee8369ba
fix: This fixes bug #525 where the browser version was breaking becuase of process not being found. (#526)
fixes #525

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2023-02-12 15:25:38 -05:00
Xavier Serrano b374d9ac33
chore(examples): add mqtt example (#523)
Signed-off-by: Xavier Serrano <zombispormedio007@gmail.com>
2023-02-06 12:25:35 -05:00
dependabot[bot] 64e527c120
build(deps): bump cookiejar from 2.1.3 to 2.1.4 (#521)
Bumps [cookiejar](https://github.com/bmeck/node-cookiejar) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/bmeck/node-cookiejar/releases)
- [Commits](https://github.com/bmeck/node-cookiejar/commits)

---
updated-dependencies:
- dependency-name: cookiejar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 12:22:49 -05:00
dependabot[bot] 1b449c4c9a
build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#522)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 12:22:30 -05:00
dependabot[bot] eccc00ee67
build(deps): bump json5 from 2.2.0 to 2.2.3 (#520)
Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 16:32:57 -05:00
dependabot[bot] 94f1a3d470
build(deps): bump qs and formidable (#518)
Bumps [qs](https://github.com/ljharb/qs) and [formidable](https://github.com/node-formidable/formidable). These dependencies needed to be updated together.

Updates `qs` from 6.10.2 to 6.11.0
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.10.2...v6.11.0)

Updates `formidable` from 2.0.1 to 2.1.1
- [Release notes](https://github.com/node-formidable/formidable/releases)
- [Changelog](https://github.com/node-formidable/formidable/blob/master/CHANGELOG.md)
- [Commits](https://github.com/node-formidable/formidable/commits)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
- dependency-name: formidable
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 12:50:46 -05:00
github-actions[bot] 3619ef2bbd
chore: release 6.0.3 (#503)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-08 14:33:50 -05:00
Philip Sanetra 2d5fab1b71
fix: Make CloudEvent data field immutable and enumerable using Object.keys() (#515) (#516)
Signed-off-by: Philip Sanetra <code@psanetra.de>
2022-11-01 12:46:26 -04:00
Lance Ball c09a9cc20a
chore: bump cucumber to full release version (#514) 2022-10-26 20:28:13 -04:00
Lance Ball 4831e6a1a5
chore: bump mocha to 10.1.0 (#512)
Duplicates https://github.com/cloudevents/sdk-javascript/pull/510

Severity                   | Priority Score (*)                   | Issue                   | Breaking Change                   | Exploit Maturity
:-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------
![high severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/h.png "high severity")  |  **589/1000**  <br/> **Why?** Has a fix available, CVSS 7.5  | Regular Expression Denial of Service (ReDoS) <br/>[SNYK-JS-MOCHA-2863123](https://snyk.io/vuln/SNYK-JS-MOCHA-2863123) |  Yes  | No Known Exploit

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-24 16:11:56 -04:00
Lance Ball 760a024067
chore: bump webpack to 5.74.0 (#509)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-19 13:32:46 -04:00
dependabot[bot] c282922ef9
build(deps): bump terser from 5.10.0 to 5.14.2 (#505)
Bumps [terser](https://github.com/terser/terser) from 5.10.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-02 17:03:13 -04:00
Lance Ball ea94a4d779
fix: improve validation on extension attribute (#502)
* fix: improve validation on extension attribute

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

Adds a regular expression check to the attribute name validation code to
ensure that attribute names only use a-z0-9 (except for `data_base64`,
which apparently is an exception to the rule.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-06-22 15:27:41 -04:00
github-actions[bot] 847f6bfcc7
chore: release 6.0.2 (#497)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-21 17:12:15 -04:00
snyk-bot ed63f14339
fix: package.json & package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-GOT-2932019
2022-06-19 23:49:48 +00:00
Lance Ball 921e273ede
fix: allow `TypedArray` for binary data (#494)
* fix: allow `Uint16|8Array` for binary data

Previously we only considered `Uint32Array` binary data. This was an
oversight. This fixes that issue.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-06-15 00:51:36 -04:00
Grant Timmerman a62eb44669
chore: update owners (#499)
* chore: update owners

Signed-off-by: Grant Timmerman <744973+grant@users.noreply.github.com>
2022-06-15 00:50:18 -04:00
Lance Ball d6f52ca65f
fix: HTTP headers for extensions with false values (#493)
* fix: HTTP headers for extensions with false values

CloudEvent objects may include extensions that have a defined key and a
`false` value. This change ensures that HTTP messages for CloudEvents
containing these extension values include the appropriate headers.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-06-14 17:44:06 -04:00
Lance Ball ce02e0a1f3
chore: bump ajv and remove old dep dependency (#496)
* chore: bump ajv and remove old dep dependency

This should allow the existing, meaningful PRs to pass CI validation if they get a rebase.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-06-14 17:30:29 -04:00
dependabot[bot] d9ee0e05d1
build(deps): bump minimist from 1.2.5 to 1.2.6 (#486)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-10 12:00:21 -04:00
Jason Lock addbd9acf1
Fix typo in README (#488)
Signed-off-by: Jason Lock <jasonlock@Jasons-MacBook-Pro.local>
2022-05-10 11:59:56 -04:00
github-actions[bot] a512aad5d5
chore: release 6.0.1 (#485)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-21 15:40:44 -04:00
Lance Ball c0b1f7705a
chore: update dependencies to inlude ajv-formats (#484)
In this PR https://github.com/cloudevents/sdk-javascript/pull/471/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R128
it was not noticed that the addition of `ajv-formats` to devDependencies
is insufficient. Unfortunately, users of v6.0.0 will receive an error when
using the module, unless they explicitly install `ajv-formats` in their
project. This commit fixes that, and should result in an immediate release
of version 6.0.1.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-21 15:38:31 -04:00
github-actions[bot] 0164f72eaa
chore: release 6.0.0 (#482)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-21 14:19:43 -04:00
Lance Ball 4ab6356bd7
docs: update readme to include http builtin transport (#483)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-21 08:40:16 -04:00
Lance Ball 0362a4f11c
feat!: add http transport and remove axios (#481)
* feat: add builtin HTTP emitter

Adds a builtin HTTP event emitter that can be used with `emitterFor()`
to send events over HTTP without pulling in any additional dependencies.

In the past we chose to keep this in our code base by considering axios a
peer dependency - users were required to include it in their projects
explicitly. In working on the HTTP emitter, it became more and more
apparent that the axios emitter was probably no longer needed, and in fact
I doubt it was really used at all. To use it, users would have been required
to do this, since it isn't exported at the top level.

const { axiosEmitter } = require("cloudevents/transport/http");

Based on this, I think the usage in the wild is probably very minimal,
and I like the idea of eliminating this dependency.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-18 13:36:12 -04:00
Lance Ball b4d7aa9adb
chore: add an npm test:once script (#480)
Adds a convenience npm script that allows you to run only a single test
file at a time. Example usage:

```
sdk-javascript on  lance/update-deps-package-json [!?] is 📦 v5.3.2 via  v16.14.0
❯ npm run test:one

> cloudevents@5.3.2 test:one
> mocha --require ts-node/register

Error: No test files found

sdk-javascript on  lance/update-deps-package-json [!?] is 📦 v5.3.2 via  v16.14.0
❯ npm run test:one -- ./test/integration/batch_test.ts

> cloudevents@5.3.2 test:one
> mocha --require ts-node/register "./test/integration/batch_test.ts"

  A batched CloudEvent message over HTTP
    ✔ Can be created with a typed Message

  A batched CloudEvent message over Kafka
    ✔ Can be created with a typed Message

  2 passing (5ms)

sdk-javascript on  lance/update-deps-package-json [!?] is 📦 v5.3.2 via  v16.14.0
```

Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-17 23:10:30 -04:00
Lance Ball 6204805bfc
chore: update package.json format and deps (#479)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-17 23:09:29 -04:00
Lance Ball ae8cb96f8a
doc: update maintainers in README.md (#478)
This commit modifies the structure of the README.md to add a markdown
heading. This change is motiviated by the CLO tool provided by CNCF.
This repository is failing a check for maintainers as you can see on
the dashboard:
https://clomonitor.io/projects/cloudevents/cloudevents#sdk-javascript

Documentation for this change can be found here:
https://github.com/cncf/clomonitor/blob/main/docs/checks.md#maintainers

Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-17 13:21:48 -04:00
Lance Ball c420da4793
chore: update the release documentation (#476)
It has been out of date since we switched to using release-please
for our release automation.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-02-16 12:09:45 -05:00
Lance Ball b13bde9b49
feat: precompile cloudevent schema (#471)
* feat: precompile cloudevent schema

This commit modifies the build pipleline so that the cloudevent schema is
precompiled for runtime validation. This eliminates the need to compile the
schema at runtime, improving both performance and security.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-02-15 14:06:42 -05:00
dependabot[bot] 4d8f03f7c6
build(deps): bump follow-redirects from 1.14.7 to 1.14.8 (#473)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 15:26:46 -05:00
github-actions[bot] 9046b369cf
chore: release 5.3.2 (#470)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-11 15:42:37 -08:00
Lance Ball c3d9f39a53
chore: bump typedoc to remove vuln (#472) 2022-02-10 22:25:48 -06:00
Lance Ball b5c0b56f52
fix: use `isolatedModules: true` in tsconfig.json (#469)
* fix: use `isolatedModules: true` in tsconfig.json

This setting ensures the module can be used in projects where the workflow
includes type checking and transpilation as two separate steps.

See: https://ncjamieson.com/dont-export-const-enums/

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-02-10 08:39:09 -05:00
github-actions[bot] f36a1f0428
chore: release 5.3.1 (#466)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-03 13:45:21 -05:00
Lance Ball cd4dea954b
fix: improve binary data detection in HTTP transport (#468) 2022-02-02 07:18:08 -05:00