Skip to content

n-api: initialize a module via a special symbol - #20161

Closed
gabrielschulhof wants to merge 1 commit into
nodejs:masterfrom
gabrielschulhof:n-api-special-symbol
Closed

n-api: initialize a module via a special symbol#20161
gabrielschulhof wants to merge 1 commit into
nodejs:masterfrom
gabrielschulhof:n-api-special-symbol

Conversation

@gabrielschulhof

Copy link
Copy Markdown
Contributor

Much like regular modules, N-API modules can also benefit from having
a special symbol which they can expose.

Fixes: #19845

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-botnodejs-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. labels Apr 20, 2018
@gabrielschulhofgabrielschulhof added node-api Issues and PRs related to the Node-API. semver-minor PRs that contain new features and should be released in the next minor version. labels Apr 20, 2018
Comment threaddoc/api/n-api.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: this line has 81 characters and may cause doc linting issue.

@gabrielschulhof

Copy link
Copy Markdown
ContributorAuthor

@vsemozhetbyt fixed. Thanks!

@bnoordhuisbnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM modulo comments.

Comment threaddoc/api/n-api.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you break out the stylistic changes to a separate commit?

Comment threadsrc/node.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is arguably a separate change that belongs in its own commit.

Comment threadtools/remark-cli/package-lock.json Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should not be checked in.

Kinda annoying make lint still touches this file, I thought that had been fixed.

Much like regular modules, N-API modules can also benefit from having
a special symbol which they can expose.
Fixes: nodejs#19845
@gabrielschulhof

Copy link
Copy Markdown
ContributorAuthor

@bnoordhuis I split out the changes into two more PRs.

@bnoordhuis

Copy link
Copy Markdown
Member

That's fine. Separate commits in this PR would have been alright too. The main thing is to have one change per commit, makes bisecting/reverting and code archeology easier.

@gabrielschulhof

Copy link
Copy Markdown
ContributorAuthor

@gabrielschulhof

Copy link
Copy Markdown
ContributorAuthor

Landed in 0f8caf2.

gabrielschulhof pushed a commit that referenced this pull request Apr 23, 2018
Much like regular modules, N-API modules can also benefit from having
a special symbol which they can expose.
Fixes: #19845
PR-URL: #20161
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@gabrielschulhof
gabrielschulhof deleted the n-api-special-symbol branch April 23, 2018 21:25
MylesBorins pushed a commit that referenced this pull request May 4, 2018
Much like regular modules, N-API modules can also benefit from having
a special symbol which they can expose.
Fixes: #19845
PR-URL: #20161
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins added a commit that referenced this pull request May 8, 2018
Notable Changes:
* console:
- make console.table() use colored inspect (TSUYUSATO Kitsune)
#20510
* fs:
- move fs/promises to fs.promises (cjihrig)
#20504
* http:
- added aborted property to request (Robert Nagy)
#20094
* n-api:
- initialize a module via a special symbol (Gabriel Schulhof)
#20161
* src:
- add public API to expose the main V8 Platform (Allen Yonghuang Wang)
#20447
PR-URL: Coming Soon
@MylesBorinsMylesBorins mentioned this pull request May 8, 2018
MylesBorins added a commit that referenced this pull request May 8, 2018
Notable Changes:
* console:
- make console.table() use colored inspect (TSUYUSATO Kitsune)
#20510
* fs:
- move fs/promises to fs.promises (cjihrig)
#20504
* http:
- added aborted property to request (Robert Nagy)
#20094
* n-api:
- initialize a module via a special symbol (Gabriel Schulhof)
#20161
* src:
- add public API to expose the main V8 Platform (Allen Yonghuang Wang)
#20447
PR-URL: #20606
MylesBorins added a commit that referenced this pull request May 9, 2018
Notable Changes:
* console:
- make console.table() use colored inspect (TSUYUSATO Kitsune)
#20510
* fs:
- move fs/promises to fs.promises (cjihrig)
#20504
* http:
- added aborted property to request (Robert Nagy)
#20094
* n-api:
- initialize a module via a special symbol (Gabriel Schulhof)
#20161
* src:
- add public API to expose the main V8 Platform (Allen Yonghuang Wang)
#20447
PR-URL: #20606
MylesBorins added a commit that referenced this pull request May 9, 2018
Notable Changes:
* console:
- make console.table() use colored inspect (TSUYUSATO Kitsune)
#20510
* fs:
- move fs/promises to fs.promises (cjihrig)
#20504
* http:
- added aborted property to request (Robert Nagy)
#20094
* n-api:
- initialize a module via a special symbol (Gabriel Schulhof)
#20161
* src:
- add public API to expose the main V8 Platform (Allen Yonghuang Wang)
#20447
PR-URL: #20606
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.lib / srcIssues and PRs related to general changes in the lib or src directory.node-apiIssues and PRs related to the Node-API.semver-minorPRs 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.

No N-API equivalent for new well-known-symbol loading feature

4 participants

@gabrielschulhof@bnoordhuis@vsemozhetbyt@nodejs-github-bot