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

Move @tanstack/router-devtools to @tanstack/react-router-devtools #3083

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

Conversation

birkskyum
Copy link

@birkskyum birkskyum commented Dec 27, 2024

The current router-devtools package is specific to react.

This PR moves the react devtools to react-router-devtools, allowing for addition of e.g. solid-router-devtools, and for collection of shared functions in an agnostic core devtools package to the extend it makes sense in this context.

Since the @tanstack/react-router-devtools isn't published, this PR doesn't change the docs (.md files) or the examples/* folder which rely on specific published versions (rather than workspace packages)

@birkskyum birkskyum force-pushed the react-router-devtools branch from 01498d0 to 6efa18e Compare December 27, 2024 15:19
Copy link

nx-cloud bot commented Dec 27, 2024

View your CI Pipeline Execution ↗ for commit 95a6e02.

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 4m 52s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1m 8s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-27 19:48:10 UTC

@schiller-manuel
Copy link
Contributor

we would need to still have router-devtools package as an almost empty shell so people can continue to use it (and then deprecate it once we have react-router-devtools in place). we did the same for the router vite plugin

Copy link

pkg-pr-new bot commented Dec 27, 2024

Open in Stackblitz

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@3083

@tanstack/create-router

npm i https://pkg.pr.new/@tanstack/create-router@3083

@tanstack/create-start

npm i https://pkg.pr.new/@tanstack/create-start@3083

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@3083

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@3083

@tanstack/react-cross-context

npm i https://pkg.pr.new/@tanstack/react-cross-context@3083

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@3083

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@3083

@tanstack/react-router-with-query

npm i https://pkg.pr.new/@tanstack/react-router-with-query@3083

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@3083

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@3083

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@3083

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@3083

@tanstack/start

npm i https://pkg.pr.new/@tanstack/start@3083

@tanstack/start-vite-plugin

npm i https://pkg.pr.new/@tanstack/start-vite-plugin@3083

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@3083

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@3083

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@3083

commit: 95a6e02

Copy link
Member

@SeanCassiere SeanCassiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may not be the best approach here. At the moment, this would be a 'no-go' since it'd break people currently using the @tanstack/router-devtools package with no fallback.


As a whole, however, it'd be worth asking @ardeora on his thoughts here, since there's potential for following Query's approach for the devtools as a whole.

If done so, we could have the following package structure, which I believe would be the better approach here.

  • router-devtools-core
  • react-router-devtools
  • router-devtools (proxies everything from react-router-devtools with a console warning asking them to switch packages and commitment that'd we'd drop this package in v2)

@schiller-manuel
Copy link
Contributor

schiller-manuel commented Dec 27, 2024

while we are at restructuring, we should also keep in mind start's devtools (hopefully coming soon @ardeora :) )

@birkskyum birkskyum force-pushed the react-router-devtools branch from 36aa907 to 4ddc603 Compare December 28, 2024 02:26
@birkskyum
Copy link
Author

birkskyum commented Dec 28, 2024

I have added a router-devtools package which is a re-export of react-router-devtools, and there's a console warning that suggests to move to the new package.

To make sure nothing is broken by this change, the router-devtools is kept in the /e2e and /examples

@SeanCassiere SeanCassiere requested a review from ardeora December 29, 2024 09:46
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.

3 participants