v2.0.4
Release v2.0.4: Welcome to the New Era of GamanJS π
We are incredibly excited to announce GamanJS v2.0.4. This major release marks a complete architectural rebirth of the framework. We have stripped away the bloat, entirely rewritten the core engine, and laser-focused our vision.
GamanJS is now officially "A Lean Framework for Heavy-Duty Enterprise Performance."
π What's Changed
1. The "Lean" Consolidation (One Package to Rule Them All)
Say goodbye to managing multiple dependencies. We have officially deprecated the fragmented @gaman/core, @gaman/common, and @gaman/cli packages.
Everything you need to build high-performance enterprise applications is now bundled into a single, ultra-lean package. Less bloat, zero dependency hell, and lightning-fast installations.
2. 100% Bun Native & TypeScript
GamanJS v2 is built from the ground up to harness the raw power of Bun. By utilizing Bun's native APIs and writing the entire core in strict TypeScript, we have achieved maximum execution speed and zero-overhead type safety.
3. Functional-First, Enterprise-Ready
We have shifted paradigms. GamanJS v2 embraces a Functional-First approach using the new Compose Pattern (composeRouter, composeController).
- Fluent API: Chain your routes, middlewares, and exception handlers seamlessly.
- Stateless & Fast: By moving away from heavy class instantiations to functional closures, memory footprint is drastically reduced.
- Unified Standard Response: Say goodbye to chaotic REST API responses (no more guessing if the payload uses
{ data }or{ result }). GamanJS strictly enforces a predictable, standard response format across all endpoints:{ "success": true, "message": "Success", "data": { ... }, "metadata": { ... } } - Zero-Overhead Metadata: To achieve our record-breaking benchmark speeds, auto-generated metadata (like
requestIdandtimestamp) has been removed from the default lifecycle. However, you can still easily attach them on-demand:Res.send(data, { meta: { requestId: '...', ... } }).
4. Unbeatable Heavy-Duty File Processing
We didn't just optimize for simple JSON responses. GamanJS v2 introduces a custom-built, Zero-Copy Lazy Multipart Scanner.
For heavy-duty tasks like file uploads and multipart forms, GamanJS parses only what is requested, bypassing the bottlenecks of standard Web APIs. Benchmark results show GamanJS handling POST File operations up to 5x - 6x faster than other leading Bun frameworks.
π Getting Started with v2
Starting fresh with the new architecture is easier than ever. Generate your project instantly:
bun create gaman@latest
cd your-project-name
bun run devOr, if you are migrating manually, define your bootstrap like this:
import { defineBootstrap } from 'gaman';
import router from './router';
defineBootstrap(async (app) => {
app.mount(router);
app.mountServer({ http: 3000 });
});π Read the full documentation: gamanjs.github.io
Full Changelog: v1.2.8...v2.0.4