26494 Commits

Author SHA1 Message Date
Matthieu Riegler bce7f6bfd9 refactor(core): Remove ununsed Zone mock from testing internals. (#49873)
The last time it was used in was on the v10 branch.

PR Close #49873
2023-04-18 14:00:16 +00:00
Angular Robot edfc087998 build: update scorecard action dependencies (#49897)
See associated pull request for more information.

PR Close #49897
2023-04-18 13:58:54 +00:00
Lara Newsom 1d4cf95a94 docs(docs-infra): add lara newsom to GDE resources (#49620)
PR Close #49620
2023-04-17 18:31:14 +00:00
Matthieu Riegler 79a8b3c049 docs: Specify when an app is debuggable by the DevTools. (#48970)
DevMode is when the ng debug object is available. `Optimization:true` is responsible for treeshaking everything behind `ngDevMode`.

Fixes #48968

PR Close #48970
2023-04-17 17:32:42 +00:00
Matthieu Riegler fe20496554 fix(devtools): Specify when an app is considered in dev mode. (#48970)
DevMode is when the ng debug object is available. `Optimization:true` is responsible for treeshaking everything behind `ngDevMode`.

PR Close #48970
2023-04-17 17:32:42 +00:00
Matthieu Riegler 461503be8e refactor(compiler-cli): cleanup inferences (#49863)
With the ts compiler updates these inferences have been fixed.

PR Close #49863
2023-04-17 17:23:30 +00:00
Angular Robot 628c52055a build: update dependency eslint-plugin-jsdoc to v41 (#49885)
See associated pull request for more information.

PR Close #49885
2023-04-17 15:48:24 +00:00
Andrew Scott 0a9d1060b9 refactor(router): Do not access browserPageId if not computed resolution (#49850)
This commit avoids accessing the routerPageId if the
canceldNavigationResolution is not computed.

PR Close #49850
2023-04-17 14:47:16 +00:00
Matthieu Riegler 1017630d04 refactor(docs-infra): cleanup deprecated code (#49671)
This commit replaces (non material-related) deprecated code present in the aio app.

* `pageYOffset` can be replaced by `scrollY`
*  RxJs' `mapTo()` is just a `map()`
* `createNgModuleRef` can be replaced by `createNgModule`
* HttpEmits `ProgressEvent` not `ErrorEvent`  (see #34748)
* `SwUpdate.available` is replaced by  `versionUpdates` with a `filter`
* `SwUpdate.activated` is replaced by the returned promised of `SwUpdate.activateUpdate`.

PR Close #49671
2023-04-17 14:04:26 +00:00
Matthieu Riegler 08ba49296a refactor(core): improve styling coverage (#49868)
The test was waiting for #34202 to be merged.

PR Close #49868
2023-04-17 14:02:41 +00:00
Matthieu Riegler aad9db2c5c docs: remove outdated/unsupported webworker doc (#49856)
The webworker platform has been removed in v11 by #38846

PR Close #49856
2023-04-17 14:01:41 +00:00
Qiuran Hu b6f119e182 docs: fix typo in Hierarchical injectors doc (#49824)
PR Close #49824
2023-04-17 13:59:09 +00:00
ChrTall a6f2c03204 docs: Fixed Typo (#49753)
Fixed Typo
PR Close #49753
2023-04-17 13:58:16 +00:00
Angular Robot a63d9a30d8 build: update actions/checkout digest to 8e5e7e5 (#49815)
See associated pull request for more information.

PR Close #49815
2023-04-17 13:31:20 +00:00
Andrew Scott 09a42d988e fix(router): canceledNavigationResolution: 'computed' with redirects to the current URL (#49793)
The `canceledNavigationResolution: 'computed'` option does not correctly
assign page IDs or restore them when redirects result in navigating to
the current URL. This change ensures that the page IDs are still
incremented and restored correctly in this scenario.

PR Close #49793
2023-04-14 14:55:06 +00:00
Matthieu Riegler 8235bc94f7 ci: Remove environment files and EnableProdMode on integration tests (#49746)
Since v15, prod mode is handled by the CLI with the `optimization` flag. We can remove the environement files and `enableProdMode` when the tests use the CLI.

PR Close #49746
2023-04-14 14:13:33 +00:00
Matthieu Riegler f266a05d2f refactor(core): drop IE workarounds (#49763)
Angular doesn't support IE anymore. We can remove the workarounds related to IE.

Some workarounds are keep because of the support of domino but the comments related to IE are removed.

PR Close #49763
2023-04-13 14:01:45 +00:00
Danilo Bassi 05a0225deb fix(http): prevent headers from throwing an error when initializing numerical values (#49379)
Some libraries could use numbers in headers. this fix prevents Angular from
throwing an error by casting those numerical values into strings.

Fixes #49353

PR Close #49379
2023-04-13 14:00:17 +00:00
Andrew Kushnir 1d761bd7c7 release: cut the v15.2.7 release 15.2.7 2023-04-12 12:06:05 -07:00
Angular Robot 2c140f4871 build: update github/codeql-action action to v2.2.11 (#49775)
See associated pull request for more information.

PR Close #49775
2023-04-12 09:26:03 -07:00
Alan Agius a3de0c3cea docs: remove preboot reference from universal doc (#49808)
This package is no longer actively maintained and in general is not needed.

PR Close #49808
2023-04-12 09:24:05 -07:00
Andrew Scott b0c1a90f55 fix(compiler): Produce diagnositc if directive used in host binding is not exported (#49792)
The compiler currently does not check to make sure that directives in
the host bindings are exported. These directives are part of the public
API of the component so they do have to be.

PR Close #49792
2023-04-11 14:39:03 -07:00
Andrew Scott a40529af2e fix(compiler-cli): Catch FatalDiagnosticError during template type checking (#49792)
This commit updates the type checking operation to catch
`FatalDiagnosticError` and surface them as diagnostics rather than
crashing.

Fixes https://github.com/angular/vscode-ng-language-service/issues/1881

PR Close #49792
2023-04-11 14:39:03 -07:00
Andrew Kushnir ebd14e79fb build: update minimum supported Node version from 16.13.0 -> 16.14.0 for CI and AIO (#49790)
This commit updates the minimum supported Node version for CI and AIO from 16.13.0 -> 16.14.0 to ensure compatibility with dependencies.

PR Close #49790
2023-04-11 13:03:11 -07:00
Andrew Kushnir d1c83ccc02 ci: disable size tracking CI job in favor of integration tests size checks (#49788)
Currently we have multiple integration apps which are instrumented with the payload size checks. In addition to that, there is a separate CI job that performs similar checks. The checks in CI job are redundant, thus this commit disables a separate CI job.

PR Close #49788
2023-04-11 10:48:01 -07:00
Nikola Kološnjaji 108145020f docs: Typo (#49781)
PR Close #49781
2023-04-11 10:27:53 -07:00
Andrew Scott 702ec90110 fix(core): When using setInput, mark view dirty in same way as markForCheck (#49747)
`ComponentRef.setInput` internally calls `markDirtyIfOnPush` which only marks
the given view as dirty but does not mark parents dirty like `ChangeDetectorRef.markForCheck` would.
https://github.com/angular/angular/blob/f071224720f8affb97fd32fb5aeaa13155b13693/packages/core/src/render3/instructions/shared.ts#L1018-L1024

`markDirtyIfOnPush` has an assumption that it’s being called from the parent’s template. That is, we don’t need to mark dirty to the root, because we’ve already traversed down to it.
The function used to only be called during template execution for input
bindings but was added to `setInput` later. It's not a good fit because
it means that if you are responding to events such as an emit from an `Observable`
and call `setInput`, the view of your `ComponentRef` won't necessarily get checked
when change detection runs next. If this lives inside some `OnPush` component tree
that's not already dirty, it only gets refreshed if you also call
`ChangeDetectorRef.markForCheck` in the host component (because it will be "shielded" be a non-dirty parent).

PR Close #49747
2023-04-10 13:29:11 -07:00
Kristiyan Kostadinov ffdfdc238f refactor(migrations): log a link to the standalone migration (#49752)
Resolves an old TODO about adding a link to the standalone migration guide.

PR Close #49752
2023-04-10 09:04:03 -07:00
Matthieu Riegler e7dd72c8de docs: update docs about prodMode. (#49745)
Following angular#49723, this commit updates the doc to reflect the actual message prompted in the console.

PR Close #49745
2023-04-10 09:02:30 -07:00
Matthieu Riegler 9c07a42fbe docs: Improve previous version navigation (#49063)
In archive mode the link to the current doc will now point to same page.
If the page doesn't exist anymore, it will show a contextualized warning message.

See #46850

PR Close #49063
2023-04-06 11:07:01 -07:00
Dylan Hunn 9a37a7786a release: cut the v15.2.6 release 15.2.6 2023-04-05 19:44:18 -07:00
Matthieu Riegler da5f316ebf refactor(core): Use the nullish coalescing assignment in render3 functions (#49698)
The usage of `??=` make the code more clear & concise.

PR Close #49698
2023-04-05 09:45:55 -07:00
Andrew Scott cad7274ef9 fix(router): create correct URL relative to path with empty child (#49691)
The previous fix for squashing empty children didn't quite work when the
existing route had segments. The result would be that the segments from
the existing route were dropped from the final URL.

PR Close #49691
2023-04-04 15:05:42 -07:00
Guillaume Weghsteen d9efa1b0d7 feat(core): change the URL sanitization to only block javascript: URLs (#49659)
In modern browsers, the 'javascript:' URL scheme is the only scheme that
can execute JavaScript when passed in a navigation URL context (e.g.
`a.href` value). Validate URL shemes to only contain characters allowed
in the URL specification ([a-zA-Z-+.]), and that are not javascript
(case insensitive). This is not a breaking change. The URL sanitization
is loosen.

PR Close #49659
2023-04-04 15:01:14 -07:00
Robin Richtsfeld c26e4bea9d docs: fix typo (#49704)
PR Close #49704
2023-04-04 15:00:39 -07:00
Sandra Limacher bd82fbeec4 docs: fix typo (#49669)
PR Close #49669
2023-04-03 19:18:41 -07:00
Matthieu Riegler 1d32253ca6 refactor(core): remove unnecessary reflect-metadata import. (#49673)
The import is not needed for the tests to run.

PR Close #49673
2023-04-03 19:17:03 -07:00
vikram menon 6e1b3adadb docs: fix typo in quick reference (#49655)
Change indicatedr5t to indicated

PR Close #49655
2023-04-03 19:13:16 -07:00
Johnny Gérard a6def648f5 docs: fix typo (#49664)
PR Close #49664
2023-04-02 22:10:13 -07:00
Andrew Scott 9b61379096 fix(router): Ensure initial navigation clears current navigation when blocking (#49572)
The navigation transition clears the current navigation in the finalize
operator of the current navigation Observer. This commit both completes
the `bootstrapDone` observable and updates the transition to only take 1
emit from the completed navigation. Either of these changes on their own
would fix the issue. The latter is a preventative measure in case a
mistake like the former is made again.

fixes #49567

PR Close #49572
2023-03-31 17:04:02 -07:00
John Manners 08979e4589 docs: fix typo in toh-pg6.md (#49141)
Line 425. Change burning to burn.
PR Close #49141
2023-03-31 12:00:44 -07:00
Angular Robot 233f33e6f1 build: update scorecard action dependencies (#49609)
See associated pull request for more information.

PR Close #49609
2023-03-31 11:49:47 -07:00
Vinit Neogi 35f491880c docs(core): fix view hierarchy links (#49629)
fixes incorrect links to view-hierarchy (currently view-tree)

Fixes #49623

PR Close #49629
2023-03-30 09:39:39 -07:00
Sarthak Thakkar 43e89bdacf docs: fixed typo error (#49637)
PR Close #49637
2023-03-30 09:38:43 -07:00
Matthieu Riegler 07e78bbbf4 docs: Update Popup.service example to remove ComponentFactoryResolver (#49638)
`ComponentFactoryResolver` has been deprecated and can be replaced by `createComponent()`.

PR Close #49638
2023-03-30 09:38:16 -07:00
Andrew Scott e78a2a4a47 release: cut the v15.2.5 release (#49635) 15.2.5 2023-03-29 12:37:48 -07:00
Alan Agius 077f6b4674 fix(compiler): do not unquote CSS values (#49460)
Currently we are unsafely unquoting CSS values which in some cases causes valid values to become invalid and invalid values to become valid.

Example:
```html
<div style="width:&quot;1px;&quot;"></div>
```

In the above case, `width` has an invalid value of `"1px"`, however the compiler will transform it to `1px` which makes it valid.

On the other hand,  in the below case
```html
<div style="content:&quot;foo&quot;"></div>
```

`content` has a valid value of `"foo"`, but since the compiler unwraps it to `foo` it becomes invalid. For correctness, we should not remove quotes.

```js
const div = document.createElement('div');
div.style.width='"1px"';
div.style.content='foo';

div.style.width; // ''
div.style.content; // ''

div.style.width='1px';
div.style.content='"foo"';

div.style.width; // '1px'
div.style.content; // '"foo"'
```

More information about values can be found https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier

PR Close #49460
2023-03-28 11:35:39 -07:00
Alan Agius d201fc2dec fix(core): set style property value to empty string instead of an invalid value (#49460)
Currently when the value of a styling property that has a unit is empty string a invalid value is generated.

Example:
`[style.width.px] = ""` will generate a value of `"px"`, when instead it should be `""`.

This causes browser to reset the value to an empty string. This is however not the case in Domino with changes in https://github.com/angular/domino/commit/bfc9114d1eb5b7591c43a7c6aef6ad50d24e369f.

This commit fixes the issues and generate correct values.

PR Close #49460
2023-03-28 11:35:39 -07:00
Matthieu Riegler 6d6fc12c88 refactor(core): Remove usage of deprecated Injector.create() (#49606)
This commit removes all usages of the deprecated `Injector.create` method but does not remove the deprecated signature itself.

PR Close #49606
2023-03-28 10:15:36 -07:00
Asaf Malin 8ed4083a98 docs: fixed grammar (#49560)
PR Close #49560
2023-03-28 10:14:45 -07:00