@microsoft/api-documenter
Advanced tools
Comparing version 1.1.30 to 1.1.31
@@ -5,2 +5,25 @@ { | ||
{ | ||
"version": "1.1.31", | ||
"tag": "@microsoft/api-documenter_v1.1.31", | ||
"date": "Mon, 02 Apr 2018 16:05:24 GMT", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Refactor to use new @microsoft/node-core-library" | ||
} | ||
], | ||
"dependency": [ | ||
{ | ||
"comment": "Updating dependency \"@microsoft/api-extractor\" from `5.6.1` to `5.6.2`" | ||
}, | ||
{ | ||
"comment": "Updating dependency \"@microsoft/node-core-library\" from `1.0.0` to `1.1.0`" | ||
}, | ||
{ | ||
"comment": "Updating dependency \"@microsoft/node-library-build\" from `4.3.29` to `4.3.30`" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "1.1.30", | ||
@@ -7,0 +30,0 @@ "tag": "@microsoft/api-documenter_v1.1.30", |
# Change Log - @microsoft/api-documenter | ||
This log was last generated on Tue, 27 Mar 2018 01:34:25 GMT and should not be manually modified. | ||
This log was last generated on Mon, 02 Apr 2018 16:05:24 GMT and should not be manually modified. | ||
## 1.1.31 | ||
Mon, 02 Apr 2018 16:05:24 GMT | ||
### Patches | ||
- Refactor to use new @microsoft/node-core-library | ||
## 1.1.30 | ||
@@ -6,0 +13,0 @@ Tue, 27 Mar 2018 01:34:25 GMT |
@@ -33,3 +33,3 @@ "use strict"; | ||
console.log(`Writing ${docPackage.name} package`); | ||
const unscopedPackageName = Utilities_1.Utilities.getUnscopedPackageName(docPackage.name); | ||
const unscopedPackageName = node_core_library_1.PackageName.getUnscopedName(docPackage.name); | ||
const markupPage = api_extractor_1.Markup.createPage(`${unscopedPackageName} package`); | ||
@@ -441,3 +441,3 @@ this._writeBreadcrumb(markupPage, docPackage); | ||
if (part.kind === DocItemSet_1.DocItemKind.Package) { | ||
baseName = Utilities_1.Utilities.getUnscopedPackageName(part.name); | ||
baseName = node_core_library_1.PackageName.getUnscopedName(part.name); | ||
} | ||
@@ -444,0 +444,0 @@ else { |
@@ -5,4 +5,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const node_core_library_1 = require("@microsoft/node-core-library"); | ||
const api_extractor_1 = require("@microsoft/api-extractor"); | ||
const Utilities_1 = require("./Utilities"); | ||
var DocItemKind; | ||
@@ -115,3 +115,4 @@ (function (DocItemKind) { | ||
case 0: | ||
reference.packageName = docItem.name; | ||
reference.scopeName = node_core_library_1.PackageName.getScope(docItem.name); | ||
reference.packageName = node_core_library_1.PackageName.getUnscopedName(docItem.name); | ||
break; | ||
@@ -182,7 +183,3 @@ case 1: | ||
}; | ||
const packageName = Utilities_1.Utilities.getScopedPackageName(reference.scopeName, reference.packageName); | ||
if (!packageName) { | ||
// This would indicate an invalid data file, since API Extractor is supposed to normalize this | ||
throw new Error('resolveApiItemReference() failed because the packageName should not be empty'); | ||
} | ||
const packageName = node_core_library_1.PackageName.combineParts(reference.scopeName, reference.packageName); | ||
let current = undefined; | ||
@@ -189,0 +186,0 @@ for (const nameToMatch of [packageName, reference.exportName, reference.memberName]) { |
@@ -9,13 +9,2 @@ import { IApiMethod, IApiFunction, IApiConstructor } from '@microsoft/api-extractor'; | ||
/** | ||
* Strips the scope from an NPM package name. For example, given "@microsoft/decorators" | ||
* this function would return "decorators". | ||
*/ | ||
static getUnscopedPackageName(packageName: string): string; | ||
/** | ||
* Creates a scoped package name by assembling the scope name and unscoped package name. | ||
* For example, getScopedPackageName("", "example") returns "example", whereas | ||
* getScopedPackageName("@ms", "example") returns "@ms/example". | ||
*/ | ||
static getScopedPackageName(scopeName: string, packageName: string): string; | ||
/** | ||
* Generates a concise signature for a function. Example: "getArea(width, height)" | ||
@@ -22,0 +11,0 @@ */ |
@@ -28,21 +28,2 @@ "use strict"; | ||
/** | ||
* Strips the scope from an NPM package name. For example, given "@microsoft/decorators" | ||
* this function would return "decorators". | ||
*/ | ||
static getUnscopedPackageName(packageName) { | ||
// If there is a "/", return everything after the last "/" | ||
return packageName.split('/').slice(-1)[0]; | ||
} | ||
/** | ||
* Creates a scoped package name by assembling the scope name and unscoped package name. | ||
* For example, getScopedPackageName("", "example") returns "example", whereas | ||
* getScopedPackageName("@ms", "example") returns "@ms/example". | ||
*/ | ||
static getScopedPackageName(scopeName, packageName) { | ||
if (scopeName) { | ||
return scopeName + '/' + packageName; | ||
} | ||
return packageName; | ||
} | ||
/** | ||
* Generates a concise signature for a function. Example: "getArea(width, height)" | ||
@@ -49,0 +30,0 @@ */ |
@@ -119,3 +119,3 @@ "use strict"; | ||
tocItem = { | ||
name: Utilities_1.Utilities.getUnscopedPackageName(docItem.name) | ||
name: docItem.name | ||
}; | ||
@@ -128,6 +128,14 @@ } | ||
} | ||
tocItem = { | ||
name: Utilities_1.Utilities.getUnscopedPackageName(docItem.name), | ||
uid: this._getUid(docItem) | ||
}; | ||
if (docItem.kind === DocItemSet_1.DocItemKind.Package) { | ||
tocItem = { | ||
name: node_core_library_1.PackageName.getUnscopedName(docItem.name), | ||
uid: this._getUid(docItem) | ||
}; | ||
} | ||
else { | ||
tocItem = { | ||
name: docItem.name, | ||
uid: this._getUid(docItem) | ||
}; | ||
} | ||
} | ||
@@ -317,3 +325,3 @@ tocItems.push(tocItem); | ||
case DocItemSet_1.DocItemKind.Package: | ||
result += Utilities_1.Utilities.getUnscopedPackageName(current.name); | ||
result += node_core_library_1.PackageName.getUnscopedName(current.name); | ||
break; | ||
@@ -341,3 +349,3 @@ default: | ||
case DocItemSet_1.DocItemKind.Package: | ||
result += Utilities_1.Utilities.getUnscopedPackageName(current.name); | ||
result += node_core_library_1.PackageName.getUnscopedName(current.name); | ||
break; | ||
@@ -344,0 +352,0 @@ default: |
{ | ||
"name": "@microsoft/api-documenter", | ||
"version": "1.1.30", | ||
"version": "1.1.31", | ||
"description": "Read JSON files from api-extractor, generate documentation pages", | ||
@@ -18,4 +18,4 @@ "repository": { | ||
"dependencies": { | ||
"@microsoft/api-extractor": "5.6.1", | ||
"@microsoft/node-core-library": "1.0.0", | ||
"@microsoft/api-extractor": "5.6.2", | ||
"@microsoft/node-core-library": "1.1.0", | ||
"@microsoft/ts-command-line": "3.1.1", | ||
@@ -27,3 +27,3 @@ "colors": "~1.2.1", | ||
"devDependencies": { | ||
"@microsoft/node-library-build": "4.3.29", | ||
"@microsoft/node-library-build": "4.3.30", | ||
"@types/fs-extra": "0.0.37", | ||
@@ -30,0 +30,0 @@ "@types/js-yaml": "3.9.1", |
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
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
262745
3290
+ Added@microsoft/api-extractor@5.6.2(transitive)
+ Added@microsoft/node-core-library@1.1.0(transitive)
- Removed@microsoft/api-extractor@5.6.1(transitive)
- Removed@microsoft/node-core-library@1.0.0(transitive)