angular-cn/packages/compiler-cli
Keen Yee Liau 4b62ba9017 fix(compiler-cli): Pass SourceFile to getLeadingTriviaWidth (#33588)
This commit fixes a crash in the Angular Kythe indexer caused by failure
to retrieve `SourceFile` in a `Statement`.

Crash logs:
  TypeError: Cannot read property 'text' of undefined
    at Object.getTokenPosOfNode (typescript/stable/lib/typescript.js:8957:72)
    at NodeObject.getStart (typescript/stable/lib/typescript.js:121419:23)
    at NodeObject.getLeadingTriviaWidth (typescript/stable/lib/typescript.js:121439:25)
    at FactoryGenerator.generate (angular2/rc/packages/compiler-cli/src/ngtsc/shims/src/factory_generator.ts:64:49)
    at GeneratedShimsHostWrapper.getSourceFile (angular2/rc/packages/compiler-cli/src/ngtsc/shims/src/host.ts:88:26)
    at findSourceFile (typescript/stable/lib/typescript.js:90654:29)
    at typescript/stable/lib/typescript.js:90553:85
    at getSourceFileFromReferenceWorker (typescript/stable/lib/typescript.js:90520:34)
    at processSourceFile (typescript/stable/lib/typescript.js:90553:13)
    at processRootFile (typescript/stable/lib/typescript.js:90383:13)

PR Close #33588
2019-11-05 21:02:45 +00:00
..
integrationtest build: switch to @build_bazel_rules_nodejs//:index.bzl load point (#33433) 2019-10-28 10:10:48 -07:00
ngcc fix(ngcc): render new definitions using the inner name of the class (#33533) 2019-11-05 17:25:02 +00:00
src fix(compiler-cli): Pass SourceFile to getLeadingTriviaWidth (#33588) 2019-11-05 21:02:45 +00:00
test fix(ivy): more descriptive errors for nested i18n sections (#33583) 2019-11-05 17:20:47 +00:00
BUILD.bazel build: fix build failures with worker mode cache and @types/events (#31325) 2019-07-01 14:16:43 -07:00
index.ts fix(compiler-cli): remove unused CLI private exports (#33242) 2019-11-01 17:43:47 +00:00
package.json feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
tsconfig-build.json fix(compiler-cli): remove unused CLI private exports (#33242) 2019-11-01 17:43:47 +00:00
tsconfig.json perf(ivy): ngcc - only find dependencies when targeting a single entry-point (#30525) 2019-07-09 09:40:46 -07:00