@microsoft/api-documenter 7.20.0 → 7.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -204,17 +204,17 @@ class MarkdownEmitter {
|
|
|
204
204
|
break;
|
|
205
205
|
}
|
|
206
206
|
if (context.boldRequested) {
|
|
207
|
-
writer.write('
|
|
207
|
+
writer.write('**');
|
|
208
208
|
}
|
|
209
209
|
if (context.italicRequested) {
|
|
210
|
-
writer.write('
|
|
210
|
+
writer.write('_');
|
|
211
211
|
}
|
|
212
212
|
writer.write(this.getEscapedText(middle));
|
|
213
213
|
if (context.italicRequested) {
|
|
214
|
-
writer.write('
|
|
214
|
+
writer.write('_');
|
|
215
215
|
}
|
|
216
216
|
if (context.boldRequested) {
|
|
217
|
-
writer.write('
|
|
217
|
+
writer.write('**');
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
writer.write(parts[3]); // write trailing whitespace
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownEmitter.js","sourceRoot":"","sources":["../../src/markdown/MarkdownEmitter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,4CAgB0B;AAC1B,oEAA6D;AAE7D,4DAAyD;AAiBzD;;;GAGG;AACH,MAAa,eAAe;IACnB,IAAI,CAAC,aAA4B,EAAE,OAAgB,EAAE,OAAgC;QAC1F,MAAM,MAAM,GAAmB,IAAI,+BAAc,CAAC,aAAa,CAAC,CAAC;QAEjE,MAAM,OAAO,GAA4B;YACvC,MAAM;YACN,WAAW,EAAE,KAAK;YAElB,aAAa,EAAE,KAAK;YACpB,eAAe,EAAE,KAAK;YAEtB,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,KAAK;YAEpB,OAAO;SACR,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAExC,MA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C,aAAa,EAAE;gBACzB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACrB;YACD,IAAI,OAAO,CAAC,eAAe,EAAE;gBAC3B,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACrB;YAED,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;YAE1C,IAAI,OAAO,CAAC,eAAe,EAAE;gBAC3B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;aACtB;YACD,IAAI,OAAO,CAAC,aAAa,EAAE;gBACzB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;aACtB;SACF;QAED,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,4BAA4B;IACtD,CAAC;IAES,UAAU,CAAC,QAAgC,EAAE,OAAgC;QACrF,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC9B,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SACvD;IACH,CAAC;CACF;AAzOD,0CAyOC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DocNode,\n DocNodeKind,\n StringBuilder,\n DocPlainText,\n DocHtmlStartTag,\n DocHtmlEndTag,\n DocCodeSpan,\n DocLinkTag,\n DocParagraph,\n DocFencedCode,\n DocSection,\n DocNodeTransforms,\n DocEscapedText,\n DocErrorText,\n DocBlockTag\n} from '@microsoft/tsdoc';\nimport { InternalError } from '@rushstack/node-core-library';\n\nimport { IndentedWriter } from '../utils/IndentedWriter';\n\nexport interface IMarkdownEmitterOptions {}\n\nexport interface IMarkdownEmitterContext<TOptions = IMarkdownEmitterOptions> {\n writer: IndentedWriter;\n insideTable: boolean;\n\n boldRequested: boolean;\n italicRequested: boolean;\n\n writingBold: boolean;\n writingItalic: boolean;\n\n options: TOptions;\n}\n\n/**\n * Renders MarkupElement content in the Markdown file format.\n * For more info: https://en.wikipedia.org/wiki/Markdown\n */\nexport class MarkdownEmitter {\n public emit(stringBuilder: StringBuilder, docNode: DocNode, options: IMarkdownEmitterOptions): string {\n const writer: IndentedWriter = new IndentedWriter(stringBuilder);\n\n const context: IMarkdownEmitterContext = {\n writer,\n insideTable: false,\n\n boldRequested: false,\n italicRequested: false,\n\n writingBold: false,\n writingItalic: false,\n\n options\n };\n\n this.writeNode(docNode, context, false);\n\n writer.ensureNewLine(); // finish the last line\n\n return writer.toString();\n }\n\n protected getEscapedText(text: string): string {\n const textWithBackslashes: string = text\n .replace(/\\\\/g, '\\\\\\\\') // first replace the escape character\n .replace(/[*#[\\]_|`~]/g, (x) => '\\\\' + x) // then escape any special characters\n .replace(/---/g, '\\\\-\\\\-\\\\-') // hyphens only if it's 3 or more\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n return textWithBackslashes;\n }\n\n protected getTableEscapedText(text: string): string {\n return text\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\\|/g, '|');\n }\n\n /**\n * @virtual\n */\n protected writeNode(docNode: DocNode, context: IMarkdownEmitterContext, docNodeSiblings: boolean): void {\n const writer: IndentedWriter = context.writer;\n\n switch (docNode.kind) {\n case DocNodeKind.PlainText: {\n const docPlainText: DocPlainText = docNode as DocPlainText;\n this.writePlainText(docPlainText.text, context);\n break;\n }\n case DocNodeKind.HtmlStartTag:\n case DocNodeKind.HtmlEndTag: {\n const docHtmlTag: DocHtmlStartTag | DocHtmlEndTag = docNode as DocHtmlStartTag | DocHtmlEndTag;\n // write the HTML element verbatim into the output\n writer.write(docHtmlTag.emitAsHtml());\n break;\n }\n case DocNodeKind.CodeSpan: {\n const docCodeSpan: DocCodeSpan = docNode as DocCodeSpan;\n if (context.insideTable) {\n writer.write('<code>');\n } else {\n writer.write('`');\n }\n if (context.insideTable) {\n const code: string = this.getTableEscapedText(docCodeSpan.code);\n const parts: string[] = code.split(/\\r?\\n/g);\n writer.write(parts.join('</code><br/><code>'));\n } else {\n writer.write(docCodeSpan.code);\n }\n if (context.insideTable) {\n writer.write('</code>');\n } else {\n writer.write('`');\n }\n break;\n }\n case DocNodeKind.LinkTag: {\n const docLinkTag: DocLinkTag = docNode as DocLinkTag;\n if (docLinkTag.codeDestination) {\n this.writeLinkTagWithCodeDestination(docLinkTag, context);\n } else if (docLinkTag.urlDestination) {\n this.writeLinkTagWithUrlDestination(docLinkTag, context);\n } else if (docLinkTag.linkText) {\n this.writePlainText(docLinkTag.linkText, context);\n }\n break;\n }\n case DocNodeKind.Paragraph: {\n const docParagraph: DocParagraph = docNode as DocParagraph;\n const trimmedParagraph: DocParagraph = DocNodeTransforms.trimSpacesInParagraph(docParagraph);\n if (context.insideTable) {\n if (docNodeSiblings) {\n // This tentative write is necessary to avoid writing empty paragraph tags (i.e. `<p></p>`). At the\n // time this code runs, we do not know whether the `writeNodes` call below will actually write\n // anything. Thus, we want to only write a `<p>` tag (as well as eventually a corresponding\n // `</p>` tag) if something ends up being written within the tags.\n writer.writeTentative('<p>', '</p>', () => {\n this.writeNodes(trimmedParagraph.nodes, context);\n });\n } else {\n // Special case: If we are the only element inside this table cell, then we can omit the <p></p> container.\n this.writeNodes(trimmedParagraph.nodes, context);\n }\n } else {\n this.writeNodes(trimmedParagraph.nodes, context);\n writer.ensureNewLine();\n writer.writeLine();\n }\n break;\n }\n case DocNodeKind.FencedCode: {\n const docFencedCode: DocFencedCode = docNode as DocFencedCode;\n writer.ensureNewLine();\n writer.write('```');\n writer.write(docFencedCode.language);\n writer.writeLine();\n writer.write(docFencedCode.code);\n writer.ensureNewLine();\n writer.writeLine('```');\n break;\n }\n case DocNodeKind.Section: {\n const docSection: DocSection = docNode as DocSection;\n this.writeNodes(docSection.nodes, context);\n break;\n }\n case DocNodeKind.SoftBreak: {\n if (!/^\\s?$/.test(writer.peekLastCharacter())) {\n writer.write(' ');\n }\n break;\n }\n case DocNodeKind.EscapedText: {\n const docEscapedText: DocEscapedText = docNode as DocEscapedText;\n this.writePlainText(docEscapedText.decodedText, context);\n break;\n }\n case DocNodeKind.ErrorText: {\n const docErrorText: DocErrorText = docNode as DocErrorText;\n this.writePlainText(docErrorText.text, context);\n break;\n }\n case DocNodeKind.InlineTag: {\n break;\n }\n case DocNodeKind.BlockTag: {\n const tagNode: DocBlockTag = docNode as DocBlockTag;\n console.warn('Unsupported block tag: ' + tagNode.tagName);\n break;\n }\n default:\n throw new InternalError('Unsupported DocNodeKind kind: ' + docNode.kind);\n }\n }\n\n /** @virtual */\n protected writeLinkTagWithCodeDestination(docLinkTag: DocLinkTag, context: IMarkdownEmitterContext): void {\n // The subclass needs to implement this to support code destinations\n throw new InternalError('writeLinkTagWithCodeDestination()');\n }\n\n /** @virtual */\n protected writeLinkTagWithUrlDestination(docLinkTag: DocLinkTag, context: IMarkdownEmitterContext): void {\n const linkText: string =\n docLinkTag.linkText !== undefined ? docLinkTag.linkText : docLinkTag.urlDestination!;\n\n const encodedLinkText: string = this.getEscapedText(linkText.replace(/\\s+/g, ' '));\n\n context.writer.write('[');\n context.writer.write(encodedLinkText);\n context.writer.write(`](${docLinkTag.urlDestination!})`);\n }\n\n protected writePlainText(text: string, context: IMarkdownEmitterContext): void {\n const writer: IndentedWriter = context.writer;\n\n // split out the [ leading whitespace, content, trailing whitespace ]\n const parts: string[] = text.match(/^(\\s*)(.*?)(\\s*)$/) || [];\n\n writer.write(parts[1]); // write leading whitespace\n\n const middle: string = parts[2];\n\n if (middle !== '') {\n switch (writer.peekLastCharacter()) {\n case '':\n case '\\n':\n case ' ':\n case '[':\n case '>':\n // okay to put a symbol\n break;\n default:\n // This is no problem: \"**one** *two* **three**\"\n // But this is trouble: \"**one***two***three**\"\n // The most general solution: \"**one**<!-- -->*two*<!-- -->**three**\"\n writer.write('<!-- -->');\n break;\n }\n\n if (context.boldRequested) {\n writer.write('<b>');\n }\n if (context.italicRequested) {\n writer.write('<i>');\n }\n\n writer.write(this.getEscapedText(middle));\n\n if (context.italicRequested) {\n writer.write('</i>');\n }\n if (context.boldRequested) {\n writer.write('</b>');\n }\n }\n\n writer.write(parts[3]); // write trailing whitespace\n }\n\n protected writeNodes(docNodes: ReadonlyArray<DocNode>, context: IMarkdownEmitterContext): void {\n for (const docNode of docNodes) {\n this.writeNode(docNode, context, docNodes.length > 1);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MarkdownEmitter.js","sourceRoot":"","sources":["../../src/markdown/MarkdownEmitter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,4CAgB0B;AAC1B,oEAA6D;AAE7D,4DAAyD;AAiBzD;;;GAGG;AACH,MAAa,eAAe;IACnB,IAAI,CAAC,aAA4B,EAAE,OAAgB,EAAE,OAAgC;QAC1F,MAAM,MAAM,GAAmB,IAAI,+BAAc,CAAC,aAAa,CAAC,CAAC;QAEjE,MAAM,OAAO,GAA4B;YACvC,MAAM;YACN,WAAW,EAAE,KAAK;YAElB,aAAa,EAAE,KAAK;YACpB,eAAe,EAAE,KAAK;YAEtB,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,KAAK;YAEpB,OAAO;SACR,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAExC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,uBAAuB;QAE/C,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAES,cAAc,CAAC,IAAY;QACnC,MAAM,mBAAmB,GAAW,IAAI;aACrC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,qCAAqC;aAC5D,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,qCAAqC;aAC9E,OAAO,CAAC,MAAM,EA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AI,OAAO,CAAC,aAAa,EAAE;gBACzB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aACpB;SACF;QAED,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,4BAA4B;IACtD,CAAC;IAES,UAAU,CAAC,QAAgC,EAAE,OAAgC;QACrF,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC9B,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SACvD;IACH,CAAC;CACF;AAzOD,0CAyOC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DocNode,\n DocNodeKind,\n StringBuilder,\n DocPlainText,\n DocHtmlStartTag,\n DocHtmlEndTag,\n DocCodeSpan,\n DocLinkTag,\n DocParagraph,\n DocFencedCode,\n DocSection,\n DocNodeTransforms,\n DocEscapedText,\n DocErrorText,\n DocBlockTag\n} from '@microsoft/tsdoc';\nimport { InternalError } from '@rushstack/node-core-library';\n\nimport { IndentedWriter } from '../utils/IndentedWriter';\n\nexport interface IMarkdownEmitterOptions {}\n\nexport interface IMarkdownEmitterContext<TOptions = IMarkdownEmitterOptions> {\n writer: IndentedWriter;\n insideTable: boolean;\n\n boldRequested: boolean;\n italicRequested: boolean;\n\n writingBold: boolean;\n writingItalic: boolean;\n\n options: TOptions;\n}\n\n/**\n * Renders MarkupElement content in the Markdown file format.\n * For more info: https://en.wikipedia.org/wiki/Markdown\n */\nexport class MarkdownEmitter {\n public emit(stringBuilder: StringBuilder, docNode: DocNode, options: IMarkdownEmitterOptions): string {\n const writer: IndentedWriter = new IndentedWriter(stringBuilder);\n\n const context: IMarkdownEmitterContext = {\n writer,\n insideTable: false,\n\n boldRequested: false,\n italicRequested: false,\n\n writingBold: false,\n writingItalic: false,\n\n options\n };\n\n this.writeNode(docNode, context, false);\n\n writer.ensureNewLine(); // finish the last line\n\n return writer.toString();\n }\n\n protected getEscapedText(text: string): string {\n const textWithBackslashes: string = text\n .replace(/\\\\/g, '\\\\\\\\') // first replace the escape character\n .replace(/[*#[\\]_|`~]/g, (x) => '\\\\' + x) // then escape any special characters\n .replace(/---/g, '\\\\-\\\\-\\\\-') // hyphens only if it's 3 or more\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n return textWithBackslashes;\n }\n\n protected getTableEscapedText(text: string): string {\n return text\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\\|/g, '|');\n }\n\n /**\n * @virtual\n */\n protected writeNode(docNode: DocNode, context: IMarkdownEmitterContext, docNodeSiblings: boolean): void {\n const writer: IndentedWriter = context.writer;\n\n switch (docNode.kind) {\n case DocNodeKind.PlainText: {\n const docPlainText: DocPlainText = docNode as DocPlainText;\n this.writePlainText(docPlainText.text, context);\n break;\n }\n case DocNodeKind.HtmlStartTag:\n case DocNodeKind.HtmlEndTag: {\n const docHtmlTag: DocHtmlStartTag | DocHtmlEndTag = docNode as DocHtmlStartTag | DocHtmlEndTag;\n // write the HTML element verbatim into the output\n writer.write(docHtmlTag.emitAsHtml());\n break;\n }\n case DocNodeKind.CodeSpan: {\n const docCodeSpan: DocCodeSpan = docNode as DocCodeSpan;\n if (context.insideTable) {\n writer.write('<code>');\n } else {\n writer.write('`');\n }\n if (context.insideTable) {\n const code: string = this.getTableEscapedText(docCodeSpan.code);\n const parts: string[] = code.split(/\\r?\\n/g);\n writer.write(parts.join('</code><br/><code>'));\n } else {\n writer.write(docCodeSpan.code);\n }\n if (context.insideTable) {\n writer.write('</code>');\n } else {\n writer.write('`');\n }\n break;\n }\n case DocNodeKind.LinkTag: {\n const docLinkTag: DocLinkTag = docNode as DocLinkTag;\n if (docLinkTag.codeDestination) {\n this.writeLinkTagWithCodeDestination(docLinkTag, context);\n } else if (docLinkTag.urlDestination) {\n this.writeLinkTagWithUrlDestination(docLinkTag, context);\n } else if (docLinkTag.linkText) {\n this.writePlainText(docLinkTag.linkText, context);\n }\n break;\n }\n case DocNodeKind.Paragraph: {\n const docParagraph: DocParagraph = docNode as DocParagraph;\n const trimmedParagraph: DocParagraph = DocNodeTransforms.trimSpacesInParagraph(docParagraph);\n if (context.insideTable) {\n if (docNodeSiblings) {\n // This tentative write is necessary to avoid writing empty paragraph tags (i.e. `<p></p>`). At the\n // time this code runs, we do not know whether the `writeNodes` call below will actually write\n // anything. Thus, we want to only write a `<p>` tag (as well as eventually a corresponding\n // `</p>` tag) if something ends up being written within the tags.\n writer.writeTentative('<p>', '</p>', () => {\n this.writeNodes(trimmedParagraph.nodes, context);\n });\n } else {\n // Special case: If we are the only element inside this table cell, then we can omit the <p></p> container.\n this.writeNodes(trimmedParagraph.nodes, context);\n }\n } else {\n this.writeNodes(trimmedParagraph.nodes, context);\n writer.ensureNewLine();\n writer.writeLine();\n }\n break;\n }\n case DocNodeKind.FencedCode: {\n const docFencedCode: DocFencedCode = docNode as DocFencedCode;\n writer.ensureNewLine();\n writer.write('```');\n writer.write(docFencedCode.language);\n writer.writeLine();\n writer.write(docFencedCode.code);\n writer.ensureNewLine();\n writer.writeLine('```');\n break;\n }\n case DocNodeKind.Section: {\n const docSection: DocSection = docNode as DocSection;\n this.writeNodes(docSection.nodes, context);\n break;\n }\n case DocNodeKind.SoftBreak: {\n if (!/^\\s?$/.test(writer.peekLastCharacter())) {\n writer.write(' ');\n }\n break;\n }\n case DocNodeKind.EscapedText: {\n const docEscapedText: DocEscapedText = docNode as DocEscapedText;\n this.writePlainText(docEscapedText.decodedText, context);\n break;\n }\n case DocNodeKind.ErrorText: {\n const docErrorText: DocErrorText = docNode as DocErrorText;\n this.writePlainText(docErrorText.text, context);\n break;\n }\n case DocNodeKind.InlineTag: {\n break;\n }\n case DocNodeKind.BlockTag: {\n const tagNode: DocBlockTag = docNode as DocBlockTag;\n console.warn('Unsupported block tag: ' + tagNode.tagName);\n break;\n }\n default:\n throw new InternalError('Unsupported DocNodeKind kind: ' + docNode.kind);\n }\n }\n\n /** @virtual */\n protected writeLinkTagWithCodeDestination(docLinkTag: DocLinkTag, context: IMarkdownEmitterContext): void {\n // The subclass needs to implement this to support code destinations\n throw new InternalError('writeLinkTagWithCodeDestination()');\n }\n\n /** @virtual */\n protected writeLinkTagWithUrlDestination(docLinkTag: DocLinkTag, context: IMarkdownEmitterContext): void {\n const linkText: string =\n docLinkTag.linkText !== undefined ? docLinkTag.linkText : docLinkTag.urlDestination!;\n\n const encodedLinkText: string = this.getEscapedText(linkText.replace(/\\s+/g, ' '));\n\n context.writer.write('[');\n context.writer.write(encodedLinkText);\n context.writer.write(`](${docLinkTag.urlDestination!})`);\n }\n\n protected writePlainText(text: string, context: IMarkdownEmitterContext): void {\n const writer: IndentedWriter = context.writer;\n\n // split out the [ leading whitespace, content, trailing whitespace ]\n const parts: string[] = text.match(/^(\\s*)(.*?)(\\s*)$/) || [];\n\n writer.write(parts[1]); // write leading whitespace\n\n const middle: string = parts[2];\n\n if (middle !== '') {\n switch (writer.peekLastCharacter()) {\n case '':\n case '\\n':\n case ' ':\n case '[':\n case '>':\n // okay to put a symbol\n break;\n default:\n // This is no problem: \"**one** *two* **three**\"\n // But this is trouble: \"**one***two***three**\"\n // The most general solution: \"**one**<!-- -->*two*<!-- -->**three**\"\n writer.write('<!-- -->');\n break;\n }\n\n if (context.boldRequested) {\n writer.write('**');\n }\n if (context.italicRequested) {\n writer.write('_');\n }\n\n writer.write(this.getEscapedText(middle));\n\n if (context.italicRequested) {\n writer.write('_');\n }\n if (context.boldRequested) {\n writer.write('**');\n }\n }\n\n writer.write(parts[3]); // write trailing whitespace\n }\n\n protected writeNodes(docNodes: ReadonlyArray<DocNode>, context: IMarkdownEmitterContext): void {\n for (const docNode of docNodes) {\n this.writeNode(docNode, context, docNodes.length > 1);\n }\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/api-documenter",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.21.0",
|
|
4
4
|
"description": "Read JSON files from api-extractor, generate documentation pages",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,22 +15,22 @@
|
|
|
15
15
|
"main": "lib/index.js",
|
|
16
16
|
"typings": "dist/rollup.d.ts",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@microsoft/api-extractor-model": "7.26.0",
|
|
19
18
|
"@microsoft/tsdoc": "0.14.2",
|
|
20
|
-
"@rushstack/node-core-library": "3.53.3",
|
|
21
|
-
"@rushstack/ts-command-line": "4.13.1",
|
|
22
19
|
"colors": "~1.2.1",
|
|
23
20
|
"js-yaml": "~3.13.1",
|
|
24
|
-
"resolve": "~1.22.1"
|
|
21
|
+
"resolve": "~1.22.1",
|
|
22
|
+
"@microsoft/api-extractor-model": "7.26.0",
|
|
23
|
+
"@rushstack/node-core-library": "3.53.3",
|
|
24
|
+
"@rushstack/ts-command-line": "4.13.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@rushstack/eslint-config": "3.1.1",
|
|
28
|
-
"@rushstack/heft": "0.49.2",
|
|
29
|
-
"@rushstack/heft-node-rig": "1.11.13",
|
|
30
27
|
"@types/heft-jest": "1.0.1",
|
|
31
28
|
"@types/js-yaml": "3.12.1",
|
|
32
29
|
"@types/node": "12.20.24",
|
|
33
|
-
"@types/resolve": "1.20.2"
|
|
30
|
+
"@types/resolve": "1.20.2",
|
|
31
|
+
"@rushstack/eslint-config": "3.1.1",
|
|
32
|
+
"@rushstack/heft": "0.49.3",
|
|
33
|
+
"@rushstack/heft-node-rig": "1.11.14"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "heft build --clean",
|