Skip to content

Commit 73a8514

Browse files
1ilsangtargos
authored andcommitted
tools: consolidate 'introduced_in' check for docs
PR-URL: #57109 Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent e26d484 commit 73a8514

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎doc/api/typescript.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ changes:
1010
description: Added `--experimental-transform-types` flag.
1111
-->
1212

13+
<!--introduced_in=v23.6.0-->
14+
1315
> Stability: 1.1 - Active development
1416
1517
## Enabling

‎tools/lint-md/lint-md.mjs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ paths.forEach(async (path) => {
3434
constfileContents=file.toString();
3535
constresult=awaitlinter.process(file);
3636
constisDifferent=fileContents!==result.toString();
37+
38+
if(path.startsWith('doc/api/')){
39+
if(!fileContents.includes('introduced_in')){
40+
console.error(`${path} is missing an 'introduced_in' version. Please add one.`);
41+
process.exitCode=1;
42+
}
43+
}
44+
3745
if(format){
3846
if(isDifferent){
3947
fs.writeFileSync(path,result.toString());

0 commit comments

Comments
 (0)