10050 Commits

Author SHA1 Message Date
Matthieu Riegler 8ffa85fb5d docs: fix warning about an unknown decorator (#51237)
dgeni was complaning about an unknown decorator (`@Input`)

PR Close #51237
2023-08-01 13:00:53 -07:00
Matthieu Riegler 3342961a38 refactor(core): remove useless hack (#51224)
This hack is remnant of the Ivy migration.

PR Close #51224
2023-08-01 12:12:52 -07:00
Matthieu Riegler 5a0a5f939b refactor(core): Remove dead unit test code (#51223)
This code is duplicated but unused.

PR Close #51223
2023-08-01 12:10:58 -07:00
Matthieu Riegler d811f10276 refactor(core): createInjector is a private function (#51221)
`createInjector` is not public.

PR Close #51221
2023-08-01 12:10:21 -07:00
Matthieu Riegler 7c6bc328a2 refactor(core): removing reflect-metadata from symbol tests. (#51217)
We were not reyling on it anymore.

PR Close #51217
2023-08-01 12:09:26 -07:00
aanchal 6892388685 docs: fix typos (#51201)
PR Close #51201
2023-08-01 12:04:32 -07:00
aanchal 461dacf2eb docs: add lang attributes to the files (#51200)
PR Close #51200
2023-08-01 11:58:45 -07:00
P4 cc722ea1f5 fix(compiler): return full spans for Comment nodes (#50855)
Change sourceSpan for Comment nodes to cover the whole comment
instead of just the opening token.

The primary motivation for this is the interaction between ESLint and
`@angular-eslint`. ESLint can detect unused `eslint-disable` directives
in comments and automatically remove them when running with `--fix`.
This is based on ranges computed from AST spans, and as a result
does not work inside Angular templates - right now all comments
claim to be 4 characters long so only the opening `<!--` is removed.

PR Close #50855
2023-07-28 14:39:18 -07:00
sunilbaba e891cacf12 docs(docs-infra): Adding required and Transform Args into the usage and documentation of input (#51173)
I# No commands remaining.

PR Close #51173
2023-07-26 10:03:43 -07:00
Matthieu Riegler 5043064997 refactor(core): Better use of Object.keys() (#51153)
Code cleaning arround the `Object.keys()` in the core tests.

PR Close #51153
2023-07-25 09:17:47 -07:00
Matthieu Riegler 2a471204a8 docs: remove trailing periods after @see (#51144)
This fixes a rendering issue where the periods would be bellow the text block.

PR Close #51144
2023-07-24 08:14:52 -07:00
Matthieu Riegler bfc6e482ac docs: Add links to the injection context guide (#51129)
PR Close #51129
2023-07-21 16:46:42 +00:00
arturovt 916916d835 fix(http): check whether Zone is defined (#51119)
Accessing the `Zone` variable without checking if it's defined or not
leads to an error "Zone is not defined" if zone.js is not imported (nooped).
This commit adds an additional check before getting the current zone where
the `doRequest` is being called.

PR Close #51119
2023-07-21 16:45:26 +00:00
alkavats1 c4267decab docs: updated the benchpress readme doc (#51110)
PR Close #51110
2023-07-21 16:43:30 +00:00
Jessica Janiuk 8c8e7210f4 Revert "docs: added the alt attribute in the img tag (#51102)" (#51107)
This reverts commit 3b248c59c6.

PR Close #51107
2023-07-19 18:49:00 +00:00
alkavats1 fe36e3d0b9 docs: added the alt attribute in the img tag (#51102)
PR Close #51102
2023-07-19 17:39:45 +00:00
Matthieu Riegler 5a5ecf78bd build: update all non-major dependencies (#51086)
Puppeteer update fixes a critical vulnerability.
puppeteer < 20.8.2 pulls `vm2` which has a critical vulnerability.

See puppeteer/puppeteer#10550

PR Close #51086
2023-07-18 21:03:35 +00:00
Alex Castle 20c85f1ffb docs(common): Add NgOptimizedImage FAQ (#51036)
Make minor updatees to NgOptimizedImage docs, and add an FAQ.

PR Close #51036
2023-07-18 19:05:16 +00:00
Matthieu Riegler dea8dc0378 fix(http): Run fetch request out the angular zone (#50981)
Having the request run in the angular zone has the consequence of triggering the CD for every read of the response stream.

This commit wraps the whole `doRequest` to run outside angular with every callback on the observer being called inside the zone.

Fixes #50979.

PR Close #50981
2023-07-17 14:53:52 +00:00
Joey Perrott 4c7339af1f ci: migrate windows job to GHA (#51010)
Migrate windows job to use Github Actions

PR Close #51010
2023-07-17 14:51:36 +00:00
Paul Gschwendtner 189965863d refactor(compiler): properly sanitize identifier names in template pipeline (#50946)
Currently, a listener on an element containing a dash, will result in
runtime errors because the function name will be generated using a dash.

e.g.

```
function MyApp_Template_some-comp_bla_0() {}
```

throwing with a syntax error due to the dash. We fix this by re-using
the sanitize identifier function from the current template definition
builder.

PR Close #50946
2023-07-14 19:48:49 +00:00
alkavats1 9f914a88b0 docs: updated the http tag with https (#50927)
PR Close #50927
2023-07-14 09:44:56 -07:00
Alan Agius 31419f6a3b perf(platform-browser): do not remove renderer from cache when REMOVE_STYLES_ON_COMPONENT_DESTROY is enabled. (#51005)
Removing the renderer from cache is not needed when `REMOVE_STYLES_ON_COMPONENT_DESTROY` is enabled. This change retains the behaviour of keeping the renderer cached for the entire lifecycle of the application the same way it is done when `REMOVE_STYLES_ON_COMPONENT_DESTROY` is disabled.

This seems to have be causing an increase in scripting. See: http://b/290666638

PR Close #51005
2023-07-11 10:11:51 -07:00
Matthieu Riegler de01f75c21 refactor(core): Log a warning when multiple pipes match a name (#50389)
Since this might be too breaking, let's log for now and wait for a major to throw an actual error.

Fixes #13569

PR Close #50389
2023-07-11 08:29:08 -07:00
Antonio Pekeljevic c8e451606a docs: add missing jsdocs for static ngzone methods (#50924)
PR Close #50924
2023-07-11 08:28:39 -07:00
Matthieu Riegler f920fcbd94 fix(animations): Ensure elements are removed from the cache after leave animation. (#50929)
This commit fixes a memory leak.

`_namespaceLookup` was cleared before the call to `processLeaveNode()` which was using the lookup.
Without that lookup `clearElementCache()` wasn't called thus keeping a reference to the element.

Fixes #24197 & #50533

PR Close #50929
2023-07-11 08:28:11 -07:00
Matthieu Riegler 3efb577cf3 fix(upgrade): Use takeUntil on leaky subscription. (#50901)
Using the life cycling hook `onDestroy` to end the subscription.

fixes #48032

PR Close #50901
2023-07-11 08:24:31 -07:00
Dzhavat Ushev 32e74bec37 docs: add missing backtick character (#50908)
PR Close #50908
2023-07-11 08:23:49 -07:00
Matthieu Riegler 8c9377c779 refactor(core): fix Tnode/TView assertion. (#50914)
The debug data structure was removed in #48281. Before this fix the assertion relied on it.

PR Close #50914
2023-07-11 08:23:19 -07:00
Matthieu Riegler c65913ecb7 fix(core): handle deref returning null on RefactiveNode. (#50992)
On Safari <16.1 there is a bug where `deref` can return `null`.

Fixes #50989

PR Close #50992
2023-07-11 08:22:48 -07:00
Matthieu Riegler ee8fb520bf docs: Improve documentation about Injection context / inject (#49782)
Injection context has gain public visibility with the exposure of `inject`. Lets provide some insights.

Closes  #49774

PR Close #49782
2023-07-10 07:09:32 -07:00
Paul Gschwendtner 18b36d7ff7 refactor: improve type safety of interpolation AST (#50903)
Instead of using `any`, we should use the actual types that
are available from the parser.

PR Close #50903
2023-07-10 07:08:29 -07:00
Andrew Kushnir 499fb5c772 fix(core): ensure that standalone components get correct injector instances (#50954)
Prior to this change, we've used `componentDef.id` as a key in a Map that acts as a cache to avoid re-creating injector instances for standalone components. In v16, the logic that generates the id has changed from an auto-incremental to a generation based on metadata. If multiple components have similar metadata, their ids might overlap.

This commit updates the logic to stop using `componentDef.id` as a key and instead, use the `componentDef` itself. This would ensure that we always have a correct instance of an injector associated with a standalone component instance.

Resolves #50724.

PR Close #50954
2023-07-10 07:07:44 -07:00
Terry d555a33761 docs(forms): FormBuilder is not associated with ReactiveFormsModule (#50941)
PR Close #50941
2023-07-05 13:53:11 +02:00
Matthieu Riegler b9c28ca997 refactor(platform-browser-dynamic): Fix JSDoc comment (#50893)
JSDoc comments should start with 2 stars or the annotations would not be picked up by the AIO workflow.

With this fix, the internal methods are no longer visible in the doc.

PR Close #50893
2023-06-30 11:49:30 -07:00
Matthieu Riegler 33fea8e2fe refactor(animations): Fix JSDoc comment (#50893)
JSDoc comments should start with 2 stars or the annotations would not be picked up by the AIO workflow.

With this fix, the internal methods are no longer visible in the doc.

PR Close #50893
2023-06-30 11:49:30 -07:00
Payam Valadkhan 392d9446af test(compiler-cli): add compliance tests for NgModule only scenarios in local mode (#50577)
Reused the existing compliance tests for full compilation.

PR Close #50577
2023-06-30 11:38:36 -07:00
Payam Valadkhan 99936345ad refactor(compiler-cli): add local option to compliance test infra (#50577)
The option 'local compile' is added for the test cases, and the locally compiled file for an input `abc.ts` is compared by default with the file `abc.local.js`. This allows to use the same input `abc.ts` for both full compilation (compared with `abc.js`) and local compilation (compared with `abc.local.js`). An example is provided in the next commit when compliance tests are added for the NgModule local compilation.

PR Close #50577
2023-06-30 11:38:36 -07:00
Payam Valadkhan b8c3656cb5 refactor(compiler): add a new interface for NgModule metadata to t rebase be used in local compilation mode (#50577)
The new interface is discrete-unioned with the existing interface to cover the cases for local and global (i.e., full and partial) compilation modes.

This change of interface required some adjustmeents cross repo which explains the changes made to other files.

PR Close #50577
2023-06-30 11:38:36 -07:00
Payam Valadkhan d9947ebf5e refactor(compiler-cli): circuit out reference resolving in NgModule annotation handler in local compilation mode (#50577)
All attempts related to obtaining R3Reference for bootstrap, imports, exports and declarations are cut in local compilation mode.

This will allow the analysis to pass without any error diagnostics, but the result is a quite empty meta info. Next commits will add data to the meta so that the NgModule can be compiled more accurately.

PR Close #50577
2023-06-30 11:38:36 -07:00
Paul Gschwendtner a4348355ce fix(upgrade): allow for downgraded components to work with component-router (#50871)
In the past, we had an implementation of the "Angular 2" router that
also worked with AngularJS. Published as `@angular/router`. We continued
to expose that router implementation in G3 and some applications still
use it. Now, when upgrading, they are seeing issues where the router
throws because it cannot find a route config/ or `$canActivate` on the
controller- simply because there is no `controller` function for
downgraded components.

We can fix this and unblock the update by simply ensuring a controller
function is defined.

PR Close #50871
2023-06-30 11:36:57 -07:00
arturovt 4ba5850ba6 fix(core): use setTimeout when coalescing tasks in Node.js (#50820)
This commit updates the implementation of the `getNativeRequestAnimationFrame`
and checks whether the current code runs in the browser before retrieving
`requestAnimationFrame`. `requestAnimationFrame` is not available when the code
is running in the Node.js environment. We have to fallback to `setTimeout` for
delaying the change detection.

PR Close #50820
2023-06-30 11:32:39 -07:00
Angular Robot 4073cc04b3 build: lock file maintenance (#50877)
See associated pull request for more information.

PR Close #50877
2023-06-28 13:33:23 -07:00
Matthieu Riegler f1d01dfd1c docs: Add a doc for NG5014 (#50567)
Short explanation this help fix the `Root node not found` error

PR Close #50567
2023-06-27 15:57:24 -07:00
Alan Agius 52f1dd9aaa refactor(animations): remove redundant castings (#50860)
This commit removes unnecessary castings.

PR Close #50860
2023-06-27 06:27:16 -07:00
Alan Agius a797f41d1b fix(platform-browser): wait until animation completion before destroying renderer (#50860)
Prior to this commit, the renderer destroy method was being called before the animation complete. This is problematic when using `REMOVE_STYLES_ON_COMPONENT_DESTROY` as it causes the styles to be removed too early.

This commit, updates this destroy logic to be call the render destroy once the animations complete.

This has been reported internally in:
- http://b/271251353#comment12
- http://b/282004950#comment5

PR Close #50860
2023-06-27 06:27:16 -07:00
Paul Gschwendtner b958f4d38b build: allow for compliance specs only using template pipeline (#50835)
When writing signal compliance tests, we need to limit these to only the
template pipeline.

PR Close #50835
2023-06-26 13:36:07 -07:00
Andrew Kushnir 9b7bc801f6 Revert "fix(platform-browser): wait until animation completion before destroying renderer (#50677)" (#50857)
This reverts commit 2b55103e94.

PR Close #50857
2023-06-26 12:18:40 -07:00
Andrew Kushnir 5a83c0c156 Revert "refactor(animations): remove redundant castings (#50677)" (#50857)
This reverts commit d22734766b.

PR Close #50857
2023-06-26 12:18:39 -07:00
Alan Agius 21ced23c7c refactor(animations): remove redundant castings (#50677)
This commit removes unnecessary castings.

PR Close #50677
2023-06-26 09:02:44 -07:00