Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react-router): generic router history #2782

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

matthiasschwarz
Copy link
Contributor

Changes type of history in router to a generic type parameter to support advanced use cases like providing an own implementation of a RouterHistory or to enchance a specific RouterHistory with additional features.

Copy link

nx-cloud bot commented Nov 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit cd3787e. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx affected --targets=test:eslint,test:unit,test:e2e,test:types,test:build,build --parallel=3
✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link

pkg-pr-new bot commented Nov 16, 2024

Open in Stackblitz

More templates

@tanstack/arktype-adapter

pnpm add https://pkg.pr.new/@tanstack/arktype-adapter@2782

@tanstack/create-router

pnpm add https://pkg.pr.new/@tanstack/create-router@2782

@tanstack/history

pnpm add https://pkg.pr.new/@tanstack/history@2782

@tanstack/eslint-plugin-router

pnpm add https://pkg.pr.new/@tanstack/eslint-plugin-router@2782

@tanstack/react-cross-context

pnpm add https://pkg.pr.new/@tanstack/react-cross-context@2782

@tanstack/react-router

pnpm add https://pkg.pr.new/@tanstack/react-router@2782

@tanstack/react-router-with-query

pnpm add https://pkg.pr.new/@tanstack/react-router-with-query@2782

@tanstack/router-cli

pnpm add https://pkg.pr.new/@tanstack/router-cli@2782

@tanstack/router-devtools

pnpm add https://pkg.pr.new/@tanstack/router-devtools@2782

@tanstack/router-generator

pnpm add https://pkg.pr.new/@tanstack/router-generator@2782

@tanstack/router-plugin

pnpm add https://pkg.pr.new/@tanstack/router-plugin@2782

@tanstack/router-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/router-vite-plugin@2782

@tanstack/start

pnpm add https://pkg.pr.new/@tanstack/start@2782

@tanstack/start-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/start-vite-plugin@2782

@tanstack/valibot-adapter

pnpm add https://pkg.pr.new/@tanstack/valibot-adapter@2782

@tanstack/virtual-file-routes

pnpm add https://pkg.pr.new/@tanstack/virtual-file-routes@2782

@tanstack/zod-adapter

pnpm add https://pkg.pr.new/@tanstack/zod-adapter@2782

commit: cd3787e

@schiller-manuel
Copy link
Contributor

thanks for the contibution!

please have a look at the build failures and fix those.
please also add a type test (e.g. in packages/react-router/tests/router.test-d.tsx)

@matthiasschwarz
Copy link
Contributor Author

thanks for the contibution!

please have a look at the build failures and fix those. please also add a type test (e.g. in packages/react-router/tests/router.test-d.tsx)

  • Fixed the build issues of the monorepo examples. This is a breaking change though since it was required to add @tanstack/history as dependency for the build typescript declarations of the router packages. I'm not sure if this is the correct way to handle that issue.
  • The e2e tasks that are still failing are running successfully on my machine.
  • Added tests for the history type of the router.

@schiller-manuel
Copy link
Contributor

@chorobin please have a look about the type changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants