Commit graph

29561 commits

Author SHA1 Message Date
AleksanderBodurri
dbadfea67f feat(devtools): create demo application that uses standalone APIs and standalone components/directives/pipes (#48533)
The existing DevTools demo app that is used for developing on DevTools is exclusively an NgModule application. This commit creates a copy of the old demo app but with no NgModules and only standalone APIs/Components/Directives/Pipes

PR Close #48533
2023-06-12 12:51:24 +02:00
Manuel Timelthaler
b1aed48993 docs: add missing navigation item (#50113)
PR Close #50113
2023-06-12 12:39:01 +02:00
aanchal
58549e7f18 docs: added lang attributes in html files (#50588)
PR Close #50588
2023-06-12 12:08:09 +02:00
aanchal
24c8e4e753 docs: removed duplicated words (#50648)
PR Close #50648
2023-06-12 11:43:42 +02:00
alkavats1
f7f15ae2a9 docs: added title attribute to the iframe tag (#50569)
PR Close #50569
2023-06-12 11:24:35 +02:00
Shadab Ansari
9860acecf0 docs(packaging): Clarify the necessity of dev-dependencies (#50619)
Clarify the role of dev-dependencies. Dependencies are required for production
ie, execution of an application, whereas devDependencies are required for
developing as well as *building* the application (dev and prod build both)

PR Close #50619
2023-06-12 11:19:11 +02:00
Jessica Janiuk
0370905cd5 docs: add information about usage of innerHTML and outerHTML (#50643)
Usage of innerHTML and outerHTML will cause the same problem as using direct DOM manipulation.

PR Close #50643
2023-06-12 11:17:52 +02:00
aanchal
a163d35c31 docs: removed unused methods (#50631)
PR Close #50631
2023-06-09 17:41:55 +02:00
Pham Huu Hien
a1973a4216 docs: remove repeated word (#50614)
PR Close #50614
2023-06-09 17:39:14 +02:00
Alex Rickabaugh
b7c710e722 docs: release notes for the v16.0.5 release 2023-06-08 14:25:02 -07:00
Alex Rickabaugh
e1a715da73 docs: remove reverted commit from the changelog
This commit removes a reverted commit for `NgComponentOutlet` inputs from
the changelog for 16.1.0-rc.0.
2023-06-08 13:47:35 -07:00
Alex Rickabaugh
024d6a81fd docs: release notes for the v16.1.0-rc.0 release 2023-06-08 13:46:33 -07:00
Alex Rickabaugh
e2ca451faa release: bump the next branch to v16.2.0-next.0 2023-06-08 13:46:33 -07:00
Alex Rickabaugh
55d6147d29 Revert "feat(common): add component input binding support for NgComponentOutlet (#49735)"
This reverts commit f3867597f0. This PR has
property renaming bugs in g3.
2023-06-08 10:32:49 -07:00
hyperlife1119
f3867597f0 feat(common): add component input binding support for NgComponentOutlet (#49735)
This commit add component input binding support for NgComponentOutlet.

PR Close #49735
2023-06-08 10:00:34 -07:00
Matthieu Riegler
85c5427582 feat(http): Introduction of the fetch Backend for the HttpClient (#50247)
This commit introduces a new `HttpBackend` implentation which makes requests using the fetch API

This feature is a developer preview and is opt-in.
It is enabled by setting the providers with `provideHttpClient(withFetch())`.

NB: The fetch API is experimental on Node but available without flags from Node 18 onwards.

PR Close #50247
2023-06-08 09:48:12 -07:00
Alan Agius
37d3664cf5 build: run //packages/common/http/test on Node.js 18 (#50247)
This commits adds configures `//packages/common/http/test` to use Node.js 18 toolchain which is needed to test the fetch implementation which use Node.js 18 APIs.

We also disable RBE for this target as it doesn't work with Node.js 18 right now. See https://github.com/angular/dev-infra/issues/1017

PR Close #50247
2023-06-08 09:48:11 -07:00
Payam Valadkhan
9648fc49dd refactor(compiler-cli): Remove .d.ts files transformer in local compilation mode. (#50486)
In local mode we don't make use of .d.ts files for Angular compilation, so their transformation can be ditched.

PR Close #50486
2023-06-07 12:50:54 -07:00
Payam Valadkhan
8506cf426c refactor(bazel): Circuit out ts semantic check in local mode compilation (#50486)
In local mode compilation the TS semantic check issues tons of diagnostics due to the fact that the file dependencies (.d.ts files) are not available in the program. So it needs to be disabled.

This commit should not cause any issue for the exsiting projects as it just removes a diagnostic in the local compilation mode.

PR Close #50486
2023-06-07 12:50:54 -07:00
Kristiyan Kostadinov
4e663297c5 fix(compiler): error when reading compiled input transforms metadata in JIT mode (#50600)
Fixes an error that surfaced in #50580 where the compiler was throwing an error in JIT mode when reading the result of `compileDirectiveDeclaration`. It is caused by the fact that input transform functions were being passed around directly, instead of being wrapped in an AST node.

PR Close #50600
2023-06-07 12:47:16 -07:00
Angular Robot
3044822fc2 build: update dependency gulp-conventional-changelog to v3 (#50598)
See associated pull request for more information.

PR Close #50598
2023-06-07 12:46:15 -07:00
Angular Robot
eda217bcad build: update dependency get-port to v7 (#50566)
See associated pull request for more information.

PR Close #50566
2023-06-07 12:45:33 -07:00
Cade DuPont
ab35596b36 docs: fix indentation issue in component lifecycle (#50490)
PR Close #50490
2023-06-07 12:44:43 -07:00
Alan Agius
0875b519b9 fix(platform-server): surface errors during rendering (#50587)
Prior to this change in some cases errors tht happen during routing were not being surfaced. This is due to the fact that the router has floating promises, and the platform was being destroyed prior to these being settled.

PR Close #50587
2023-06-07 12:44:08 -07:00
Alan Agius
7837f7119f fix(zone.js): enable monkey patching of the queueMicrotask() API in node.js (#50530)
Similar to the browser, now we also monkey patch `queueMicrotask` in Node.js. This API was added in Node.js 11.

PR Close #50530
2023-06-07 12:42:33 -07:00
Kristiyan Kostadinov
79a706c847 fix(core): incorrectly throwing error for self-referencing component (#50559)
Components are implied to be self-referencing, but if they explicitly set themselves in the `imports` array, they would throw an error because we weren't filtering them out.

Fixes #50525.

PR Close #50559
2023-06-06 14:23:40 -07:00
Kristiyan Kostadinov
d55276aab0 refactor(router): use transform to coerce input values (#50589)
Uses the new `transform` option for inputs instead of getters and setters to coerce the incoming values.

PR Close #50589
2023-06-06 14:15:50 -07:00
aanchal
70c2e39b0b docs: updated the markup elements (#50586)
PR Close #50586
2023-06-06 14:14:26 -07:00
Angular Robot
22eb947db0 build: update github/codeql-action action to v2.3.6 (#50585)
See associated pull request for more information.

PR Close #50585
2023-06-06 14:13:39 -07:00
Angular Robot
415bdc76cf build: update eslint dependencies to v5.59.9 (#50584)
See associated pull request for more information.

PR Close #50584
2023-06-06 14:13:13 -07:00
Alan Agius
edceb486dd fix(core): wait for HTTP in ngOnInit correctly before server render (#50573)
Previously, with `mergeMap` we did not cancel previous subscriptions to zoneIsStable which caused the application to be stablized before hand.

Closes: #50562

PR Close #50573
2023-06-06 14:12:34 -07:00
Dinithi Navodya Dias
a01ecf3da2 docs: Fix punctuation for better consistency (#50560)
This is to fix a punctuation issue on the "Tour of Heroes - Introduction" page for better consistency.
PR Close #50560
2023-06-06 14:11:42 -07:00
Matthieu Riegler
b3d22956ae docs: update versions support. (#50558)
v16.1 will support TS5.1

PR Close #50558
2023-06-06 14:09:52 -07:00
Nemikolh
34989fda7a fix(docs-infra): replace use of turbo on StackBlitz with npm (#50576)
Turbo is being deprecated and can be replaced by npm with some tweaks. In particular, the installation step needs `--legacy-peer-deps` to mimic turbo's behaviour.

PR Close #50576
2023-06-06 12:19:55 +00:00
Alan Agius
cb31dbc75c fix(zone.js): patch entire promise in node (#50552)
In https://github.com/angular/angular/pull/49144 we introduced a change to only path `Promise.prototype.then` due to Node.js `SafePromise` complaining about `Promise.prototype.then` called on incompatible receiver. This however introduced a number of regressions. This commit reverts this change and re-introduces the changes to patch the entire promise on Node.

The original `SafePromise` problem is no longer reproducible as of Node.js version 18.13+ as it was addressed as part of https://github.com/nodejs/node/pull/45175.

While the Angular CLI does not yet generate ESM server bundles, users using ESM with dynamic imports will require using Node.js 18.13 or later.

Closes #50513, closes #50457, closes #50414 and closes #49930

PR Close #50552
2023-06-02 14:07:18 -07:00
Kristiyan Kostadinov
cf15c290f0 build: update to TypeScript 5.1 final (#50548)
Bumps us up to the final version of TypeScript 5.1 which dropped overnight.

PR Close #50548
2023-06-02 14:06:46 -07:00
Alex Rickabaugh
9847085448 refactor(compiler): support property interpolation in the template pipeline (#50118)
This commit adds support for interpolated properties to the template
pipeline.

PR Close #50118
2023-06-01 08:46:08 -07:00
Alex Rickabaugh
6984431dde refactor(compiler): write expressions in the template pipeline (#50118)
This commit adds ingest and transformation support for property writes and
keyed writes to the template pipeline.

PR Close #50118
2023-06-01 08:46:08 -07:00
Alex Rickabaugh
a48c5f72a6 refactor(compiler): support pipes in the template pipeline (#50118)
This commit adds end-to-end support for pipes in the template pipeline. This
support works across multiple steps:

1. Pipes are first ingested as `ir.PipeBindingExpr`s during the ingest step.

2. A "pipe creation" phase inserts operations to instantiate each required
pipe, based on the presence of those `ir.PipeBindingExpr`s.

3. A "variadic pipe" phase transforms pipes with more than 4 arguments into
variadic pipe bindings, which use a literal array argument. This literal
array will be later memoized into a pure function invocation.

4. A special phase (`phaseAlignPipeVariadicVarOffset`) reconciles a
difference in variable slot assignment logic between the template pipeline
and the `TemplateDefinitionBuilder`, to ensure that the pipeline output can
pass the existing tests. This phase should not affect runtime semantics and
can be dropped once matching output is no longer necessary.

5. Reification emits pipe instructions based on the argument count.

PR Close #50118
2023-06-01 08:46:07 -07:00
Alex Rickabaugh
cc51122c52 refactor(compiler): fix insertBefore ownership logic (#50118)
The logic for `insertBefore` in template pipeline operation lists has a bug
when inserting at the end of a list. This commit fixes the safety assertions
to be more accurate.

PR Close #50118
2023-06-01 08:46:07 -07:00
Alex Rickabaugh
803d7dc01d refactor(compiler): convert conditional ast in template pipeline (#50118)
This commit adds support for ternary expressions in the ingest operation of
the template pipeline.

PR Close #50118
2023-06-01 08:46:07 -07:00
Alex Rickabaugh
35227049a1 refactor(compiler): purify literal arrays and maps in template pipeline (#50118)
This commit transforms literal arrays and maps within expressions in the
template pipeline into `ir.PureFunctionExpr` expressions, in order to
memoize the allocation of objects and arrays inside the update pass of
change detection.

PR Close #50118
2023-06-01 08:46:07 -07:00
Alex Rickabaugh
a56726c069 refactor(compiler): transform all expressions in the template pipeline (#50118)
Previously the helper operations for transforming expressions in the
template pipeline would only operate against `ir.Expression`s. This commit
changes them to process `o.Expression`s instead, paving the way to use them
for transformations of native expressions in addition to IR expressions.

PR Close #50118
2023-06-01 08:46:07 -07:00
Alex Rickabaugh
1b37dcda61 refactor(compiler): add pure function support to the template pipeline (#50118)
This commit adds support for generating pure functions in the output
`ConstantPool` based on `ir.PureFunctionExpr`s. Note that nothing yet
generates these pure function forms - in the future they will be used both
in the implementation of the `pipeBindV` instruction as well as literal
arrays and maps in expressions.

PR Close #50118
2023-06-01 08:46:07 -07:00
Alex Rickabaugh
1928cd82d9 refactor(compiler): add ConstantPool to template pipeline compilations (#50118)
This commit adds the `ConstantPool` to `ComponentCompilation`, making it
available to all phases of the template pipeline. Constant extraction is a
common operation in pipeline phases.

PR Close #50118
2023-06-01 08:46:06 -07:00
Alex Rickabaugh
11469b58c3 refactor(compiler): add shared constant concept to ConstantPool (#50118)
This commit adds a "shared constant" concept to the `ConstantPool`. This
is a generalization of the `LiteralFactory` concept the pool previously
supported. For stability's sake, the existing concept isn't modified, but
could be unified in the future.

PR Close #50118
2023-06-01 08:46:06 -07:00
Alex Rickabaugh
93c9e9d456 refactor(compiler): add UsesVarOffset trait to template pipeline (#50118)
This commit introduces a new trait `UsesVarOffset` for expressions which
consume variable slots and thus need an offset into the variable slot space
to locate their slots.

PR Close #50118
2023-06-01 08:46:06 -07:00
Alex Rickabaugh
8dc2029012 refactor(compiler): generalize interpolation calling for v-arg functions (#50118)
The template pipeline implements variadic instruction generation for text
node interpolation using an `InterpolationConfig` concept. This commit
refactors that code to generalize it to work not just with interpolations,
but with all instruction generation for variadic instructions.

PR Close #50118
2023-06-01 08:46:06 -07:00
Alex Rickabaugh
05026a2a24 refactor(compiler): support literal array/maps in the template pipeline (#50118)
This commit adds support to the template pipeline to ingest and process
literal array and map expressions. A future phase may process these literal
expressions and memoize them into pure functions where required.

PR Close #50118
2023-06-01 08:46:06 -07:00
Alan Agius
540e643347 fix(compiler): do not remove comments in component styles (#50346)
Prior to this commit, comments in CSS were being removed. This caused inline sourcemaps to break to the shift in lines.

This caused sourcemaps to break in the ESBuild based builder as this always adds comments at the top of the file with the filename.

Example
```css
 /* src/app/app.component.scss */
* {
  color: red;
  background: transparent;
}
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvYXBwLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBOzs7Ozs7Ozs7Q0FBQTtBQVdBO0VBQ0UsVUFBQTtFQUNBLHVCQUFBO0FBREYiLCJzb3VyY2VzQ29udGVudCI6WyIvL01FRElBIFFVRVJZIE1BTkFHRVJcbi8qXG4gIDAgLSA2MDA6IFBob25lXG4gIDYwMCAtIDkwMDogVGFibGV0IHBvcnRyYWl0XG4gIDkwMCAtIDEyMDA6IFRhYmxldCBsYW5kc2NhcGVcbiAgMTIwMCAtIDE4MDA6IE5vcm1hbCBzdHlsZXNcbiAgMTgwMCsgOiBCaWcgRGVza3RvcFxuICAxZW0gPSAxNnB4XG4gIFRoZSBzbWFsbGVyIGRldmljZSBydWxlcyBhbHdheXMgc2hvdWxkIHdyaXRlIGJlbG93IHRoZSBiaWdnZXIgZGV2aWNlIHJ1bGVzXG4gIEZpeGluZyBPcmRlciA9PiBCYXNlICsgVHlwb2dyYXBoeSA+PiBHZW5lcmFsIExheW91dCArIEdyaWQgPj4gUGFnZSBMYXlvdXQgKyBDb21wb25lbnRcbiovXG5cbioge1xuICBjb2xvcjogcmVkO1xuICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= */
```

Closes #50308

PR Close #50346
2023-06-01 08:45:11 -07:00