Skip to content

Commit ae2f447

Browse files
authored
v3.0.0b1 (#55)
- Version release to support ReactPy v2.0.0 (beta) - Modifications to support the latest version of docs dependencies (Python / mkdocs / mkdocs-material / etc)
1 parent f59c85a commit ae2f447

26 files changed

Lines changed: 829 additions & 840 deletions

CHANGELOG.md

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,106 +19,121 @@ Don't forget to remove deprecated code on each major release!
1919

2020
## [Unreleased]
2121

22+
### Added
23+
24+
- Support for ReactPy v2.x (beta). The initial URL is now sourced from the ReactPy executor (`use_connection().location`) instead of a JS-side `popstate` effect, removing a redundant network round-trip on first load.
25+
2226
### Changed
2327

24-
- Bump required ReactPy version to `2.x`
28+
- **Breaking:** Bumped minimum ReactPy version to `2.0.0b12`.
29+
- **Breaking:** Migrated to Hatch `src/` layout — the package now lives at `src/reactpy_router/` (previously `reactpy_router/` at the repository root).
30+
- **Breaking:** JavaScript build pipeline switched from `Rollup` (CommonJS) to `Bun` + `TypeScript`. The prebuilt bundle ships at `src/reactpy_router/static/bundle.js`.
31+
- **Breaking:** Top-level re-exports trimmed. `Route`, `MatchedRoute`, `CompiledRoute`, `RouteState`, `ConversionInfo`, `ConverterMapping`, `Resolver`, and `Router` are no longer importable from `reactpy_router`. Import them from `reactpy_router.types` instead.
32+
- **Breaking:** The `link` component no longer accepts the legacy underscore `class_name` attribute — use `className` only.
33+
- **Breaking:** The internal `History` JavaScript callback was renamed from `onHistoryChangeCallback` to `onHistoryPreviousCallback` to reflect that it now fires only on browser history navigation events.
34+
- `@reactpy/client` bumped to `^1.2.0`.
35+
- The `uuid` route converter is now case-insensitive (previously matched only lowercase hex).
36+
37+
### Removed
38+
39+
- `StarletteResolver` and the `simple.py` / `core.py` modules that accompanied it (these were already removed in 2.0.0 in favor of `ReactPyResolver`; this release also drops the old `core.py`/`simple.py` modules).
2540

2641
## [2.0.0] - 2025-06-14
2742

2843
### Added
2944

30-
- Support for custom routers.
45+
- Support for custom routers.
3146

3247
### Changed
3348

34-
- Set maximum ReactPy version to `<2.0.0`.
35-
- Set minimum ReactPy version to `1.1.0`.
36-
- `link` element now calculates URL changes using the client.
37-
- Refactoring related to `reactpy>=1.1.0` changes.
38-
- Changed ReactPy-Router's method of waiting for the initial URL to be deterministic.
39-
- Rename `StarletteResolver` to `ReactPyResolver`.
49+
- Set maximum ReactPy version to `<2.0.0`.
50+
- Set minimum ReactPy version to `1.1.0`.
51+
- `link` element now calculates URL changes using the client.
52+
- Refactoring related to `reactpy>=1.1.0` changes.
53+
- Changed ReactPy-Router's method of waiting for the initial URL to be deterministic.
54+
- Rename `StarletteResolver` to `ReactPyResolver`.
4055

4156
### Removed
4257

43-
- `StarletteResolver` is removed in favor of `ReactPyResolver`.
58+
- `StarletteResolver` is removed in favor of `ReactPyResolver`.
4459

4560
### Fixed
4661

47-
- Fixed bug where `link` element sometimes would sometimes not retrieve the correct `href` attribute.
62+
- Fixed bug where `link` element sometimes would sometimes not retrieve the correct `href` attribute.
4863

4964
## [1.0.3] - 2024-11-21
5065

5166
### Fixed
5267

53-
- Fix behavior where the page would be rendered twice on initial load
68+
- Fix behavior where the page would be rendered twice on initial load
5469

5570
## [1.0.2] - 2024-10-24
5671

5772
### Fixed
5873

59-
- Fix python `wheel` missing `bundle.js` file.
74+
- Fix python `wheel` missing `bundle.js` file.
6075

6176
## [1.0.1] - 2024-10-24
6277

6378
### Changed
6479

65-
- JavaScript bundle is now created using [`Bun`](https://bun.sh/).
66-
- Python package is now built using [`Hatch`](https://hatch.pypa.io/).
80+
- JavaScript bundle is now created using [`Bun`](https://bun.sh/).
81+
- Python package is now built using [`Hatch`](https://hatch.pypa.io/).
6782

6883
## [1.0.0] - 2024-10-18
6984

7085
### Changed
7186

72-
- Rename `use_query` to `use_search_params`.
73-
- Rename `simple.router` to `browser_router`.
74-
- Rename `SimpleResolver` to `StarletteResolver`.
75-
- Rename `CONVERSION_TYPES` to `CONVERTERS`.
76-
- Change "Match Any" syntax from a star `*` to `{name:any}`.
77-
- Rewrite `reactpy_router.link` to be a server-side component.
78-
- Simplified top-level exports that are available within `reactpy_router.*`.
87+
- Rename `use_query` to `use_search_params`.
88+
- Rename `simple.router` to `browser_router`.
89+
- Rename `SimpleResolver` to `StarletteResolver`.
90+
- Rename `CONVERSION_TYPES` to `CONVERTERS`.
91+
- Change "Match Any" syntax from a star `*` to `{name:any}`.
92+
- Rewrite `reactpy_router.link` to be a server-side component.
93+
- Simplified top-level exports that are available within `reactpy_router.*`.
7994

8095
### Added
8196

82-
- Add debug log message for when there are no router matches.
83-
- Add slug as a supported type.
84-
- Add `reactpy_router.navigate` component that will force the client to navigate to a new URL (when rendered).
85-
- New error for ReactPy router elements being used outside router context.
86-
- Configurable/inheritable `Resolver` base class.
97+
- Add debug log message for when there are no router matches.
98+
- Add slug as a supported type.
99+
- Add `reactpy_router.navigate` component that will force the client to navigate to a new URL (when rendered).
100+
- New error for ReactPy router elements being used outside router context.
101+
- Configurable/inheritable `Resolver` base class.
87102

88103
### Fixed
89104

90-
- Fix bug where changing routes could cause render failure due to key identity.
91-
- Fix bug where "Match Any" pattern wouldn't work when used in complex or nested paths.
92-
- Fix bug where `link` elements could not have `@component` type children.
93-
- Fix bug where the ReactPy would not detect the current URL after a reconnection.
94-
- Fix bug where `ctrl` + `click` on a `link` element would not open in a new tab.
95-
- Fix test suite on Windows machines.
105+
- Fix bug where changing routes could cause render failure due to key identity.
106+
- Fix bug where "Match Any" pattern wouldn't work when used in complex or nested paths.
107+
- Fix bug where `link` elements could not have `@component` type children.
108+
- Fix bug where the ReactPy would not detect the current URL after a reconnection.
109+
- Fix bug where `ctrl` + `click` on a `link` element would not open in a new tab.
110+
- Fix test suite on Windows machines.
96111

97112
## [0.1.1] - 2023-12-13
98113

99114
### Fixed
100115

101-
- Fixed relative navigation.
116+
- Fixed relative navigation.
102117

103118
## [0.1.0] - 2023-06-16
104119

105120
### Added
106121

107-
- Automatically handle client-side history changes.
122+
- Automatically handle client-side history changes.
108123

109124
## [0.0.1] - 2023-05-10
110125

111126
### Added
112127

113-
- Add robust lint/testing.
114-
- Upgrade `reactpy`.
115-
- More robust routing with `starlette`.
116-
- Initial draft of router compiler.
128+
- Add robust lint/testing.
129+
- Upgrade `reactpy`.
130+
- More robust routing with `starlette`.
131+
- Initial draft of router compiler.
117132

118133
### Changed
119134

120-
- Rename `configure` to `create_router`.
121-
- Rename from `idom-router` to `reactpy-router`.
135+
- Rename `configure` to `create_router`.
136+
- Rename from `idom-router` to `reactpy-router`.
122137

123138
[Unreleased]: https://github.com/reactive-python/reactpy-router/compare/2.0.0...HEAD
124139
[2.0.0]: https://github.com/reactive-python/reactpy-router/compare/1.0.3...2.0.0

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# <img src="https://raw.githubusercontent.com/reactive-python/reactpy/main/branding/svg/reactpy-logo-square.svg" align="left" height="45"/> ReactPy Router
22

33
<p>
4-
<a href="https://github.com/reactive-python/reactpy-router/actions/workflows/test-python.yml">
5-
<img src="https://github.com/reactive-python/reactpy-router/actions/workflows/test-python.yml/badge.svg">
4+
<a href="https://github.com/reactive-python/reactpy-router/actions/workflows/check.yml">
5+
<img src="https://github.com/reactive-python/reactpy-router/actions/workflows/check.yml/badge.svg">
66
</a>
77
<a href="https://pypi.python.org/pypi/reactpy-router">
88
<img src="https://img.shields.io/pypi/v/reactpy-router.svg?label=PyPI">

docs/src/about/contributing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
If you plan to make code changes to this repository, you will need to install the following dependencies first:
44

55
- [Git](https://git-scm.com/downloads)
6-
- [Python 3.9+](https://www.python.org/downloads/)
6+
- [Python 3.11+](https://www.python.org/downloads/)
77
- [Hatch](https://hatch.pypa.io/latest/)
88
- [Bun](https://bun.sh/)
99

@@ -41,6 +41,7 @@ By utilizing `hatch`, the following commands are available to manage the develop
4141
| `hatch fmt --check` | Run all linters and formatters, but do not save fixes to the disk |
4242
| `hatch fmt --linter` | Run only linters |
4343
| `hatch fmt --formatter` | Run only formatters |
44+
| `hatch run javascript:build` | Manually re-build the JavaScript bundle |
4445
| `hatch run javascript:check` | Run the JavaScript linter/formatter |
4546
| `hatch run javascript:fix` | Run the JavaScript linter/formatter and write fixes to disk |
4647
| `hatch run python:type_check` | Run the Python type checker |

0 commit comments

Comments
 (0)