-
Notifications
You must be signed in to change notification settings - Fork 465
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
src: add SyntaxError #1326
src: add SyntaxError #1326
Conversation
*: |
@@ -0,0 +1,66 @@ | |||
# SyntaxError | |||
|
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.
Should it say here that it's only supported in node-api version 9 and higher?
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.
I don't think so... We don't have any other node-api version information in our docs, eg. Napi::Object::Freeze()
does not mention being Node-API v8 only.
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.
That might be a gap though ? I go to try to use an API and it's not there? Either way agree that we don't need to be block this PR on it, but might be worth thinking about wether adding that info makes sense.
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 with a suggestion
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 % one nit.
@@ -9,6 +9,8 @@ if (process.argv[2] === 'fatal') { | |||
|
|||
module.exports = require('./common').runTestWithBindingPath(test); | |||
|
|||
const napiVersion = Number(process.env.NAPI_VERSION ?? process.versions.napi); |
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.
It might be better to move the napiVersion
definition in test/index.js
to test/common/index.js
so that we don't have to repeat it.
Added |
Adds wrapper for
Napi::SyntaxError
from release of Node-API v9.