rou3 is a lightweight, fast JavaScript router for matching HTTP methods and URL paths to route data. It supports URLPattern-like route syntax with parameters, regex constraints, wildcards, and optional segments, and uses a compiler to turn routes into one optimized matching function for runtime or build-time use.
Project status
- Active maintenance appears likely, last upstream push was on 2026-10-02, and updates landed recently (v0.10.1 to v0.11.0 between 2026-09-28 and 2026-09-29).
- The update cadence looks fast and ongoing in the short term, with multiple updates in a matter of days (suggesting the project is actively evolving rather than dormant).
AI summary generated
Recent updates
v0.11.0
v0.11.0 introduces a major migration for route pattern parsing, aligning route syntax more closely with the Web URLPattern semantics (including stricter parameter name rules and empty segment handling). It also updates the compiler APIs, especially compileRouterToString, which now serializes route data via JSON.stringify and changes error behavior for unsupported route data types.
BreakingFeaturesv0.10.2
v0.10.2 introduces a new validation step for route patterns containing regex-like groups. The router now detects cases where a literal or constraint-related `(` does not close within the same path segment, and throws a clear, rou3-prefixed error instead of letting a raw RegExp SyntaxError leak.
Breakingv0.10.1
Version v0.10.1 was published on 2026-09-28. No release notes or change log details were provided by the publisher, so the specific functional, API, or behavioral changes in this release cannot be determined from the provided information.
v0.10.0
v0.10.0 introduces new routing semantics where `**` is no longer terminal, allowing path segments after `**` with end-anchored matching and different match ranking. It also changes trailing-slash handling (only one ignored), and updates `routeToRegExp` so generated regexes match `findRoute` precisely.
BreakingFeaturesv0.9.2
v0.9.2 adds a new exported helper, routeNodeKeys(), intended to expose radix-tree node identity for a given route pattern. The release also includes fixes around correct capture-group name handling, canonicalization of empty segments, and safer object-literal property emission for __proto__-named params, plus removal logic aligning with addRoute segment classification.
Featuresv0.9.1
v0.9.1 adds a new pattern comparison utility, compareRoutes(), and includes several performance and matcher consistency improvements. The update also changes internal route overlap shape handling and modifies how matchers select among same-node sibling routes to align interpreter and compiled behavior.
Featuresv0.9.0
v0.9.0 adds new pattern-overlap utilities (`routesOverlap`, `findOverlappingRoutes`) and an inverse RegExp converter (`regExpToRoute`). It also updates route matching and regex compilation to improve consistency between the interpreter and the compiled matcher (`matchAll`), with further PCRE2-focused regexp fixes and more consistent `findAllRoutes` ordering.
Featuresv0.8.1
v0.8.1 adds support for hyphens in route parameter names (for example, :user-id). The change is implemented by widening the route-parameter matching regex across route compilation and route addition, and it includes a new test suite to validate compiled and uncompiled matching.
Featuresv0.8.0
v0.8.0 focuses on URLPattern-compatible route syntax, adding support for URLPattern-style escaping, non-capturing group delimiters ({...}), and parameter modifiers (:name?, :name+, :name*), along with corresponding regexp and compiler changes. It also includes compiler codegen optimizations (removing a static-node Set) and a fix for the `hasIf` emission logic.
BreakingFeaturesv0.7.12
v0.7.12 adds support for escaping special route-pattern characters so users can register literal `:` and `*` in paths. The change is implemented in route insertion logic and updated snapshots/tests, with additional dependency/version bumps in the toolchain.
Featuresv0.7.11
v0.7.11 adds support for matching root wildcard routes like "/**". The fix is implemented by changing how wildcard capture segments are indexed, and it is accompanied by expanded router matching tests. The release also updates development tooling dependencies and the pnpm package manager version.
v0.7.10
v0.7.10 focuses on compiler performance, specifically avoiding repeated evaluation of route “data” when compiling in iot mode. The implementation changes how route data is serialized and injected into generated code, and the generated output structure changed accordingly.