@@ -5,10 +5,10 @@ import * as path from 'path';
55
66import {
77 PackageJsonLookup ,
8- IPackageJson ,
98 FileSystem ,
109 JsonFile ,
11- NewlineKind
10+ NewlineKind ,
11+ INodePackageJson
1212} from '@microsoft/node-core-library' ;
1313import { Extractor } from '../api/Extractor' ;
1414import { ILogger } from '../api/ILogger' ;
@@ -26,14 +26,14 @@ export class PackageMetadata {
2626 * The parsed contents of package.json. Note that PackageJsonLookup
2727 * only includes essential fields.
2828 */
29- public readonly packageJson : IPackageJson ;
29+ public readonly packageJson : INodePackageJson ;
3030 /**
3131 * If true, then the package's documentation comments can be assumed
3232 * to contain API Extractor compatible TSDoc tags.
3333 */
3434 public readonly aedocSupported : boolean ;
3535
36- public constructor ( packageJsonPath : string , packageJson : IPackageJson , aedocSupported : boolean ) {
36+ public constructor ( packageJsonPath : string , packageJson : INodePackageJson , aedocSupported : boolean ) {
3737 this . packageJsonPath = packageJsonPath ;
3838 this . packageJson = packageJson ;
3939 this . aedocSupported = aedocSupported ;
@@ -63,7 +63,9 @@ export class PackageMetadataManager {
6363
6464 // This feature is still being standardized: https://github.com/Microsoft/tsdoc/issues/7
6565 // In the future we will use the @microsoft /tsdoc library to read this file.
66- private static _resolveTsdocMetadataPathFromPackageJson ( packageFolder : string , packageJson : IPackageJson ) : string {
66+ private static _resolveTsdocMetadataPathFromPackageJson ( packageFolder : string ,
67+ packageJson : INodePackageJson ) : string {
68+
6769 const tsdocMetadataFilename : string = PackageMetadataManager . tsdocMetadataFilename ;
6870
6971 let tsdocMetadataRelativePath : string ;
@@ -108,7 +110,7 @@ export class PackageMetadataManager {
108110 */
109111 public static resolveTsdocMetadataPath (
110112 packageFolder : string ,
111- packageJson : IPackageJson ,
113+ packageJson : INodePackageJson ,
112114 tsdocMetadataPath ?: string
113115 ) : string {
114116 if ( tsdocMetadataPath ) {
@@ -165,7 +167,7 @@ export class PackageMetadataManager {
165167 = this . _packageMetadataByPackageJsonPath . get ( packageJsonFilePath ) ;
166168
167169 if ( ! packageMetadata ) {
168- const packageJson : IPackageJson = this . _packageJsonLookup . loadPackageJson ( packageJsonFilePath ) ;
170+ const packageJson : INodePackageJson = this . _packageJsonLookup . loadNodePackageJson ( packageJsonFilePath ) ;
169171
170172 const packageJsonFolder : string = path . dirname ( packageJsonFilePath ) ;
171173
0 commit comments