Skip to content

v0.1.33

@kaen25 kaen25 tagged this 24 Aug 20:45
BREAKING, narrowly. The barrel's ContainerResolver is now the per-request
resolver CLASS (the AdonisJS name) rather than the events emitter's narrow
{ make } type, which is exported as EmitterResolver — the old name stays on
events/Emitter.js as a deprecated alias. Nothing in this repo imported it; every
consumer declares its own structural interface.

container.createResolver() returns a real resolver: make / call / bindValue /
hasBinding / hasAllBindings / resolveFor, with its values isolated from the
container. The kernel builds one per request and binds the HttpContext on it, so
a controller can take it as a constructor dependency. A singleton that reads a
request-scoped value while building is not cached application-wide — one that
reads none caches exactly as before.

Contextual bindings: container.when(X).asksFor(Y).provide(...).

Session: initiate() and commit() own the store half of the lifecycle, as
upstream; tag(userId) / untag(userId) / supportsTagging() on the memory, redis
and database stores, which is what "log out from all my devices" is built on;
fresh / isEmpty / hasBeenModified / readonly. The database store now sweeps
expired rows on a fraction of writes (gcProbability, default 2) — nothing
collected them before, so the table grew without bound.

HTTP: Request gains charset / encoding / authority / updateBody / updateQs /
updateRawBody; Response gains abortUnless, and stream() no longer depends on
being awaited. CookieOptions gains domain, expires, partitioned, priority and
the boolean sameSite — without domain a session cookie could not span
subdomains at all.
Assets 2
Loading