Skip to content

Conversation

@araujogui
Copy link
Member

Description

Create addon-verify generator

Validation

I compared the output of the old generator with this one, and they are identical.

Related Issues

Fixes #151

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I've covered new added functionality with unit tests if necessary.

@araujogui araujogui requested a review from a team as a code owner January 9, 2025 01:09
@flakey5
Copy link
Member

flakey5 commented Jan 10, 2025

Another nit but could you also add addon-verify to the generator list in the readme here https://github.com/nodejs/api-docs-tooling/blob/c86657b5202cfa3faf4ffc2ace2769990814dadb/README.md?plain=1#L42?

Copy link
Member

@flakey5 flakey5 left a comment

Choose a reason for hiding this comment

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

Few nits but lgtm! Thank you!

@araujogui
Copy link
Member Author

Few nits but lgtm! Thank you!

Thanks, fixed the issues.

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGTM !

@araujogui araujogui merged commit ba071f5 into nodejs:main Jan 13, 2025
6 checks passed
@araujogui araujogui deleted the feat/addon-verify branch January 13, 2025 18:54
* @param {string} sectionName Section name
* @returns {string}
*/
export function normalizeSectionName(sectionName) {
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be exported?

return addons;
}, {});

const files = await Promise.all(
Copy link
Member

Choose a reason for hiding this comment

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

These should be broken down to separate functions on an utility file.

export const updateFilesForBuild = files => {
const updatedFiles = files.map(({ name, content }) => {
if (name === 'test.js') {
content = `'use strict';
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm, I wonder if there is a better way of doing it!

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

I left some comments. @araujogui could you make a follow-up PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

urgent: feat: add addon-verify generator

4 participants