@microsoft/api-documenter
Advanced tools
Comparing version 1.1.40 to 1.2.0
@@ -5,2 +5,22 @@ { | ||
{ | ||
"version": "1.2.0", | ||
"tag": "@microsoft/api-documenter_v1.2.0", | ||
"date": "Tue, 15 May 2018 00:18:10 GMT", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"comment": "Add support for new AEDoc tags @sealed, @virtual, and @override" | ||
} | ||
], | ||
"dependency": [ | ||
{ | ||
"comment": "Updating dependency \"@microsoft/api-extractor\" from `5.6.8` to `5.7.0`" | ||
}, | ||
{ | ||
"comment": "Updating dependency \"@microsoft/node-library-build\" from `4.3.38` to `4.3.39`" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "1.1.40", | ||
@@ -7,0 +27,0 @@ "tag": "@microsoft/api-documenter_v1.1.40", |
# Change Log - @microsoft/api-documenter | ||
This log was last generated on Fri, 11 May 2018 22:43:14 GMT and should not be manually modified. | ||
This log was last generated on Tue, 15 May 2018 00:18:10 GMT and should not be manually modified. | ||
## 1.2.0 | ||
Tue, 15 May 2018 00:18:10 GMT | ||
### Minor changes | ||
- Add support for new AEDoc tags @sealed, @virtual, and @override | ||
## 1.1.40 | ||
@@ -6,0 +13,0 @@ Fri, 11 May 2018 22:43:14 GMT |
@@ -28,2 +28,3 @@ import { DocItemSet } from '../utils/DocItemSet'; | ||
private _writeYamlFile(dataObject, filePath, yamlMimeType, schema); | ||
private _formatCommentedAnnotations(signature, apiItem); | ||
/** | ||
@@ -30,0 +31,0 @@ * Calculate the docfx "uid" for the DocItem |
@@ -239,2 +239,17 @@ "use strict"; | ||
} | ||
if (apiStructure.isSealed) { | ||
let sealedMessage; | ||
if (docItem.kind === DocItemSet_1.DocItemKind.Class) { | ||
sealedMessage = 'This class is marked as `@sealed`. Subclasses should not extend it.'; | ||
} | ||
else { | ||
sealedMessage = 'This interface is marked as `@sealed`. Other interfaces should not extend it.'; | ||
} | ||
if (!yamlItem.remarks) { | ||
yamlItem.remarks = sealedMessage; | ||
} | ||
else { | ||
yamlItem.remarks = sealedMessage + '\n\n' + yamlItem.remarks; | ||
} | ||
} | ||
} | ||
@@ -245,3 +260,3 @@ _populateYamlMethod(yamlItem, docItem) { | ||
const syntax = { | ||
content: apiMethod.signature | ||
content: this._formatCommentedAnnotations(apiMethod.signature, apiMethod) | ||
}; | ||
@@ -273,3 +288,3 @@ yamlItem.syntax = syntax; | ||
const syntax = { | ||
content: apiProperty.signature | ||
content: this._formatCommentedAnnotations(apiProperty.signature, apiProperty) | ||
}; | ||
@@ -317,2 +332,19 @@ yamlItem.syntax = syntax; | ||
} | ||
// Prepends a string such as "/** @sealed @override */" to an item signature where appropriate. | ||
_formatCommentedAnnotations(signature, apiItem) { | ||
const annotations = []; | ||
if (apiItem.isSealed) { | ||
annotations.push('@sealed'); | ||
} | ||
if (apiItem.isVirtual) { | ||
annotations.push('@virtual'); | ||
} | ||
if (apiItem.isOverride) { | ||
annotations.push('@override'); | ||
} | ||
if (annotations.length === 0) { | ||
return signature; | ||
} | ||
return '/** ' + annotations.join(' ') + ' */\n' + signature; | ||
} | ||
/** | ||
@@ -319,0 +351,0 @@ * Calculate the docfx "uid" for the DocItem |
{ | ||
"name": "@microsoft/api-documenter", | ||
"version": "1.1.40", | ||
"version": "1.2.0", | ||
"description": "Read JSON files from api-extractor, generate documentation pages", | ||
@@ -18,3 +18,3 @@ "repository": { | ||
"dependencies": { | ||
"@microsoft/api-extractor": "5.6.8", | ||
"@microsoft/api-extractor": "5.7.0", | ||
"@microsoft/node-core-library": "1.3.0", | ||
@@ -27,3 +27,3 @@ "@microsoft/ts-command-line": "4.1.0", | ||
"devDependencies": { | ||
"@microsoft/node-library-build": "4.3.38", | ||
"@microsoft/node-library-build": "4.3.39", | ||
"@types/fs-extra": "5.0.1", | ||
@@ -30,0 +30,0 @@ "@types/js-yaml": "3.9.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
272322
3482
+ Added@microsoft/api-extractor@5.7.0(transitive)
- Removed@microsoft/api-extractor@5.6.8(transitive)