-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
refactor(dev/vite): use @remix-run/node-fetch-server
#13927
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: dev
Are you sure you want to change the base?
refactor(dev/vite): use @remix-run/node-fetch-server
#13927
Conversation
|
8dd2bfe
to
45d0716
Compare
45d0716
to
232d15d
Compare
Thanks for the detailed overview! I'm in favor of simplifying this down if @pcattori and/or @markdalgleish are 👍
|
@mjackson/node-fetch-server
@remix-run/node-fetch-server
f0fadbd
to
5ec5537
Compare
5ec5537
to
73fc2c9
Compare
73fc2c9
to
0893a91
Compare
0893a91
to
04f06f0
Compare
@brophdawg11 Now that remix-run/remix#10726 is merged and released, the only thing that we still need is 6️⃣ I guess? |
It looks like (6) is not an issue in node-fetch-server because it's using Does that mean this would be ready to merge then? Note: |
@brophdawg11 If we can ignore 6️⃣, this PR indeed is ready to be merged I think |
I guess technically we'd lose support for |
ok, that's merged so I think this should be good. I'll try to take a closer glance at the code and do some testing locally and get it merged in the next couple days. Thanks again for the detailed research into this one! |
@brophdawg11 remix-run/remix#10745 isn't released (yet) though, so I don't know if you want to wait for the release or not? |
@acusti mentioned in #12774 (comment) that
@mjackson/node-fetch-server
@remix-run/node-fetch-server
could be used as a drop-in replacement for the currentnode-adapter.ts
fileThis started my journey and I came to the following history of the file:
Since this is not really supported by
@mjackson/node-fetch-server
@remix-run/node-fetch-server
, I kept the small wrapper.@mjackson if a custom basename would be supported in the lib, then I probably looked over it, so please point me towards the correct docs
If it's not (yet) available in the lib and you would like to somehow support it, I'm happy to help out with a PR
@mjackson I created fix(node-fetch-server): fix logic for aborting requests remix#10726 to do the same in
@mjackson/node-fetch-server
@remix-run/node-fetch-server
:
increateHeaders
https://github.com/remix-run/remix/blob/51fcb653252b48d47c32b0959d245a0400b818ac/packages/node-fetch-server/src/lib/request-listener.ts#L180
sendResponse
(yet).@mjackson if it would be supported in the lib, then I probably looked over it, so please point me towards the correct docs
If it's not (yet) available in the lib and you would like to somehow support it, I'm happy to help out with a PR
https
protocol in dev mode #13746 (resubmission of fix(dev): detect https protocol remix#10199) is already handled increateRequest
https://github.com/remix-run/remix/blob/51fcb653252b48d47c32b0959d245a0400b818ac/packages/node-fetch-server/src/lib/request-listener.ts#L139-L140
@mjackson I just created refactor(node-fetch-server): add type-safety to
socket
check increateRequest
remix#10695 to make it a bit more type-safeSo it seems like once remix-run/remix#10726 is merged (and released) and 2️⃣ & 6️⃣ have more clarity, we can indeed just replace the current
node-adapter.ts
file with@mjackson/node-fetch-server
@remix-run/node-fetch-server
.Added benefit here is that we don't need to rely on
set-cookie-parser
anymore and we now rely on a lib that's going to be part of Remix v3 anywaysI'm sure people from the wider @e18e ecosystem cleanup (like @43081j, @benmccann & @outslept) will be very happy to see these kind of changes as well