Conversation
❌ 14 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
@flakey5 is this still in progress? Need any help? |
|
Still in progress just haven't been committing, I do wanna get this ready for review within the next coming weeks though |
a4cd425 to
d711fee
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2d10df1 to
e4dbbe4
Compare
6bfc555 to
1bcf93d
Compare
|
Bulk of this is done, with only two main things left:
I'm leaving this as a draft until those are done, but the rest is ready for review |
avivkeller
left a comment
There was a problem hiding this comment.
the rest is ready for review
I've left a first round of reviews. Thank you so much for this effort!
ee1684d to
b37daee
Compare
b37daee to
8ebb3d6
Compare
|
Marking ready for review, should be all there minus #287 (comment) |
There was a problem hiding this comment.
Pull request overview
This PR introduces new JSON generators (json and json-all) for the Node.js documentation toolkit, providing machine-readable JSON representations of API documentation.
Key Changes:
- New
jsongenerator that outputs individual JSON files for each API module with comprehensive type information, method signatures, properties, and events - New
json-allgenerator that combines all JSON outputs into a single file - Comprehensive JSON schema definition with TypeScript type generation support
Reviewed changes
Copilot reviewed 39 out of 44 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
src/generators/json/index.mjs |
Main JSON generator implementation |
src/generators/json-all/index.mjs |
Aggregator generator for combined JSON output |
src/generators/json/schema.jsonc |
JSON schema definition for documentation structure |
src/generators/json/utils/sections/*.mjs |
Section parsers for modules, classes, methods, properties, and events |
src/generators/json/utils/parseTypeList.mjs |
Type list parsing utility |
src/generators/json/utils/createParameterGroupings.mjs |
Method signature parameter grouping logic |
src/utils/buildHierarchy.mjs |
Shared utility for building hierarchical entry structures |
src/utils/assertAstType.mjs |
AST node type assertion utilities |
src/utils/generator-error.mjs |
Custom error class for generator errors |
src/utils/unist.mjs |
Enhanced node transformation with support for break, delete, and link nodes |
scripts/generate-json-types.mjs |
Script to generate TypeScript definitions from JSON schema |
package.json |
New dependencies for JSON parsing and schema validation |
.github/workflows/generate.yml |
CI workflow integration for JSON generator |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
1cf5261 to
0ec318d
Compare
|
|
||
| return { | ||
| $schema: `${BASE_URL}docs/${version}/api/${SCHEMA_FILENAME}`, | ||
| source: head.api_doc_source, |
There was a problem hiding this comment.
Currently this is something like doc/api/buffer.md, I wonder if it'd be more useful to give an actual link to the source file like https://nodejs.org/docs/v25.0.0/api/buffer.md
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Co-authored-by: Aviv Keller <me@aviv.sh>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Co-authored-by: Aviv Keller <me@aviv.sh>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
|
(Re-requesting my review as a reminder to myself to review this later today) |
| if (typeof index !== 'number') { | ||
| index = Number(index); | ||
| } |
There was a problem hiding this comment.
When will this not be a number?
| if (entry.changes.length > 0) { | ||
| section.changes = entry.changes.map(change => ({ | ||
| description: change.description, | ||
| prUrl: change['pr-url'], | ||
| version: enforceArray(change.version), | ||
| })); | ||
| } | ||
|
|
||
| if (entry.added_in) { | ||
| section['@since'] = enforceArray(entry.added_in); | ||
| } | ||
|
|
||
| if (entry.n_api_version) { | ||
| section.napiVersion = enforceArray(entry.n_api_version); | ||
| } | ||
|
|
||
| if (entry.removed_in) { | ||
| section.removedIn = enforceArray(entry.removed_in); | ||
| } | ||
|
|
||
| if (entry.deprecated_in) { | ||
| section['@deprecated'] = enforceArray(entry.deprecated_in); | ||
| } |
There was a problem hiding this comment.
I think we should get in the habit of always supplying these prompts, even if they are empty/undefined
wdyt @ovflwod
| } else { | ||
| // Put static methods in `staticMethods` property and non-static methods | ||
| // in the `methods` property | ||
| property = entry.heading.data.text.startsWith('Static method:') |
There was a problem hiding this comment.
This should be picked up by the classMethod RegEx, right? Do we need to check it here as well?
Closes #214
TODO: