π 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