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

add util for handling remix headers generally #810

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nichtsam
Copy link
Contributor

@nichtsam nichtsam commented Aug 3, 2024

It's a bit tedious to manually merge Remix headers since the process is mostly the same.
This PR adds a utility to streamline that process.

Related Discussion #809
More details on the utility: https://gist.github.com/nichtsam/bff3a0e58f7edfad3985e9322582f67f

Test Plan

  • There are test cases for various functionalities.
  • Test cases with real use cases ensure the utility remains practical.

Checklist

  • Tests updated
  • Docs updated

@nichtsam nichtsam force-pushed the pr/general-headers-util branch from 0d4fdfd to 6c36dca Compare August 3, 2024 14:39
@nichtsam nichtsam marked this pull request as draft August 3, 2024 14:41
@nichtsam
Copy link
Contributor Author

nichtsam commented Aug 3, 2024

Just for the record, reason for switching to draft: privatenumber/tsx#627
This is affecting vite and causing imports behavior to differentiate between tsx and node.

@nichtsam nichtsam force-pushed the pr/general-headers-util branch 2 times, most recently from f9f6ccf to 6fae52e Compare December 4, 2024 17:02
@nichtsam
Copy link
Contributor Author

nichtsam commented Dec 4, 2024

Just for the record, reason for switching to draft: privatenumber/tsx#627 This is affecting vite and causing imports behavior to differentiate between tsx and node.

I switch to another ESM cache-control parser to avoid encountering this issue.

@nichtsam nichtsam marked this pull request as ready for review December 4, 2024 17:06
@nichtsam nichtsam force-pushed the pr/general-headers-util branch from 6fae52e to f8356fd Compare December 4, 2024 17:09
@nichtsam nichtsam force-pushed the pr/general-headers-util branch from f8356fd to 161d544 Compare December 4, 2024 17:13
@kentcdodds
Copy link
Member

I think React Router v7 (single fetch specifically) changes how headers work a fair bit so I don't think I'll be merging this since I want to get on RR7 soon. Sorry I didn't get to you on this sooner!

@nichtsam
Copy link
Contributor Author

nichtsam commented Dec 7, 2024

I think React Router v7 (single fetch specifically) changes how headers work a fair bit so I don't think I'll be merging this since I want to get on RR7 soon. Sorry I didn't get to you on this sooner!

That’s totally fine! I was also thinking that single fetch might impact things.
Just wanted to finish up the PR. No worries, and thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants