v0.1.19
release: photon 0.1.19
Fixes the router's fallback tests, which CI failed and every local run passed.
The tests stub location.href assignment with a Proxy over
window.location. jsdom 30.1.1 tightened the WebIDL brand check on Location,
so reading origin through that proxy now throws
'get origin' called on an object that is not a valid instance of Location —
the router threw while resolving the URL and never reached the fallback the
tests assert on. A get trap forwarding reads to the real Location, with
target as the receiver and methods bound to it, keeps the brand intact.
It only ever failed on CI because CI installs with --no-frozen-lockfile and
resolved 30.1.1 under the ^30.0.1 range while the lockfile here held 30.0.1.
The range now starts at 30.1.1, so a local run reproduces what CI runs.
The three assertions also waited a fixed two turns of the event loop for an
async fallback to land. waitFor waits for the condition instead: how many
microtask hops a fetch, a response read and a rejected parse take is an
implementation detail, and counting them wins on a fast machine and loses
elsewhere.
Require Node 24, and build the crates for production
Node 24, not because it is the current LTS — that is AdonisJS v7's own
stated reason and it is not one for us, since 22 still receives security
fixes until 2027, npm 11 is irrelevant under pnpm, and node:sqlite is
not what atlas uses. The reason is measurable and it is the framework's:
AsyncLocalStorage is on the request hot path, and Node 24 backs it with
AsyncContextFrame by default — 0.61 us per request instead of 1.55 us on
that exact pattern. Before 24 the same mechanism sat behind an
experimental flag, and a framework cannot base its performance on a flag
the application has to remember to pass. The reason travels with the
constraint, in a "//engines" key beside it.
Where there are crates: the default release profile leaves lto = false
and codegen-units = 16, so nothing inlines across crate boundaries —
and here the hot loop and the N-API binding that calls it are always two
different crates. Measured on atom, a scalar call through the binding
went from 18.85 ms to 13.59 ms for 50 000 operations. No panic = "abort": napi-rs catches panics and turns them into JavaScript
exceptions.
CI moves to Node 24 with them, since that is what the packages now ask
for.
Changes since v0.1.18.