Skip to content

Commit

Permalink
expose introduced_in in metadata create
Browse files Browse the repository at this point in the history
Signed-off-by: flakey5 <[email protected]>
  • Loading branch information
flakey5 committed Oct 9, 2024
1 parent afc514b commit ffc5f32
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/metadata.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const createMetadata = slugger => {

const {
type,
introduced_in,
added,
deprecated,
removed,
Expand All @@ -137,8 +138,10 @@ const createMetadata = slugger => {
internalMetadata.stability.toJSON = () =>
internalMetadata.stability.children.map(node => node.data);

// Returns the Metadata entry for the API doc
return {
/**
* @type {ApiDocMetadataEntry}
*/
const value = {
api: apiDoc.stem,
slug: sectionSlug,
source_link,
Expand All @@ -154,6 +157,13 @@ const createMetadata = slugger => {
content: section,
tags,
};

if (introduced_in) {
value.introduced_in = introduced_in;
}

// Returns the Metadata entry for the API doc
return value;
},
};
};
Expand Down

0 comments on commit ffc5f32

Please sign in to comment.