This project is mirrored from https://github.com/angular/angular.git.
Pull mirroring updated .
- Apr 04, 2019
-
-
Jason Aden authored
-
Jason Aden authored
-
- Apr 03, 2019
-
-
Vani authored
PR Close #27010
-
Vani authored
PR Close #29259
-
Carlos Ortiz García authored
This new interface will match classes whether they are abstract or concrete. Casting as `AbstractType<MyConcrete>` will return a type that isn't newable. This type will be used to match abstract classes in the `get()` functions of `Injector` and `TestBed`. Type isn't used yet so this isn't a breaking change. Issue #26491 PR Close #29295
-
JoostK authored
The defineInjector function specifies its providers and imports array to be optional, so if no providers/imports are present these keys may be omitted. This commit updates the compiler to only generate the keys when necessary. PR Close #29598
-
JoostK authored
Prior to this change, a module's imports and exports would be used verbatim as an injectors' imports. This is detrimental for tree-shaking, as a module's exports could reference declarations that would then prevent such declarations from being eligible for tree-shaking. Since an injector actually only needs NgModule references as its imports, we may safely filter out any declarations from the list of module exports. This makes them eligible for tree-shaking once again. PR Close #29598
-
JoostK authored
Prior to this change, all module metadata would be included in the `defineNgModule` call that is set as the `ngModuleDef` field of module types. Part of the metadata is scope information like declarations, imports and exports that is used for computing the transitive module scope in JIT environments, preventing those references from being tree-shaken for production builds. This change moves the metadata for scope computations to a pure function call that patches the scope references onto the module type. Because the function is marked pure, it may be tree-shaken out during production builds such that references to declarations and exports are dropped, which in turn allows for tree-shaken any declaration that is not otherwise referenced. Fixes #28077, FW-1035 PR Close #29598
-
Pete Bacon Darwin authored
With the new API, where you can choose to only process the first matching format, it is possible to process an entry-point multiple times, if you pass in a different format each time. Previously, ngcc would always try to process the typings files for the entry-point along with processing the first format of the current execution of ngcc. But this meant that it would be trying to process the typings a second time. Now we only process the typings if they have not already been processed as part of processing another format in another even if it was in a different execution of ngcc. PR Close #29657
-
George Kalpakas authored
With a770aa23, ngcc was moved to a different directory (`compiler/src/ngcc/` --> `compiler/ngcc/`), but the `CODEOWNERS` file was not updated to reflect that. PR Close #29660
-
Alex Eagle authored
This matches the behavior of ts_library PR Close #29670
-
Kara authored
This commit adds Deborah to the Trusted Collaborators list, so she will appear in the Collaborators list on angular.io. PR Close #29605
-
Paul Gschwendtner authored
Introduces a new update schematic called "template-var-assignment" that is responsible for analyzing template files in order to warn developers if template variables are assigned to values. The schematic also comes with a driver for `tslint` so that the check can be used wtihin Google. PR Close #29608
-
Paul Gschwendtner authored
PR Close #29608
-
Paul Gschwendtner authored
PR Close #29608
-
Ben Lesh authored
- moves all publicly exported instructions to their own files - refactors namespace instructions to set state in `state.ts` - no longer exports * from `instructions.ts`. - `instructions.ts` renamed to `shared.ts` (old `shared.ts` contents folded in to `instructions.ts`) - updates `all.ts` to re-export from public instruction files. PR Close #29646
-
Alex Eagle authored
Currently our plan is to skip the publish, docgen, and update steps for this package. During RC, we'll determine if the breaking change is too difficult for users, in which case we might restore the package for another major. PR Close #29550
-
JoostK authored
In ES2015, classes could have been emitted as a variable declaration initialized with a class expression. In certain situations, an intermediary variable suffixed with `_1` is present such that the variable declaration's initializer becomes a binary expression with its rhs being the class expression, and its lhs being the identifier of the intermediate variable. This structure was not recognized, resulting in such classes not being considered as a class in `Esm2015ReflectionHost`. As a consequence, the analysis of functions/methods that return a `ModuleWithProviders` object did not take the methods of such classes into account. Another edge-case with such intermediate variable was that static properties would not be considered as class members. A testcase was added to prevent regressions. Fixes #29078 PR Close #29119
-
Emilie Huet authored
Indicate that a pipe also needs to be included in the providers array PR Close #28291
-
Pete Bacon Darwin authored
Previously we had to share code between upgrade/dynamic and upgrade/static by symlinking the `src` folder, which allowed both packages to access the upgrade/common files. These symlinks are always problematic on Windows, where we had to run a script to re-link them, and restore them. This change uses Bazel packages to share the `upgrade/common` code, which avoids the need for symlinking the `src` folder. Also, the Windows specific scripts that fixup the symlinks have also been removed as there is no more need for them. PR Close #29466
-
Ben Lesh authored
PR Close #29592
-
Ben Lesh authored
PR Close #29593
-
Ben Lesh authored
Removes usage of whitelist from error messages, comments and test descriptions in ts_api_guardian Related to #28539 PR Close #29594
-
Ben Lesh authored
PR Close #29599
-
Ben Lesh authored
PR Close #29600
-
Greg Magolan authored
PR Close #29647
-
George Kalpakas authored
Based on Google Analytics error report, the following error happens occasionally (15% or total errors for 2019-03): ``` Cannot read property '0' of null TypeError: at t.scrollToPosition@main.js ``` This was a result of calling [ViewportScroller#scrollToPosition()][1] with `null`, which in turn happens when calling [ScrollService#scrollToPosition()][2] while `this.scrollPosition` is `null`. This can be a result of a `popstate` event without an associated history state. This commit fixes the error by checking whether `this.scrollPosition` is `null`, before using it with `scrollToPosition()`. (It also refactors away the unneeded internal `popStateFired` property.) [1]: https://github.com/angular/angular/blob/deca6a60d/packages/common/src/viewport_scroller.ts#L101-L105 [2]: https://github.com/angular/angular/blob/deca6a60d/aio/src/app/shared/scroll.service.ts#L158-L161 PR Close #29658
-
George Kalpakas authored
PR Close #29658
-
George Kalpakas authored
PR Close #29658
-
cexbrayat authored
PR #27684 introduced a new getting-started guide and a few typos slipped through the review. PR Close #29665
-
- Apr 02, 2019
-
-
George Kalpakas authored
One of the tests introduced in #29601 is susceptible to a kind of WebDriver flake related to trying to click elements hidden behind fixed positioned elements. This commit works around the issue by clicking the elements directly using JavaScript (instead of `WebElement#click()`). PR Close #29641
-
Pete Bacon Darwin authored
Currently there is no support in ngtsc for imports of the form: ``` import * as core from `@angular/core` export function forRoot(): core.ModuleWithProviders; ``` This commit modifies the `ReflectionHost.getImportOfIdentifier(id)` method, so that it supports this kind of return type. PR Close #27675
-
Filipe Silva authored
Followup to https://github.com/angular/angular-cli/pull/13700 PR Close #29633
-
cexbrayat authored
PR #29289 reworded the description, making it less obvious that the value to format can be a `Date`. PR Close #29632
-
Alex Rickabaugh authored
This commit introduces a mechanism for incremental compilation to the ngtsc compiler. Previously, incremental information was used in the construction of the ts.Program for subsequent compilations, but was not used in ngtsc itself. This commit adds an IncrementalState class, which tracks state between ngtsc compilations. Currently, this supports skipping the TypeScript emit step when the compiler can prove the contents of emit have not changed. This is implemented for @Injectables as well as for files which don't contain any Angular decorated types. These are the only files which can be proven to be safe today. See ngtsc/incremental/README.md for more details. PR Close #29380
-
Alex Rickabaugh authored
This commit adds support for compiling the same program repeatedly in a way that's similar to how incremental builds work in a tool such as the CLI. * support is added to the compiler entrypoint for reuse of the Program object between compilations. This is the basis of the compiler's incremental compilation model. * support is added to wrap the CompilerHost the compiler creates and cache ts.SourceFiles in between compilations. * support is added to track when files are emitted, for assertion purposes. * an 'exclude' section is added to the base tsconfig to prevent .d.ts outputs from the first compilation from becoming inputs to any subsequent compilations. PR Close #29380
-
Alex Rickabaugh authored
This commit adds a `tracePerformance` option for tsconfig.json. When specified, it causes a JSON file with timing information from the ngtsc compiler to be emitted at the specified path. This tracing system is used to instrument the analysis/emit phases of compilation, and will be useful in debugging future integration work with @angular/cli. See ngtsc/perf/README.md for more details. PR Close #29380
-
Alex Rickabaugh authored
Currently, ngtsc decides to use remote scoping if the compilation of a component may create a cyclic import. This happens if there are two components in a scope (say, A and B) and A directly uses B. During compilation of B ngtsc will then note that if B were to use A, a cycle would be generated, and so it will opt to use remote scoping for B. ngtsc already uses the R3TargetBinder to correctly track the imports that are actually required, for future cycle tracking. This commit expands that usage to not trigger remote scoping unless B actually does consume A in its template. PR Close #29404
-
Tim Deschryver authored
PR Close #29640
-