Commit graph

22605 commits

Author SHA1 Message Date
Paul Gschwendtner
807c6a4e10 test: update acceptance core tests to work with es2015 (#44505)
Updates the acceptance core tests to work with ES2015 devmode output.
There were two issues surfacing:

* The NodeJS test execution failed because Domino does not handle
  destructuring syntax properly. This is because `Node.children` is not
  an iterable.

* `forwardRef` does not work with ES2015 and TypeScript's decorator
  downlevel emit. This is a known limitation we work around in Angular
  applications by either compiling tests with the Angular compiler, or
  by running a custom decorator downlevel transform (like in the CLI).

PR Close #44505
2022-01-05 23:20:21 +00:00
Paul Gschwendtner
92806ff042 test: update router tests to work with es2015 temporal dead zone (#44505)
Update router tests to work with the the es2015 temporal dead zone.

Somewhat similar to: https://github.com/angular/angular/issues/30106.

PR Close #44505
2022-01-05 23:20:20 +00:00
Paul Gschwendtner
890d06959b test: update ngtsc specs to work with es2015 output (#44505)
Updates the ngtsc specs to work with ES2015 output.

PR Close #44505
2022-01-05 23:20:20 +00:00
Paul Gschwendtner
c46d533b22 build: switch devmode output to es2015 (#44505)
To make our test output i.e. devmode output more aligned
with what we produce in the NPM packages, or to be more
aligned with what Angular applications will usually consume,
the devmode output is switched from ES5 to ES2015.

Additionally various tsconfigs (outside of Bazel) have been
updated to match with the other parts of the build. The rules
are:

ES2015 for test configurations, ES2020 for actual code that will
end up being shipped (this includes the IDE-only tsconfigs).

PR Close #44505
2022-01-05 23:20:20 +00:00
Andrew Kushnir
8388151f4d refactor(forms): make validators code compatible with property renaming (#44500)
This commit refactors the code of the base validators class to make it compatible with the property renaming optimization. Currently the code makes an assumption that the field with a specified name (defined as a string) can be found on an object, but with property renaming optimization this is not correct.

PR Close #44500
2022-01-05 18:43:36 +00:00
Chris Mancini
6a55affacd docs(router): fix code block for IsActiveMatchOptions (#44635)
PR Close #44635
2022-01-05 17:47:08 +00:00
Dario Piotrowicz
7278a9c584 docs(animations): fix filter-animations docregion (#44544)
the filter animation example in the complex-animation-sequences guide
talks about entering and leaving elements, but the presented html
snipped exluded the *ngFor which actually adds and removes the elements,
so add the *ngFor section to make the example complete and
understandable

PR Close #44544
2022-01-05 17:46:10 +00:00
Dario Piotrowicz
d5ced77d31 refactor(docs-infra): fix eslint issues for aio ugrade-* examples (#44534)
fix the eslint issues in the aio/content/examples/upgrade-* folders
and remove their ignorePattern in the examples eslintrc file

PR Close #44534
2022-01-04 16:34:06 -08:00
JoostK
c7ac2dfcf8 refactor(compiler): remove output AST functions (#44411)
These functions are not used anymore so they are removed.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
d196cbc332 refactor(compiler): remove class related output AST types (#44411)
The Ivy compiler no longer generates classes so this commit removes
the supporting output nodes.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
8cadfe1f5b refactor(compiler): remove type-casting related output AST types (#44411)
The Ivy compiler no longer generates code for type-checking purposes
using the output AST types. Instead, it uses TypeScript AST nodes and
its printer for type-checking. This commit removes the type-related
output nodes.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
f352c2bed9 refactor(compiler): remove some unused output AST types (#44411)
This kind of output is no longer emitted into generated code, so the
supporting output AST is removed.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
e0458a6d14 refactor(compiler): remove unused method from binding parser (#44411)
This method is no longer called so is being removed.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
b5ad12b788 refactor(compiler): make template preparser null-safe (#44411)
This commit removes some non-null assertion operations to improve
null-safety.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
f40802f1bd refactor(compiler): remove unused unsupported function (#44411)
This function is no longer used so is being removed.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
d9befd25e1 refactor(compiler): make keySpan required in binding parser (#44411)
Now that ViewEngine has been removed the `keySpan` property can be
made required, as it is always provided in the Ivy compiler

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
f86e02e01e refactor(compiler): cleanup distinction in parse logic (#44411)
This removes the special casing of parse-validation logic that was only
used by Ivy.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
a758b8866e refactor(compiler): remove BindingForm enum (#44411)
The Ivy compiler only uses `BindingForm.Expression`, so all other
variants are removed.

PR Close #44411
2022-01-04 15:54:10 -08:00
JoostK
da159a5144 refactor(compiler): cleanup AST fixup of listener instructions (#44411)
This commit refactors the generation of listener instructions to no
longer fixup the output AST that was designed for ViewEngine.

PR Close #44411
2022-01-04 15:54:09 -08:00
JoostK
7862f5657e refactor(compiler): remove unused assertion function (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:09 -08:00
JoostK
e8812bc04e refactor(compiler): cleanup unsafe usage of null value for ng-content selector (#44411)
This commit improves the null-safety of the ng-content selector and
updates a comment that turned out to be slightly inaccurate.

Closes #38407

PR Close #44411
2022-01-04 15:54:09 -08:00
JoostK
722d8ef880 refactor(compiler): remove unused code from output logic (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:09 -08:00
JoostK
26eee35dc2 refactor(compiler): remove unused AstPath (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:09 -08:00
JoostK
a0c36ac0f5 refactor(compiler): remove unused logic from ConstantPool (#44411)
The `ConstantPool.getDefinition` method is not being used anymore, so
this commit removes anything that is related to this method.

PR Close #44411
2022-01-04 15:54:09 -08:00
JoostK
f3de9224e4 refactor(compiler): remove unused type declarations (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:09 -08:00
JoostK
1d39a5e6ac refactor(compiler): remove syntax error logic (#44411)
This code is no longer used now that ViewEngine has been removed.

PR Close #44411
2022-01-04 15:54:09 -08:00
dario-piotrowicz
f2b858d24f refactor(animations): add unit test for leaving animated child (#44489)
add a new unit test to make sure that leaving elements queried via
a parent queried via animateChild are correctly removed

note: this tests the fix introduced in PR #44357

PR Close #44489
2022-01-04 15:53:36 -08:00
Andrew Kushnir
d4015f762f test: remove newlines to make a test more stable (#44616)
One of the tests was not taking into account newlines in the text content of an element, thus failing in some browsers. This commit makes the test more stable by removing newlines and comparing the output after that.

PR Close #44616
2022-01-04 15:53:00 -08:00
dario-piotrowicz
a864d1c926 fix(docs-infra): adjust code link styling height (#44376)
the height of code links (anchors inside code tags or
code tags inside anchors) is inconsistent, fix such
issue by also making sure that code links to external
resources do not get wrongly styled

PR Close #44376
2022-01-04 12:19:08 -08:00
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