Skip to content

v3.5.4

Choose a tag to compare

@github-actions github-actions released this 09 Aug 16:15
· 29 commits to master since this release

Fixed

  • Tracing hooks installed on the default options could patch a copy nothing
    ever called.
    DEFAULT_IMQ_SERVICE_OPTIONS and DEFAULT_IMQ_CLIENT_OPTIONS
    were plain module-scope objects, so a process that evaluated this module twice
    held two copies — which is what a loader handling ESM and CJS through separate
    pipelines does: under tsx, require('@imqueue/rpc') and
    import('@imqueue/rpc') return distinct instances.

    Anything that installs behavior by mutating those objects then patched a copy
    the application never calls. @imqueue/opentelemetry attaches its
    beforeCall/afterCall/wrapCall hooks that way, and produced no spans at
    all under such a loader — with no error, since the patch itself succeeded.

    Both are now keyed on Symbol.for, making them singletons per process rather
    than per module evaluation, so a mutation through any instance is visible to
    all. This also removes the "duplicate installs at different tree depths"
    caveat the instrumentation documents.

About

@imqueue/rpc is the type-safe RPC framework of @imqueue: self-describing service classes over a Redis message queue that generate their own strongly-typed clients — no hand-written client code, no .proto, no service discovery, no load balancer. Delayed calls via IMQDelay, optional caching and locking decorators. Node.js and TypeScript only, Redis only.