-
Notifications
You must be signed in to change notification settings - Fork 459
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
Expose version property in public API #1479
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1479 +/- ##
=======================================
Coverage 64.71% 64.71%
=======================================
Files 3 3
Lines 1981 1981
Branches 687 687
=======================================
Hits 1282 1282
Misses 138 138
Partials 561 561 ☔ View full report in Codecov by Sentry. |
This value is already used in the conversion tooling and is useful in external contexts too, for example when specifying/detecting node-addon-api as an optional peer dependency. Also adds test expectations for all exported properties.
776991d
to
92dc899
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR contains a proposal to expose the package
version
property in the public API.The
version
value is already used by the conversion tooling and is additionally useful in external contexts too, for example when specifying/detectingnode-addon-api
as an optional and/or peer dependency.This would bring
node-addon-api
in line withnode-gyp
, which already exportsrequire('node-gyp').version
. The change in the PR will allow me to improve the install-time detecting/logging fornode-addon-api
withinsharp
.It also adds a test with expectations for this property as well as all existing exported properties.
BEGIN_COMMIT_OVERRIDE
feat: Expose version property in public API (#1479)
END_COMMIT_OVERRIDE