12 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
Joey Perrott
698b0288be build: reformat repo to new clang@1.4.0 ()
PR Close 
2020-04-14 12:08:36 -07:00
Paul Gschwendtner
970b22f98e test: setup circular dependency tests for all entry points ()
Sets up circular dependency tests for all entry-points in the
project (except for the ones part of a deprecated package).

PR Close 
2020-01-23 11:36:40 -08:00
Greg Magolan
9a68f23dd2 build: ts_web_test & ts_web_test_suite deprecated in favor of karma_web_test & karma_web_test_suite ()
This is a breaking change in nodejs rules 0.40.0 as part of the API review & cleanup for the 1.0 release. Their APIs are identical as ts_web_test was just karma_web_test without the config_file attribute.

PR Close 
2019-11-13 13:33:38 -08:00
Evan Martin
becd62d4a1 fix(upgrade): remove unused version export ()
In some module systems (Closure), it's illegal to mutate an export.
This mutated export isn't used anyway, so we can just remove it.

PR Close 
2019-10-16 16:39:11 -04:00
George Kalpakas
c1ae6124c8 fix(upgrade): compile downgraded components synchronously (if possible) ()
AngularJS compilation is a synchronous operation (unless having to fetch
a template, which is not supported for downgraded components).
Previously, ngUpgrade tried to retain the synchronous nature of the
compilation for downgraded components (when possible), by using a
synchronous thenable implementation (`ParentInjectorPromise`). This was
accidentally broken in  by replacing a call to
`ParentInjectorPromise#then()` (which can be synchronous) with a call to
`Promise.all()` (which is asynchronous).

This commit fixes this by introducing a `SyncPromise.all()` static
method; similar to `Promise.all()` but retaining the synchronous
capabilities of `SyncPromise` (which `ParentInjectorPromise` inherits
from).

Fixes 

PR Close 
2019-08-01 10:09:02 -07:00
Ben Black
29e1c53a31 feat(upgrade): support $element in upgraded component template/templateUrl functions ()
PR Close 
2019-07-24 14:34:20 -07:00
Paul Gschwendtner
647d7bdd88 refactor: fix typescript strict flag failures in all tests ()
Fixes all TypeScript failures caused by enabling the `--strict`
flag for test source files. We also want to enable the strict
options for tests as the strictness enforcement improves the
overall codehealth, unveiled common issues and additionally it
allows us to enable `strict` in the `tsconfig.json` that is picked
up by IDE's.

PR Close 
2019-07-18 14:21:26 -07:00
George Kalpakas
2236ea4359 test(upgrade): rename angular.module() to angular.module_() ()
With , the ngUpgrade internal `angular.module()` method was
renamed to `angular.module_()` (to avoid a webpack bug).

Merging  afterwards resulted in some broken tests, because it
still used the old `angular.module()` method name. (The PR had been
tested on CI against a revision that did not contain the rename.)

This commit fixes the broken tests by renaming the remaining occurrences
of `angular.module()`.

PR Close 
2019-04-25 12:01:18 -07:00
Sam Julien
0ddf2e7a5b fix(upgrade): do not break if onMicrotaskEmpty emits while a $digest is in progress ()
Previously, under certain circumstances, `NgZone#onMicrotaskEmpty` could
emit while a `$digest` was in progress, thus triggering another
`$digest`, which in turn would throw a `$digest already in progress`
error. Furthermore, throwing an error from inside the `onMicrotaskEmpty`
subscription would result in unsubscribing and stop triggering further
`$digest`s, when `onMicrotaskEmpty` emitted.

Usually, emitting while a `$digest` was already in progress was a result
of unintentionally running some part of AngularJS outside the Angular
zone, but there are valid (if rare) usecases where this can happen
(see  for details).

This commit addresses the issue as follows:
- If a `$digest` is in progress when `onMicrotaskEmpty` emits, do not
  trigger another `$digest` (to avoid the error). `$evalAsync()` is used
  instead, to ensure that the bindings are evaluated at least once more.
- Since there is still a high probability that the situation is a result
  of programming error (i.e. some AngularJS part running outside the
  Angular Zone), a warning will be logged, but only if the app is in
  [dev mode][1].

[1]: https://github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts#L12

Fixes 

PR Close 
2019-04-25 11:00:36 -07:00
George Kalpakas
abcb2cf9a0 refactor(upgrade): rename module constant to avoid webpack bug ()
When targeting ES2015 (as is the default in cli@8), `const` is not
downleveled to `var` and thus declaring `const module` throws an error
due to webpack wrapping the code in a function call with a `module`
argument (even when compiling for the `web` environment).

Related: webpack/webpack#7369

Fixes 

PR Close 
2019-04-24 17:03:51 -07:00
Pete Bacon Darwin
9f54d76ef5 refactor(upgrade): use Bazel packages to avoid symlinks in the source ()
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 
2019-04-02 10:38:01 -07:00