File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed
Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,14 @@ interface IAstModuleReference {
5353 * generating .d.ts rollups.
5454 */
5555export class ExportAnalyzer {
56+ // Captures "@a/b" or "d" from these examples:
57+ // @a /b
58+ // @a /b/c
59+ // d
60+ // d/
61+ // d/e
62+ private static _modulePathRegExp : RegExp = / ^ ( (?: @ [ ^ @ \/ \s ] + \/ ) ? [ ^ @ \/ \s ] + ) (?: .* ) $ / ;
63+
5664 private readonly _program : ts . Program ;
5765 private readonly _typeChecker : ts . TypeChecker ;
5866 private readonly _bundledPackageNames : Set < string > ;
@@ -234,14 +242,6 @@ export class ExportAnalyzer {
234242 return entryPointAstModule . astModuleExportInfo ;
235243 }
236244
237- // Captures "@a/b" or "d" from these examples:
238- // @a /b
239- // @a /b/c
240- // d
241- // d/
242- // d/e
243- private static _modulePathRegExp : RegExp = / ^ ( (?: @ [ ^ @ \/ \s ] + \/ ) ? [ ^ @ \/ \s ] + ) (?: .* ) $ / ;
244-
245245 /**
246246 * Returns true if the module specifier refers to an external package. Ignores packages listed in the
247247 * "bundledPackages" setting from the api-extractor.json config file.
@@ -261,7 +261,7 @@ export class ExportAnalyzer {
261261 const match : RegExpExecArray | null = ExportAnalyzer . _modulePathRegExp . exec ( moduleSpecifier ) ;
262262 if ( match ) {
263263 // Extract "@my-scope/my-package" from "@my-scope/my-package/path/module"
264- const packageName : string = match [ 0 ] ;
264+ const packageName : string = match [ 1 ] ;
265265 if ( this . _bundledPackageNames . has ( packageName ) ) {
266266 return false ;
267267 }
Original file line number Diff line number Diff line change 44
55``` ts
66
7- import { Lib2Class } from ' api-extractor-lib2-test' ;
7+ import { Lib2Class } from ' api-extractor-lib2-test/lib/index ' ;
88
99// Warning: (ae-forgotten-export) The symbol "Lib1Class" needs to be exported by the entry point index.d.ts
1010//
Original file line number Diff line number Diff line change 1- import { Lib2Class } from 'api-extractor-lib2-test' ;
1+ import { Lib2Class } from 'api-extractor-lib2-test/lib/index ' ;
22
33/** @public */
44export declare function f ( arg1 : Lib1Class , arg2 : Lib2Class ) : void ;
Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
22// See LICENSE in the project root for license information.
33
4- import { Lib1Class } from "api-extractor-lib1-test" ;
5- import { Lib2Class } from "api-extractor-lib2-test" ;
4+ import { Lib1Class } from "api-extractor-lib1-test/lib/index " ;
5+ import { Lib2Class } from "api-extractor-lib2-test/lib/index " ;
66
77/** @public */
88export function f ( arg1 : Lib1Class , arg2 : Lib2Class ) : void {
You can’t perform that action at this time.
0 commit comments