32345 Commits

Author SHA1 Message Date
Angular Robot c6039b5f89 build: update io_bazel_rules_sass digest to 1f2bb53 (#57860)
See associated pull request for more information.

PR Close #57860
2024-09-18 17:48:06 +02:00
Pawel Kozlowski 538dd29755 release: cut the v19.0.0-next.6 release 19.0.0-next.6 2024-09-18 17:38:15 +02:00
Pawel Kozlowski f8666a9bd6 docs: release notes for the v18.2.5 release 2024-09-18 17:33:00 +02:00
Matthieu Riegler 029163c494 docs: adapt the NgModule to the new default : standalone (#57532)
PR Close #57532
2024-09-18 16:53:26 +02:00
Matthieu Riegler 8e8cd86383 docs: add redirect for pipes guide (#57706)
cherry-pick of #57681 that should have targeted `main`. This commit also fixes the wild card redirection

PR Close #57706
2024-09-18 16:51:44 +02:00
zdwg42 66972c6472 docs(forms): fix template-driven docs link (#57867)
PR Close #57867
2024-09-18 16:50:17 +02:00
Kristiyan Kostadinov f611faadfe fix(compiler-cli): extended diagnostics not validating ICUs (#57845)
The visitor that all extended diagnostics are based on hadn't implemented the `visitIcu` method which meant that it wasn't detecting any code inside of them.

Fixes #57838.

PR Close #57845
2024-09-18 09:48:20 +02:00
Paul Gschwendtner d0a71a33b1 refactor(migrations): check inheritance in signal queries migration (#57854)
Notably the inheritance checking is less complete as the one in the
input migration. That is because we can't efficiently determine query
fields in the analyze phase of compilation units. Unless we aggresively
consider every field of decorated classes as queries and complexify
the merged metadata significantly, we can't reliably check for cases
where a class is incompatible for migration because it overrides a
member from a class that is in a different compilation unit.

This is an acceptable limitation though (maybe for now), as worst case,
we would migrate the class and the other compilation unit would simply
break. Not ideal, but migrations are impossible to be 100% correct in
general— so not a surprise.

In the future, we may find ways to identify queries more reliably in
analyze phase already. e.g. if the compiler were to include this
metadata in the `.d.ts`, or if we decide to simply add this to the
metadata, accepting potential significant HDD increase.

PR Close #57854
2024-09-18 09:45:20 +02:00
Paul Gschwendtner e20d2742f4 build: do not run renovate on signal migration TS versioning tests (#57855)
The versions for TypeScript should not be updated.

PR Close #57855
2024-09-18 09:43:11 +02:00
Matthieu Riegler 4231e8f28f fix(core): Handle @let declaration with array when preparingForHydration (#57816)
Before this commit, `@let` decleration with an array where  mistaken for a component in the lView and throwing an unexpected error.

This commit fixes this.

PR Close #57816
2024-09-17 16:29:39 +02:00
Angular Robot 87e025ae78 build: update github/codeql-action action to v3.26.7 (#57843)
See associated pull request for more information.

PR Close #57843
2024-09-17 15:48:12 +02:00
Angular Robot 004e4ca819 build: update all non-major dependencies (#57842)
See associated pull request for more information.

PR Close #57842
2024-09-17 15:47:21 +02:00
Ingila Ejaz 607ea4b67e docs: add fork url in contribution guidelines for new contributors (#57837)
Clicking a clickable repo url in the contribution guide would make it simpler for new contributors to find the repository
PR Close #57837
2024-09-17 15:23:34 +02:00
Paul Gschwendtner 8ecafce2d9 refactor(migrations): do not run optional TCB operations in input migration (#57835)
Optional operations that don't run in the actual application compilation
would then cause fatal diagnostic errors breaking the compiler
initialization at runtime.

We should try to keep the migration as close as possible to the
application build.

PR Close #57835
2024-09-17 11:08:37 +02:00
Paul Gschwendtner 4e05a6f299 refactor(migrations): share problematic pattern detection code (#57835)
This allows us to use the inheritance checks we built for the signal
input migration, inside the queries migration.

PR Close #57835
2024-09-17 11:08:37 +02:00
Paul Gschwendtner 64c76b79db refactor(migrations): prepare for sharing problematic pattern recognition (#57835)
This commit prepares us for sharing the problematic pattern detection,
or inheritance checking. E.g. if a class is manually instantiated, using
certain APIs may not be considered safe. This logic will be shared in
the following commit.

PR Close #57835
2024-09-17 11:08:37 +02:00
Kristiyan Kostadinov 39098f3a9b refactor(compiler): finalize hydrate syntax (#57831)
Finalizes compiler implementation of the new `hydrate` triggers by:
* Reworking the logic that was depending on the `hydrateSpan` to distinguish hydrate triggers from non-hydrate triggers.
* Fixing that the `hydrate when` trigger didn't have a `hydrateSpan`.
* Adding an error if a parameter is passed into a `hydrate` trigger.
* Add an error if other `hydrate` triggers are used with `hydrate never`.
* Replacing the `prefetch` and `hydrate` flags in the template pipeline with a `modifiers` field.
* Fixing an error that was being thrown when reifying `hydrate` triggers in the pipeline.
* Adding quick info support for the `hydrate` keyword in the language service.
* Adding some tests for the new logic.

PR Close #57831
2024-09-17 11:05:17 +02:00
Jessica Janiuk 79b54bba9c refactor(compiler): initial integration of hydrate triggers into the compiler (#57831)
Sets up the AST for hydrate triggers.

PR Close #57831
2024-09-17 11:05:17 +02:00
Paul Gschwendtner 59fe9bc772 feat(migrations): introduce signal input migration as ng generate schematic (#57805)
Introduces a new `ng generate` schematic for migration `@Input()`
declarations to signal inputs.

This migration is the same that is also integrated into the
VSCode extension.

Note: In a follow-up the documentation for this will be improved, and a
flag to report reasons on why certain inputs weren't migrated, is added.

PR Close #57805
2024-09-16 18:06:49 +02:00
Paul Gschwendtner 6cdcf5d6ca refactor(compiler-cli): respect configured file system when parsing tsconfig (#57805)
Whenever the `ngc` binary is used directly to parse configurations, we
should try to respect the configured file system like we do in all other
places. Right now one spot where we escape the FS is for reading
directories to e.g. support tsconfig#includes.

This commit fixes this, implementing TypeScript's read directory method
leveraging the configured FS. The approach taken here was used for a
couple of months/years for Angular Material migrations and no issues
were found.

PR Close #57805
2024-09-16 18:06:49 +02:00
Vlad Boisa 6c3b682330 docs: change spelling to correctly params (#57832)
PR Close #57832
2024-09-16 18:03:53 +02:00
Angular Robot 8e017348ef build: update dependency @inquirer/prompts to v6 (#57821)
See associated pull request for more information.

PR Close #57821
2024-09-16 17:24:26 +02:00
Kristiyan Kostadinov e5adf92965 feat(core): stabilize @let syntax (#57813)
Removes the `@let` syntax from developer preview.

PR Close #57813
2024-09-16 12:16:12 +02:00
Charles Lyding 149d69e47c refactor(compiler): allow internal style encapsulation helper to directly encapsulate for a component (#57809)
For component stylesheet hot module replacement scenarios, it will be necessarily to directly
encapsulate a component's stylesheet in a single operation. This currently requires the
consumer of the `encapsulateStyle` helper to use the internal Angular attribute values combined
with a find/replace over the entire stylesheet. To avoid both of these, the helper function now
has an optional second parameter which allows direct and full encapsulation of a style for a given
component when the component identifier is known.

PR Close #57809
2024-09-16 12:14:57 +02:00
Pawel Kozlowski 1b1519224d feat(core): mark input, output and model APIs as stable (#57804)
This commit marks the input, output and model APIs as stable
(along with the associated APIs) and thus exits the dev preview
phase for those APIs.

PR Close #57804
2024-09-16 12:13:47 +02:00
Matthieu Riegler 41c212d604 refactor(migrations): Keep standalone:true (#57717)
This commit also adds the support of handling standalone proparties assigned by variables (or via shorthand assignments).

PR Close #57717
2024-09-16 12:12:33 +02:00
Angular Robot 6b066f3a0b build: update cross-repo angular dependencies (#57810)
See associated pull request for more information.

Closes #57806 as a pr takeover

PR Close #57810
2024-09-16 11:38:23 +02:00
Andriy Malish 7526687495 docs: Update CHANGELOG.md (#57726)
Fixing typo: reactoring -> refactoring

PR Close #57726
2024-09-16 11:28:05 +02:00
Samson Amaugo b0d68b2e6f docs: correct key usage in sectionStyles and update template binding (#57820)
PR Close #57820
2024-09-16 11:26:04 +02:00
Can Özkan 64b78d5ff4 docs: escape pipe ("|") characters in markdown tables to fix rendering issues (#57822)
PR Close #57822
2024-09-16 11:24:55 +02:00
Paweł Maniecki 716f0d53b6 docs: fix typo in requirements for NG8106 (#57772)
"Configuration requirements" referred to the wrong diagnostic (`invalidBananaInBox`)
likely due to a copy-paste error

PR Close #57772
2024-09-16 11:21:28 +02:00
Angular Robot 8a5f3197c0 build: update cross-repo angular dependencies (#57776)
See associated pull request for more information.

Closes #56387 as a pr takeover

PR Close #57776
2024-09-13 16:09:02 +02:00
Paul Gschwendtner fd081e8ee4 refactor(migrations): add compiler filesystem for devkit virtual tree (#57794)
The file system will be used for dev-kit wiring up of Tsurge migrations
in e.g. `ng generate` and `ng update`

PR Close #57794
2024-09-13 14:13:58 +02:00
Suryaprakash 1b0a6a078e docs: Update guide for version 18 - unclear (possibly incorrect?) instruction for opting out of caching HTTP requests that require authentication (#57799)
PR Close #57799
2024-09-13 13:28:20 +02:00
Andrew Scott 3ebe6b4ad4 feat(core): Add async run method on ExperimentalPendingTasks (#56546)
This helper method is simply a convenience function that reduces some
boilerplate with manually adding and removing a task around some
asynchronous function.

PR Close #56546
2024-09-13 11:10:08 +02:00
Kristiyan Kostadinov 6144612940 fix(migrations): account for explicit standalone: false in migration (#57803)
Fixes that the standalone migration was duplicating the `standalone` flag if the declaration was `standalone: false`.

PR Close #57803
2024-09-13 10:48:42 +02:00
Pascal Weyrich 55e3a3a47c docs: fix example for defer on hover on an alternative element (#57788)
PR Close #57788
2024-09-12 11:23:33 +02:00
Doug Parker 6c8fd3094a docs: add section on removing Zone.js imports/dependency from the build (#57784)
PR Close #57784
2024-09-12 10:54:09 +02:00
Lang 2b3e7f87b9 docs: use correct example (#57783)
PR Close #57783
2024-09-11 21:25:25 +00:00
Simon Knott ba386c7a24 docs: add Playwright to E2E tools (#57734)
docs: alphabetisize list

PR Close #57734
2024-09-11 21:24:52 +00:00
Jessica Janiuk 488621fd78 release: cut the v19.0.0-next.5 release 19.0.0-next.5 2024-09-11 16:27:52 -04:00
Jessica Janiuk 784d4be9d7 docs: release notes for the v18.2.4 release 2024-09-11 16:02:15 -04:00
danielbulic ada67a34f2 docs: fix link of DEVELOPER.md in CONTRIBUTING.md (#57775)
PR Close #57775
2024-09-11 18:55:21 +00:00
Paul Gschwendtner 73feb0e7bc refactor(migrations): support reference migration in query migration (#57777)
The query migration will now fully re-use the reference resolution and
migration logic from the input migration to reliably migrate references
to the new signal properties, supporing control flow outsourcing etc.

PR Close #57777
2024-09-11 17:48:29 +00:00
Paul Gschwendtner cf306d7ad7 refactor(migrations): follow-up improvements to shared reference resolution (#57777)
Moves leftover files that are related to resolution into the resolution
logic directory.

PR Close #57777
2024-09-11 17:48:29 +00:00
Paul Gschwendtner 2591b988ce refactor(migrations): add jasmine diff matcher to tsurge testing utilities (#57777)
Commonly when testing Tsurge migrations, we need to diff text content of
files. This commit adds a colored diff helper that makes writing tests
much easier.

PR Close #57777
2024-09-11 17:48:29 +00:00
Paul Gschwendtner 1c663ca820 refactor(migrations): add helper for dedenting to tsurge (#57777)
Dedenting the smallest leading whitespace is useful for conveniently
testing the output of a migration. This commit includes the helper in
Tsurge.

PR Close #57777
2024-09-11 17:48:29 +00:00
JoostK c93b510f9b feat(core): allow passing undefined without needing to include it in the type argument of input (#57621)
This commit introduces an overload for `input` to accept `undefined` as initial value if only
options are needed to be provided, inferring an input of type `T|undefined`. Prior to this change,
the type argument as specified needed to include `|undefined` explicitly even though that isn't
necessary when passing options isn't needed.

Relates to #53909

PR Close #57621
2024-09-11 14:28:19 +00:00
Matthieu Riegler c15e72a0eb refactor(core): extract assertNotDestroyed as function. (#57692)
This will allow the mangling of the method name

PR Close #57692
2024-09-11 14:27:35 +00:00
Paul Gschwendtner ebe0c168e2 refactor(migrations): share reference migration code of signal input migration (#57766)
The reference migration code of the signal input migration should be
re-usable as the queries migration needs the exact same.

This builds on top of the shared reference resolution logic from
previous commits. Similarly this commit introduces a small "host" for
providing necessary configurable information about what references
should be migrated; supporting e.g. "input incompatibilities".

This is important as e.g. queries may also be incompatible for migration
and references to such, should not be migrated.

PR Close #57766
2024-09-11 14:26:58 +00:00