-
Notifications
You must be signed in to change notification settings - Fork 1k
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
chore(server-store): Alias imports for getting request details to @redwoodjs/web/request
#10904
Conversation
@@ -37,6 +37,11 @@ | |||
"types": "./dist/components/ServerInject.d.ts", | |||
"default": "./dist/components/ServerInject.js" | |||
}, | |||
"./request": { | |||
"require": "./dist/cjs/server/request.js", |
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.
We need this so that typescript doesn't complain in projects, but in reality the CJS version should never be used.
Pausing this. Discussing with Tobbe about naming options |
…rt-serverStore * 'main' of github.com:redwoodjs/redwood: chore(comment): Remove comment that's wrong (redwoodjs#10912) chore(esm): Fix project-config dual packaging (redwoodjs#10901) RSC: dbAuth in kitchen-sink (redwoodjs#10907) RSC: No need to pass location to Router anymore (redwoodjs#10905) RSC: Make `rw g page` work for RSC projects (redwoodjs#10903) Updates document template to use exports field for htmlTags (redwoodjs#10902)
… into feat/re-export-serverStore * 'feat/re-export-serverStore' of github.com:dac09/redwood:
Discussed and agreed with Tobbe to keep this convention, we can adjust the export name i.e. |
Pull Request is not mergeable
…iddleware * 'main' of github.com:redwoodjs/redwood: chore(server-store): Alias imports for getting request details to `@redwoodjs/web/request` (redwoodjs#10904) chore(ci): Cleaner log when publishing, unless failure (redwoodjs#10919) chore(tests): Fix failing kitchen-sink tests by logging in (redwoodjs#10920) fix(internal gql): Update types in test fixture (redwoodjs#10918) debug(ci): Print publishing command output (redwoodjs#10916) chore(ci): Use more supported syntax in publish_canary script (redwoodjs#10915) chore(ci): Exit canary publishing if version cannot be determined (redwoodjs#10914)
This allows users to import their request details from a logical path:
I think this makes much more sense than server-store, which is an internal implementation detail.
Note: I noticed that we're not getting request headers and request cookies when I try to print them on screen
The behaviour here doesn't seem related to the changes in the PR, as it's the same if I directly import from
@redwoodjs/server-store
.