Skip to content

Conversation

@schiller-manuel
Copy link
Contributor

@schiller-manuel schiller-manuel commented Oct 19, 2025

id may have a query param which was not accounted for

Summary by CodeRabbit

  • Chores
    • Simplified and consolidated internal file extension matching patterns for improved code maintainability.

id may have a query param which was not accounted for
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 19, 2025

Walkthrough

A single regex pattern in TRANSFORM_ID_REGEX within packages/start-plugin-core/src/constants.ts was consolidated from two separate patterns into one unified pattern that matches TypeScript, TSX, JavaScript, and JSX files with optional c/m prefixes.

Changes

Cohort / File(s) Summary
Consolidated Regex Pattern
packages/start-plugin-core/src/constants.ts
Merged TRANSFORM_ID_REGEX from two patterns (/\.[cm]?tsx?$/ and /\.[cm]?jsx?$/) into a single regex (/\.[cm]?[tj]sx?/) to unify TypeScript and JavaScript file extension matching.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Rationale: Single-file, single-line constant modification with straightforward logic consolidation. However, careful verification is warranted to confirm the regex behavior remains consistent and that the change applies correctly across all intended file extensions.

Possibly related PRs

Poem

🐰 One regex to rule them all,
TypeScript and JavaScript, standing tall!
From two patterns, now just one,
A tidy hop, and the job is done! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "fix: transform id regex" directly references the component being modified (TRANSFORM_ID_REGEX in constants.ts) and indicates that it's a fix to this regex pattern. The title is clear, specific, and sufficiently descriptive for a teammate scanning the history to understand that this change addresses a regex fix for transform IDs. The title is concise and avoids vague terminology or noise, and it accurately reflects the primary technical change in the changeset, which is the consolidation and modification of the regex patterns.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-regex

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 788ad2d and 4ab58f2.

📒 Files selected for processing (1)
  • packages/start-plugin-core/src/constants.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/start-plugin-core/src/constants.ts
packages/{*-start,start-*}/**

📄 CodeRabbit inference engine (AGENTS.md)

Name and place Start framework packages under packages/-start/ or packages/start-/

Files:

  • packages/start-plugin-core/src/constants.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Preview
  • GitHub Check: Test
🔇 Additional comments (1)
packages/start-plugin-core/src/constants.ts (1)

22-22: Anchor removal is correct for the intended purpose; false positive concern is theoretical but impractical.

The removal of the $ anchor from TRANSFORM_ID_REGEX is justified because the pattern is used directly in the Vite plugin filter without being wrapped in makeIdFiltersToMatchWithQuery (which would normally handle query parameter matching). The new pattern /\.[cm]?[tj]sx?/ correctly matches file extensions followed by query parameters (e.g., /path/to/file.ts?v=hash).

While theoretically the pattern could match extensions in the middle of a path (e.g., file.ts.backup), this is not a realistic concern in actual Vite usage, where module IDs follow standard filesystem path patterns. Vite module IDs don't contain compound extensions like .ts.backup in the middle of paths.

The change aligns with the PR description's goal of supporting query parameters in transform filters.


Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link

nx-cloud bot commented Oct 19, 2025

View your CI Pipeline Execution ↗ for commit 4ab58f2

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

☁️ Nx Cloud last updated this comment at 2025-10-19 20:33:21 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 19, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5539

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5539

@tanstack/eslint-plugin-router

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

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5539

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5539

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5539

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5539

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5539

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5539

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5539

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5539

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5539

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5539

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5539

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5539

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5539

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5539

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5539

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5539

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5539

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5539

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5539

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5539

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5539

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5539

commit: 4ab58f2

@schiller-manuel schiller-manuel merged commit 5b6109b into main Oct 19, 2025
6 checks passed
@schiller-manuel schiller-manuel deleted the fix-regex branch October 19, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants