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.4.2 to 1.4.3

12

CHANGELOG.json

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

{
"version": "1.4.3",
"tag": "@microsoft/api-documenter_v1.4.3",
"date": "Thu, 12 Jul 2018 16:03:26 GMT",
"comments": {
"patch": [
{
"comment": "Changing Office's APIExtractor add-on to unescape characters in code blocks"
}
]
}
},
{
"version": "1.4.2",

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

9

CHANGELOG.md
# Change Log - @microsoft/api-documenter
This log was last generated on Tue, 03 Jul 2018 21:03:31 GMT and should not be manually modified.
This log was last generated on Thu, 12 Jul 2018 16:03:26 GMT and should not be manually modified.
## 1.4.3
Thu, 12 Jul 2018 16:03:26 GMT
### Patches
- Changing Office's APIExtractor add-on to unescape characters in code blocks
## 1.4.2

@@ -6,0 +13,0 @@ Tue, 03 Jul 2018 21:03:31 GMT

2

lib/yaml/OfficeYamlDocumenter.d.ts

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

private _fixCodeTicks(text);
private _fixCodeArrows(text);
private _fixEscapedCode(text);
}

@@ -48,18 +48,2 @@ "use strict";

const nameWithoutPackage = yamlItem.uid.replace(/^[^.]+\./, '');
const snippets = this._snippets[nameWithoutPackage];
if (snippets) {
delete this._snippets[nameWithoutPackage];
if (!yamlItem.remarks) {
yamlItem.remarks = '';
}
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 {
yamlItem.remarks += '\n```typescript\n' + snippet + '\n```\n';
}
}
}
if (yamlItem.summary) {

@@ -74,3 +58,3 @@ yamlItem.summary = this._fixupApiSet(yamlItem.summary, yamlItem.uid);

yamlItem.remarks = this._fixCodeTicks(yamlItem.remarks);
yamlItem.remarks = this._fixCodeArrows(yamlItem.remarks);
yamlItem.remarks = this._fixEscapedCode(yamlItem.remarks);
}

@@ -85,2 +69,18 @@ if (yamlItem.syntax && yamlItem.syntax.parameters) {

}
const snippets = this._snippets[nameWithoutPackage];
if (snippets) {
delete this._snippets[nameWithoutPackage];
if (!yamlItem.remarks) {
yamlItem.remarks = '';
}
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 {
yamlItem.remarks += '\n```typescript\n' + snippet + '\n```\n';
}
}
}
}

@@ -112,4 +112,13 @@ _fixupApiSet(markup, uid) {

}
_fixCodeArrows(text) {
return node_core_library_1.Text.replaceAll(text, '=>', '=>');
_fixEscapedCode(text) {
const backtickIndex = text.indexOf('`');
if (text.indexOf('`', backtickIndex) > 0) {
text = node_core_library_1.Text.replaceAll(text, '=>', '=>');
let x = text.indexOf('\\', backtickIndex);
while (x >= 0) {
text = text.replace(/\\([^\\])/, '$1');
x = text.indexOf('\\', x + 1);
}
}
return text;
}

@@ -116,0 +125,0 @@ }

{
"name": "@microsoft/api-documenter",
"version": "1.4.2",
"version": "1.4.3",
"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