Skip to content

node-api: make object property arrays const - #65621

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
umuoy1:node-api-object-properties-const
Sep 2, 2026
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
umuoy1:node-api-object-properties-const

Conversation

@umuoy1

@umuoy1 umuoy1 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Make property_names and property_values const in node_api_create_object_with_properties() to match their read-only semantics.

Refs: nodejs/node-addon-api#1735 (comment)

Signed-off-by: umuoy1 <burningdian@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/node-api

@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. node-api Issues and PRs related to Node-API. labels Aug 28, 2026
@legendecas

legendecas commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

Thanks! FWIW, this API has already been documented as taking const napi_value* property_[names|values] in https://github.com/nodejs/node/blob/main/doc/api/n-api.md?plain=1#L2697-L2702

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 28, 2026
@codecov

codecov Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (0544741) to head (d7027a1).
⚠️ Report is 68 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65621      +/-   ##
==========================================
- Coverage   90.07%   90.05%   -0.02%     
==========================================
  Files         751      751              
  Lines      254921   254921              
  Branches    48129    48127       -2     
==========================================
- Hits       229627   229578      -49     
- Misses      16479    16513      +34     
- Partials     8815     8830      +15     
Files with missing lines Coverage Δ
src/js_native_api_v8.cc 76.63% <ø> (ø)

... and 29 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.

@github-actions github-actions Bot 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 Aug 28, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@umuoy1

umuoy1 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Could someone take a look at why node-test-pull-request/76782 failed? Looks like only the AIX failed.

@panva

panva commented Sep 1, 2026

Copy link
Copy Markdown
Member

we'll restart CI when we know it's in a good state, those AIX failures are unrelated to this PR

@panva panva added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 1, 2026
@github-actions github-actions Bot 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 Sep 1, 2026
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@trivikr trivikr added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 2, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 3942bf7 into nodejs:main Sep 2, 2026
102 of 103 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 3942bf7

@github-project-automation github-project-automation Bot moved this from Need Triage to Done in Node-API Team Project Sep 2, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 2, 2026
aduh95 pushed a commit that referenced this pull request Sep 3, 2026
Signed-off-by: umuoy1 <burningdian@gmail.com>
PR-URL: #65621
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
@github-actions github-actions Bot mentioned this pull request Sep 7, 2026