-
-
Notifications
You must be signed in to change notification settings - Fork 637
use v19.0.3 of react-on-rails-rsc as git dep #2197
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
Draft
AbanoubGhadban
wants to merge
26
commits into
master
Choose a base branch
from
upgrade-to-react-on-rails-rsc-v19.2.1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
424dd6c
use v19.0.3 of react-on-rails-rsc as git dep
AbanoubGhadban 641893e
upgrade to react 19.2.1
AbanoubGhadban 56fe358
make vm adds the global `performance` object to the vm context
AbanoubGhadban df3407b
linting
AbanoubGhadban 48a4510
add AbortController to the vm context
AbanoubGhadban 2a18b8e
revert this: make htmlStreaming.test.js fail to debug the error
AbanoubGhadban 4dfb0dc
revert this: log chunk
AbanoubGhadban ee9464f
log chunks size
AbanoubGhadban 5f64386
use buffer for received incomplete chunks
AbanoubGhadban 7764069
revert logging
AbanoubGhadban 8759ecd
linting
AbanoubGhadban 98c48f3
increase the time of the test that reproduce the react condole replay…
AbanoubGhadban 062cf51
increase delay at test
AbanoubGhadban 9ffaac2
add a check to ensure that the buggy component is rendered as expected
AbanoubGhadban 6faf912
add a check to ensure that the buggy component is rendered as expected
AbanoubGhadban 78f1770
revert this: run only the failing test on CI
AbanoubGhadban 0bd359b
revert this: rerun tests with the pnpm test script
AbanoubGhadban 1b8f55f
run all tests at serverRenderRSCReactComponent
AbanoubGhadban 9dee239
ENABLE_JEST_CONSOLE=y for jest tests
AbanoubGhadban f3f3fe1
bug investigation changes
AbanoubGhadban 6275fb4
trick
AbanoubGhadban 6af7949
Revert "trick"
AbanoubGhadban 1ae0f1d
revert all changes to reproduce the console leakage bug on CI
AbanoubGhadban 617e7c8
increase number of logged messages outside the component
AbanoubGhadban 2d00a85
make async quque waits for all chunks to be received
AbanoubGhadban e7e1c87
linting
AbanoubGhadban 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | ||
|---|---|---|---|---|
|
|
@@ -28,10 +28,7 @@ beforeEach(() => { | |||
|
|
||||
| afterEach(() => mock.restore()); | ||||
|
|
||||
| const AsyncQueueItem = async ({ | ||||
| asyncQueue, | ||||
| children, | ||||
| }: PropsWithChildren<{ asyncQueue: AsyncQueue<string> }>) => { | ||||
| const AsyncQueueItem = async ({ asyncQueue, children }: PropsWithChildren<{ asyncQueue: AsyncQueue }>) => { | ||||
| const value = await asyncQueue.dequeue(); | ||||
|
|
||||
| return ( | ||||
|
|
@@ -42,7 +39,7 @@ const AsyncQueueItem = async ({ | |||
| ); | ||||
| }; | ||||
|
|
||||
| const AsyncQueueContainer = ({ asyncQueue }: { asyncQueue: AsyncQueue<string> }) => { | ||||
| const AsyncQueueContainer = ({ asyncQueue }: { asyncQueue: AsyncQueue }) => { | ||||
| return ( | ||||
| <div> | ||||
| <h1>Async Queue</h1> | ||||
|
|
@@ -78,7 +75,7 @@ const renderComponent = (props: Record<string, unknown>) => { | |||
| }; | ||||
|
|
||||
| const createParallelRenders = (size: number) => { | ||||
| const asyncQueues = new Array(size).fill(null).map(() => new AsyncQueue<string>()); | ||||
| const asyncQueues = new Array(size).fill(null).map(() => new AsyncQueue()); | ||||
| const streams = asyncQueues.map((asyncQueue) => { | ||||
| return renderComponent({ asyncQueue }); | ||||
| }); | ||||
|
|
@@ -101,8 +98,8 @@ const createParallelRenders = (size: number) => { | |||
| }; | ||||
|
|
||||
| test('Renders concurrent rsc streams as single rsc stream', async () => { | ||||
| expect.assertions(258); | ||||
| const asyncQueue = new AsyncQueue<string>(); | ||||
| // expect.assertions(258); | ||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's delete, not uncomment.
Suggested change
|
||||
| const asyncQueue = new AsyncQueue(); | ||||
| const stream = renderComponent({ asyncQueue }); | ||||
| const reader = new StreamReader(stream); | ||||
|
|
||||
|
|
@@ -114,6 +111,7 @@ test('Renders concurrent rsc streams as single rsc stream', async () => { | |||
| expect(chunk).not.toContain('Random Value'); | ||||
|
|
||||
| asyncQueue.enqueue('Random Value1'); | ||||
|
|
||||
| chunk = await reader.nextChunk(); | ||||
| chunks.push(chunk); | ||||
| expect(chunk).toContain('Random Value1'); | ||||
|
|
||||
This file contains hidden or 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 hidden or 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 hidden or 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
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.
Strange we don't already have it somewhere, but apparently not.