Fix addMissingDependency - #98588
Open
jimmyhmiller wants to merge 1 commit into
Open
Conversation
While before this change we had addMissingDependency, we didn't properly respond when the file for that missing dep was added. The way webpack does this internally is not the exact same shape as the IPC here, it has them as a separate field. I could not find any reason not to just add them to the filePaths here. So that's what I did to keep things simple.
Contributor
Failing test suitesCommit: 14b4a6d | About building and testing Next.js
Expand output● instant-nav-panel › SPA captures › should keep params and searchParams RSC content suspended for a captured SPA navigation |
| 'export const value = "created"' | ||
| ) | ||
|
|
||
| await waitFor(1000) |
Contributor
There was a problem hiding this comment.
is the sleep required... doesn't rendering block?
Member
There was a problem hiding this comment.
Do this instead:
await next.patchFile(
'utils/missing-dependency.ts',
'export const value = "created"',
async () => {
await retry(async () =>{
const $2 = await next.render$('/')
expect($2('p').text()).toContain('missing dependency: true')
})
})
Comment on lines
+554
to
+556
| const { missingDependencies } = result as typeof result & { | ||
| missingDependencies: string[] | ||
| } |
Contributor
There was a problem hiding this comment.
can't we jsut change the type declaration for RunLoaderResult?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
While before this change we had addMissingDependency, we didn't properly respond when the file for that missing dep was added.
The way webpack does this internally is not the exact same shape as the IPC here, it has them as a separate field. I could not find any reason not to just add them to the filePaths here. So that's what I did to keep things simple.