-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[WIP] feat(node:net): node:net
compatibility
#17092
base: main
Are you sure you want to change the base?
Conversation
* @param {T} fn | ||
* @returns {T} | ||
*/ | ||
function hideStackFrames(fn) { |
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.
Set the function name to ::bunternal::
and it will do this automatically
we don't want to add the overhead of calling Error.captureStackTrace in these spots
|
||
if (cluster === undefined) cluster = require("node:cluster"); | ||
Object.defineProperty(server, "_connectionKey", { |
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.
If we're going to shim this then we should make sure the enumerable / writable property is set if necessary
@@ -54,7 +54,7 @@ cluster._setupWorker = function () { | |||
}; | |||
|
|||
// `obj` is a net#Server or a dgram#Socket object. | |||
cluster._getServer = function (obj, options, cb) { | |||
cluster._getServer = function _getServer(obj, options, cb) { |
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.
this will likely become _getServer2 due to the symbol renamer
node:net
compatabilitynode:net
compatibility
What does this PR do?
Very much a wip. Not ready to even be looked at.
How did you verify your code works?