Commit graph

29561 commits

Author SHA1 Message Date
Renovate Bot
6c05c3fd2d build: update all non-major dependencies (#44152)
PR Close #44152
2021-12-14 16:04:34 -05:00
Dylan Hunn
7df9127088 refactor(forms): Fix weak helper types in the Forms package, mostly Function types that can be strengthened to specific callbacks. This was originally proposed as part of Typed Forms, but it may be possible to submit at least some of these changes separately and unconditionally (i.e. without relying on TypedOrUntyped.) (#44370)
It is desirable to land this separately to reduce the scope of the Typed Forms PR, by focusing it only on the new type parameters (rather than incidental strictness fixes).

PR Close #44370
2021-12-10 17:13:24 -05:00
Renovate Bot
78bdb1f977 build: update dependency google-closure-compiler to v20211201 (#44392)
PR Close #44392
2021-12-10 16:39:42 -05:00
Renovate Bot
7b6ca4c5d2 build: update angular (#44273)
PR Close #44273
2021-12-10 16:39:05 -05:00
dario-piotrowicz
92495060d2 docs(animations): improve animation transition api docs (#44396)
improve the transition api docs by removing unnecessary examplanations
and examples

also provide helpful information regarding entering and leaving
elements (as part of #44253)

PR Close #44396
2021-12-10 16:34:00 -05:00
Paul Gschwendtner
944b6705f8 build: remove unused starlark file that is no longer used (#44430)
Cleans up an unused Starlark file used by the old integration test
setup.

PR Close #44430
2021-12-10 16:31:04 -05:00
Paul Gschwendtner
f51b00916e build: fix integration test size trackings not running after recent refactoring (#44430)
Fixes that the integration test size trackings stopped working due to
the recent refactorings (switch to the rule from `@angular/dev-infra-private`).

The size-tracking does not integrate very-well into Bazel and needs
a better solution in the future, allowing for RBE and Windows support,
but currently with the new rule/setup/structure the tracking does not
validate sizes because:

* The `dist/*.js` argument to the tracking script got expanded and
  messed up the indices. It should be passed as a literal. This now
  surfaced because the new rule runs commands in a shell.

* The name for the size goldens were not computed properly because they
  were based on `ctx.attr.name`, but given the new structure, the test
  targets are always named `test`.

PR Close #44430
2021-12-10 16:31:04 -05:00
Alex Rickabaugh
a7c117ab44 release: cut the v13.2.0-next.0 release (#44422)
PR Close #44422
2021-12-09 13:25:28 -05:00
Alex Rickabaugh
79baf7a87a Revert "release: cut the v13.2.0-next.0 release (#44421)"
This reverts commit e3f4360ebf.

More issues with transient yarn errors during the release.
2021-12-09 13:12:56 -05:00
Alex Rickabaugh
e3f4360ebf release: cut the v13.2.0-next.0 release (#44421)
PR Close #44421
2021-12-09 13:11:13 -05:00
Alex Rickabaugh
532d7d436f docs: release notes for the v13.1.0 release (#44419)
PR Close #44419
2021-12-09 12:14:39 -05:00
Alex Rickabaugh
cab7a84c70 release: bump the next branch to v13.2.0-next.0 2021-12-09 11:21:55 -05:00
Paul Gschwendtner
2664bc2b3e test: switch integration tests from puppeteer/webdriver-manager to Bazel-managed chromium (#44238)
Switches the integration tests form Puppeteer/webdriver-manager to the
Bazel-managed Chromium/Chromedriver. This is now possible with the new
integration test rule for which we can consult the
`dev-infra/bazel/browsers` toolchain and setup environment variables.
This has been configured already in a previous commit.

This commit also includes some additional small cleanups necessary for
the new integration test rule:

* The `test.sh` scripts have been renamed as they would conflict with
  the `test.sh` scripts generated by the integration test rule.
  Previously this was not an issue because tests were declared at a
  higher-level. As mentioned though this has other downsides and it is
  trivial to rename the file.

* Related to the point above, since tests are now declared witin the
  actual test folder (for perf e.g.), `package.json` files setting
  `"type": "module"` will accidentally cause the `nodejs_test`-generated
  files to be considered ESM. This is not correct and likely needs to be
  fixed upstream in `rules_nodejs` where explicit `.cjs` extensions
  should be used. This is only happening **once** in the `injectable-def`
  test so it is acceptable doing that for now.

PR Close #44238
2021-12-08 13:42:42 -05:00
Paul Gschwendtner
5837fbd357 refactor: setup bazel integration test with new integration rule (#44238)
Sets up the Bazel integration test with the new integration rule. This
commit is separate from the other changes because it required some
additional work. i.e.

The test has moved from `integration/bazel` to `integration/<..>/bazel`
where `<..>` is a new Bazel package defining the integration test.

This is necessary because we could not declare the integration test
within the `BUILD.bazel` file actually being part of the nested bazel
workspace. In those cases we can just define it at a higher-level and
use integration test `working_dir` attribute.

PR Close #44238
2021-12-08 13:42:41 -05:00
Paul Gschwendtner
64fd824f67 build: setup test targets for integration tests with new rule (#44238)
Sets up the test targets for integration tests with the new rule.
The targets will match the configuration of the previous integration
test setup (through the dictionary in a `bzl` file).

Note: We already add `setup_chromium` based on whether Chromium tests
run as part of this integration test. In a follow-up commit we can then
remove puppeteer and rely on the Bazel-managed version of Chromium.

PR Close #44238
2021-12-08 13:42:41 -05:00
Paul Gschwendtner
98c5063cd8 build: update visibility for npm package targets to work with new integration test structure (#44238)
As mentioned in the previous commit, integration tests will be declared
in subpackages of `//integration`. For these tests to still rely on the
NPM packages from `HEAD`, we need to update the visibility.

PR Close #44238
2021-12-08 13:42:41 -05:00
Paul Gschwendtner
6c0905d7ab build: wire up integration test rule from shared dev-infra package (#44238)
Wires up the integration test rule from the shared dev-infra package,
while also deleting the old integration test rule.

The readme is updated to reflect the changes that are being made
to run with the new integration rule. Overall one major difference is
that we will declare the integration test targets within each test
directory, making those actual bazel packages. This is more idiomatic
within Bazel and also reduces the computation within Skyframe as less
globs need to be evaluated for example.

PR Close #44238
2021-12-08 13:42:41 -05:00
Paul Gschwendtner
6add6a097d build: replace validate import ESM/CJS interop rule with dev-infra shipped rule (#44238)
The import ESM/CJS interop lint rule has been ported to the shared
dev-infra package, so we can remove the local version here.

PR Close #44238
2021-12-08 13:42:41 -05:00
Alex Rickabaugh
0cd524b148 Revert "refactor(forms): Move FormControl to an overridden exported constructor. (#44316)"
This reverts commit cdf50ff931.

Reverting as this needs a little more work on the documentation side, plus
the `export declare interface` syntax in `model.ts` might have unintended
side effects in g3.
2021-12-08 13:36:58 -05:00
Dylan Hunn
cdf50ff931 refactor(forms): Move FormControl to an overridden exported constructor. (#44316)
This implementation change was originally proposed as part of Typed Forms, and will have major consequences for that project as described in the design doc. Submitting it separately will greatly simplify the risk of landing Typed Forms. This change should have no visible impact on normal users of FormControl.

See the Typed Forms design doc here: https://docs.google.com/document/d/1cWuBE-oo5WLtwkLFxbNTiaVQGNk8ipgbekZcKBeyxxo.

PR Close #44316
2021-12-08 13:24:28 -05:00
Kristiyan Kostadinov
6df314f3d9 refactor(animations): remove unnecessary code (#44378)
* The `TransitionAnimationEngine` had a fallback where it would store classes directly on a node if it doesn't have a `classList`. Presumably this is to support old browsers or if an animation is set on something like `ng-container`. This information was never used for anything since `containsClass` was never called. These changes simplify the logic to just a null check.
* Deprecates the `AnimationDriver.matchesElement` method, because it was only used in one place which can be replaced with `classList.contains`. We can't remove the method completely, because `AnimationDriver` is a public API. We also can't turn it into a method on the base class in order to remove it from the sub-classes, because it can break apps using `noImplicitOverride` while extending `AnimationDriver`.

PR Close #44378
2021-12-08 13:23:40 -05:00
Markus Doggweiler
80ab604fe0 docs(localize): fix typo in i18n-overview.md (#44389)
Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com>

PR Close #44389
2021-12-08 13:22:31 -05:00
Andrew Kushnir
52a73c6b14 refactor(animations): reuse existing Version class (#44375)
Animations package has its own implementation of the `Version` class, when other packages use an implementation from `@angular/core`. This commit aligns Animations package with other packages and makes use of the `Version` class from `@angular/core`.

PR Close #44375
2021-12-07 08:34:53 -05:00
dario-piotrowicz
c434e84e20 test: spy on console.error in configureTestingModule reset test (#44377)
improve the configureTestingModule reset test by also spying on
console.error and making sure that an error is logged to the user
when it should be

PR Close #44377
2021-12-07 08:34:29 -05:00
dario-piotrowicz
bca5638736 docs(animations): add :enter and :leave info to query api docs (#44379)
add information to the query api docs clarifying what elements can be
queried as entering and leaving (as that is not currently clearly
documented and has caused confusions to developers)

one of the tasks of issue #44253

PR Close #44379
2021-12-07 08:34:04 -05:00
George Kalpakas
41265919aa fix(ngcc): correctly resolve UMD dependencies (#44381)
Previously, when processing UMD, ngcc assumed that the `exports`
argument of the CommonJS factory call (if present) would be the first
argument of the call. This is generally true for the supported UMD
formats, but can change if ngcc prepends more imports (and thus factory
arguments) while processing the module. This could lead to errors when
trying to collect dependencies of an already processed module.
(This was accidentally broken in #44245 (commit 2bc3522e16).)

This commit fixes it by not making any assumptions about the position of
an `exports` argument in the CommonJS factory call.

Fixes #44380

PR Close #44381
2021-12-07 08:33:00 -05:00
Alex Rickabaugh
43db24302c refactor(compiler): delete View Engine components of @angular/compiler (#44368)
This commit finishes the removal of View Engine from the codebase, deleting
those pieces of @angular/compiler which were only used for VE.

Co-Authored-By: JoostK <joost.koehoorn@gmail.com>

PR Close #44368
2021-12-06 13:12:36 -05:00
Renovate Bot
433a9569b9 build: update dependency jsdom to v19 (#44362)
PR Close #44362
2021-12-03 11:49:42 -05:00
Renovate Bot
90de08cf33 build: update dependency tsec to v0.2.1 (#44361)
PR Close #44361
2021-12-03 11:48:45 -05:00
Renovate Bot
927bfb9e7b build: update dependency eslint to v8 (#43789)
PR Close #43789
2021-12-03 11:48:10 -05:00
George Kalpakas
51093690bf build(docs-infra): update .browserslistrc to align with new CLI apps (#44283)
Update `.browserslistrc` to align with new CLI apps. This drops some
older browsers that are no longer supported by Angular v13+.
See the [list of supported browsers][1].

[1]: https://angular.io/guide/browser-support

PR Close #44283
2021-12-02 11:52:13 -08:00
JoostK
13362972bb perf(common): code size reduction of ngFor directive (#44315)
This commit makes several changes to the implementation of `NgForOf` to
reduce its code size in production builds:

1. The tailor-made message for an unsupported differ is fully
   tree-shaken in production builds, in favor of the exception from the
   differ factory itself.
2. The private `_perViewChange` method was changed into a free-standing
   function, to allow its name to be minimized.
3. The need for an intermediate `RecordViewTuple` was avoided by
   applying the operation in-place, instead of collecting all insertions
   into a buffer first. This is safe as the `_perViewChange` operation
   that used to be done on each `RecordViewTuple` is entirely local to
   the tuple itself. Hence, it is invariant to execution ordering which
   means that the `_perViewChange` can be executed directly during the
   `forEachOperation` loop.

PR Close #44315
2021-12-02 09:25:45 -08:00
Jessica Janiuk
99d85cba8e ci: update pullapprove groups (#44340)
This updates all of the pullapprove file to properly reference current members.

PR Close #44340
2021-12-02 08:47:22 -08:00
Renovate Bot
360867b654 build: update dependency tsec to ^0.2.0 (#44274)
PR Close #44274
2021-12-02 08:46:39 -08:00
dario-piotrowicz
f3898f8d84 fix(docs-infra): prevent automatic linking of 'json' (#44294)
add 'json' to the ignoreGenericWords set so that it doesn't get
wrongly linked to the jsonPipe during the aio docs generation
as it is a generic javarscript term

PR Close #44294
2021-12-01 15:22:00 -08:00
Dylan Hunn
6769df7295 release: cut the v13.1.0-next.3 release (#44334)
PR Close #44334
2021-12-01 21:25:00 +00:00
Dylan Hunn
f1f6e7104f docs: release notes for the v13.0.3 release (#44333)
PR Close #44333
2021-12-01 21:15:06 +00:00
Kristiyan Kostadinov
e65a245a0b feat(core): add migration to remove entryComponents (#44322)
Adds an automated migration that will drop any usages of `entryComponents` from `@NgModule` and `@Component`.

PR Close #44322
2021-12-01 12:03:14 -08:00
George Kalpakas
f7ea5249de refactor(docs-infra): replace use of deprecated Compiler with createNgModuleRef() (#44293)
Remove a use of the deprecated `Compiler` class in `ElementsLoader` and
use the `createNgModuleRef()` function instead.

PR Close #44293
2021-12-01 11:56:47 -08:00
George Kalpakas
15d38a1302 refactor(docs-infra): remove obsolete ViewEngine code path from ElementsLoader (#44293)
Remove a code path that was only reached in ViewEngine mode and is now
(with the removal of ViewEngine) obsolete.

PR Close #44293
2021-12-01 11:56:47 -08:00
Renovate Bot
4192ab41bf build: update dependency saucelabs to v7 (#44321)
PR Close #44321
2021-12-01 11:56:12 -08:00
JoostK
1922032786 refactor(compiler-cli): dismantle View Engine implementation of ngc (#44269)
This commit does a first-pass removal of the View Engine infrastructure
in compiler-cli. A more in-depth cleanup is necessary and large parts
of the View Engine compiler infrastructure remain within
`@angular/compiler`, this is just a first cleanup step.

PR Close #44269
2021-12-01 10:36:30 -08:00
JoostK
4e6281f114 refactor(bazel): remove metadata collection from ngc_wrapped (#44269)
The generated metadata is obsolete now that ViewEngine is no longer
used, so this commit removes the generation of those file from
`ngc_wrapped`. This is needed to allow removal of the metadata collector
in a subsequent commit.

PR Close #44269
2021-12-01 10:36:30 -08:00
JoostK
604636e70a refactor(compiler-cli): move version number helpers out of diagnostics subfolder (#44269)
As a preparation for the removal of the ViewEngine parts in
`compiler-cli`, this commit moves the version number helper functions
up one level such that the whole `diagnostics` subfolder can be removed.

PR Close #44269
2021-12-01 10:36:30 -08:00
Andrew Kushnir
3f6d8f38de refactor(forms): minor refactoring of SelectMultipleControlValueAccessor (#44261)
This commit updates the code of the `SelectMultipleControlValueAccessor` to:
- improve typings to make them more precise
- updates the note that refers to IE, but we still can not remove the branch since it's needed for Universal (that uses Domino)

PR Close #44261
2021-11-30 16:43:11 -05:00
Andrew Scott
5124c06ce3 ci: Update availability for pullapprove (#44312)
Follows the v3 pullapprove docs here: https://docs.pullapprove.com/config/availability/

PR Close #44312
2021-11-30 16:41:53 -05:00
Dylan Hunn
a532040d97 Revert "feat(core): add migration to remove entryComponents (#44308)" (#44318)
This reverts commit 5dff077d50.

PR Close #44318
2021-11-30 16:31:17 -05:00
Ramesh Thiruchelvam
24baa5e61d docs(forms): add an example for async validator token (#44301)
to be consistent with the validator token, have the example code for the async validator token.

PR Close #44301
2021-11-30 14:24:26 -05:00
Ramesh Thiruchelvam
96dfc7af7c refactor(core): make the error messages tree shakable (#44219)
Long error messages can be tree-shaken in the production build.
Doing this, we will keep the throw and remove the long error messages.

See: https://github.com/angular/angular/pull/44210#pullrequestreview-810615849

PR Close #44219
2021-11-30 14:17:39 -05:00
Ruslan Usmanov
ca5b9b558c refactor(forms): eagerly initialize data members (#44292)
Data members in AbstractControl should be eagerly
initialized to address issue/24571. This eliminates the need to
constantly check for truthiness and makes code much more readable.

More PRs to follow to address issue/24571.

PR Close #44292
2021-11-30 14:15:16 -05:00