Releases: swan-io/chicane
Releases · swan-io/chicane
2.0.0
What's new
- Union params support, with
/:env{live|sandbox}/projects
syntax
ts-pattern
interop with Router.P.{RouteName}()
Breaking changes
- Remove hash support (
#:param
)
- Remove
Location
key
property
- Rename
useNavigationBlocker
to useBlocker
1.3.4
- Fix
create-react-app
compatibility (90be57b)
1.3.3
- Extract
GetCreateURLFns
type in order to avoid TS "type flattening" issue in emitted createRouter.d.ts
(fixes #37)
1.3.2
- Improve params matching performances when no search params are defined.
1.3.1
- Fix a regression with
basePath
option
1.3.0
- Add support for search and hash params on wildcard routes (
/*
).
This allow some neat tricks, like using a search param from a whole app area:
export const Router = createRouter({
Home: "/",
...createGroup("User", "/users?:impersonatedId", {
Area: "/*", // UserArea: "/users/*?:impersonatedId" -> You can get impersonatedId value at area root
Detail: "/:userId", // UserDetail: "/users/:userId?:impersonatedId" -> as it's a group, each route accept impersonatedId param
}),
});
1.2.5
- Rollback some parts of the previous release (it break some types, like URL creation functions params)
1.2.4
- Add some type-level tests using
tsd
- Improve routes concatenation (used by
createGroup
) - concatRoutes("/foo/", "/bar")
now respond "/foo/bar"