* feat: setup the starter for an rspack integration
* refactor(router-plugin): compose the plugins toghether
* feat(router-plugin): initial export for rspack
* docs(examples): add the quickstart-file-based pages in
* feat(router-plugin): generator should generate the route-tree on startup
* feat(examples): use the route-tree
* feat(router-plugin): router-generator working
* feat(router-plugin): rspack support only for the generator
* refactor(router-plugin): make the rspack exports a bit cleaner
* chore(router-plugin): jsdocs for the vite plugin
* docs(router-plugin): update with references and mentions to rspack/rsbuild
* style(router-plugin): eslint import ordering 😭
* perf(react-router): remove router context from every route apart from the root
From my understanding, TRouterContext is only relevant to the RootRoute and is not relevant to each route
* perf: remove TParentRoute from file route options, infer lazily from parent and fix merging of context in beforeLoad/loader
* tests: add type tests for root route merging of context and buildLocation
* tests: add more tests and cleanup
* Add test case for linking with from prop and a param containing slash
* Remove .only from test
* fix: encode pathname in match
* refactor: move encoded params to interpolatePath
---------
Co-authored-by: Jakob Norlin <jakob.stahl91@gmail.com>
Co-authored-by: chorobin <chrishorobin@hotmail.com>
* docs: update the file-based routing guide
* docs: update the quick-start guide
* docs: update the migrate from react-location guide
* docs: more updates to the migration from react-location guide
* docs: update the code-splitting guide
* docs: update the routing concepts guide
* docs: broken link on the code-splitting guide
* chore: this route-tree has not been generated
* chore: remove tests
* refactor(router-plugin): export configSchema
* refactor(start): use the exports from router-plugin
* refactor(router-vite-plugin): just a proxy doing exports
* fix(router-plugin): do not perform code-splitting unless perms are given
* fix(router-plugin): package.json fields causing issues during imports
* fix: make the inlineConfig optional
* chore: trigger ci
* chore: try ci again
* chore: add a better readme
* test: just something to trigger CI honestly
* feat: scaffold the new `@tanstack/router-plugin` package
* chore: include in the overrides
* feat: more scaffolding
* test: just a random test that'll be removed later
* build: hopefully fixes build
* style: import order
* chore: peer deps for router-plugin
* feat: setup the generator
* refactor: combined needs to be done for the individual plugin
* chore: copy all the babel stuff over from router-vite-plugin
* feat: copy the babel plugin setup from router-plugin
* feat: enfore pre
* refactor: turn the error into its own custom one
* style: eslint
* style: more eslint
* chore: update the readme
* refactor: remove start logic
* refactor: use `@tanstack/start-vite-plugin` in `@tanstack/start`
* chore: trigger ci
* chore: remove this
* try that again
* ...
* maybe
* interrupt
* chore: remove this
* copy the router-vite-plugin into start-vite-plugin
* test: remove the tests we dont need
* export config-name from generator
* undo that last one
* reduce this down
* eliminate the router logic
* undo the touches to the generator and cli
* move this down here
* eslint
* chore: remove deps that are not needed
* test: test for createServerFn being renamed during the destructured import
* fix: handle destructured rename case
* test: handle star imports
* chore: push
* chore: remove this
* fix: redirect with relative path
* tests(react-router): add test for redirect with `from` and fix existing test
* tests: add beforeLoad test with redirect with `from`
* tests: remove leading slashes
---------
Co-authored-by: chorobin <chrishorobin@hotmail.com>
Wrap identifiers/call expressions that are passed as the 2nd parameter
to createServerFn with a function expression whose body is prepended
with the "use server" directive.
This allows for functions that are passed to createServerFn to be
wrapped with other functions that server as middleware.
router-vite-plugin/tests/test-files/createServerFn.tsx has a Zod
middleware function example which has the "use server" directive
properly prepended.
* test(react-router): adjust the test names to accomodate the on-navigate stuff
* test(react-router): breaking route context
* test(react-router): test cases for redirects breaking
* test(react-router): use a bit more sleep
* test(react-router): a bit clearer on whats being tested
* test(react-router): check the `window.location.pathname` in the tests
* fix(react-router): a single test is now working, dont know what that means
* test: make sure StrictMode is ON
* test(react-router): this is no longer needed since we are doing this in routeContext.test.tsx
* test(react-router): confirm StrictMode on
* test(react-router): adjust the test names to accomodate the on-navigate stuff
* test(react-router): breaking route context
* test(react-router): test cases for redirects breaking
* test(react-router): use a bit more sleep
* test(react-router): a bit clearer on whats being tested
* test(react-router): check the `window.location.pathname` in the tests
* fix(react-router): a single test is now working, dont know what that means
* test: make sure StrictMode is ON
* test(react-router): this is no longer needed since we are doing this in routeContext.test.tsx
* test(react-router): confirm StrictMode on
* test: wrap fireEvent calls in `act`
* chore: readability
* fix: i dont know why, but this fixes the tests
* test: turn these back on
* fix: lets not change too much
* fix: bit closer to what it was before
* chore: not over updating
reducing the updates like @freshgiammi PR
* test(react-router): route context breaking for layout routes
* test(react-router): cases testing route context in layout routes for `beforeLoad`, `loader`, and `useRouteContext`
* chore: use the useRouteContext hook from the route definition
* chore: mistake in the test
* test: wrap the render calls in `act`
* test: wrap createRouter in `act`
* test: remove magic sleeps
* test: nested routes
* test: loaders
* test: failing tests for the loaders
* test: react strictmode for loaders
* test: dont use `waitFor` rather wait for elements in the DOM
* test: more async-work delayed checking of route context
* test: add an invalidate call after
* fix: remove the recursive `this.load()` call
The patch implemented by @freshgiammi in #1662
Co-Authored-By: Gianmarco Rengucci <16855748+freshgiammi@users.noreply.github.com>
* refactor: restore the `checkLatest()` call here
* test: remove these tests for routeContext in redirects
---------
Co-authored-by: Gianmarco Rengucci <16855748+freshgiammi@users.noreply.github.com>