-
-
Notifications
You must be signed in to change notification settings - Fork 28
feat: server middleware #515
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
|
74bc896 to
79205e7
Compare
…s in the examples Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
6628524 to
1c069f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates and refactors middleware integration and dependency handling for the remix-fastify package and its examples. Key changes include removing the middleware bundle entry and associated files, updating react-router types and context handling, and revising dependency updates in the pnpmfile.
- Removed middleware entry and related files from the remix-fastify package.
- Updated type definitions and context management for react-router integration.
- Enhanced dependency resolution in .pnpmfile.cjs for examples using remix-related packages.
Reviewed Changes
Copilot reviewed 16 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/remix-fastify/tsup.config.ts | Removed middleware entry from build and updated re-export paths. |
| packages/remix-fastify/src/shared.ts | Removed an unused import from react-router. |
| packages/remix-fastify/src/react-router.ts | Updated type definitions for the load context with conditional types. |
| packages/remix-fastify/src/middleware.ts | Removed middleware file as it is no longer used. |
| packages/remix-fastify/middleware.{js, d.cts, cjs} | Removed legacy middleware export files. |
| examples/react-router/vite.config.ts | Simplified plugin configuration for react-router usage. |
| examples/react-router/server.ts | Updated plugin registration with a getLoadContext option. |
| examples/react-router/react-router.config.ts | Added configuration for enabling unstable middleware. |
| examples/react-router/context.ts | Added a new context creation file with default adapter context. |
| examples/react-router/app/root.tsx | Updated context usage and middleware configuration in the app root. |
| .pnpmfile.cjs | Revised dependency resolution to update remix-related dependencies. |
Files not reviewed (7)
- examples/basic/package.json: Language not supported
- examples/basic/tsconfig.json: Language not supported
- examples/playground/package.json: Language not supported
- examples/react-router/package.json: Language not supported
- examples/react-router/tsconfig.json: Language not supported
- examples/vite/package.json: Language not supported
- package.json: Language not supported
Comments suppressed due to low confidence (1)
examples/react-router/context.ts:8
- [nitpick] The default value 'lol default value' might be too informal for production. Consider updating it to a more descriptive and professional string.
session: "lol default value",
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
More templates
commit: |
|
Hi, thanks for getting onto this quickly. Had no issue with the react-router side of it, but I've observed no effect from getLoadContext under the current implementation and double checking against the 7.3 patch notes too. I have been able to pass other things through such as Symbols, and retrieve them, so this works. Obviously this isn't the context, or the correct implemtation, but essentially to prove it passes through. |
do you have the required lines for typescript in your react router config? can you provide a minimal reproduction repo just to be safe? |
|
I've tried this PR as is. Cloned the PR bot template, so its as is, are you saying it works for you? |
yep, aside from the one |
|
i'll look into some more this evening. here im required to add an initial value, but in an express app im not |
…pmfile Signed-off-by: Logan McAnsh <logan@mcan.sh>
45e753a to
b80fe2c
Compare
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Deletes the PostCSS configuration file as it is no longer needed. Cleans up the project by removing unnecessary files. Signed-off-by: Logan McAnsh <logan@mcan.sh>
…pmfile Signed-off-by: Logan McAnsh <logan@mcan.sh> (cherry picked from commit b80fe2c) Signed-off-by: Logan McAnsh <logan@mcan.sh>

closes #514