NextRush
Community

Changelog

Release history and changes for NextRush v3.

All notable changes to NextRush v3 are documented here.


Versioning

NextRush follows Semantic Versioning:

  • Major (3.x.x): Breaking changes
  • Minor (x.1.x): New features, backward compatible
  • Patch (x.x.1): Bug fixes, backward compatible

v3.0.4

Status: Current stable line (3.0.x patch releases)

Highlights

  • Unified npm versions: All @nextrush/* packages and create-nextrush publish at 3.0.4.
  • @nextrush/di: container.reset() clears resolution tracking; Vitest fileParallelism: false avoids parallel test files racing the global container (more reliable CI / local tests).

v3.0.3

Status: Superseded by v3.0.4 (kept for history)

Highlights

  • Unified npm versions: All @nextrush/* packages and create-nextrush published at 3.0.3.
  • nextrush: nextrush CLI available from the meta package via @nextrush/dev (for example npx nextrush dev after pnpm add nextrush).
  • @nextrush/dev: Decorator tsconfig startup validation matches functional scaffolds (no false warnings when both flags are omitted).
  • Documentation: Installation, dev tools, and create-nextrush pages updated for 3.0.3.

v3.0.2

Status: Historical (3.0.x lineage)

Highlights

  • Unified npm versions: All @nextrush/* packages and create-nextrush published at 3.0.2.
  • create-nextrush: Published CLI entry bin/create-nextrush.js so pnpm create nextrush, npm create nextrush, npx, and pnpm dlx resolve the CLI correctly.
  • Documentation: Site config, landing badge, FAQs, roadmap, and benchmarks reference 3.0.2 and stable semver messaging (replacing outdated “alpha” copy on marketing surfaces).
  • Plugins: @nextrush/events and @nextrush/template plugin metadata versions aligned with 3.0.2.

v3.0.0-alpha.3

Status: Historical prerelease (superseded by 3.0.x stable line)

New Features

@nextrush/di

  • @Optional() decorator — Mark constructor parameters as optional. Unregistered dependencies resolve to undefined instead of throwing.
  • isParameterOptional() / getOptionalParams() — Utility functions to inspect optional parameter metadata.
  • Improved error messages — DI resolution errors now include actionable suggestions (e.g., "Did you forget to add @Service()?").
  • Set-based circular dependency detection — O(1) lookup performance for circular dependency tracking.

@nextrush/decorators

  • @SetHeader(name, value) — Declarative response header decorator for route methods.
  • @Redirect(url, statusCode?) — Declarative redirect decorator with configurable status code (default 302).
  • createCustomParamDecorator(extractor, options?) — Create reusable parameter decorators with custom extraction logic.
  • getResponseHeaders() / getRedirectMetadata() — Metadata reader functions for response decorators.

@nextrush/router

  • router.reset() — Clear all registered routes, middleware, and internal state.

@nextrush/controllers

  • @SetHeader / @Redirect handler support — Built handlers apply response headers and redirects automatically.
  • Custom parameter extractioncreateCustomParamDecorator params are fully supported in handler building.
  • Middleware token resolution — Middleware arrays accept DI tokens (string/Symbol) resolved from the container.
  • Plugin destroy() lifecycle — Calls router.reset() for graceful cleanup.

v3.0.0

Status: Historical initial release

Highlights

  • Modular monorepo: Every feature is a separate package with zero runtime dependencies
  • Dual paradigm: Functional routes and decorator-based controllers
  • Controllers plugin: Auto-discovery and registration via @nextrush/controllers
  • Guards system: Function and class-based guards for route protection
  • Dependency injection: DI container via @nextrush/di (wraps tsyringe)
  • Dev tools: CLI for development and production builds via @nextrush/dev
  • Multi-runtime adapters: Node.js, Bun, Deno, and Edge
All package versions in v3.0.0
PackageVersion
nextrush3.0.0
@nextrush/core3.0.0
@nextrush/router3.0.0
@nextrush/types3.0.0
@nextrush/errors3.0.0
@nextrush/di3.0.0
@nextrush/decorators3.0.0
@nextrush/controllers3.0.0
@nextrush/dev3.0.0
@nextrush/runtime3.0.0
@nextrush/adapter-node3.0.0

Breaking Changes from v2

v3 is a complete rewrite. Migration from v2 requires significant changes.

Package Structure

v2 was a single package. v3 is a modular monorepo:

// v2
import { createApp, cors, helmet } from 'nextrush';

// v3
import { createApp } from 'nextrush';
import { cors } from '@nextrush/cors';
import { helmet } from '@nextrush/helmet';

Context API

// v2 - Koa-style
ctx.body = { message: 'Hello' };

// v3 - method-based
ctx.json({ message: 'Hello' });

Middleware

// v2
app.use(async (ctx, next) => {
  await next();
});

// v3
app.use(async (ctx) => {
  await ctx.next();
});

Server Start

// v2
app.listen(3000);

// v3
import { listen } from 'nextrush';
await listen(app, 3000);

Migration Guide

From v2 to v3

Follow these steps to migrate your application from v2 to v3:

Update Dependencies

# Remove v2
pnpm remove nextrush

# Install v3 core
pnpm add nextrush

# Install middleware separately
pnpm add @nextrush/cors @nextrush/body-parser

Update Imports

// Before (v2)
import { createApp, cors, json } from 'nextrush';

// After (v3)
import { createApp, createRouter, listen } from 'nextrush';
import { cors } from '@nextrush/cors';
import { json } from '@nextrush/body-parser';

Update Context Usage

// Before (v2)
router.get('/', (ctx) => {
  ctx.body = { message: 'Hello' };
  ctx.status = 200;
});

// After (v3)
router.get('/', (ctx) => {
  ctx.json({ message: 'Hello' });
  // Status 200 is the default
});

Update Middleware

// Before (v2)
app.use(cors({ origin: '*' }));

// After (v3) — same API, different import
import { cors } from '@nextrush/cors';
app.use(cors({ origin: '*' }));

Update Server Start

// Before (v2)
app.listen(3000);

// After (v3)
import { listen } from 'nextrush';
await listen(app, 3000);

Upgrade Support

Having trouble upgrading?

On this page