diff --git a/.circleci/config.yml b/.circleci/config.yml index 67d9fbe153..65dc3d2920 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,7 +41,7 @@ jobs: - restore_cache: key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }} - - run: bazel run @io_bazel_rules_typescript_node//:bin/npm install + - run: bazel run @build_bazel_rules_typescript_node//:bin/npm install - run: bazel build ... - save_cache: key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }} diff --git a/packages/compiler-cli/src/compiler_host.ts b/packages/compiler-cli/src/compiler_host.ts index 03424e9ebc..04d5083770 100644 --- a/packages/compiler-cli/src/compiler_host.ts +++ b/packages/compiler-cli/src/compiler_host.ts @@ -41,8 +41,8 @@ export class CompilerHost implements AotCompilerHost { protected program: ts.Program, protected options: AngularCompilerOptions, protected context: CompilerHostContext, collectorOptions?: CollectorOptions) { // normalize the path so that it never ends with '/'. - this.basePath = path.normalize(path.join(this.options.basePath, '.')).replace(/\\/g, '/'); - this.genDir = path.normalize(path.join(this.options.genDir, '.')).replace(/\\/g, '/'); + this.basePath = path.normalize(path.join(this.options.basePath !, '.')).replace(/\\/g, '/'); + this.genDir = path.normalize(path.join(this.options.genDir !, '.')).replace(/\\/g, '/'); const genPath: string = path.relative(this.basePath, this.genDir); this.isGenDirChildOfRootDir = genPath === '' || !genPath.startsWith('..'); @@ -312,7 +312,7 @@ export class CompilerHost implements AotCompilerHost { relativePath = relativePath.substr(3); } - return path.join(this.options.genDir, relativePath); + return path.join(this.options.genDir !, relativePath); } private hasBundleIndex(filePath: string): boolean { diff --git a/packages/compiler-cli/src/extractor.ts b/packages/compiler-cli/src/extractor.ts index 99a6e8f9f7..e87a370d76 100644 --- a/packages/compiler-cli/src/extractor.ts +++ b/packages/compiler-cli/src/extractor.ts @@ -36,7 +36,7 @@ export class Extractor { return promiseBundle.then(bundle => { const content = this.serialize(bundle, formatName); const dstFile = outFile || `messages.${ext}`; - const dstPath = path.join(this.options.genDir, dstFile); + const dstPath = path.join(this.options.genDir !, dstFile); this.host.writeFile(dstPath, content, false); return [dstPath]; }); diff --git a/packages/compiler-cli/src/transformers/module_filename_resolver.ts b/packages/compiler-cli/src/transformers/module_filename_resolver.ts index 5cf3012e2b..ba4ebd1971 100644 --- a/packages/compiler-cli/src/transformers/module_filename_resolver.ts +++ b/packages/compiler-cli/src/transformers/module_filename_resolver.ts @@ -27,8 +27,8 @@ class SingleRootDirModuleFilenameResolver implements ModuleFilenameResolver { constructor(private host: ModuleFilenameResolutionHost, private options: CompilerOptions) { // normalize the path so that it never ends with '/'. - this.basePath = path.normalize(path.join(options.basePath, '.')).replace(/\\/g, '/'); - this.genDir = path.normalize(path.join(options.genDir, '.')).replace(/\\/g, '/'); + this.basePath = path.normalize(path.join(options.basePath !, '.')).replace(/\\/g, '/'); + this.genDir = path.normalize(path.join(options.genDir !, '.')).replace(/\\/g, '/'); const genPath: string = path.relative(this.basePath, this.genDir); this.isGenDirChildOfRootDir = genPath === '' || !genPath.startsWith('..'); @@ -153,7 +153,7 @@ class MultipleRootDirModuleFilenameResolver implements ModuleFilenameResolver { constructor(private host: ModuleFilenameResolutionHost, private options: CompilerOptions) { // normalize the path so that it never ends with '/'. - this.basePath = path.normalize(path.join(options.basePath, '.')).replace(/\\/g, '/'); + this.basePath = path.normalize(path.join(options.basePath !, '.')).replace(/\\/g, '/'); } getNgCanonicalFileName(fileName: string): string { @@ -282,4 +282,4 @@ function createModuleFilenameResolverHost(host: ts.ModuleResolutionHost): resolveModuleNameHost.realpath = (fileName: string) => fileName; return resolveModuleNameHost; -} \ No newline at end of file +}