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

Merge #1

Merged
merged 73 commits into from
Jul 23, 2020
Merged

Merge #1

merged 73 commits into from
Jul 23, 2020

Commits on May 9, 2020

  1. fix: ensure binary events can handle no content-type header (#134)

    * fix: ensure binary events can handle no content-type header
    
    The fix provided in #118
    only included tests for `receiver.check()`, and the change in that
    case was to add the `application/json` content type to the cleansed
    headers if to type was specified.
    
    However, `receiver.parse()` did not receive the benefit of this change. It
    calls `this.check()` but then sanitizes the original headers again, and the
    missing content-type was not re-inserted into the newly sanitized headers.
    
    This commit, modifies the code so that `receiver.check()` does not insert
    the content-type, but does allow the validation check to pass if no
    content-type header exists. When `receiver.parse()` is called, and the
    headers are sanitized again - and this time used to look up parser implementation,
    the default `application/json` content-is applied if no content-type header
    exists.
    
    I've also removed a redundant call to `receiver.check()` in receiver_binary_1.js
    and simplified the usage of `Constants` in the test.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    
    * chore: clean up header sniffing
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 9, 2020
    Configuration menu
    Copy the full SHA
    72a87df View commit details
    Browse the repository at this point in the history
  2. chore: add action to detect and close stale issues

    Using this GH action will prevent issues and pull requests from sitting unattended for more than 30 days.
    
    Ref: https://github.com/actions/stale
    lance authored May 9, 2020
    Configuration menu
    Copy the full SHA
    5a6cde5 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2020

  1. docs: update README and examples with new API (#138)

    This commit modifies the README to show new API usage for the
    `HTTPReceiver` and `CloudEvent` classes, and updates the examples
    to use this as well.
    
    Overall structure and content has been modified to look more like
    the sdk-go README.
    
    Fixes: #128
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 11, 2020
    Configuration menu
    Copy the full SHA
    b866edd View commit details
    Browse the repository at this point in the history
  2. fix: throw "no cloud event detected" if one can't be read (#139)

    This commit changes the event mode detection in `HTTPReceiver` so that it will
    throw a TypeError if the event mode can't be detected per the spec.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 11, 2020
    Configuration menu
    Copy the full SHA
    ef7550d View commit details
    Browse the repository at this point in the history

Commits on May 12, 2020

  1. docs: add instructions and details to contributors guide (#105)

    This commit adds instructions and details to contributors guide and provides detailed guidance for pull requests and maintainers in separate documents.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 12, 2020
    Configuration menu
    Copy the full SHA
    fd99cb1 View commit details
    Browse the repository at this point in the history
  2. lib: remove unnecessary else statements (#146)

    This commit removes two unnecessary else clauses in unmarshaller.js, and
    also extracts the throwing of TypeError of invalid content types into a
    separate function to avoid some code duplication.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 12, 2020
    Configuration menu
    Copy the full SHA
    b7b4912 View commit details
    Browse the repository at this point in the history
  3. test: remove uuid require in spec_03_tests.js (#145)

    This commit removes the require of uuid from this test and uses a
    hardcoded value for the 'id' constant instead.
    
    The motivation for this is that the value for 'id' does not need to be
    generated for each test run, and fewer requires helps readabilitly I
    find.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 12, 2020
    Configuration menu
    Copy the full SHA
    c56c203 View commit details
    Browse the repository at this point in the history
  4. lib: add .js suffix to receiver_binary_0_3 (#143)

    This commit adds the '.js' suffix to the require of receiver_binary_0_3
    to be consistent with the other requires statments in this file.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 12, 2020
    Configuration menu
    Copy the full SHA
    94974a7 View commit details
    Browse the repository at this point in the history
  5. lib: remove mode variable from getMode (#142)

    Currently, the mode variable in getMode is set to 'unknown' but this
    will never get returned as the else clause will throw a TypeError if the
    detected mode (from the passed-in headers) is not structured or binary.
    
    This commit suggests simplifying the getMode function and removes the
    mode variable.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 12, 2020
    Configuration menu
    Copy the full SHA
    847fff8 View commit details
    Browse the repository at this point in the history
  6. test: use constants in spec_03_tests.js (#144)

    Co-authored-by: Lance Ball <lball@redhat.com>
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev and lance authored May 12, 2020
    Configuration menu
    Copy the full SHA
    2882aff View commit details
    Browse the repository at this point in the history
  7. chore: adds files section in package.json (#147)

    Signed-off-by: Helio Frota <00hf11@gmail.com>
    helio-frota authored May 12, 2020
    Configuration menu
    Copy the full SHA
    f8a62b2 View commit details
    Browse the repository at this point in the history
  8. docs: add JSDocs for top level API objects (#140)

    This commit add JSDoc documentation to the CloudEvent and HTTPReceiver
    objects exposed by the API when using the top level imports, specifically
    `CloudEvent` and `HTTPReceiver`.
    
    This adds a `generate-docs` npm script to generate site and API documentation
    for GitHub pages in `./docs`.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 12, 2020
    Configuration menu
    Copy the full SHA
    b283583 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2020

  1. build: update package-lock.json

    After updating and running npm install the package-lock.json file is
    updated. I can see that packate-lock.json was included in
    Commit b283583 ("docs: add JSDocs for
    top level API objects") but perhaps there were changes to package.json
    that were made after and went unnoticed.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev committed May 13, 2020
    Configuration menu
    Copy the full SHA
    e43e660 View commit details
    Browse the repository at this point in the history
  2. lib: make setterByAttribute a Map (#154)

    This commit changes the setterByAttribute to be a map and tries to
    reduce some code duplication and improve readability.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 13, 2020
    Configuration menu
    Copy the full SHA
    8b67d36 View commit details
    Browse the repository at this point in the history
  3. lib: destruct contants in http/unmarshaller.js (#152)

    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 13, 2020
    Configuration menu
    Copy the full SHA
    b5a6673 View commit details
    Browse the repository at this point in the history
  4. feat: add ValidationError type extending TypeError (#151)

    This change adds a `ValidationError` type that extends `TypeError`. Any time a `CloudEvent` cannot be received and created with the given input, this error will be thrown. Tests have all
    been updated to check for the error type.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 13, 2020
    Configuration menu
    Copy the full SHA
    09b0c76 View commit details
    Browse the repository at this point in the history
  5. lib: removes unused array in receiver_binary_1.js (#158)

    Signed-off-by: Helio Frota <00hf11@gmail.com>
    helio-frota authored May 13, 2020
    Configuration menu
    Copy the full SHA
    7665969 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2020

  1. feat!: expose a version agnostic event emitter (#141)

    * feat!: expose a version agnostic event emitter
    
    This is a breaking change.
    
    This commit exposes an HTTP based event emitter that simplifes the API.
    To use it, simply import the SDK and start emitting. The default spec
    version is 1.0, but you can use 0.3 by supplying that to the constructor.
    
    By default, CloudEvents are emitted in binary mode, but this can be changed
    by providing the "structured" parameter to the `send()` function.
    
    This commit also eliminates the version specific emitters and receivers
    from the `v1` and `v03` exports, and eliminates the explicit usage of
    versioned emitters from `lib/bindings/http`.
    
    Finally, the CE headers can be retrieved from the emitter for a given
    event by passing the event to the `headers()` function.
    
    Fixes: #124
    Fixes: #149
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 14, 2020
    Configuration menu
    Copy the full SHA
    250a0a1 View commit details
    Browse the repository at this point in the history
  2. lib: Changed Array instantiation and object creation (#159)

    Signed-off-by: Helio Frota <00hf11@gmail.com>
    helio-frota authored May 14, 2020
    Configuration menu
    Copy the full SHA
    70de8af View commit details
    Browse the repository at this point in the history

Commits on May 15, 2020

  1. lib: fix minor typo in ValidationError comment (#164)

    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 15, 2020
    Configuration menu
    Copy the full SHA
    e2233f8 View commit details
    Browse the repository at this point in the history
  2. lib: remove version variable from getVersion (#163)

    This commit removes the version variable from getVersion and updates the
    code to use return statements to be consistent with other functions in
    this file, like getMode and accept.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 15, 2020
    Configuration menu
    Copy the full SHA
    cf36a15 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2020

  1. lib: remove result variable from asData (#167)

    This commit removes the 'result' variable form the utility function
    asData. The motivation is to improve readability.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 18, 2020
    Configuration menu
    Copy the full SHA
    db42ad8 View commit details
    Browse the repository at this point in the history
  2. lib: expose constants as a top-level export (#161)

    This commit pulls the constants up from the lib/bindings/http/constants.js
    and exports them in the top level index.js. There are some elements of the API
    where we expect users to provide constant values, and this makes it easier for
    them to be sure the values they provide are what is expected.
    
    I've also added two new constants: `BINARY` and `STRUCTURED`.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 18, 2020
    Configuration menu
    Copy the full SHA
    d836b06 View commit details
    Browse the repository at this point in the history
  3. lib: correct name of CONTENT_ENCODING constant (#168)

    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 18, 2020
    Configuration menu
    Copy the full SHA
    b99e6ea View commit details
    Browse the repository at this point in the history
  4. lib!: refactor HTTP bindings and specifications (#165)

    This is a breaking change.
    
    This commit makes a number of changes to the HTTP bindings code in an attempt
    to simplify its usage and implementation. From a very high level, this inverts
    the existing dependencies.
    
    As an example, consider `lib/bindings/http/receiver_structured_1.js`.
    https://github.com/cloudevents/sdk-javascript/blob/v1.0.0/lib/bindings/http/receiver_structured_0_3.js
    
    This class instantiates `lib/bindings/http/receiver_structured.js` and delegates
    its function invokations to it. This had the effect of requiring a user to know what
    event versions they would be receiving. And for me personally was a little confusing
    as a maintainer.
    
    The change introduced here reverses that logic, so that the version agnostic receiver
    is what the user instantiates. It instantiates the approrpiate version of a specific
    receiever and delegates to it - reversing the dependencies.
    
    I've also moved all of the top level directories related to HTTP versions into
    `lib/bindings/http/v1` and `lib/bindings/http/v03` and generally done some rearranging
    to make the repository structure cleaner and more organized.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 18, 2020
    Configuration menu
    Copy the full SHA
    6f0b5ea View commit details
    Browse the repository at this point in the history
  5. build: add tsc type checks and emit declarations in the ci/test pipel…

    …ine (#155)
    
    This commit introduces TypeScript checks and generates type declarations
    for the existing JavaScript codebase using `tsc` prior to running the linter task.
    
    Ref: #9
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 18, 2020
    Configuration menu
    Copy the full SHA
    2c469ef View commit details
    Browse the repository at this point in the history

Commits on May 19, 2020

  1. lib: make headerByGetter a Map (#171)

    This commit turns the headerByGetter Object into a Map to reduces some
    code duplication an hopefully improve readability a little.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev authored May 19, 2020
    Configuration menu
    Copy the full SHA
    57991e1 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2020

  1. lib!: change CloudEvent to use direct object notation and get/set pro…

    …perties (#172)
    
    This commit makes a substantial change to the API, changing the CloudEvent class
    to accept properties as an object in the constructor. For example:
    
    ```js
    const CloudEvent = require('cloudevents-sdk');
    
    // all event properties except extensions may be set in the constructor
    const event = new CloudEvent({
      source: 'http://my.event.source',
      type: 'test-event-type'
    });
    
    // get and set all properties standard property notation
    console.log(event.time); // the event timestamp
    event.subject = 'my event subject';
    ```
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 22, 2020
    Configuration menu
    Copy the full SHA
    abc114b View commit details
    Browse the repository at this point in the history

Commits on May 24, 2020

  1. lib: make HTTPEmitter headers method a property of the class (#186)

    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 24, 2020
    Configuration menu
    Copy the full SHA
    f50e80f View commit details
    Browse the repository at this point in the history

Commits on May 26, 2020

  1. docs: add maintainer guidelines for landing PRs (#177)

    Fixes: #86
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 26, 2020
    Configuration menu
    Copy the full SHA
    fdc79ae View commit details
    Browse the repository at this point in the history
  2. chore: add GitHub action for CI on master and prs (#181)

    * chore: replace travis-ci badge with github action
    * chore: remove .travis.yaml
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 26, 2020
    Configuration menu
    Copy the full SHA
    0fe57d1 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2020

  1. chore: add coverage GitHub action (#185)

    * chore: use codacy coverage reporter via GH Action
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 27, 2020
    Configuration menu
    Copy the full SHA
    349fe8e View commit details
    Browse the repository at this point in the history
  2. chore(release): 2.0.0

    lance committed May 27, 2020
    Configuration menu
    Copy the full SHA
    daf945c View commit details
    Browse the repository at this point in the history

Commits on May 28, 2020

  1. fix: initialize CloudEvent's extensions property (#192)

    Signed-off-by: Ali Ok <aliok@redhat.com>
    aliok authored May 28, 2020
    Configuration menu
    Copy the full SHA
    0710166 View commit details
    Browse the repository at this point in the history
  2. chore: CI workflow to only upload report if CODACY_PROJECT_TOKEN is s…

    …et (#193)
    
    GitHub will not set secrets in the environment when a pull request is submitted
    from a forked repository. This commit modifies the CI workflow to only send
    the report when the API token has been set. It also consolidates the two
    workflows into a single one which shares coverage data between jobs.
    
    Fixes: #190
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 28, 2020
    Configuration menu
    Copy the full SHA
    aa320e7 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2020

  1. chore: minor typos in guidance docs (#196)

    Signed-off-by: Doug Davis <dug@us.ibm.com>
    Doug Davis authored May 29, 2020
    Configuration menu
    Copy the full SHA
    15cd763 View commit details
    Browse the repository at this point in the history
  2. fix: introduce CloudEventV1 and CloudEventV03 interfaces (#194)

    This extracts all of the attributes from a `CloudEventVX` that
    are not generated by the constructor (id and specversion) into their
    own `CloudEventVXAttributes` interface which the `CloudEventVX`
    interface extends. This allows TS devs to optionally provide `id`
    and `specversion` with proper autocompletion.
    
    Additionally, I have added a union type, `CE` in `cloudevent.ts` which
    represents any of `CloudEventV1`, `CloudEventv03`, `CloudEventV1Attributes`
    and `CloudEventV03Attributes` interfaces.
    
    Finally, this commit changes all of the user facing API to be `.ts` instead
    of `.js` files.
    
    The existing documentation in `./docs` was removed. It should be replaced with generated
    HTML from tsdocs, pending some other method of publishing API documentation. That will
    come as a separate, docs-only PR.
    
    Fixes: https://github.com/cloudevents/skd-javascript/issues/188
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored May 29, 2020
    Configuration menu
    Copy the full SHA
    a5befbe View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2020

  1. chore(release): 2.0.1

    lance committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    edad2a6 View commit details
    Browse the repository at this point in the history
  2. fix: fix references to constants - remove .js extension (#200)

    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jun 1, 2020
    Configuration menu
    Copy the full SHA
    c757a2b View commit details
    Browse the repository at this point in the history
  3. fix: use /lib in gitignore so src/lib is not ignored (#199)

    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jun 1, 2020
    Configuration menu
    Copy the full SHA
    fba3294 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2020

  1. Update README.md (#205)

    Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
    grant authored Jun 4, 2020
    Configuration menu
    Copy the full SHA
    1b9b3af View commit details
    Browse the repository at this point in the history
  2. fix: add correct types to improve TypeScript behavior (#202)

    This commit modifies the existing TypeScript files with improved
    (read: functional) typings for function parameters. This became an
    issue when trying to use the module in an existing TypeScript module.
    
    Tests for the TypeScript files have been moved to a new test folder
    specifically for testing TypeScript usage via ts-node.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jun 4, 2020
    Configuration menu
    Copy the full SHA
    da365e0 View commit details
    Browse the repository at this point in the history
  3. lib: remove specversion from the attributes in receiver.accept() (#207)

    * lib: remove specversion from the required attributes in receiver.accept()
    
    The `HTTPReceiver` class' `accept()` method should not have a typescript
    type designation of `{ specversion: string }` for the `body` parameter
    because the event could (and often is) in binary form, which means that
    the `specversion` property won't be there.
    
    This commit changes the method signature to:
    
    `accept(headers: {}, body: {}) : CloudEvent`
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jun 4, 2020
    Configuration menu
    Copy the full SHA
    957aa6f View commit details
    Browse the repository at this point in the history
  4. docs(README): fix example typo (#208)

    fixes #173
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jun 4, 2020
    Configuration menu
    Copy the full SHA
    9857eda View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2020

  1. refactor: ts formatter (#210)

    Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
    grant authored Jun 8, 2020
    Configuration menu
    Copy the full SHA
    90782a9 View commit details
    Browse the repository at this point in the history
  2. chore(release): 2.0.2

    lance committed Jun 8, 2020
    Configuration menu
    Copy the full SHA
    b3d9dd2 View commit details
    Browse the repository at this point in the history
  3. docs: Update references of specific versions to use Latest Supported. (

    …#211)
    
    * docs: Update references of specific versions to use Latest Supported.
    
    fixes #160
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jun 8, 2020
    Configuration menu
    Copy the full SHA
    ed1d328 View commit details
    Browse the repository at this point in the history
  4. docs: generate api documentation as a GitHub workflow (#217)

    Fixes: #212
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jun 8, 2020
    Configuration menu
    Copy the full SHA
    44b791b View commit details
    Browse the repository at this point in the history
  5. feat: add types to package.json (#216)

    Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
    grant authored Jun 8, 2020
    Configuration menu
    Copy the full SHA
    4265281 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2020

  1. chore: Update examples to use the latest sdk version(2.0.2) (#206)

    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    dcb3c4e View commit details
    Browse the repository at this point in the history
  2. feat: pass extension into the constructor. (#214)

    * feat!: pass extension into the constructor.
    
    * This allows someone to pass an extension/extensions into the CloudEvent contructor when creating a CloudEvent.
    
    fixes #209
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    0378f4c View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2020

  1. feat: introduce browser support (#201)

    This commit introduces a second `tsc` execution which generates JS in ES5 form.
    Then, webpack is used to generate a browser bundle.
    
    Fixes: #94
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jun 10, 2020
    Configuration menu
    Copy the full SHA
    8b2725b View commit details
    Browse the repository at this point in the history
  2. examples: add a WebSocket example (#218)

    There is nothing really to do in order to support events over websockets.
    Since a `CloudEvent` can easily be represented in full with JSON, it can
    be sent over a websocket as `event.toString()`. This example illustrates
    sending a `CloudEvent` over websocket from a browser or CLI.
    
    Fixes: #156
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jun 10, 2020
    Configuration menu
    Copy the full SHA
    99bb88b View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2020

  1. chore: webpack should publish to bundles not _bundles (#227)

    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jun 17, 2020
    Configuration menu
    Copy the full SHA
    7012433 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2020

  1. docs(README): fix wrong order of arguments in the accept example (#224)

    fixes #222
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jun 18, 2020
    Configuration menu
    Copy the full SHA
    850e893 View commit details
    Browse the repository at this point in the history
  2. chore: adds the return type for the extensions (#221)

    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jun 18, 2020
    Configuration menu
    Copy the full SHA
    5ab8164 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2020

  1. fix: parse method mutating its input (#231)

    Signed-off-by: Matej Vasek <mvasek@redhat.com>
    matejvasek authored Jun 24, 2020
    Configuration menu
    Copy the full SHA
    060b21b View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2020

  1. BREAKING CHANGE(lib): rewrite in TypeScript (#226)

    This is a major rewrite of the entire codebase into TypeScript. Nearly
    all tests have been retained except where behavior is significantly
    different. Some highlights of these changes:
    
    * lowercase all CloudEvent properties and fix base64 encoded data
    
    Previously there was a format() function that would convert a CloudEvent
    object into JSON with all of the properties lowercased. With this rewrite
    a CloudEvent object can be converted to JSON simply with JSON.stringify().
    
    However, in order to be compliant with the JSON representation outlined in
    the spec here https://github.com/cloudevents/spec/blob/v1.0/json-format.md
    all of the event properties must be all lowercase.
    
    * lib(transport): make transport mode an Enum
    * src: allow custom headers (#1)
    * lib(exports): export explicitly versioned names where appropriate
    * lib(cloudevent): modify ctor to accept extensions inline
    * lib(cloudevent): make extensions a part of the event object
    * test: convert all tests to typescript
    * examples: update all examples with latest API changes
    * docs: update README with latest API changes
    * src: add prettier for code style and fix a lot of linting errors
    * lib: move data decoding to occur within the CloudEvent object
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jun 29, 2020
    Configuration menu
    Copy the full SHA
    276b810 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2020

  1. fix: upgrade uuid from 8.0.0 to 8.1.0 (#220)

    Snyk has created this PR to upgrade uuid from 8.0.0 to 8.1.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/uuid
    
    See this project in Snyk:
    https://app.snyk.io/org/lance/project/37afc620-45ad-41a3-9acc-1ac155caebc7?utm_source=github&utm_medium=upgrade-pr
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    snyk-bot authored Jun 30, 2020
    Configuration menu
    Copy the full SHA
    25077a9 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2020

  1. chore(actions): don't auto-close stale issues and pull requests (#235)

    * chore(actions): don't auto-close stale issues and pull requests
    
    Open issues and pull requests should be closed by a human who has considered
    the issue/pr and made a choice based on the content of the issue/pr and the
    state of the repository.
    
    What this means in practice is that some issues will stay open for a long
    time, even if they are stale. They may be open because it really is something
    that will be considered for future work. Periodic issue triage should be
    done by the maintainers, and if an issue _should_ be closed - for example,
    the issue is no longer relevant - then a maintainer can close it.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jul 2, 2020
    Configuration menu
    Copy the full SHA
    d65b013 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2020

  1. fix: ensure that the HTTP receiver sanitizes headers in accept() (#239)

    Even though the underlying structured and binary receivers already sanitize
    the headers, this needs to be done at the receiver.accept() level since
    the headers are inspected there to determine what mode the event is being
    sent as.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jul 6, 2020
    Configuration menu
    Copy the full SHA
    51035dc View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2020

  1. chore: bump GH stale action to v3 (#243)

    This is the first version that actually avoids closing stale issues if `days-before-close < 0`.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jul 7, 2020
    Configuration menu
    Copy the full SHA
    90a9984 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2020

  1. 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>
    lance authored Jul 13, 2020
    Configuration menu
    Copy the full SHA
    dca2811 View commit details
    Browse the repository at this point in the history
  2. feat(src): A CloudEvent should be readonly but provide a way to augme…

    …nt itself. (#234)
    
    BREAKING CHANGE:
    
    * This change makes the CloudEvent Read-only and validates the input during object creation.
    
    * To augment an already created CloudEvent object, we have added a `cloneWith` method that takes attributes to add/update.
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jul 13, 2020
    Configuration menu
    Copy the full SHA
    c7a8477 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2020

  1. build(deps-dev): bump standard-version from 7.1.0 to 8.0.1 (#247)

    Bumps [standard-version](https://github.com/conventional-changelog/standard-version) from 7.1.0 to 8.0.1.
    - [Release notes](https://github.com/conventional-changelog/standard-version/releases)
    - [Changelog](https://github.com/conventional-changelog/standard-version/blob/master/CHANGELOG.md)
    - [Commits](conventional-changelog/standard-version@v7.1.0...v8.0.1)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 14, 2020
    Configuration menu
    Copy the full SHA
    8e79fdc View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2020

  1. fix: upgrade uuid from 8.1.0 to 8.2.0 (#250)

    Snyk has created this PR to upgrade uuid from 8.1.0 to 8.2.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/uuid
    
    See this project in Snyk:
    https://app.snyk.io/org/lance/project/37afc620-45ad-41a3-9acc-1ac155caebc7?utm_source=github&utm_medium=upgrade-pr
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    snyk-bot authored Jul 15, 2020
    Configuration menu
    Copy the full SHA
    13bcdb4 View commit details
    Browse the repository at this point in the history
  2. docs(README): Update readme to mention that CloudEvents are read-only…

    … now (#248)
    
    * also update readme with a mention about the cloneWith method
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jul 15, 2020
    Configuration menu
    Copy the full SHA
    de6f0a2 View commit details
    Browse the repository at this point in the history
  3. feat(src): add ext name validation (#246)

    BREAKING CHANGE:
    
    * Extension names are now validated during object creation.  The values are defined by the specification, and can be lowercase(a-z) or digits(0-9) and must be no longer that 20 characters
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    lholmquist authored Jul 15, 2020
    Configuration menu
    Copy the full SHA
    84f1ed9 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2020

  1. docs: clean up spec compliance table on README.md (#252)

    This commit separates the spec compliance table in the README.md file
    into three: the core spec, event formats, and transport protocols.
    
    Fixes: #166
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance authored Jul 16, 2020
    Configuration menu
    Copy the full SHA
    c496931 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2020

  1. fix: package.json & package-lock.json to reduce vulnerabilities (#253)

    The following vulnerabilities are fixed with an upgrade:
    - https://snyk.io/vuln/SNYK-JS-AJV-584908
    
    Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
    snyk-bot authored Jul 21, 2020
    Configuration menu
    Copy the full SHA
    2ed5f84 View commit details
    Browse the repository at this point in the history
  2. Add Copyright Date and Holder name (#257)

    * Add Copyright Date and Holder name
    
    Signed-off-by: Sidharth Vinod <sidharthv96@gmail.com>
    sidharthv96 authored Jul 21, 2020
    Configuration menu
    Copy the full SHA
    cfde6d5 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2020

  1. build(deps): bump lodash from 4.17.15 to 4.17.19 (#254)

    Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.17.15...4.17.19)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 23, 2020
    Configuration menu
    Copy the full SHA
    d866691 View commit details
    Browse the repository at this point in the history
  2. fix: do not require an HTTP body on incoming binary event messages

    This commit modifies the HTTP receivers/parsers to allow for the incoming body
    of an HTTP request to be empty if the event message is sent using the binary
    mode. In structured mode, a `ValidationError` will still be thrown, since the
    entire event must be encoded in the HTTP body.
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance committed Jul 23, 2020
    Configuration menu
    Copy the full SHA
    a7c326b View commit details
    Browse the repository at this point in the history