@glandjs/http@2.0.0 · @glandjs/express@2.0.0 · @glandjs/fastify@1.0.0 · @glandjs/koa@1.0.0 · @glandjs/hono@1.0.0 · @glandjs/node@1.0.0
Changelog — @glandjs/http
Release history for @glandjs/http, mirrored from the repository.
Release notes for Gland’s HTTP layer. Each package also has its own
CHANGELOG.md, which is excluded from the published tarball — this file and
npm are the two places a consumer will find them.
| Package | Version | This release | Per-package changelog |
|---|---|---|---|
@glandjs/http |
2.0.0 |
rewritten | http |
@glandjs/express |
2.0.0 |
breaking fix | express |
@glandjs/fastify |
1.0.0 |
first release | fastify |
@glandjs/koa |
1.0.0 |
first release | koa |
@glandjs/hono |
1.0.0 |
first release | hono |
@glandjs/node |
1.0.0 |
first release | node |
Published history at a glance
Section titled “Published history at a glance”Versions come from the npm registry, not from the repository. Several versions below exist only as tags or as a local manifest value.
| Package | Last published before this release | Publishing now |
|---|---|---|
@glandjs/http |
1.0.0-beta (2025-05-17) |
2.0.0 |
@glandjs/express |
1.0.0-beta (2025-05-17) |
2.0.0 |
@glandjs/fastify |
1.0.0-alpha (2025-04-11) |
1.0.0 |
@glandjs/koa |
never published | 1.0.0 |
@glandjs/hono |
never published | 1.0.0 |
@glandjs/node |
never published | 1.0.0 |
Earlier versions still on npm: @glandjs/http and @glandjs/express also have
1.0.0-alpha.0, 1.0.0-alpha.1 and 1.0.0-alpha.
Why these versions differ
Section titled “Why these versions differ”Each package is versioned on its own history, not on a shared counter.
httpandexpress→2.0.0. Both had a published1.0.0-betaline and both have breaking changes against it, so they take a major.- **
fastify →1.0.0, not2.0.0.** Its only published version is1.0.0-alpha`, which belonged to an implementation that was deleted from the repository. The current adapter shares no source line with it, so on the evidence of what actually shipped this is a first release. Upgrading from the alpha is a reinstall, not a version bump. koa,honoandnode→1.0.0. Never published. Their manifests previously read1.1.0-beta, a version that never existed on npm.
The -beta suffix is dropped across the board: http and express have shipped
three betas, and the four newer packages never needed one.
Requires @glandjs/core 2.0.0
Section titled “Requires @glandjs/core 2.0.0”Every package here depends on @glandjs/core ^2.0.0 and peer-depends on
@glandjs/common ^2.0.0. This is not optional.
HttpBroker reads route.fullPath from the gland:define:route broadcast.
@glandjs/core <= 1.0.3-beta did not emit that field, so against those versions
no controller route registers at all and every endpoint answers 404. The
adapter reports this itself:
This HTTP adapter received no routes from the application binder …route replay … is not present in @glandjs/core <= 1.0.3-beta.@glandjs/common is a required peer dependency of all six packages, but no
source file in any of them imports it. It is declared because an application
built on these adapters needs it, not because the adapters call it.
2.0.0 — @glandjs/http, @glandjs/express
Section titled “2.0.0 — @glandjs/http, @glandjs/express”1.0.0-beta could not serve a single controller route. HttpBroker read
payload.meta.path, a field @glandjs/core had stopped emitting when the channel
registry landed. Only manual app.get() calls worked, and the symptom was a
404 on every endpoint. Both packages take a major because of it.
Migration
-
Upgrade
@glandjs/coreand@glandjs/commonto2.0.0first. Without that, nothing works.Terminal window npm i @glandjs/core@^2 @glandjs/common@^2 -
ctx.getHeader()now reads the request. It read the response, so CORS, content negotiation and any auth middleware were asking what the server had set.ctx.getResponseHeader()andctx.hasResponseHeader()were added. -
The global prefix now works. It did nothing in
1.0.0-beta— routes went on the application whilesetGlobalPrefix()mounted an empty router — so every prefixed request 404’d. It is applied once, by an idempotentapplyPrefix(). -
app.on('router:register', …)no longer compiles. The unprefixed event names are still exported as deprecated aliases, butHttpCore.on()is typed againstHttpEvent.*:// beforeapp.on('router:register', handler);// afterapp.on(HttpEvent.RouteRegistered, handler);docs/guides/migration.mdclaims the old strings still work. They do not. -
Express:
listen(port, hostname?, message?)→listen(port, { host?, message?, server? }). -
Express: the four parser accumulators are gone. Use
bodyParser().Read this before you migrate: a
bodyParserkey that is present but notfalseinstalls all applicable parsers, because the check isoptions.urlencoded !== falseand an absent key isundefined. SobodyParser({ json: true })installs json, urlencoded, text and raw.bodyParser({ json: true, urlencoded: false, text: false, raw: false }); -
Express:
ctx.format(),ctx.jsonp()andctx.render()are gone. Views are reachable throughuseRaw()andapp.instance. -
Deep imports moved.
interface/→interfaces/,types/split acrossinterfaces/andcontracts/,http-events.const→constants/http-events.const,adapter/http.adapter→adapter/http-adapter.abstract,adapter/http-events→adapter/http-event-broker. The full table is in@glandjs/http’s changelog. -
Express no longer mounts the
corspackage.enableCors()on the adapter is gone; useHttpCore.enableCors(), which is Gland’s own middleware.credentials: truewithorigin: '*'now throws at boot.
1.0.0 — @glandjs/fastify, @glandjs/koa, @glandjs/hono, @glandjs/node
Section titled “1.0.0 — @glandjs/fastify, @glandjs/koa, @glandjs/hono, @glandjs/node”First releases. Nothing to migrate from, but two behaviours will surprise you if you assume a framework’s defaults.
-
Fastify parses JSON whether or not you ask it to — unless the adapter stops it. With no parser declared, Fastify’s built-in
application/jsonparser is removed and such a request is answered with415 Unsupported Media Typebefore any handler runs. DeclarebodyParser({ json: true })if you relied on the default. A form-urlencoded body is also parsed as a nested object (a[b]=1→{ a: { b: '1' } }) rather than Fastify’s flat default. -
@glandjs/nodeserves no static files.useStaticAssets()records the option and then warns, because a rawnode:httpadapter has nothing to mount it on. Serve them yourself or pick another adapter. -
Hono’s
useRaw()can add headers but cannot change the status or body, and it does not warn. A fetchResponseis immutable, so a raw middleware may observe a reply and add headers, or short-circuit with its ownResponse, but cannot amend one the handler already composed. The warning thatuseRaw()was ignored exists only on@glandjs/nodeand@glandjs/fastify.
1.0.0-beta — @glandjs/http, @glandjs/express
Section titled “1.0.0-beta — @glandjs/http, @glandjs/express”The first public betas, published 2025-05-17. @glandjs/express here had an empty
ExpressContext sibling in 1.0.0-alpha that had grown to roughly fifty members,
and an adapter that inferred Gland middleware from function arity. Neither could
serve a controller route — see above.
1.0.0-alpha — @glandjs/http, @glandjs/express, @glandjs/fastify
Section titled “1.0.0-alpha — @glandjs/http, @glandjs/express, @glandjs/fastify”Published 2025-04-11 from a single release commit. @glandjs/http and
@glandjs/express also have 1.0.0-alpha.0 and 1.0.0-alpha.1 from
2025-03-27.
The @glandjs/fastify alpha is withdrawn: its implementation was deleted from
the repository, and the Fastify adapter shipping as 1.0.0 was written from
scratch afterwards. The two share no source line.
Corrections to the changeset notes for this release
Section titled “Corrections to the changeset notes for this release”Two changeset files in .changeset/ described this work. Both have been folded
into the per-package changelogs above, and three of their claims did not survive
verification against the published artifacts. Recording the corrections here
because the changesets are the record other people will read:
- “Express and Koa applied the global prefix twice, producing
/api/api/...” — in1.0.0-betathe prefix was applied zero times.setGlobalPrefix()mounted an emptyexpress.Router()at the prefix whileregisterRoute()registered on the application. The double-prefix describes a draft of the rewrite, not a released state.@glandjs/koawas never published at all. - “
return ctx.redirect(url)produced a500with a circular-structure error” — not reproducible against1.0.0-beta. The Express route handler already guarded the write withif (result !== undefined && !res.headersSent). The machinery that makes a double reply safe (written,markWritten(),responded) is new and worth having, but it is not a fix to an observed1.0.0-betafailure. - “
bodyParser: falseis now honoured everywhere” —HttpApplicationOptionsin1.0.0-betawas{ https?: HttpsOptions }. There was nobodyParserkey to ignore. No parser was installed unless you calledapp.json()and friends. - “
mount()in the base adapter discarded the bridged handler” — nomount()existed onHttpServerAdapterbefore this rewrite;use()was abstract and each adapter implemented it.
See also: the architecture notes, the adapter matrix, and the migration guide.