Commit Graph

27506 Commits

Author SHA1 Message Date
Angular Robot c650b40816 build: update cross-repo angular dependencies (#49978)
See associated pull request for more information.

PR Close #49978
2023-04-28 13:36:18 +02:00
Paul Gschwendtner aba7f03920 ci: update link to start google presubmit (#50060)
Updates the golink to start a google presubmit, given that
documentation has moved.

PR Close #50060
2023-04-28 11:41:21 +02:00
Matthias Kunnen 5a37928bab fix(common): fix incorrectly reported distortion for padded images (#49889)
The original code uses clientWidth and clientHeight which returns the
width and height of the element including the padding. This results in
the aspect ratio being determined incorrectly and the image distortion
warning triggering. The new code uses getComputedStyle which returns
the width and height without padding.

Another advantage of using getComputedStyle is that, unlike clientWidth
and clientHeight, the number returned is a decimal which provides
greater accuracy. This could allow for lowering the ASPECT_RATIO_TOLERANCE.

PR Close #49889
2023-04-27 17:16:46 +02:00
Matthias Kunnen f9cee4db83 test(common): test rounding problems in image distortion detection (#49889)
Due to assertNoImageDistortion using clientWidth and clientHeight, and these properties returning integers, rounding errors occur that exceed the aspect ratio tolerance.
Increasing the tolerance could hide actual distortion so correcting the calculation to use floats would be best and could even allow for a lower tolerance.

PR Close #49889
2023-04-27 17:16:46 +02:00
Matthias Kunnen 857cf7ea23 test(common): show ngOptimizedImage distortion detection failure on padded images (#49889)
The image distortion detection performed uses clientWidth/clientHeight which includes the padding.
This leads to images with padding being detected as distorted while they are not and distortion being masked by padding.

PR Close #49889
2023-04-27 17:16:46 +02:00
Andrew Scott 567123499a refactor(core): Add signal LView flag (#49988)
This commit adds an LView flag to indicate that a view is a "signal"
view and updates view creation code to correctly set the flag
based on the declaration component metadata.

PR Close #49988
2023-04-27 00:33:57 -07:00
Dylan Hunn 720ad5f172 docs: release notes for the v16.0.0-rc.3 release 2023-04-27 00:30:02 -07:00
Andrew Scott 599f339582 refactor(core): separate render and change detection instructions (#50017)
Both the render and update instructions live in the same file and are
only separated via a "render*" vs "refresh*" naming convention. This
commit moves these functions to completely separate files.

PR Close #50017
2023-04-26 23:49:06 -07:00
Angular Robot 9b24bb9e50 build: update all non-major dependencies (#49990)
See associated pull request for more information.

PR Close #49990
2023-04-26 13:13:29 -07:00
Angular Robot 50ce49c450 build: update eslint dependencies to v5.59.1 (#49991)
See associated pull request for more information.

PR Close #49991
2023-04-26 13:12:48 -07:00
Angular Robot c71fef067b docs: update Angular CLI help [main] (#50032)
Updated Angular CLI help contents.

PR Close #50032
2023-04-26 13:12:20 -07:00
Angular Robot 7eb7c69580 build: update io_bazel_rules_sass digest to 236d2fc (#50006)
See associated pull request for more information.

PR Close #50006
2023-04-26 12:40:14 -07:00
Andrew Scott a8cf5962ef refactor(core): Rename 'transplanted' view refresh flag and counters to be generic (#50000)
It's likely that the flag and counters used to track transplanted views
needing a refresh will be reused to signal views as well. The two follow
a similar rule: While the parents might not be "Dirty", there is still a
child/descendant view somewhere that needs to be refreshed during change
detection.

PR Close #50000
2023-04-26 11:29:48 -07:00
Angular Robot 60f6672747 build: update dependency patch-package to v7 (#50002)
See associated pull request for more information.

PR Close #50002
2023-04-26 11:29:11 -07:00
Angular Robot 316d1d0905 build: update github/codeql-action action to v2.3.0 (#49992)
See associated pull request for more information.

PR Close #49992
2023-04-26 11:28:10 -07:00
Alan Agius 8a324c54b9 fix(docs-infra): add work-break to a tags in .cli-option (#50012)
This commit fixes a styling issue were the default values are not being displayed in https://angular.io/cli/build which is because in some cases the option description has a long anchor tag which causes the content to be pushed to the right and gets hidden.

PR Close #50012
2023-04-26 09:24:56 -07:00
Andrew Kushnir 744f7ffb61 refactor(platform-server): avoid using platformDynamicServer when ngJitMode is disabled (#50007)
This commit refactors the logic of the `platform-server` to avoid using `platformDynamicServer` when `ngJitMode` is disabled. This is needed to avoid including JIT compiler into the source code of the server bundle, when this compil
er is not needed.

PR Close #50007
2023-04-26 09:23:52 -07:00
Alan Agius 74194de6f9 fix(platform-browser): export deprecated TransferState as type (#50015)
Prior to this commit `TransferState` re-export could not be used as a type.

Closes #50014

PR Close #50015
2023-04-26 09:21:07 -07:00
Matthieu Riegler 08949c7c6c refactor(core): Error code for Component Id collision (#49986)
The commit add an error code for the Component Id collision and documentation page to fix the issue.

PR Close #49986
2023-04-26 09:19:58 -07:00
Alan Agius 2d1691aa4f docs: update universal guide to include standalone methods (#49993)
This commit updates the universal guide to include standalone methods.

PR Close #49993
2023-04-26 09:18:35 -07:00
Alan Agius 195585c8d7 docs: update ssr example files (#49993)
`app.server.module` was renamed to `app.module.server`. See: https://github.com/angular/angular-cli/pull/25058

PR Close #49993
2023-04-26 09:18:35 -07:00
Alan Agius d6678dfe33 docs: update file structure to include standalone application files (#49993)
This commit updates the docs to include standalone files.

PR Close #49993
2023-04-26 09:18:35 -07:00
Alan Agius 355fa72c5e docs: update links to reference the version compatibility guide (#49995)
This commit updates several docs to reference the version compatibility guide instead of the `package.json`.

PR Close #49995
2023-04-26 09:17:54 -07:00
Andrew Scott 8fdc116542 refactor(core): Use bit shift operator instead of manually writing numbers (#49987)
The LViewFlags are using manually written 0bxxxxx numbers which can be very hard to read
once there are more than a handful of 0s and 1s. The bit shifting feels a lot more
legible.

PR Close #49987
2023-04-25 17:23:28 -07:00
Andrew Scott 5214df4958 refactor(compiler-cli): Add signals to internal directive metadata (#49981)
This commit adds the `signals: boolean` property to the internal
directive/component metadata. This does not add it to the public API
yet, as the feature has no internal support other than compiler
detection.

PR Close #49981
2023-04-25 15:39:18 -07:00
Matthieu Riegler 8a2739f250 build(elements): remove unecessary filegroup. (#49982)
This is uneccessary now. All supported browsers support custom elements.

PR Close #49982
2023-04-25 09:30:59 -07:00
Matthieu Riegler f5dd3b4ede refactor(docs-infra): remove semi rule from eslintrc. (#49970)
The `semi` rule a duplicate since `plugin:@angular-eslint/ng-cli-compat--formatting-add-on` already includes `@typescript-eslint/semi` as error.

PR Close #49970
2023-04-25 09:30:16 -07:00
Jessica Janiuk 1090bf870f refactor(core): improve error message when dom node is not found (#49977)
This adds context to the error message in the case that a DOM node is not found during the hydration process. It outputs the expected DOM structure based on the lView and tNode rather than an unhelpful text message.

PR Close #49977
2023-04-25 09:29:47 -07:00
Matthieu Riegler 8683414bc3 build: bump license year (#49984)
Bumping to 2023

Fixes #49983

PR Close #49984
2023-04-25 09:29:16 -07:00
Alan Agius fed4b9d6e9 docs: add v16 in version compatibility table (#49994)
This commit add version v16 in the version compatibility table.

PR Close #49994
2023-04-25 09:28:44 -07:00
Andrew Scott 02a539cb14 refactor(core): Synchronously emit the current signal value in toObservable (#49894)
As described in
https://github.com/angular/angular/discussions/49681#discussioncomment-5628930,
if an `Observable` created from a signal with `toObservable` is
subscribed to in a template, it will initially have `null` as the value.
Immediately after the template is done executing, effects are flushed
and this results in the `AsyncPipe` getting a new value before the
`checkNoChanges` pass, resulting in `ExpressionChanged` error.

```
template: '{{obs$ | async}}'
...
obs$ = toObservable(signal(0));
```

Instead, this commit updates the `toObservable` to synchronously emit
the initial value to the Observable stream.

Side note here: We don't exactly encourage this pattern. Instead of
using `AsyncPipe`, the template should just read signals.

PR Close #49894
2023-04-25 09:27:38 -07:00
Matthieu Riegler 5607e0f529 fix(core): typing of TestBed Common token. (#49997)
Both `ComponentFixtureAutoDetect`  and `ComponentFixtureNoNgZone` are mistyped. Tokens are only instantiated with booleans.

PR Close #49997
2023-04-25 09:27:08 -07:00
Alan Agius e40a640dfe test: remove unused size goldens (#49976)
These test has been deleted as such the size check golden here is redundant.
PR Close #49976
2023-04-24 11:56:37 -07:00
Matthieu Riegler e5801be1b2 refactor(core): call publishSignalConfiguration when bootstraping a standalone component. (#49968)
`publishSignalConfiguration` was not called when bootstraping an app using `boostrapApplication()`

PR Close #49968
2023-04-24 11:54:04 -07:00
Angular Robot a5428a7fa6 build: update cross-repo angular dependencies (#49964)
See associated pull request for more information.

PR Close #49964
2023-04-24 11:53:26 -07:00
Lars Gyrup Brink Nielsen 5f7d929d9e docs(core): correct description of actively supported versions (#49945)
PR Close #49945
2023-04-24 11:52:17 -07:00
Lars Gyrup Brink Nielsen 59fe20506a docs(core): combine compatibility for minor versions sharing dependencies (#49945)
PR Close #49945
2023-04-24 11:52:17 -07:00
Matthieu Riegler b9c53658a4 refactor(compiler-cli): remove unecessary type assertion (#49971)
microsoft/TypeScript#43966 was fixed in 4.3.1

PR Close #49971
2023-04-24 11:51:18 -07:00
Qiuran Hu 92897b49b0 docs: fix typo in lazy-loading feature modules doc (#49972)
PR Close #49972
2023-04-24 10:52:43 -07:00
Jessica Janiuk ec62f426b1 test(core): Add hydration symbols test (#49955)
Add symbols tracking test for hydration.

PR Close #49955
2023-04-24 09:57:52 -07:00
Jessica Janiuk 0b23ad7f56 test(core): add size tracking test for hydration apps (#49955)
This adds test to track size regressions when
hydration is enabled.

PR Close #49955
2023-04-24 09:57:52 -07:00
Alan Agius f33abc805d ci: do not install Java in the test execturor (#49975)
Java is now only needed for `test_zonejs` as all closure related tests have been removed from the framework.

PR Close #49975
2023-04-24 09:57:23 -07:00
Alan Agius ce0ce4cde1 docs: remove no longer available tests from readme (#49975)
This commit removes no longer available integration tests from the readme.

PR Close #49975
2023-04-24 09:57:23 -07:00
Alan Agius b59fe28e29 build: update integration test node_modules (#49975)
This commit updates the tests node_modules to be ignored.

PR Close #49975
2023-04-24 09:57:23 -07:00
Jessica Janiuk be104ec6ed fix(core): add newline to hydration mismatch error (#49965)
This adds a newline after the hydration mismatch errors to provide more separation and readability.

PR Close #49965
2023-04-24 09:52:45 -07:00
Rushikesh Kavar 1752af1cf5 docs: applicability of NgModule providers (#49966)
saying that providers of this NgModule is available to components,pipes and directive of "this" ngModule is not accurate sentence to describe the fact.
I am referring from: https://angular.io/guide/hierarchical-dependency-injection.
It says that "ModuleInjector is configured by the @NgModule.providers and NgModule.imports property. ModuleInjector is a flattening of all the providers arrays that can be reached by following the NgModule.imports recursively."
So, any component,pipe or directive of other NgModule within same ModuleInjector can use providers of this NgModule.
PR Close #49966
2023-04-24 09:51:56 -07:00
Matthieu Riegler bb6a3e849e refactor(core): throw an error when APP_INITIALIZER token is not an array. (#49860)
Providing a non-multi token for `APP_INITIALIZER` now throws `INVALID_MULTI_PROVIDER` (NG209)

PR Close #49860
2023-04-23 18:31:24 -07:00
Andrew Kushnir 3bcbfecb78 refactor(platform-browser): log a warning when a custom or a noop ZoneJS is used with hydration (#49944)
Hydration relies on a signal from ZoneJS when it becomes stable inside an application, so that Angular can start serialization process on the server or post-hydration cleanup on the client (to remove DOM nodes that remained unclaimed).

Providing a custom or a "noop" ZoneJS implementation may lead to a different timing of the "stable" event, thus triggering the serialization or the cleanup too early or too late. This is not yet a fully supported configuration.

This commit adds a warning (non-blocking) for those cases.

PR Close #49944
2023-04-23 18:23:28 -07:00
Matthieu Riegler eb5bc95dbf docs: remove the warning about shadowDom support (#49961)
ShadowDom support is now ubiquitous since 2020 and all evergreen browsers.

PR Close #49961
2023-04-23 18:22:44 -07:00
Matthieu Riegler 2487d41bbf docs: remove mention of the webworker platform issues (#49947)
The Webworker platform was remove in v10, we can remove this part.

Fixes #49934

PR Close #49947
2023-04-23 18:20:58 -07:00