Skip to content
42 changes: 41 additions & 1 deletion src/generators/legacy-json-all/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,47 @@ export default {
if (output) {
await writeFile(
join(output, 'all.json'),
JSON.stringify(generatedValue, null, 2)
JSON.stringify(
section,
Comment thread
aduh95 marked this conversation as resolved.
Outdated
[
// TODO: remove this array once all the additional keys have been introduced downstream
'added',
'changes',
'classes',
'classMethods',
'commit',
'ctors',
'default',
'deprecated',
'desc',
'description',
'displayName',
'events',
'examples',
'globals',
'introduced_in',
'meta',
'methods',
'miscs',
'name',
'napiVersion',
'options',
'params',
'pr-url',
'properties',
'removed',
'return',
'shortDesc',
'signatures',
'source',
'stability',
'stabilityText',
'textRaw',
'type',
'version',
],
2,
));
Comment thread
aduh95 marked this conversation as resolved.
Outdated
);
}

Expand Down
39 changes: 38 additions & 1 deletion src/generators/legacy-json/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,44 @@ export default {
for (const section of chunkResult) {
const out = join(output, `${section.api}.json`);

await writeFile(out, JSON.stringify(section, null, 2));
await writeFile(out, JSON.stringify(section, [
// TODO: remove this array once all the additional keys have been introduced downstream
'added',
'changes',
'classes',
'classMethods',
Comment thread
aduh95 marked this conversation as resolved.
Outdated
'commit',
'ctors',
'default',
'deprecated',
'desc',
'description',
'displayName',
'events',
'examples',
'globals',
'introduced_in',
'meta',
'methods',
'miscs',
...(section.api === 'index' ? [] : ['modules']),
'name',
'napiVersion',
Comment thread
aduh95 marked this conversation as resolved.
Outdated
'options',
'params',
'pr-url',
'properties',
'removed',
'return',
'shortDesc',
'signatures',
'source',
'stability',
'stabilityText',
'textRaw',
'type',
'version',
], 2));
Comment thread
aduh95 marked this conversation as resolved.
Outdated
Comment thread
aduh95 marked this conversation as resolved.
Outdated
Comment thread
aduh95 marked this conversation as resolved.
Outdated
}
}

Expand Down
Loading