Socket
Socket
Sign inDemoInstall

@microsoft/api-extractor

Package Overview
Dependencies
Maintainers
2
Versions
487
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/api-extractor - npm Package Compare versions

Comparing version 3.3.0 to 3.4.0

31

CHANGELOG.json

@@ -5,2 +5,33 @@ {

{
"version": "3.4.0",
"tag": "@microsoft/api-extractor_v3.4.0",
"date": "Thu, 28 Sep 2017 01:04:28 GMT",
"comments": {
"patch": [
{
"author": "pgonzal <pgonzal@users.noreply.github.com>",
"commit": "8e0010db430e7d6b84d12f38c5c1669c94ccf30e",
"comment": "The *.api.json \"linkDocElement\" type now always explicitly specifies the package name, rather than expecting the reader to infer it"
},
{
"author": "pgonzal <pgonzal@users.noreply.github.com>",
"commit": "8e0010db430e7d6b84d12f38c5c1669c94ccf30e",
"comment": "The *.api.json file format now exposes \"signature\" information for properties, functions, and module variables"
}
],
"minor": [
{
"author": "pgonzal <pgonzal@users.noreply.github.com>",
"commit": "0309dea3eb9f78162f85d59ae4fbf5f1b6f4ea31",
"comment": "Skipping two lines in an AEDoc comment now creates a paragraph separator for the generated documentation"
}
],
"dependency": [
{
"comment": "Updating dependency \"@microsoft/node-core-library\" from `~0.3.0` to `~0.3.1`"
}
]
}
},
{
"version": "3.3.0",

@@ -7,0 +38,0 @@ "tag": "@microsoft/api-extractor_v3.3.0",

14

CHANGELOG.md
# Change Log - @microsoft/api-extractor
This log was last generated on Fri, 22 Sep 2017 01:04:02 GMT and should not be manually modified.
This log was last generated on Thu, 28 Sep 2017 01:04:28 GMT and should not be manually modified.
## 3.4.0
Thu, 28 Sep 2017 01:04:28 GMT
### Minor changes
- Skipping two lines in an AEDoc comment now creates a paragraph separator for the generated documentation
### Patches
- The *.api.json "linkDocElement" type now always explicitly specifies the package name, rather than expecting the reader to infer it
- The *.api.json file format now exposes "signature" information for properties, functions, and module variables
## 3.3.0

@@ -6,0 +18,0 @@ Fri, 22 Sep 2017 01:04:02 GMT

24

lib/aedoc/ApiDocumentation.js

@@ -43,3 +43,3 @@ "use strict";

const tokenizer = new Tokenizer_1.default(this.originalAedoc, this.reportError);
this.summary = DocElementParser_1.default.parse(this, tokenizer);
this.summary = DocElementParser_1.default.getTrimmedSpan(DocElementParser_1.default.parse(this, tokenizer));
let releaseTagCount = 0;

@@ -65,3 +65,3 @@ let parsing = true;

this._checkInheritDocStatus(token.tag);
this.remarks = DocElementParser_1.default.parse(this, tokenizer);
this.remarks = DocElementParser_1.default.getTrimmedSpan(DocElementParser_1.default.parse(this, tokenizer));
break;

@@ -71,3 +71,3 @@ case '@returns':

this._checkInheritDocStatus(token.tag);
this.returnsMessage = DocElementParser_1.default.parse(this, tokenizer);
this.returnsMessage = DocElementParser_1.default.getTrimmedSpan(DocElementParser_1.default.parse(this, tokenizer));
break;

@@ -84,3 +84,3 @@ case '@param':

tokenizer.getToken();
this.deprecatedMessage = DocElementParser_1.default.parse(this, tokenizer);
this.deprecatedMessage = DocElementParser_1.default.getTrimmedSpan(DocElementParser_1.default.parse(this, tokenizer));
if (!this.deprecatedMessage || this.deprecatedMessage.length === 0) {

@@ -148,9 +148,11 @@ this.reportError(`deprecated description required after @deprecated AEDoc tag.`);

tokenizer.getToken();
// Shorten "This is too long text" to "This is..."
const MAX_LENGTH = 40;
let problemText = token.text.trim();
if (problemText.length > MAX_LENGTH) {
problemText = problemText.substr(0, MAX_LENGTH - 3).trim() + '...';
if (token.text.trim().length) {
// Shorten "This is too long text" to "This is..."
const MAX_LENGTH = 40;
let problemText = token.text.trim();
if (problemText.length > MAX_LENGTH) {
problemText = problemText.substr(0, MAX_LENGTH - 3).trim() + '...';
}
this.reportError(`Unexpected text in AEDoc comment: "${problemText}"`);
}
this.reportError(`Unexpected text in AEDoc comment: "${problemText}"`);
}

@@ -196,3 +198,3 @@ else {

name: name,
description: descriptionElements
description: DocElementParser_1.default.getTrimmedSpan(descriptionElements)
};

@@ -199,0 +201,0 @@ return paramDocElement;

@@ -37,9 +37,2 @@ import Token from './Token';

protected _tokenizeInline(docEntry: string): Token;
/**
* Trims whitespace on either end of the entry (which is just a string within the doc comments),
* replaces \r and \n's with single whitespace, and removes empty entries.
*
* @param docEntries - Array of doc strings to be sanitized
*/
private _sanitizeDocEntries(docEntries);
}

@@ -37,18 +37,19 @@ "use strict";

}
const docEntries = TypeScriptHelpers_1.default.splitStringWithRegEx(docs, Tokenizer._aedocTagsRegex);
const sanitizedTokens = this._sanitizeDocEntries(docEntries); // remove white space and empty entries
const docEntries = TypeScriptHelpers_1.default.splitStringWithRegEx(docs.replace(/\r/g, ''), // CRLF -> LF
Tokenizer._aedocTagsRegex);
// process each sanitized doc string to a Token object
const tokens = [];
let value;
for (let i = 0; i < sanitizedTokens.length; i++) {
for (let i = 0; i < docEntries.length; i++) {
let token;
value = sanitizedTokens[i];
if (value.charAt(0) === '@') {
token = new Token_1.default(Token_1.TokenType.BlockTag, value);
const untrimmed = docEntries[i];
const trimmed = untrimmed.replace(/\s+/g, ' ').trim();
if (trimmed.charAt(0) === '@') {
token = new Token_1.default(Token_1.TokenType.BlockTag, trimmed);
}
else if (value.charAt(0) === '{' && value.charAt(value.length - 1) === '}') {
token = this._tokenizeInline(value); // Can return undefined if invalid inline tag
else if (trimmed.charAt(0) === '{' && trimmed.charAt(trimmed.length - 1) === '}') {
token = this._tokenizeInline(trimmed); // Can return undefined if invalid inline tag
}
else {
token = new Token_1.default(Token_1.TokenType.Text, '', value);
else if (untrimmed.length) {
// If it's not a tag, pass through the untrimmed text.
token = new Token_1.default(Token_1.TokenType.Text, '', untrimmed);
}

@@ -103,20 +104,2 @@ if (token) {

}
/**
* Trims whitespace on either end of the entry (which is just a string within the doc comments),
* replaces \r and \n's with single whitespace, and removes empty entries.
*
* @param docEntries - Array of doc strings to be sanitized
*/
_sanitizeDocEntries(docEntries) {
const result = [];
for (let entry of docEntries) {
entry = entry.replace(/\s+/g, ' ');
entry = entry.trim();
if (entry === '') {
continue;
}
result.push(entry);
}
return result;
}
}

@@ -123,0 +106,0 @@ /**

@@ -31,2 +31,18 @@ {

//---------------------------------------------------------------------------------------------
"paragraphDocElement": {
"description": "A documentation element representing a break between paragraphs",
"type": "object",
"properties": {
"kind": {
"description": "The kind of documentation element",
"type": "string",
"enum": [ "paragraphDocElement" ]
}
},
"additionalProperties": false,
"required": [ "kind" ]
},
//---------------------------------------------------------------------------------------------
"linkDocElement": {

@@ -64,4 +80,5 @@ "description": "A documentation element representing a hyperlink",

"packageName": {
"description": "An optional name of the package where an export is located",
"type": "string"
"description": "The name of the package being referenced (must be a nonempty string)",
"type": "string",
"minLength": 1
},

@@ -94,2 +111,3 @@ "scopeName": {

{ "$ref": "#/definitions/textDocElement" },
{ "$ref": "#/definitions/paragraphDocElement" },
{ "$ref": "#/definitions/linkDocElement" }

@@ -111,2 +129,3 @@ ]

{ "$ref": "#/definitions/textDocElement" },
{ "$ref": "#/definitions/paragraphDocElement" },
{ "$ref": "#/definitions/linkDocElement" },

@@ -197,2 +216,6 @@ { "$ref": "#/definitions/seeDocElement" }

},
"signature": {
"description": "A text summary of the property definition",
"type": "string"
},
"isOptional": {

@@ -245,2 +268,6 @@ "description": "For an interface member, whether it is optional",

},
"signature": {
"description": "A text summary of the variable definition",
"type": "string"
},
"type": {

@@ -379,2 +406,6 @@ "description": "The data type of this module variable",

},
"signature": {
"description": "A text summary of the function definition",
"type": "string"
},
"parameters": {

@@ -381,0 +412,0 @@ "description": "The list of function parameters",

@@ -117,2 +117,6 @@ import { IDocElement } from '../markup/OldMarkup';

/**
* a text summary of the method definition
*/
signature: string;
/**
* For an interface member, whether it is optional

@@ -178,2 +182,6 @@ */

/**
* a text summary of the method definition
*/
signature: string;
/**
* parameters of the function

@@ -197,2 +205,6 @@ */

/**
* a text summary of the method definition
*/
signature: string;
/**
* parameters of the function

@@ -199,0 +211,0 @@ */

@@ -24,3 +24,3 @@ "use strict";

// The scoped package name. (E.g. "@microsoft/api-extractor")
this.name = this.extractor.packageJsonLookup.getPackageName(this.extractor.packageFolder);
this.name = extractor.packageName;
const exportSymbols = this.typeChecker.getExportsOfModule(this.declarationSymbol);

@@ -27,0 +27,0 @@ if (exportSymbols) {

@@ -1,1 +0,12 @@

"[{\"kind\":\"textDocElement\",\"value\":\"This function parses docTokens for the apiLint website\"},{\"kind\":\"linkDocElement\",\"referenceType\":\"href\",\"targetUrl\":\"https://github.com/OfficeDev/office-ui-fabric-react\",\"value\":\"https://github.com/OfficeDev/office-ui-fabric-react\"}]"
[
{
"kind": "textDocElement",
"value": "This function parses docTokens for the apiLint website "
},
{
"kind": "linkDocElement",
"referenceType": "href",
"targetUrl": "https://github.com/OfficeDev/office-ui-fabric-react",
"value": "https://github.com/OfficeDev/office-ui-fabric-react"
}
]

@@ -1,1 +0,12 @@

"[{\"kind\":\"textDocElement\",\"value\":\"This function parses docTokens for the apiLint website\"},{\"kind\":\"linkDocElement\",\"referenceType\":\"href\",\"targetUrl\":\"https://github.com/OfficeDev/office-ui-fabric-react\",\"value\":\"https://github.com/OfficeDev/office-ui-fabric-react\"}]"
[
{
"kind": "textDocElement",
"value": "This function parses docTokens for the apiLint website "
},
{
"kind": "linkDocElement",
"referenceType": "href",
"targetUrl": "https://github.com/OfficeDev/office-ui-fabric-react",
"value": "https://github.com/OfficeDev/office-ui-fabric-react"
}
]

@@ -1,1 +0,6 @@

"[{\"kind\":\"textDocElement\",\"value\":\"- description of the deprecation\"}]"
[
{
"kind": "textDocElement",
"value": "- description of the deprecation"
}
]

@@ -1,1 +0,6 @@

"[{\"kind\":\"textDocElement\",\"value\":\"- description of the deprecation\"}]"
[
{
"kind": "textDocElement",
"value": "- description of the deprecation"
}
]

@@ -54,2 +54,8 @@ import { IDocElement, IHrefLinkElement, ICodeLinkElement } from './markup/OldMarkup';

static parseInheritDoc(documentation: ApiDocumentation, token: Token, warnings: string[]): void;
/**
* For a span that will not be displayed adjacent to another span, this cleans it up:
* 1. Remove leading/trailing white space
* 2. Remove leading/trailing paragraph separators
*/
static getTrimmedSpan(docElements: IDocElement[]): IDocElement[];
}

@@ -16,2 +16,5 @@ "use strict";

break;
case 'paragraphDocElement':
text += '\n\n';
break;
case 'linkDocElement':

@@ -34,3 +37,6 @@ // links don't count towards the summary

}
return { kind: 'textDocElement', value: text };
return {
kind: 'textDocElement',
value: text.replace(/\s+/g, ' ')
};
}

@@ -89,4 +95,19 @@ static parse(documentation, tokenizer) {

else if (token.type === Token_1.TokenType.Text) {
docElements.push({ kind: 'textDocElement', value: token.text });
tokenizer.getToken();
let firstLoop = true;
for (const paragraph of token.text.split(/\n\s*\n/g)) {
if (!firstLoop) {
docElements.push({
kind: 'paragraphDocElement'
});
}
firstLoop = false;
const normalizedParagraph = paragraph.replace(/\s+/g, ' ').trim();
if (normalizedParagraph) {
docElements.push({
kind: 'textDocElement',
value: ' ' + normalizedParagraph + ' '
});
}
}
}

@@ -162,2 +183,11 @@ else {

};
if (!linkDocElement.packageName) {
if (!documentation.extractor.packageName) {
throw new Error('Unable to resolve API reference without a package name');
}
// If the package name is unspecified, assume it is the current package
const scopePackageName = ApiDefinitionReference_1.default.parseScopedPackageName(documentation.extractor.packageName);
linkDocElement.scopeName = scopePackageName.scope;
linkDocElement.packageName = scopePackageName.package;
}
}

@@ -210,7 +240,5 @@ // If a display name is given, ensure it only contains characters for words.

if (!resolvedAstItem) {
const textDocItem = {
kind: 'textDocElement',
value: `See documentation for ${tokenChunks[0]}`
};
documentation.summary = [textDocItem];
documentation.summary = [
this.makeTextElement(`See documentation for ${tokenChunks[0]}`)
];
return;

@@ -249,2 +277,30 @@ }

}
/**
* For a span that will not be displayed adjacent to another span, this cleans it up:
* 1. Remove leading/trailing white space
* 2. Remove leading/trailing paragraph separators
*/
static getTrimmedSpan(docElements) {
const span = [];
span.push(...docElements);
// Pop leading/trailing paragraph separators
while (span.length && span[0].kind === 'paragraphDocElement') {
span.shift();
}
while (span.length && span[span.length - 1].kind === 'paragraphDocElement') {
span.pop();
}
// Trim leading/trailing white space
if (span.length) {
const first = span[0];
if (first.kind === 'textDocElement') {
first.value = first.value.replace(/^\s+/, ''); // trim left
}
const last = span[span.length - 1];
if (last.kind === 'textDocElement') {
last.value = last.value.replace(/\s+$/, ''); // trim right
}
}
return span;
}
}

@@ -251,0 +307,0 @@ /**

@@ -73,2 +73,3 @@ // WARNING: The underscore prefix ("_") should only be used with definitions that are explicitly marked as @internal

public myProp: number;
public paragraphTest(): void;
// (undocumented)

@@ -75,0 +76,0 @@ public test(): void;

@@ -24,2 +24,3 @@ {

"kind": "property",
"signature": "public propertyIsEnumerable: string;",
"isOptional": false,

@@ -48,2 +49,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "___lookupSetter__: __proto__;",
"isOptional": false,

@@ -101,2 +103,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "public aliasField: number;",
"isOptional": false,

@@ -113,2 +116,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "public readonly shouldBeReadOnly: number;",
"isOptional": false,

@@ -175,2 +179,3 @@ "isReadOnly": true,

"kind": "property",
"signature": "___lookupSetter__: __proto__;",
"isOptional": false,

@@ -199,2 +204,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "public field: number;",
"isOptional": false,

@@ -211,2 +217,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "public myProp: number;",
"isOptional": false,

@@ -221,2 +228,50 @@ "isReadOnly": false,

},
"paragraphTest": {
"kind": "method",
"signature": "public paragraphTest(): void;",
"accessModifier": "public",
"isOptional": false,
"isStatic": false,
"returnValue": {
"type": "void",
"description": []
},
"parameters": {},
"deprecatedMessage": [],
"summary": [
{
"kind": "textDocElement",
"value": "This is the first paragraph. "
},
{
"kind": "paragraphDocElement"
},
{
"kind": "textDocElement",
"value": " This is the "
},
{
"kind": "linkDocElement",
"referenceType": "code",
"scopeName": "",
"packageName": "example1",
"exportName": "MyClass",
"memberName": "",
"value": "MyClass"
},
{
"kind": "textDocElement",
"value": " paragraph. "
},
{
"kind": "paragraphDocElement"
},
{
"kind": "textDocElement",
"value": " This is the third paragraph"
}
],
"remarks": [],
"isBeta": false
},
"test": {

@@ -242,2 +297,3 @@ "kind": "method",

"kind": "function",
"signature": "export function publicFunction(param: number): string;",
"returnValue": {

@@ -244,0 +300,0 @@ "type": "string",

@@ -133,3 +133,3 @@ {

"kind": "textDocElement",
"value": "This is a class to test AEDoc parser and this is description that can span to multiple lines and we need to make sure we parse this block correctly. It can contain a"
"value": "This is a class to test AEDoc parser and this is description that can span to multiple lines and we need to make sure we parse this block correctly. It can contain a "
},

@@ -144,3 +144,3 @@ {

"kind": "textDocElement",
"value": ". This block is entirely valid and a correct documentation object should be built for this ApiItem."
"value": " . This block is entirely valid and a correct documentation object should be built for this ApiItem."
}

@@ -183,2 +183,3 @@ ],

"kind": "property",
"signature": "public betaTagMissingParam: string;",
"isOptional": false,

@@ -195,2 +196,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "public fieldWithBadTag: string;",
"isOptional": false,

@@ -212,2 +214,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "public fieldWithInvalidInlineTag: string;",
"isOptional": false,

@@ -234,2 +237,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "public fieldWithValidEscapedBraces: string;",
"isOptional": false,

@@ -243,7 +247,7 @@ "isReadOnly": false,

"kind": "textDocElement",
"value": "This doc has {curly braces} which is valid but the inline @link token is missing a pipe between the URL and the display text"
"value": "This doc has {curly braces} which is valid but the inline @link token is missing a pipe between the URL and the display text "
},
{
"kind": "textDocElement",
"value": "The displayName is not allowed to have non word characters."
"value": " The displayName is not allowed to have non word characters."
}

@@ -256,2 +260,3 @@ ],

"kind": "property",
"signature": "public linkTagMissingParam: string;",
"isOptional": false,

@@ -402,2 +407,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "public propertyTypeLiteralIncompleteTypes:",
"isOptional": false,

@@ -404,0 +410,0 @@ "isReadOnly": false,

@@ -83,2 +83,3 @@ {

"kind": "function",
"signature": "export function inheritLocalOptionTwoFunction(): void;",
"returnValue": {

@@ -116,2 +117,3 @@ "type": "void",

"kind": "property",
"signature": "thisIsTypeLiteral: [{name: string, age: number}];",
"isOptional": false,

@@ -150,2 +152,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "thisIsTypeLiteral:",
"isOptional": false,

@@ -217,2 +220,3 @@ "isReadOnly": false,

"kind": "function",
"signature": "export function jsonResolutionFunction(): boolean;",
"returnValue": {

@@ -318,3 +322,3 @@ "type": "boolean",

"kind": "textDocElement",
"value": "Here we test that an error is reported when attempting to link to an internal API item."
"value": "Here we test that an error is reported when attempting to link to an internal API item. "
},

@@ -324,4 +328,4 @@ {

"referenceType": "code",
"scopeName": "",
"packageName": "",
"scopeName": "@scope",
"packageName": "example3",
"exportName": "publicEnum",

@@ -334,4 +338,4 @@ "memberName": "",

"referenceType": "code",
"scopeName": "",
"packageName": "",
"scopeName": "@scope",
"packageName": "example3",
"exportName": "_internalEnum",

@@ -338,0 +342,0 @@ "memberName": "",

@@ -69,2 +69,3 @@ {

"kind": "property",
"signature": "public propOne: MissingExport;",
"isOptional": false,

@@ -160,2 +161,3 @@ "isReadOnly": false,

"kind": "property",
"signature": "public typeLiteralProp: [MissingExport];",
"isOptional": false,

@@ -206,2 +208,3 @@ "isReadOnly": false,

"kind": "module variable",
"signature": "booleanConstant1: boolean = true",
"type": "boolean",

@@ -216,2 +219,3 @@ "value": "true",

"kind": "module variable",
"signature": "numberConstant1: number = 24",
"type": "number",

@@ -231,2 +235,3 @@ "value": "24",

"kind": "module variable",
"signature": "stringConstant1: string = '\\uED68'",
"type": "string",

@@ -233,0 +238,0 @@ "value": "'\\uED68'",

@@ -61,2 +61,3 @@ import * as ts from 'typescript';

private _compilerOptions;
private _packageName;
private _packageFolder;

@@ -69,4 +70,8 @@ /**

/**
* Getter for the package folder that Extractor is analyzing.
* Returns the full name of the package being analyzed.
*/
readonly packageName: string;
/**
* Returns the folder for the package being analyzed.
*/
readonly packageFolder: string;

@@ -73,0 +78,0 @@ /**

@@ -32,4 +32,10 @@ "use strict";

/**
* Getter for the package folder that Extractor is analyzing.
* Returns the full name of the package being analyzed.
*/
get packageName() {
return this._packageName;
}
/**
* Returns the folder for the package being analyzed.
*/
get packageFolder() {

@@ -59,2 +65,3 @@ return this._packageFolder;

this._packageFolder = this.packageJsonLookup.tryGetPackageFolder(currentPath);
this._packageName = this.packageJsonLookup.getPackageName(this._packageFolder);
this.package = new AstPackage_1.default(this, rootFile); // construct members

@@ -61,0 +68,0 @@ this.package.completeInitialization(); // creates ApiDocumentation

@@ -137,2 +137,3 @@ "use strict";

kind: ApiJsonFile_1.default.convertKindToJson(astFunction.kind),
signature: astFunction.getDeclarationLine(),
returnValue: returnValueNode,

@@ -193,2 +194,3 @@ parameters: this._createParameters(astFunction),

kind: ApiJsonFile_1.default.convertKindToJson(astProperty.kind),
signature: astProperty.getDeclarationLine(),
isOptional: !!astProperty.isOptional,

@@ -208,2 +210,3 @@ isReadOnly: !!astProperty.isReadOnly,

kind: ApiJsonFile_1.default.convertKindToJson(astModuleVariable.kind),
signature: astModuleVariable.getDeclarationLine(),
type: astModuleVariable.type,

@@ -210,0 +213,0 @@ value: astModuleVariable.value,

@@ -70,2 +70,9 @@ /**

/**
* A paragrpah separator, similar to <p /> in HTML.
* @alpha
*/
export interface IParagraphElement extends IBaseDocElement {
kind: 'paragraphDocElement';
}
/**
* An element that denotes one of more elements to see for reference.

@@ -94,2 +101,2 @@ *

/** @alpha */
export declare type IDocElement = ITextElement | ILinkDocElement | ISeeDocElement;
export declare type IDocElement = ITextElement | ILinkDocElement | IParagraphElement | ISeeDocElement;

@@ -1,1 +0,15 @@

"{\"name\":\"x\",\"description\":[{\"kind\":\"textDocElement\",\"value\":\"The height in\"},{\"kind\":\"linkDocElement\",\"referenceType\":\"href\",\"targetUrl\":\"http://wikipedia.org/pixel_units\",\"value\":\"http://wikipedia.org/pixel_units\"}]}"
{
"name": "x",
"description": [
{
"kind": "textDocElement",
"value": "The height in"
},
{
"kind": "linkDocElement",
"referenceType": "href",
"targetUrl": "http://wikipedia.org/pixel_units",
"value": "http://wikipedia.org/pixel_units"
}
]
}

@@ -1,1 +0,15 @@

"{\"name\":\"x\",\"description\":[{\"kind\":\"textDocElement\",\"value\":\"The height in\"},{\"kind\":\"linkDocElement\",\"referenceType\":\"href\",\"targetUrl\":\"http://wikipedia.org/pixel_units\",\"value\":\"http://wikipedia.org/pixel_units\"}]}"
{
"name": "x",
"description": [
{
"kind": "textDocElement",
"value": "The height in"
},
{
"kind": "linkDocElement",
"referenceType": "href",
"targetUrl": "http://wikipedia.org/pixel_units",
"value": "http://wikipedia.org/pixel_units"
}
]
}

@@ -1,1 +0,20 @@

"[{\"name\":\"param1\",\"description\":[{\"kind\":\"textDocElement\",\"value\":\"description of the type param1\"}]},{\"name\":\"param2\",\"description\":[{\"kind\":\"textDocElement\",\"value\":\"description of the type param2\"}]}]"
[
{
"name": "param1",
"description": [
{
"kind": "textDocElement",
"value": "description of the type param1"
}
]
},
{
"name": "param2",
"description": [
{
"kind": "textDocElement",
"value": "description of the type param2"
}
]
}
]

@@ -1,1 +0,20 @@

"[{\"name\":\"param1\",\"description\":[{\"kind\":\"textDocElement\",\"value\":\"description of the type param1\"}]},{\"name\":\"param2\",\"description\":[{\"kind\":\"textDocElement\",\"value\":\"description of the type param2\"}]}]"
[
{
"name": "param1",
"description": [
{
"kind": "textDocElement",
"value": "description of the type param1"
}
]
},
{
"name": "param2",
"description": [
{
"kind": "textDocElement",
"value": "description of the type param2"
}
]
}
]

@@ -1,1 +0,6 @@

"[{\"kind\":\"textDocElement\",\"value\":\"an object\"}]"
[
{
"kind": "textDocElement",
"value": "an object"
}
]

@@ -1,1 +0,6 @@

"[{\"kind\":\"textDocElement\",\"value\":\"an object\"}]"
[
{
"kind": "textDocElement",
"value": "an object"
}
]

@@ -1,1 +0,17 @@

"[{\"kind\":\"textDocElement\",\"value\":\"Text describing the function’s purpose/nuances/context.\"},{\"kind\":\"seeDocElement\",\"seeElements\":[{\"kind\":\"linkDocElement\",\"referenceType\":\"href\",\"targetUrl\":\"https://github.com/OfficeDev/office-ui-fabric-react\",\"value\":\"The link will provide context\"}]}]"
[
{
"kind": "textDocElement",
"value": "Text describing the function’s purpose/nuances/context. "
},
{
"kind": "seeDocElement",
"seeElements": [
{
"kind": "linkDocElement",
"referenceType": "href",
"targetUrl": "https://github.com/OfficeDev/office-ui-fabric-react",
"value": "The link will provide context"
}
]
}
]

@@ -1,1 +0,17 @@

"[{\"kind\":\"textDocElement\",\"value\":\"Text describing the function’s purpose/nuances/context.\"},{\"kind\":\"seeDocElement\",\"seeElements\":[{\"kind\":\"linkDocElement\",\"referenceType\":\"href\",\"targetUrl\":\"https://github.com/OfficeDev/office-ui-fabric-react\",\"value\":\"The link will provide context\"}]}]"
[
{
"kind": "textDocElement",
"value": "Text describing the function’s purpose/nuances/context. "
},
{
"kind": "seeDocElement",
"seeElements": [
{
"kind": "linkDocElement",
"referenceType": "href",
"targetUrl": "https://github.com/OfficeDev/office-ui-fabric-react",
"value": "The link will provide context"
}
]
}
]

@@ -73,3 +73,3 @@ "use strict";

const expectedSummary = [
{ kind: 'textDocElement', value: 'This function parses docTokens for the apiLint website' },
{ kind: 'textDocElement', value: 'This function parses docTokens for the apiLint website ' },
{

@@ -82,5 +82,5 @@ kind: 'linkDocElement',

];
const actualSummary = DocElementParser_1.default.parse(myDocumentedClass.documentation, tokenizer);
node_core_library_1.JsonFile.save(JSON.stringify(expectedSummary), './lib/basicDocExpected.json');
node_core_library_1.JsonFile.save(JSON.stringify(actualSummary), './lib/basicDocActual.json');
const actualSummary = DocElementParser_1.default.getTrimmedSpan(DocElementParser_1.default.parse(myDocumentedClass.documentation, tokenizer));
node_core_library_1.JsonFile.save(expectedSummary, './lib/basicDocExpected.json');
node_core_library_1.JsonFile.save(actualSummary, './lib/basicDocActual.json');
TestFileComparer_1.default.assertFileMatchesExpected('./lib/basicDocActual.json', './lib/basicDocExpected.json');

@@ -92,5 +92,5 @@ // Testing Returns Doc Elements

tokenizer.getToken();
const actualReturn = DocElementParser_1.default.parse(myDocumentedClass.documentation, tokenizer);
node_core_library_1.JsonFile.save(JSON.stringify(expectedReturn), './lib/returnDocExpected.json');
node_core_library_1.JsonFile.save(JSON.stringify(actualReturn), './lib/returnDocActual.json');
const actualReturn = DocElementParser_1.default.getTrimmedSpan(DocElementParser_1.default.parse(myDocumentedClass.documentation, tokenizer));
node_core_library_1.JsonFile.save(expectedReturn, './lib/returnDocExpected.json');
node_core_library_1.JsonFile.save(actualReturn, './lib/returnDocActual.json');
TestFileComparer_1.default.assertFileMatchesExpected('./lib/returnDocActual.json', './lib/returnDocExpected.json');

@@ -113,4 +113,4 @@ // Testing Params Doc Elements

actualParam.push(apiDoc.parseParam(tokenizer));
node_core_library_1.JsonFile.save(JSON.stringify(expectedParam), './lib/paramDocExpected.json');
node_core_library_1.JsonFile.save(JSON.stringify(actualParam), './lib/paramDocActual.json');
node_core_library_1.JsonFile.save(expectedParam, './lib/paramDocExpected.json');
node_core_library_1.JsonFile.save(actualParam, './lib/paramDocActual.json');
TestFileComparer_1.default.assertFileMatchesExpected('./lib/paramDocActual.json', './lib/paramDocExpected.json');

@@ -128,5 +128,5 @@ assertCapturedErrors([]);

tokenizer.getToken();
const actualDeprecated = DocElementParser_1.default.parse(myDocumentedClass.documentation, tokenizer);
node_core_library_1.JsonFile.save(JSON.stringify(expectedDeprecated), './lib/deprecatedDocExpected.json');
node_core_library_1.JsonFile.save(JSON.stringify(actualDeprecated), './lib/deprecatedDocActual.json');
const actualDeprecated = DocElementParser_1.default.getTrimmedSpan(DocElementParser_1.default.parse(myDocumentedClass.documentation, tokenizer));
node_core_library_1.JsonFile.save(expectedDeprecated, './lib/deprecatedDocExpected.json');
node_core_library_1.JsonFile.save(actualDeprecated, './lib/deprecatedDocActual.json');
TestFileComparer_1.default.assertFileMatchesExpected('./lib/deprecatedDocActual.json', './lib/deprecatedDocExpected.json');

@@ -142,3 +142,3 @@ assertCapturedErrors([]);

const expectedSummary = [
{ kind: 'textDocElement', value: 'Text describing the function’s purpose/nuances/context.' },
{ kind: 'textDocElement', value: 'Text describing the function’s purpose/nuances/context. ' },
{

@@ -156,5 +156,5 @@ kind: 'seeDocElement',

];
const actualSummary = DocElementParser_1.default.parse(myDocumentedClass.documentation, tokenizer);
node_core_library_1.JsonFile.save(JSON.stringify(expectedSummary), './lib/seeDocExpected.json');
node_core_library_1.JsonFile.save(JSON.stringify(actualSummary), './lib/seeDocActual.json');
const actualSummary = DocElementParser_1.default.getTrimmedSpan(DocElementParser_1.default.parse(myDocumentedClass.documentation, tokenizer));
node_core_library_1.JsonFile.save(expectedSummary, './lib/seeDocExpected.json');
node_core_library_1.JsonFile.save(actualSummary, './lib/seeDocActual.json');
TestFileComparer_1.default.assertFileMatchesExpected('./lib/seeDocExpected.json', './lib/seeDocActual.json');

@@ -185,4 +185,4 @@ assertCapturedErrors([]);

const actualParam = apiDoc.parseParam(tokenizer);
node_core_library_1.JsonFile.save(JSON.stringify(expectedParam), './lib/nestedParamDocExpected.json');
node_core_library_1.JsonFile.save(JSON.stringify(actualParam), './lib/nestedParamDocActual.json');
node_core_library_1.JsonFile.save(expectedParam, './lib/nestedParamDocExpected.json');
node_core_library_1.JsonFile.save(actualParam, './lib/nestedParamDocActual.json');
TestFileComparer_1.default.assertFileMatchesExpected('./lib/nestedParamDocActual.json', './lib/nestedParamDocExpected.json');

@@ -189,0 +189,0 @@ assertCapturedErrors([]);

@@ -1,1 +0,42 @@

"[{\"_type\":0,\"_tag\":\"\",\"_text\":\"this is a mock documentation\"},{\"_type\":1,\"_tag\":\"@taga\",\"_text\":\"\"},{\"_type\":0,\"_tag\":\"\",\"_text\":\"hi\"},{\"_type\":1,\"_tag\":\"@tagb\",\"_text\":\"\"},{\"_type\":0,\"_tag\":\"\",\"_text\":\"hello @invalid@tag email@domain.com\"},{\"_type\":1,\"_tag\":\"@tagc\",\"_text\":\"\"},{\"_type\":0,\"_tag\":\"\",\"_text\":\"this is\"},{\"_type\":0,\"_tag\":\"\",\"_text\":\"and this is {just curly braces}\"}]"
[
{
"_type": 0,
"_tag": "",
"_text": "this is a mock documentation\n"
},
{
"_type": 1,
"_tag": "@taga",
"_text": ""
},
{
"_type": 0,
"_tag": "",
"_text": " hi\n"
},
{
"_type": 1,
"_tag": "@tagb",
"_text": ""
},
{
"_type": 0,
"_tag": "",
"_text": " hello @invalid@tag email@domain.com\n "
},
{
"_type": 1,
"_tag": "@tagc",
"_text": ""
},
{
"_type": 0,
"_tag": "",
"_text": " this is "
},
{
"_type": 0,
"_tag": "",
"_text": " and this is {just curly braces}"
}
]

@@ -1,1 +0,42 @@

"[{\"_type\":0,\"_tag\":\"\",\"_text\":\"this is a mock documentation\"},{\"_type\":1,\"_tag\":\"@taga\",\"_text\":\"\"},{\"_type\":0,\"_tag\":\"\",\"_text\":\"hi\"},{\"_type\":1,\"_tag\":\"@tagb\",\"_text\":\"\"},{\"_type\":0,\"_tag\":\"\",\"_text\":\"hello @invalid@tag email@domain.com\"},{\"_type\":1,\"_tag\":\"@tagc\",\"_text\":\"\"},{\"_type\":0,\"_tag\":\"\",\"_text\":\"this is\"},{\"_type\":0,\"_tag\":\"\",\"_text\":\"and this is {just curly braces}\"}]"
[
{
"_type": 0,
"_tag": "",
"_text": "this is a mock documentation\n"
},
{
"_type": 1,
"_tag": "@taga",
"_text": ""
},
{
"_type": 0,
"_tag": "",
"_text": " hi\n"
},
{
"_type": 1,
"_tag": "@tagb",
"_text": ""
},
{
"_type": 0,
"_tag": "",
"_text": " hello @invalid@tag email@domain.com\n "
},
{
"_type": 1,
"_tag": "@tagc",
"_text": ""
},
{
"_type": 0,
"_tag": "",
"_text": " this is "
},
{
"_type": 0,
"_tag": "",
"_text": " and this is {just curly braces}"
}
]
{
"name": "@microsoft/api-extractor",
"version": "3.3.0",
"version": "3.4.0",
"description": "Validate, document, and review the exported API for a TypeScript library",

@@ -30,3 +30,3 @@ "keywords": [

"dependencies": {
"@microsoft/node-core-library": "~0.3.0",
"@microsoft/node-core-library": "~0.3.1",
"@types/fs-extra": "0.0.37",

@@ -33,0 +33,0 @@ "@types/node": "6.0.88",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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