Skip to content

v0.1.1

Latest
Compare
Choose a tag to compare
@domin-mnd domin-mnd released this 17 Sep 14:13
· 1 commit to master since this release

πŸ‘€ Highlights

This release brings some type-safety & performance improvements along with various fixes.

Here's some.

πŸŽ‡ Generics Support For Signatures

The use of generics is now much easier when it comes to type-safe code. Below you can see examples of request body typing in Express:

// routes/other-fruits/apple.post.ts
import { defineExpressRoute } from "storona";

interface Body {
  fruit: string;
}

export default defineExpressRoute<{
  ReqBody: Body;
}>((req, res) => {
  const { fruit } = req.body;
  res.send(`Hello world! Here's your fruit: ${fruit}`);
});

πŸ«“ Bun Support

Storona now will not transpile your code using tsup if you use bun's runtime. Instead it will use bun's native typescript & jsx import.

🩹 Fixes

  • Fix router not bundling everything outside of the routes directory scope
  • Fix non-nested import causing validation failure (plain cjs)
  • Fix fast-glob vulnerability

πŸ“– Documentation

For more features and additions of Storona check its documentation - https://storona.domin.pro