Releases: arkstack-hq/clear-router
Releases · arkstack-hq/clear-router
2.3.2
2.3.0
What's Changed
- Add Fastify, H3, and Hono support with comprehensive routing capabilities
- Implement Fastify router with method overrides, request body access, and middleware support.
- Introduce H3 router with similar features, ensuring compatibility with H3's context and request handling.
- Add Hono router, providing a routing system with support for middleware and API resource binding.
- Create documentation for using clear-router with Fastify, H3, and Hono, including quick start guides and usage examples.
- Develop tests for Fastify and Hono routers to ensure functionality and reliability.
Full Changelog: 2.2.0...2.3.0
2.2.0
What's Changed
- Moved core routing logic to a new CoreRouter class in src/core/router.ts.
- Updated H3 router to extend CoreRouter, simplifying route management and middleware handling.
- Added adapter authoring guide to docs/adapters.md for creating new framework adapters.
- Adjusted TypeScript configuration to include core module paths.
- Updated tests and index exports to reflect new structure.
Full Changelog: 2.1.12...2.2.0
2.1.12
What's Changed
- Implemented ensureRequestBodyAccessor to provide a getBody method for accessing request body in Express and H3 routers.
- Updated Router class in both Express and H3 to utilize getBody method for body retrieval.
- Enhanced tests to verify the presence and functionality of getBody in request handlers.
- Added documentation for the new features and usage examples.
Full Changelog: 2.1.11...2.1.12
2.1.11
What's Changed
- feat: add HTTP method override support with configurable body and header keys
- refactor: update allRoutes method signatures for clarity and consistency
Full Changelog: 2.1.9...2.1.11
2.1.9
What's Changed
- feat: implement group context isolation for async route registration in Router
Full Changelog: 2.1.8...2.1.9
2.1.8
What's Changed
- feat: enhance Router to support single and array middlewares for HTTP methods
- feat: add support for middleware in apiResource.
Full Changelog: 2.1.6...2.1.8
2.1.6
Changed
- Refactored
allRoutes()to return raw route objects instead of mapped info for better flexibility in route inspection and tooling.
Added
- Added
controllerName,middlewareCount,handlerTypeandactionNameproperties toRouteclass for improved route context handling.
Full Changelog: 2.1.5...2.1.6
2.1.5
Added
- Added support for async group callbacks in Express and H3 routers (
await Router.group(...)). - Updated type definitions and exports configuration in package.json and tsdown.config.ts
- Improved module exports and build configuration
Full Changelog: 2.1.1...2.1.5
2.1.1
Added
- Added
routeparameter toRouter.bindRequestToInstancefor improved route context handling. - Added
routeproperty toClearRequestfor enhanced route context access.
Full Changelog: 2.1.0...2.1.1