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

chore(server-store): Alias imports for getting request details to @redwoodjs/web/request #10904

Merged
merged 7 commits into from
Jul 6, 2024

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Jul 2, 2024

This allows users to import their request details from a logical path:

import { getRequestHeaders } from '@redwoodjs/web/request'

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.

@dac09 dac09 added the release:chore This PR is a chore (means nothing for users) label Jul 2, 2024
@dac09 dac09 added this to the RSC milestone Jul 2, 2024
@@ -37,6 +37,11 @@
"types": "./dist/components/ServerInject.d.ts",
"default": "./dist/components/ServerInject.js"
},
"./request": {
"require": "./dist/cjs/server/request.js",
Copy link
Collaborator Author

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.

@dac09 dac09 marked this pull request as draft July 3, 2024 11:00
@dac09
Copy link
Collaborator Author

dac09 commented Jul 3, 2024

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)
@dac09 dac09 marked this pull request as ready for review July 4, 2024 23:36
… into feat/re-export-serverStore

* 'feat/re-export-serverStore' of github.com:dac09/redwood:
@dac09
Copy link
Collaborator Author

dac09 commented Jul 4, 2024

Discussed and agreed with Tobbe to keep this convention, we can adjust the export name i.e. /request.

@dac09 dac09 enabled auto-merge (squash) July 4, 2024 23:37
auto-merge was automatically disabled July 5, 2024 19:56

Pull Request is not mergeable

@dac09 dac09 merged commit 32d9b63 into redwoodjs:main Jul 6, 2024
51 checks passed
dac09 pushed a commit to dac09/redwood that referenced this pull request Jul 6, 2024
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:chore This PR is a chore (means nothing for users)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants