fix: revert plugin changes, allow createMiddleware self compilation, fix HMR tests#7396
fix: revert plugin changes, allow createMiddleware self compilation, fix HMR tests#7396Sheraff wants to merge 3 commits into
Conversation
|
View your CI Pipeline Execution ↗ for commit 2bd877c
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview42 package(s) bumped directly, 0 bumped as dependents. 🟨 Minor bumps
|
Bundle Size Benchmarks
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud is proposing a fix for your failed CI:
We fixed two ESLint failures in @tanstack/start-client-core: the unnecessary type assertion on ctx in createCsrfMiddleware.ts (introduced when the parameter was widened to any) was removed, and the import order in hydrateStart.ts was corrected so that regular and relative imports precede the #-prefixed internal module imports. These changes bring the package into compliance with the project's no-unnecessary-type-assertion and import/order lint rules without altering any runtime behaviour.
Warning
❌ We could not verify this fix.
Suggested Fix changes
diff --git a/packages/start-client-core/src/client/hydrateStart.ts b/packages/start-client-core/src/client/hydrateStart.ts
index 206b7050..5ac46558 100644
--- a/packages/start-client-core/src/client/hydrateStart.ts
+++ b/packages/start-client-core/src/client/hydrateStart.ts
@@ -1,4 +1,7 @@
import { hydrate } from '@tanstack/router-core/ssr/client'
+import { ServerFunctionSerializationAdapter } from './ServerFunctionSerializationAdapter'
+import type { AnyRouter, AnySerializationAdapter } from '@tanstack/router-core'
+import type { AnyStartInstanceOptions } from '../createStart'
import { startInstance } from '#tanstack-start-entry'
import {
@@ -6,9 +9,6 @@ import {
pluginSerializationAdapters,
} from '#tanstack-start-plugin-adapters'
import { getRouter } from '#tanstack-router-entry'
-import { ServerFunctionSerializationAdapter } from './ServerFunctionSerializationAdapter'
-import type { AnyRouter, AnySerializationAdapter } from '@tanstack/router-core'
-import type { AnyStartInstanceOptions } from '../createStart'
export async function hydrateStart(): Promise<AnyRouter> {
const router = await getRouter()
diff --git a/packages/start-client-core/src/createCsrfMiddleware.ts b/packages/start-client-core/src/createCsrfMiddleware.ts
index 8bc4c90a..9c6864a1 100644
--- a/packages/start-client-core/src/createCsrfMiddleware.ts
+++ b/packages/start-client-core/src/createCsrfMiddleware.ts
@@ -78,7 +78,7 @@ type CreateCsrfMiddleware = <TRegister, TMiddlewares>(
const innerCreateCsrfMiddleware = ((opts: any = {}) => {
const middleware = createMiddleware().server(async (ctx: any) => {
- const csrfCtx = ctx as RequestServerOptions<any, any> & typeof ctx
+ const csrfCtx = ctx
if (opts.filter && !(await opts.filter(csrfCtx))) {
return ctx.next()
Or Apply changes locally with:
npx nx-cloud apply-locally 85j2-RH3a
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
No description provided.