Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Releases: reno-router/reno

Integrates with Deno registry webhook

16 Aug 15:22
Compare
Choose a tag to compare

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

15 Aug 13:04
Compare
Choose a tag to compare

Just a routine maintenance release. No fixes or breaking changes here!

No longer exports testing helper factory function

26 Jul 17:57
Compare
Choose a tag to compare

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

26 Jul 17:51
Compare
Choose a tag to compare
  • Upgrades Deno dev version to v1.2.1
  • Upgrades std to v0.62
  • Refactors assertResponsesAreEqual() tests to be less brittle

Introduces `assertResponsesAreEqual()` testing utility

26 Jul 13:54
Compare
Choose a tag to compare

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

10 Jul 17:08
Compare
Choose a tag to compare

Refines the forMethod doc comment to make its behaviour clearer.

Adds `forMethod` higher-order route handler + housekeeping

10 Jul 17:06
Compare
Choose a tag to compare

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? 🙈

30 Jun 22:22
Compare
Choose a tag to compare

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! 🎉

30 Jun 22:09
Compare
Choose a tag to compare

Reno is hereby production-ready!

  • Renames Router type to RouterCreator and RouteParser type to Router 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

21 Jun 15:10
Compare
Choose a tag to compare
  • 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