Skip to content

Releases: hemerajs/hemera

nats-hemera@5.0.0-rc.2

Pre-release

Choose a tag to compare

@StarpTech StarpTech released this 20 Mar 17:27

Removed dependencies lodash, hoek and fastparellel and use built-in functions.

nats-hemera@5.0.0-rc.1

Pre-release

Choose a tag to compare

@StarpTech StarpTech released this 19 Mar 20:09

I'm really happy to announce the new Hemera 5 release!

This release is a ground-breaking refactoring of the core. The goal was to simplify but also make the lifecycle of extensions and middlwares more predictable.

In summary:

Breaking changes:

  • Removed Reply.end()
  • Removed hemera.root property
  • Removed Hemera.reply() in favor of hemera.reply.next() to send multiple responses in a row
  • Removed configuration properties crashOnFatal, shouldCrash. The developer is responsible to catch these errors
  • Removed CodecPipeline
  • Removed encoder, decoder. We provide setter functions for client and server encoding
  • Remove support to register multiple plugins at once with hemera.use
  • Remove plugin$, plugins property, remove hemera.setOption(), hemera.setConfig() methods
  • Remove functionality to to send a response inside serverPreResponse. This was confusing because the payload is already set at this point
  • Load plugins only on hemera.ready() not when hemera.use() is called
  • We break the support of simple return values in add or middlewares without the use of callback or promises

New features:

  • Implement schemaCompiler to archive better abstraction for payload validators
  • Support for async schemaCompiler
  • Encapsulate extensions, codec and schemaCompiler
  • Provide setter functions for client and server encoding

Modified packages

  • hemera-joi Remove post validation
  • Remove support for hemera-nsq and hemera-controlplane
  • hemera-plugin you can skip the creation of a plugin scope with scoped:false

Bug fixes

  • Fixed issue in add middleware. Passed errors didn't lead to cancellation

nats-hemera@4.0.0

Choose a tag to compare

@StarpTech StarpTech released this 11 Mar 18:39

Breaking changes

  • Use of callback-style with act(...) won't return a promise anymore rather undefined
  • Use of promise-style with act(...) will return to a fulfilled promise a context object with two properties data and context. On a rejection, only the error is returned.
    • data message response
    • context hemera instance with the right meta$, context$ and trace$ informations.

Migration Guide

Don't mix callback and promise style and work in case of promise with the result object

Before

const result = await hemera.act({
  topic: "math",
  cmd: "add"
}, async function (err, resp) {
	// code ...
})

After with promise

const result = await hemera.act({
  topic: "math",
  cmd: "add"
})
// code ...
result.data
result.context

After with callback

hemera.act({
  topic: "math",
  cmd: "add"
}, function (err, resp) {
	// code ...
})

nats-hemera@3.5.1

Choose a tag to compare

@StarpTech StarpTech released this 10 Mar 11:21
  • Refactor tracing
  • Fixed tracing propagation

hemera-jaeger@2.0.0

Choose a tag to compare

@StarpTech StarpTech released this 10 Mar 11:22
  • Support of custom parent span via context$
  • Remove hemera version from span tags
  • Use pattern as span operation name
  • Add HEMERA_OP_TYPE, HEMERA_ACT_EXPECTEDMSG and HEMERA_CONTEXT tags

nats-hemera@3.5.0

Choose a tag to compare

@StarpTech StarpTech released this 08 Mar 19:58
  • Implement onAdd extensions #188
  • Expose matchedAction which represent the matched action behind the pattern

nats-hemera@3.4.0

Choose a tag to compare

@StarpTech StarpTech released this 07 Mar 19:14
  • Add promise support for close method
  • Stop emitting close errors rather pass them via callback or promise style

nats-hemera@3.3.0

Choose a tag to compare

@StarpTech StarpTech released this 07 Mar 10:46
  • Upgrade to latest NATS driver
  • Upgrade Pino logger
  • Implement expectedMessages$ flag #185
  • Update docs
  • Make request-reply sid inside act-context public

nats-hemera@3.2.0

Choose a tag to compare

@StarpTech StarpTech released this 28 Feb 12:24

Add promise support for hemera.ready() when no callback is passed.

nats-hemera@3.1.9

Choose a tag to compare

@StarpTech StarpTech released this 17 Feb 16:27
  • Upgrade nats-hemera dependencies
  • Upgrade dev-dependencies from Repository