Commit graph

29561 commits

Author SHA1 Message Date
dario-piotrowicz
7663dd082d docs(animations): add links to state() references (#44376)
the keyword 'state' is included in the `ignoredWords` set that prevents
certain words to be autolinked, this causes the animations' state
function not to be automatically linked, so manually link those
references to the state api docs

PR Close #44376
2022-01-04 12:19:08 -08:00
Dylan Hunn
5ae1030462 feat(forms): Add an unused symbol AnyForUntypedForms. (#44467)
This symbol will support the typed forms migration in google3. The docs will be updated once the migration begins.

Pertains to #13721.

PR Close #44467
2022-01-04 12:18:26 -08:00
Abdurrahman Abu-Hijleh
f0b4c709c9 docs: fix code sample indentation (#44517)
PR Close #44517
2022-01-04 12:15:55 -08:00
AlirezaEbrahimkhani
ed6e2d21ab docs: fix ngOnChange description issue (#44582)
ngOnChange respond when Angular sets or resets data-bound @input properties and description of the ngOnChanges should be `When an [input](#input) binding value changes` instead of `When an [input](#input)/[output](#output) binding value changes`

resolves angular#44559

PR Close #44582
2022-01-04 12:15:18 -08:00
huangqing
bfd94b39d3 docs: Replace OnInit with AfterViewInit (#44485)
`this.adHost` is undefined if loadComponent is called in OnInit.
So replace OnInit with AfterViewInit!
PR Close #44485
2022-01-04 12:14:44 -08:00
Paul Gschwendtner
3a29c57f60 test: update size goldens to reflect latest CLI devkit update (#44490)
Updates the size goldens to the reflect the latest CLI devkit updates.

PR Close #44490
2022-01-04 12:14:14 -08:00
Paul Gschwendtner
7974564a6e build: update release config to reflect latest ng-dev config changes (#44490)
The ng-dev release config changed its release configuration in order
to support experimental packages. This commit updates the FW release
config to work with the new config signature of ng-dev.

All of our peackages are non-experimental, so we do not specify
an explicit `experimental` property.

PR Close #44490
2022-01-04 12:14:14 -08:00
Paul Gschwendtner
c8cd5d5f2c build: switch all instances from ng_rollup_bundle to app_bundle (#44490)
The `ng_rollup_bundle` rule has been replaced with a new rule called
`app_bundle`. This rule replicates the Angular v13 optimization
pipeline in the CLI, so that we can get better benchmarking results.
Also the rule is much simpler to maintain as it relies on ESbuild.

The old `ng_rollup_bundle` rule did rely on e.g. build-optimizer that no
longer has an effect on v13 Angular packages, so technically size
tests/symbol tests were no longer as correct as they were before. This
commit fixes that.

A couple of different changes and their explanation:

* Language-service will no longer use the benchmark rule for creating
  its NPM bundles! It will use plain `rollup_bundle`. ESBuild would have
  been nice but the language-service relies on AMD that ESBuild cannot
  generate (yet?)

* Service-worker ngsw-worker.js file was generated using the benchmark
  bundle rule. This is wrong. We will use a simple ESbuild rule in the
  future. The output is more predictable that way, and we can have a
  clear use of the benchmark bundle rule..

* A couple of benchmarks in `modules/` had to be updated to use e.g.
  `initTableUtils` calls. This is done because with the new rule, all
  files except for the entry-point are considered side-effect free. The
  utilities for benchmarks relied on side-effects in some
  transitively-loaded file (bad practice anyway IMO). We are now
  initializing the utilities using a proper init function that is
  exported...

PR Close #44490
2022-01-04 12:14:14 -08:00
Paul Gschwendtner
4e58a508a9 build: update postinstall script to account for local target references in dev-infra (#44490)
We are in an inconvenient situation where the ng-dev package might rely
on packages from the Angular framework repository. Given that we install
this package in the framework repository, we need to update some
references through a postinstall.

This commit updates the patches to account for the latest changes in the
dev-infra package/repository.

PR Close #44490
2022-01-04 12:14:14 -08:00
Paul Gschwendtner
d73c7162df build: add postinstall script as runfile for yarn_install repository rule (#44490)
Adds the postinstall script as runfile for the `yarn_install`
repository rule, so that the dependencies are re-fetched when
the script changes.

PR Close #44490
2022-01-04 12:14:14 -08:00
Paul Gschwendtner
c3a5568143 build: update symbol extractor to support IIFE bundles using arrow-functions (#44490)
Updates the symbol extractor to support IIFE bundles using
arrow-functions instead of function declarations. This is in preparation
for running symbol extraction tests with the overhauled optimization
pipeline for Angular v13, relying on ESBuild internally.

Also removes rollup-specific code that does not seem to be relevant
anymore / rollup will be replaced anyway.

PR Close #44490
2022-01-04 12:14:14 -08:00
Paul Gschwendtner
02bc4582ba build: update angular (#44490)
Updates Angular and the dev-infra package to the latest
version/build.

PR Close #44490
2022-01-04 12:14:14 -08:00
Borja Paz Rodríguez
9d2401d99a docs: fix several typos (#44508)
PR Close #44508
2022-01-04 12:13:46 -08:00
Dario Piotrowicz
67c81ccef0 refactor(docs-infra): improve aio-footer's layout (#44532)
improve aio-footer's layout by using grid instead of flexbox,
such change makes it so that we have four columns on wide window
sizes (desktop), two columns on medium window sizes (desktop/tablet)
and a single column on small window sizes (mobile), compared to the
flex implementation which could only have either 4 columns or 1

this makes the footer look generally nicer for various window sizes
(especially in the middle range in which one column was too little
and four were too much)

note: also a scroll of auto has been added so we that we can be sure
that overflowing footer content never creates a global layout issue

PR Close #44532
2022-01-04 12:13:22 -08:00
Dylan Hunn
f7aa937cac fix(forms): Make some minor fixups for forward-compatibility with typed forms. (#44540)
Make the following fixes:
* When submitting the entire migration in a disabled state, I commented out more code than strictly required
* Responding to some final review comments caused two conditions to become flipped
* Always use explicit checks instead of boolean corecion
* Fix one missed any cast in a test case

PR Close #44540
2022-01-04 12:10:56 -08:00
Yousaf Nawaz
7cb2999472 docs: add missing npm install instruction (#44574)
add missing npm install instruction to start->deploying an application

Fixes #44542

PR Close #44574
2022-01-04 12:07:37 -08:00
ivanwonder
756761d534 fix(language-service): revert the test files for Ivy (#44528)
The `completions_spec` and `definitions_spec` is removed by accident
in [bb9ff60](bb9ff6003c)

PR Close #44528
2022-01-04 12:06:49 -08:00
Andrew Scott
4f7a838e9d docs: Add breaking changes note to 13.0 release (#44518)
A breaking change in v13 was identified post-release and needs to be noted
in the breaking changes section to ensure developers are aware of it
when upgrading.

Resolves #44383

PR Close #44518
2022-01-04 12:06:27 -08:00
Yousaf Nawaz
a8f153c2b3 docs(docs-infra): fix numbering of 'running your application locally' steps (#44575)
fix numbering of 'running your application locally' steps and corrected step 1 statement.

PR Close #44575
2022-01-04 12:06:07 -08:00
Serhey Dolgushev
62a5027482 docs: fixed meetup URL (#44585)
PR Close #44585
2022-01-04 12:05:45 -08:00
Adam Plumer
79d1afaf5b build: bump license year (#44590)
The year has advanced by one cycle. In accordance with this
practice, we increment the value of the bounding set of our
license year by one.

PR Close #44590
2022-01-04 12:05:25 -08:00
George Kalpakas
ca042be203 docs: update instructions for running ng-dev misc build-and-link command (#44604)
Fixes #44571

PR Close #44604
2022-01-04 12:05:04 -08:00
zuckjet
6cdd66d19f docs(compiler): fix typo in getHtmlTagDefinition() function (#44601)
PR Close #44601
2022-01-04 12:04:04 -08:00
JoostK
a01c077a67 docs: remove Angular 10 from support table (#44611)
PR Close #44611
2022-01-04 12:03:37 -08:00
Yousaf Nawaz
af512deeed docs: fix invalid link of library support for npm packages guide (#44612)
change link of library support to point to guide->creating-libraries

fixes #44583

PR Close #44612
2022-01-04 12:03:15 -08:00
Chihab Otmani
c6c75c9b70 docs: fix typo (#44592)
PR Close #44592
2022-01-04 10:59:58 -08:00
Andrew Scott
58e8f5e06a ci: remove atscott for unavailable users (#44539)
I am back from vacation so I can now be assigend PRs to review

PR Close #44539
2022-01-04 10:38:42 -08:00
Joey Perrott
8ebc946c0e docs: remove recent departures from contributors page (#44514)
PR Close #44514
2021-12-16 14:29:29 -05:00
Alex Rickabaugh
28eecf5719 release: cut the v13.2.0-next.1 release (#44497)
PR Close #44497
2021-12-15 15:21:51 -05:00
Alex Rickabaugh
5370c2051f docs: release notes for the v13.1.1 release (#44496)
PR Close #44496
2021-12-15 15:00:04 -05:00
Kristiyan Kostadinov
7c246d513b fix(docs-infra): update examples to Angular 13.1 (#44487)
Updates AIO and the live examples to 13.1.0 in order to resolve a build error when opened on Stackblitz. They were using TS 4.5 with Angular ~13.0.0 which doesn't support 4.5.

Fixes #44480.

PR Close #44487
2021-12-15 13:22:14 -05:00
Dylan Hunn
9921b2ca35 feat(core): Add a migration for typed forms. (#44449)
This migration will insert `<AnyForUntypedForms>` or `<AnyForUntypedForms[]>` at existing uses of `AbstractControl` classes, as well as calls to `FormBuilder` methods.

We need to submit this ahead of time in order to get started with the migration in google3.

PR Close #44449
2021-12-15 13:20:33 -05:00
dario-piotrowicz
835987b78b refactor(docs-infra): use eslint in aio's example-lint script (#43218)
Instead of the deprecated tslint use eslint in the aio's example-lint
script

PR Close #43218
2021-12-15 12:28:46 -05:00
Dylan Hunn
6a0dadf46f fix(forms): _reduceValue arrow function now has correct types. (#44483)
I previously strengthened some weak types in #44370. One of these fixes exposed an incorrect call into `_reduceChildren` from `_reduceValue`. This was caught in google3 by a caller who was extending `FormGroup` and overriding these methods.

Special thanks to Bart G for catching this issue and suggesting a fix.

PR Close #44483
2021-12-15 12:27:06 -05:00
Dylan Hunn
72092ebd26 feat(forms): Allow a FormControl to use initial value as default. (#44434)
Allow a FormControl to be reset to its initial value. Provide this feature via a new option in a FormControlOptions interface, based on AbstractControlOptions.

Also, expose the default value as part of the public API. This is part of a feature that has been requested elsewhere (e.g. in #19747).

This was originally proposed as part of typed forms. As discussed in the GDE session (and after with akushnir/alxhub), it is likely better to just reuse the initial value rather than accepting an additional default.

It is desirable to land this separately in order to reduce the scope of the typed forms PR, and make it a types-only change.

Pertains to issue #13721.

PR Close #44434
2021-12-15 10:36:13 -05:00
Dylan Hunn
4aa6965d41 test(docs-infra): Correct an invalid assumption in aio tests. (#44479)
The aio application expects `FormControl` to have no properties for the purposes of its own internal tests, but this is no longer true after #44434.

PR Close #44479
2021-12-14 16:14:47 -05:00
Kristiyan Kostadinov
093fd39f93 refactor(compiler): clean up workarounds for TypeScript 4.5 (#44477)
Cleans up some of the temporary workarounds that were necessary in order to land support for TypeScript 4.5 since they're no longer necessary.

PR Close #44477
2021-12-14 16:14:02 -05:00
Spej
d640fa7062 docs: Fixed typo 'test' => 'text' (#44464)
PR Close #44464
2021-12-14 16:12:57 -05:00
dario-piotrowicz
f394831ec4 refactor(animations): remove the unused enter and leave selectors (#44460)
remove the no longer used ENTER_SELECTOR and LEAVE_SELECTOR constants

note: their uses have been removed in PR #19455

PR Close #44460
2021-12-14 16:12:35 -05:00
dario-piotrowicz
f56ac0fe83 refactor(animations): improve _finalKeyframe non-null assertion (#44458)
instead of declaring the WebAnimationsPlayer's _finalKeyframe
field with a non-null assertion, declare it as optional field
and use a non-null assertion only when it is being used in the
beforeDestroy function

relates to #24571

PR Close #44458
2021-12-14 16:12:11 -05:00
Dylan Hunn
5da31d6d25 test(forms): Add more tests for FormBuilder method argument shapes. (#44452)
It is possible to pass arguments to `FormBuilder` using four different formats: value-only, boxed value, control config, and value-array. Currently, these different methods are not well-tested, especially as they interact. This PR will add tests for the variety of different argument shapes.

This was originally inspired by typed forms: when `FormBuilder` becomes typed, all these argument shapes should just work, with correct inferred types.

PR Close #44452
2021-12-14 16:11:29 -05:00
Dylan Hunn
65717999c8 refactor(forms): Make the minimum changes to the forms unit tests in order to support the typed forms PR (#43834). (#44451)
Currently, many of our unit tests are written to use heterogenous groups and arrays, and controls that accept heterogenous values. This PR will make the minimum possible alterations to prepare those usages, mainly by annotating them as untyped controls, etc.

This PR is *not* intended to test typed forms, merely to minimize the size of the upcoming PR. This will allow that PR to be focused on the actual features and tests, rather than boilerplate fixes.

PR Close #44451
2021-12-14 16:10:08 -05:00
Dylan Hunn
815d4ceeef fix(forms): I indroduced a minor error in a previous PR: pendingValue is a value not a boolean flag. (#44450)
The bug should have no effect since it's a typings-only, internal-only bug, but it's good to fix nonetheless.

PR Close #44450
2021-12-14 16:09:42 -05:00
JoostK
e4839939b0 test(ngcc): don't use the workspace typescript version to generate integration test fixtures (#44448)
Now that ViewEngine libraries can no longer be created, the latest
TypeScript version that ngcc should be able to process is TypeScript 4.3,
i.e. the version of TypeScript that was supported in Angular 12.
However, ngcc's integration tests used the TypeScript version of the
workspace to create the JavaScript files from TypeScript sources on
demand. This introduces friction when upgrading the TypeScript version
within the workspace, as changes to TypeScript's emit format may affect
ngcc's ability to process it correctly.

The on demand creation of JavaScript files was convenient for authoring
tests, but it also helped to detect incompatibilities with newer
versions of TypeScript. Now that ngcc no longer has to process newer
versions of TypeScript, we want to pin the integration suite to use
JavaScript code as if it were compiled using TypeScript 4.3, i.e. a
version of TypeScript that is actually supported by ngcc.

This commit updates the integration test to inline all the generated
files directly in the tests, instead of compiling them on demand. This
was done by temporarily installing TypeScript 4.3 and using it to create
the `loadTestFiles` statement from the original TypeScript inputs.

An alternative could have been to install TypeScript 4.3 as an actual
dependency in the workspace and using that to continue compiling the
integration suite on demand, but this brings some overhead in package
installations (TypeScript is ~60MB) and the authoring aspect of ngcc
integration test is expected to diminish, now that ngcc's support is no
longer a moving target.

PR Close #44448
2021-12-14 16:08:28 -05:00
Yousaf Nawaz
ab2248e773 docs(docs-infra): change variable names in route guards examples (#44444)
change variable name 'next' to 'route' in route guards examples on developer guides "Routing and Navigation Tutorial: Adding routing to Tour of Heroes" to make it consistent with api docs and subsequent examples.

Fixes #44291

PR Close #44444
2021-12-14 16:08:05 -05:00
faso-dev
12f7c85fd0 docs: fix typo (#44427)
`name` instead of `id`
PR Close #44427
2021-12-14 16:07:22 -05:00
jaybell
c68385a967 docs: add jaybell to gde list (#44423)
PR Close #44423
2021-12-14 16:06:32 -05:00
Aristeidis Bampakos
030747a688 docs: update Aristeidis Bampakos bio (#44410)
PR Close #44410
2021-12-14 16:06:06 -05:00
dario-piotrowicz
38ddae1c2e fix(animations): don't consume instructions for animateChild (#44357)
TODO: Fill body commit if PR gets accepted

resolves #41483
resolves #30693

PR Close #44357
2021-12-14 16:05:35 -05:00
zuckjet
bab7ed3541 fix(animations): should not invoke disabled child animations (#37724)
Currently child animation will be triggered by `animateChild()` despite it has been disabled.
These changes add some logic to prevent that unexpected behavior.

PR Close #37724

PR Close #37724
2021-12-14 16:05:00 -05:00