Skip to content

Commit a584c8e

Browse files
committed
Rename "api tag" text --> "release tag"
1 parent c77fe4f commit a584c8e

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎libraries/api-extractor/src/definitions/ApiDocumentation.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ import Extractor from '../Extractor';
1212
import ResolvedApiItem from '../ResolvedApiItem';
1313

1414
/**
15-
* An "API Tag" is a custom JSDoc tag which indicates whether an ApiItem definition
15+
* A "release tag" is a custom JSDoc tag which indicates whether an ApiItem definition
1616
* is considered Public API for third party developers, as well as its release
1717
* stage (alpha, beta, etc).
1818
* @see https://onedrive.visualstudio.com/DefaultCollection/SPPPlat/_git/sp-client
1919
* ?path=/common/docs/ApiPrinciplesAndProcess.md
2020
*/
2121
export enum ReleaseTag {
2222
/**
23-
* No API Tag was specified in the JSDoc summary.
23+
* No release tag was specified in the JSDoc summary.
2424
*/
2525
None = 0,
2626
/**
@@ -145,7 +145,7 @@ export default class ApiDocumentation {
145145
public incompleteInheritdocs: Token[];
146146

147147
/**
148-
* An "API Tag" is a custom JSDoc tag which indicates whether this definition
148+
* A "release tag" is a custom JSDoc tag which indicates whether this definition
149149
* is considered Public API for third party developers, as well as its release
150150
* stage (alpha, beta, etc).
151151
*/
@@ -223,7 +223,7 @@ export default class ApiDocumentation {
223223
const tokenizer: Tokenizer = new Tokenizer(this.originalJsDoc, this.reportError);
224224
this.summary = DocElementParser.parse(this, tokenizer);
225225

226-
let apiTagCount: number = 0;
226+
let releaseTagCount: number = 0;
227227
let parsing: boolean = true;
228228

229229
while (parsing) {
@@ -275,22 +275,22 @@ export default class ApiDocumentation {
275275
case '@public':
276276
tokenizer.getToken();
277277
this.releaseTag = ReleaseTag.Public;
278-
++apiTagCount;
278+
++releaseTagCount;
279279
break;
280280
case '@internal':
281281
tokenizer.getToken();
282282
this.releaseTag = ReleaseTag.Internal;
283-
++apiTagCount;
283+
++releaseTagCount;
284284
break;
285285
case '@alpha':
286286
tokenizer.getToken();
287287
this.releaseTag = ReleaseTag.Alpha;
288-
++apiTagCount;
288+
++releaseTagCount;
289289
break;
290290
case '@beta':
291291
tokenizer.getToken();
292292
this.releaseTag = ReleaseTag.Beta;
293-
++apiTagCount;
293+
++releaseTagCount;
294294
break;
295295
case '@preapproved':
296296
tokenizer.getToken();
@@ -337,8 +337,8 @@ export default class ApiDocumentation {
337337
}
338338
}
339339

340-
if (apiTagCount > 1) {
341-
this.reportError('More than one API Tag was specified');
340+
if (releaseTagCount > 1) {
341+
this.reportError('More than one release tag was specified');
342342
}
343343

344344
if (this.preapproved && this.releaseTag !== ReleaseTag.Internal) {

‎libraries/api-extractor/src/definitions/test/ApiDocumentation.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('ApiDocumentation tests', function (): void {
7575
assert.equal(capturedErrors[4].message, 'Unknown tag name for inline tag.');
7676
assert.equal(capturedErrors[5].message, 'Too few parameters for @link inline tag.');
7777
assert.equal(capturedErrors[6].message, 'Unexpected text in JSDoc comment: "can not contain a tag"');
78-
assert.equal(capturedErrors[7].message, 'More than one API Tag was specified');
78+
assert.equal(capturedErrors[7].message, 'More than one release tag was specified');
7979
assert.equal(
8080
capturedErrors[8].message,
8181
'API reference expression must be of the form: \'scopeName/packageName:exportName.memberName ' +
@@ -86,13 +86,13 @@ describe('ApiDocumentation tests', function (): void {
8686
'inheritdoc source item is deprecated. Must provide @deprecated message or remove @inheritdoc inline tag.');
8787
});
8888

89-
it('Should parse API tag', function (): void {
90-
const expecedApiTag: ReleaseTag = ReleaseTag.Public;
89+
it('Should parse release tag', function (): void {
90+
const expectedReleaseTag: ReleaseTag = ReleaseTag.Public;
9191

9292
const actualDoc: ApiDocumentation = myDocumentedClass ? myDocumentedClass.documentation : undefined;
9393

9494
assert.isObject(actualDoc);
95-
assert.equal(actualDoc.releaseTag, expecedApiTag);
95+
assert.equal(actualDoc.releaseTag, expectedReleaseTag);
9696
});
9797
});
9898
});

‎libraries/api-extractor/src/generators/ApiFileGenerator.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export default class ApiFileGenerator extends ApiItemVisitor {
178178
}
179179

180180
/**
181-
* Writes a synopsis of the JSDoc comments, which indicates the API tag,
181+
* Writes a synopsis of the JSDoc comments, which indicates the release tag,
182182
* whether the item has been documented, and any warnings that were detected
183183
* by the Analzer.
184184
*/

‎libraries/api-extractor/testInputs/example2/src/MyDocumentedClass.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default class MyDocumentedClass {
130130
// (Error #7)
131131
// Unexpected text in JSDoc comment: "can not contain a tag"
132132
// (Error #8)
133-
// Error: More than one API Tag was specified
133+
// Error: More than one release tag was specified
134134
public betaTagMissingParam: string;
135135

136136
/**

0 commit comments

Comments
 (0)