-
Notifications
You must be signed in to change notification settings - Fork 9
refactor: applied bug fixes and code refactor from #55 #64
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
Conversation
cc @nodejs/web-infra can we get this reviewed asap, so I can merge it against |
cc @JakobJingleheimer here's the PR only containing the bug fixes against |
@ovflowd When I checked the output of the - MyObject::MyObject(double value) : value_(value) {\n}\n\n
+ MyObject::MyObject(double value) : value_(value) \n\n\n Looks like the curly brackets have been removed 🤔 I checked with the command below; npx api-docs-tooling -i PATH_TO_NODE/doc/api/addons.md -t json-simple -o . |
Can you give more examples? I'd say the 2nd one looks better. 🤔 |
For example, there is a code like this on the same page; MyObject::~MyObject() {
} It looks like we are taking this code and converting it to the following version; MyObject::~MyObject()
Current HTML output; ![]() You can also check the current JSON output on this page; ( |
Ah, I see. |
I found the issue. It was a bug already on the existing Good to always compare the content from the current JSON on nodejs.org versus what we generate |
Thank you, it looks fixed 🎉 I will continue to compare outputs until our tests are ready and cover this kind of situation 😄 |
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
Feel free to add unit tests to the existing methods we have here (to complement @AugustinMauroy's ones). If @AugustinMauroy can add more tests on a follow-up PR from your original PR, that would also be great. We want to unit-test a whole section of Markdown and have snapshots. Feel free to copy sections containing unique things from different /docs/api/*.md files, put them together in one file and snapshot the toJSON() version. Also feel free to add tests for the functionality underneath queries.mjs, and the other utils. |
Description
This PR incorporates the code refactors and bug fixes introduced from #55 into the codebase, splitting the actual generator changes done in #55 from the plain bug fixes and code refactors.
Refactors:
remark.mjs
fileupdate
entries intochanges
by mapping theupdate
entries into the same format used bychanges
withinmetadata.mjs
Bug Fixes
DOC_TYPES_MAPPING_OTHER
on theutils/parsers.mjs
Validation
The
json-simple
generator should still work as expected