Back to Explore

pillarjs/router

GitHub
3 watchersOpen source

Last release:

Simple middleware-style router for Node.js, useful for routing HTTP requests and composing request handlers using `router(req, res, callback)` with `http.createServer` or other web frameworks. It supports typical routing methods like `router.get` and `router.use`, plus options for strictness and case sensitivity, and `router.param` for parameter-specific middleware.

Project status

  • Maintenance status: The repository shows an upstream push on 2026-06-02, suggesting it is still being worked on, but the provided change history shows no published updates after v2.2.0 (2025-03-27), so maintenance appears ongoing but with limited visible release activity in the evidence here.
  • Update cadence: Visible published updates are relatively infrequent (v2.1.0 in 2025-02, then v2.2.0 in 2025-03, earlier changes spread across 2024-2023), and there is a ~1.5-year gap since the last listed published update up to today (2026-09-10), despite the mid-2026 upstream push.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v2.2.0

    v2.2.0 adds more runtime debug logging and introduces deprecation warnings when route handlers or .param handlers return promise-like values instead of native Promises. It also removes older compatibility checks (notably around setImmediate and test-time Promise detection) and updates several dependencies/devDependencies.

    Features
  • v2.1.0

    v2.1.0 focuses on internal refactors to remove small helper dependencies and polyfills, switching to Node.js and standard-library equivalents such as Array.flat, Object.setPrototypeOf, and node:http METHOD constants. It also updates a few runtime dependencies (parseurl, is-promise) and refreshes CI tooling and configuration.

    BreakingFeatures
  • v2.0.0

    Release v2.0.0 was published on 2024-09-09, but the publisher did not provide release notes. As a result, there is no documented information here about new features, breaking changes, bug fixes, security updates, performance improvements, or migration steps.

  • v1.3.8

    Release v1.3.8 focuses on fixing how the router handles requests where the HTTP method is missing. The runtime change prevents `toLowerCase()` from throwing and allows routes like `route.all(...)` to be selected when `req.method` is `undefined`.

  • v1.3.7

    Release v1.3.7 is described as a fix for hanging when there is a large stack of synchronous routes. The diff shows the router’s internal request handling logic was adjusted to better handle large synchronous route stacks, and a regression test was added to cover this scenario.

  • v2.0.0-beta.1

    Router 2.0.0-beta.1 refactors core routing internals, removes the `debug` dependency, and upgrades routing to align with `path-to-regexp@3.2.0` semantics. The diff also shows additional runtime behavior changes that are not described in the provided release notes, including promise rejection handling.

    BreakingFeatures
  • v1.3.6

    Release 1.3.6 fixes handling for very large stacks of synchronous middleware to prevent stack overflows. It also bumps the safe-buffer dependency to v5.2.1.

  • v1.3.5

    Release v1.3.5 focuses on fixing middleware execution for unanchored RegExp path patterns and making a small internal performance optimization. The code changes add explicit prefix validation during route layer matching and switch the route method map to a null-prototype object.

  • v1.3.4

    Release v1.3.4 is presented as a small dependency-only update (array-flatten, parseurl, setprototypeof). The code diff, however, also includes several non-runtime changes to CI/test tooling and documentation formatting.

  • v2.0.0-alpha.1

    Release 2.0.0-alpha.1 adds basic support for returned Promises from router middleware, wiring returned thenables into the router's `next(...)` error flow. It also drops support for Node.js versions below 0.10 and bumps `debug` to 3.1.0 with the related environment variable behavior changes described in the notes.

    BreakingFeatures
  • v1.3.3

    Release 1.3.3 is described as a documentation-only change, fixing the JSDoc for the Router constructor. The code diff also includes minor formatting-only edits and several non-runtime repo changes (tests, CI matrix, README), plus a devDependency bump.