-
Notifications
You must be signed in to change notification settings - Fork 708
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(render): Use renderToPipeableStream
instead of renderToStaticNodeStream
#1443
Merged
gabrielmfern
merged 8 commits into
canary
from
chore/update-render-async-to-use-pipeable-stream
May 13, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0edbb13
chore(render): Use `renderToPipeableStream` instead of `renderToStati…
gabrielmfern 858c106
chore: get the Writable from the default export of node:stream
gabrielmfern dd6e991
chore: only pipe the stream once the allReady callback is called
gabrielmfern eec55d6
chore: Add unit test to ensure Suspense boundaries resolve on Node en…
gabrielmfern f7ed019
chore: update lock
gabrielmfern 6d07583
chore: Format
gabrielmfern 97d0aef
chore(render): Fix linting errors
gabrielmfern bbcd5d3
chore(render): Remove obsolete testing snapshot
gabrielmfern File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
packages/render/src/__snapshots__/render-async-node.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`renderAsync on node environments > that it properly waits for Suepsense boundaries to resolve before resolving 1`] = ` | ||
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><div><!doctype html> | ||
<html> | ||
<head> | ||
<title>Example Domain</title> | ||
|
||
<meta charset="utf-8" /> | ||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<style type="text/css"> | ||
body { | ||
background-color: #f0f0f2; | ||
margin: 0; | ||
padding: 0; | ||
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
|
||
} | ||
div { | ||
width: 600px; | ||
margin: 5em auto; | ||
padding: 2em; | ||
background-color: #fdfdff; | ||
border-radius: 0.5em; | ||
box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02); | ||
} | ||
a:link, a:visited { | ||
color: #38488f; | ||
text-decoration: none; | ||
} | ||
@media (max-width: 700px) { | ||
div { | ||
margin: 0 auto; | ||
width: auto; | ||
} | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div> | ||
<h1>Example Domain</h1> | ||
<p>This domain is for use in illustrative examples in documents. You may use this | ||
domain in literature without prior coordination or asking for permission.</p> | ||
<p><a href="https://www.iana.org/domains/example">More information...</a></p> | ||
</div> | ||
</body> | ||
</html> | ||
</div><!--/$-->" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
When this gets compiled to a require statement by the build, I get the following in my native ESM project:
All server-side JavaScript environment support dynamic imports. Could we not transpile the dynamic import?