Skip to content

src: add setTitle() as alternative to direct assignment#62804

Open
JonathanLopes404 wants to merge 2 commits intonodejs:mainfrom
JonathanLopes404:fix/issue-62797
Open

src: add setTitle() as alternative to direct assignment#62804
JonathanLopes404 wants to merge 2 commits intonodejs:mainfrom
JonathanLopes404:fix/issue-62797

Conversation

@JonathanLopes404
Copy link
Copy Markdown

Implement process.setTitle(title) as a new function-based API for setting the process title, complementing the existing process.title property assignment pattern

Fixes: #62797

Implement process.setTitle(title) as a new function-based API for
setting the process title, complementing the existing process.title
property assignment pattern

Fixes: nodejs#62797
Signed-off-by: Jonathan Lopes <jonathan15989@protonmail.com>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Apr 18, 2026
Copy link
Copy Markdown
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this introduce a new native method? Adding the new API is fine, but it should just trigger the same code paths.

Add process.setTitle(title) as a new API while reusing the existing
process.title assignment behavior instead of introducing a separate
native code path.

Signed-off-by: Jonathan Lopes <jonathan15989@protonmail.com>
@JonathanLopes404
Copy link
Copy Markdown
Author

@addaleax Updated in latest commit: setTitle now reuses the existing process.title path (removed native method). Could you please take another look?

@addaleax addaleax added semver-minor PRs that contain new features and should be released in the next minor version. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 19, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 19, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.70%. Comparing base (bee1087) to head (c16ebdd).
⚠️ Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62804      +/-   ##
==========================================
+ Coverage   89.68%   89.70%   +0.01%     
==========================================
  Files         706      706              
  Lines      218191   218237      +46     
  Branches    41746    41768      +22     
==========================================
+ Hits       195691   195773      +82     
+ Misses      14427    14373      -54     
- Partials     8073     8091      +18     
Files with missing lines Coverage Δ
...l/bootstrap/switches/does_not_own_process_state.js 100.00% <100.00%> (ø)
...ernal/bootstrap/switches/does_own_process_state.js 95.33% <100.00%> (+0.19%) ⬆️

... and 66 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@silverwind
Copy link
Copy Markdown
Contributor

Would add a reference on bottom of the process.title docs to point to the new alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a process.setTitle() function

4 participants