-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Consolidate Server and Routing process into one process #53523
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
ba3d6d6
Remove unused types
timneutkens 56c8daf
Remove useWorkers option (simplifying implementation)
timneutkens f8f0954
Don't create separate router worker, use the main process
timneutkens 8afa284
Remove sockets variable as server.close() already handlers it.
timneutkens c3a7663
Don't use underscore for used variables
timneutkens edb494c
Only initialize workers once.
timneutkens 18007e7
Fix typescript errors
timneutkens 176f7f7
Fix type mismatches
timneutkens 2c790d4
Bring back compression
timneutkens a03d642
Fix socket connection with custom server
timneutkens 47e0059
Use fixture for test
timneutkens b563a8d
WIP rework config file watching in dev
timneutkens 968b253
Reboot on config file changes
timneutkens 5c84094
Handle case where cleanup throws
timneutkens a46589e
Remove unused initializer
timneutkens 4c097e1
Reset test
timneutkens c6cc0a0
Use temporary redirect for test otherwise the browser caches it.
timneutkens da891b9
Ensure watcher is attached before booting server so that immediate ch…
timneutkens 50e66f2
Merge branch 'canary' into fix/investigate-memory-usage
timneutkens 828847d
Disable project delete test
timneutkens 74bd66d
Merge branch 'canary' into fix/investigate-memory-usage
timneutkens 342cae0
Merge branch 'fix/investigate-memory-usage' of https://github.com/ver…
timneutkens 71afe95
Update undefined-webpack-config to be more reliable
timneutkens 9fad9dc
Explain checking for nextDev
timneutkens 51a1275
Don't pass initialEnv into worker as it prohibits reloading the env
timneutkens c42661e
Add type
timneutkens a3c4248
Fix name of event
timneutkens c8976ad
Remove unused webpackWatcher variable and stop function
timneutkens 2ed107f
Use consistent setGlobal function (matching other cases)
timneutkens b130f1f
Revert "Don't pass initialEnv into worker as it prohibits reloading t…
timneutkens 8a30382
Ensure ipc call functions are awaited
timneutkens 9f190ca
Pass initialEnv instead of process.env
timneutkens 05646c2
Fix lint
timneutkens c773e41
Ensure reloadMatchers is called.
timneutkens 988f860
Skip instrument hmr test
timneutkens 96532db
Remove shouldUseStandaloneMode variable
timneutkens 3d5968f
Rename file to reflect what it is used for
timneutkens 268b7de
Consolidate proxy and server class
timneutkens 78a61eb
Revert "Consolidate proxy and server class"
timneutkens 6f77112
Revert "Rename file to reflect what it is used for"
timneutkens 7ad3a9f
Revert "Remove shouldUseStandaloneMode variable"
timneutkens 22a4321
Return requestHandler to await the promise
timneutkens 4b92a92
Merge branch 'canary' of https://github.com/vercel/next.js into fix/i…
timneutkens 879f9de
fix require cache clearing
ijjk 73ec060
Merge branch 'fix/investigate-memory-usage' of github.com:vercel/next…
ijjk a454b82
Merge branch 'canary' into fix/investigate-memory-usage
timneutkens cd58043
Remove proxy
timneutkens b12dbb9
Merge branch 'fix/investigate-memory-usage' of https://github.com/ver…
timneutkens f981a7f
Use launchApp to prevent segfault on import()
timneutkens 14a78de
Ensure process exists when the routing worker exits
timneutkens cda6ef5
Fix lint
timneutkens bfe6d04
Bring back previous test
timneutkens f465437
Remove unused variables
timneutkens 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export function checkIsNodeDebugging() { | ||
let isNodeDebugging: 'brk' | boolean = !!( | ||
process.execArgv.some((localArg) => localArg.startsWith('--inspect')) || | ||
process.env.NODE_OPTIONS?.match?.(/--inspect(=\S+)?( |$)/) | ||
) | ||
|
||
if ( | ||
process.execArgv.some((localArg) => localArg.startsWith('--inspect-brk')) || | ||
process.env.NODE_OPTIONS?.match?.(/--inspect-brk(=\S+)?( |$)/) | ||
) { | ||
isNodeDebugging = 'brk' | ||
} | ||
return isNodeDebugging | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export type PropagateToWorkersField = | ||
| 'actualMiddlewareFile' | ||
| 'actualInstrumentationHookFile' | ||
| 'reloadMatchers' | ||
| 'loadEnvConfig' | ||
| 'appPathRoutes' | ||
| 'middleware' |
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.
should those callbacks be parallelised?
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.
@ijjk it's unclear to me why these are arrays, seems they're all arrays with only one item? 🤔