Commit graph

33207 commits

Author SHA1 Message Date
Paul Gschwendtner
8ead19fe00 build: migrate all ts_library in packages/core/test (#61472)
This commit migrates all `ts_library` in `package/core/test` to
`ts_project`, and fixes deep module, or relative imports inside.

PR Close #61472
2025-05-20 10:00:43 +00:00
Paul Gschwendtner
3a106a35bc build: move private testing helpers outside platform-browser/testing (#61472)
These helpers are often imported by various tests throughout the
repository, but the helpers aren't exported/exposed from the public
entry-point; even though they confusingly reside in there.

This commit fixes this, and moves the helpers into
`packages/private/testing`. This is a preparation for the `ts_project`
migration where we don't want to leverage deep imports between packages.

PR Close #61472
2025-05-20 10:00:43 +00:00
Milo
fc14ca5e34 refactor(devtools): switch default font to material symbols (#61281)
update from Material Icons to Material Symbols, and use the local
font copy instead of Google fonts to avoid version mismatches

PR Close #61281
2025-05-20 08:53:51 +00:00
hawkgs
f5c67f1cde refactor(devtools): introduce responsive-split directive (#61204)
The `ResponsiveSplitDirective` adds responsive behavior to the `as-split` component by a provided width to height ratio.

PR Close #61204
2025-05-20 08:51:59 +00:00
mgechev
1749ee68e3 docs: add update instructions for v20 (#61338)
PR Close #61338
2025-05-20 08:51:19 +00:00
Andrew Scott
f182886ce5 refactor(core): Disallow autoDetectChanges(false) in zoneless (#61430)
This removes the ability to use `autoDetectChanges(false)` when
`provideZonelessChangeDetection` is used.

PR Close #61430
2025-05-20 08:49:06 +00:00
Joey Perrott
ef0f1a4ca8 build: move ts_project and ng_project for adev into a macro (#61319)
Move ts_project and ng_project into a macro for adev/ instead of providing a custom
tsconfig on every target

PR Close #61319
2025-05-20 08:48:29 +00:00
Joey Perrott
8ef41f3e14 build: migrate adev to use ng_project (#61319)
Move all of adev to use ng_project instead of ng_module

PR Close #61319
2025-05-20 08:48:29 +00:00
Joey Perrott
abdfbefe74 build: use an unstamped version of compiler-cli for running the angular compiler in ng_project (#61479)
Use an unstamped version of the compiler when it runs in `ng_project` as it will get stamped appropriately
whenever the generated code gets stamped after its usage."

PR Close #61479
2025-05-20 08:46:34 +00:00
Joey Perrott
447b2a3690 build: migrate animations to use rules_js based toolchain (#61479)
Migrate animations to use `ts_project` and `ng_project`

PR Close #61479
2025-05-20 08:46:33 +00:00
Joey Perrott
1818a84209 build: migrate benchpress to use rules_js (#61486)
Use ts_project to build targets in benchpress package

PR Close #61486
2025-05-20 08:44:53 +00:00
Alan Agius
da6aceef18 ci: clean untracked files before running postUpgradeTasks (#61494)
Not sure what changed overnight, but Renovate is now committing .npmrc files that we didn't generate.
Example: https://github.com/angular/angular/pull/61492/files

We should revisit this once we transition away from Yarn.

PR Close #61494
2025-05-20 08:44:03 +00:00
Miles Malerba
b77042a554 docs: point cdk drag-drop doc links to adev api pages (#61437)
Now that the drag and drop API pages are on adev we can link to those
instead of external linking to material.angular.io

PR Close #61437
2025-05-19 16:04:07 +00:00
Pawel Kozlowski
feb571ceaa refactor(core): expose enableProfiling() on from @angular/core (#61465)
This commit exposes the experimental enableProfiling() API that
enables Angular integration with the Chrome DevTools performance
panel. Previously this integration was exposed on the ng. namespace
only but there are legitimate cases where developers might want to
expose the integration earlier (ex.: bootstrap profiling).

PR Close #61465
2025-05-19 14:22:34 +00:00
Pawel Kozlowski
2b3c89dba2 refactor(core): re-introduce TestBed.flushEffects()" (#61462)
Our intention was to remove TestBed.flushEffects() in Angular v20
as it was a developer preview API that doesn't need to follow our
deprecation policy. It turned out, though, that the angular.dev
documentation wasn't displaying the @developerPreview annotation
properly so some of the developers might have been unaware of the
non-stable nature of this API.

This commits re-introduces the TestBed.flushEffects() API. This
API call will delegate to TestBed.tick().

PR Close #61462
2025-05-19 13:26:52 +00:00
Paul Gschwendtner
1e86aa7871 build: --config=debug should not disable sandbox for all actions (#61468)
Instead of disabling sandbox/workers for every action; which also could
slow-down development turnaround significantly, the flag should only
disable sandboxing for the test actions; allowing for e.g. DevTools to
connect to them, even if they are inside the sandbox.

Arguably, this strategy isn't seemingly necessary in all environments,
but given that we enable network sandboxing in this repo, it seems
reasonable. Ideally we'd also expose `_debug` targets for e.g. Node
tests that have the proper no-sandbox, or requires-network tag.

PR Close #61468
2025-05-19 12:36:43 +00:00
Angular Robot
a6b8b2ccd4 build: update cross-repo angular dependencies (#61464)
See associated pull request for more information.

PR Close #61464
2025-05-19 12:04:34 +00:00
Alan Agius
1a81682f29 ci: replace yarn ng-dev misc update-generated-files with separate update commands for specific targets (#61467)
Currently, `yarn ng-dev misc update-generated-files` attempts to update 67 targets, but only 4 actually require updating. Running the full script causes Renovate to slow down significantly, adding around 7 minutes to the process. By replacing it with individual update commands for just the necessary targets, we improve performance and reduce Renovate’s runtime considerably.

PR Close #61467
2025-05-19 11:21:26 +00:00
Paul Gschwendtner
b148e272f6 refactor(migrations): gracefully proceed if reference cannot be resolved (#61426)
A runtime error can surface when TypeScript internally fails to resolve
a reference that is named similar to an input, but no `.d.ts` is
available for it.

See example error:
https://github.com/microsoft/TypeScript/issues/61473#issuecomment-2746537781.

PR Close #61426
2025-05-19 11:04:52 +00:00
Angular Robot
10c2ab2a4a build: lock file maintenance (#61456)
See associated pull request for more information.

PR Close #61456
2025-05-19 11:03:53 +00:00
Angular Robot
24ae05f3f8 build: update all non-major dependencies (#61458)
See associated pull request for more information.

PR Close #61458
2025-05-19 09:53:46 +00:00
Kristiyan Kostadinov
7a308ccc3b refactor(core): consolidate logic to determine whether node can be hydrated (#61409)
Several instructions were repeating the logic that checks if a specific can be hydrated. These changes move it into a common location.

PR Close #61409
2025-05-19 09:30:20 +00:00
Kristiyan Kostadinov
6783fb7eae refactor(core): consolidate element end instruction logic (#61409)
There was some identical logic between the `elementEnd` and `elementContainerEnd` instructions. These changes consolidate it.

PR Close #61409
2025-05-19 09:30:20 +00:00
Kristiyan Kostadinov
049fe82de6 refactor(core): consolidate element start logic (#61409)
The logic for the `elementStart` and `elementContainerStart` instructions was identical. These changes consolidate it into a single base instruction.

PR Close #61409
2025-05-19 09:30:20 +00:00
Kristiyan Kostadinov
d216ffedbd refactor(core): consolidate first create pass (#61409)
The first create pass for elements and containers was identical. These changes consolidate it to reduce code duplication.

PR Close #61409
2025-05-19 09:30:20 +00:00
Kristiyan Kostadinov
b785256b9e perf(core): avoid intermediate arrays in definition (#61445)
A minor performance improvement for `ɵɵdefineComponent` where the underlying `extractDefListOrFactory` call had a chain of `.map.filter` which meant that we were unnecessarily creating intermediate arrays just to filter out the null values. These changes switch to simple `for` loop to get around it.

PR Close #61445
2025-05-19 09:20:07 +00:00
Alan Agius
cf8c853523 build: remove @types/diff (#61447)
The latest diff package includes the TS types.

PR Close #61447
2025-05-19 09:17:47 +00:00
Andrew Scott
bdbf616a4e refactor(core): Deprecate fixture.autoDetectChanges(true/false) (#61429)
After nearly a decade of existence, there are 0 uses of
`autoDetectChanges(false)` internally. All uses of
`autoDetectChanges(true)` can be migrated directly to
`autoDetectChanges()` instead.

PR Close #61429
2025-05-19 08:31:37 +00:00
Jonathan Meier
77fa204ad1 fix(compiler-cli): rename flag for enabling fast type declaration emission (#61353)
Rename the flag `_geminiAllowEmitDeclarationOnly` to
`_experimentalAllowEmitDeclarationOnly` as a follow-up on a comment in
PR #61334.

PR Close #61353
2025-05-19 08:27:43 +00:00
arturovt
7aae854f5e refactor(animations): mark non-default new expressions as pure (#61452)
Adds `__PURE__` annotations to non-default `new` expressions to enable tree-shaking, even if they are not referenced. These variables are not dropped when Angular is imported from a module that has `sideEffects` set to `true`.

PR Close #61452
2025-05-19 08:26:56 +00:00
Pawel Kozlowski
69984ef55d refactor(core): move the data store operation out of instructions (#61425)
The view data store operation is not an instruction and shouldn't be
located in the instructions folder.

PR Close #61425
2025-05-19 08:24:45 +00:00
Pawel Kozlowski
bf99954390 refactor(core): move i18n logic into its dedicated package (#61425)
Move the i18n-related logic out of the instructions folder into
the i18n-dedicated folder / package.

PR Close #61425
2025-05-19 08:24:45 +00:00
Kristiyan Kostadinov
7fa3203ee7 refactor(compiler): account for pipes without names (#61328)
Updates the compiler logic to account for pipe definitions that may not have names.

PR Close #61328
2025-05-19 08:24:06 +00:00
Ben Hong
6938d6fb15 docs: add intro to new ssr guide and refactor information architecture (#61377)
PR Close #61377
2025-05-19 08:18:48 +00:00
Angular Robot
41be5ee17e build: update dependency google-closure-compiler to v20250514 (#61439)
See associated pull request for more information.

PR Close #61439
2025-05-19 08:07:48 +00:00
Angular Robot
7ac3643a14 build: update cross-repo angular dependencies (#61435)
See associated pull request for more information.

PR Close #61435
2025-05-19 08:05:40 +00:00
Matthieu Riegler
174893b7e3 docs: replace references to platform-brower-dynamic with platform-brower (#61428)
PR Close #61428
2025-05-19 08:04:51 +00:00
Matthieu Riegler
13e3966584 docs(docs-infra): only show clear button of textfield when there is a text (#61427)
PR Close #61427
2025-05-16 15:57:35 +00:00
Paul Gschwendtner
e4d2347d66 Revert "fix(migrations): avoid applying the same replacements twice when cleaning up unused imports (#59656)" (#61421)
This reverts commit d66881d172.

PR Close #61421
2025-05-16 15:56:44 +00:00
Paul Gschwendtner
ca233446f0 refactor: clean-up deduplication workaround from migrations (#61421)
Since the duplication root-cause was solved by the previous commit, we
can revert/drop the logic that was added back then to overcome this
problem with Tsurge.

PR Close #61421
2025-05-16 15:56:44 +00:00
Paul Gschwendtner
4a3d39cd5a refactor: ensure tsurge migrations have clear ownership of files (#61421)
Currently there can be cases, exlusively in 3P, where multiple tsconfig
projects have overlap of source files. This is the default setup of new
CLI applications as well.

When this is the case, Tsurge will treat each tsconfig as an isolated
compilation unit (given the concepts and mental model to support
scalable batching). This is wrong though, and the same `.ts` source file
can appear in two migration invocations; resulting in duplicate
replacements or analysis (depending on the migration).

We've worked around this problem in the past by deduplicating
replacements, or migrating to an ID-based approach with natural
deduplication. This worked, but it's just working around the root cause.

This commit attempts to fix the root cause by adjusting Tsurge to ensure
that no source file ever appears in two compilation units. This is
naively achieved by not adding a source file to a migration unit, if it
was part of a previous one. This is expected to be fine given the nature
of Tsurge migrations that are built to operate on isolated pieces
anyway— so it shouldn't be problematic if e.g. `app.component.ts` ends
up being part of the test tsconfig compilation unit (we avoid this order
though by visiting build targets first).

PR Close #61421
2025-05-16 15:56:44 +00:00
Matthieu Riegler
693006e219 docs(docs-infra): llms-full.txt (#61356)
This includes a basic script to generate the file from the list of markdown files `llms-list.md`

PR Close #61356
2025-05-16 14:38:02 +00:00
Angular Robot
c335dcd04c build: update cross-repo angular dependencies (#61415)
See associated pull request for more information.

Closes #61400 as a pr takeover

PR Close #61415
2025-05-16 14:30:35 +00:00
Kristiyan Kostadinov
35a40cbec1 build: fix golden approval script (#61407)
Fixes the `update_all_goldens` script which was throwing, because the query command was also capturing the call into yarn and Bazel which in turn caused it to throw an error. I've also added some validation for the number of targets.

PR Close #61407
2025-05-16 13:59:10 +00:00
Kristiyan Kostadinov
92cbd7a412 build: fix symbol extractor script (#61407)
* Fixes that the symbol extractor approval script was broken after some recent build changes.
* Fixes the `run_all_symbol_extractor_tests` script which wasn't resolving any targets, because the rule name changed.

PR Close #61407
2025-05-16 13:59:09 +00:00
Matthieu Riegler
ca700e1def docs(docs-infra): Improve formatting of functions (#61154)
The commit introduce prettier to format some API entries.
For now we'll do only functions are other are a bit more complex because of the support of deprecation.

fixes #59211

PR Close #61154
2025-05-16 13:58:35 +00:00
Paul Gschwendtner
dce497806a build: update dev-infra for latest RBE changes (#61408)
Updates dev-infra for the latest RBE changes.

PR Close #61408
2025-05-16 13:25:34 +00:00
Angular Robot
f1abf3c2a1 build: update github/codeql-action action to v3.28.18 (#61403)
See associated pull request for more information.

PR Close #61403
2025-05-16 11:06:10 +00:00
Paul Gschwendtner
b763059bdd build: migrate packages/core/schematics to ts_project (#61370)
Migrates `packages/core/schematics` to `ts_project`. As part of this,
this commit cleans up some of the mixed module types and tsconfigs in
the folder. A single tsconfig (and it's test variant) are now used.

For the shipped schematics, we explicitly use the `.cjs` extension, so
that the bundles are properly recognized as CommonJS; even if they are
part of the `type: module` `@angular/core` package.

The `package.json` with `type: commonjs` is removed from
`packages/core/schematics` as it's no longer needed given the explicit
extension & caused issues as schematics are compiled with ESM but are
only later bundled for shipping & some tests as ESM.

PR Close #61370
2025-05-16 11:02:07 +00:00
Paul Gschwendtner
8cd0e3f24c build: update legacy ESM interop rules to support explicit .js entrypoints (#61370)
As we migrate more and more code to `ts_project`, we are ending up with
`.js` file extensions (ts_library did generate `.mjs` magically).

Since we don't want to get into the business of migrating
`nodejs_binary` targets at this point (in some cases we might)— we
should support pointing to such files.

PR Close #61370
2025-05-16 11:02:07 +00:00