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

fix(router-generator): reset route-group Regex when calling handleNode #3289

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

SeanCassiere
Copy link
Member

@SeanCassiere SeanCassiere commented Jan 31, 2025

This was a weird one 🤔.

Since the Regex we use for checking if a "route-node" is a possible "route-group" uses the global flag, it carries some state across runs. As such, it falsly returned false (instead of true) on some nodes that were in fact representing a "route-group".

Closes #3280

Copy link

nx-cloud bot commented Jan 31, 2025

View your CI Pipeline Execution ↗ for commit 5a8b7e6.

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 2m 13s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-31 05:22:23 UTC

Copy link

pkg-pr-new bot commented Jan 31, 2025

Open in Stackblitz

More templates

@tanstack/arktype-adapter

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

@tanstack/create-router

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

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/@tanstack/directive-functions-plugin@3289

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/create-start

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

@tanstack/react-cross-context

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

@tanstack/react-router

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

@tanstack/react-router-with-query

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

@tanstack/router-cli

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

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@3289

@tanstack/router-devtools

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@3289

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/@tanstack/server-functions-plugin@3289

@tanstack/start

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

@tanstack/start-api-routes

npm i https://pkg.pr.new/@tanstack/start-api-routes@3289

@tanstack/start-config

npm i https://pkg.pr.new/@tanstack/start-config@3289

@tanstack/start-client

npm i https://pkg.pr.new/@tanstack/start-client@3289

@tanstack/start-plugin

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

@tanstack/start-router-manifest

npm i https://pkg.pr.new/@tanstack/start-router-manifest@3289

@tanstack/start-server

npm i https://pkg.pr.new/@tanstack/start-server@3289

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/@tanstack/start-server-functions-client@3289

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/@tanstack/start-server-functions-fetcher@3289

@tanstack/start-server-functions-handler

npm i https://pkg.pr.new/@tanstack/start-server-functions-handler@3289

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/@tanstack/start-server-functions-server@3289

@tanstack/start-server-functions-ssr

npm i https://pkg.pr.new/@tanstack/start-server-functions-ssr@3289

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: 5a8b7e6

@SeanCassiere SeanCassiere marked this pull request as ready for review January 31, 2025 04:56
@SeanCassiere SeanCassiere merged commit e939220 into main Jan 31, 2025
5 checks passed
@SeanCassiere SeanCassiere deleted the fix/router-generator-pathing-on-route-groups branch January 31, 2025 05:49
@FatahChan
Copy link

FatahChan commented Jan 31, 2025

@SeanCassiere thank you so much, that was relatively was quick, I was hesitant to open an issue, I thought, there was something I didn't grasp yet

@SeanCassiere
Copy link
Member Author

@SeanCassiere thank you so much, that was relatively was quick, I was hesitant to open an issue, I thought, there was something I didn't grasp yet

It was certainly a weird one 😅

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.

"/" goes to an empty page, instead of index.tsx
2 participants