Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/api-documenter

Package Overview
Dependencies
Maintainers
2
Versions
654
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/api-documenter - npm Package Compare versions

Comparing version 1.5.4 to 1.5.5

12

CHANGELOG.json

@@ -5,2 +5,14 @@ {

{
"version": "1.5.5",
"tag": "@microsoft/api-documenter_v1.5.5",
"date": "Wed, 01 Aug 2018 21:02:43 GMT",
"comments": {
"patch": [
{
"comment": "Updating OfficeYamlDocumenter to append snippets to non-empty sections"
}
]
}
},
{
"version": "1.5.4",

@@ -7,0 +19,0 @@ "tag": "@microsoft/api-documenter_v1.5.4",

9

CHANGELOG.md
# Change Log - @microsoft/api-documenter
This log was last generated on Thu, 26 Jul 2018 23:53:43 GMT and should not be manually modified.
This log was last generated on Wed, 01 Aug 2018 21:02:43 GMT and should not be manually modified.
## 1.5.5
Wed, 01 Aug 2018 21:02:43 GMT
### Patches
- Updating OfficeYamlDocumenter to append snippets to non-empty sections
## 1.5.4

@@ -6,0 +13,0 @@ Thu, 26 Jul 2018 23:53:43 GMT

@@ -21,2 +21,3 @@ import { DocItemSet } from '../utils/DocItemSet';

private _fixEscapedCode(text);
private _generateExampleSnippetText(snippets);
}

33

lib/yaml/OfficeYamlDocumenter.js

@@ -70,14 +70,15 @@ "use strict";

delete this._snippets[nameWithoutPackage];
if (!yamlItem.remarks) {
yamlItem.remarks = '';
const snippetText = this._generateExampleSnippetText(snippets);
if (yamlItem.remarks) {
yamlItem.remarks += snippetText;
}
yamlItem.remarks += '\n\n#### Examples\n';
for (const snippet of snippets) {
if (snippet.search(/await/) === -1) {
yamlItem.remarks += '\n```javascript\n' + snippet + '\n```\n';
else if (yamlItem.syntax && yamlItem.syntax.return) {
if (!yamlItem.syntax.return.description) {
yamlItem.syntax.return.description = '';
}
else {
yamlItem.remarks += '\n```typescript\n' + snippet + '\n```\n';
}
yamlItem.syntax.return.description += snippetText;
}
else {
yamlItem.remarks = snippetText;
}
}

@@ -122,2 +123,16 @@ }

}
_generateExampleSnippetText(snippets) {
const text = ['\n#### Examples\n'];
for (const snippet of snippets) {
if (snippet.search(/await/) === -1) {
text.push('```javascript');
}
else {
text.push('```typescript');
}
text.push(snippet);
text.push('```');
}
return text.join('\n');
}
}

@@ -124,0 +139,0 @@ exports.OfficeYamlDocumenter = OfficeYamlDocumenter;

{
"name": "@microsoft/api-documenter",
"version": "1.5.4",
"version": "1.5.5",
"description": "Read JSON files from api-extractor, generate documentation pages",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc