Skip to content

Commit

Permalink
refactor(ngcc): clean up unused imports, unused regex parenthesis, typos
Browse files Browse the repository at this point in the history
This is a follow-up to angular#37075, because I didn't manage to finish my
review before the PR got merged.
  • Loading branch information
gkalpak committed Jun 5, 2020
1 parent 4601e51 commit 9ef5c61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Expand Up @@ -225,7 +225,7 @@ export class EsmDependencyHost extends DependencyHostBase {
* in this file, true otherwise.
*/
export function hasImportOrReexportStatements(source: string): boolean {
return /(?:import|export)[\s\S]+?(["'])(?:(?:\\\1|.)*?)\1/.test(source);
return /(?:import|export)[\s\S]+?(["'])(?:\\\1|.)+?\1/.test(source);
}


Expand Down Expand Up @@ -261,4 +261,4 @@ function canPrecedeARegex(kind: ts.SyntaxKind): boolean {
default:
return true;
}
}
}
Expand Up @@ -5,18 +5,15 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {AbsoluteFsPath, FileSystem, join, PathSegment, relative, relativeFrom} from '../../../src/ngtsc/file_system';
import {EntryPointWithDependencies} from '../dependencies/dependency_host';
import {AbsoluteFsPath, FileSystem} from '../../../src/ngtsc/file_system';
import {DependencyResolver, SortedEntryPointsInfo} from '../dependencies/dependency_resolver';
import {Logger} from '../logging/logger';
import {hasBeenProcessed} from '../packages/build_marker';
import {NgccConfiguration} from '../packages/configuration';
import {EntryPoint, EntryPointJsonProperty, getEntryPointInfo, INCOMPATIBLE_ENTRY_POINT, NO_ENTRY_POINT} from '../packages/entry_point';
import {EntryPointJsonProperty} from '../packages/entry_point';
import {PathMappings} from '../path_mappings';

import {EntryPointFinder} from './interface';
import {TracingEntryPointFinder} from './tracing_entry_point_finder';
import {getBasePaths} from './utils';

/**
* An EntryPointFinder that starts from a target entry-point and only finds
Expand Down
Expand Up @@ -24,7 +24,7 @@ import {getBasePaths} from './utils';
* This is faster than searching the entire file-system for all the entry-points,
* and is used primarily by the CLI integration.
*
* There are two concrete implementation of this class.
* There are two concrete implementations of this class.
*
* * `TargetEntryPointFinder` - is given a single entry-point as the initial entry-point
* * `ProgramBasedEntryPointFinder` - computes the initial entry-points from program files given by
Expand Down

0 comments on commit 9ef5c61

Please sign in to comment.