Skip to content
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',
'commit',
'ctors',
'default',
'deprecated',
'desc',
'description',
'displayName',
'events',
'examples',
'globals',
'introduced_in',
'meta',
'methods',
'miscs',
...(section.api === 'index' ? [] : ['modules']),
'name',
'napiVersion',
'options',
'params',
'pr-url',
'properties',
'removed',
'return',
'shortDesc',
'signatures',
'source',
'stability',
'stabilityText',
'textRaw',
'type',
'version',
], 2));
}
}

Expand Down
Loading