Skip to content

Latest commit

 

History

History
819 lines (476 loc) · 29.6 KB

CHANGELOG.md

File metadata and controls

819 lines (476 loc) · 29.6 KB

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

v0.12.1

compare changes

🩹 Fixes

  • regexp: Build determinize patterns lazily (700894c)

📖 Documentation

❤️ Contributors

v0.12.0

compare changes

🩹 Fixes

  • router: ⚠️ Percent-encode literal pattern text like URLPattern (#231)
  • router: ⚠️ Never let :name* capture an empty value (#232)
  • router: ⚠️ Let a greedy capture before an optional param take what it can (#233)
  • router: ⚠️ Key a bare ** capture like URLPattern (#234)
  • router: ⚠️ End a param at a } before a regex group (#236)
  • ⚠️ Review follow-ups for #231, #232 and #233 (#238, #231, #232, #233)
  • router: ⚠️ Don't prefix / to a pattern that starts with a {/…} group (#239)
  • router: ⚠️ Make * a greedy catch-all like URLPattern (#240)
  • router: ⚠️ Reject empty segments inside :name+ / :name* like URLPattern (#241)
  • router: ⚠️ Read (.*) and :name(.*) as greedy catch-alls like URLPattern (#242)
  • router: ⚠️ Reject -- / && in a constraint class like URLPattern (#245)
  • router: ⚠️ Throw on a tab, LF or CR in a pattern (#244)
  • router: ⚠️ Resolve . / .. segments in patterns like URLPattern (#246)
  • router: List each route once in findAllRoutes (1c8aaa3)
  • router: Match segments with several captures in linear time (e3e9a25)
  • regexp: Avoid polynomial backtracking for params sharing a segment (0b8fde4)
  • router: Rank constrained and literal in-segment params above plain ones (0f437bc)

💅 Refactors

  • Reorganize src and split docs (aa4c478)

📖 Documentation

  • Clarify encoded dots, lookup path input and tie order (746210e)
  • Simplify pattern and matching docs (f00fba9)
  • Simplify public api jsdocs and remaining readme sections (f066346)

🏡 Chore

  • Mark RouterContext props as internal (c0f6015)

✅ Tests

  • wpt: Sync urlpattern data with upstream and tighten harness (863bb6a)
  • wpt: Compare groups strictly and pin rou3 results for known diffs (#235)
  • find-all: Sweep that a containing route is listed first (#237)
  • Raise timeout for empty-segments compiled parity sweep (2a658e3)
  • scenarios: Add data-driven cross-matcher scenario suite (01f72fb)

⚠️ Breaking Changes

  • router: ⚠️ Percent-encode literal pattern text like URLPattern (#231)
  • router: ⚠️ Never let :name* capture an empty value (#232)
  • router: ⚠️ Let a greedy capture before an optional param take what it can (#233)
  • router: ⚠️ Key a bare ** capture like URLPattern (#234)
  • router: ⚠️ End a param at a } before a regex group (#236)
  • ⚠️ Review follow-ups for #231, #232 and #233 (#238, #231, #232, #233)
  • router: ⚠️ Don't prefix / to a pattern that starts with a {/…} group (#239)
  • router: ⚠️ Make * a greedy catch-all like URLPattern (#240)
  • router: ⚠️ Reject empty segments inside :name+ / :name* like URLPattern (#241)
  • router: ⚠️ Read (.*) and :name(.*) as greedy catch-alls like URLPattern (#242)
  • router: ⚠️ Reject -- / && in a constraint class like URLPattern (#245)
  • router: ⚠️ Throw on a tab, LF or CR in a pattern (#244)
  • router: ⚠️ Resolve . / .. segments in patterns like URLPattern (#246)

❤️ Contributors

v0.11.0

compare changes

🚀 Enhancements

  • compiler: ⚠️ Options object, matchAll overloads and JSON route data (#225)

🩹 Fixes

  • regexp-to-route: Reject unanchored regexes and unicode flags (#218)
  • router: End param names at a - no word char follows (#222)
  • router: ⚠️ Never let a method-scoped route hide a method-agnostic one (#223)
  • router: ⚠️ Reject pattern syntax with no meaning yet (#226)
  • overlap: Dedupe findOverlappingRoutes by registration, not data reference (#220)
  • find: Return fresh match objects from the static fast path (#219)
  • router: ⚠️ Read any \x as a literal x, reject anchors in constraints (#228)
  • ⚠️ Align route pattern syntax with URLPattern (#230)

🏡 Chore

  • Declare runtime baseline (#224)
  • Update docs (8c85ec9)

⚠️ Breaking Changes

  • compiler: ⚠️ Options object, matchAll overloads and JSON route data (#225)
  • router: ⚠️ Never let a method-scoped route hide a method-agnostic one (#223)
  • router: ⚠️ Reject pattern syntax with no meaning yet (#226)
  • router: ⚠️ Read any \x as a literal x, reject anchors in constraints (#228)
  • ⚠️ Align route pattern syntax with URLPattern (#230)

❤️ Contributors

v0.10.2

compare changes

🩹 Fixes

  • router: Throw a clear error for a ( that does not close in its segment (9ff2952)

📖 Documentation

  • Document trailing slashes and empty-segment params (ef35388)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.10.1

compare changes

🩹 Fixes

  • router: Quote the pattern as written in the one-** error (bc19284)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.10.0

compare changes

🚀 Enhancements

  • regexp: ⚠️ Emit re2-compatible trailing-slash suffix where possible (#211)
  • router: ⚠️ Support segments after wildcards (#216)

🩹 Fixes

  • Drop excess .. segments in path normalization (6ebebb6)
  • regexp: Stop emitting segments after a terminal catch-all (#204)
  • regexp: Anchor catch-all separator to its prefix (eea9453)
  • remove: Splice one same-node sibling instead of the whole method bucket (#202)
  • regexp: Match exactly the paths findRoute matches (6368bf5)
  • ⚠️ Ignore at most one trailing slash in lookup (#210)
  • regexp: Inline an optional group before more of the route (#217)

🌊 Types

  • Allow undefined for trailing wildcard params (#198)

🏡 Chore

⚠️ Breaking Changes

  • regexp: ⚠️ Emit re2-compatible trailing-slash suffix where possible (#211)
  • router: ⚠️ Support segments after wildcards (#216)
  • ⚠️ Ignore at most one trailing slash in lookup (#210)

❤️ Contributors

v0.9.2

compare changes

🚀 Enhancements

  • Add routeNodeKeys() for radix-node identity (454e856)

🩹 Fixes

  • Escape param names that are invalid capture group names (5d3a3d1)
  • Canonicalize empty segments in route patterns (#195)
  • compiler: Emit a computed key for a proto route param (d345121)
  • remove: Key and classify segments exactly like addRoute (204726a)

❤️ Contributors

v0.9.1

compare changes

🚀 Enhancements

  • Add compareRoutes() util (#191)

🔥 Performance

  • find: Remove avoidable allocations in dynamic lookup path (e023038)
  • compiler: Faster static, regex, wildcard and matchAll matching (1c51df2)
  • add: Skip escape, group and modifier scans for plain paths (cabbe2d)
  • compiler: Segment switch dispatch, hoisted regexes and narrower length checks (4bc0e3c)

🩹 Fixes

  • compiler: Resolve method-agnostic fallback like runtime (#190)
  • Unify same-node route selection across interpreter and compiled matchers (f09ca03)

📖 Documentation

  • Clarify multi route matching order (236612e)

🏡 Chore

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.9.0

compare changes

🚀 Enhancements

  • Add route pattern overlap utilities (#183)
  • Add regExpToRoute() to convert PCRE regex back to route pattern (#188)

🩹 Fixes

  • regexp: Compile trailing optional groups inline for PCRE2 compatibility (#185)
  • Align findAllRoutes with findRoute & compiled matchAll (#184, #186)
  • Order findAllRoutes same-node siblings by specificity (#187)
  • regexp: Keep literal dots inside regex constraints verbatim (baf2c87)

🏡 Chore

🤖 CI

❤️ Contributors

v0.8.1

compare changes

🚀 Enhancements

  • Support hyphens in route parameter names (8dfaa48)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.8.0

compare changes

🚀 Enhancements

  • ⚠️ Url pattern compatibility (#178)

🔥 Performance

  • Compiler - check params.length > 0 instead of using a Set to deduplicate static nodes - prevent deopts from accessing s out of bound for some cases in compiler output - use .concat instead of spread syntax for faster params array cloning and disable the lint rule that prefer spread (3575022)
  • Avoid +1 a lot of time by changing startIdx to 1 (285aa05)

🩹 Fixes

  • HasIf should only be set to true if an if clause was appended before (208262c)

🏡 Chore

⚠️ Breaking Changes

  • ⚠️ Url pattern compatibility (#178)

❤️ Contributors

v0.7.12

compare changes

🚀 Enhancements

  • add: Allow escaping : and * using backslash (#175)

🏡 Chore

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.7.11

compare changes

🩹 Fixes

  • Handle root wildcard routes (#173)

🏡 Chore

❤️ Contributors

v0.7.10

compare changes

🔥 Performance

  • compiler: Eval data once in iot mode (#172)

🏡 Chore

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.7.9

compare changes

📦 Build

🏡 Chore

  • Update dev dependencies (05a81ff)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.7.8

compare changes

🔥 Performance

  • Prefer String.charCodeAt (#170)

🩹 Fixes

  • Match correct regex param (#169)

💅 Refactors

  • Simplify compiler logic (9b7adcb)

📖 Documentation

🏡 Chore

  • Update eps (20d740d)
  • Remove note about experimental compiler (bce9b9f)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.7.7

compare changes

🩹 Fixes

  • addRoute: Always normalize path and method (844776f)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.7.6

compare changes

🚀 Enhancements

  • types: Add InferRouteParams for param extraction (#168)

🔥 Performance

  • compiler: Short circuit when no routes exist (ef3c444)

💅 Refactors

  • compiler: Simplify logic (082f20f)

🏡 Chore

❤️ Contributors

v0.7.5

compare changes

🚀 Enhancements

  • compiler: Support custom data serialize option (c633ed1)

🏡 Chore

  • Apply automated updates (e459e5b)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.7.4

compare changes

🩹 Fixes

  • compiler: Add missing return statement for matchAll (0e02b36)

🏡 Chore

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.7.3

compare changes

🚀 Enhancements

  • compiler: Support matchAll mode (#165)

🔥 Performance

  • compiler: Avoid array slicing (#164)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.7.2

compare changes

🩹 Fixes

  • routeToRegExp: Match wildcard without trailing slashes as well (f0361df)
  • routeToRegExp: Keep wildcard as _ (205430d)
  • routeToRegExp: Support named wildcard (5d0c8f5)
  • routeToRegExp: Preserve anonymous counter ids (5682d66)

🏡 Chore

  • Rename _utils.ts to object.ts (0f72045)

✅ Tests

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.7.1

compare changes

🔥 Performance

  • compiler: Treeshake empty conditions (#162)

🏡 Chore

❤️ Contributors

v0.7.0

compare changes

🚀 Enhancements

  • Experimental compiler (#155)
  • compiler: Complete functionality to match findRoute (#158)
  • compiler: compileRouterToString (#159)
  • compileRouterToString: Support serializing custom code with { toJSON } (064ae0d)

🔥 Performance

🩹 Fixes

  • compiler: Avoid duplicate static checks (db9fcf2)
  • Preserve empty segments (#160)

💅 Refactors

  • compiler: Only warn for not supported regexp (012d8b9)

📦 Build

🏡 Chore

✅ Tests

  • Add test:compiler for full tests (636795f)
  • Snapshot compiler result (991e7d8)
  • Merge compiler with main tests (e5c7b50)
  • Add back compiler snapshot! (e4d6287)
  • Make sure all inputs have leading slash (0aa1de3)

❤️ Contributors

v0.6.3

compare changes

📦 Build

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.6.2

compare changes

🚀 Enhancements

  • routeToRegExp util (#153)

📦 Build

  • Export MatchedRoute type (#152)

🏡 Chore

❤️ Contributors

v0.6.1

compare changes

💅 Refactors

  • Explicit extensions and types (2043cca)

📦 Build

🏡 Chore

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.6.0

compare changes

🩹 Fixes

  • findAll: Last named segment is required (#128)
  • removeRoute: Remove named wildcard routes (#137)

💅 Refactors

📦 Build

🏡 Chore

⚠️ Breaking Changes

❤️ Contributors

v0.5.1

compare changes

💅 Refactors

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.5.0

compare changes

🔥 Performance

  • Avoid Object.create(null) (2b7ac09)

🩹 Fixes

  • ⚠️ Last named segment should be required (#123)

🏡 Chore

⚠️ Breaking Changes

  • ⚠️ Last named segment should be required (#123)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.4.0

compare changes

🚀 Enhancements

  • ⚠️ Support multiple entries with same route (#118)

🏡 Chore

⚠️ Breaking Changes

  • ⚠️ Support multiple entries with same route (#118)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.3.0

compare changes

🚀 Enhancements

  • ⚠️ findAllRoutes (#117)

🩹 Fixes

  • matcher: Match param in last segment (#110)

💅 Refactors

  • ⚠️ Unify apis with method, path order (#114)
  • matcher: Improve readability (af7af4d)
  • Makes params matching opt-out always (35aaf15)

🏡 Chore

✅ Tests

  • Update matcher tests (c81d596)
  • Add benchmark tests (#116)

⚠️ Breaking Changes

  • ⚠️ findAllRoutes (#117)
  • ⚠️ Unify apis with method, path order (#114)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.2.0

compare changes

🩹 Fixes

  • matcher: Match param in last segment (#110)

💅 Refactors

  • ⚠️ Unify apis with (method, path) order (#114)
  • matcher: Improve readability (af7af4d)

🏡 Chore

✅ Tests

⚠️ Breaking Changes

  • ⚠️ Unify apis with method, path order (#114)

❤️ Contributors

  • Pooya Parsa (@pi0)

v0.1.0

Radix3 migrated to rou3 (see h3js#108)