18 Commits

Author SHA1 Message Date
Joey Perrott
d1ea1f4c7f build: update license headers to reference Google LLC ()
Update the license headers throughout the repository to reference Google LLC
rather than Google Inc, for the required license headers.

PR Close 
2020-05-26 14:26:58 -04:00
Keen Yee Liau
1140bbc25c refactor(language-service): reformat using clang-format ()
clang-format was recently updated and any PRs that touch files in the
language service will have to reformat all the files.

Instead of changing the formatting in those PRs, this PR formats all
files in language-service package once and for all.

PR Close 
2020-04-06 09:29:42 -07:00
ivanwonder
4e1d780554 fix(language-service): resolve the real path for symlink ()
when AOT resolves the module name, it will preserve the path of the symlink, but the ts-server will return the real path for symlink.

PR Close 
2020-03-06 12:38:55 -05:00
Keen Yee Liau
bbb2798d41 fix(language-service): Use tsLSHost.fileExists() to resolve modules ()
The ModuleResolutionHost implementation inside ReflectorHost currently
relies on reading the snapshot to determine if a file exists, and use
the snapshot to retrieve the file content.
It is more straightforward and efficient to use the already existing
method fileExists() instead.

At runtime, the TypeScript LanguageServiceHost is really a Project, so
both fileExists() and readFile() methods are defined.

As a micro-optimization, skip fs lookup for tsx files.

PR Close 
2019-09-12 17:18:06 -07:00
Keen Yee Liau
6052b12fb3 fix(language-service): Use module resolution cache ()
This PR fixes a critical performance issue where the language
service makes a MASSIVE number of filesystem calls when performing
module resolution.
This is because there is no caching. To make matters worse, module
resolution is performed for **every** program change (which means every
few keystrokes trigger a massive number of fs calls).

PR Close 
2019-09-10 06:31:59 -04:00
Keen Yee Liau
a91ab15525 fix(language-service): Remove 'context' used for module resolution ()
The language service relies on a "context" file that is used as the
canonical "containing file" when performing module resolution.
This file is unnecessary since the language service host's current
directory always default to the location of tsconfig.json for the
project, which would give the correct result.

This refactoring allows us to simplify the "typescript host" and also
removes the need for custom logic to find tsconfig.json.

PR Close 
2019-08-13 11:19:18 -07:00
Alan
fd7dd4d9fc refactor: clean up language service from unused code and imports ()
PR Close 
2019-05-17 13:32:06 -07:00
WilliamKoza
7c57293bee refactor(language-service): clean up imports language-service and misspellings in public API ()
PR Close 
2019-03-05 09:46:45 -08:00
Rado Kirov
c95437f15d build(bazel): Turning on strictPropertyInitialization for Angular. ()
All errors for existing fields have been detected and suppressed with a
`!` assertion.

Issue/24571 is tracking proper clean up of those instances.

One-line change required in ivy/compilation.ts, because it appears that
the new syntax causes tsickle emitted node to no longer track their
original sourceFiles.

PR Close 
2018-06-25 07:57:13 -07:00
Chuck Jazdzewski
676d9c2c4b fix(language-service): ensure correct paths are passed to TypeScript ()
The 2.6 version of TypeScript's `resolveModuleName`  started to
require paths passed to be separated by '/' instead of being
able to handle '\'.

`ngc` and `ng` already do this transformation.

Fixes: 

PR Close 
2018-01-26 14:49:23 -08:00
Chuck Jazdzewski
e64b1e99c2 fix(compiler): make .ngsummary.json files idempotent ()
Fixes: 

PR Close 
2018-01-10 16:20:53 -08:00
Misko Hevery
3d50fd7cac build: add bazel test rules for remainder of packages ()
PR Close 
2017-12-22 13:10:51 -08:00
Tobias Bosch
8d45fefc31 refactor(compiler): remove old ngtools api and add listLazyRoutes to new api ()
Usages of `NgTools_InternalApi_NG_2` from `@angular/compiler-cli` will now
throw an error.

Adds `listLazyRoutes` to `@angular/compiler-cli/ngtools2.ts` for getting
the lazy routes of a `ng.Program`.
PR Close 
2017-10-23 18:46:04 -04:00
Matias Niemelä
4695c69cf1 refactor(compiler): remove all source-level traces to tsc-wrapped ()
- temporarily keeps the old sources under packages/tsc-wrapped
  until the build scripts are changed to use compiler-cli everywhere.
- removes the compiler options `disableTransformerPipeline` that was introduced
  in a previous beta of Angular 5, i.e. the transformer based compiler
  is now always enabled.

PR Close 
2017-09-13 20:47:37 -04:00
Chuck Jazdzewski
bc22ff1517 fix(language-service): remove tsickle dependency
Removes the tsickle dependency added when tsickle was added to the
transform compiler.

Added a test to ensure stray dependencies are not added and no
errors are introduced during module flattening.
2017-08-16 11:33:49 -07:00
Chuck Jazdzewski
253345c0c0 fix(language-service): remove asserts for non-null expressions ()
Reworked some of the code so asserts are no longer necessary.
Added additional and potentially redundant checks
Added checks where the null checker found real problems.

PR Close 
2017-04-28 22:50:31 -05:00
Miško Hevery
540581da3e fix(language-service): Update types for TypeScript nullability support 2017-04-12 11:36:19 -07:00
Jason Aden
3e51a19983 refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00