Commit graph

31159 commits

Author SHA1 Message Date
Angular Robot
a762425e31 build: update actions/cache digest to 2cdf405 (#58107)
See associated pull request for more information.

PR Close #58107
2024-10-08 06:17:36 +00:00
Joey Perrott
5c63fc4468 ci: update renovate configuration to automatically run generated file updates (#58109)
Automatically update generated files when changes are made in renovate

PR Close #58109
2024-10-07 13:27:52 -07:00
Angular Robot
ce95449fe0 build: update actions/checkout digest to eef6144 (#58108)
See associated pull request for more information.

PR Close #58108
2024-10-07 13:26:52 -07:00
Angular Robot
cbf7995d9d build: update dependency @inquirer/prompts to v7 (#58099)
See associated pull request for more information.

PR Close #58099
2024-10-07 13:26:01 -07:00
AleksanderBodurri
837af44510 refactor(core): introduce debugName optional arg to ReactiveNode (#57710)
This commit contains the changes to core/primitives that used to be in https://github.com/angular/angular/pull/57073.

PR Close #57710
2024-10-07 09:25:28 -07:00
arturovt
69763491c3 fix(zone.js): remove abort listener once fetch is settled (#57882)
This commit updates the `fetch` patch for zone.js. Currently, we're attaching an
`abort` event listener on the signal (when it's provided) and never removing it.
We should be good citizens and remove event listeners whenever objects need to be
properly collected. In Firefox, when saving a heap snapshot and running it through
`fxsnapshot`, querying `AbortSignal` will print a so-called "CaptureMap" with a list
of "lambdas," indicating that the signal is not garbage collected because of the event
listener lambda function.

PR Close #57882
2024-10-07 08:27:53 -07:00
Kristiyan Kostadinov
8d8c03abc4 fix(compiler-cli): defer symbols only used in types (#58104)
Currently we don't defer any symbols that have references outside of the `import` statement and the `imports` array. This is a bit too aggressive, because it's possible that the symbol is only used for types (e.g. `viewChild<SomeCmp>('ref')`) which will be stripped when emitting to JS.

These changes expand the logic so that references inside type nodes aren't considered.

**Note:** one special case is when the symbol used in constructor-based DI (e.g. `constructor(someCmp: SomeCmp)`, because these constructors will be compiled to `directiveInject` calls. We don't need to worry about them, because the compiler introduces an addition `import * as i1 from './some-cmp';` import that it uses to refer to the symbol.

Fixes #55991.

PR Close #58104
2024-10-07 08:26:07 -07:00
Alan Agius
5c61f46409 refactor(platform-browser): remove deprecated BrowserModule.withServerTransition method (#58062)
BREAKING CHANGE: The deprecated `BrowserModule.withServerTransition` method has been removed. Please use the `APP_ID` DI token to set the application id instead.

PR Close #58062
2024-10-07 08:23:53 -07:00
Luan Gong
109366e2fc docs: use correct heading in templates guide (#58101)
PR Close #58101
2024-10-07 08:22:45 -07:00
Matthieu Riegler
186b52449a docs: add info on AbstractControl.source type. (#58094)
The source can be of any type and can't be inferred from `T`

fixes #58076

PR Close #58094
2024-10-07 08:21:55 -07:00
Daniel Jancar
656b5d3e78 fix(core): Re-assign error codes to be within core bounds (<1000) (#53455)
`RUNTIME_DEPS_INVALID_IMPORTED_TYPE` is now 980
`RUNTIME_DEPS_ORPHAN_COMPONENT` is now 981

PR Close #53455
2024-10-07 08:21:13 -07:00
Charles Lyding
d9dc41a18c test(compiler-cli): add compliance tests for external runtime styles (#57613)
To ensure that the external runtime style component feature is correctly
emitted by the Angular compiler, compliance tests have been added for
file-based component styles. Additionally, the partial golden generator
has been updated to work with file-based component styles.

PR Close #57613
2024-10-07 08:20:22 -07:00
Charles Lyding
da250b2819 refactor(compiler-cli): add inline stylesheet external runtime style transformation support (#57613)
To provide support for HMR of inline component styles (`styles` decorator field), the AOT
compiler will now use the resource host transformation API with the Angular CLI to provide
external runtime stylesheet URLs when the `externalRuntimeStyles` compiler option is enabled.
This allows both a component's file-based and inline styles to be available for HMR when used
with a compatible development server such as with the Angular CLI. No behavioral change is
present if the `externalRuntimeStyles` option is not enabled or the resource host transformation
API is not used.
An `order` numeric field is also added to the transformation API which allows consumers such as
the Angular CLI to create identifiers for each inline style in a specific containing file.

PR Close #57613
2024-10-07 08:20:22 -07:00
Charles Lyding
c69371151a refactor(compiler): support external runtime component styles for file-based stylesheets (#57613)
The AOT compiler now has the capability to handle component stylesheet files as
external runtime files. External runtime files are stylesheets that are not embedded
within the component code at build time. Instead a URL path is emitted within a component's
metadata. When combined with separate updates to the shared style host and DOM renderer,
this will allow these stylesheet files to be fetched and processed by a development
server on-demand. This behavior is controlled by an internal compiler option `externalRuntimeStyles`.
The Angular CLI development server will also be updated to provide the serving functionality
once this capability is enabled. This capability enables upcoming features such as automatic
component style hot module replacement (HMR) and development server deferred stylesheet processing.
The current implementation does not affect the behavior of inline styles. Only the
behavior of stylesheet files referenced via component properties `styleUrl`/`styleUrls`
and relative template `link` elements are changed by enabling the internal option.

PR Close #57613
2024-10-07 08:20:22 -07:00
vladboisa
a36744e4bb docs: move JSDoc before functions (#58087)
Move the JSDoc before functions for correct view of params

PR Close #58087
2024-10-04 14:47:53 -07:00
Matthieu Riegler
bb0edaded0 docs(docs-infra): Add NgModule exports for directives. (#58071)
This information is extracted from the @NgModule Jsdoc tag.

fixes #57906

PR Close #58071
2024-10-04 14:46:16 -07:00
Adrien Crivelli
0eb1c5c021 docs(common): Minor typo in code example (#58085)
PR Close #58085
2024-10-04 14:38:40 -07:00
JoostK
06600d2ebd refactor: change security issue redirect to angular.dev (#58070)
Ensure the security issue template points to the correct location.

PR Close #58070
2024-10-04 10:57:42 -07:00
Stanka Kopalova
4986e13748 docs: add better title name (#58060)
PR Close #58060
2024-10-04 10:57:07 -07:00
Stanka Kopalova
4cf9e4a824 docs: fix wrong title of section (#58060)
PR Close #58060
2024-10-04 10:57:07 -07:00
Angular Robot
a2bdd6ae45 refactor(compiler): update dependency chokidar to v4 (#57945)
This commit bump chokidar to the latest major and adjusts to the breaking changes.

PR Close #57945
2024-10-04 10:56:02 -07:00
arturovt
8ce190b1b7 docs(zone.js): update docs to enable beforeunload (#57881)
In this commit, we update the documentation to reflect the property that allows
enabling the default browser `beforeunload` handling, which was added in a
previous commit.

Additionally, some cosmetic grammar changes have been made in this documentation,
as the previous text had some issues.

Closes #52256

PR Close #57881
2024-10-04 10:55:00 -07:00
Matthieu Riegler
84b6896956 refactor(platform-server): Add an ssr benchmark setup. (#57647)
In order to investigate the performances of SSR, this commit introduces a benchmark suite which will measure several step of the rendering.

PR Close #57647
2024-10-04 10:45:22 -07:00
Matthieu Riegler
58bfb4aee9 build: update ts target to ES2022 and module to ES2022 (#58022)
Our integration tests are based on the CLI. CLI build force the target to ES2022 else it logs a warning

PR Close #58022
2024-10-04 13:33:48 +00:00
Matthieu Riegler
157a84f461 docs: mark afterRenderEffect as experimental. (#58048)
On overloaded funtions, the jsdoc tag must be on the implementation.

PR Close #58048
2024-10-04 13:33:10 +00:00
Jeevan Mahesha
72fd222587 docs: add documentation for lazy loading a standalone component (#57620)
Added a new section in the documentation explaining how to lazy load a standalone component using `loadComponent`. This includes a code example demonstrating the setup in Angular routes.

PR Close #57620
2024-10-04 13:31:52 +00:00
Angular Robot
9a67e1258b build: update all non-major dependencies (#58023)
See associated pull request for more information.

PR Close #58023
2024-10-04 13:30:43 +00:00
Matthieu Riegler
ab91f0371b refactor(compiler-cli): exclude private computed properties from class member extractions (#57596)
This will exclude properties like `[ɵWRITABLE_SIGNAL]` from the `WritableSignal` interface.

PR Close #57596
2024-10-04 13:29:51 +00:00
Alan Agius
c15ec36bd1 refactor(core): remove deprecated factories Property in KeyValueDiffers (#58064)
BREAKING CHANGE: The deprecated `factories` property in `KeyValueDiffers` has been removed.

PR Close #58064
2024-10-04 13:28:49 +00:00
Matthieu Riegler
afa1e9aac8 ci: disable updates for @bazel (#58050)
This is to prevent the bot to update #51047

PR Close #58050
2024-10-04 13:28:16 +00:00
Matthieu Riegler
74a2a449bd refactor(devtools): remove unused imports. (#58057)
Thanks to the new extended diagnostic.

PR Close #58057
2024-10-04 13:27:34 +00:00
cexbrayat
ee426c62f0 fix(core): allow signal write error (#57973)
Now that effects allow to write to signals (see 4e890cc5ac),
the SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT error is only thrown in `computed` functions.
This commit updates the error message to remove the mention of effects and of the deprecated `allowSignalWrites` option.

PR Close #57973
2024-10-04 13:27:00 +00:00
Paul Gschwendtner
9213216d42 refactor(migrations): do not accidentally detect read as incompatible write (#58054)
Fixes that the signal input and queries migration detects code like
`fixture = bla.componentInstance.field` as an incompatible write because
it's part of a binary expression, but we didn't check whether it's part
of the left side.

PR Close #58054
2024-10-03 16:45:11 +00:00
Alan Agius
9c3bd1b5d1 refactor(localize): remove deprecated name option. (#58063)
BREAKING CHANGE: The `name` option in the `ng add @localize` schematic has been removed in favor of the `project` option.

PR Close #58063
2024-10-03 16:43:36 +00:00
vladboisa
681e1ec3be fix(docs-infra): fix calculation of height editor (#54128)
Apply the min() function for set the smallest height

fix(docs-infra): move height into editor-wrapper

Move the calculation rule of height edit into editor-wrapper selector

fix(docs-infra): change has selector

Change the has selector

fix(docs-infra): change selector's for child

Changing the selector for test this solution

Fix

PR Close #54128
2024-10-03 16:43:02 +00:00
vladboisa
c8af06250d feat(docs-infra): add transition on editor wrapper (#54128)
Add the smooth animation when height of the container is changing

PR Close #54128
2024-10-03 16:43:02 +00:00
vladboisa
68441039c6 fix(docs-infra): max-height IDE error panel visibility (#54128)
Remove max-height: 200px in ul child inline-errors-box, add the overflow & max-height in percentages to the parent for correct visualization

Fixes #52760

refactor(docs-infra): correct typo
Correct typo in comment

feat(docs-infra): modify the height of the editor
If error box are displayed, modify the height of the editor

PR Close #54128
2024-10-03 16:43:02 +00:00
Andrew Seguin
1d18b07588 docs: reword when to use model inputs (#57648)
PR Close #57648
2024-10-03 16:42:18 +00:00
arturovt
5cbe02acb6 refactor(docs-infra): cleanup AfterRenderSequence for reference list (#58030)
In this commit, we're replacing the provided injector in `afterNextRender` with a node injector
because it was previously mistakenly passing an `EnvironmentInjector`. The `EnvironmentInjector`
resolves `DestroyRef` to itself, meaning that `AfterRenderSequence` is essentially never destroyed
(since the environment injector is not destroyed either).

PR Close #58030
2024-10-02 18:01:31 +00:00
Jeevan Mahesha
9e32cc4a20 docs: update comments to use consistent code formatting for boolean values (#57619)
PR Close #57619
2024-10-02 18:00:51 +00:00
Paul Gschwendtner
326cca2cba refactor(migrations): eagerly migrate Partial<T> references in google3 (#58049)
Instead of only migrating `Partial<T>` references to unwrap signal
inputs when all members are migrated, we should do this, even if just a
subset of inputs of the class are migrated.

This is something we saw required manual fixups in google3— so this
commit fixes this.

PR Close #58049
2024-10-02 15:10:26 +00:00
Paul Gschwendtner
d48aac8d44 release: cut the v19.0.0-next.8 release 2024-10-02 15:24:15 +02:00
Paul Gschwendtner
4461a585e5 docs: release notes for the v18.2.7 release 2024-10-02 14:36:11 +02:00
arturovt
b7bd429951 fix(common): prevent warning about oversize image twice (#58021)
I’ve noticed that there was a loop inside a loop. Since we’re already iterating through
`images` using `forEach`, it was running a `for` loop through `images` again. This was
probably a mistake made when the functionality was initially added. The test actually
verified that `logs.length` is `1`, but in the real environment, it logs twice
(which is quite obvious due to the code).

I’ve also added the missing file to the Bazel target.

PR Close #58021
2024-10-02 11:46:17 +00:00
Andrew Kushnir
222544491b refactor(core): avoid hydration warnings when RenderMode.Client is set (#58004)
With the newly-added `RenderMode` config for routes, some of the routes may have the `RenderMode.Client` mode enabled, while also having `provideClientHydration()` function in provider list at bootstrap. As a result, there was a false-positive warning in a console, notifying developers about hydration misconfiguration.

This commit adds extra logic to handle this situation and avoid such warnings.

Note: there is a change required on the CLI side to add an extra marker, which would activate the logic added in this commit.

PR Close #58004
2024-10-02 11:45:28 +00:00
Suat Oğulcan Özcan
a31721a5c7 docs: remove whitespace (#58042)
PR Close #58042
2024-10-02 11:26:27 +00:00
Paul Gschwendtner
b6bc93803c feat(migrations): add schematic to migrate to signal queries (#58032)
This commit adds an automated `ng generate` schematic/migration for
converting decorator queries to signal queries, as good as possible.

PR Close #58032
2024-10-02 11:25:39 +00:00
Paul Gschwendtner
c8c35d2c69 refactor(migrations): print stats of signal input migration (#58035)
Print some stats for the signal input migration.

PR Close #58035
2024-10-02 11:23:35 +00:00
Paul Gschwendtner
00a79d0ee2 refactor(migrations): properly migrate inputs marked as optional via question mark (#58031)
Currently if inputs are marked as optional via the question mark syntax,
we add `undefined` only if there is an explicit type. This is wrong as
we should do the same if there is just an initializer.

This commit fixes this.

PR Close #58031
2024-10-01 16:34:54 +00:00
Matthieu Riegler
fb321966aa build: Add LICENSE file to the generated packages (#58033)
This commit adds a parameter to `ng_package` to specify a license file that will be bundled with the generated packages.

fixes #58029

PR Close #58033
2024-10-01 16:34:27 +00:00