Skip to content

Commit 1a1de0d

Browse files
committed
Note compat Router shim breaking changes in changelog
PR #758 review surfaced two compat-shim behaviour changes that are breaking versus the previous `@fedify/fedify` `Router` and were not called out in the changelog: `Router#route()` now calls `assertPath()` and throws `RouterError` for non-path inputs (previously returned `null`), and `trailingSlashInsensitive` is fixed at construction time (post-construction assignments create an inert own property on the wrapper). Both are intentional — the shim is deprecated and its surface is intentionally constrained — but they need a migration note so consumers can either pass options at the constructor or move to `Router` from `@fedify/uri-template`. #758 (comment) #758 (comment) Assisted-by: Claude Code:claude-opus-4-7
1 parent 679f2c9 commit 1a1de0d

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

CHANGES.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,16 @@ To be released.
5454
- Replaced Fedify's internal federation routing with
5555
*@fedify/uri-template* for stricter RFC 6570 URI Template expansion and
5656
matching. The deprecated `Router` export from *@fedify/fedify* remains
57-
available for compatibility. [[#418]]
57+
available for compatibility. [[#418], [#758] by ChanHaeng Lee]
58+
59+
- *Breaking change*: Tightened the deprecated `Router` shim from
60+
*@fedify/fedify/federation*: `route()` now throws `RouterError` for
61+
inputs that are not router paths (previously such inputs returned `null`
62+
on non-match), and `trailingSlashInsensitive` is no longer mutable
63+
post-construction (assignments after construction create an inert own
64+
property; the flag must be passed to the constructor). Callers should
65+
validate inputs and pass options at construction, or migrate to `Router`
66+
from *@fedify/uri-template*. [[#418], [#758] by ChanHaeng Lee]
5867

5968
[#316]: https://github.com/fedify-dev/fedify/issues/316
6069
[#418]: https://github.com/fedify-dev/fedify/issues/418
@@ -66,6 +75,7 @@ To be released.
6675
[#753]: https://github.com/fedify-dev/fedify/pull/753
6776
[#755]: https://github.com/fedify-dev/fedify/pull/755
6877
[#757]: https://github.com/fedify-dev/fedify/pull/757
78+
[#758]: https://github.com/fedify-dev/fedify/pull/758
6979

7080
### @fedify/fixture
7181

@@ -85,8 +95,6 @@ To be released.
8595
matching. This package replaces Fedify's previous direct use of
8696
*url-template* and *uri-template-router*. [[#418], [#758] by ChanHaeng Lee]
8797

88-
[#758]: https://github.com/fedify-dev/fedify/pull/758
89-
9098
### @fedify/amqp
9199

92100
- Added `AmqpMessageQueue.getDepth()` for reporting queued, ready, and

0 commit comments

Comments
 (0)