-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: legacy json generator #142
base: main
Are you sure you want to change the base?
Conversation
@flakey5 PTAL |
6e80d01
to
e2c8fdd
Compare
Currently, this PR is 1:1 with the original JSON (AFAIK), except for the following differences, which probably don't need to be fixed:
|
So, is it correct to assume that this is PR supersedes @flakey5's PR? Was this communicated with @flakey5? Are they fine with the continuation on this PR? Note that you could also have pushed your work on their PR if they were fine :) -- or at least you can once you join the team on GitHub I believe. I will review this once I get time 🙏 |
I would wait until we get the go-ahead from the other PR. My plan was to open this PR into that branch, but there was merge conflicts. If we don't get the go ahead, I suggest that @flakey5 use (I obviously don't want to take away from the other PR / cut off @flakey5's amazing work, and if we'd rather keep the discussion there, I am fine with that) |
BTW @RedYetiDev CodeQL complained about your code, that it might have a security vuln; Mind giving an eye? 👀 |
|
I was either traveling or getting over jet lag this weekend so I wasn't able to respond much to the comments made on #92, I would've appreciated a little more time to respond to the comments made but it's water under the bridge. Imo it makes sense to continue with this one since the commits are already here and it's pretty much done, still need to make sure the unresolved comments in #92 are addressed here however |
Sorry!! Thank you for understanding. Again, I'm happy to instead have this merged into your PR, I really don't want to take over your amazing work |
node.type === 'blockquote' && | ||
node.children.length === 1 && | ||
node.children[0].type === 'paragraph' && | ||
nodes.slice(0, i).every(node => node.type === 'list') |
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.
Wouldn't it be better to simply extract the nodes that are listed and ignore others? Also, we already have helpers for stability index, I don't think any of this needs to be done. Afaik the metadata of the node should already have everything about stability. Meaning we don't need any of this code (IMO)
See: https://github.com/nodejs/api-docs-tooling/blob/main/src/metadata.mjs#L152
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.
We need to delete the stability node from the nodes, so this matches the node, unless we can delete it elsewhere?
* | ||
* @param {import('../types.d.ts').Section} section | ||
*/ | ||
const parseList = section => { |
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.
This should be a Factory (even a different file) that allows you to handle the signature types for other types.
So that we have tiny methods (that implement an interface) instead of non-ending signatures
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.
What do you mean? Can you give a tiny example (sorry, it's not clicking in my head for me)
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.
Ill keep reviewing this later on, but so far I left a few comments already :D
5f02a5f
to
e9d7d43
Compare
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 other than a few nits and the comments from other reviewers
Co-Authored-By: flakey5 <[email protected]>
3306460
to
3a4b27b
Compare
Copilot
AI
left a comment
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.
Copilot reviewed 8 out of 20 changed files in this pull request and generated 2 suggestions.
Files not reviewed (12)
- src/generators/legacy-html/assets/api.js: Evaluated as low risk
- src/parser.mjs: Evaluated as low risk
- src/test/metadata.test.mjs: Evaluated as low risk
- README.md: Evaluated as low risk
- src/generators/index.mjs: Evaluated as low risk
- src/metadata.mjs: Evaluated as low risk
- src/utils/parser.mjs: Evaluated as low risk
- shiki.config.mjs: Evaluated as low risk
- src/queries.mjs: Evaluated as low risk
- src/generators/legacy-json/utils/buildSection.mjs: Evaluated as low risk
- src/test/queries.test.mjs: Evaluated as low risk
- src/constants.mjs: Evaluated as low risk
😆 It didn't even review the most important file |
Closes #57
Closes #141
Closes #92
This is an extension of #92. This is a seperate PR due to a rebase that caused merge conflicts.
Description
See #92 for a description
Validation
Validate with
bash ./file.sh addons
,bash ./file.sh fs
, etc.Check List