Releases: reno-router/reno
Integrates with Deno registry webhook
This is identical to v1.2.3, but is actually accessible via the Deno third party modules registry.
Upgrades to Deno v1.3.0 + std@v0.65
Just a routine maintenance release. No fixes or breaking changes here!
No longer exports testing helper factory function
No longer exporting createAssertResponsesAreEqual()
as it's an implementation detail. If you are using this for whatever reason, please use assertResponsesAreEqual()
directly instead.
Upgrades to Deno v1.2.1 + std@v0.62
- Upgrades Deno dev version to v1.2.1
- Upgrades std to v0.62
- Refactors
assertResponsesAreEqual()
tests to be less brittle
Introduces `assertResponsesAreEqual()` testing utility
Adds assertResponsesAreEqual()
, a unit testing utility to assert that actual
and expected
are deeply equal. The benefit of using this function over assertEquals
directly is that it will convert Uint8Array
and Deno.Reader
bodies to strings, making them human-readable and thus helping to debug assertion failures:
const response = await ronSwansonQuoteHandler(req);
await assertResponsesAreEqual(
response,
jsonResponse(quotes, {
"X-Foo": "bar",
}),
);
Note that the existing assertResponsesMatch()
function is now deprecated, and will be removed in the next major release of Reno. If you are currently using it then please migrate to assertResponsesAreEqual
.
Doc comment tweak
Refines the forMethod
doc comment to make its behaviour clearer.
Adds `forMethod` higher-order route handler + housekeeping
Foremost, this release introduces a new forMethod
higher-order route handler, which takes mappings of HTTP methods and route handler functions, and returns a higher-order route handler that will forward requests to the correct handler by their method. Any requests whose method does not have an associated handler will result in a HTTP 405:
const get = () => textResponse("You performed a HTTP GET!");
const post = () => textResponse("You performed a HTTP POST!");
const routes = createRouteMap([
["/endpoint", forMethod([
["GET", get],
["POST", post],
])],
]);
export const methodsRouter = createRouter(routes);
This release also:
- bumps the Deno development version to 1.1.3
- bumps
deno/std
to 0.60.0 - moves repeatable commands into shell script, so they can be consistently invoked locally and on Travis CI
- fixes some existing doc comments
Another release already? 🙈
This release simply removes VS Code-generated export aliases (export x as y
) for the two types renamed in 1.0.0, so that they have the correct names in the generated documentation.
1.0.0! 🎉
Reno is hereby production-ready!
- Renames
Router
type toRouterCreator
andRouteParser
type toRouter
to better reflect their purpose - Fixes bug with string path wildcards, which were greedily capturing whereas they should have only captured the values within a particular path segment
- Completes API documentation
- Adds lightweight JSDoc-style comments to module exports to facilitate doc generation
- Converts all
const
-declared arrow expressions to traditional function declarations with jscodeshift and codeshift-transform-declared-arrow-to-func-dec so that doc generator would actually detect them as functions instead of regular variables
- Adds end-to-end test suite that's invoked on CI
- Invokes linting and format checking on CI
- Upgrades Deno dev version to 1.1.2
- Upgrades std to 0.59.0
Third alpha: upgrades and fixes
- Upgrades std to v0.58.0
- Upgrades Deno development version to v1.1.1
- Migrates from Sinon to testdouble.js, as the former was creating some sort of asynchronous resource (a timer maybe?) upon its default ESM export being imported and bound, resulting in Deno's async ops sanitiser throwing an error when running the unit tests
- Adds CI status badge to README
- Adds nested router example to README