spry 8.3.0
spry: ^8.3.0 copied to clipboard
Next-generation Dart server framework. Build modern servers and deploy them to the runtime you prefer.
8.3.0 #
Migration guide: Not required.
Highlights #
Spry adds first-class OpenAPI 3.1 generation driven by filesystem routes and typed route metadata.
This work introduces document generation from spry.config.dart, typed
OpenAPI builders under package:spry/openapi.dart, analyzer-validated
route-level openapi metadata, lifted route globalComponents, and a focused
example plus documentation for the full authoring flow.
Breaking Changes #
- None.
What's New #
OpenAPI generation
- Added
openapiconfiguration inspry.config.dart, including document root metadata, output selection, component merge strategy, and root-level webhook declarations by @medz in #171. - Added a public typed OpenAPI authoring surface under
package:spry/openapi.dart, including builders for schemas, parameters, headers, request bodies, responses, security schemes, OAuth flows, callbacks, path items, tags, servers, and document components by @medz in #171. - Added route-level top-level
openapimetadata with analyzer-backed truth source validation, so route docs must resolve to Spry's real OpenAPI types rather than raw maps or local lookalikes by @medz in #171. - Added support for deeply reusable shared spec values, including nested child
and sub-child values such as parameters, request bodies, responses,
callbacks, security requirements, server variables, and
globalComponentsbuckets by @medz in #171. - Added OpenAPI document generation to the build pipeline, including route-path
conversion, method expansion for any-method routes, explicit-method override
rules,
HEADhandling, and lifted routeglobalComponentsby @medz in #171. - Added strict and deep-merge component merge strategies with source-aware conflict diagnostics by @medz in #171.
Documentation and examples
- Added a dedicated OpenAPI guide covering config, route metadata, reusable spec composition, schemas, request/response modeling, security, callbacks, webhooks, merge behavior, and output rules by @medz in #171.
- Added a standalone
example/openapi/project that generatespublic/openapi.jsonfrom document-level components and route-levelglobalComponentsby @medz in #171. - Aligned the README runtime-target overview with the v8.2 target surface by @medz in eaa9ff7.
Migration note #
- No migration is required. OpenAPI support is additive. To adopt it, add an
openapiblock todefineSpryConfig(...), importpackage:spry/openapi.dart, and start attaching typedopenapimetadata to route files.
Full Changelog #
8.2.0 #
Migration guide: https://spry.medz.dev/migration
Highlights #
Spry 8.2.0 reshapes generated output around a clearer target layout and adds new Dart-native deployment targets.
This release renames the Dart runtime target to BuildTarget.vm, moves
generated Dart source into .spry/src/, renames JS runtime entrypoints to
their deploy-facing filenames, adds exe / aot / jit / kernel targets,
and removes the synthetic wildcard-param alias for named catch-all routes.
Breaking Changes #
- Renamed
BuildTarget.darttoBuildTarget.vmby @medz in #170. - Generated Dart source files now live under
.spry/src/instead of the.spry/root, and JS target entrypoints now use deploy-facing filenames such as.spry/node/index.cjsand.spry/cloudflare/index.jsby @medz in #170. - Removed
RouteParams.wildcard/event.params.wildcardfor named catch-all routes. Read the declared param directly, for exampleevent.params.get('slug')by @medz in dab62e9.
What's New #
Build and deployment
- Added Dart-native deployment targets for executable, AOT snapshot, JIT
snapshot, and kernel snapshot output via
BuildTarget.exe,BuildTarget.aot,BuildTarget.jit, andBuildTarget.kernelby @medz in #170. - Reworked generated output layout and deployment documentation across Node, Bun, Deno, Cloudflare, Vercel, and Netlify to match the new target-specific entrypoints by @medz in #170.
- Synced
public/assets into Dart compiled output workspaces so native builds can be deployed directly by @medz in #170.
Runtime performance
- Cached parsed request URLs and query params per request to remove duplicate parsing in the main request pipeline by @medz in #167.
- Simplified the static asset serving pipeline and unified public-asset resolution across JS and IO runtimes by @medz in #169.
Routing runtime
- Removed generated
_withWildcardParamwrappers and the per-requestEvent/RouteParamsrebuild they performed for named catch-all routes by @medz in dab62e9.
Migration note #
- Rename
BuildTarget.darttoBuildTarget.vminspry.config.dart. - If your tooling reads generated output directly, update paths from
.spry/*.dartto.spry/src/*.dart, and switch JS entrypoints to the new filenames (node/index.cjs,bun/index.js,deno/index.js,cloudflare/index.js). - Replace
event.params.wildcardwithevent.params.get('<name>'), where<name>is the identifier declared in[...name].dart.
Full Changelog #
8.1.0 #
Migration guide: Not required.
Highlights #
Spry 8.1.0 expands runtime coverage and adds first-class route-level WebSocket handling without changing the filesystem routing model.
This release adds Deno and Netlify targets, exposes public osrv runtime entrypoints for target-aware integrations, upgrades Spry to osrv 0.6.x, and introduces the new event.ws API for WebSocket upgrades inside normal route handlers.
Breaking Changes #
- None.
What's New #
Runtime targets
- Added a Deno target and deploy documentation by @medz in #164.
- Added a Netlify target, example project, and deploy documentation by @medz in #163.
Runtime integration
- Added public
package:spry/osrv.dartruntime entrypoints, including target-specific exports for Dart, Node, Bun, Cloudflare, Deno, Vercel, and Netlify by @medz in #162. - Upgraded Spry to
osrv 0.6.xas part of the Deno runtime work by @medz in #164.
WebSocket support
- Added
event.wswith runtime support checks, upgrade-request detection, requested protocol access, andupgrade(...)for route-level WebSocket handling by @medz in #165. - Added WebSocket documentation covering handshake semantics, session boundaries, and runtime support expectations by @medz in #165.
Migration note #
- No migration is required for existing applications. To adopt WebSockets, import
package:spry/websocket.dartand useevent.wsinside a normal route handler. - If you integrate directly with
osrv, prefer the new public exports underpackage:spry/osrv.dartand its target-specific entrypoints.
Full Changelog #
8.0.0 #
Migration guide: https://spry.medz.dev/migration
Highlights #
Spry 8.0.0 aligns the framework with the latest upstream HTTP and routing foundations.
This release upgrades Spry to the Fetch-style Request / Response model from ht 0.3.x and osrv 0.4.x, adopts the roux 0.5.x route syntax changes, and expands filesystem routing with more expressive segment patterns.
Breaking Changes #
- Spry now follows the upstream Fetch-style
Request/Responseconstruction model by @medz in #157. - Manual string-path remainder matches must now use
/**instead of/*when constructingSpry,MiddlewareRoute, orErrorRouteby @medz in #155.
Request / Response construction
If you construct exported Request / Response values directly, migrate to the new init-object form:
Request(uri, method: 'GET')->Request(uri, RequestInit(method: HttpMethod.get))Response(status: 404, headers: ..., body: ...)->Response(body, ResponseInit(status: 404, headers: ...))
What's New #
HTTP foundation upgrade
- Upgraded to
ht 0.3.1andosrv 0.4.xby @medz in #157. - Re-exported
RequestInitandResponseInitfrompackage:spry/spry.dartandpackage:spry/app.dartby @medz in #157.
Routing upgrade
- Upgraded to
roux 0.5.xby @medz in #155. - Kept Spry catch-all scopes aligned with the new
**remainder syntax by @medz in #155. - Added richer filesystem route syntax for embedded params, regex params, optional params, repeated params, and single-segment wildcards by @medz in #155.
Examples and docs
- Split examples by target runtime and added a
knex_dartexample project by @medz in13fed0d. - Refreshed migration docs and release-facing website copy for the v8 release by @medz in #159.
- Upgraded project dependencies by @medz in #160.
Migration note #
- Replace manual
/*route strings with/**inSpry,MiddlewareRoute, andErrorRoute, then re-run your route matching tests after upgrading toroux0.5.x. - If you construct exported
Request/Responsetypes directly, migrate to the new Fetch-style init objects. For example:Request(uri, method: 'GET')->Request(uri, RequestInit(method: HttpMethod.get))Response(status: 404, headers: ..., body: ...)->Response(body, ResponseInit(status: 404, headers: ...))Response.text(...)/Response.empty(...)->Response(..., ResponseInit(...))
Full Changelog #
7.0.0 #
Migration guide: https://spry.medz.dev/migration
What's Changed #
- BREAKING: replace the imperative app DSL with the v7 file-based runtime model built around
routes/, scoped_middleware.dart/_error.dart, andspry.config.dart. - feat(cli): add
spry serveandspry buildworkflows for generated runtimes, including watch mode and explicit root support. - feat(runtime): add generated targets for Dart VM, Node.js, Bun, Cloudflare Workers, and Vercel.
- feat(builder): add config loading, route scanning, runtime generation, and public asset syncing for the new build pipeline.
- docs: rewrite the documentation site for Spry v7, including the new getting started, runtime, deploy, and migration guides.
6.2.0 #
- feat: support middleware operators (
|Pipe middleware,>middleware with handler) - feat: support group routing (
app.group(...)) - docs: add group routes docs
6.1.0 #
- perf(datr, server): pointless waiting
- perf: avoid creating event id
- refactor: Remove
event.id
6.0.1 #
- fix: avoid http response status
6.0.0 #
Migration guide: https://spry.medz.dev/migration
What's Changed #
- refactor: remove group router (The
app.group/app.grouped). - refactor: rename
app.stacktoapp.middleware. - refactor: remove
useRequest(), now useevent.request. - refactor: remove
useHeaders(), now useevent.headers/event.request.headers. - refactor: remove
getClientAddress(), now useevent.address. - refactor: remove
useRequestURI(), now useevent.url. - refactor: remove
useParams(), now useevent.params. - refactor: rename factory
Response.text()toResponse.fromString(). - refactor: rename factory
Response.json()toResponse.fromJson(). - refactor: remove all adapter, now is cross-platform.