Skip to content

src: officially deprecate node::ObjectWrap#63756

Open
addaleax wants to merge 2 commits into
nodejs:mainfrom
addaleax:deprecate-object-wrap
Open

src: officially deprecate node::ObjectWrap#63756
addaleax wants to merge 2 commits into
nodejs:mainfrom
addaleax:deprecate-object-wrap

Conversation

@addaleax
Copy link
Copy Markdown
Member

@addaleax addaleax commented Jun 5, 2026

This interface has long been unmaintained and doesn't match current best practices for C++ object management.

It's also simply not a good idea to have this header be part of Node.js core; since it is an inline header, user code will depend on the Node.js version it was compiled with, and there is no way to adopt changes to this header independently of changing the target Node.js version.

Better userland alternatives exist and have long been more popular, notably, node-addon-api and, for use cases where direct V8 API access is required, nan.

This interface has long been unmaintained and doesn't
match current best practices for C++ object management.

It's also simply not a good idea to have this header be
part of Node.js core; since it is an inline header, user
code will depend on the Node.js version it was compiled with,
and there is no way to adopt changes to this header
independently of changing the target Node.js version.

Better userland alternatives exist and have long been
more popular, notably, `node-addon-api` and, for use cases
where direct V8 API access is required, `nan`.

Signed-off-by: Anna Henningsen <anna@addaleax.net>
@addaleax addaleax added semver-major PRs that contain breaking changes and should be released in the next major version. addons Issues and PRs related to native addons. labels Jun 5, 2026
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Jun 5, 2026
@addaleax addaleax added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Jun 5, 2026
@Renegade334
Copy link
Copy Markdown
Member

Note that this class is mentioned extensively in addons.md, so this probably needs an edit.

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

Labels

addons Issues and PRs related to native addons. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants