You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
util: add internal assignFunctionName() function - #57916
We have a lot of functions exposed to userspace or mentioned in stack traces that are anonymous or have something inherited like value as name; because it's not convenient to define it with name, or because the correct name is already taken by another variable, or because the name comes from a Symbol, or because of false positives from linter.
This helper function will simplify giving such functions a correct name.
I extracted this so it could be used for other namings (e.g. for some [Symbol(nodejs.util.promisify.custom)] functions), since it's not related to the other PR, doesn't have to depend on it, and would simplify the process (especially for backports and cherry-picking later). But it's feasible either way.
I would definitely like adding usages right away. It would otherwise feel weird to me to add a utility function for internal usage only. We could of course split it into two commits in the same PR.
Should this be marked as minor since we change the behavior a little bit (although it's not disrupting)?
I'm okay with semverness change if needed, but not sure it can be semver-minor, since it doesn't add any userland-facing features. IMHO the helper function by itself is semver-patch, and the other changes are either semver-patch fixes or semver-major (potentially) breaking fixes.
aduh95
added
author ready
PRs with CI started, the required approvals, and no outstanding review comments.
request-ci
Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review.
labels
Apr 19, 2025
github-actionsBot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review.
label
Apr 19, 2025
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
author readyPRs with CI started, the required approvals, and no outstanding review comments.commit-queue-rebasePRs the Commit Queue should land as multiple self-contained commits.lib / srcIssues and PRs involving general changes in the lib/ or src/ directories.needs-ciPRs that need a full CI run.utilIssues and PRs related to the built-in util module.
6 participants
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.
Extracted from: #57901
We have a lot of functions exposed to userspace or mentioned in stack traces that are anonymous or have something inherited like
valueas name; because it's not convenient to define it with name, or because the correct name is already taken by another variable, or because the name comes from aSymbol, or because of false positives from linter.This helper function will simplify giving such functions a correct name.