Skip to content

feat: add sugar method for PropertyLValue (#1651) #1655

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

Merged
merged 2 commits into from
May 9, 2025

Conversation

neko-para
Copy link
Contributor

No description provided.

@mhdawson
Copy link
Member

@neko-para thanks for the PR, could you add a test as well?

@mhdawson mhdawson moved this from Need Triage to In Progress in Node-API Team Project May 2, 2025
@neko-para
Copy link
Contributor Author

Actually i'm not sure where should i add the tests. Maybe i shall add an extra entry?

@neko-para
Copy link
Contributor Author

@neko-para thanks for the PR, could you add a test as well?

Tests added.

@mhdawson
Copy link
Member

mhdawson commented May 6, 2025

@neko-para just to confirm its not possible to use the existing operator:

    /// Converts an L-value to a value.
    operator Value() const;

instead of adding the AsValue method ?

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.79%. Comparing base (b347dbe) to head (740d16c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1655      +/-   ##
==========================================
+ Coverage   65.76%   65.79%   +0.03%     
==========================================
  Files           3        3              
  Lines        2144     2146       +2     
  Branches      715      715              
==========================================
+ Hits         1410     1412       +2     
  Misses        162      162              
  Partials      572      572              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@neko-para
Copy link
Contributor Author

@neko-para just to confirm its not possible to use the existing operator:

    /// Converts an L-value to a value.
    operator Value() const;

instead of adding the AsValue method ?

The cast operator should always work. Adding the method is generally only for convenience, as explicit calling cast operator is not as intuitive as calling method.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@mhdawson mhdawson merged commit 1e57a0a into nodejs:main May 9, 2025
54 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Node-API Team Project May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants