Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

src: add SyntaxError#1326

Merged
KevinEady merged 1 commit intonodejs:mainfrom
KevinEady:add-syntaxerror
Jun 16, 2023
Merged

src: add SyntaxError#1326
KevinEady merged 1 commit intonodejs:mainfrom
KevinEady:add-syntaxerror

Conversation

Copy link
Contributor

KevinEady commented Jun 10, 2023

Adds wrapper for Napi::SyntaxError from release of Node-API v9.

Copy link
Contributor Author

KevinEady commented Jun 10, 2023 *
edited
Loading

mhdawson reviewed Jun 12, 2023
@@ -0,0 +1,66 @@
# SyntaxError

Copy link
Member

mhdawson Jun 12, 2023

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?

Copy link
Contributor Author

KevinEady Jun 12, 2023

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.

Copy link
Member

mhdawson Jun 12, 2023

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.

mhdawson approved these changes Jun 12, 2023
Copy link
Member

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 with a suggestion

KevinEady mentioned this pull request Jun 12, 2023
legendecas approved these changes Jun 13, 2023
Copy link
Member

legendecas left a comment

Choose a reason for hiding this comment

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

LGTM % one nit.


module.exports = require('./common').runTestWithBindingPath(test);

const napiVersion = Number(process.env.NAPI_VERSION ?? process.versions.napi);
Copy link
Member

legendecas Jun 13, 2023

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.

KevinEady added the do not land label Jun 13, 2023
Copy link
Contributor Author

KevinEady commented Jun 13, 2023

Added do not land label until release of v7.0.0 is complete.

KevinEady removed the do not land label Jun 16, 2023
KevinEady merged commit d9828c6 into nodejs:main Jun 16, 2023
KevinEady deleted the add-syntaxerror branch June 16, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

mhdawson mhdawson approved these changes

legendecas legendecas approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants