-
-
Notifications
You must be signed in to change notification settings - Fork 734
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
refactor(router-core): moving the router core into separate package #3171
base: main
Are you sure you want to change the base?
Conversation
1a7588d
to
780faf6
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
db357a7
to
644ae8b
Compare
View your CI Pipeline Execution ↗ for commit b6eafc7.
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/directive-functions-plugin
@tanstack/arktype-adapter
@tanstack/eslint-plugin-router
@tanstack/react-cross-context
@tanstack/history
@tanstack/react-router
@tanstack/create-router
@tanstack/react-router-with-query
@tanstack/router-cli
@tanstack/create-start
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/start
@tanstack/start-api-routes
@tanstack/start-client
@tanstack/start-config
@tanstack/start-plugin
@tanstack/start-router-manifest
@tanstack/start-server
@tanstack/start-server-functions-client
@tanstack/start-server-functions-fetcher
@tanstack/start-server-functions-handler
@tanstack/start-server-functions-server
@tanstack/start-server-functions-ssr
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
cf8a80c
to
fb5875e
Compare
I think basically we're facing a hoisting issue, similar to: |
This comment was marked as resolved.
This comment was marked as resolved.
a0a4c37
to
54bb266
Compare
As stated here:
Meaning that users can have partial types (the It's unlikely I'll find a better solution for hoisting a nested package than the Nuxt/UnJS team who deep dived this. The solutions I see here are basically to treat router-core not as a package, but just as a simple folder that's referenced or otherwise copied into the react-router/solid-router packages. Or alternatively, to duplicate this code for now, and abstract it out at next major release with a recommendation to install |
@birkskyum thanks for your work on this one. I've pushed this to the team for review and we should be able to merge tomorrow. In response to your comment above, we'll wait to see the common practice going forward since this pattern is currently in use by TanStack Table as well, so we'll be to apply whatever changes to the TanStack ecosystem as whole when the "correct" way has been figured out. |
Sounds good. And the CI just passed? Did the tsconfig change do the trick, making react-router a self-contained module/folder? or does it run fewer tests |
One of your commits prior to 538b8b9 did the trick. All that remains were eslint errors. |
This is a preparation step for:
solid-router
androuter-core
#3086It moves pieces of shared logic from react-router to router-core, and imports it from there.
The exports in react-router/src/index.tsx are kept as is, by re-exporting functions from router-core, to avoid breaking changes.