Commit Graph

31062 Commits

Author SHA1 Message Date
Andrew Scott 1549afe10e release: cut the v19.0.0-next.7 release 19.0.0-next.7 2024-09-25 10:14:36 -07:00
Paul Gschwendtner 95e8fb4c1c refactor(migrations): do not insert TODO for skipped inputs (#57957)
Whenever the insert TODO option is enabled, we should not insert a TODO
for inputs that were explicitly skipped via config.

This currently causes TODOs to be inserted for inputs outside of the
given `--path`, if the analysis directory is still including files from
outside of the directory.

PR Close #57957
2024-09-25 10:04:24 -07:00
Paul Gschwendtner 274a4c0f61 refactor(migrations): assign significance to input migration incompatibility reasons (#57957)
If an input is already skipped from the migration for e.g. being an
accessor, then the fact that it may be incompatible due inheritance is
not relevant. This commit assigns signficance/priority to input
incompatibilities.

This is also important for not accidentally overriding "explicit config
filter" incompatibilities with e.g. accessor incompatibility (which may
be recognized later or visible from another compilation unit).

PR Close #57957
2024-09-25 10:04:24 -07:00
Andrew Scott fc7e8056a0 docs: release notes for the v18.2.6 release 2024-09-25 10:02:45 -07:00
Paul Gschwendtner 2c8449a2f5 refactor(migrations): replace remaining performance.now() usages. (#57947)
Those usages break in the Angular CLI schematic execution, so we should
replace them as well.

PR Close #57947
2024-09-25 08:32:23 +00:00
Paul Gschwendtner aaae011b58 refactor(migrations): migrate toArray and get methods in query migration (#57947)
This commit migrates `toArray` and `get` methods of `QueryList`. The
`toArray` method is no longer needed for multi-queries, and `get` can be
replaced with native array `at`.

PR Close #57947
2024-09-25 08:32:23 +00:00
Paul Gschwendtner 313dfb7e99 refactor(migrations): provide AST path for resolved template and host references (#57947)
This allows us to detect usages in templates and figure out if they are
e.g. invoking a problematic method like `.pipe` for the output
migration, or in queries `.toArray` etc.

PR Close #57947
2024-09-25 08:32:23 +00:00
Joey Perrott af66e2475d fix(docs-infra): extend the timeout for jasmine tests of mermaid (#57948)
Extend the timeout because mermaid takes too long for the default.

PR Close #57948
2024-09-24 13:02:52 -07:00
Joey Perrott 9dbe6fc18b refactor: update license text to point to angular.dev (#57901)
Update license text to point to angular.dev instead of angular.io

PR Close #57901
2024-09-24 15:33:00 +02:00
Arshjeet2003 7afa978c23 docs: fix image src in feature modules (#57607)
fix image src in feature modules at /guide/ngmodules/feature-modules

PR Close #57607
2024-09-24 15:01:10 +02:00
Grégoire FOUILLARD b035caee6c docs: use X link instead of twitter (#57608)
PR Close #57608
2024-09-24 14:47:01 +02:00
Johann Ulbrich 503f733ae6 docs: Correct missing validator and wrong input field name in tutorial (#57738)
PR Close #57738
2024-09-24 14:46:04 +02:00
ilyapol 7377709d25 docs: update function-based outputs names (#57930)
According to Choosing event names for Outputs and this line
`Always use camelCase output names. Avoid prefixing output names with "on".`
So I made updates for Function-based outputs chapter in all examples from onNameChange functions to nameChange function

PR Close #57930
2024-09-24 14:45:10 +02:00
Andrew Kushnir b124e50ea3 refactor(core): avoid producing zone-related warnings during hydration when in zoneless mode (#57911)
This commit updates hydration code to avoid logging "unsupported configuration" warnings when in zoneless mode.

PR Close #57911
2024-09-24 12:52:40 +02:00
Pawel Kozlowski 030ffb2ff9 docs: reword signal queries section (#57921)
Reword the Results availability timing section
based on the feedback in https://github.com/angular/angular/issues/56866

Fixes #56866

PR Close #57921
2024-09-24 12:34:37 +02:00
Pawel Kozlowski a7eff3ffaa feat(core): mark signal-based query APIs as stable (#57921)
This commit marks the contentChild, contentChildren, viewChild
and viewChildren APIs (along with any associated APIs) as stable
and thus exits the dev preview
phase for those APIs.

PR Close #57921
2024-09-24 12:34:37 +02:00
Andrew Scott 48216a28e8 refactor(router): Move view transitions to developer preview (#55600)
Nothing of concern arose during the time this feature was in the
experimental phase. There are no plans to change the shape of the API.

This change also updates the route animations documentation to use the
view transitions feature instead of the old and difficult to follow
guide that used the animations package. The content was taken from the
blog post: https://blog.angular.io/check-out-angulars-support-for-the-view-transitions-api-3937376cfc19

PR Close #55600
2024-09-24 12:07:02 +02:00
Matthieu Riegler 5a04837c54 refactor(core): replace non output EventEmitter with Subject. (#54666)
Semantcly we're shifting away from using `EventEmitter` on non-outputs.

PR Close #54666
2024-09-24 11:58:24 +02:00
Matthieu Riegler b23113dc96 refactor(common): replace non output EventEmitter with Subject. (#54666)
Semantcly we're shifting away from using `EventEmitter` on non-outputs.

PR Close #54666
2024-09-24 11:58:24 +02:00
Angular Robot 9f5798e511 build: update dependency @rollup/plugin-commonjs to v28 (#57929)
See associated pull request for more information.

PR Close #57929
2024-09-24 11:48:50 +02:00
Angular Robot d9443777ce build: update github/codeql-action action to v3.26.8 (#57937)
See associated pull request for more information.

PR Close #57937
2024-09-24 11:12:41 +02:00
Alan Agius eb5651fe98 fix(docs-infra): resolve Mermaid from Bazel root path (#57924)
This update addresses a build failure on Windows caused by the previous method, which was incompatible with the Windows environment.

Closes #57920

PR Close #57924
2024-09-23 17:20:53 +02:00
Matthieu Riegler 6c9abd38fb refactor(forms): lift circular deps (#55881)
`import type` to the rescue.

PR Close #55881
2024-09-23 16:24:05 +02:00
AleksanderBodurri 9f4063b143 refactor(devtools): provide user with suggestions on why their angular application is not being detected in dev mode (#57861)
We've been seeing some reports about Angular DevTools being unable to detect applications running in dev mode.

This commit adds more context to the error message displayed when development mode is not detected and offers some possible resolutions.

Displays 3 common reasons why DevTools fails to detect an application running in dev mode. Links directly to angular.dev for relevant configurations.

Links to the Angular DevTools issue template if none of the suggestions work.

PR Close #57861
2024-09-23 16:08:16 +02:00
Tarique Akhtar Ansari f5349cbfa9 docs: fix import name in in ng-content.md (#57836)
Corrects import symbol in
adev/src/content/guide/templates/ng-content.md

Closes #57836

PR Close #57836
2024-09-23 16:04:15 +02:00
Sheik Althaf 8602729801 fix(devtools): remove existing highlight before highlighting another element (#57746)
In this PR we will remove the exiting highlight before highlighting the another element so that the highlight always be one

PR Close #57746
2024-09-23 16:00:23 +02:00
Charles Lyding 7b2fda16b1 refactor(platform-browser): reduce runtime code size of shared style host (#57834)
The `SharedStylesHost` class has been refactored to both reduce the runtime
code size and also modernize some of the code structures. The class is also
adjusted to better support reuse via subclassing or other reuses in the future.
Additional comments have been added to improve readability as well.
The code reduction in a prerelease newly generated Angular CLI application
for production is ~410 bytes.

Before:
```
Initial chunk files   | Names         |  Raw size | Estimated transfer size
main-GOQKBZBZ.js      | main          | 208.67 kB |                56.41 kB
polyfills-FFHMD2TL.js | polyfills     |  34.52 kB |                11.28 kB
styles-5INURTSO.css   | styles        |   0 bytes |                 0 bytes

                      | Initial total | 243.19 kB |                67.69 kB
```

After:
```
Initial chunk files   | Names         |  Raw size | Estimated transfer size
main-CRTDDKPH.js      | main          | 208.26 kB |                56.32 kB
polyfills-FFHMD2TL.js | polyfills     |  34.52 kB |                11.28 kB
styles-5INURTSO.css   | styles        |   0 bytes |                 0 bytes

                      | Initial total | 242.78 kB |                67.61 kB
```

PR Close #57834
2024-09-23 14:22:58 +02:00
Paul Gschwendtner 04a48736b1 refactor(migrations): add TODO for special output of signal input migration (#57918)
Sometimes we may insert `undefined!` or `any`. We should add a TODO in
those cases.

PR Close #57918
2024-09-23 13:41:48 +02:00
Paul Gschwendtner 7d74ab8ba3 refactor(migrations): improve logging of signal input migration (#57918)
The program preparation may take longer than the short analysis, given
potential larger projects. We should print this.

PR Close #57918
2024-09-23 13:41:48 +02:00
Paul Gschwendtner d1391ceaad refactor(migrations): fix peformance.now() not available in input schematic (#57913)
In schematics, `performance.now()` is not available. This breaks
execution.

PR Close #57913
2024-09-23 12:43:53 +02:00
Paul Gschwendtner 304bb3b274 refactor(migrations): remove imports to QueryList in signal queries migration (#57919)
With this commit, we remove imports to `QueryList` whenever possible.

PR Close #57919
2024-09-23 12:43:17 +02:00
Paul Gschwendtner 505c0f788e refactor(migrations): add better explanation on what color diff represents in testing (#57919)
This clarifies what colors mean in the Tsurge text diff Jasmine matcher.

PR Close #57919
2024-09-23 12:43:17 +02:00
cexbrayat eb77b533b8 refactor(migrations): avoid TS error 18003 when no files found (#57899)
When running a migration, tsurge creates a TS program from the tsconfig files found.
This can result in a 18003 error when no files are found (based on the includes/files of the config).

For example, the signal input migration throws in a CLI project that has no spec files:

```
ng g @angular/core:signal-inputs --defaults
Tsconfig could not be parsed or is invalid:

No inputs were found in config file '/tsconfig.spec.json'. Specified 'include' paths were '["src/**/*.spec.ts","src/**/*.d.ts"]' and 'exclude' paths were '["/out-tsc/spec"]'.
```

A similar issue has already been raised in the CDK migration (see https://github.com/angular/components/issues/27055).

This was solved in the CDK (credits to @crisbeto) by ignoring the 18003 error (see 9c1112d408361a47c98dfd470b8e990cbd1753db).

This PR does the same in tsurge.

PR Close #57899
2024-09-23 12:42:33 +02:00
Paul Gschwendtner 101d162d6d refactor(migrations): support inserting TODOs for skipped input fields (#57898)
This is a helpful option to retrieve some insights on why certain inputs
were not migrated.

PR Close #57898
2024-09-23 12:41:34 +02:00
Paul Gschwendtner 5bb7050c59 refactor(migrations): add common helpers for inserting TODOs (#57898)
Adds a common helper for inserting TODOs to Tsurge.

PR Close #57898
2024-09-23 12:41:34 +02:00
Dylan Hunn 7ecfd89592 fix(language-service): The suppress diagnostics option should work for external templates (#57873)
Previously, due to a bug, this option only worked for inline templates.

PR Close #57873
2024-09-23 12:03:30 +02:00
Tomer953 6468a2bba3 docs: add signal example for "Binding to the host element" section (#57272)
Added a new example demonstrating the use of signals in the "Binding to the host element" section.
PR Close #57272
2024-09-23 12:01:05 +02:00
ChinoUkaegbu d30cef290d docs(core): update wording in ComponentDecorator (#57878)
PR Close #57878
2024-09-23 11:59:08 +02:00
Angular Robot 4ff695ccef build: update io_bazel_rules_sass digest to 1fc4bd9 (#57907)
See associated pull request for more information.

PR Close #57907
2024-09-23 11:42:33 +02:00
Andrew Kushnir 6b239535e8 docs: declare Event Replay feature as stable (#57895)
This commit drops the `@developerPreview` annotation from the `withEventReplay()` function, which effectively makes the Event Replay feature stable.

PR Close #57895
2024-09-23 11:41:52 +02:00
Alejandro Cuba Ruiz e9314e6e92 docs: remove @empty <li> from the a11y tree (#54676)
PR Close #54676
2024-09-23 11:40:39 +02:00
Andrew Scott 950a5540f1 fix(core): Ensure the ViewContext is retained after closure minification (#57903)
In order to survive closure minification correctly, static properties need to
be annotated with `@nocollapse`.

For more history, see https://github.com/angular/angular/pull/28050

PR Close #57903
2024-09-20 14:01:26 -07:00
Andrew Scott a1f229850a feat(core): migrate ExperimentalPendingTasks to PendingTasks (#57533)
This commit promotes the `ExperimentalPendingTasks` service from
experimental to developer preview and includes a migration schematic for
the rename.

BREAKING CHANGE: `ExperimentalPendingTasks` has been renamed to
`PendingTasks`.

PR Close #57533
2024-09-20 18:26:48 +02:00
Joey Perrott a448f5a6f2 ci: update ownership to include MarkTechson (#57885)
Update pullapprove to include MarkTechson in ownership of a couple areas.

PR Close #57885
2024-09-20 16:59:49 +02:00
Enea Jahollari 732f22e4fb docs: Update ng-container.md (#57770)
PR Close #57770
2024-09-20 16:57:38 +02:00
Ahmed Hakeem 5a25dee2ac docs: include a second instance in which NG0300 err occurs (#56549)
PR Close #56549
2024-09-20 16:56:43 +02:00
Rahat Ahmed b3977307db docs(core): Fix typo in DI docs (#55563)
PR Close #55563
2024-09-20 16:54:44 +02:00
Tobi 3ac0a78532 docs(http): heads up about provider ordering (#56518)
PR Close #56518
2024-09-20 15:29:16 +02:00
Paul Gschwendtner ef5412c9bc refactor(migrations): fix virtual devkit file system not detecting directories (#57897)
The compiler and its file system implementation expects `fs.exists` to
return `true` even for directories. This caused issues with the TSConfig
resolution as `/` was looked up.

We fix this by making use of `stat` which is equally expensive to
`tree.exists`. The devkit tree's don't expose directory existance checks
out of the box.

Fixes #57887.

PR Close #57897
2024-09-20 15:06:33 +02:00
Paul Gschwendtner 88f2fe4387 test(migrations): fix batch test for signal input migration (#57883)
The batch test (not running on CI due to memory/resource constraints) currently fails
after refactorings we did recently. This commit fixes that there were
two different instances of `sourceFiles string[]`.

PR Close #57883
2024-09-20 12:19:11 +02:00