quasar v0.1.2
quasar 0.1.2
docs: bring the README in line with the code
It still said re-subscribing REPLACES a channel's handler — the opposite of
what it now does (handlers stack, as in Adonis). Also missing: commands on
the manager, connection state, LUA scripts, the subscriber:* events, that a
failed subscribe does not reject, and quit/disconnect acting on one
connection with quitAll/disconnectAll for the sweep.
8510a4e
feat(quasar): mirror @adonisjs/redis's subscription events, and stop rejecting
Two corrections to the previous commit, both because it deviated from Adonis
on my judgement rather than on a constraint:
-
subscription:ready / subscription:error / psubscription:ready /
psubscription:error are emitted, with Adonis' payloads ({ connection,
count } and { connection, error }). Skipping them because "await already
tells you" was a preference, not a limitation — and it left an app that
follows the Adonis idiom (never awaiting subscribe) with no way to learn a
subscription failed. -
A failed subscription no longer REJECTS. Adonis' subscribe returns void, so
code written against it does not await the call; a promise rejecting into
nobody is an unhandled rejection, which ends the process. That made a
resilience path into a crash path for exactly the migration this package
exists to make seamless.
The error is not swallowed: onError fires, the event fires, and the
connection logger reports it — one more channel than Adonis has, so an app
wiring neither still sees the failure.
Verified against a live Redis: a subscribe on a closed socket resolves,
reports through both channels, and does not take the process with it.
100a4e0
fix(lint): make the merged interface's type parameter load-bearing
CI failed on biome, not on tests: the merge interface declared a
Connections parameter it never used (TypeScript requires it to match the
generic class, biome flags it as dead).
It now declares managerConfig, which Adonis exposes too — so the parameter
carries something real instead of being silenced with an underscore. That
turns the declaration-merging warning into an error, suppressed with a
reason: the merge IS how the forwarded ioredis commands are typed, exactly
as QuasarConnection does it.
289d2d7
fix(ci): skip the parity suite when no Redis answers
The new integration file connected straight to the default URL instead of
probing first, so CI — which runs no Redis service — failed on it. Same
probe as connection.integration.test.ts: skipped, not failed.
9d6f80f
feat(quasar): match the @adonisjs/redis manager surface
Audited against the published @adonisjs/redis 10.0.0 build — the last
package in the ecosystem that had never been compared to its Adonis
counterpart, and the one four others (bay, echo, warden, ream) sit on.
Two divergences would have broken an Adonis app that only swapped its
imports, both silently:
- quit()/disconnect() with no name closed EVERY connection; Adonis closes
only the default one. An app calling redis.quit() lost connections it
still needed. They now target the default connection, and quitAll() /
disconnectAll() do the sweep (what the provider's shutdown wanted). - Subscribing twice to a channel REPLACED the handler, so the second
subscribe silently stopped the first. Adonis keeps a Set and delivers to
every handler; unsubscribe(channel, handler) drops just one and leaves
the socket subscribed while others remain.
Missing surface, all present upstream: ioredis commands callable on the
manager (redis.get(...) runs on the default connection), defineCommand /
runCommand — applied to open connections AND remembered for later ones,
as Adonis does — doNotLogErrors, activeConnections, activeConnectionsCount,
and on a connection connectionName, status, subscriberStatus,
autoPipelineQueueSize, lastError, isConnecting/isReady/isClosed.
Two named deviations: subscribe also REJECTS on failure (Adonis reports it
only through onError, so an app that never opts in ends up silently
unsubscribed — onError still fires); and the error logger is an optional
structural seam rather than a required framework Logger, because quasar is
an agnostic leaf.
Verified against a live Redis 7, including the semantics that changed.
2bb2418
Changes since v0.1.1.