Compare commits

...

607 Commits

Author SHA1 Message Date
Andrew Scott cb1b1675c7 release: cut the v19.2.14 release 2025-05-28 06:32:02 -07:00
Kristiyan Kostadinov 73d3e001d2 build: fix failing test (#61683)
Fixes a failing test in the unused imports migration.

PR Close #61683
2025-05-26 11:57:31 +00:00
Joey Perrott 6fea9c88cc build: migrate examples to use rules_js (#61652)
Migrate examples to use ng_project and ts_project for building

PR Close #61652
2025-05-26 11:01:31 +00:00
Kristiyan Kostadinov 9e1cd49662 fix(migrations): preserve comments when removing unused imports (#61674)
Updates the unused imports schematic to preserve comments inside the array. THis is necessary for some internal use cases.

PR Close #61674
2025-05-26 10:26:21 +00:00
Matthieu Riegler 24bab55f0c fix(compiler): lexer support for template literals in object literals (#61601)
This commit fixes a shortcoming of the lexer with template literals

fixes #61572

PR Close #61601
2025-05-26 10:24:17 +00:00
Joey Perrott 12e2302a04 build: update common's locales to use rules_js (#61630)
Use ts_project to build the common locales

PR Close #61630
2025-05-26 10:18:48 +00:00
Joey Perrott 61c731a21b build: update tools directory to use rules_js for building (#61658)
Use ts_project for building the tools directory targets

PR Close #61658
2025-05-26 09:58:38 +00:00
Jonathan Meier 6957808bbb refactor(compiler-cli): remove hardcoded config for unused standalone imports rule enablement (#61622)
The hardcoded config was introduced because suppressing the diagnostic
via `extendedDiagnostics` in the TS config was unreliable in google3.
This has since been fixed and the workaround is no longer needed.

PR Close #61622
2025-05-26 09:20:27 +00:00
Alan Agius c40b010347 ci: remove sync angular-robot forked repository workflow (#61675)
Renovate now supports syncing of non-default base branches, making this workflow obsolete.

PR Close #61675
2025-05-26 09:18:31 +00:00
Alan Agius 428f3c4706 build: disable esbuild metadata file generation (#61636)
Disables creation of the esbuild meta.json file, which is not utilized in the build process. This streamlines the output and avoids generating unused artifacts.

PR Close #61636
2025-05-26 08:57:43 +00:00
Alan Agius e818a009a1 build: exclude esbuild metadata files from distributable packages (#61636)
Prevents esbuild generated metadata files from being included in build artifacts. This reduces package size and avoids shipping unnecessary internal build data.

PR Close #61636
2025-05-26 08:57:43 +00:00
Andrew Scott 9701047b9f test(common): Add circular deps test to 19.2.x (#61651)
adds circular deps test for http client to 19.2.x branch

PR Close #61651
2025-05-23 11:48:32 -07:00
Andrew Scott 517cde4e4f release: cut the v19.2.13 release 2025-05-23 10:22:48 -07:00
Andrew Scott 2c876b4fc5 fix(common): avoid injecting ApplicationRef in FetchBackend (#61649)
fixes a circular dependency caused by injecting applicationRef

fixes #61644

PR Close #61649
2025-05-23 10:04:10 -07:00
Joey Perrott a6d5479cc7 build: migrate platform-server to rules_js (#61619)
Migrate platform-server to use ts_project and ng_project.

PR Close #61619
2025-05-22 15:34:07 -07:00
Joey Perrott 2a26944974 build: migrate platform-browser and platform-browser-dynamic package to use rules_js (#61624)
Use ts_project and ng_project to build platform-browser and platform-browser-dynamic package

PR Close #61624
2025-05-22 15:32:58 -07:00
Andrew Scott e38cc41cc4 release: cut the zone.js-0.15.1 release (#61632)
PR Close #61632
2025-05-22 14:53:18 -07:00
Joey Perrott d4d4be80a5 build: migrate localize package to use rules_js (#61615)
Use ts_project to build localize package

PR Close #61615
2025-05-22 13:45:27 -07:00
Matthieu Riegler 2ae69f77e7 refactor: ensure tsurge migrations have clear ownership of files (#61612)
This is a patch port of #61421

PR Close #61612
2025-05-22 11:43:48 -07:00
Paul Gschwendtner c101a3aa7d refactor: clean-up deduplication workaround from migrations (#61421) (#61612)
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

PR Close #61612
2025-05-22 11:43:48 -07:00
Paul Gschwendtner 1a811c9f9d refactor: ensure tsurge migrations have clear ownership of files (#61421) (#61612)
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

PR Close #61612
2025-05-22 11:43:48 -07:00
Doug Parker 0a51f36d8e release: bump Angular DevTools to version 1.0.32 (#61620)
PR Close #61620
2025-05-22 10:52:18 -07:00
arturovt b15bddfa04 fix(service-worker): do not register service worker if app is destroyed before it is ready to register (#61101)
In this commit, we check whether the application is destroyed before calling `serviceWorker.register(...)`. We should not register the worker because other resources will not be available.

PR Close #61101
2025-05-22 10:02:40 -07:00
Andrew Scott 5f1bd07296 fix(zone.js): classes that extend Error should retain cause property (#61599)
ZoneAwareError previously did not copy the cause property over to the
`this` object when an error extends the native error class.

PR Close #61599
2025-05-21 20:43:10 -07:00
Hakeem 2f5912e80a docs(docs-infra): fix nav items active status is shown for multiple items (#61597)
PR Close #61597
2025-05-21 16:04:27 -07:00
Andrew Scott ac76549d07 release: cut the v19.2.12 release 2025-05-21 12:49:04 -07:00
Joey Perrott b6d7b4bc7b build: remove the "restamping" substitutions from adev shared-docs package (#61585)
Remove the substitutions as they are not actually needed

PR Close #61585
2025-05-21 17:37:53 +00:00
Joey Perrott 6f6e91d52d build: add comment explaining path maps (#61584)
Add a commend explaning why the path mappings are in place.

PR Close #61584
2025-05-21 17:27:19 +00:00
Joey Perrott 3a8bbe990e build: migrate language service to use rules_js (#61578)
Migrate language service to build using ts_project

PR Close #61578
2025-05-21 17:06:33 +00:00
marktechson ec60501ede docs: add new ai setcion to adev (#61583)
This new sections outlines guides, code samples and best practices for building AI apps with Angular.

PR Close #61583
2025-05-21 17:04:16 +00:00
Paul Gschwendtner fc2483e7e9 refactor(compiler): avoid duplication between FactoryTarget type (#61571)
Avoids duplication of the `FactoryTarget` enums. This is necessary
now because we are exposing the previously deeply-imported JIT facade
now via the exports; and the typing integration tests surface a type
conflict due to the different duplicated enums.

PR Close #61571
2025-05-21 16:04:42 +00:00
Paul Gschwendtner 3fcd10912d build: migrate all ng_module in packages/core/test (#61571)
Migrates all `ng_module` to `ng_project` in `packages/core/test/`.

PR Close #61571
2025-05-21 16:04:42 +00:00
Paul Gschwendtner 2ccce30f9e build: migrate all ts_library in packages/core/test (#61571)
This commit migrates all `ts_library` in `package/core/test` to
`ts_project`, and fixes deep module, or relative imports inside.

PR Close #61571
2025-05-21 16:04:42 +00:00
Paul Gschwendtner 8e54b5773f build: move private testing helpers outside platform-browser/testing (#61571)
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 #61571
2025-05-21 16:04:42 +00:00
hirowf 21e5f0723d docs: include bun in packageManager value types (#60907)
PR Close #60907
2025-05-21 15:19:39 +00:00
arturovt 2b1b14f4d3 fix(core): cleanup rxResource abort listener (#58306)
The observable terminates immediately when `error` is called, and no further emissions or completion notifications occur. Thus, we have to remove the `abort` listener in both the `error` and `complete` notifications.

PR Close #58306
2025-05-21 15:17:24 +00:00
arturovt 126efc9972 fix(common): cancel reader when app is destroyed (#61528)
Streams left in a pending state (due to `break` without cancel) may continue consuming or holding onto data behind the scenes. Calling `reader.cancel()` allows the browser or the underlying system to release any network or memory resources associated with the stream.

PR Close #61528
2025-05-21 15:07:19 +00:00
Charles Lyding c78e75d117 docs: add a short redirect for HMR information (#61545) (#61569)
The `https://angular.dev/hmr` URL will now redirect
to the HMR information at the longer URL:
https://angular.dev/tools/cli/build-system-migration#hot-module-replacement
This shorter URL will be used within console messages within the Angular CLI.

(cherry picked from commit 7adbb9c693)

PR Close #61569
2025-05-21 13:43:31 +00:00
PandaByte 3983e5b3e1 docs: fix capitalization error (#61554)
PR Close #61554
2025-05-21 13:42:36 +00:00
Kristiyan Kostadinov 44bb328eae fix(compiler): avoid conflicts between HMR code and local symbols (#61550)
Currently we construct the HMR replacement URL inline by calling into the native `URL` constructor. This can cause conflicts with user code that defines a symbol called `URL`.

These changes resolve the issue by moving the URL construction into a separate function. This has a secondary benefit of making the generated code easier to follow and allowing us to update the URL without changing the compiled code.

Fixes #61517.

PR Close #61550
2025-05-21 12:25:27 +00:00
arturovt 8f9b05eaaa fix(core): cleanup testability subscriptions (#61261)
This commit prevents leaking memory when the application is destroyed and subscriptions are still alive.

PR Close #61261
2025-05-21 12:06:24 +00:00
Jessica Janiuk 0104a69cb8 ci: temporarily disable saucelabs for push jobs (#61559)
This also disables saucelabs for the CI (push) jobs.

PR Close #61559
2025-05-21 11:14:42 +00:00
Jessica Janiuk e4943c6b81 ci: temporarily disable saucelabs (#61556)
Saucelabs is having connection issues

PR Close #61556
2025-05-21 09:59:12 +00:00
Joey Perrott 72b80f9a87 build: migrate router to use rules_js (#61544)
Use ts_project and ng_project for building router

PR Close #61544
2025-05-21 09:55:22 +00:00
Ahmed Hakeem 27f8d3fa16 docs(docs-infra): modify bazel config to include shared docs global styles (#61384)
PR Close #61384
2025-05-21 09:51:48 +00:00
Hakeem 308892eeeb docs(docs-infra): fix docs pages overflow when specific example-viewer exists (#61384)
enforce content to be fluid until a specific max width, and rollback breakpoints to be applied when 1430px is the current win size
as widths between 1430px and 1431px will be broken

PR Close #61384
2025-05-21 09:51:48 +00:00
Joey Perrott 1007079aee build: update compiler-cli to not be stamped when used for the compiler in ng_project (#61539)
The compiler-cli package needs to be unstamped and will the resulting generated code will be stamped as expected.

PR Close #61539
2025-05-21 09:14:35 +00:00
Joey Perrott eac42293cf build: migrate forms to rules_js (#61539)
Migrate forms to use ng_project and ts_project

PR Close #61539
2025-05-21 09:14:35 +00:00
Andrew Scott 107180260f fix(compiler-cli): Always retain prior results for all files (#61487)
This change ensures that prior results for all files are retained even when
a request is made such that we only need a shim for a single file. Prior
to this change, any prior results that were not part of the request were discarded.

PR Close #61487
2025-05-21 08:56:54 +00:00
Charles Lyding 9ce79beb1d docs: update v17 as EOL for current documentation (#61532)
The versioning reference documentation now shows that
Angular v17 has reached EOL and is no longer supported.

PR Close #61532
2025-05-20 20:06:11 +00:00
Alan Agius e6173c3b55 ci: change action: review to action: merge in update docs (#61533)
Simplifies the workflow by reducing the number of required actions for the caretaker or reviewer, similar to Renovate PRs.

PR Close #61533
2025-05-20 20:04:21 +00:00
Matthieu Riegler bb31f6f211 docs(docs-infra): display CLI enum values for enums (#61521)
fixes #61516

PR Close #61521
2025-05-20 16:54:13 +00:00
Joey Perrott d65cfde3fa build: migrate angular-in-memory-web-api to use rules_js (#61524)
Use ts_project and ng_project for building angular-in-memory-web-api

PR Close #61524
2025-05-20 16:53:21 +00:00
arturovt efda872453 fix(common): prevent reading chunks if app is destroyed (#61354)
Prevents processing response chunks after the application has been destroyed.

PR Close #61354
2025-05-20 15:09:45 +00:00
Joey Perrott c43fd3a39c build: migrate common to use rules_js based toolchain (#61434)
Migrate packages/common to use ts_project and ng_project.

PR Close #61434
2025-05-20 15:08:43 +00:00
Matthieu Riegler c0c69a5abc fix(core): unregister onDestroy in toSignal. (#61514)
We cleanup if the observable completes before the onDestroy fires.

fixes #61511

PR Close #61514
2025-05-20 14:43:32 +00:00
Joey Perrott af19705876 docs(docs-infra): fix substitution regex (#61344)
It was replacing `rgba(0,0,0,0)` with `rgba(99.99.99, 0)`

PR Close #61344
2025-05-20 14:26:04 +00:00
Joey Perrott af19d98582 build: move ts_project and ng_project for adev into a macro (#61344)
Move ts_project and ng_project into a macro for adev/ instead of providing a custom
tsconfig on every target

PR Close #61344
2025-05-20 14:26:04 +00:00
Joey Perrott 88d6c43107 build: migrate adev to use ng_project (#61344)
Move all of adev to use ng_project instead of ng_module

PR Close #61344
2025-05-20 14:26:03 +00:00
Jens Kuehlers b641107cf0 docs: replace material.a.io with material.a.dev (#61513)
PR Close #61513
2025-05-20 13:40:44 +00:00
Matthieu Riegler f6b4f72518 Revert "test: replace platform-browser-dynamic with platform-browser (#61495)" (#61510)
This reverts commit 4430423f38.

PR Close #61510
2025-05-20 12:40:27 +00:00
Matthieu Riegler 4430423f38 test: replace platform-browser-dynamic with platform-browser (#61495)
The former isn't needed anymore and is now deprecated.

PR Close #61495
2025-05-20 10:01:35 +00:00
Milo dbd66ec46b 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:52 +00:00
Joey Perrott 71989056d8 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:35 +00:00
Joey Perrott 7f26df1608 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:35 +00:00
Joey Perrott 40534d7de1 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:55 +00:00
Miles Malerba 1360e4b584 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:08 +00:00
Paul Gschwendtner 0a25abaa90 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:45 +00:00
Paul Gschwendtner bd2b454faf 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:54 +00:00
arturovt 9aedd30983 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:57 +00:00
Pawel Kozlowski c856f43b5f 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:47 +00:00
Pawel Kozlowski 1a3351c4f5 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:47 +00:00
Matthieu Riegler 7d0db3d247 docs(docs-infra): only show clear button of textfield when there is a text (#61427)
PR Close #61427
2025-05-16 15:57:36 +00:00
Paul Gschwendtner 185b7801ee build: migrate packages/core/schematics to ts_project (#61420)
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 #61420
2025-05-16 15:53:27 +00:00
Paul Gschwendtner f07ef545a7 build: update legacy ESM interop rules to support explicit .js entrypoints (#61420)
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 #61420
2025-05-16 15:53:27 +00:00
Paul Gschwendtner e056fa13df build: migrate more targets of @angular/core to ts_project (#61420)
Migrates more targets of `@angular/core` to `ts_project`. Remaining are:

 - tests
 - schematics

PR Close #61420
2025-05-16 15:53:27 +00:00
Matthieu Riegler 74e39ea96a 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:04 +00:00
Matthieu Riegler aa4293871d docs: fix textfield CVA (#61411)
patch backport of #61300

PR Close #61411
2025-05-16 14:35:55 +00:00
Kristiyan Kostadinov fd29dab218 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:11 +00:00
Kristiyan Kostadinov af6c652464 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:11 +00:00
Paul Gschwendtner 2da8e42e8b build: update dev-infra for latest RBE changes (#61413)
Updates dev-infra for the latest RBE changes.

PR Close #61413
2025-05-16 13:56:57 +00:00
Vlad Boisa b2ade23282 docs: fix typos (#61257)
Change grammar and fix typos in docs

Fixes #61244

PR Close #61257
2025-05-16 10:20:36 +00:00
Matthieu Riegler db815e98ac docs: fix note formatting about optionam chaining (#61251)
PR Close #61251
2025-05-16 10:09:36 +00:00
Vlad Boisa 57df36127e docs: fix incomplete sentence (#61391)
Fix insufficient sentence.


Fixes #61350
PR Close #61391
2025-05-16 09:35:45 +00:00
Matthieu Riegler 85e0baf081 docs: fix Routed components example (#61278)
fixes #61277

PR Close #61278
2025-05-16 09:14:40 +00:00
Kristiyan Kostadinov 8edafd0559 perf(platform-server): speed up resolution of base (#61392)
The `getBaseHref` method is called several times per request and currently queries through the entire document. We can speed it up by taking advantage of the fact that the `<base>` can only be a direct child of the `<head>` and is usually defined towards the beginning. Below are some benchmarks for a "Hello world" app before and after this change.

### Before:
```
Running 60s test @ http://localhost:4202
100 connections with 10 pipelining factor

┌─────────┬────────┬────────┬────────┬────────┬───────────┬──────────┬─────────┐
│ Stat    │ 2.5%   │ 50%    │ 97.5%  │ 99%    │ Avg       │ Stdev    │ Max     │
├─────────┼────────┼────────┼────────┼────────┼───────────┼──────────┼─────────┤
│ Latency │ 568 ms │ 853 ms │ 901 ms │ 904 ms │ 866.58 ms │ 437.6 ms │ 9915 ms │
└─────────┴────────┴────────┴────────┴────────┴───────────┴──────────┴─────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%   │ Avg     │ Stdev   │ Min     │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec   │ 490     │ 826     │ 1,006   │ 1,643   │ 1,129.3 │ 234.69  │ 490     │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 10.4 MB │ 17.4 MB │ 21.3 MB │ 34.7 MB │ 23.9 MB │ 4.96 MB │ 10.3 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘

Req/Bytes counts sampled once per second.
# of samples: 60

69k requests in 60.04s, 1.43 GB read
90 errors (90 timeouts)
```

### After

```
Running 60s test @ http://localhost:4202
100 connections with 10 pipelining factor

┌─────────┬────────┬────────┬────────┬─────────┬───────────┬───────────┬─────────┐
│ Stat    │ 2.5%   │ 50%    │ 97.5%  │ 99%     │ Avg       │ Stdev     │ Max     │
├─────────┼────────┼────────┼────────┼─────────┼───────────┼───────────┼─────────┤
│ Latency │ 471 ms │ 831 ms │ 889 ms │ 1668 ms │ 835.91 ms │ 467.89 ms │ 9720 ms │
└─────────┴────────┴────────┴────────┴─────────┴───────────┴───────────┴─────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬────────┬─────────┐
│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%   │ Avg      │ Stdev  │ Min     │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Req/Sec   │ 390     │ 860     │ 1,145   │ 1,572   │ 1,156.77 │ 222.65 │ 390     │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼────────┼─────────┤
│ Bytes/Sec │ 8.24 MB │ 18.2 MB │ 24.2 MB │ 33.2 MB │ 24.4 MB  │ 4.7 MB │ 8.24 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴────────┴─────────┘

Req/Bytes counts sampled once per second.
# of samples: 60

71k requests in 60.03s, 1.47 GB read
140 errors (140 timeouts)
```

PR Close #61392
2025-05-16 09:03:39 +00:00
Alan Agius 11589d4849 ci: streamline adev CDK APIs and CLI help workflows (#61396)
This commit implements several enhancements to the adev docs update workflow pipeline:

-   **Unify actions:** Merge the workflows into a single one.
-   **Optimize Git cloning:** Clone the repo with `--depth=0` only once per push instead of 2 times.
-   **Prevent concurrent runs:** Implement concurrency control to automatically cancel in-progress workflow runs for the same branch, ensuring only the latest commit is processed.

PR Close #61396
2025-05-16 08:44:01 +00:00
Andrew Scott 94f5a4b4d6 fix(core): Testing should not throw when Zone does not patch test FW APIs (#61376)
This prevents `core/testing` from throwing an error if ZoneJS is present
but does not patch the test FW APIs such that `fakeAsync` works
automatically. For example, there is currently no patching of the vitest
APIs, so if you try to use Vitest with Zone on the page, it will throw.

PR Close #61376
2025-05-16 07:53:41 +00:00
Jan Martin f1b51cef5f docs: call out the available variables in track expressions (#61252)
At least to me it was surprising that values from the surrounding
"lexical-ish" scope weren't available in `track <expr>`.

PR Close #61252
2025-05-16 07:51:11 +00:00
Angular Robot bd2a5b9729 docs: update Angular CDK apis [19.2.x] (#61347)
Updated Angular CDK api files.

PR Close #61347
2025-05-16 07:40:11 +00:00
Andrew Seguin 30fcd46b30 docs: make drag and drop examples preview (#59737)
PR Close #59737
2025-05-16 07:38:05 +00:00
Miles Malerba fdb86983c5 docs: fix embedded preview (#59737)
update the embeddable examples glob to captrue the drag & drop examples,
and fix the current build issues in the drag & drop examples

PR Close #59737
2025-05-16 07:38:04 +00:00
Andrew Seguin eaf2c6eb8e docs: add preview to an example to test (#59737)
PR Close #59737
2025-05-16 07:38:04 +00:00
Miles Malerba 27c55fe30c ci: fix build (#59737)
Deletes the BUILD.bazel in examples/drag-drop so the files can be
collected in examples/BUILD.bazel instead

PR Close #59737
2025-05-16 07:38:04 +00:00
Amy Sorto 740885f560 docs: add code examples for drag and drop guide (#59737)
# Conflicts:
#	adev/src/content/guide/BUILD.bazel

PR Close #59737
2025-05-16 07:38:04 +00:00
Amy Sorto f7c1da7616 docs: add drag and drop guide (#59737)
PR Close #59737
2025-05-16 07:38:04 +00:00
Will 保哥 2d3e1d3b12 docs: update Traditional Chinese footer link (#61280)
update Traditional Chinese footer link from angular.tw to dev.angular.tw to direct users to the new Traditional Chinese dev site.

PR Close #61280
2025-05-16 07:36:20 +00:00
Alan Agius 82e5449953 refactor: replace port 4206 usage with 4209 (#61362)
Port `4206` is used by other tests which causes this test to be flakey example https://github.com/angular/angular/actions/runs/15038891642/job/42265813534

PR Close #61362
2025-05-15 10:12:46 -07:00
Doug Parker e2b36c023b release: bump Angular DevTools version to 1.0.31 (#61355)
PR Close #61355
2025-05-15 10:10:55 -07:00
arturovt eb53bda470 fix(core): enable stashing only when withEventReplay() is invoked (#61352)
Patch version of https://github.com/angular/angular/pull/61077.

PR Close #61352
2025-05-15 10:10:04 -07:00
Matthieu Riegler dfed15fa49 docs: add llms.txt (#61285)
PR Close #61285
2025-05-15 10:09:14 -07:00
Charles Lyding 1191e62d70 fix(compiler-cli): avoid ECMAScript private field metadata emit (#61227)
The Angular class metadata emit structure does not support the use of
private fields. If the class metadata emit is enabled and an ECMAScript
private (i.e., `#` prefixed) member contains a decorator, the member will
now be excluded from the emitting `setClassMetadata` call. This prevents
runtime errors due to invalid syntax.

PR Close #61227
2025-05-15 09:45:06 -07:00
Doug Parker 378ba12cbc refactor(devtools): remove release process overview and add step to check for release (#60892)
The release process overview is out of date and does not accurately reflect section headers. It's not worth the maintenance effort of keeping it in sync with the rest of the doc.

Added a step 0 to check if there's actually anything to release, reusing the command from later in the doc.

Also makes a few random small corrections to reflect the new release process.

PR Close #60892
2025-05-15 09:42:55 -07:00
Alex Rickabaugh ae503b7282 release: cut the v19.2.11 release 2025-05-15 08:26:28 -07:00
Paul Gschwendtner f2d6e59857 refactor: explicitly ensure ngDevMode types are available (#61365)
This commit adds an import to the `ng_dev_mode.ts` file that augments
`global` to have types for `ngDevMode`.

Notably this change is currently not needed because the file is loaded
by `ts_library` through `tsconfig#files`— but in a separate PR we are
switching the target to `ts_project` which no longer loads all Bazel
dependency files via `tsconfig#files`; resulting in the ambient types no
longer magically being available.

PR Close #61365
2025-05-15 12:45:13 +00:00
Joey Perrott dfd068da9f build: use common macro to define tsconfig for service worker (#61341)
Define the tsconfig for service worker instead of manually including the tsconfig on each target

PR Close #61341
2025-05-14 10:43:26 -07:00
Joey Perrott a4e3c12965 build: migrate upgrade to use ng_project instead of ng_module (#61320)
Use ng_project instead of ng_module in @angular/upgrade

PR Close #61320
2025-05-14 09:34:29 -07:00
Matthieu Riegler 43dec766a1 refactor(devtools): fix button styling on the profiler frame selector (#61309)
Missing standalone import.

PR Close #61309
2025-05-14 09:27:15 -07:00
Olexandr88 91e06a90ca docs: delete discord badge from README file (#61308)
PR Close #61308
2025-05-14 09:24:40 -07:00
Joey Perrott 064acf6314 build: migrate service-worker to ng_project (#61318)
Migrate service worker to use ng_project instead of ng_module

PR Close #61318
2025-05-14 08:54:40 -07:00
Hakeem 75e267da1d docs(docs-infra): fix update page styles to adhere to the new layout (#61256)
PR Close #61256
2025-05-14 08:47:31 -07:00
Hakeem bf8d52b497 docs(docs-infra): fixating the position of the docs content whether TOC exists or not (#61256)
PR Close #61256
2025-05-14 08:47:31 -07:00
Hakeem 4325243224 docs(docs-infra): integrate the new layout with the new changes (#61256)
fix new global layout issues, and make other pages adhere to the new centered layout like cli ref page, cli ref details, api ref details pages

PR Close #61256
2025-05-14 08:47:31 -07:00
Paul Gschwendtner 3047638814 build: add script to diff packages and ensure no unexpected changes (#61336)
Adds a script to diff snapshot packages to allow for easy verification
that no unexpected changes were made.

PR Close #61336
2025-05-14 08:31:34 -07:00
Paul Gschwendtner 61fb2fff2a build: add modified version of tsec that can work with interop (#61336)
As we roll out more PRs that migrate to `ts_project`, we need to make
sure that we don't break existing `tsec` targets. This PR copies the
original `tsec` Starlark code and adjusts it to work with the interop.

Note that we don't patch as this would unnecessarily complicate this
file that only exists during migration. Long-term, after migration, we
either need to consider switching to the new ESLint plugin that is being
worked on (I'm in contact with the team), or we send a CL to update the
Tsec Starlark code to keep our changes minimal and avoid scope increase.

PR Close #61336
2025-05-14 08:31:33 -07:00
Paul Gschwendtner 831c8add0d build: fix ts_project interop to properly create linker mappings (#61336)
This commit fixes that the interop targets weren't properly creating
linker mappings in some cases. This could break spec bundling.

PR Close #61336
2025-05-14 08:31:33 -07:00
Paul Gschwendtner f3f0769ce7 refactor: update packages/core:{core,src} to ts_project (#61336)
Updates `packages/core:core` and `packages/core/src/...` to `ts_project`
of `rules_js`.

PR Close #61336
2025-05-14 08:31:33 -07:00
Paul Gschwendtner 0d025c5013 build: support new ng_project rule (#61336)
Supports the `ng_project` rule with the local compiler-cli version
from HEAD.

PR Close #61336
2025-05-14 08:31:33 -07:00
Jan Martin ac77e30c76 docs: document the use of this in template expression syntax (#61250)
As of Angular 19, `this` should consistently reference the given
class property.

See: https://github.com/angular/angular/pull/55183
Co-authored-by: Jeremy Elbourn <jelbourn@google.com>
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

PR Close #61250
2025-05-14 06:35:56 -07:00
Alan Agius 7440a16c34 build: bump domino to 93e720f143d0296dd2726ffbcf4fc12283363a7b (#61302)
Update domino to latest SHA.

PR Close #61302
2025-05-14 10:44:21 +00:00
cexbrayat 5ea32b5d23 refactor(core): remove leftover todos in integration tests (#61313)
The TODOs can be removed as the tests were fixed in 193bd7c54a

PR Close #61313
2025-05-14 10:16:15 +02:00
Miles Malerba 42f203e029 docs: rename @nodoc to @docs-private (#61196)
This aligns with how angular/components marks their hidden APIs.
`@nodoc` has been broken since the switch to adev, this change should
properly hide the APIs again.

PR Close #61196
2025-05-13 17:15:37 -07:00
Miles Malerba c92c34d490 docs: update references to the cdk/testing apis (#60853)
PR Close #60853
2025-05-13 16:32:37 -07:00
Miles Malerba 07e8c3ef5e docs: generate api pages for cdk (#60853)
Generates html for the cdk api pages based on the json files imported
from angular/cdk-builds

PR Close #60853
2025-05-13 16:32:37 -07:00
Paul Gschwendtner 899cb4ab49 refactor: add explicit types for exports relying on inferred call return type (#61316)
As part of the Bazel toolchain migration we noticed that implicit types
generated by the TypeScript compiler sometimes end up referencing types
from other packages (i.e. cross-package imports).

These imports currently work just because the Bazel `ts_library` and
`ng_module` rules automatically inserted a `<amd-module
name="@angular/x" />` into `.d.ts` of packages. This helped TS figure
out how to import a given file. Notably this is custom logic that is not
occuring in vanilla TS or Angular compilations—so we will drop this
magic as part of the toolchain cleanup!

To improve code quality and keep the existing behavior working, we are
doing the following:

- adding a lint rule that reduces the risk of such imports breaking. The
  failure scenario without the rule is that API goldens show unexpected
  diffs, and types might be duplicated in a different package!

- keeping the `<amd-module` headers, but we manually insert them into
  the package entry-points. This should ensure we don't regress
  anywhere; while we also improved general safety around this above.

Long-term, isolated declarations or a lint rule from eslint-typescript
can make this even more robust.

PR Close #61316
2025-05-13 22:46:00 +00:00
Kristiyan Kostadinov 7be6e5dc50 refactor(migrations): remove unused code (#61260)
The `waitForAsync` rule has been disabled internally which allows us to delete its code, as well as some unused adjacent code.

PR Close #61260
2025-05-12 15:34:08 -07:00
Joey Perrott 7dcae7b5e2 build: migrate service-worker package to use ts_project (#61226)
Migrate the package to using rules_js

PR Close #61226
2025-05-12 15:29:29 -07:00
Matthieu Riegler d1501bce5c docs(docs-infra): preselect search text on re-open (#61129)
PR Close #61129
2025-05-12 15:25:51 -07:00
Hakeem 223ca9f983 docs(docs-infra): limit the flexible width of the main content for better UX (#58831)
PR Close #58831
2025-05-09 10:24:15 -07:00
ahmadhakeem18 f9932e8b0d docs(docs-infra): fix the global layout of the site (#58831)
take the full width of the page for all the pages that use docs-viewer, also reserve an area for table of contents on-demand

Resolves: #52648

PR Close #58831
2025-05-09 10:24:15 -07:00
Joey Perrott f0dd8f8769 build: migrate upgrade package to use ts_project (#61245)
Migrate the package to using rules_js

PR Close #61245
2025-05-09 16:43:05 +00:00
Joey Perrott 84b66f3b04 build: migrate adev shared-docs package to use ts_project (#61217)
Migrate the build rules for shared docs to use ts_project

PR Close #61217
2025-05-09 16:32:06 +00:00
Paul Gschwendtner 6cd2df00ca build: remove unused debugging leftover from RBE investigation (#61237)
This log output doesn't provide any benefit anymore, so we can remove it.

PR Close #61237
2025-05-09 16:01:49 +00:00
Paul Gschwendtner 0e3d4546b9 build: migrate compiler-cli/src/ngtsc to ts_project (#61237)
Migrates all of `compiler-cli/src/ngtsc` to `ts_project`. This change
was generated using Gemini.

PR Close #61237
2025-05-09 16:01:49 +00:00
Paul Gschwendtner 623f5b79fb build: migrate manual_api_docs to rules_js (#61237)
Migrates `manual_api_docs` to `rules_js`. Since compiler CLI is ESM
compiled but doesn't have extensions, we can either bundle or simply use
the dependency as type only. This is easier and sufficient for this
use-case.

PR Close #61237
2025-05-09 16:01:49 +00:00
Paul Gschwendtner 27e4e5847f build: migrate compiler-cli/src/ngtsc/docs to ts_project (#61237)
Migrates `compiler-cli/src/ngtsc/docs` to `ts_project`.

PR Close #61237
2025-05-09 16:01:49 +00:00
Paul Gschwendtner 1bfd7bbd1c build: prepare for compiler-cli to be using ts_project (#61237)
Prepare the compiler-cli package for being ready for migration
to `ts_project`.

PR Close #61237
2025-05-09 16:01:49 +00:00
Joey Perrott a5002fd69a build: migrate adev devtools package to use ts_project (#61221)
Migrate usages to ts_project

PR Close #61221
2025-05-09 16:00:38 +00:00
Alan Agius 5f46be03b5 ci: update workflow to clone repo with history (#61223)
Tentative fix for:
```
Adding upstream remote: ***github.com/angular-robot/angular.git
origin	https://github.com/angular/angular (fetch)
origin	https://github.com/angular/angular (push)
upstream	***github.com/angular-robot/angular.git (fetch)
upstream	***github.com/angular-robot/angular.git (push)
Pushing 19.2.x from origin to angular-robot upstream...
To https://github.com/angular-robot/angular.git
 ! [rejected]        19.2.x -> 19.2.x (stale info)
error: failed to push some refs to 'https://github.com/angular-robot/angular.git'
```

PR Close #61223
2025-05-08 11:56:58 -07:00
Alan Agius 7820f4ed68 ci: use --force-with-lease when pushing to remote branch (#61222)
Tentative fix for:
```
! [rejected]        20.0.x -> 20.0.x (fetch first)
error: failed to push some refs to 'https://github.com/angular-robot/angular.git'
```

PR Close #61222
2025-05-08 11:33:46 -07:00
Tom Adler 5b60442f6d docs: update the description of example (#61205)
PR Close #61205
2025-05-08 09:57:01 -07:00
Vlad Boisa 684af21fc9 docs: swap the anchor to the correct one (#61200)
The anchor on the link - is not working, swap the anchor to the correct one
PR Close #61200
2025-05-08 09:43:32 -07:00
Miles Malerba f11ce1dd15 ci: fix typo in update-cdk-apis job and mark it for megre (#61195)
Updates the name which accidentally remained unchanged from when I
copied it from the CLI help script

Also marks the PR for merge immediately. The caretaker can sanity check
it, approve it, and merge it.

PR Close #61195
2025-05-08 09:42:52 -07:00
Tom Adler 3cbb60c6dc docs: update descriptions of examples (#61207)
PR Close #61207
2025-05-08 09:40:20 -07:00
Alan Agius 655954a8d5 ci: fix step name (#61213)
This fixes the name of the step which was previously incorrect

PR Close #61213
2025-05-08 09:27:04 -07:00
Paul Gschwendtner d37f5085e4 build: migrate symbol-extractor to ts_project (#61209)
Migrates the symbol-extractor code to `ts_project`.

PR Close #61209
2025-05-08 09:23:48 -07:00
Paul Gschwendtner 1312eb1600 build: remove irrelevant madge circular deps tests (#61209)
We don't need this tooling anymore because we are already validating
that there are no circular dependencies via the `ng-dev` tooling that
checks `.ts` files directly.

Also these tests never actually failed to my knowledge.

PR Close #61209
2025-05-08 09:23:47 -07:00
Alan Agius 3b9440baed ci: use bash syntax for CURRENT_BRANCH in GitHub Actions (#61212)
Replaces incorrect use of GitHub Actions expression syntax `${{CURRENT_BRANCH }}` inside a run block with proper bash variablesyntax `$CURRENT_BRANCH`, preventing 'Unrecognized named-value' errors.

PR Close #61212
2025-05-08 16:32:43 +02:00
Alan Agius 62559545a1 ci: remove redundant dash in workflow file (#61206)
This appears to the reason why the workflow is erroring out that each step is required to have `uses` or `run`
PR Close #61206
2025-05-08 14:41:33 +02:00
Alan Agius e9c9cfd259 ci: add workflow to sync non-default branches (#61201)
This workflow addresses a limitation with Renovate's behavior in fork mode.  Renovate does not automatically sync non-default branches in forked repositories.

This workflow automates syncing forked non-default branches with their upstream counterparts.  This ensures Renovate can detect and apply updates to these branches, maintaining up-to-date dependencies across all relevant branches.

PR Close #61201
2025-05-08 13:29:54 +02:00
Angular Robot 4292d8aa47 docs: update Angular CDK apis [19.2.x] (#61186)
Updated Angular CDK api files.

PR Close #61186
2025-05-07 11:23:04 -07:00
Jan Martin fa2124a265 docs: document preventDefault() behavior for event listeners (#61184)
The `false` behavior has existed for a long time but hasn't really
been documented. It's also not _quite_ what the browser would do.

Finally, the page explicitly discourages the implicit `false` way
of preventing default. Biggest motivation (beyond code clarity) are
potential footguns like `(click)="myProp=x()"` which happens to prevent
default behavior iff `x()` happens to return `false`.

Fixes https://github.com/angular/angular.io/issues/2568

PR Close #61184
2025-05-07 11:21:45 -07:00
Tom Adler 3fc2ba4d8c docs: fix case of variable name (#61177)
PR Close #61177
2025-05-07 11:19:56 -07:00
Andrew Kushnir 4282488195 release: cut the v19.2.10 release 2025-05-07 09:22:38 -07:00
Vlad Boisa c081e040f6 docs: fix non-working link (#61131)
Swap non-working @link to just usual `` link to work


Same like #61011
PR Close #61131
2025-05-06 14:11:26 -07:00
Miles Malerba 974b2462a8 docs: update rendering to use generated repo link (#61143)
PR Close #61143
2025-05-06 14:09:46 -07:00
Miles Malerba 5765905b81 docs: update API generation to include repo name (#61143)
PR Close #61143
2025-05-06 14:09:46 -07:00
Kristiyan Kostadinov 4623b61448 fix(core): missing useExisting providers throwing for optional calls (#61152)
Fixes that the runtime was throwing a DI error when attempting to inject a missing `useExisting` provider, despite the call being optional.

The problem was that when the provider has `useExisting`, we do a second `inject` call under the hood which didn't include the inject flags from the original call.

Fixes #61121.

PR Close #61152
2025-05-06 14:06:24 -07:00
Joey Perrott e9e1c4328e build: update tslint configuration (#61146)
Update the configuration for tslint

PR Close #61146
2025-05-06 13:35:26 -07:00
Joey Perrott a9e31eb284 ci: migrate node target version for deploy script to node20 (#61103)
Migrate the generated script to target node20 which is already the environment we run the action in.

PR Close #61103
2025-05-06 13:34:22 -07:00
Joey Perrott 0f7e5de556 build: migrate documentation site deploy script to use ts_project (#61103)
Migrate to the new toolchain

PR Close #61103
2025-05-06 13:34:22 -07:00
Andrew Kushnir 93e2735d35 Revert "docs(docs-infra): fix first-app intro example (#61042)" (#61145)
This reverts commit ab91a355f8.

Revert reason: the change causes CI to fail (the `lint` CI job).

PR Close #61145
2025-05-06 11:06:23 -07:00
Tom Adler 267bc0ee91 docs: fix whitespace after a link (#61136)
PR Close #61136
2025-05-06 10:25:50 -07:00
Angular Robot 453b1d9864 build: update github/codeql-action action to v3.28.17 (#61134)
See associated pull request for more information.

PR Close #61134
2025-05-06 09:09:57 -07:00
Jan Martin a6f0d5bc20 fix(platform-server): less aggressive ngServerMode cleanup (#61106)
Other code may depend on `ngServerMode` and it might have been set
globally / via a bundler. Forcing it to `undefined` in those situations
can lead to hard debug issues where the only symptom is that "suddenly"
browser-specific code paths run on the server and (obviously) break.

PR Close #61106
2025-05-06 09:08:48 -07:00
Matthieu Riegler 11d9dc6fad docs(docs-infra): fix first-app intro example (#61042)
fixes #60844

PR Close #61042
2025-05-06 09:07:27 -07:00
Angular Robot 8772236708 build: update rules_angular digest to 42d4791 (#61126)
See associated pull request for more information.

PR Close #61126
2025-05-05 15:36:38 -07:00
Angular Robot ba5a3c04ab build: update rules_angular digest to 3ba9d67 (#61124)
See associated pull request for more information.

PR Close #61124
2025-05-05 09:24:34 -07:00
Jessica Janiuk cc48424a57 docs: add guide for using native CSS animations (#61118)
This adds a guide for how to switch from the
angular animations package over to native CSS
animations.

PR Close #61118
2025-05-05 08:45:41 -07:00
oliv37 6f4c209493 docs(docs-infra): update use production configuration (#61112)
PR Close #61112
2025-05-05 08:45:01 -07:00
Miles Malerba 6ce2672e65 docs: hide entries that are marked @docs-private (#61105)
PR Close #61105
2025-05-05 08:44:05 -07:00
Joey Perrott 238441a343 build: enable rules_js interop mode in ng-dev release (#61088)
This will result in the release tool automatically updating the Aspect
lock files when necessary.

PR Close #61088
2025-05-02 09:14:18 -07:00
Joey Perrott 45afac3bde build: update renovate config for rules_js hybrid mode (#61088)
This will automatically result in Renovate updating the Aspect lock
files.

PR Close #61088
2025-05-02 09:14:18 -07:00
Joey Perrott 437023b022 build: set up ts_project interop for rules_js migration (#61088)
The `ts_project` interop rule that we've built was also used in the
Angular CLI migration, and it allows us to mix `ts_project` and
`ts_library` targets; enabling an incremental migration. Additionally
set up the `ng_project` to replace `ng_module`.

PR Close #61088
2025-05-02 09:14:17 -07:00
Joey Perrott e117d0f4eb build: setup rules_ts for compiling TypeScript sources (#61088)
This commit sets up `rules_ts`, providing the `ts_library` equivalent
for the `rules_js` migration.

PR Close #61088
2025-05-02 09:14:17 -07:00
Joey Perrott a3300fa31b build: setup rules_js and link dependencies (#61088)
Sets up `rules_js` and links dependencies into the bazel-bin.

PR Close #61088
2025-05-02 09:14:17 -07:00
Joey Perrott efd6c1e054 build: update to bazel 6 (#61088)
This is necessary for an incremental migration to `rules_js` which
requires Bazel v6. Bazel v6 removed the managed directories feature,
which means we no longer can rely on symlinked node modules as the Bazel
repository; but rather need to duplicate dependencies. This is
okay/acceptable to enable the incremental migration.

PR Close #61088
2025-05-02 09:14:17 -07:00
Joey Perrott 79c68b4587 build: add .prettierignore configuration file (#61088)
Add a configuration file to prevent autogenerated files from being formatted.

PR Close #61088
2025-05-02 09:14:17 -07:00
Foysol Ahmed 968546976d docs: ViewContainerRef.createComponent jsdoc update (#61097)
Co-authored-by: Jessica Janiuk <1596273+thePunderWoman@users.noreply.github.com>
PR Close #61097
2025-05-02 07:57:11 -07:00
KryptonBD 8c6e101a61 docs: ViewContainerRef.createComponent jsdoc update to reflect actual behavior (#61097)
Fixes #59918

PR Close #61097
2025-05-02 07:57:11 -07:00
Angular Robot c522e9fd90 build: update angular/dev-infra digest to a4538b2 (#61096)
See associated pull request for more information.

PR Close #61096
2025-05-02 07:56:26 -07:00
Angular Robot 4d24254e59 docs: update Angular CDK apis [19.2.x] (#61093)
Updated Angular CDK api files.

PR Close #61093
2025-05-02 07:55:02 -07:00
Miles Malerba a4512ae8ca ci: add a script to copy cdk api files to adev (#61081)
Refactors the update-cli-help script into a generic script to copy json
assets, and uses the shared code to also copy the CDK apis

PR Close #61081
2025-05-01 15:00:42 -07:00
Matthieu Riegler 6c430d7881 fix(devtools): fix profiler support with @defer blocks (#61080)
Prior to this change, the devtools profile logged warnings "Unable to find parent node for ...".

PR Close #61080
2025-05-01 14:58:22 -07:00
arturovt 89056a0356 fix(common): cleanup updateLatestValue if view is destroyed before promise resolves (#61064)
Patch version of https://github.com/angular/angular/pull/58041.

PR Close #61064
2025-05-01 14:57:04 -07:00
Andrew Miller e11ded1b3c docs: Add docs for CoC plugin with neovim (#61005)
When docs were moved from aio to adev, the directions for the CoC plugin
were mistakenly dropped.

This brings back the documentation from prior versions:

https://v17.angular.io/guide/language-service#neovim

PR Close #61005
2025-05-01 08:41:47 -07:00
arturovt 5b77f93267 refactor(common): drop platform checks in HttpXsrfCookieExtractor (#59810)
Replaces `PLATFORM_ID` checks with `ngServerMode` within the `HttpXsrfCookieExtractor`. It is not part of the public API, and thus this change should not affect consumers who may have called the constructor directly.

PR Close #59810
2025-05-01 08:41:11 -07:00
arturovt c6148bd4f0 refactor(service-worker): drop error messages in production (#59702)
This commit provides tree-shakable error messages for the `service-worker` package.

PR Close #59702
2025-04-30 12:41:37 -07:00
arturovt 964b261a86 refactor(compiler): improve stringify (#60013)
This is the same change that was made in this commit (https://github.com/angular/angular/commit/cf3a5073ece9eb313bb4832b3f78aa1bfeca09c6). See its description for clarification.

PR Close #60013
2025-04-30 12:40:03 -07:00
arturovt 075145ef93 refactor(core): tree-shake PROPAGATION_STOPPED_SYMBOL (#61004)
Adds `__PURE__` annotations to `PROPAGATION_STOPPED_SYMBOL` to enable tree-shaking, even if is is not referenced. This variable is not dropped when Angular is imported from a module that has `sideEffects` set to `true`.

PR Close #61004
2025-04-30 12:38:45 -07:00
Alan Agius 400dbc5b89 fix(core): properly handle app stabilization with defer blocks (#61056)
Previously, the app was marked as stable prematurely. For more details, see https://github.com/angular/angular/issues/61038#issuecomment-2837917180

Closes: #61038
(cherry picked from commit de649c9cfd)

PR Close #61056
2025-04-30 12:02:03 -07:00
Alan Agius 90b3355831 test: disable platform-server tests that do not work with zoneless (#61056)
A number of cases currently do not work with zoneless.

(cherry picked from commit 58f99a4491)

PR Close #61056
2025-04-30 12:02:03 -07:00
Alan Agius 794522602d test: add integration test for platform-server with zoneless (#61056)
Add an integration test to verify SSR with zoneless

(cherry picked from commit c88b29c506)

PR Close #61056
2025-04-30 12:02:03 -07:00
Alan Agius 0020fc67bd test: add integration test for defer with input on SSR with zones (#61056)
Add an integration test to verify defer block behavior with input handling during server-side rendering (SSR).

(cherry picked from commit 202fb1a8aa)

PR Close #61056
2025-04-30 12:02:03 -07:00
Miles Malerba a2eaea0426 release: cut the v19.2.9 release 2025-04-30 10:27:37 -07:00
Miles Malerba d67ced63af build: update cross-repo angular dependencies (#61066)
See associated pull request for more information.

PR Close #61066
2025-04-30 09:32:07 -07:00
arturovt 2e140a136a fix(core): prevent stash listener conflicts [patch] (#61063)
Patch version of https://github.com/angular/angular/pull/59635.

PR Close #61063
2025-04-30 09:23:19 -07:00
arturovt dbb87026ca fix(core): call DestroyRef on destroy callback if view is destroyed [patch] (#61061)
Patch version of https://github.com/angular/angular/commit/5f7f04634f57c0fb669e2b81c85a0dff972868d8

PR Close #61061
2025-04-30 08:52:25 -07:00
cexbrayat 59050900a0 refactor(core): remove unused APP_EFFECT_SCHEDULER in effect code (#59679)
The `APP_EFFECT_SCHEDULER` Injection token is never used and not a public API.

PR Close #59679
2025-04-30 08:49:56 -07:00
Matthieu Riegler a554208651 build: Run browsers tests without platform-browser-dynamic (#60937) (#61060)
Use the regular `platform-browser` providers instead.

PR Close #61060
2025-04-30 08:21:03 -07:00
vladboisa 0ee1a6e593 docs: add link label & paragraph for correct display (#60708)
PR Close #60708
2025-04-30 08:18:08 -07:00
Matthieu Riegler 4fb74b00e0 docs(docs-infra): fix alert header inlining (#60708)
PR Close #60708
2025-04-30 08:18:08 -07:00
vladboisa 770587a755 docs: add Security-DomSanitizer link in ElemnetRef&Renderer2 (#60708)
Renderer2 and ElementRef didn't mention the Security-DomSanitizer method, this will add clarity for potential user what to expect. Also swap deprecated "callout" class to docs-alert

Fixes #51208 , #46904

PR Close #60708
2025-04-30 08:18:08 -07:00
Jessica Janiuk 6b76bca0f7 Revert "build: Run browsers tests without platform-browser-dynamic (#60937)" (#61059)
This reverts commit b896ca8ed5.

PR Close #61059
2025-04-30 12:21:02 +02:00
arturovt 946b844e0d fix(core): async EventEmitter error should not prevent stability (#61028)
This commit wraps the `fn` invocation with `try-finally`, ensuring that the pending task (added in [this commit](https://github.com/angular/angular/commit/d5c6ee432fcd467c09b4d5d5366e731f5c91e8d4)) is always removed.

Prior to this commit, if a subscriber threw an error, it would prevent the application from becoming stable — though this shouldn't happen under normal scenarios because the error should be handled by the RxJS error handler or Angular's error handler.

Errors should not silently prevent the application from being rendered on the server.

PR Close #61028
2025-04-29 22:14:16 -07:00
Matthieu Riegler 222ae18f04 build(devtools): cleanup dependencies (#60936)
Removing `platform-browser-dynamic` because we don't need it anymore.

PR Close #60936
2025-04-29 12:16:17 -07:00
Ben Hong 3ea4e9d2fa docs: add relevant link to guides in learn angular tutorial (#60834)
PR Close #60834
2025-04-29 12:14:20 -07:00
Matthieu Riegler b2b8566e05 build: Run browsers tests without platform-browser-dynamic (#60937)
Use the regular `platform-browser` providers instead.

PR Close #60937
2025-04-29 12:10:54 -07:00
Angular Robot 46c1adecf0 build: update cross-repo angular dependencies (#61033)
See associated pull request for more information.

PR Close #61033
2025-04-29 09:54:03 -07:00
Niclas Gleesborg b4c853b920 docs: Changed word optimally to optionally (#61041)
PR Close #61041
2025-04-29 09:52:42 -07:00
Angular Robot 9344f27e36 build: update github/codeql-action action to v3.28.16 (#61035)
See associated pull request for more information.

PR Close #61035
2025-04-29 09:51:09 -07:00
Andrew Scott 9c4591ce30 refactor(core): Update FakeNavigation to extract some Angular quirks (#60961)
This change updates the implementation of `FakeNavigation` to extract
some changes that were made due to quirks in Angular testing.

PR Close #60961
2025-04-28 14:36:25 -07:00
Matthieu Riegler 2c9bdc3f96 docs(docs-infra): prevent from resetting the search on navigation (#60927)
By keeping the search well allow developers to navigate through multiple results without having to re-type the search

PR Close #60927
2025-04-28 10:14:57 -07:00
hawkgs 578041bf3a docs(docs-infra): fix function api ref header width (#61022)
Fix the width of the function API reference header when the viewport width is for-desktop-down.

PR Close #61022
2025-04-28 10:01:41 -07:00
nevepura 0203e0bfdd Update dependency-injection.md (#61019)
Fixed list of ways to do dependency injection.
PR Close #61019
2025-04-28 08:30:53 -07:00
Kristiyan Kostadinov 54465e890f fix(docs-infra): use proper API for style overrides (#61008)
Setting CSS variables directly is fragile and isn't the officially supported way of override Material styles. Instead the `tabs-overrides` mixin should be used which has validation for the token names.

For future reference, these are the docs for the styling API: https://material.angular.io/components/tabs/styling

PR Close #61008
2025-04-28 08:19:18 -07:00
vladboisa aca1f450d3 docs: fix non-working link (#61011)
Swap non-working @link to just usual `` link to work

PR Close #61011
2025-04-28 08:07:07 -07:00
hawkgs 7d133c0cc7 docs(docs-infra): fix mat-tab colors (#61000)
Fix the text color of Material tabs.

PR Close #61000
2025-04-25 08:50:56 -07:00
arturovt 81f655679e refactor(core): tree-shake NOT_SET and EMPTY_CLEANUP_SET (#60979)
Adds `__PURE__` annotations to `NOT_SET` and `EMPTY_CLEANUP_SET` 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 #60979
2025-04-25 08:42:13 -07:00
Matthieu Riegler e27d983402 docs: remove old pipes docs. (#60996)
They were replaced by pipes entry in the template guides.

PR Close #60996
2025-04-24 09:42:50 -07:00
Matthieu Riegler 9e3665a843 docs(docs-infra): fix github links for for previews (#60994)
PR Close #60994
2025-04-24 09:30:26 -07:00
Doug Parker 5b0ec4a100 release: bump Angular DevTools version to 1.0.30 (#60992)
PR Close #60992
2025-04-23 14:36:27 -07:00
Jens Kuehlers 56964513ae docs: remove gitter reference (#60970)
PR Close #60970
2025-04-23 17:25:16 +02:00
Jens Kuehlers 9f537b9c62 docs: remove reference to gitter (#60970)
PR Close #60970
2025-04-23 17:25:16 +02:00
hawkgs 181fd67759 docs(docs-infra): use a custom scrollbar for the examples using HighlightTypeScript (#60981)
The examples used to render the native scrollbar.

PR Close #60981
2025-04-23 17:24:30 +02:00
Pawel Kozlowski 4d7eb054b6 release: cut the v19.2.8 release 2025-04-23 17:11:57 +02:00
Pawel Kozlowski 11b90319f7 Revert "release: cut the v19.2.8 release" (#60983)
This reverts commit 94b2a8cee0.

Reverting due to release process aborting in the middle

PR Close #60983
2025-04-23 16:51:01 +02:00
Pawel Kozlowski 94b2a8cee0 release: cut the v19.2.8 release 2025-04-23 16:29:07 +02:00
arturovt b55761829e refactor(router): remove Compiler injectee from RouterPreloader (#60945)
This commit removes the `Compiler` injectee from the `RouterPreloader` constructor. It's unused but was still being referenced in the factory definition: `static ɵfac = ɵɵngDeclareFactory(...)`.

PR Close #60945
2025-04-23 15:18:23 +02:00
Matthieu Riegler beba3c7c93 refactor(compiler-cli): Extract type predicates from type guards. (#60934)
Previously they were extracted as `boolean`.

PR Close #60934
2025-04-23 09:56:45 +02:00
Matthieu Riegler 7d2980982c docs(docs-infra): Improve doc support for pipes. (#60926)
This commits adds the pipe usage and the impure pipe mention.

PR Close #60926
2025-04-23 08:46:12 +02:00
Doug Parker b9c15af651 release: bump Angular DevTools version to 1.0.29 (#60963)
PR Close #60963
2025-04-23 08:44:18 +02:00
Jeevan Mahesha 3824519a27 docs: replace EventEmitter with output and self-closing tags in templates (#60910)
Replaced all instances of EventEmitter with the new output() utility.
Updated templates to use self-closing tags for cleaner markup.

PR Close #60910
2025-04-22 21:42:19 +02:00
Matthieu Riegler adac95c7f9 refactor(core): mark makeEnvironmentProviders as public. (#60956)
`makeEnvironmentProviders` was already exported but didn't have the `@publicApi` tag.

PR Close #60956
2025-04-22 16:27:24 +02:00
Gabriel Bergoc ea4a211216 fix(forms): make NgForm emit FormSubmittedEvent and FormResetEvent (#60887)
Currently, only forms created with `FormGroupDirective` emit events on
form submission and resetting. This commit extends this behavior to
Template-driven forms also.

Related to #58894

PR Close #60887
2025-04-22 13:04:41 +02:00
Matthieu Riegler 9d08525567 docs: format RouterUpgradeInitializer usage notes (#60930)
This commit also adds a standalone example

PR Close #60930
2025-04-22 12:01:00 +02:00
Matthieu Riegler 5f0e0abbb8 refactor(compiler-cli): Don't extract constructors with no parameters (#60928)
This will prevent usesless paramters in the docs, ex: https://angular.dev/api/core/ApplicationInitStatus#constructor

This improves #60302

PR Close #60928
2025-04-22 11:59:45 +02:00
Matthieu Riegler 455809858f docs: Update creating libraries to the current recommendations (#60931)
PR Close #60931
2025-04-22 11:57:53 +02:00
Matthieu Riegler 2f9c7041fd docs: fix NG2800 rendering (#60932)
PR Close #60932
2025-04-22 11:57:01 +02:00
Matthieu Riegler 5555e9f7dc docs: update docs centered on NgModules (#60933)
PR Close #60933
2025-04-22 11:08:56 +02:00
Doug Parker 763e3ca8ab release: bump Angular DevTools version to 1.0.28 (#60893)
PR Close #60893
2025-04-17 11:25:00 +02:00
kirjs 2c1f348478 release: cut the v19.2.7 release 2025-04-16 16:41:50 -04:00
Alan Agius c90eea2cd1 refactor(common): eliminate redundant iterator-to-array conversion (#60884)
Simplifies code by removing unnecessary `Array.from` usage.

PR Close #60884
2025-04-16 12:44:36 -04:00
Angular Robot d1731687e1 build: update io_bazel_rules_sass digest to cbe5261 (#60882)
See associated pull request for more information.

PR Close #60882
2025-04-16 12:43:46 -04:00
Alan Agius 37ab6814f5 fix(common): issue a warning instead of an error when NgOptimizedImage exceeds the preload limit (#60883)
This should not be treated as a hard error, as it doesn’t break the application but merely degrades performance.

Closes #60871

(cherry picked from commit 8f25d4a033)

PR Close #60883
2025-04-16 12:04:39 -04:00
ryncdr 2a65a12fce docs(docs-infra): first-app tutorial - step-14-http src-final correction (#60738)
Updated housing.service.ts > getHousingLocationById()
 - Added search parameter to fetch URL
 - Returns single object instead of array

PR Close #60738
2025-04-16 10:23:51 -04:00
Andrew Scott 5cd80525e7 refactor(core): Update Transition finished promise to not throw unhandled rejection (#60816)
As with `InternalNavigationResult`, this commit adds the `catch` to the
`finished` promise on `InternalNavigationTransition` to avoid unhandled
promise rejections.

PR Close #60816
2025-04-15 18:40:43 -04:00
Andrew Scott aaf07d8e4c docs: Add error handling documentation (#60848)
This adds a page to document the error handling practices, APIs, and features _in the framework_.
It does not contain any application-specific recommendations or
patterns as this information is subjective and domain-specific.

PR Close #60848
2025-04-15 17:35:02 -04:00
Jessica Janiuk 070c09f2b3 fix(docs-infra): prevent processing node_modules .md files (#60872)
If you happen to have node_modules installed for adev tutorials, there would be problems with trying to run adev tests. This excludes those node_modules folders.

PR Close #60872
2025-04-15 17:28:01 -04:00
Doug Parker 9171401b88 refactor(devtools): update release process to commit before publishing (#60646)
This moves the commit step to the start of the process and releases after merging it. This has two key benefits:
1. The commit history now reflects the actual release (ex. any DevTools commits before the release commit are actually included in that release). Previously the changes in a release were dictated by the release PR branch, which is an ephemeral target. Other PRs may be merged to `main` before the release PR, and those changes would not be included in that DevTools release.
2. We can now compute a changelog based on this more accurate history.

The downside to this change is that release PRs are now blocking releases in a way they weren't before (which is likely desirable in the grand scheme of things), meaning we need to be more diligent about merging them in a timely manner.

I added a short script for listing DevTools commits since the last release, taking advantage of the more accurate commit history. This should make changelog generation a lot easier, even if there's still a manual process of rewriting the commit message into a line item in release notes.

Also made a few minor cleanup changes such as escaping the markdown in the suggested reviewer note so it can be more easily copy-pasted from the rendered format of this doc.

PR Close #60646
2025-04-15 09:19:40 -04:00
Angular Robot 9ebe59fa1c build: update all non-major dependencies (#60869)
See associated pull request for more information.

PR Close #60869
2025-04-15 09:10:51 -04:00
Logan Dupont c80f24d658 docs: fix missing card-title tag in example of fallback-content section (#60855)
PR Close #60855
2025-04-14 11:01:07 -04:00
Matthieu Riegler c0e4ff140d refactor(compiler): add support for the new search element (#54945)
See #whatwg/html#5811
Spec: https://html.spec.whatwg.org/multipage/grouping-content.html#the-search-element

breaking change: You cannot have self-closing `search` component anymore as they are recognized as a native non-void element.

fixes #54944

PR Close #54945
2025-04-14 09:34:36 -04:00
JoostK 79ff75fcc3 test(core): type tests for linkedSignal (#60857)
This commit adds type inference tests for `linkedSignal` usages, to capture their behavior w.r.t.
type inference. Note that there's some situations where type inference doesn't work as you might
expect/hope; these have been included to capture their behavior but may be revisited in the future
if the inference capabilities are expanded for this scenario.

Closes #60423

PR Close #60857
2025-04-14 09:30:37 -04:00
JoostK f6e52f26c7 docs: document that linkedSignal with previous should include type arguments (#60857)
Due to the cyclic nature of `previous`'s type and the computation's return type,
TypeScript isn't able to infer generic type arguments.

Closes #60423

PR Close #60857
2025-04-14 09:30:36 -04:00
hawkgs b210d3ccd5 refactor(devtools): switch to components tab whenever the inspector is used (#60694)
Switch to the components tab, if not there, when a component is selected via the inspector.

PR Close #60694
2025-04-14 09:22:05 -04:00
hawkgs 0e8e867b85 refactor(devtools): create highlight overlay on node selection (#60744)
Currently, highlighting works only when a directive explorer node is hovered. The change enables this feature on node selection as well.

PR Close #60744
2025-04-14 09:20:25 -04:00
Jessica Janiuk 6545eff815 docs: remove unused imports in examples (#60867)
PR Close #60867
2025-04-14 09:16:29 -04:00
Miles Malerba 4fec563f7f docs: Restructure example build rules (#60778)
Restructures the examples build rules so that all examples are exposed
through a single file group in adev/src/content/examples.

Also adds a separate filegroup in the same location for just the
embeddable examples and adds it to the APPLICATION_FILES for the docs
app.

This uncovered the fact that some of our examples have broken
non-compiling code. I've excluded these ones from being embeddable for
now, until the breakages can be addressed

PR Close #60778
2025-04-11 17:19:35 -04:00
Miles Malerba 1c6a209c7a docs: Add back script to generate example previews map (#60778)
Restores the ability to have example components rendered alongside the
code. This functionality was broken a while back by #53511.

To enable the embedded preview for an example, add `preview` and
`path=adev/src/content/expamples/component/to/render.ts` attributes to
the `<docs-code>` or `<docs-code-multifile>` tag.

Tested with one of the accessibility examples and it seems to work now.

PR Close #60778
2025-04-11 17:19:34 -04:00
Ryan Russell b144126612 fix(core): inject migration: replace param with this. (#60713)
The inject tool inserts `const foo = this.foo` if code
in the constructor referenced the constructor parameter `foo`.
If `foo` is a readonly property, we can instead replace `foo` with
`this.foo`. This allows more properties to be moved out of the
constructor with combineMemberInitializers.
For now, it only touches initializers, not all of the code in the
constructor.

PR Close #60713
2025-04-10 13:31:31 -04:00
Alan Agius 77c60414a2 fix(docs-infra): update docs-alert and tests (#60829)
Before this commit, the docs-alert tests were failing. This also ensures that `NOTE:`, `TIP:` and others are always capitalized.

(cherry picked from commit ab5986dd5685d36e209972916cddb9dca8e0a557)

PR Close #60829
2025-04-10 11:19:53 -04:00
Vincent d39e09da41 fix(http): Include HTTP status code and headers when HTTP requests errored in httpResource (#60802)
Currently the HTTP status code and headers are only included if the request succeeded. Given status codes convey more information in case of a request error vs. success, this makes it more useful than inspecting what is contained in `.error()`.

PR Close #60802
2025-04-09 14:25:03 -07:00
Andrew Scott 54f9269fad release: cut the v19.2.6 release 2025-04-09 12:25:57 -07:00
Kristiyan Kostadinov fc946c5f72 fix(compiler-cli): ensure HMR works with different output module type (#60797)
Currently when we transpile the HMR update module, we use the project's compiler options verbatim. This appears to break down with some module types, whereas we have to use a native export.

These changes override the compiler options to ensure that the user's options don't end up breaking HMR.

Fixes #60795.

PR Close #60797
2025-04-09 11:42:56 -07:00
Jermaine Jatau d99935a7ac docs: update guide on referencing component children (#60787)
PR Close #60787
2025-04-09 11:08:32 -07:00
Matthieu Riegler 880ebf4a71 Revert "refactor(core): use stream in rxResource instead of loader (#59910)" (#60803)
This reverts commit 98a584c1e8.

PR Close #60803
2025-04-09 09:33:27 -07:00
Angular Robot ae8a4c4905 build: update github/codeql-action action to v3.28.15 (#60780)
See associated pull request for more information.

PR Close #60780
2025-04-08 16:26:15 -07:00
JoostK 9241615ad0 fix(core): reduce total memory usage of various migration schematics (#60776)
This commit changes Tsurge's operation within angular-devkit (i.e. the CLI) to
no longer retain all programs across all migrations. This isn't necessary for
so-called "funnel" migrations so not retaining the programs for those migrations
is a pure performance win. The "complex" migrations may see increased execution time
given that the program is now being recreated for the actual migration phase to run,
although reduced memory pressure may help alleviate this overhead. Since this new
approach should help prevent Node from running out of memory and failing entirely
this is preferred over a potentially increased execution time.

Fixes #59813

PR Close #60776
2025-04-08 16:12:57 -07:00
Kristiyan Kostadinov a382066165 refactor(migrations): simplify integration of tsurge migrations into the CLI (#60386) (#60776)
Currently when we reuse a Tsurge migration is reused externally, there's some glue code that needs to be executed in a specific order. The code gets copied between the different migrations which is error-prone and means that bugs may have to be fixed several times.

These changes move the common steps out into a separate function so that only the migration-specific logic (mostly instantiation and logging) is left in the schematic.

PR Close #60386

PR Close #60776
2025-04-08 16:12:56 -07:00
aparziale f2bfa3151e fix(core): fix ng generate @angular/core:output-migration. Fixes angular#58650 (#60763)
Fixes #58650 - Insert a TODO comment for empty emit (without parameter).

PR Close #60763
2025-04-08 16:10:04 -07:00
arturovt 6a55970373 refactor(router): replace APP_INITIALIZER (#60719)
The `APP_INITIALIZER` is deprecated. Replaced with `provideAppInitializer`.

PR Close #60719
2025-04-08 16:06:05 -07:00
Andrew Scott dc193a7e3a refactor(router): use performance API for router view transitions (#60790)
Adds feature tracking for view transitions.

PR Close #60790
2025-04-08 14:02:29 -07:00
cexbrayat 56db79a973 refactor(core): use stream in rxResource instead of loader (#59910)
With the changes in #59573, `resource` can now define a `stream` rather than a `loader`.
In the same PR, `rxResource` was updated to leverage this new functionality to handle multiple responses from the underlying observable,
rather than just the first one as it was previously.
This commit renames the `loader` option of `rxResource` into `stream` to be better aligned with its new behavior.

The previous version is temporarily kept and marked as deprecated to help migrating the current usage.

Before
```
usersResource = rxResource({
  request: () => ...,
  loader: ({ request }) => ...
});
```

After
```
usersResource = rxResource({
  request: () => ...,
  stream: ({ request }) => ...
});
```

PR Close #59910
2025-04-08 10:19:15 -07:00
Kristiyan Kostadinov 4c09fae588 refactor(platform-browser): remove GenericBrowserDomAdapter (#60760)
The `GenericBrowserDomAdapter` wasn't don't anything so we can drop it and have the `BrowserDomAdapter` extend `DomAdapter` directly.

PR Close #60760
2025-04-08 10:14:55 -07:00
Angular Robot cf12993383 build: update dependency @types/babel__generator to v7.27.0 (#60781)
See associated pull request for more information.

PR Close #60781
2025-04-08 10:13:58 -07:00
Kirill Cherkashin 8b9df449c7 docs: Update guide link in http package md file (#59955)
PR Close #59955
2025-04-08 09:20:20 -07:00
Angular Robot 35de6f68f3 build: update io_bazel_rules_sass digest to b4800f3 (#60737)
See associated pull request for more information.

PR Close #60737
2025-04-07 13:33:15 -07:00
Kristiyan Kostadinov 3441f7b914 fix(compiler): error if rawText isn't estimated correctly (#60529) (#60753)
The `TemplateLiteralElementExpr` has some logic where it tries to estimate the `rawText` if one isn't provided by looking at the node's source span. The problem with this approach is that we have some long-standing issues with our expression AST parser (see https://github.com/angular/angular/pull/60267#discussion_r1986402524) where it might not produce accurate spans if escape sequences are involved. This in turn can lead to unrecoverable errors, because TypeScript will throw an error if the raw string doesn't match the cooked one when constructing a TypeScript AST node.

These changes remove the logic that depends on the source span and relies purely on the secondary fallback that inserts escaped characters manually.

It's also worth noting that the `rawText` doesn't seem to matter much at this point, because the main usage of it is when downlevelling template literals to ES5 which we no longer support.

Fixes #60528.

PR Close #60529

PR Close #60753
2025-04-07 13:15:02 -07:00
Jamie Couperwhite ae2fc18855 docs: fix typo in documentation for pendingUntilEvent (#60756)
PR Close #60756
2025-04-07 10:29:36 -07:00
aparzi 00bbd9b382 fix(core): fix docs for output migration (#60764)
missing EventEmitter import

PR Close #60764
2025-04-07 09:23:35 -07:00
Alan Agius e9a719ef2b build: avoid export internal renames (#60739)
There is no need to minify internal names as these are minified by the consuming app

PR Close #60739
2025-04-04 09:49:15 -07:00
hawkgs de51b9a48d docs(docs-infra): fix home animation text width on small devices; fix snackbar colors (#60745)
The text used to exceed the viewport width.

PR Close #60745
2025-04-04 09:44:45 -07:00
Andrew Scott 1b36f6e1e0 refactor(common): Add hashchange event for traversals (#60682)
This commit adds the logic to emit the `hashchange` event for
traversals.

PR Close #60682
2025-04-03 16:54:57 -07:00
Andrew Scott 8880ed67f1 refactor(common): Update FakeNavigation deferred commit to use precommitHandler (#60652)
This commit updates the FakeNavigation implementation to match the
spec's new `precommitHandler` which replaces the old `commit: 'after-transition'`.

PR Close #60652
2025-04-03 16:53:07 -07:00
Angular Robot d7089d29ef build: update io_bazel_rules_sass digest to 3548d6b (#60721)
See associated pull request for more information.

PR Close #60721
2025-04-03 13:08:02 -07:00
Doug Parker 12320347cc refactor(core): add ApplicationRef.prototype.bootstrapImpl with an injector parameter (#60622)
This is a roll forward of commit d5a8a1c524. Nothing is meaningfully different, as we're trying again to see if the CI failure is reproducible.

PR Close #60622
2025-04-03 10:48:02 -07:00
Andrew Scott fcdef1019f fix(language-service): Ensure dollar signs are escaped in completions (#60597)
Dollar signs need to be escaped so they are not replaced during snippet
expansion: https://code.visualstudio.com/docs/editing/userdefinedsnippets#_how-do-i-have-a-snippet-place-a-variable-in-the-pasted-script

fixes https://github.com/angular/vscode-ng-language-service/issues/2139

PR Close #60597
2025-04-03 10:45:57 -07:00
Andrew Scott 0e82d42774 fix(language-service): Do not provide element completions in end tag (#60616)
Element completions should not be provided when the position is in the
end tag or between the start and end tags.

fixes https://github.com/angular/vscode-ng-language-service/issues/2157

PR Close #60616
2025-04-03 10:36:33 -07:00
LC 8d183aebbb docs: Fix Property Binding (#60725)
PR Close #60725
2025-04-03 10:09:37 -07:00
Jessica Janiuk 5b76da59c6 release: cut the v19.2.5 release 2025-04-02 14:53:11 -04:00
hawkgs 8ce68289e6 docs(docs-infra): fix algolia icon in the search dialog on safari (#60702)
The icon used to have zero height due to its display property.

PR Close #60702
2025-04-02 16:19:47 +00:00
aparziale 006ac7f22f fix(core): fixes #592882 ng generate @angular/core:signal-queries-migration (#60688)
fixes #592882 - retain accessibility modifier if it's already present for signal migrations

PR Close #60688
2025-04-02 15:14:43 +00:00
arturovt 635fb00969 refactor(service-worker): pull less RxJS symbols (#60657)
In this commit, we reduce the number of imported RxJS symbols since they are redundant.

- We replace `merge` with a manual observable because `merge` internally pulls in `from()`.
- We remove `defer` and `throwError`, replacing them with `new Observable(s => s.error(..))`.
- We replace `toPromise()` with `new Promise`, as `toPromise()` is deprecated.
- We convert `readyToRegister` to a promise to avoid using RxJS operators like `delay`.

PR Close #60657
2025-04-02 15:00:34 +00:00
aparziale 8f68d1bec3 fix(core): fix ng generate @angular/core:output-migration (#60626)
output-migration command not keep type if @output declaring without initializer

PR Close #60626
2025-04-02 14:26:05 +00:00
Tomasz Domański 7cd89ad2c6 fix(service-worker): assign initializing client's app version, when a request is for worker script (#58131)
When a new version of app is available in a service worker, and a client with old version exists, web workers initialized from a client with old version will now be properly assigned with the same version.

Before this change, a web worker was assigned with the newest version.

Fixes #57971

PR Close #58131
2025-04-02 14:23:52 +00:00
Ahmed Hakeem 0c5b697afe docs: add a note about styles collision resolution (#59266)
PR Close #59266
2025-04-02 13:57:28 +00:00
Dany Marques 792954ba2c docs(core): give types to signal API (#58965)
PR Close #58965
2025-04-02 13:56:55 +00:00
Dany Marques 27a678a093 docs(core): improve computation example (#58965)
PR Close #58965
2025-04-02 13:56:55 +00:00
Matthieu Riegler f90dc69548 docs: Use inject for DI (#59835)
PR Close #59835
2025-04-02 13:37:31 +00:00
Matthieu Riegler 670dc2af89 docs(docs-infra): fix adev (#60695)
PR Close #60695
2025-04-02 12:37:04 +00:00
Matthieu Riegler 9604ec6e16 refactor(compiler): prevent object methods being recognised as entities (#58100)
With this commit object methods (like `valueOf`, `toString` are not considered as valid entities anymore.

PR Close #58100
2025-04-02 11:35:54 +00:00
Jake Spievak 88a2c92f87 docs: update the first app tutorial to include a note about importing NgFor directive (#60627)
PR Close #60627
2025-04-02 11:34:25 +00:00
Matthieu Riegler 2d8943122b docs: add targets for the bundling debug (#60693)
PR Close #60693
2025-04-02 11:33:52 +00:00
Matthieu Riegler 440b1ada9b docs(docs-infra): Search results as HTML (#60394)
fixes #60384

PR Close #60394
2025-04-02 11:32:58 +00:00
Andrew Kushnir da9f509adf build: exclude relative imports commits via .git-blame-ignore-revs (#60685)
This commit adds a list of commits that refactored the code to use relative imports to the .git-blame-ignore-revs.

PR Close #60685
2025-04-01 22:23:16 +00:00
Andrew Kushnir d0c979e0f0 test(bazel): update common package contents test to skip chunks (#60676)
This commit updates the `common` package contents test to skip JS chunks, while still making sure that the main entrypoint files are present.

PR Close #60676
2025-04-01 18:16:49 +00:00
Andrew Kushnir f8ca1d57af build(common): updating golden files for the @angular/common package (#60676)
This commit updates golden files that got changed after swtiching to relative paths. There are no actual change to the APIs, the golden file updates capture the change in imports.

PR Close #60676
2025-04-01 18:16:49 +00:00
Andrew Kushnir d725c6ed0f refactor(common): convert scripts within packages/common to relative imports (#60676)
This commit updates scripts within `packages/common` to relative imports as a prep work to the upcoming infra updates.

PR Close #60676
2025-04-01 18:16:49 +00:00
Andrew Kushnir 7edca03989 refactor(router): re-export the RouterTestingModule symbols (#60674)
This commit re-exports the symbols that are exposed by the `RouterTestingModule` (which re-exports
the symbols from the `RouterModule`. These re-exports are needed for the Angular compiler
to overcome its limitation (on the consumer side) of not knowing where to import import
symbols when relative imports are used within the package.

PR Close #60674
2025-04-01 18:16:05 +00:00
Andrew Kushnir 1fa95e5c2e refactor(router): switching to relative imports within the router package (#60674)
This commit updates scripts within `packages/router` to relative imports as a prep work to the upcoming infra updates.

PR Close #60674
2025-04-01 18:16:05 +00:00
Joey Perrott 1f02cb74e2 ci: update to latest dev-infra action versions (#60677)
Update to the latest actions

PR Close #60677
2025-04-01 18:14:47 +00:00
Andrew Scott bd1a755ab4 refactor(router): Update StateManager base class with common concrete implementations (#60617)
This commit updates the `StateManager` base class to contain common
concrete implementations that would be the same regardless of whether
the state manager is backed by the browser history API or the Navigation
API.

PR Close #60617
2025-04-01 14:05:44 +00:00
Angular Robot 95037222fb build: update all non-major dependencies (#60668)
See associated pull request for more information.

PR Close #60668
2025-04-01 12:34:37 +00:00
Jessica Janiuk b3c7282121 Revert "refactor(core): add ApplicationRef.prototype.bootstrapImpl with an injector parameter (#60622)" (#60669)
This reverts commit 7cb8639da9.

PR Close #60669
2025-04-01 12:18:52 +00:00
Doug Parker e816d2d694 refactor(core): add ApplicationRef.prototype.bootstrapImpl with an injector parameter (#60622)
This allows any components individually bootstrapped to inherit from a unique `Injector`. This is useful when bootstrapping multiple root components with different providers.

For now, the function is private while we explore potential designs to consolidate it with the existing `ApplicationRef.prototype.bootstrap` method.

PR Close #60622
2025-04-01 12:01:00 +00:00
Paul Gschwendtner fa48f98d9f fix(animations): add missing peer dependency on @angular/common (#60660)
As of
https://github.com/angular/angular/commit/1c4a3677eb4140435d27c0c873f719b7d8cdce58#diff-64131f78c9ae21421dc277debf9c8a16705a90fa649ddf580da3db434c295b11R7-R8,
the animations package has a dependency on `@angular/common`. This
commit adds this dependency to the `package.json`— as otherwise pnpm
strict builds will fail.

PR Close #60660
2025-04-01 11:59:50 +00:00
Andrew Kushnir 9eaeffd398 refactor(compiler): convert scripts within packages/compiler to relative imports (#60655)
This commit updates scripts within `packages/compiler` to relative imports as a prep work to the upcoming infra updates.

PR Close #60655
2025-04-01 11:59:14 +00:00
Andrew Kushnir f94f3a6acf refactor(compiler-cli): convert scripts within packages/compiler-cli to relative imports (#60655)
This commit updates scripts within `packages/compiler-cli` to relative imports as a prep work to the upcoming infra updates.

PR Close #60655
2025-04-01 11:59:14 +00:00
Andrew Kushnir 0b7fc584d4 refactor(forms): convert scripts within packages/forms to relative imports (#60624) (#60654)
This commit updates scripts within `packages/forms` to relative imports as a prep work to the upcoming infra updates.

PR Close #60624

PR Close #60654
2025-04-01 11:58:28 +00:00
Andrew Scott 0e9e0348dd fix(language-service): Update adapter to log instead of throw errors (#60651)
This prevents errors from being thrown from the adapters. Throwing errors
in the language service causes the extension to crash. Repeated errors
will permanently break the extension.

fixes https://github.com/angular/vscode-ng-language-service/issues/2166

PR Close #60651
2025-03-31 21:36:35 +00:00
Vincent 74cd7be6b3 refactor(core): Make unsupported styling type error message clearer (#59563)
The previous message would sound like a full sentence when using a signal without `()` (Example: Unsupported styling type function: [Input Signal: neutral]). The new formatting makes it a bit more obvious that the type itself is the problem.

PR Close #59563
2025-03-31 21:31:43 +00:00
Angular Robot 3bc113d514 build: update io_bazel_rules_sass digest to b80aeb7 (#60653)
See associated pull request for more information.

PR Close #60653
2025-03-31 21:24:50 +00:00
Andrew Kushnir 4387b37eb9 refactor(router): drop special handling of the OutletInjector (#58351)
This commit updates the OutletInjector and related code to avoid special handling of that injector. The main code that had special handling was refactored to no longer require is in https://github.com/angular/angular/pull/56763, this commit completes the cleanup.

PR Close #58351
2025-03-31 20:46:01 +00:00
Jessica Janiuk c1a1b1c3f8 docs: fix missing file header (#60649)
PR Close #60649
2025-03-31 20:42:23 +00:00
Matthieu Riegler 38557304e3 refactor(core): remove TODOs referencing #24571 (#60648)
Fixing those todos are now mostly breaking changes.
The situation is "good" as is.

PR Close #60648
2025-03-31 20:24:30 +00:00
Michael van der Luit 8d41c5bff3 docs(docs-infra): add search via queryparam all adev routes (#57567)
add search via a queryparam (?search=query) on all adev routes

PR Close #57567
2025-03-31 20:17:19 +00:00
Sheik Althaf f15f41111b refactor(docs-infra): migrate adev to signal-based queries (#58646)
Used migration schametic to migrate to signal based queries and little manual migration where setter is used

PR Close #58646
2025-03-31 20:16:39 +00:00
Ngnintedem3004 b972249145 docs: Update code snippet visible lines (#60419)
Updates the relevant code snippet visible lines to be accurate.

PR Close #60419
2025-03-31 20:16:03 +00:00
Vlad Boisa b2222889c8 docs: remove todo comment (#59928)
Removes outdated todo comment

PR Close #59928
2025-03-31 19:57:57 +00:00
arturovt f3361fbf3e refactor(platform-browser): remove empty deps lists (#60312)
Removes empty `deps` lists in Platform-Browser providers.

PR Close #60312
2025-03-31 18:09:08 +00:00
Andrew Kushnir a689415d00 build: update lock files for integration test apps (#60594) (#60643)
This commit updates yarn.lock files for integration test apps.

PR Close #60594

PR Close #60643
2025-03-31 17:55:39 +00:00
Andrew Kushnir d119cd32b1 refactor(core): drop unused deps for integration apps (#60594) (#60643)
This commit drops unused deps from the `packages.json` files of various integration test apps.

PR Close #60594

PR Close #60643
2025-03-31 17:55:39 +00:00
Andrew Kushnir 51d7696b50 ci: moving integration tests into a separate GH action (#60594) (#60643)
This commit extracts integration tests from the `test` CI job into a separate GH job (to run in parallel).

PR Close #60594

PR Close #60643
2025-03-31 17:55:39 +00:00
Andrew Kushnir db08558c3b test(core): remove obsolete integration tests (#60594) (#60643)
This commit removes a number of obsolete integration tests and also removes some e2e tests for a few remianing apps, since they are not adding value, but cause extra time to spend on CI.

PR Close #60594

PR Close #60643
2025-03-31 17:55:39 +00:00
Doug Parker ad72be1059 release: bump Angular DevTools version to 1.0.27 (#60642)
PR Close #60642
2025-03-31 17:50:20 +00:00
AleksanderBodurri 139fead7d3 fix(devtools): catch firefox non-top level frame error case when using utilities APIs (#60430)
Previously the `frameUrl` option in `chrome.devtools.inspectedWindow.eval` would throw errors when used in Firefox, preventing inspect source functionality for firefox users even if they don't need to target a particular frame on the page (they are on the top level frame with Angular DevTools).

Now this behaviour is as follows:

Firefox user that has the top level frame selected -> DevTools inspect functionality works as expected.

Firefox user that has a non-top level frame selected -> DevTools now renders a snackbar message informing the user of the limitation.

PR Close #60430
2025-03-31 17:09:57 +00:00
EriksonBahr e61d06afb5 fix: step 6 tutorial docs (#60630)
PR Close #60630
2025-03-31 17:04:35 +00:00
hawkgs 086b4a986e refactor(devtools): fix firefox breadcrumbs (#60552)
Expand the breadcrumbs container to fit the directive explorer width and remove the scrollbar.

PR Close #60552
2025-03-31 16:56:55 +00:00
Angular Robot 84f3ba0d90 build: lock file maintenance (#60635)
See associated pull request for more information.

PR Close #60635
2025-03-31 14:43:03 +00:00
Elderov, Ali fdde642985 docs: fix private modifier for the injected service (#60619)
PR Close #60619
2025-03-31 13:13:37 +00:00
Colum Ferry 11ed7e01e2 docs: update links for angular rspack to correct locations (#60634)
PR Close #60634
2025-03-31 13:12:13 +00:00
Jessica Janiuk dbbddd1617 fix(core): prevent omission of deferred pipes in full compilation (#60571)
This prevents a bug where pipes would be excluded from defer dependency generation.

PR Close #60571
2025-03-31 13:11:13 +00:00
Andrew Kushnir 0252da985a build: remove obsolete bundling test apps (#60591) (#60615)
This commit removes a few bundling test apps that do not provide any value, but require time on CI and during local development to update golden files.

The functionality that was tested in those apps is covered by various other tests that we have in a repository (either in the same `packages/core/test/bundling` folder or in other unit/integration tests).

PR Close #60591

PR Close #60615
2025-03-28 19:57:06 +00:00
Jessica Janiuk 43d03f840e ci: fix over extraction of init symbols in symbol tests (#60493) (#60614)
This omits including any init_ symbols in the symbol tests that were unnecessary and causing friction.

PR Close #60493

PR Close #60614
2025-03-28 19:48:36 +00:00
Andrew Kushnir 882f96fead refactor(core): produce a message about @defer behavior when HMR is enabled (#60533)
When the HMR is enabled in Angular, all `@defer` block dependencies are loaded
eagerly, instead of waiting for configured trigger conditions. From the DX perspective,
it might be seen as an issue when all dependencies are being loaded eagerly. This commit
adds a logic to produce a message into the console to provide more info for developers.

PR Close #60533
2025-03-28 15:00:32 +00:00
Matthieu Riegler b18215d1c8 refactor(core): retrieve the jsActionMap only once. (#60587)
Before the change, the map was pull on every loop execution.

PR Close #60587
2025-03-28 13:35:29 +00:00
Kristiyan Kostadinov 15f53f035b fix(migrations): handle shorthand assignments in super call (#60602)
Fixes that the logic which checks whether a parameter is used inside a `super` call wasn't accounting for shorthand assignments.

PR Close #60602
2025-03-28 13:34:37 +00:00
Kristiyan Kostadinov 4b161e6234 fix(migrations): inject migration not handling super parameter referenced via this (#60602)
The inject migration has some logic that treats parameters referenced directly inside of `super` differently. This logic didn't account for the fact that the parameters could be inside of inline functions which have less strict access requirements.

PR Close #60602
2025-03-28 13:34:37 +00:00
arturovt 8931fca34c refactor(core): calculate hasHttpTransferCacheOptions later (#60605)
Prior to this commit, `hasHttpTransferCacheOptions` was calculated immediately after the `featuresKind` set was declared, which was always defaulted to `false`.

PR Close #60605
2025-03-28 13:33:58 +00:00
Andrew Scott 958e98e4f7 fix(router): Add missing types to transition (#60307)
The 'types' property was added recently and is available in all browsers that support view transitions

fixes #60285

PR Close #60307
2025-03-28 11:51:07 +00:00
Matthieu Riegler 90cef52107 docs(docs-infra): fix the deferable views tutorials (#60604)
patch backport of #60509

fixes #60595

PR Close #60604
2025-03-28 11:47:50 +00:00
Andrew Scott f4c4b10ea8 fix(compiler-cli): Produce fatal diagnostic on duplicate decorated properties (#60376)
This prevents the compilation and language service from crashing.

fixes https://github.com/angular/vscode-ng-language-service/issues/2091

PR Close #60376
2025-03-27 20:26:42 +00:00
Benjamin Pabst 64da69f7b6 fix(core): check ngDevMode for undefined (#60565)
This adds a check to "toSignal" whether ngDevMode is not undefined as this can happen for some MFE applications.

PR Close #60565
2025-03-27 20:25:41 +00:00
Kristiyan Kostadinov ca5aa4d55b fix(compiler): throw for invalid "as" expression in if block (#60580)
Adds some validation that the "as" expression in an `@if` block is valid.

Fixes #59939.

PR Close #60580
2025-03-27 20:24:59 +00:00
Ryan Russell da6e93f434 fix(core): preserve comments in internal inject migration (#60588)
The internal-only combineMemberInitializers option
for the inject migration sometimes dropped the
doc comments from the members.

PR Close #60588
2025-03-27 20:24:23 +00:00
Shashwat Pathak b53220a9bf docs: update description for AfterRenderPhase.EarlyRead (#60527)
PR Close #60527
2025-03-27 18:33:24 +00:00
Andrew Kushnir 96b4f8abde refactor(platform-browser): switching to relative imports within the platform-browser package (#60559)
This commit updates scripts within `packages/platform-browser` to relative imports as a prep work to the upcoming infra updates.

PR Close #60559
2025-03-27 18:31:53 +00:00
Andrew Kushnir 8e7a6a32fa refactor(platform-browser-dynamic): switching to relative imports within the platform-browser-dynamic package (#60559)
This commit updates scripts within `packages/platform-browser-dynamic` to relative imports as a prep work to the upcoming infra updates.

PR Close #60559
2025-03-27 18:31:52 +00:00
Andrew Kushnir f4b59770e1 refactor(platform-server): switching to relative imports within the platform-server package (#60559)
This commit updates scripts within `packages/platform-server` to relative imports as a prep work to the upcoming infra updates.

PR Close #60559
2025-03-27 18:31:52 +00:00
Andrew Kushnir c2ef28062a refactor(animations): convert scripts within packages/animations to relative imports (#60230)
This commit updates scripts within `packages/animations` to relative imports as a prep work to the upcoming infra updates.

PR Close #60230
2025-03-27 18:28:01 +00:00
Andrew Kushnir c64956c411 refactor(benchpress): convert scripts within packages/benchpress to relative imports (#60230)
This commit updates scripts within `packages/benchpress` to relative imports as a prep work to the upcoming infra updates.

PR Close #60230
2025-03-27 18:28:01 +00:00
Jessica Janiuk bc79985c65 fix(core): fix regexp for event types (#60592)
This regexp accidentally worked. It was splitting by individual character and putting a pipe in rather than splitting by set of event types

PR Close #60592
2025-03-27 18:27:04 +00:00
arturovt 3bc8fe40e4 refactor(service-worker): drop fromEvent (#60424)
In this commit, we remove `fromEvent` and replace it with a manually created observable to import fewer symbols from RxJS. Some codebases may not use `fromEvent` at all, but using it in a single place would still include it in the initial bundle.

PR Close #60424
2025-03-27 18:17:22 +00:00
Joey Perrott d9420fedcb ci: update bazel RBE setup on CI and use trusted build configuration for upstream CI runs (#60590)
Update to use the latest bazel/configure-remote action from dev-infra and set up trusted builds
for CI runs from upstream branches.

PR Close #60590
2025-03-27 18:16:38 +00:00
Andrew Kushnir 1ada286279 build: add build step to the public API extractor script (#60578)
This commit adds a step where we build all found targets in parallel, which speeds up the process of completing public API extractor test/update.

PR Close #60578
2025-03-27 18:13:40 +00:00
Andrew Kushnir 60492810fd build: add build step to the symbol extractor script (#60573)
This commit adds a step where we build all found targets in parallel, which speeds up the process of completing symbol extractor test/update.

PR Close #60573
2025-03-27 18:13:04 +00:00
Alan Agius 2f96ba96a0 refactor(docs-infra): minor clean up in testing helpers (#60581)
Modernize code of testing-helper

PR Close #60581
2025-03-27 18:12:32 +00:00
Alan Agius 08fc82e13f refactor(docs-infra): remove redundant overrides in FakeWebContainer (#60581)
This is required to fix
```
adev/shared-docs/testing/testing-helper.ts:100:12 - error TS2416: Property 'on' in type 'FakeWebContainer' is not assignable to the same property in base type 'WebContainer'.
  Type '{ (event: "port", listener: PortListener): Unsubscribe; (event: "server-ready", listener: ServerReadyListener): Unsubscribe; (event: "error", listener: ErrorListener): Unsubscribe; (event: "preview-message", listener: PreviewMessageListener): Unsubscribe; }' is not assignable to type '{ (event: "port", listener: PortListener): Unsubscribe; (event: "server-ready", listener: ServerReadyListener): Unsubscribe; (event: "preview-message", listener: PreviewMessageListener): Unsubscribe; (event: "error", listener: ErrorListener): Unsubscribe; (event: "xdg-open", listener: OpenListener): Unsubscribe; (ev...'.
    Types of parameters 'event' and 'event' are incompatible.
      Type '"xdg-open"' is not assignable to type '"port"'.

100   override on(event: 'server-ready', listener: ServerReadyListener): Unsubscribe;
               ~~
```

See: https://github.com/angular/angular/actions/runs/14098789522/job/39491059550?pr=60526

PR Close #60581
2025-03-27 18:12:32 +00:00
hawkgs 0e156f7461 docs(docs-infra): fix navigation component UI bugs (#60583)
- Detachment of the navigation from the left window border
- Odd horizontal scroll when there is a URL fragment and the viewport width <900px

PR Close #60583
2025-03-27 18:11:39 +00:00
Manimaran T 1b77d52dd7 docs(docs-infra): fix correct HTML tag typo in welcome message (#60569)
PR Close #60569
2025-03-27 18:11:03 +00:00
Gerome Grignon e2dca56aaf docs: lint code examples (#59979)
PR Close #59979
2025-03-27 18:09:46 +00:00
Gerome Grignon 0ecdbdaafd docs: migrate reactive forms to standalone (#59979)
PR Close #59979
2025-03-27 18:09:45 +00:00
Gerome Grignon b982331dd3 docs: migrate reactive forms to standalone (#59979)
PR Close #59979
2025-03-27 18:09:45 +00:00
Joey Perrott d9fc010b18 build: disable remote upload of local action results to RBE cache (#60568)
disable remote upload for local actions

PR Close #60568
2025-03-26 20:48:17 -07:00
hawkgs 135ffc25b0 docs(docs-infra): fix CSS media queries boundaries (#60564)
Make lower boundaries exclusive, so we avoid conflicts with the upper boundaries.

PR Close #60564
2025-03-26 20:47:33 -07:00
Paul Gschwendtner 22a0e54ac4 fix(compiler-cli): support relative imports to symbols outside rootDir (#60555)
By default, the compiler-cli uses the relative import strategy when
there is no `rootDir` or `rootDirs`. This is expected as everything is
assumed to be somehow reachable through relative imports.

With `rootDirs` that allow for a "virtual file system"-like environment,
the compiler is not necessarily able to always construct proper relative
imports. The compiler includes the `LogicalProjectStrategy` for this
reason. This strategy is able to respect `rootDirs` to construct
relative paths when possible.

This logic currently accidentally triggers when there is a `rootDir`
set. This option is not to be confused with the virtual directory
option called `rootDirs`. The compiler currently confuses this and
accidentally enters this mode when there is just a `rootDir`— breaking
in monorepos that imports can point outside the `rootDir` to e.g. other
compilation unit's `.d.ts` (which is valid; just not `.ts` sources can
live outside the root dir).

This is necessary for our Bazel toolchain migration.

PR Close #60555
2025-03-26 20:45:56 -07:00
Jessica Janiuk 7ff4235b42 docs: add more details about event replay (#60554)
PR Close #60554
2025-03-26 20:45:04 -07:00
Pawel Kozlowski 5a59af0ef8 refactor(core): simplify signature of listenToDirectiveOutput (#60514) (#60547)
We can simplify signature of listenToDirectiveOutput by passing less
arguments (some of them can be derived from already passed arguments).

PR Close #60547
2025-03-26 20:43:13 -07:00
Angular Robot 88d7b7c965 build: update scorecard action dependencies (#60543)
See associated pull request for more information.

PR Close #60543
2025-03-26 20:40:59 -07:00
Andrew Kushnir ee46567475 refactor(language-service): convert scripts within packages/language-service to relative imports (#60540)
This commit updates scripts within `packages/language-service` to relative imports as a prep work to the upcoming infra updates.

PR Close #60540
2025-03-26 20:40:02 -07:00
Andrew Kushnir c9562ac2cc refactor(localize): convert scripts within packages/localize to relative imports (#60540)
This commit updates scripts within `packages/localize` to relative imports as a prep work to the upcoming infra updates.

PR Close #60540
2025-03-26 20:40:02 -07:00
hawkgs 07565928ad ci: add hawkgs to pullapprove (#60536)
Add hawkgs to pullaprove for angular-dev.

PR Close #60536
2025-03-26 20:39:32 -07:00
Andrew Kushnir 650c179371 refactor(upgrade): convert scripts within packages/upgrade to relative imports (#60238)
This commit updates scripts within `packages/upgrade` to relative imports as a prep work to the upcoming infra updates.

PR Close #60238
2025-03-26 20:35:12 -07:00
Andrew Kushnir 1b576ee5f5 refactor(service-worker): convert scripts within packages/service-worker to relative imports (#60238)
This commit updates scripts within `packages/service-worker` to relative imports as a prep work to the upcoming infra updates.

PR Close #60238
2025-03-26 20:35:11 -07:00
Alex Rickabaugh 4c16eae925 release: cut the v19.2.4 release 2025-03-26 20:26:39 -07:00
Andrew Kushnir 7a65b06665 refactor(core): updates to golden files (#60227) (#60556)
This commit updates golden files to include the changes that appeared after changing imports to relative paths.

PR Close #60227

PR Close #60556
2025-03-26 07:05:23 -07:00
Andrew Kushnir d6d3a87c72 refactor(core): convert scripts within packages/core/test to relative imports (#60227) (#60556)
This commit updates scripts within `packages/core/test` to relative imports as a prep work to the
upcoming infra updates.

PR Close #60227

PR Close #60556
2025-03-26 07:05:23 -07:00
Andrew Kushnir 854a66d8ee refactor(core): convert scripts within packages/core/src to relative imports (#60227) (#60556)
This commit updates scripts within `packages/core/src` to relative imports as a prep work to the upcoming infra updates.

PR Close #60227

PR Close #60556
2025-03-26 07:05:23 -07:00
Hryhorii (Greg) Avcharov 00a9331fe8 docs: fix templates bindings link (#60521)
PR Close #60521
2025-03-24 09:07:30 -07:00
aparzi 081f5f5a83 fix(core): fix used templates are not deleted (#60459)
After running the control flow migration, used templates are not deleted.

PR Close #60459
2025-03-24 09:04:06 -07:00
Milo 5e109c8ded fix(devtools): show preview content even after expanding node (#60360)
this aligns with Chrome devtools behavior

PR Close #60360
2025-03-24 09:03:22 -07:00
Pawel Kozlowski 9ac4057db8 refactor(core): specify reactive node kind for linked signal (#60451)
This commit adds reactive node kind for linked signal.

PR Close #60451
2025-03-24 07:06:47 -07:00
Matthieu Riegler d6a1a3a5de Revert "fix(localize): handle @angular/build:karma in ng add (#60513)" (#60523)
This reverts commit a2f622d82d.

PR Close #60523
2025-03-24 06:58:49 +00:00
cexbrayat a2f622d82d fix(localize): handle @angular/build:karma in ng add (#60513)
`ng add @angular/localize` now also adds the localize polyfill to the configuration of Karma if the `@angular/build:karma` builder is used
(which is the default in Angular CLI v20)

PR Close #60513
2025-03-21 14:37:24 -07:00
Paul Gschwendtner a4f144a366 test: ng-modules-importability test should import every module in isolation (#60503)
This will make the test even more useful, as it ensures that we aren't
accidentally relying on the compiler potentially discovering best
guessed modules from other imports that previously were part of the same
file (importing all modules as part of the test).

PR Close #60503
2025-03-21 14:36:27 -07:00
Andrew Temple c5f28cd02e docs: remove link to lazy loading documentation (#60501)
Removes a link that no longer directs users to the expected documentation. Deleting the line is the recommended solution for issue #60500.
PR Close #60501
2025-03-21 14:35:58 -07:00
Pawel Kozlowski 877456e729 refactor(core): share code between ComponentRef and targeted instructions (#60463)
This refactor reorganizes code such that the dynamic bindings logic and
targeted listener instruction can share most of the code.

PR Close #60463
2025-03-21 13:12:00 +01:00
Paul Gschwendtner c667d54bc9 build: add missing tinyglobby dependency in patch branch (#60510)
This dependency is not availale in the patch brach, while it is
available in the `main` branch. A recent PR relied on this dependency,
with passing tests because we don't run tests against the patch branch.

PR Close #60510
2025-03-21 12:25:03 +01:00
Alan Agius 8e8ccc7927 fix(platform-browser): ensure platformBrowserTesting includes platformBrowser providers (#60480)
Previously, `platformBrowserTesting` did not include any `platformBrowser` providers, causing an inconsistency with `platformBrowserDynamicTesting`.

This update resolves the issue by restructuring platform inheritance to ensure proper provider inclusion:

- `platformCore → platformBrowser → platformBrowserTesting`
- `platformBrowser → platformBrowserDynamic → platformBrowserDynamicTesting`

Now, `platformBrowserTesting` correctly inherits from `platformBrowser`, aligning with the expected behavior.

PR Close #60480
2025-03-20 12:33:13 -07:00
Paul Gschwendtner 867ea1c88a test: add integration test to ensure all exported modules can be imported (#60489)
This commit adds a new integration test which will help ensure that all
exported `@NgModule`'s of framework packages can be imported by users
without any errors.

This test is generally useful, but with our upcoming changes with
relative imports, this is a good safety-net. Relative imports could
break re-exported NgModules inside NgModule's. For more details, see:
https://github.com/angular/components/pull/30667

Notably we don't expect any issues for framework package as re-exporting
`@NgModule`'s inside `@NgModule`'s is seemingly a rather rare pattern for
APF libraries (confirmed by Material only having like 4-5 instances).

PR Close #60489
2025-03-20 12:32:37 -07:00
Paul Gschwendtner bf899ef0f4 build: prepare testing infrastructure for code splitting of core package (#60487)
When we switch to relative imports, shared `.d.ts` chunks can be
generated.

We need to also pull these into our mock virtual FS testing
environments. Notably this does not cause a test slow-down because we
are talking about very few extra `.d.ts` chunk files. In our experiments
before, with no dts bundling, we saw test time increase from e.g.
20seconds to 100seconds. The 20s are still the same locally!

In addition, since code for definitions can now reside in shared `.d.ts`
chunks, the language service tests need to be adjusted in cases where
they assert for code definition locations in `@angular/core`. A new
helper prepares for more code to be moved into arbitrary `.d.ts` files;
we should simply assert the definition comes out of
`node_modules/@angular/core`.

PR Close #60487
2025-03-20 12:30:58 -07:00
Angular Robot c13c53fc65 build: update actions/upload-artifact digest to ea165f8 (#60466)
See associated pull request for more information.

PR Close #60466
2025-03-20 11:54:43 -07:00
Paul Gschwendtner 9426e83988 build: disable RBE for compliance partial goldens (#60473)
We've seen these tests regularly, but somewhat rarely to be
stuck/hanging in the remote execution workers. Since the issue was
reproducable locally (via local RBE environment), we can improve
stability for the team until we resolve this with the RBE team.

PR Close #60473
2025-03-20 07:40:22 +00:00
khalilou88 6df6aa1ce2 docs: add missing word to inheritance docs (#60467)
PR Close #60467
2025-03-19 20:41:53 +01:00
Angular Robot c422fb600a build: update actions/cache digest to 5a3ec84 (#60468)
See associated pull request for more information.

PR Close #60468
2025-03-19 20:35:34 +01:00
Pawel Kozlowski 2be008986a release: cut the v19.2.3 release 2025-03-19 20:23:56 +01:00
Alan Agius 2466fc9b42 refactor(platform-browser-dynamic): relocate DOMTestComponentRenderer to @angular/platform-browser (#60453)
This commit moves `DOMTestComponentRenderer` to `@angular/platform-browser/testing`, allowing the Angular CLI to eliminate its dependency on `@angular/platform-browser-dynamic`, which would no longer be required for new projects.

PR Close #60453
2025-03-19 19:08:09 +01:00
Kristiyan Kostadinov aa8ea7a5b2 fix(compiler-cli): report more accurate diagnostic for invalid import (#60455)
Currently when an incorrect value is in the `imports` array, we highlight the entire array which can be very noisy for large arrays. This comes up semi-regularly (at least for me) when an import is missing.

These changes add some logic that reports a more accurate diagnostic location for the most common case where the `imports` array is static. Non-static arrays will fall back to the current behavior.

PR Close #60455
2025-03-19 19:06:38 +01:00
Jessica Janiuk d306e31ee4 ci: fix flakey defer test (#60461)
This uses a fake timer scheduler implementation to ensure timer tests do not cause flakiness, similar to the incremental hydration tests.

PR Close #60461
2025-03-19 18:39:38 +01:00
Matthieu Riegler c007dd5c77 docs: fix component metadata inheritance (#60464)
fixes #60422

PR Close #60464
2025-03-19 17:59:48 +01:00
Paul Gschwendtner 1e06c8e8b6 fix(platform-browser-dynamic): ensure compiler is loaded before @angular/common (#60458)
With the recent changes to the APF bundling rules, we turned on
tree-shaking in rollup to support proper code splitting for FESM bundles.

This resulted in Rollup re-ordering imports in the FESM bundles of
`@angular/platform-browser-dynamic`— highlighting that over the past
years, this package "accidentally" resulted in the side-effects of the
compiler registering itself globally.

This continues to be the case, and our changes generally didn't cause
any issues in CLI applications because the CLI explicitly wires up the
compiler (as expected) before `-dynamic` is even loaded. For custom
setup, like Analog, this order change surfaced a breakage because e.g.
`@angular/common` with its JIT decorators of e.g. directives/services
are triggered before the compiler is actually loaded/made available.

This commit fixes this. The explicit imports in practice are a noop
because our FESM bundling doesn't recognize compiler as side-effects
true; but marking the whole -dynamic package as having side-effects;
prevents rollup from swapping the import order. Long-term, we should
look into improving this by teaching `ng_package` that e.g. the compiler
has side-effects; so that the `import @angular/compiler` statement is
not dropped when constructing FESM bundles.

PR Close #60458
2025-03-19 16:54:49 +01:00
Jan Martin 13a8709b2b fix(core): catch hydration marker with implicit body tag (#60429)
When the browser parses a valid html5 response like this:

```html
<!-- ... -->
<title>My page</title>
</head>
<!--nghm-->
<app-root></app-root>
<!-- ... -->
```

The resulting DOM will only start adding nodes to the body when it
runs into the first non-header tag. E.g.:

```yml
- head
  - title "My page"
- comment "nghm"
- body
  - app-root
```

This isn't a sign that comments are modified, so it seems worth to
handle it gracefully.

PR Close #60429
2025-03-19 15:51:37 +01:00
Matthieu Riegler 4a1ae82a6c ci: prevent renovate to update typescript automatically (#60341)
This is something we usually want to do manually.

PR Close #60341
2025-03-19 15:48:21 +01:00
Jessica Janiuk 9fea601a93 ci: update shared primitives reviewers list (#60447)
This tightens up the list of reviewers for any shared primitives code changes.

PR Close #60447
2025-03-19 08:37:40 +01:00
Matthieu Riegler dc2af3d54d refactor(dev-infra): disable progressBar test (#60448)
This test often (but inconsitantly) timeouts with
```
Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
```

We suspect a racing condition within the RouterTestingHarness.
Until this has been investigated, we'll disable this test.

PR Close #60448
2025-03-19 08:36:52 +01:00
Paul Gschwendtner 7d476782dd refactor: remove peer dependency on core from compiler (#60437)
Note that this is not a public-facing change because the compiler is not
supposed to be used directly. See `public-api-surface.md`

We are changing this because in the current state, for advanced setups
like our Bazel infrastructure in Material, this peer dependency can
result in a cycle. That is because we may decide to link the
`@angular/core` package using the compiler-cli/compiler; while
transitively the compiler has a dependency on core. That's a cycle
(surfacing in Bazel w/ `rules_js`).

Dropping this optional peer dependency is acceptable because `core`,
since recently, also has an optional peer dependency on the compiler.
This one makes more sense and is also more user-facing (people generally
never install the compiler directly).

Notably the compiler does not have any runtime dependency on `core` and
this was purely added for some safety checking. See:
https://github.com/angular/angular/commit/8c171da29f499648273e61cfb5bffaa4278097e5

PR Close #60437
2025-03-18 18:15:08 +01:00
Alan Agius a0327bb596 docs(docs-infra): add support for @example (#60443)
In TSDoc, we currently handle the `@usageNotes` annotation, but this is not a standard TSDoc tag. Instead, the `@example` annotation is the correct standard, which is used in the Angular CLI repo and on the SSR package.

This change ensures that `@example` is treated the same as `@usageNotes` during the transform process and also handle multiple instances of `@example` on the same tag.

PR Close #60443
2025-03-18 18:14:11 +01:00
Alan Agius 5c19ab5511 docs: update provideClientHydration parameter description (#60432)
PR Close #60432
2025-03-18 18:11:48 +01:00
Vlad Boisa a38319ca39 docs: change the broked link (#60436)
Change the wrong path of the link to a working one.
PR Close #60436
2025-03-18 18:09:32 +01:00
Alan Agius 9291d52856 refactor(platform-server): expose internal render method for extensibility (#60416)
The `renderApplication` and `renderModule` methods currently encapsulate the entire rendering process, making it difficult to intercept key phases from a non-Angular context. This change exports the internal `render` method, allowing us to perform operations such as:

- Flushing headers before hydration preparation
- Handling non static redirects (e.g., 302 responses)
- Intercepting router events for additional processing

This refactor serves as an experimental step toward improving the API for better customization and integration in the future.

PR Close #60416
2025-03-18 10:31:44 +01:00
Doug Parker 9dffdd744d refactor(devtools): fix reading resolutionPath (#60403)
Sometimes `forest` can be empty if the provided roots are empty, and was leading to a "Cannot read `resolutionPath` of `undefined`" error. Now we check the forest has a tree in it before looking up `resolutionPath`.

There might be a separate issue with the fact that the backend script likely shouldn't be emitting an empty forest in the first place. However we already check that a resolution path exists at all, so I think it's fair to also check that a tree was provided. We can separately look into making sure the backend is emitting valid data.

PR Close #60403
2025-03-18 10:19:51 +01:00
Angular Robot 82fb14e600 build: update io_bazel_rules_sass digest to ebdb141 (#60428)
See associated pull request for more information.

PR Close #60428
2025-03-18 10:18:16 +01:00
William Mba b4f3352232 docs: fix typo (#60431)
PR Close #60431
2025-03-18 10:11:59 +01:00
Paul Gschwendtner 2364be9ee2 build: improve partial compliance golden generation and add debug logging (#60427)
Improves the partial compliance golden generation to not rely on large
files being transmitted via `stdout`. Instead the files are written
directly as it's done in idiomatic Bazel generation actions.

In addition, we add extra stdout logging for the Bazel action, to see if
the process is actually invoked in RBE workers. Right now those are
occassionally stuck, but neither us, nor the RBE team can see anything
running, and they're occasionally stuck for 1hr.

PR Close #60427
2025-03-18 07:10:43 +00:00
Kristiyan Kostadinov 0615ffb4f7 fix(core): include input name in error message (#60404)
Includes either the `debugName` or alias of an input in the error message about a value not being available.

Fixes #60199.

PR Close #60404
2025-03-17 12:15:03 +01:00
Angular Robot acaadca289 build: pin actions/upload-artifact action to 4cec3d8 (#60401)
See associated pull request for more information.

PR Close #60401
2025-03-17 10:26:01 +01:00
Paul Gschwendtner 9b8781a523 build: upload grpc remote logs for debugging (#60393)
This should be helpful in figuring out why RBE is currently unstable.

PR Close #60393
2025-03-14 19:51:27 +01:00
Jessica Janiuk 296aded9da fix(core): execute timer trigger outside zone (#60392)
This should prevent defer timers from impacting app stability by executing them outside of the zone, similar to other defer triggers.

fixes: #60373

PR Close #60392
2025-03-14 17:01:03 +01:00
Rahat Ahmed 24c5398f7d refactor(core): Support and document manually provided internal injections (#60347)
For internal framework values stored in injectors, they are manually
managed and inserted into injectors as needed. Therefore their tokens
don't provide a value or factory. This updates the type to reflect that
and updates the jsdocs a bit.

PR Close #60347
2025-03-14 13:40:41 +01:00
Andrew Scott f030409c88 refactor(router): Clean up the transition subject (#60357)
This commit cleans up the transition subject a bit so it doesn't use a dummy
initial value. It also avoids copying over data from the previous
request when a new one is created.

PR Close #60357
2025-03-14 11:16:15 +01:00
Andrew Scott ca32602393 refactor(router): Update to use early return to reduce nesting (#60377)
Updates a switchTap body to use early return to reduce nesting

PR Close #60377
2025-03-14 11:15:28 +01:00
Denis Bendrikov 8551cabe23 fix(devtools): eliminate unnecessary scrollbars on injector tree (#59966)
Modify CSS to eliminate unnecessary scrollbars on injector tree

PR Close #59966
2025-03-14 08:38:02 +01:00
Kristiyan Kostadinov 9e1a1030c8 fix(upgrade): handle output emitters when downgrading a component (#60369)
The `DowngradeComponentAdapter` adapter was assuming that all outputs are observables, but they can also be `OutputEmitterRef`.

Fixes #60366.

PR Close #60369
2025-03-13 17:36:56 +01:00
Pawel Kozlowski 38566293a4 refactor(core): pass signal equal function to primitives (#60364)
The signals primitives package understands the equals option now
so we can pass it to the signal / computed creation methods instead
of manually assigning the equality function on a reactive node.

PR Close #60364
2025-03-13 17:24:18 +01:00
Hyron48 8caf9d7f77 docs: added short explanation about event reply (#60349)
a short explanation about event reply has been added, briefly explaining the phases that compose it

PR Close #60349
2025-03-13 17:03:41 +01:00
Nico Muszalczyk 8b888b2e52 docs: note that CSS is also taken into account in the max bundle size (#60362)
Closes #60356

PR Close #60362
2025-03-13 15:50:40 +01:00
Angular Robot fc192fdba1 docs: update Angular CLI help [19.2.x] (#60371)
Updated Angular CLI help contents.

PR Close #60371
2025-03-13 15:49:36 +01:00
Matthieu Riegler 4a30a4e26b refactor(http): replace overriden method with a ts declare (#60278)
This allows us to drop the useless `super.hasValue()`.

PR Close #60278
2025-03-12 12:27:48 -07:00
Pawel Kozlowski 0d2b964d09 refactor(core): add equal option to the signal and computed creation (#60300)
This change moves more logic to the primitives package by pushing
the equal configuration on a reactive node to the signal and
computed creation utilities.

PR Close #60300
2025-03-12 10:38:28 -07:00
Taygan Caldwell 0f19351e2a refactor: cleanup untracked in core (#60150)
Re-export untracked in core from primitives

PR Close #60150
2025-03-12 10:37:52 -07:00
Andrew Kushnir 7ee7eaa754 test(core): reduce test flakiness by increasing time delta (#60338)
This commit updates an expected delta range for a duration of a view transition to reduce flakiness of that test.

PR Close #60338
2025-03-12 10:36:36 -07:00
Hryhorii (Greg) Avcharov 61139f617d docs: remove --all argument from ng update (#60350)
Closes #60340

PR Close #60350
2025-03-12 10:36:03 -07:00
Paul Gschwendtner 9f9b1c7f8b build: enable remote execution keepalive (#60355)
This should help with network issues of spawned RBE actions. It should
also introduce timeouts when actions couldn't be spawned in a timely
manner.

PR Close #60355
2025-03-12 10:35:28 -07:00
Andrew Kushnir 7529512e7b release: cut the v19.2.2 release 2025-03-12 09:42:52 -07:00
Andrew Scott 05729f4116 refactor(router): split remainder of describes in integration test file (#60313)
to more easily navigate and identify different suites of integration tests,
this commit splits them into several different files

PR Close #60313
2025-03-11 17:13:28 -07:00
Matthieu Riegler 41fd77664e docs(docs-infra): Bump tutorial/playground to 19.2 (#60337)
fixes #60335

PR Close #60337
2025-03-11 16:54:32 -07:00
Paul Gschwendtner 044dac98c9 feat(bazel): support bundling .d.ts with code splitting (#60321) (#60332)
Instead of relying on Microsoft's API extractor for `d.ts` bundling,
we are switching to Rollup-based `.d.ts` bundling.

This allows us to support code spliting, even for `.d.ts` files,
allowing for relative imports to be used between entry-points, without
ending up duplicating `.d.ts` definitions in two files. This would otherwise cause
problems with assignability of types.

It also nicely integrates into our existing rollup configuration, and
overall simplifies the `ng_package` rule even further!

Notably `tsup` also uses this rollup plugin, and it seems to work well.
Keep in mind that Microsoft's API extractor is pretty hard to integrate,
caused many problems in the past, and isn't capable of code splitting.
This aligns our d.ts bundling with the .mjs bundling (great alignment).

PR Close #60321

PR Close #60332
2025-03-11 15:33:05 -07:00
Kristiyan Kostadinov 56b551d273 fix(compiler): incorrect spans for template literals (#60323) (#60331)
Fixes that we were producing zero-length spans for template literals and template literal elements.

Fixes #60320.
Fixes #60319.

PR Close #60323

PR Close #60331
2025-03-11 15:02:17 -07:00
Matthieu Riegler 705fb0d236 docs: add mention of GH issue for devPreview feedback (#60010)
fixes #59902

PR Close #60010
2025-03-11 14:26:25 -07:00
arturovt b6f22a7526 refactor(core): inline standalone check to be dropped (#60305)
Inlines `standalone` check into the message to be dropped.

PR Close #60305
2025-03-11 13:01:44 -07:00
Matthieu Riegler 8ed63bc1bb docs: remove mention of #59443 in 19.2 changelog (#60329)
#59443 was reverted for breaking projects in G3.

PR Close #60329
2025-03-11 12:58:16 -07:00
AlirezaEbrahimkhani e98facebac docs: change xss doc url to angular new documentation (#59915)
PR Close #59915
2025-03-11 12:57:48 -07:00
Juhmer-Tena f9b6bf91be docs: fix commit message guideline link (#60296)
Fixes the link for the commit message guideline in CONTRIBUTING.md
pointing to the building and testing angular guide instead of the
commit message guidelines

Fixes #60925

PR Close #60296
2025-03-11 11:08:24 -07:00
Kristiyan Kostadinov c41b3c83ca build: update public-api approvers (#60328)
Adds myself and Paul to the public API reviewers to help with the reviews.

PR Close #60328
2025-03-11 11:07:19 -07:00
Doug Parker e59432cf07 refactor(devtools): refactors property view drag-and-drop behavior (#60286)
The main goal of this change is to remove `categoryOrder` which effectively hard-codes the supported length of `panels`. Adding another item to `panels` is not rendered unless that is added to `categoryOrder`.

My solution to this is to make the set of categories a signal, with each category able to produce the data inside it. This allow `CdkDragDrop` to rearrange categories but then still produce the correct data in the template without needing a separate array to track order.

Also removed `hidden` and inlined it in the template, since the logic was the same for every panel.

`moveItemInArray` is unfortunately an in-place move, so I needed to manually clone the array to ensure `panels` observes an immutable update which works better with signals and change detection.

PR Close #60286
2025-03-11 09:27:04 -07:00
aparzi b144dd946e fix(core): fix removal of a container reference used in the component file (#60210)
During migration a container reference was deleted even though it was used in the component file.

PR Close #60210
2025-03-11 09:26:14 -07:00
Vlad Boisa 64bdffb97a docs: fix one broke link by #57591 (#60237)
Fix 1 link in adev toolchain `{@link forRoot}`
PR Close #60237
2025-03-11 09:24:03 -07:00
Matthieu Riegler 7832be5905 docs: fix event listener key modifier example (#60280)
PR Close #60280
2025-03-11 09:23:02 -07:00
Angular Robot 4e1f28eddf build: update github/codeql-action action to v3.28.11 (#60316)
See associated pull request for more information.

PR Close #60316
2025-03-11 09:21:44 -07:00
Angular Robot 36d740d6ef build: update dependency typescript to ~5.8.0 (#60317)
See associated pull request for more information.

PR Close #60317
2025-03-11 09:21:07 -07:00
Matthieu Riegler 30f6db37a0 refactor(core): log a warning instead of throwing error on OutputRef.emit when the directive is destroyed. (#60293)
This should not be a hard error, as nothing bad happens but the users should be warned that no event will be emitted.

fixes #60110

PR Close #60293
2025-03-10 16:08:53 -07:00
Matthieu Riegler 442ef134b8 docs(docs-infra): Extract class constructors (#60302)
fixes #59180

PR Close #60302
2025-03-10 16:05:03 -07:00
Andrew Scott b1d0d20240 refactor(router): split integration test file (#60311)
to more easily navigate and identify different suites of integration tests,
this commit splits them into several different files

PR Close #60311
2025-03-10 16:03:54 -07:00
Jessica Janiuk 4e87b58fd1 ci: fix timer test flakiness (#60310)
This replaces the TimerScheduler entirely and ensures the callback is called immediately. This should prevent any further flakiness.

PR Close #60310
2025-03-10 15:08:54 -07:00
arturovt ec65169dfb refactor(core): replace PLATFORM_ID in initTransferState (#60299)
Replaces `PLATFORM_ID` check with the `ngServerMode`.

PR Close #60299
2025-03-10 13:49:24 -07:00
Paul Gschwendtner 15c42969fc fix(platform-server): add missing peer dependency for rxjs (#60308)
The server package imports from `rxjs`, but the dependency was not
specified as `peerDependency`, nor `dependency`. This surfaces as an
error in strict dependency environments, like with pnpm's symlinked node
modules structure.

This commit fixes this. It presumably doesn't fail with e.g. Yarn, or
npm because of node modules hoisting.

PR Close #60308
2025-03-10 11:41:06 -07:00
Doug Parker cfdadb562f release: bump Angular DevTools version to 1.0.26 (#60309)
PR Close #60309
2025-03-10 11:40:27 -07:00
Kristiyan Kostadinov 23ca88522b fix(compiler-cli): handle transformed classes when generating HMR code (#60298)
We had several places where we were trying to get the source file of a class for which we're generating HMR-related code. These calls will fail if the class was transformed so we have to get its source file through the original node.

Fixes #60287.

PR Close #60298
2025-03-10 09:58:53 -07:00
Doug Parker ea8008d95e fix(devtools): handle case where directive metadata has undefined dependencies (#60256)
This fixes a bug introduced by [#60206](https://github.com/angular/angular/pull/60206/files#diff-c07b9ecd59f6e0ed636ac9672b9644178d9a999f04bc8b8198b13e86589dfa5b). Previously `DirectiveMetadata.prototype.dependencies` was always set, but in that PR `dependencies` is only set if an `Injector` is found (which only happens when `ng.getInjector` is *not* defined). This causes an error when evaluating `dependencies.length` in the template.

Fix is just to check for existance before calling `length`.

PR Close #60256
2025-03-10 09:57:26 -07:00
Doug Parker cef606aa8e refactor(devtools): remove input/output/property links (#60284)
These links aren't that helpful in the context of Angular DevTools for a few reasons:
1. Users of the extension should already have a general understanding of core Angular concepts, inputs and outputs included.
2. The input and output links go to API documentation which isn't useful for someone who doesn't actually understand the core concepts anyways.
3. These links point to signals documentation even though DevTools shows non-signal inputs and outputs.
4. Properties linked to template binding docs, which doesn't *really* have anything to do with the plain JS properties being shown in DevTools anyways.

PR Close #60284
2025-03-10 09:56:20 -07:00
Joey Perrott 44155c9209 refactor(bazel): remove primary_bundle_name as attr for ng_package (#60306)
Remove primary_bundle_name as an attr for ng_package as it is unused.

PR Close #60306
2025-03-10 09:31:20 -07:00
Joey Perrott 43b89e7bb1 refactor(bazel): hardcode esm as the ouput for rollup (#60306)
Remove the option as an arg for creating a rollup config since it is static.

PR Close #60306
2025-03-10 09:31:20 -07:00
Hryhorii Avcharov 5e2f312321 fix(docs-infra): terminal light mode text color (#60246)
This commit changes the text color in terminal light mode to improve
visibility and user experience. The previous color was too light and
made it difficult to read the text.

PR Close #60246
2025-03-10 09:23:20 -07:00
François bd15db3960 docs: fix typo and link in v16 update guide (#60277)
PR Close #60277
2025-03-10 09:22:34 -07:00
Paul Gschwendtner bde1b37e0b build: properly compile tests in core with Angular compiler (#60268)
Previously we never could use relative imports to import e.g. `Component`
in e.g. the `core/tests/bundling` folder. This was necessary because otherwise the
Angular compiler wouldn't process those files as it wouldn't recognize
the Angular decorator as the one from `@angular/core`.

Notably this still isn't a large issue because relative imports still
work for most core tests, that are JIT compiled!

For bundling tests though, or some smaller targets, our new upcoming
guidelines for using relative imports inside the full package; fall
apart. This commit unblocks this effort and allows us to use relative
imports in all tests of `packages/core`. This is achieved by leveraging
the existing `isCore` functionality of the compiler, and fixing a few
instances that were missing before.

PR Close #60268
2025-03-07 11:00:48 -08:00
Vlad Boisa 5131794cde docs: fix typo in desription (#60261)
Fix typos in description of `styleUrl`

Fixes #60258
PR Close #60261
2025-03-07 10:55:38 -08:00
Paul Gschwendtner 70fb3bba4b refactor: add fast-glob to bazel dependencies (#60253)
This will be necessary for downstream (private) consumers
of the `@angular/bazel` package.

PR Close #60253
2025-03-06 12:50:29 -08:00
Jessica Janiuk 5db2df8aad ci: fix flakey timer tests (#60254)
This adjusts the tests to have a longer await time and removes the click portion of the test. These tests should only pass if the timer has triggered hydration.

PR Close #60254
2025-03-06 12:49:48 -08:00
Jessica Janiuk bb12b30d52 fix(core): ensures immediate trigger fires properly with lazy loaded routes (#60203)
In the case that a route was lazy loaded, some triggers would never properly finish hydrating due to things firing before the route finished resolving.
This will find the topmost parent defer block and ensure the registry knows about it before trying to hydrate.
In the case that the registry does not yet know, just the affected triggers await app stability before initializing.
fixes #59997

PR Close #60203
2025-03-06 12:47:47 -08:00
Angular Robot 0c105476a1 docs: update Angular CLI help [19.2.x] (#60249)
Updated Angular CLI help contents.

PR Close #60249
2025-03-06 11:27:46 -08:00
Kristiyan Kostadinov 48dc0d6dc7 refactor(language-service): rename internal symbols to accommodate type checking outside a template (#60191)
Currently the language service has some template-specific terminology around type checking, because that's the only place where we had TCB support. These changes make it more generic to accommodate future functionality.

PR Close #60191
2025-03-06 10:39:32 -08:00
Kristiyan Kostadinov 9d8e943e62 refactor(compiler-cli): rework resource handling to allow directives (#60191)
Currently only components can have resources, because they're the only symbol kinds being type checked. Since we want to add directives to it, these changes rework the resource handling to accommodate them.

PR Close #60191
2025-03-06 10:39:32 -08:00
Kristiyan Kostadinov 1a71167b5c refactor(compiler-cli): rework source manager to accommodate directives (#60191)
Currently the `TemplateSourceManager` is set up to specifically cater to component templates. These changes make it more generic so we can reuse it for directives.

PR Close #60191
2025-03-06 10:39:32 -08:00
Kristiyan Kostadinov 83218bd0d1 refactor(compiler-cli): rework type checking internals to accommodate more than components (#60191)
Currently a lot of the internal type checking data structures are set up specifically for components, because we only support type checking of templates. Since this will change in future commits, these changes prepare for it by renaming various methods and separating out component-specific data.

PR Close #60191
2025-03-06 10:39:32 -08:00
Kristiyan Kostadinov 5cc80dc72f refactor(compiler-cli): change TemplateId terminology (#60191)
Renames the `TemplateId` and terminology related to it, because we'll be using it for more than just templates.

PR Close #60191
2025-03-06 10:39:32 -08:00
Kristiyan Kostadinov 9cdf950108 refactor(compiler): allow binder to apply to more than one set of nodes (#60191)
Currently `R3TargetBinder.bind` gets a set of data back from `DirectiveBinder.apply` and `TemplateBinder.applyWithScope`. This will be annoying  if we have multiple sources of data, because we'd have to do merge them at the end.

These changes switch to constructing the various data structures ahead of time and passing them into the binders to populate them instead.

I also extracted some of the less trivial types into type aliases so we don't have to repeat them.

PR Close #60191
2025-03-06 10:39:31 -08:00
kw 279e6b846f docs: Correct comments for FormControl (#58352)
PR Close #58352
2025-03-06 10:36:47 -08:00
Doug Parker 07cc97ff9b release: bump Angular DevTools version to 1.0.25 (#60235)
PR Close #60235
2025-03-06 10:32:02 -08:00
Paul Gschwendtner 684e837758 feat(bazel): support shared chunks in ng_package (#60241)
Historically we've had to be VERY cautious about the way we import
things between entry-points. That is because the `ng_package` rule
bundling is subject to silently introducing code duplication, breaking
singletons etc. We've had this surface a couple of times already, and
dev-infra tried to help detect such cases by adding safety analysis into
`ng_package`.

Long-term we want to get to an approach where it's easy to simply share
code between chunks. Precisely, with the upcoming `rules_js` migration,
this will be necessary as we will have different import "guidelines"
that would currently, before this commit, result in code duplication, or
trigger our "safety check/lint".

This commit prepares `ng_package` to support relative imports between
entry-points, so that we only need the safety check for cross-package
imports/exports. The result is that `ng_package`/APF is now smartly able
to generate shared chunks for things that are needed between multiple
entry-points. Yay!

Note that those shared chunks still remain private, and are guarded by
our `package.json` "exports"; so no new public API surface is
exposed.

PR Close #60241
2025-03-06 10:29:05 -08:00
Matthieu Riegler dad02c6535 refactor(http): Make sur to pass context & transferCache from httpResource to the underlying request. (#60228)
Prior to this change, both were accepted as argument but never passed to the client.

PR Close #60228
2025-03-06 07:59:07 -08:00
Matthieu Riegler dfc8c432db docs(docs-infra): fix initial TOC selection (#60240)
PR Close #60240
2025-03-06 07:55:43 -08:00
Andrew Kushnir b967ca6b3b Revert "fix(router): update symbols (#60233)" (#60236)
This reverts commit 7bcdf7c143.
The original change causing CI failures was affecting the main branch only, reverting from the patch branch (since it causes CI failures).

PR Close #60236
2025-03-06 10:22:01 +01:00
Jessica Janiuk 7bcdf7c143 fix(router): update symbols (#60233)
This updates the goldens for the router.

PR Close #60233
2025-03-05 15:34:05 -08:00
arturovt 484e0cf43e refactor(platform-browser): drop unsupported event target error message in production (#60016)
Drops unsupported event target error message in production and replaces it with an existing error code.

PR Close #60016
2025-03-05 14:45:50 -08:00
arturovt 6b019ae958 refactor(core): add token to missing injection context error message (#60009)
In this commit, we add injector token information to the error message to improve debugging and context awareness, because it is hard to capture the `inject()` stack trace in asynchronous contexts.

PR Close #60009
2025-03-05 14:44:44 -08:00
arturovt 6dc41265fd fix(core): check whether application is destroyed before initializing event replay (#59789)
In this commit, we check whether the application is destroyed before initializing event replay. The application may be destroyed before it becomes stable, so when the `whenStable` resolves, the injector might already be in a destroyed state. As a result, calling `injector.get` would throw an error indicating that the injector has already been destroyed.

PR Close #59789
2025-03-05 14:43:48 -08:00
arturovt 3076254567 refactor(common): drop ngIf assert template error in production (#59705)
This commit removes the `assertTemplate` error message in production.

PR Close #59705
2025-03-05 14:42:19 -08:00
cexbrayat 90a16a1088 fix(common): support equality function in httpResource (#60026)
The `equal` option was not passed to the underlying resource.

PR Close #60026
2025-03-05 14:41:15 -08:00
iteriani 8d770eccee refactor(core): Remove the optional flag from Injector and all casts. (#60154)
Note that this does NOT use the retrieve method yet. I believe we need to move the logic for notFoundValue into the inject implementation.

PR Close #60154
2025-03-05 13:44:00 -08:00
Taygan Caldwell 699733fcc3 refactor: add untracked to primitives (#60105)
add untracked to primitives to allow Wiz to use it

PR Close #60105
2025-03-05 12:11:40 -08:00
Vlad Boisa b76af47966 docs: change broke Pipe link (#60226)
Change broke link, swap from /guides  to /guide
PR Close #60226
2025-03-05 12:11:06 -08:00
Matthieu Riegler 6accd1b0f5 docs(docs-infra): Use intersectionObserver for TOC (#60166)
Using IntersectionObservers simplfies the code and doesn't rely on APIs that will trigger a reflow.

PR Close #60166
2025-03-05 12:09:45 -08:00
Andrew Scott f08dbe0970 docs: Add more pending tasks documentation in zoneless readme (#59689)
This commit expands on the pending tasks documentation in the zoneless readme

PR Close #59689
2025-03-05 12:08:58 -08:00
Andrew Scott 6c7493e39d docs(core): Update zoneless test documentation to clarify OnPush requirement (#59689)
This updates the zoneless documentation to mention that components under
test a required to be onpush compatible. This includes any wrapper
components only used in tests.

fixes #59082

PR Close #59689
2025-03-05 12:08:58 -08:00
Andrew Scott cc97128760 docs(core): Clarify what it means to be a host for user components (#59689)
Adds a note to clarify what it means for a component to host a user
component in the context of `OnPush` restrictions.

fixes #58648

PR Close #59689
2025-03-05 12:08:58 -08:00
Doug Parker 39e8bd0f4b refactor(devtools): ignore getInjector when it is not supported (#60206)
Previously Angular DevTools would throw when run on an application which does not support `getInjector`, now it safely ignores it and assumes dependency injection is not supported.

PR Close #60206
2025-03-05 12:05:46 -08:00
AleksanderBodurri ba4b3dbed7 fix(devtools): handle case where router tree does not exist (#60221)
Previously this was throwing errors in applications with no Router token.

Now it skips emitting events for the router tree when it is unable to find the Router token.

Note: If these events don't emit, DevTools treats the RouterTree feature as disabled.

PR Close #60221
2025-03-05 12:05:02 -08:00
Miles Malerba d9e022dae2 release: cut the v19.2.1 release 2025-03-05 11:12:18 -08:00
arturovt 48d899f423 docs(zone.js): update NON-STANDARD-APIS.md (#58098)
This commit makes some grammatical changes to the existing documentation.

PR Close #58098
2025-03-05 17:30:43 +00:00
arturovt 19b6564cb2 docs(zone.js): update STANDARD-APIS.md (#58091)
This commit makes some grammatical changes to the existing documentation and adds additional
information about events.

PR Close #58091
2025-03-05 17:28:41 +00:00
arturovt f24246ef25 refactor(core): inline isFactory within getNodeInjectable (#59824)
This commit inlines the `isFactory` function body directly within `getNodeInjectable` because it is only used once. ESBuild does not inline its body within the function, which can be observed when running the build with `NG_BUILD_MANGLE=0`. The results after inlining are as follows:

```
getNodeInjectable x 70,397,377 ops/sec ±3.88% (52 runs sampled)
getNodeInjectable_inlined x 77,834,432 ops/sec ±3.13% (60 runs sampled)
```

PR Close #59824
2025-03-05 17:24:53 +00:00
Doug Parker 65d2ca9ed3 refactor(devtools): ignore ng.applyChanges if not supported (#60207)
Previously Angular DevTools would throw if `ng.applyChanges` was not defined. Now DevTools silently ignores the issue, assuming `mutateComponentOrDirective` was sufficient to update the application.

PR Close #60207
2025-03-05 16:53:57 +00:00
Matthieu Riegler a2db87ef81 docs(docs-infra): fix secondary menu (#60212)
fixes #58897

PR Close #60212
2025-03-05 11:05:07 +01:00
Matthieu Riegler 94ed3c3630 docs(docs-infra): AppComponent cleanup (#60212)
PR Close #60212
2025-03-05 11:05:07 +01:00
Pawel Kozlowski a64a5755e8 refactor(docs-infra): AppComponent cleanups (#58897)
This change contains multiple cleanups in the AppComponent:
- remove unused code;
- use router input bindings instead of manual read from
  the active route;
- remove isBrowser checks from even handlers (click events
  should not be invoked on the server, right?)

PR Close #58897
2025-03-04 22:20:49 +00:00
Jeevan Mahesha 20add2738c docs: update Angular CLI installation instructions for npm, pnpm, yarn, and bun (#59832)
PR Close #59832
2025-03-04 22:19:47 +00:00
Jeevan Mahesha e27a319261 docs: extend Angular CLI installation instructions for pnpm, yarn, and bun (#59832)
PR Close #59832
2025-03-04 22:19:47 +00:00
Mithilesh Zavar fbbe5d55b1 docs(migrations): Fix indentation in documentation for signal inputs migration (#60204)
PR Close #60204
2025-03-04 22:08:29 +00:00
Matthieu Riegler 507ed58152 refactor(core): extract dirty and markForRefresh from the private ViewRef. (#59122)
This allows better tree shaking from projects without the `element` package.

PR Close #59122
2025-03-04 22:05:41 +00:00
Matthieu Riegler 31bbbe9665 docs(docs-infra): Throw error at build time for invalid links (#59162)
PR Close #59162
2025-03-04 20:07:24 +00:00
Samuel Perez 83abe5f606 docs: fix all brokens links on the API pages (#59162)
This PR fix is for the broken links on the API
pages mentioned in issue #57591.

PR Close #59162
2025-03-04 20:07:24 +00:00
Matthieu Riegler 26b3a8f206 refactor(http): add context property to httpResource (#60188)
This was an oversight, `context` can be supported out of the box.

PR Close #60188
2025-03-04 19:57:22 +00:00
Matthieu Riegler edae26e117 docs(docs-infra): Don't truncate types in symbol extraction (#59909)
PR Close #59909
2025-03-04 19:54:58 +00:00
Alexis 8579ff8352 docs: Remove misleading default value DEFAULT_CURRENCY_CODE (#59977)
PR Close #59977
2025-03-04 19:37:57 +00:00
Matthieu Riegler 2bffacbe5e refactor(core): throw an Cyclic Dependency Error in prod mode (#60118)
Prior to this change, cyclic injection didn't trigger any error in prod mode, resulting into injecting the `CIRCULAR` object.
This could lead to strange errors where no method would be found on the token.

fixes #60074

PR Close #60118
2025-03-04 19:37:19 +00:00
naaajii f24a8c60ad docs: update license year (#59883)
updates the year in footer and placeholder for generated files

PR Close #59883
2025-03-04 19:36:48 +00:00
kirjs 036ee75684 docs: mention that log format makes it analyzable for changelog generation. (#58786)
PR Close #58786
2025-03-04 19:35:55 +00:00
kirjs 33a826b196 docs: sync the scope lists and drop ve (#58786)
PR Close #58786
2025-03-04 19:35:55 +00:00
kirjs 114658cf8c docs: address comments (#58786)
PR Close #58786
2025-03-04 19:35:55 +00:00
kirjs d30ea1b89c docs: move commit message guidelies to a separate file (#58786)
PR Close #58786
2025-03-04 19:35:54 +00:00
michael-small aff6d3d135 docs: update version table for 19.2 (#60173)
PR Close #60173
2025-03-04 17:47:10 +00:00
hawkgs 1c31c0d141 docs(docs-infra): API doc content rendering fixes (#60116)
The PR introduces a few doc content rendering fixes:
- Fix highlighted section heading styles (regression from #59965).
- Convert JSDoc links within 'Usage Notes' sections to HTML and render them.
- Add IDs to doc content headings. This, by itself, makes these headings available in the page ToC.

PR Close #60116
2025-03-04 17:46:31 +00:00
Andrew Scott 3f0116607d fix(language-service): Forward the tags for quick info from the type definition (#59524)
Prior to this commit, the tags from the type definition were dropped.
Tags may include, but are not limited to, deprecation information from
the jsdoc.

PR Close #59524
2025-03-04 17:37:23 +00:00
Lang 080fb08b76 docs: fix the wrong way to get a signal value (#59194)
PR Close #59194
2025-03-04 17:28:09 +00:00
Lang d3dde17693 docs: fix typo (#59194)
Co-authored-by: Enea Jahollari <jahollarienea14@gmail.com>
PR Close #59194
2025-03-04 17:28:09 +00:00
Lang 9ae9d9adde docs: use model API in two-way binding example (#59194)
PR Close #59194
2025-03-04 17:28:08 +00:00
Miles Malerba c615bdcde9 docs(docs-infra): Improve support for @link within the jsdoc. (#60201)
PR Close #60201
2025-03-04 17:13:43 +00:00
hawkgs 79c337448e docs: fix AnimationGroupMetadata description (#59733)
Fix the `animations/group()` link.

PR Close #59733
2025-03-04 17:12:11 +00:00
Jeevan Mahesha c67c551fb8 docs: update template syntax to new control flow (#59760)
PR Close #59760
2025-03-04 17:07:06 +00:00
Matthieu Riegler 1149686da5 docs(docs-infra): hide github link for external repos. (#60114)
fixes #60113

PR Close #60114
2025-03-04 17:02:37 +00:00
Matthieu Riegler 5c3be24712 docs(docs-infra): remove animation package (#60165)
PR Close #60165
2025-03-04 17:01:47 +00:00
Angular Robot 444671ac5b build: update dependency @types/chrome to ^0.0.307 (#60195)
See associated pull request for more information.

PR Close #60195
2025-03-04 17:00:22 +00:00
Matthieu Riegler d1233ebfa8 docs(docs-infra): wait for the DOM to be rendered (#60163)
the code inside `renderExample` is explicitly querying the DOM. We need to wait for it to be rendered for those functions to work.

PR Close #60163
2025-03-04 16:58:14 +00:00
Kristiyan Kostadinov 1c328ac261 build: update to TypeScript 5.8 final (#60176)
Updates the repo to stable version of TypeScript 5.8.

PR Close #60176
2025-03-04 16:57:36 +00:00
vladboisa cd31bfcc3e docs: change broke link (#60189)
Change the broked link to the working one

PR Close #60189
2025-03-03 22:20:53 +00:00
Andrew Scott 27174165a6 refactor(core): Update push/replace navigation to not trigger popstate (#60028)
This matches the spec, though there is a bug in chrome that does trigger these events.

PR Close #60028
2025-03-03 18:40:59 +00:00
Andrew Scott bf89792f8b refactor(core): Update fake navigation to more closely follow the spec (#60028)
This commit updates the implementation of the fake navigation to more
closely follow the spec. This includes links to spec parts as well as
some reorganization to have the flow of the code more exactly follow the
corresponding steps in the spec. This makes it easier to verify that th
behavior is correct.

PR Close #60028
2025-03-03 18:40:59 +00:00
Andrew Scott 49e3ec0dcf refactor(core): Ensure fake navigation is not aborted after it succeeds (#60028)
The navigate event was only ever being cleared when a new navigation
happened. That new navigation would abort the previous one, even if it
had already finished successfully.

PR Close #60028
2025-03-03 18:40:59 +00:00
arturovt c2de5f68b3 fix(common): clean up onUrlChange listener when root scope is destroyed (#60004)
This cleans up the `onUrlChange` listener once the root scope is destroyed.

PR Close #60004
2025-03-03 17:14:33 +00:00
Doug Parker dd70675893 release: bump Angular DevTools version to 1.0.24 (#60148)
PR Close #60148
2025-03-03 17:12:23 +00:00
Andrew Scott 1dd94476b3 fix(compiler-cli): ensure template IDs are not reused if a source file changes (#60152)
This commit fixes a bug where nodes are reused across incremental
compilations. The source file's next template ID is lost because a new
source file is created but nodes may still be retained.

PR Close #60152
2025-02-28 19:53:06 +00:00
Vlad Boisa c288a037b5 docs: fix not working links (#60160)
Remove JSDocs link, and replace the automatic linking with a regular markdown link

Fixes #59983

PR Close #60160
2025-02-28 19:52:33 +00:00
iteriani b81ea4f672 refactor(core): Move getCurrentInjector/setCurrentInjector to primitives package. (#60090)
This change casts the injector back and forth since all instances of
injector currently don't implement the `retrieve` method. Note that
the retrieve method is seen as optional, so that Angular can revert back to
inject if necessary.

PR Close #60090
2025-02-28 18:47:09 +00:00
Kristiyan Kostadinov 1b3b05bf72 fix(core): cache ComponentRef inputs and outputs (#60156)
The set of inputs and outputs of a component is static, but the getter for the `inputs` and `outputs` property was re-computing them every time which the user might not expect. These changes add a couple of lines to cache them instead.

PR Close #60156
2025-02-28 16:31:05 +00:00
Jessica Janiuk cfad089cc3 fix(core): prevents event replay from being called on comment nodes (#60130)
In some rare cases with directives, it is possible that the stash function might be called on a comment node. This actually verifies that the node is an element and exits otherwise.

fixes: #60070

PR Close #60130
2025-02-28 16:30:28 +00:00
Jessica Janiuk 95d227e5ef refactor(core): clean up event replay tests (#60130)
This updates the event replay tests to make them share the structure and utility functions used by hydration tests. This also resolves some soft errors in the event replay tests.

PR Close #60130
2025-02-28 16:30:28 +00:00
Matthieu Riegler ddfaf0cd46 refactor(migrations): Don't migrate twice the same file on the self-closing tag migration (#60065)
This commit fixes an issue when ts files are referenced multiple times (and thus analyzed multiple times) for example from a `tsconfig.json` and `tsconfig.spec.json`.

PR Close #60065
2025-02-28 16:27:40 +00:00
Hakeem b09f4a5c79 docs(docs-infra): add a tooltip to show the full text when nav item text is lengthy (#59038)
PR Close #59038
2025-02-27 18:25:19 +00:00
Hakeem 6c0c012e08 docs(docs-infra): handle long names in the sub nav (#59038)
PR Close #59038
2025-02-27 18:25:19 +00:00
Angular Robot a16dfb1b36 build: update actions/cache digest to d4323d4 (#60145)
See associated pull request for more information.

PR Close #60145
2025-02-27 18:23:42 +00:00
arturovt e549bdec8c refactor(animations): tree-shake regular expressions (#60095)
Adds a pure annotation to regular expressions because if the animations package is indirectly referenced in the code, it would include regular expressions in the bundle, even if they're unused (since `new` is side-effectful).

PR Close #60095
2025-02-27 17:53:25 +00:00
Lang 16ca676db0 docs: replace NgIf with new template syntax @if (#59159)
PR Close #59159
2025-02-27 17:41:54 +00:00
ColinJolivet 187758ccca refactor(docs-infra): remove expand button in example viewer if there is no hidden lines (#59086)
Remove the expand button of an example viewer if there is no hidden lines in it, in order not to confuse people

PR Close #59086
2025-02-27 15:48:02 +00:00
Jessica Janiuk 330c24aed9 fix(core): prevent invoking replay listeners on disconnected nodes (#60103)
This prevents replay from happening on nodes that have been removed from the DOM.

fixes: #59841

PR Close #60103
2025-02-27 15:45:14 +00:00
Matthieu Riegler ada75b605e docs(docs-infra): remove tutorial redirection (#60138)
PR Close #60138
2025-02-27 15:41:19 +00:00
Hryhorii Avcharov b06ed3cbf8 docs: fix mermaid event node text visibility in light mode (#60124)
PR Close #60124
2025-02-27 00:27:12 +00:00
Jessica Janiuk e012cf0acf build: add ignore revs file for git blame (#60117)
This allows for setting git and vscode gitlens to ignore specific commit hashes for bulk changes.

PR Close #60117
2025-02-26 16:19:26 -05:00
kirjs 8e9463bffb release: cut the v19.2.0 release 2025-02-26 16:10:05 -05:00
Matthieu Riegler 9b4727587a docs(docs-infra): remove explicit dectectChanges() (#60098)
PR Close #60098
2025-02-26 12:01:00 -05:00
Matthieu Riegler ee2f07fcff refactor(http): rename map to parse on HttpResourceOptions (#60112)
This reflects more the feature intended for this callback.

PR Close #60112
2025-02-26 11:52:44 -05:00
arturovt f76fd48b4a refactor(core): tree-shake REF_EXTRACTOR_REGEXP (#60081)
The `REF_EXTRACTOR_REGEXP` is a `new` expression that has side effects and is not dropped in production, even if it is unused.

PR Close #60081
2025-02-26 11:17:51 -05:00
arturovt 5de4b0cb70 refactor(core): inline depPath in throwCyclicDependencyError to be dropped (#60084)
Inlines the `depPath` within the `throwCyclicDependencyError`, because it's not being tree-shaken in production.

PR Close #60084
2025-02-26 11:10:38 -05:00
Jens Kuehlers fca21320e6 docs: move release date for v20 by one week (#60111)
PR Close #60111
2025-02-26 11:00:44 -05:00
arturovt c4126c7b9a refactor(forms): tree-shake _checkParentType in production (#60041)
In this commit, we move `_checkParentType` to a separate function to avoid a redundant prototype method in production.

PR Close #60041
2025-02-25 14:12:44 -05:00
Andrew Scott 176475f0fc fix(language-service): provide correct rename info for elements (#60088)
This commit ensures we do not block element rename if it is supported by
other rename providers.

fixes https://github.com/angular/vscode-ng-language-service/issues/2077

PR Close #60088
2025-02-25 14:10:55 -05:00
Kristiyan Kostadinov 7d6636087d fix(common): make types for HttpClient more readable (#59901)
`HttpClient` has a lot of overloads to achieve proper type checking, however each overload is also very long which makes it hard to read on adev. These changes replace the object literal types with `Record` to make them a bit more concise.

PR Close #59901
2025-02-25 13:01:11 -05:00
Pawel Kozlowski ce3a9a24d7 refactor(core): remove performance mark feature for signals (#59991)
Remove the performance mark feature from the Angular signal impl
so more code can be shared between primitives and other frameworks.

PR Close #59991
2025-02-25 11:10:09 -05:00
Kristiyan Kostadinov ef17371ab6 refactor(core): add infrastructure for setting inputs on specific directives (#60075)
Sets up the infrastructure that will allow to write only to a specific directive and its host directives as a base for future functionality.

I've also renamed `setInputsForProperty` to be a bit more explicit that its sets all inputs.

PR Close #60075
2025-02-25 10:58:51 -05:00
Kristiyan Kostadinov 6473214384 refactor(core): avoid memory allocations if there are no host directives (#60075)
Currently the host directive logic disassembles and re-assembles the array of directive matches, in case there are host directives which in most cases produces an identical array.

These changes add some logic so that we only need to allocate the additional memory if we actually need it.

PR Close #60075
2025-02-25 10:58:51 -05:00
Kristiyan Kostadinov f23946abe9 refactor(core): move component logic out of host directives resolution (#60075)
In order to mark a TNode as a component, we need to store the index of the component definition. Currently this happens in the logic that resolves host directives, because the component's host directives can move affect the index.

These changes move the logic out into the directive initialization logic since it doesn't have much to do with host directives.

PR Close #60075
2025-02-25 10:58:51 -05:00
Kristiyan Kostadinov fa6d9c22ac refactor(core): track match index of directives (#60075)
If we want to target an input write to a directive, we have to know the index at which its instance is stored. Technically we can already find this by looking through `TView.data`, but that'll require a linear lookup for each write which can get slow.

These changes introduce the new `TNode.directiveToIndex` map which allows us to quickly find the index of a directive based on its definition, as well as any host directives that its might've brought in.

PR Close #60075
2025-02-25 10:58:51 -05:00
Angular Robot d5f467e601 build: update all non-major dependencies (#60093)
See associated pull request for more information.

PR Close #60093
2025-02-25 10:49:25 -05:00
Angular Robot b5f28006b3 build: update io_bazel_rules_sass digest to 3b3667f (#60092)
See associated pull request for more information.

PR Close #60092
2025-02-25 10:45:36 -05:00
Angular Robot aac3e8acf6 build: update scorecard action dependencies (#60094)
See associated pull request for more information.

PR Close #60094
2025-02-25 10:43:28 -05:00
mgechev 10fb8722fe docs: add a page for custom build pipeline (#60058)
Add a documentation page for creating a custom build pipeline
with community plugins.

PR Close #60058
2025-02-25 10:40:36 -05:00
Aristeidis Bampakos 93c1918ab1 docs: update security guide (#59885)
PR Close #59885
2025-02-25 10:24:27 -05:00
Kristiyan Kostadinov ebfbaeba54 fix(core): capture stack for HMR errors (#60067)
Currently we send the `message` of an error thrown during HMR. That's usually not enough so now we also capture the stack trace.

Relates to https://github.com/angular/angular-cli/issues/29695.

PR Close #60067
2025-02-24 11:56:17 -05:00
hawkgs 9c5a6a6442 refactor(devtools): drop @ from inputs and outputs label (#60053)
Drop '@' from inputs and outputs label to fit in with the new signal-based API.

PR Close #60053
2025-02-24 10:49:13 -05:00
Evgeniy Aksyonov 67366d2f93 docs: fix typo in outputs.md for migrations section (#60055)
PR Close #60055
2025-02-24 10:46:23 -05:00
hawkgs 225e602176 docs(docs-infra): fix the top position of the search dialog (#60012)
Instead of centering the dialog, fix the top position in such way that when the results container is full, the dialog looks centered. This prevents the dialog from "jumping" when you type and the results change.

PR Close #60012
2025-02-24 10:44:19 -05:00
Charles Lyding 02a768e1d2 docs: use @angular/build directly in example/tutorial projects (#60046)
By using the `@angular/build` package directly within projects for each
example and tutorial, the total install size can be reduced. This lowers the amount
of time required to be spent setting up the dependencies in browser
before the example is displayed.

The `@angular/build@19.2.0-next.2` package currently has a total unpacked size of ~115 MB.
The `@angular-devkit/build-angular@19.2.0-next.2` package currently has a total unpacked size of ~291 MB.

This also removes the now unneeded `NG_BUILD_PARALLEL_TS=0` environment variable usage.

PR Close #60046
2025-02-24 10:14:18 -05:00
Kristiyan Kostadinov 35d20cb4b4 refactor(core): do not store input/output public names (#60036)
Reworks the `TNode.inputs` and `TNode.outputs` to not store the public names of bindings. The only reason they were stored was for host directive re-aliasing which is handled through a different data structure now.

PR Close #60036
2025-02-21 14:07:35 -05:00
Kristiyan Kostadinov 352021e1d2 refactor(core): separate host directive inputs from selector-matched ones (#60036)
Currently `TNode.inputs`/`TNode.outputs` store all of the available bindings on that node, no matter if they came from a directive that the user applied directly or from a host directive. This has a couple of drawbacks:
1. We need to store more information that necessary. For example, the only reason we have strings in the arrays is to facilitate host directive aliasing.
2. It doesn't allow us to distinguish which host directives belong to which selector-matched directives.

These changes are a step towards resolving both issues by storing the host directive binding information in separate data structures.

PR Close #60036
2025-02-21 14:07:35 -05:00
Kristiyan Kostadinov 285abbb38f refactor(core): rework how inputs/outputs are initialized (#60036)
Reworks the functions that create the `initialInputs`, `inputs` and `outputs` structures to initilize them within the function, instead of returning them to be initialized later. This will simplify future refactors where they'll produce more than one piece of information.

PR Close #60036
2025-02-21 14:07:35 -05:00
Jessica Janiuk 3fd6551cae docs: remove todo from jsdoc (#60042)
This removes TODO from a JSDoc block that made it show up on adev.

PR Close #60042
2025-02-21 11:16:48 -05:00
Pawel Kozlowski ea8662ab3e refactor(core): remove duplicated checks for ngNonBindable (#60048)
This refactoring consolidates logic around detecting ngNonBindable
mode - previously those checks were done in two separate places.
By doing the check in one place we can simplify the directive resolution
logic.

PR Close #60048
2025-02-21 11:08:50 -05:00
Jessica Janiuk 1d28a42815 refactor(core): clean up when blocks fail to fetch or hydrate (#59740)
There are cases where resources fail to fetch or the DOM has changed due to an if block. This should clean up the remaining promises and any registry references to those blocks in that case.

PR Close #59740
2025-02-21 11:08:04 -05:00
arturovt 21740846b5 refactor(core): drop platform check in ImagePerformanceWarning (#59809)
Replaces `PLATFORM_ID` checks with `ngServerMode`.

PR Close #59809
2025-02-20 12:32:23 -05:00
hawkgs 4fde15438f refactor(devtools): fix component inspector highlighting (#59995)
Use `position: absolute` instead of `position: fixed`. This fixes the odd behavior that can be reproduced when scrolling.

PR Close #59995
2025-02-20 11:56:09 -05:00
Trevor Florence 7a1bf0610e fix(benchpress): Ensure future-proof correct initialization order (#60025)
Future changes to initialization order can cause this previously OK code to start having compiler erroring like: `TS2729: Property 'foo' is used before its initialization.`

PR Close #60025
2025-02-20 11:21:55 -05:00
muhammadali1658 195d0b1ff5 docs: Fix typo ')' in banner-initial.component.spec.ts (#60032)
PR Close #60032
2025-02-20 11:03:11 -05:00
Joey Perrott 053593ef3e ci: update deploy doc site script (#60021)
Update the checked in version of the deploy script

PR Close #60021
2025-02-19 21:01:32 +00:00
Miles Malerba 347c3d5761 build: remove circular deps goldens (#60021)
Removes the circular dependencies golden file and cleans up the
associated pullapprove group. All circular dependencies have been
removed and no new ones may be added.

PR Close #60021
2025-02-19 21:01:32 +00:00
Miles Malerba 8449c071da build: update to latest @angular/ng-dev version (#60021)
Update to the latest version to gain circular deps updates.

PR Close #60021
2025-02-19 21:01:32 +00:00
Andrew Scott f88ed8e470 refactor(core): Add fake navigation to primitives for code sharing (#59857)
This moves the `FakeNavigation` implementation to the primitives folder
so its implementation can be shared with Wiz. This class was initially
copied directly from the Wiz implementation, with some small modifications.
There will still need to be some work done to align the implementations
and fix anything internally that needs adjusting.

PR Close #59857
2025-02-19 20:09:10 +00:00
Jessica Janiuk 11ea0a0f7d release: cut the v19.2.0-rc.0 release 2025-02-19 14:02:38 -05:00
2800 changed files with 150506 additions and 137061 deletions
@@ -0,0 +1,11 @@
# @generated
# Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml").
# This file should be checked into version control along with the pnpm-lock.yaml file.
.npmrc=-203833057
package.json=-1892818434
packages/compiler-cli/package.json=-1396217149
packages/compiler/package.json=499550843
pnpm-lock.yaml=-1041360686
pnpm-workspace.yaml=353334404
tools/bazel/rules_angular_store/package.json=-239561259
yarn.lock=1636150847
+7
View File
@@ -26,6 +26,7 @@ integration/ng_update_migrations/node_modules
integration/ng-add-localize/node_modules
integration/nodenext_resolution/node_modules
integration/platform-server/node_modules
integration/platform-server-zoneless/node_modules
integration/platform-server-hydration/node_modules
integration/service-worker-schema/node_modules
integration/side-effects/node_modules
@@ -37,3 +38,9 @@ integration/typings_test_ts55/node_modules
integration/typings_test_ts56/node_modules
integration/typings_test_ts57/node_modules
modules/ssr-benchmarks/node_modules
# For rules_js
packages/compiler/node_modules
packages/compiler-cli/node_modules
tools/bazel/rules_angular_store/node_modules
+15 -4
View File
@@ -1,10 +1,14 @@
# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results --spawn_strategy=local
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results --strategy=TestRunner=standalone
# Do not attempt to de-flake locally.
# On CI we might set this to `3` to run with deflaking.
test --flaky_test_attempts=1
# Required by `rules_ts`.
common --@aspect_rules_ts//ts:skipLibCheck=always
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
###############################
# Filesystem interactions #
###############################
@@ -102,8 +106,6 @@ build:remote --cpu=k8
build:remote --host_cpu=k8
# Toolchain and platform related flags
build:remote --crosstool_top=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain_suite
build:remote --extra_toolchains=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain
build:remote --extra_execution_platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform
build:remote --host_platform=@npm//@angular/build-tooling/bazel/remote-execution:platform
build:remote --platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform
@@ -113,13 +115,22 @@ build:remote --remote_instance_name=projects/internal-200822/instances/primary_i
build:remote --bes_instance_name=internal-200822
build:remote --remote_cache=remotebuildexecution.googleapis.com
build:remote --remote_executor=remotebuildexecution.googleapis.com
build:remote --remote_upload_local_results=false
build:remote --remote_grpc_log=/tmp/rbe-grpc.log
# See: https://docs.google.com/document/d/1NgDPsCIwprDdqC1zj0qQrh5KGK2hQTSTux1DAvi4rSc/edit?tab=t.0.
build:remote --experimental_remote_execution_keepalive
# Use HTTP remote cache
build:remote-cache --remote_cache=https://storage.googleapis.com/angular-team-cache
build:remote-cache --remote_accept_cached=true
build:remote-cache --remote_upload_local_results=true
build:remote-cache --remote_upload_local_results=false
build:remote-cache --google_default_credentials
# Additional flags added when running a "trusted build" with additional access
build:trusted-build --remote_upload_local_results=true
# Ensure that tags like "no-remote-exec" get propagated to actions created by rules,
# even if the rule implementation does not explicitly pass them to the execution requirements.
# https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
+1 -1
View File
@@ -1 +1 @@
5.0.0
6.5.0
+40
View File
@@ -0,0 +1,40 @@
# all commits that change formatting to prettier
fd544159e300340a25a48e3f40c58795991a4c17
31fdf0fbea6b89c8d3d141b2ef8e79c2737287cb
0d78a92431178be73342aeddda4b62d9e49138ba
f307e95459898b9027d5e13357a809d8952e9017
b1dffa4abe8321a47d79b2ea29ee32a81acfe031
ca517d7f2c38775969a65fde1d88f41ad5f27931
8f69c83b848ad0dc3c7ffce2541fc726693dedcf
a5b5b7d5ef84b9852d2115dd7a764f4ab3299379
894c1c5f100a62866cc7ed3e23d025c8e505c60d
ca39926de2ccaceb11de47a35e5bf9899147a877
b857aafcb9bdb5f1400a4cfedd56657e71ebe8cd
c4b880a025823efadb9d76195c6261f2992c7654
4c2b0d94e22f022969b86b95af516b76322840e0
0460a9dfafe3a7ebbff1b87e52048fb7416bba43
ec03e462f3d4ec90d1267474cc344563c949c2cf
bbbe477f479f20722f0fea7ccc46095aad5d4253
cc34e5fb072e7903e01463953a19d18503a39347
f9781f9804f1e7c84df356d9aeb267730a7fc499
dc62446ef7f2898a20d3be1196ecaf2a92a1077d
711cb416260ca11ff158fc39b372efa2cf022d36
# commits that switch to relative imports
854a66d8eee2f0d0c1f4bafe976d191281004e4b
d6d3a87c724a2b309870b04f1e8157c042642cc1
7a65b06665425411094d8e1d64203d22b999255c
1b576ee5f5be665a3663abd5df741f1ae90107f8
650c179371973f9cfbf433b67f5fbf2722c55cf4
c9562ac2cc28bbc4f78cd705c9437cb0a8057066
ee46567475c2a485ac9abd07633f484a879379cf
c64956c411a993fcac7c8daa57ab027a56d75ff3
c2ef28062a9ae51e9143e5e2cb1ee75473f92696
f4b59770e188071eb8a30eb077ba62c6ff550916
8e7a6a32facc5ea6f375af01787bc13e468654b3
96b4f8abde9c25fad713144a67617036e11dd977
0b7fc584d4456944097ae1c94e7875492c21605a
f94f3a6acf7050651842806db2440ca549309ba2
9eaeffd3982923d1feea8ba7fbe44821dfff18e2
1fa95e5c2e85825e77630ed15fbefbbe29cef6a3
d725c6ed0f4b98b70fac702312b51b5c9cc412b6
f8ca1d57af81b19c21b441c842c50a3c63da18e5
+1 -1
View File
@@ -1,7 +1,7 @@
## PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit
- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
+27 -3
View File
@@ -1,4 +1,8 @@
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
load("//tools:defaults.bzl", "esbuild_checked_in")
load("//tools:defaults2.bzl", "ts_project")
package(default_visibility = ["//.github/actions/deploy-docs-site:__subpackages__"])
exports_files([
"tsconfig.json",
@@ -6,13 +10,33 @@ exports_files([
esbuild_checked_in(
name = "main",
entry_point = "//.github/actions/deploy-docs-site/lib:main.ts",
entry_point = ":lib/main.mts",
external = [
"undici",
],
metafile = False,
platform = "node",
target = "node14",
target = "node20",
deps = [
"//.github/actions/deploy-docs-site/lib",
":lib",
],
)
rules_js_tsconfig(
name = "tsconfig",
src = "tsconfig.json",
)
ts_project(
name = "lib",
srcs = glob(["lib/*.mts"]),
tsconfig = ":tsconfig",
deps = [
"//:node_modules/@actions/core",
"//:node_modules/@actions/github",
"//:node_modules/@angular/ng-dev",
"//:node_modules/@types/node",
"//:node_modules/@types/tmp",
"//:node_modules/tmp",
],
)
@@ -1,23 +0,0 @@
load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//.github/actions/deploy-docs-site:__subpackages__"])
exports_files([
"main.ts",
])
ts_library(
name = "lib",
srcs = glob(
["*.ts"],
),
#tsconfig = "//.github/actions/deploy-docs-site:tsconfig.json",
deps = [
"@npm//@actions/core",
"@npm//@actions/github",
"@npm//@angular/ng-dev",
"@npm//@types/node",
"@npm//@types/tmp",
"@npm//tmp",
],
)
@@ -0,0 +1,20 @@
import {fileSync} from 'tmp';
import {writeSync} from 'node:fs';
import {getInput, setSecret} from '@actions/core';
let credentialFilePath: undefined | string;
export function getCredentialFilePath(): string {
if (credentialFilePath === undefined) {
const tmpFile = fileSync({postfix: '.json'});
writeSync(tmpFile.fd, getInput('serviceKey', {required: true}));
setSecret(tmpFile.name);
credentialFilePath = tmpFile.name;
}
return credentialFilePath;
}
/** Github access token. Used for querying the active release trains. */
export const githubReleaseTrainReadToken: string = getInput('githubReleaseTrainReadToken', {
required: true,
});
@@ -1,20 +0,0 @@
import {fileSync} from 'tmp';
import {writeSync} from 'fs';
import {getInput, setSecret} from '@actions/core';
let credentialFilePath: undefined | string;
export function getCredentialFilePath(): string {
if (credentialFilePath === undefined) {
const tmpFile = fileSync({postfix: '.json'});
writeSync(tmpFile.fd, getInput('serviceKey', {required: true}));
setSecret(tmpFile.name);
credentialFilePath = tmpFile.name;
}
return credentialFilePath;
}
/** Github access token. Used for querying the active release trains. */
export const githubReleaseTrainReadToken: string = getInput('githubReleaseTrainReadToken', {
required: true,
});
@@ -0,0 +1,116 @@
import {cp, mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
import {Deployment} from './deployments.mjs';
import {join} from 'node:path';
import {tmpdir} from 'node:os';
import {spawnSync} from 'node:child_process';
import {getCredentialFilePath} from './credential.mjs';
export async function deployToFirebase(
deployment: Deployment,
configPath: string,
distDirPath: string,
) {
if (deployment.destination == undefined) {
console.log(`No deployment necessary for docs created from: ${deployment.branch}`);
return;
}
console.log('Preparing for deployment to firebase...');
const tmpDeployDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
const deployConfigPath = join(tmpDeployDir, 'firebase.json');
const config = JSON.parse(await readFile(configPath, {encoding: 'utf-8'})) as {
hosting: {public: string};
};
config['hosting']['public'] = './dist';
await writeFile(deployConfigPath, JSON.stringify(config, null, 2));
await cp(distDirPath, join(tmpDeployDir, 'dist'), {recursive: true});
spawnSync(`chmod 777 -R ${tmpDeployDir}`, {encoding: 'utf-8', shell: true});
firebase(
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
tmpDeployDir,
);
firebase(
`target:apply --config ${deployConfigPath} --project angular-dev-site hosting angular-docs ${deployment.destination}`,
tmpDeployDir,
);
firebase(
`deploy --config ${deployConfigPath} --project angular-dev-site --only hosting --non-interactive`,
tmpDeployDir,
);
firebase(
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
tmpDeployDir,
);
await rm(tmpDeployDir, {recursive: true});
}
export async function setupRedirect(deployment: Deployment) {
if (deployment.redirect === undefined) {
console.log(`No redirect necessary for docs created from: ${deployment.branch}`);
return;
}
console.log('Preparing to set up redirect on firebase...');
const redirectConfig = JSON.stringify(
{
hosting: {
target: 'angular-docs',
redirects: [
{
type: 302,
regex: '^(.*)$',
destination: `${deployment.redirect.to}:1`,
},
],
},
},
null,
2,
);
const tmpRedirectDir = await mkdtemp(join(tmpdir(), 'redirect-directory'));
const redirectConfigPath = join(tmpRedirectDir, 'firebase.json');
await writeFile(redirectConfigPath, redirectConfig);
spawnSync(`chmod 777 -R ${tmpRedirectDir}`, {encoding: 'utf-8', shell: true});
firebase(
`target:clear --config ${redirectConfigPath} --project angular-dev-site hosting angular-docs`,
tmpRedirectDir,
);
firebase(
`target:apply --config ${redirectConfigPath} --project angular-dev-site hosting angular-docs ${deployment.redirect.from}`,
tmpRedirectDir,
);
firebase(
`deploy --config ${redirectConfigPath} --project angular-dev-site --only hosting --non-interactive`,
tmpRedirectDir,
);
firebase(
`target:clear --config ${redirectConfigPath} --project angular-dev-site hosting angular-docs`,
tmpRedirectDir,
);
await rm(tmpRedirectDir, {recursive: true});
}
function firebase(cmd: string, cwd?: string) {
spawnSync('npx', `-y firebase-tools@13.15.1 ${cmd}`.split(' '), {
cwd,
encoding: 'utf-8',
shell: true,
stdio: 'inherit',
env: {
...process.env,
GOOGLE_APPLICATION_CREDENTIALS: getCredentialFilePath(),
},
});
}
@@ -1,116 +0,0 @@
import {cp, mkdtemp, readFile, rm, writeFile} from 'fs/promises';
import {Deployment} from './deployments';
import {join} from 'path';
import {tmpdir} from 'os';
import {spawnSync} from 'child_process';
import {getCredentialFilePath} from './credential';
export async function deployToFirebase(
deployment: Deployment,
configPath: string,
distDirPath: string,
) {
if (deployment.destination == undefined) {
console.log(`No deployment necessary for docs created from: ${deployment.branch}`);
return;
}
console.log('Preparing for deployment to firebase...');
const tmpDeployDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
const deployConfigPath = join(tmpDeployDir, 'firebase.json');
const config = JSON.parse(await readFile(configPath, {encoding: 'utf-8'})) as {
hosting: {public: string};
};
config['hosting']['public'] = './dist';
await writeFile(deployConfigPath, JSON.stringify(config, null, 2));
await cp(distDirPath, join(tmpDeployDir, 'dist'), {recursive: true});
spawnSync(`chmod 777 -R ${tmpDeployDir}`, {encoding: 'utf-8', shell: true});
firebase(
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
tmpDeployDir,
);
firebase(
`target:apply --config ${deployConfigPath} --project angular-dev-site hosting angular-docs ${deployment.destination}`,
tmpDeployDir,
);
firebase(
`deploy --config ${deployConfigPath} --project angular-dev-site --only hosting --non-interactive`,
tmpDeployDir,
);
firebase(
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
tmpDeployDir,
);
await rm(tmpDeployDir, {recursive: true});
}
export async function setupRedirect(deployment: Deployment) {
if (deployment.redirect === undefined) {
console.log(`No redirect necessary for docs created from: ${deployment.branch}`);
return;
}
console.log('Preparing to set up redirect on firebase...');
const redirectConfig = JSON.stringify(
{
hosting: {
target: 'angular-docs',
redirects: [
{
type: 302,
regex: '^(.*)$',
destination: `${deployment.redirect.to}:1`,
},
],
},
},
null,
2,
);
const tmpRedirectDir = await mkdtemp(join(tmpdir(), 'redirect-directory'));
const redirectConfigPath = join(tmpRedirectDir, 'firebase.json');
await writeFile(redirectConfigPath, redirectConfig);
spawnSync(`chmod 777 -R ${tmpRedirectDir}`, {encoding: 'utf-8', shell: true});
firebase(
`target:clear --config ${redirectConfigPath} --project angular-dev-site hosting angular-docs`,
tmpRedirectDir,
);
firebase(
`target:apply --config ${redirectConfigPath} --project angular-dev-site hosting angular-docs ${deployment.redirect.from}`,
tmpRedirectDir,
);
firebase(
`deploy --config ${redirectConfigPath} --project angular-dev-site --only hosting --non-interactive`,
tmpRedirectDir,
);
firebase(
`target:clear --config ${redirectConfigPath} --project angular-dev-site hosting angular-docs`,
tmpRedirectDir,
);
await rm(tmpRedirectDir, {recursive: true});
}
function firebase(cmd: string, cwd?: string) {
spawnSync('npx', `-y firebase-tools@13.15.1 ${cmd}`.split(' '), {
cwd,
encoding: 'utf-8',
shell: true,
stdio: 'inherit',
env: {
...process.env,
GOOGLE_APPLICATION_CREDENTIALS: getCredentialFilePath(),
},
});
}
@@ -0,0 +1,75 @@
import {getInput, setFailed} from '@actions/core';
import {context} from '@actions/github';
import {deployToFirebase, setupRedirect} from './deploy.mjs';
import {getDeployments} from './deployments.mjs';
import {AuthenticatedGitClient, GithubConfig, setConfig} from '@angular/ng-dev';
import {githubReleaseTrainReadToken} from './credential.mjs';
const refMatcher = /refs\/heads\/(.*)/;
async function deployDocs() {
setConfig({
github: {
mainBranchName: 'main',
name: 'angular',
owner: 'angular',
} as GithubConfig,
});
AuthenticatedGitClient.configure(githubReleaseTrainReadToken);
if (context.eventName !== 'push') {
throw Error();
}
const matchedRef = context.ref.match(refMatcher);
if (matchedRef === null) {
throw Error();
}
const currentBranch = matchedRef[1];
const configPath = getInput('configPath');
const distDir = getInput('distDir');
const deployment = (await getDeployments()).get(currentBranch);
if (deployment === undefined) {
console.log(`Current branch (${currentBranch}) does not deploy a documentation site.`);
console.log(`Exiting...`);
process.exit(0);
}
console.log('Doc site deployment information');
console.log('');
console.log('Current Branch:');
console.log(` ${deployment.branch}`);
console.log('');
console.log('Firebase Site:');
if (deployment.destination === undefined) {
console.log(' No deployment of a documenation site is necessary');
} else {
console.log(` Deploying to: ${deployment.destination}`);
}
console.log('');
console.log('Redirect Configuration:');
if (deployment.redirect === undefined) {
console.log(' No redirects are necessary');
} else {
console.log(` From: ${deployment.redirect.from}`);
console.log(` To: ${deployment.redirect.to}`);
}
await deployToFirebase(deployment, configPath, distDir);
await setupRedirect(deployment);
}
// Only run if the action is executed in a repository with is in the Angular org. This is in place
// to prevent the action from actually running in a fork of a repository with this action set up.
if (context.repo.owner === 'angular') {
deployDocs().catch((e: Error) => {
setFailed(e.message);
console.error(e);
});
} else {
console.warn(
'The action was skipped as this action is only meant to run in repos belonging to the Angular organization.',
);
}
@@ -1,75 +0,0 @@
import {getInput, setFailed} from '@actions/core';
import {context} from '@actions/github';
import {deployToFirebase, setupRedirect} from './deploy';
import {getDeployments} from './deployments';
import {AuthenticatedGitClient, GithubConfig, setConfig} from '@angular/ng-dev';
import {githubReleaseTrainReadToken} from './credential';
const refMatcher = /refs\/heads\/(.*)/;
async function deployDocs() {
setConfig({
github: <GithubConfig>{
mainBranchName: 'main',
name: 'angular',
owner: 'angular',
},
});
AuthenticatedGitClient.configure(githubReleaseTrainReadToken);
if (context.eventName !== 'push') {
throw Error();
}
const matchedRef = context.ref.match(refMatcher);
if (matchedRef === null) {
throw Error();
}
const currentBranch = matchedRef[1];
const configPath = getInput('configPath');
const distDir = getInput('distDir');
const deployment = (await getDeployments()).get(currentBranch);
if (deployment === undefined) {
console.log(`Current branch (${currentBranch}) does not deploy a documentation site.`);
console.log(`Exiting...`);
process.exit(0);
}
console.log('Doc site deployment information');
console.log('');
console.log('Current Branch:');
console.log(` ${deployment.branch}`);
console.log('');
console.log('Firebase Site:');
if (deployment.destination === undefined) {
console.log(' No deployment of a documenation site is necessary');
} else {
console.log(` Deploying to: ${deployment.destination}`);
}
console.log('');
console.log('Redirect Configuration:');
if (deployment.redirect === undefined) {
console.log(' No redirects are necessary');
} else {
console.log(` From: ${deployment.redirect.from}`);
console.log(` To: ${deployment.redirect.to}`);
}
await deployToFirebase(deployment, configPath, distDir);
await setupRedirect(deployment);
}
// Only run if the action is executed in a repository with is in the Angular org. This is in place
// to prevent the action from actually running in a fork of a repository with this action set up.
if (context.repo.owner === 'angular') {
deployDocs().catch((e: Error) => {
setFailed(e.message);
console.error(e);
});
} else {
console.warn(
'The action was skipped as this action is only meant to run in repos belonging to the Angular organization.',
);
}
File diff suppressed because it is too large Load Diff
@@ -1,3 +0,0 @@
{
"type": "module"
}
+8 -11
View File
@@ -1,19 +1,16 @@
{
"compilerOptions": {
"module": "Node16",
"target": "es2020",
"lib": ["es2021", "dom"],
"module": "NodeNext",
"target": "ES2021",
"lib": ["es2021"],
"experimentalDecorators": true,
"strict": true,
"outDir": "../../../dist/tsc-non-bazel-out",
"skipLibCheck": true,
"noImplicitOverride": true,
// TODO(ESM): Remove this when Bazel also uses the Node resolution.
"esModuleInterop": true,
"noImplicitReturns": true,
"jsx": "react",
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment"
},
"exclude": []
}
"declaration": true,
"sourceMap": true
}
}
+2 -2
View File
@@ -5,9 +5,9 @@ runs:
using: 'composite'
steps:
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/saucelabs@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Starting Saucelabs tunnel service
shell: bash
run: ./tools/saucelabs/sauce-service.sh run &
+1 -1
View File
@@ -4,7 +4,7 @@ description: 'Installs the dependencies using Yarn'
runs:
using: 'composite'
steps:
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
with:
path: |
./node_modules/
+4 -4
View File
@@ -21,16 +21,16 @@ jobs:
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'adev: preview'))
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Build adev to ensure it continues to work
run: yarn bazel build //adev:build --full_build_adev --config=release
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@002a34e9875f55bf1850fb57d34261b33b2fd492
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
workflow-artifact-name: 'adev-preview'
pull-number: '${{github.event.pull_request.number}}'
+1 -1
View File
@@ -40,7 +40,7 @@ jobs:
npx -y firebase-tools@latest target:clear --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs
npx -y firebase-tools@latest target:apply --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs ${{env.PREVIEW_SITE}}
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@002a34e9875f55bf1850fb57d34261b33b2fd492
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
github-token: '${{secrets.GITHUB_TOKEN}}'
workflow-artifact-name: 'adev-preview'
@@ -16,6 +16,6 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: angular/dev-infra/github-actions/branch-manager@002a34e9875f55bf1850fb57d34261b33b2fd492
- uses: angular/dev-infra/github-actions/branch-manager@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
- uses: ./.github/actions/yarn-install
- uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
- uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
bazelrc: ./.bazelrc.user
+59 -31
View File
@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Install node modules
@@ -41,13 +41,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Run unit tests
@@ -59,28 +61,50 @@ jobs:
runs-on: ubuntu-latest-4core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: yarn install --frozen-lockfile --network-timeout 100000
- name: Run CI tests for framework
run: yarn test:ci
integration-tests:
runs-on: ubuntu-latest-4core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: yarn install --frozen-lockfile --network-timeout 100000
- name: Run integration CI tests for framework
run: yarn integration-tests:ci
adev:
runs-on:
labels: ubuntu-latest-4core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Build adev in fast mode to ensure it continues to work
@@ -95,13 +119,15 @@ jobs:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: yarn install --frozen-lockfile
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
@@ -113,7 +139,7 @@ jobs:
labels: ubuntu-latest-4core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
node-module-directories: |
@@ -121,9 +147,11 @@ jobs:
./packages/zone.js/node_modules
./packages/zone.js/test/typings/node_modules
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: yarn install --frozen-lockfile
- run: |
@@ -154,18 +182,18 @@ jobs:
- run: yarn --cwd packages/zone.js/test/typings install --frozen-lockfile --non-interactive
- run: yarn --cwd packages/zone.js/test/typings test
saucelabs:
runs-on: ubuntu-latest-4core
env:
SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
with:
cache-node-modules: true
- name: Install node modules
run: yarn install --frozen-lockfile
- uses: ./.github/actions/saucelabs-legacy
# saucelabs:
# runs-on: ubuntu-latest-4core
# env:
# SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
# steps:
# - name: Initialize environment
# uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
# with:
# cache-node-modules: true
# - name: Install node modules
# run: yarn install --frozen-lockfile
# - uses: ./.github/actions/saucelabs-legacy
adev-deploy:
needs: [adev]
@@ -173,11 +201,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Build adev to ensure it continues to work
+2 -2
View File
@@ -13,13 +13,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: angular/dev-infra/github-actions/commit-message-based-labels@002a34e9875f55bf1850fb57d34261b33b2fd492
- uses: angular/dev-infra/github-actions/commit-message-based-labels@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
post_approval_changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: angular/dev-infra/github-actions/post-approval-changes@002a34e9875f55bf1850fb57d34261b33b2fd492
- uses: angular/dev-infra/github-actions/post-approval-changes@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: angular/dev-infra/github-actions/google-internal-tests@002a34e9875f55bf1850fb57d34261b33b2fd492
- uses: angular/dev-infra/github-actions/google-internal-tests@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
run-tests-guide-url: http://go/angular-g3sync-start
github-token: ${{ secrets.GITHUB_TOKEN }}
+4 -4
View File
@@ -13,17 +13,17 @@ jobs:
JOBS: 2
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/saucelabs@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Set up Sauce Tunnel Daemon
run: yarn bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
env:
+1 -1
View File
@@ -9,6 +9,6 @@ jobs:
status:
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/unified-status-check@002a34e9875f55bf1850fb57d34261b33b2fd492
- uses: angular/dev-infra/github-actions/unified-status-check@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+3 -3
View File
@@ -21,7 +21,7 @@ jobs:
workflows: ${{ steps.workflows.outputs.workflows }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn -s install --frozen-lockfile
- id: workflows
@@ -36,9 +36,9 @@ jobs:
workflow: ${{ fromJSON(needs.list.outputs.workflows) }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn -s install --frozen-lockfile
# We utilize the google-github-actions/auth action to allow us to get an active credential using workflow
+53 -31
View File
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Install node modules
@@ -39,7 +39,7 @@ jobs:
- name: Check code format
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
- name: Check Package Licenses
uses: angular/dev-infra/github-actions/linting/licenses@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/linting/licenses@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
allow-dependencies-licenses: 'pkg:npm/google-protobuf@'
@@ -47,13 +47,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Run unit tests
@@ -65,17 +65,39 @@ jobs:
runs-on: ubuntu-latest-4core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn install --frozen-lockfile --network-timeout 100000
- name: Run CI tests for framework
run: yarn test:ci
- name: Upload GRPC logs (for debugging of RBE issues)
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
path: /tmp/rbe-grpc.log
retention-days: 1
integration-tests:
runs-on: ubuntu-latest-4core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn install --frozen-lockfile --network-timeout 100000
- name: Run integration CI tests for framework
run: yarn integration-tests:ci
artifacts:
needs: [test]
@@ -83,19 +105,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn install --frozen-lockfile --network-timeout 100000
- name: Run CI tests for framework
- name: Build artifacts
run: yarn tsx ./scripts/build/build-packages-dist.mts
- name: Archive build artifacts
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: pr-artifacts-${{ github.event.number }}
path: dist/packages-dist/
@@ -105,11 +127,11 @@ jobs:
labels: ubuntu-latest-4core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Build adev in fast mode to ensure it continues to work
@@ -124,7 +146,7 @@ jobs:
labels: ubuntu-latest-4core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
with:
cache-node-modules: true
node-module-directories: |
@@ -132,9 +154,9 @@ jobs:
./packages/zone.js/node_modules
./packages/zone.js/test/typings/node_modules
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/setup@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@002a34e9875f55bf1850fb57d34261b33b2fd492
uses: angular/dev-infra/github-actions/bazel/configure-remote@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
- name: Install node modules
run: yarn install --frozen-lockfile
- run: |
@@ -165,15 +187,15 @@ jobs:
- run: yarn --cwd packages/zone.js/test/typings install --frozen-lockfile --non-interactive
- run: yarn --cwd packages/zone.js/test/typings test
saucelabs:
runs-on: ubuntu-latest-4core
env:
SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@002a34e9875f55bf1850fb57d34261b33b2fd492
with:
cache-node-modules: true
- name: Install node modules
run: yarn install --frozen-lockfile
- uses: ./.github/actions/saucelabs-legacy
# saucelabs:
# runs-on: ubuntu-latest-4core
# env:
# SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
# steps:
# - name: Initialize environment
# uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14c3d6bd2fa5c3231be7bd4b3c0bba68c9d79e94
# with:
# cache-node-modules: true
# - name: Install node modules
# run: yarn install --frozen-lockfile
# - uses: ./.github/actions/saucelabs-legacy
+3 -3
View File
@@ -30,7 +30,7 @@ jobs:
persist-credentials: false
- name: 'Run analysis'
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
with:
results_file: results.sarif
results_format: sarif
@@ -39,7 +39,7 @@ jobs:
# Upload the results as artifacts.
- name: 'Upload artifact'
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
@@ -47,6 +47,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
with:
sarif_file: results.sarif
@@ -0,0 +1,87 @@
name: Update ADEV Angular CDK APIs and CLI Help
on:
workflow_dispatch:
inputs: {}
push:
branches:
- 'main'
- '[0-9]+.[0-9]+.x'
# Declare default permissions as read only.
permissions:
contents: read
jobs:
update_adev_docs:
name: Update Angular CDK APIs and CLI Help (if necessary)
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
# Prevents multiple concurrent runs of this workflow for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
# an authenticated URL.
persist-credentials: false
# Angular CDK
- name: Generate CDK apis
run: node adev/scripts/update-cdk-apis/index.mjs
env:
ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN }}
- name: Create a PR CDK apis (if necessary)
uses: peter-evans/create-pull-request@v7.0.8 # v7.0.8
with:
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
push-to-fork: 'angular-robot/angular'
delete-branch: true
maintainer-can-modify: false
branch: docs-update-cdk-apis-${{github.ref_name}}
committer: Angular Robot <angular-robot@google.com>
author: Angular Robot <angular-robot@google.com>
title: 'docs: update Angular CDK apis [${{github.ref_name}}]'
body: |
Updated Angular CDK api files.
labels: |
action: merge
area: docs
commit-message: |
docs: update Angular CDK apis
Updated Angular CDK api files.
# Angular CLI
- name: Reset to current GitHub ref
run: |
git reset --hard ${{ github.ref }}
- name: Generate CLI help
run: node adev/scripts/update-cli-help/index.mjs
env:
ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }}
- name: Create a PR CLI help (if necessary)
uses: peter-evans/create-pull-request@v7.0.8 # v7.0.8
with:
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
push-to-fork: 'angular-robot/angular'
delete-branch: true
maintainer-can-modify: false
branch: docs-update-cli-help-${{github.ref_name}}
committer: Angular Robot <angular-robot@google.com>
author: Angular Robot <angular-robot@google.com>
title: 'docs: update Angular CLI help [${{github.ref_name}}]'
body: |
Updated Angular CLI help contents.
labels: |
action: merge
area: docs
commit-message: |
docs: update Angular CLI help
Updated Angular CLI help contents.
-44
View File
@@ -1,44 +0,0 @@
name: Update ADEV Angular CLI help
on:
workflow_dispatch:
inputs: {}
push:
branches:
- 'main'
- '[0-9]+.[0-9]+.x'
# Declare default permissions as read only.
permissions:
contents: read
jobs:
update_cli_help:
name: Update Angular CLI help (if necessary)
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
# an authenticated URL.
persist-credentials: false
# This is needed as otherwise the PR creation will fail with `shallow update not allowed` when the forked branch is not in sync.
fetch-depth: 0
- name: Generate CLI help
run: node adev/scripts/update-cli-help/index.mjs
env:
ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }}
- name: Create a PR (if necessary)
uses: angular/dev-infra/github-actions/create-pr-for-changes@002a34e9875f55bf1850fb57d34261b33b2fd492
with:
branch-prefix: update-cli-help
pr-title: 'docs: update Angular CLI help [${{github.ref_name}}]'
pr-description: |
Updated Angular CLI help contents.
pr-labels: |
action: review
area: docs
angular-robot-token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
+1 -1
View File
@@ -74,7 +74,7 @@ Fixes #<issue number>
# =============================
#
# The full specification of the Angular Commit Message Format can be found at
# https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit
# https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md
#
# The following is an excerpt of the specification with the most commonly needed info.
#
+2
View File
@@ -7,6 +7,8 @@ export const commitMessage: CommitMessageConfig = {
maxLineLength: Infinity,
minBodyLength: 20,
minBodyLengthTypeExcludes: ['docs'],
// If you update this, also update the docs.
// https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md#scope
scopes: [
'animations',
'bazel',
+3 -3
View File
@@ -7,8 +7,8 @@ export const format: FormatConfig = {
'prettier': {
'matchers': [
'**/*.{yaml,yml}',
'**/*.{js,ts}',
'devtools/**/*.{js,ts,html,scss}',
'**/*.{js,ts,mjs,mts,cjs,cts}',
'devtools/**/*.{js,ts,mjs,mts,cjs,cts,html,scss}',
// Do not format d.ts files as they are generated
'!**/*.d.ts',
@@ -22,7 +22,7 @@ export const format: FormatConfig = {
'!packages/common/locales/closure-locale.ts',
'!packages/common/src/i18n/currencies.ts',
// Test cases contain non valid code.
'!packages/compiler-cli/test/compliance/test_cases/**/*.{js,ts}',
'!packages/compiler-cli/test/compliance/test_cases/**/*.{js,ts,mjs,mts,cjs,cts}',
// Ignore generated javascript file(s)
'!.github/actions/deploy-docs-site/main.js',
+1
View File
@@ -2,6 +2,7 @@ import {ReleaseConfig} from '@angular/ng-dev';
/** Configuration for the `ng-dev release` command. */
export const release: ReleaseConfig = {
rulesJsInteropMode: true,
publishRegistry: 'https://wombat-dressing-room.appspot.com',
representativeNpmPackage: '@angular/core',
npmPackages: [
+7 -1
View File
@@ -1 +1,7 @@
engine-strict = true
# Yarn Berry doesn't check engines at all, so pnpm shouldn't either.
engine-strict = false
# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on
# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what
# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules)
hoist=false
+3
View File
@@ -0,0 +1,3 @@
.prettierrc
pnpm-lock.yaml
+3 -30
View File
@@ -144,7 +144,6 @@ groups:
- >
contains_any_globs(files.exclude('packages/core/primitives/*'), [
'contributing-docs/public-api-surface.md',
'goldens/circular-deps/packages.json',
'integration/**/{*,.*}',
'modules/**/{*,.*}',
'packages/animations/**/{*,.*}',
@@ -288,6 +287,7 @@ groups:
- MarkTechson
- kirjs
- mmalerba
- ~hawkgs
# =========================================================
# Angular DevTools
@@ -336,7 +336,6 @@ groups:
'scripts/**/{*,.*}',
'third_party/**/{*,.*}',
'tools/bazel-repo-patches/**/{*,.*}',
'tools/circular_dependency_test/**/{*,.*}',
'tools/contributing-stats/**/{*,.*}',
'tools/esm-interop/**/{*,.*}',
'tools/gulp-tasks/**/{*,.*}',
@@ -395,6 +394,8 @@ groups:
- pkozlowski-opensource
- kirjs
- mmalerba
- crisbeto
- devversion
- ~iteriani
- ~tbondwilkinson
- ~rahatarmanahmed
@@ -430,28 +431,6 @@ groups:
required: 1 # Require that 1 person approve
reviewed_for: required
# ================================================
# Circular dependencies
# ================================================
circular-dependencies:
<<: *defaults
conditions:
- *no-groups-above-this-pending
- *no-groups-above-this-rejected
- >
contains_any_globs(files, [
'goldens/circular-deps/packages.json'
])
reviewers:
users:
- alxhub
- AndrewKushnir
- atscott
- ~jelbourn
- thePunderWoman
- pkozlowski-opensource
- kirjs
####################################################################################
# Special Cases
####################################################################################
@@ -511,13 +490,7 @@ groups:
reviewers:
users:
- csmick # Cameron Smick
- lannka # Hongfei Ding
- eduhmc # Eduardo Huerta-Mercado
- ehlemur # Edward Lesmes
- ellenyuan # Ellen Yuan
- jesse-good # Jesse Costello-Good
- mturco # Matt Turco
- neonstalwart # Ben Hockey
- iteriani # Thomas Nguyen
- tbondwilkinson # Tom Wilkinson
- rahatarmanahmed # Rahat Ahmed
+8 -5
View File
@@ -1,9 +1,9 @@
{
"[javascript]": {
"editor.formatOnSave": true,
"editor.formatOnSave": true
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.formatOnSave": true
},
// Exclude third party modules and build artifacts from the editor watchers/searches.
"files.watcherExclude": {
@@ -11,14 +11,17 @@
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/bazel-out/**": true,
"**/dist/**": true,
"**/dist/**": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/bazel-out": true,
"**/dist": true,
".history": true,
".history": true
},
"git.ignoreLimitWarning": true,
}
"gitlens.advanced.blame.customArguments": [
"--ignore-revs-file .git-blame-ignore-revs"
]
}
+6 -1
View File
@@ -1,6 +1,7 @@
load("//tools:defaults.bzl", "nodejs_binary")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//:yarn.bzl", "YARN_PATH")
load("//tools:defaults.bzl", "nodejs_binary")
package(default_visibility = ["//visibility:public"])
@@ -16,6 +17,10 @@ exports_files([
"angular.json",
])
npm_link_all_packages(
name = "node_modules",
)
filegroup(
# filegroup is needed so that this package.json file can be a dep
# in a js_library target, which doesn't allow source file deps
+326 -101
View File
@@ -1,3 +1,329 @@
<a name="19.2.14"></a>
# 19.2.14 (2025-05-28)
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [24bab55f0c](https://github.com/angular/angular/commit/24bab55f0c89c4fe6037780fd7b2e8c8aa5429b2) | fix | lexer support for template literals in object literals ([#61601](https://github.com/angular/angular/pull/61601)) |
### migrations
| Commit | Type | Description |
| -- | -- | -- |
| [9e1cd49662](https://github.com/angular/angular/commit/9e1cd4966202d89c7310ab84c50b2c4231a0213e) | fix | preserve comments when removing unused imports ([#61674](https://github.com/angular/angular/pull/61674)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.13"></a>
# 19.2.13 (2025-05-23)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [2c876b4fc5](https://github.com/angular/angular/commit/2c876b4fc5d89ce925b1403e239c7d162e39346b) | fix | avoid injecting ApplicationRef in FetchBackend ([#61649](https://github.com/angular/angular/pull/61649)) |
### service-worker
| Commit | Type | Description |
| -- | -- | -- |
| [b15bddfa04](https://github.com/angular/angular/commit/b15bddfa04e11827166b466c9acbb89c77499d5d) | fix | do not register service worker if app is destroyed before it is ready to register ([#61101](https://github.com/angular/angular/pull/61101)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.12"></a>
# 19.2.12 (2025-05-21)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [126efc9972](https://github.com/angular/angular/commit/126efc9972e18806e71977d51a55f8ec2f0514d6) | fix | cancel reader when app is destroyed ([#61528](https://github.com/angular/angular/pull/61528)) |
| [efda872453](https://github.com/angular/angular/commit/efda8724535a8560a64b28cc2bf81df5931af686) | fix | prevent reading chunks if app is destroyed ([#61354](https://github.com/angular/angular/pull/61354)) |
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [44bb328eae](https://github.com/angular/angular/commit/44bb328eaea028524206d0d2b9f12702c9bf3861) | fix | avoid conflicts between HMR code and local symbols ([#61550](https://github.com/angular/angular/pull/61550)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [107180260f](https://github.com/angular/angular/commit/107180260f2ac4ca8e8995e123f36944c8bec2f3) | fix | Always retain prior results for all files ([#61487](https://github.com/angular/angular/pull/61487)) |
| [1191e62d70](https://github.com/angular/angular/commit/1191e62d70ee16f3b083b635dd60a9f2e0c2d4c7) | fix | avoid ECMAScript private field metadata emit ([#61227](https://github.com/angular/angular/pull/61227)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [2b1b14f4d3](https://github.com/angular/angular/commit/2b1b14f4d3751b9b3c351ddc412ecdcb2aea4781) | fix | cleanup `rxResource` abort listener ([#58306](https://github.com/angular/angular/pull/58306)) |
| [8f9b05eaaa](https://github.com/angular/angular/commit/8f9b05eaaabf14d7570fde16e26a73d69f78dc14) | fix | cleanup testability subscriptions ([#61261](https://github.com/angular/angular/pull/61261)) |
| [eb53bda470](https://github.com/angular/angular/commit/eb53bda470312d449039ef9b1494e3b6cc081e42) | fix | enable stashing only when `withEventReplay()` is invoked ([#61352](https://github.com/angular/angular/pull/61352)) |
| [94f5a4b4d6](https://github.com/angular/angular/commit/94f5a4b4d6ee195e05e7d2683ab386ee02d60a06) | fix | Testing should not throw when Zone does not patch test FW APIs ([#61376](https://github.com/angular/angular/pull/61376)) |
| [c0c69a5abc](https://github.com/angular/angular/commit/c0c69a5abc7262887eaa1f0b84a6ec22be225994) | fix | unregister `onDestroy` in `toSignal`. ([#61514](https://github.com/angular/angular/pull/61514)) |
### platform-server
| Commit | Type | Description |
| -- | -- | -- |
| [8edafd0559](https://github.com/angular/angular/commit/8edafd05599b402f383e36879f76f2d5507450e8) | perf | speed up resolution of base ([#61392](https://github.com/angular/angular/pull/61392)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.11"></a>
# 19.2.11 (2025-05-15)
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.10"></a>
# 19.2.10 (2025-05-07)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [89056a0356](https://github.com/angular/angular/commit/89056a035648906d82ed2bbf523b793bce732474) | fix | cleanup `updateLatestValue` if view is destroyed before promise resolves ([#61064](https://github.com/angular/angular/pull/61064)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [4623b61448](https://github.com/angular/angular/commit/4623b6144897c6063139afa2d189be4e2e1d70ba) | fix | missing useExisting providers throwing for optional calls ([#61152](https://github.com/angular/angular/pull/61152)) |
| [400dbc5b89](https://github.com/angular/angular/commit/400dbc5b89a2af0ae5fd7830f6ea47352c8556ef) | fix | properly handle app stabilization with defer blocks ([#61056](https://github.com/angular/angular/pull/61056)) |
### platform-server
| Commit | Type | Description |
| -- | -- | -- |
| [a6f0d5bc20](https://github.com/angular/angular/commit/a6f0d5bc20382689b7336a7e1c79c0685252cc21) | fix | less aggressive ngServerMode cleanup ([#61106](https://github.com/angular/angular/pull/61106)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.9"></a>
# 19.2.9 (2025-04-30)
### core
| Commit | Type | Description |
| -- | -- | -- |
| [946b844e0d](https://github.com/angular/angular/commit/946b844e0db7e8f2cabcaf4cb63abced62c01fc7) | fix | async EventEmitter error should not prevent stability ([#61028](https://github.com/angular/angular/pull/61028)) |
| [dbb87026ca](https://github.com/angular/angular/commit/dbb87026ca10c5fb04fc1a350da27ea42cea7dc5) | fix | call DestroyRef on destroy callback if view is destroyed [patch] ([#61061](https://github.com/angular/angular/pull/61061)) |
| [2e140a136a](https://github.com/angular/angular/commit/2e140a136a044a965da7f55e0d83731860671a05) | fix | prevent stash listener conflicts [patch] ([#61063](https://github.com/angular/angular/pull/61063)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.8"></a>
# 19.2.8 (2025-04-23)
### forms
| Commit | Type | Description |
| -- | -- | -- |
| [ea4a211216](https://github.com/angular/angular/commit/ea4a21121681c78652f314c78c58390dca25f266) | fix | make NgForm emit FormSubmittedEvent and FormResetEvent ([#60887](https://github.com/angular/angular/pull/60887)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.7"></a>
# 19.2.7 (2025-04-16)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [37ab6814f5](https://github.com/angular/angular/commit/37ab6814f5485434d9642b9f9c28dd430864247b) | fix | issue a warning instead of an error when `NgOptimizedImage` exceeds the preload limit ([#60883](https://github.com/angular/angular/pull/60883)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [b144126612](https://github.com/angular/angular/commit/b144126612e2cd14cbccc8d3cf4e2136a2e540ff) | fix | inject migration: replace param with this. ([#60713](https://github.com/angular/angular/pull/60713)) |
### http
| Commit | Type | Description |
| -- | -- | -- |
| [d39e09da41](https://github.com/angular/angular/commit/d39e09da413732385a12ed21eb468649233e26d0) | fix | Include HTTP status code and headers when HTTP requests errored in `httpResource` ([#60802](https://github.com/angular/angular/pull/60802)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.6"></a>
# 19.2.6 (2025-04-09)
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [3441f7b914](https://github.com/angular/angular/commit/3441f7b914c73ccdaacbcd935e945dc304c5962a) | fix | error if rawText isn't estimated correctly ([#60529](https://github.com/angular/angular/pull/60529)) ([#60753](https://github.com/angular/angular/pull/60753)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [fc946c5f72](https://github.com/angular/angular/commit/fc946c5f7261ee3e49fa037bc55703b9ffcfbff3) | fix | ensure HMR works with different output module type ([#60797](https://github.com/angular/angular/pull/60797)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [f2bfa3151e](https://github.com/angular/angular/commit/f2bfa3151ee7ecb335665d55741387bd67ebee9d) | fix | fix ng generate @angular/core:output-migration. Fixes angular[#58650](https://github.com/angular/angular/pull/58650) ([#60763](https://github.com/angular/angular/pull/60763)) |
| [9241615ad0](https://github.com/angular/angular/commit/9241615ad0825156f4bf31bc4308372e4789e902) | fix | reduce total memory usage of various migration schematics ([#60776](https://github.com/angular/angular/pull/60776)) |
### language-service
| Commit | Type | Description |
| -- | -- | -- |
| [0e82d42774](https://github.com/angular/angular/commit/0e82d427743c1d22e1683da11f66e33846f38663) | fix | Do not provide element completions in end tag ([#60616](https://github.com/angular/angular/pull/60616)) |
| [fcdef1019f](https://github.com/angular/angular/commit/fcdef1019fd28c7261590ba484a949c809b9ceaf) | fix | Ensure dollar signs are escaped in completions ([#60597](https://github.com/angular/angular/pull/60597)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.5"></a>
# 19.2.5 (2025-04-02)
###
| Commit | Type | Description |
| -- | -- | -- |
| [e61d06afb5](https://github.com/angular/angular/commit/e61d06afb5f68268b204bb2630930bb213620811) | fix | step 6 tutorial docs ([#60630](https://github.com/angular/angular/pull/60630)) |
### animations
| Commit | Type | Description |
| -- | -- | -- |
| [fa48f98d9f](https://github.com/angular/angular/commit/fa48f98d9f7e7b74deba65bea9bc90843b1c283b) | fix | add missing peer dependency on `@angular/common` ([#60660](https://github.com/angular/angular/pull/60660)) |
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [ca5aa4d55b](https://github.com/angular/angular/commit/ca5aa4d55b352d1ead43d78b6a74d9e3b57f8777) | fix | throw for invalid "as" expression in if block ([#60580](https://github.com/angular/angular/pull/60580)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [f4c4b10ea8](https://github.com/angular/angular/commit/f4c4b10ea8dc263c30d1051a83a72486344d81e4) | fix | Produce fatal diagnostic on duplicate decorated properties ([#60376](https://github.com/angular/angular/pull/60376)) |
| [22a0e54ac4](https://github.com/angular/angular/commit/22a0e54ac4ae7b943740dc314ff7f26ee7530ee5) | fix | support relative imports to symbols outside `rootDir` ([#60555](https://github.com/angular/angular/pull/60555)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [64da69f7b6](https://github.com/angular/angular/commit/64da69f7b68c906544b3cb76b2fc7ec42cc434a8) | fix | check ngDevMode for undefined ([#60565](https://github.com/angular/angular/pull/60565)) |
| [8f68d1bec3](https://github.com/angular/angular/commit/8f68d1bec320c8af4c28ad6c8dbeda4581e8299b) | fix | fix ng generate @angular/core:output-migration ([#60626](https://github.com/angular/angular/pull/60626)) |
| [bc79985c65](https://github.com/angular/angular/commit/bc79985c65c38dee17f5cb53f2a14768632f72dc) | fix | fix regexp for event types ([#60592](https://github.com/angular/angular/pull/60592)) |
| [006ac7f22f](https://github.com/angular/angular/commit/006ac7f22f47b110129ca603cfa34f5514d7b4dd) | fix | fixes [#592882](https://github.com/angular/angular/pull/592882) ng generate @angular/core:signal-queries-migration ([#60688](https://github.com/angular/angular/pull/60688)) |
| [da6e93f434](https://github.com/angular/angular/commit/da6e93f4341804cd16327596c30d8f9258b40d7e) | fix | preserve comments in internal inject migration ([#60588](https://github.com/angular/angular/pull/60588)) |
| [dbbddd1617](https://github.com/angular/angular/commit/dbbddd161721990f29a037f88f930b333712550e) | fix | prevent omission of deferred pipes in full compilation ([#60571](https://github.com/angular/angular/pull/60571)) |
### language-service
| Commit | Type | Description |
| -- | -- | -- |
| [0e9e0348dd](https://github.com/angular/angular/commit/0e9e0348dd972c96ecee8bb990aba8c604dc704f) | fix | Update adapter to log instead of throw errors ([#60651](https://github.com/angular/angular/pull/60651)) |
### migrations
| Commit | Type | Description |
| -- | -- | -- |
| [15f53f035b](https://github.com/angular/angular/commit/15f53f035ba64fa761db64d48dd9daa1499370e3) | fix | handle shorthand assignments in super call ([#60602](https://github.com/angular/angular/pull/60602)) |
| [4b161e6234](https://github.com/angular/angular/commit/4b161e62344a51e87f1b5c5778fd72e56fc37922) | fix | inject migration not handling super parameter referenced via this ([#60602](https://github.com/angular/angular/pull/60602)) |
### router
| Commit | Type | Description |
| -- | -- | -- |
| [958e98e4f7](https://github.com/angular/angular/commit/958e98e4f7ab8e708440f03eb68612d1802b9a71) | fix | Add missing types to transition ([#60307](https://github.com/angular/angular/pull/60307)) |
### service-worker
| Commit | Type | Description |
| -- | -- | -- |
| [7cd89ad2c6](https://github.com/angular/angular/commit/7cd89ad2c66adeb625f75d23fea32e762162d3d5) | fix | assign initializing client's app version, when a request is for worker script ([#58131](https://github.com/angular/angular/pull/58131)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.4"></a>
# 19.2.4 (2025-03-26)
### core
| Commit | Type | Description |
| -- | -- | -- |
| [081f5f5a83f](https://github.com/angular/angular/commit/081f5f5a83fef99718952519bed9fe39005d6d37) | fix | fix used templates are not deleted ([#60459](https://github.com/angular/angular/pull/60459)) |
### localize
| Commit | Type | Description |
| -- | -- | -- |
| [a2f622d82d6](https://github.com/angular/angular/commit/a2f622d82d6c0f93a5fdf34fc8e5829db04c7380) | fix | handle @angular/build:karma in ng add ([#60513](https://github.com/angular/angular/pull/60513)) |
### platform-browser
| Commit | Type | Description |
| -- | -- | -- |
| [8e8ccc79279](https://github.com/angular/angular/commit/8e8ccc792790c876cf5831f3d7a504290c665a1b) | fix | ensure `platformBrowserTesting` includes `platformBrowser` providers ([#60480](https://github.com/angular/angular/pull/60480)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.3"></a>
# 19.2.3 (2025-03-19)
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [aa8ea7a5b2](https://github.com/angular/angular/commit/aa8ea7a5b227913e3f15270dac48479481c47f9a) | fix | report more accurate diagnostic for invalid import ([#60455](https://github.com/angular/angular/pull/60455)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [13a8709b2b](https://github.com/angular/angular/commit/13a8709b2ba29ef3ab7d38bfb41cdd3d44c24c51) | fix | catch hydration marker with implicit body tag ([#60429](https://github.com/angular/angular/pull/60429)) |
| [296aded9da](https://github.com/angular/angular/commit/296aded9daaf04edd3cda623a220cbd2bf57e0f1) | fix | execute timer trigger outside zone ([#60392](https://github.com/angular/angular/pull/60392)) |
| [0615ffb4f7](https://github.com/angular/angular/commit/0615ffb4f7a41cca2a408419830411897d1826e6) | fix | include input name in error message ([#60404](https://github.com/angular/angular/pull/60404)) |
### platform-browser-dynamic
| Commit | Type | Description |
| -- | -- | -- |
| [1e06c8e8b6](https://github.com/angular/angular/commit/1e06c8e8b6473a19584ceb66945fd435ea4e6af9) | fix | ensure compiler is loaded before `@angular/common` ([#60458](https://github.com/angular/angular/pull/60458)) |
### upgrade
| Commit | Type | Description |
| -- | -- | -- |
| [9e1a1030c8](https://github.com/angular/angular/commit/9e1a1030c818e9849c00ded5f79535ea56976ea8) | fix | handle output emitters when downgrading a component ([#60369](https://github.com/angular/angular/pull/60369)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.2"></a>
# 19.2.2 (2025-03-12)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [90a16a1088](https://github.com/angular/angular/commit/90a16a10888eee37d8a61cdbfad070e002a3cfdf) | fix | support equality function in httpResource ([#60026](https://github.com/angular/angular/pull/60026)) |
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [56b551d273](https://github.com/angular/angular/commit/56b551d273a0978e1f2e2ef914c1d7ae942a28a8) | fix | incorrect spans for template literals ([#60323](https://github.com/angular/angular/pull/60323)) ([#60331](https://github.com/angular/angular/pull/60331)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [23ca88522b](https://github.com/angular/angular/commit/23ca88522bbc23e24a2b20e48e62edcce3a42eb6) | fix | handle transformed classes when generating HMR code ([#60298](https://github.com/angular/angular/pull/60298)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [6dc41265fd](https://github.com/angular/angular/commit/6dc41265fd47df3fd0462bcd8f451eb6aea972ef) | fix | check whether application is destroyed before initializing event replay ([#59789](https://github.com/angular/angular/pull/59789)) |
| [bb12b30d52](https://github.com/angular/angular/commit/bb12b30d5213912f50f53aff60a11e6d47349c82) | fix | ensures immediate trigger fires properly with lazy loaded routes ([#60203](https://github.com/angular/angular/pull/60203)) |
| [b144dd946e](https://github.com/angular/angular/commit/b144dd946e38e52ce716aca7c6ba7c1a1a02f13d) | fix | fix removal of a container reference used in the component file ([#60210](https://github.com/angular/angular/pull/60210)) |
### platform-server
| Commit | Type | Description |
| -- | -- | -- |
| [15c42969fc](https://github.com/angular/angular/commit/15c42969fc42c76e3bd593201164183fb82d70f6) | fix | add missing peer dependency for `rxjs` ([#60308](https://github.com/angular/angular/pull/60308)) |
### router
| Commit | Type | Description |
| -- | -- | -- |
| [7bcdf7c143](https://github.com/angular/angular/commit/7bcdf7c1435f766b2b0bbd383358ef2ddabf217a) | fix | update symbols ([#60233](https://github.com/angular/angular/pull/60233)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.1"></a>
# 19.2.1 (2025-03-05)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [c2de5f68b3](https://github.com/angular/angular/commit/c2de5f68b3d3cd8a0c43b3c4325a1a1db874e132) | fix | clean up `onUrlChange` listener when root scope is destroyed ([#60004](https://github.com/angular/angular/pull/60004)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [1dd94476b3](https://github.com/angular/angular/commit/1dd94476b35d08e753766b1d0c5d8af5faa017a9) | fix | ensure template IDs are not reused if a source file changes ([#60152](https://github.com/angular/angular/pull/60152)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [1b3b05bf72](https://github.com/angular/angular/commit/1b3b05bf7294963aa50f83b726db620b250b1a5c) | fix | cache ComponentRef inputs and outputs ([#60156](https://github.com/angular/angular/pull/60156)) |
| [330c24aed9](https://github.com/angular/angular/commit/330c24aed92e4b916fb7ac6a91fb17c3ae728869) | fix | prevent invoking replay listeners on disconnected nodes ([#60103](https://github.com/angular/angular/pull/60103)) |
| [cfad089cc3](https://github.com/angular/angular/commit/cfad089cc359cddf08d462662d2a6bf3acab9b22) | fix | prevents event replay from being called on comment nodes ([#60130](https://github.com/angular/angular/pull/60130)) |
### language-service
| Commit | Type | Description |
| -- | -- | -- |
| [3f0116607d](https://github.com/angular/angular/commit/3f0116607dc3ad7e31cb4d895a56094f77c82f5d) | fix | Forward the tags for quick info from the type definition ([#59524](https://github.com/angular/angular/pull/59524)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.0"></a>
# 19.2.0 (2025-02-26)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [3e39da593a](https://github.com/angular/angular/commit/3e39da593a0a0c047a2a03b8d5fcabf9dbace40f) | feat | introduce experimental `httpResource` ([#59876](https://github.com/angular/angular/pull/59876)) |
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [5b20bab96d](https://github.com/angular/angular/commit/5b20bab96d20fe89b5cc4b4af28edbaae2604da1) | feat | Add Skip Hydration diagnostic. ([#59576](https://github.com/angular/angular/pull/59576)) |
| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [2588985f43](https://github.com/angular/angular/commit/2588985f433b20a6a5a8d239347291f5d6fb2451) | feat | pass signal node to throwInvalidWriteToSignalErrorFn ([#59600](https://github.com/angular/angular/pull/59600)) |
| [168516462a](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |
| [146ab9a76e](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
| [6c92d65349](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |
| [96e602ebe9](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
| [127fc0dc84](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |
| [b592b1b051](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
| [a299e02e91](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
### forms
| Commit | Type | Description |
| -- | -- | -- |
| [fa0c3e3210](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
### migrations
| Commit | Type | Description |
| -- | -- | -- |
| [1cd3a7db83](https://github.com/angular/angular/commit/1cd3a7db83e1d05a31d23324676420b614cdabe2) | feat | add migration to convert templates to use self-closing tags ([#57342](https://github.com/angular/angular/pull/57342)) |
### platform-browser
| Commit | Type | Description |
| -- | -- | -- |
| [e6cb411e43](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
### platform-server
| Commit | Type | Description |
| -- | -- | -- |
| [fc5d187da5](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.7"></a>
# 19.1.7 (2025-02-19)
### common
@@ -15,30 +341,6 @@
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.0-next.3"></a>
# 19.2.0-next.3 (2025-02-13)
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [9e847fc60d](https://github.com/angular/angular/commit/9e847fc60d4eef47e665e789ccd2d4f0b4bb94ea) | fix | handle tracking expressions requiring temporary variables ([#58520](https://github.com/angular/angular/pull/58520)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [5cd26a9420](https://github.com/angular/angular/commit/5cd26a94206dfe8aabdf0dd15bfc09e7a8c606da) | fix | handle deferred blocks with shared dependencies correctly ([#59926](https://github.com/angular/angular/pull/59926)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
| [b0266bda4a](https://github.com/angular/angular/commit/b0266bda4ad4efd19710fd0363a50984f48269dc) | fix | invalidate HMR component if replacement throws an error ([#59854](https://github.com/angular/angular/pull/59854)) |
### migrations
| Commit | Type | Description |
| -- | -- | -- |
| [aa285c548c](https://github.com/angular/angular/commit/aa285c548c164917ebb5760802484843c6830daf) | fix | account for let declarations in control flow migration ([#59861](https://github.com/angular/angular/pull/59861)) |
| [1119f85ca9](https://github.com/angular/angular/commit/1119f85ca935f43641f53ee8bc50efa47ad09717) | fix | count used dependencies inside existing control flow ([#59861](https://github.com/angular/angular/pull/59861)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.6"></a>
# 19.1.6 (2025-02-12)
### compiler
@@ -61,27 +363,6 @@
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.0-next.2"></a>
# 19.2.0-next.2 (2025-02-06)
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [a97136052f9](https://github.com/angular/angular/commit/a97136052f9cfdb696a3b335ed7a1b9fb994d408) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
| [bae94b82fda](https://github.com/angular/angular/commit/bae94b82fda1669a6aafad975a3a0eb6f2743039) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
| [03bcd30e348](https://github.com/angular/angular/commit/03bcd30e3487443983d450a5dfea2d68d551bbd3) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [146ab9a76e6](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
| [b592b1b0516](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
| [a299e02e914](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
### forms
| Commit | Type | Description |
| -- | -- | -- |
| [fa0c3e32108](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.5"></a>
# 19.1.5 (2025-02-06)
### compiler-cli
@@ -93,45 +374,6 @@
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.0-next.1"></a>
# 19.2.0-next.1 (2025-01-29)
### core
| Commit | Type | Description |
| -- | -- | -- |
| [168516462a9](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
| [6c92d653493](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |
| [96e602ebe9c](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
| [cf9054248d1](https://github.com/angular/angular/commit/cf9054248d1b8b5658c5f8b582cea71535f081c2) | fix | check whether application is destroyed before printing hydration stats ([#59716](https://github.com/angular/angular/pull/59716)) |
| [82876242e55](https://github.com/angular/angular/commit/82876242e557abbced793cff06c4d68c4721e6d2) | fix | ensure type is preserved during HMR ([#59700](https://github.com/angular/angular/pull/59700)) |
| [127fc0dc847](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |
| [f862ace1819](https://github.com/angular/angular/commit/f862ace18191d7fda3b12fc3c6486c035a6b431d) | fix | fixes test timer-based test flakiness in CI ([#59674](https://github.com/angular/angular/pull/59674)) |
### elements
| Commit | Type | Description |
| -- | -- | -- |
| [0c1ecb453c8](https://github.com/angular/angular/commit/0c1ecb453c8b01447fb5a9f38fdfe9936a60abe5) | fix | not setting initial value on signal-based input ([#59773](https://github.com/angular/angular/pull/59773)) |
### platform-browser
| Commit | Type | Description |
| -- | -- | -- |
| [e6cb411e439](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
| [6b09716754b](https://github.com/angular/angular/commit/6b09716754b979c98489a2710eda977e51fe92d0) | fix | prepend `baseHref` to `sourceMappingURL` in CSS content ([#59730](https://github.com/angular/angular/pull/59730)) |
| [fd7ee47bf70](https://github.com/angular/angular/commit/fd7ee47bf702029e481ad40362684f0a01ef2ec0) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
| [65cf061feb4](https://github.com/angular/angular/commit/65cf061feb402e1532cd06d0fda5d2b7749ac421) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
| [af9d74710c4](https://github.com/angular/angular/commit/af9d74710c460b0aaeaf3226533e9e544025523c) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
### platform-server
| Commit | Type | Description |
| -- | -- | -- |
| [fc5d187da5e](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |
### router
| Commit | Type | Description |
| -- | -- | -- |
| [c7b6e1107c6](https://github.com/angular/angular/commit/c7b6e1107c6fcc7ed1dbb7c7b8698b09bfa8f1cc) | fix | prevent error handling when injector is destroyed ([#59457](https://github.com/angular/angular/pull/59457)) |
### service-worker
| Commit | Type | Description |
| -- | -- | -- |
| [e2987a1d4ab](https://github.com/angular/angular/commit/e2987a1d4ab09b1abf1f42597c40f2055db116e1) | fix | add missing `rxjs` peer dependency ([#59747](https://github.com/angular/angular/pull/59747)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.4"></a>
# 19.1.4 (2025-01-29)
### core
@@ -162,23 +404,6 @@
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.0-next.0"></a>
# 19.2.0-next.0 (2025-01-22)
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [ed705a856a](https://github.com/angular/angular/commit/ed705a856a164f91d33e2173b4f371329d07c472) | feat | detect missing structural directive imports ([#59443](https://github.com/angular/angular/pull/59443)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.3"></a>
# 19.1.3 (2025-01-22)
### compiler
+6 -155
View File
@@ -103,7 +103,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
8. Run the full Angular test suite, as described in the [developer documentation][dev-doc], and ensure that all tests pass.
9. Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit).
9. Commit your changes using a descriptive commit message that follows our [commit message conventions][commit-message-guidelines].
Adherence to these conventions is necessary because release notes are automatically generated from these messages.
```shell
@@ -145,7 +145,7 @@ That's it! Thank you for your contribution!
##### Updating the commit message
A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our [commit message guidelines](#commit)).
A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our [commit message guidelines][commit-message-guidelines]).
In order to update the commit message of the last commit on your branch:
1. Check out your branch:
@@ -210,163 +210,14 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
An automated formatter is available, see [DEVELOPER.md](contributing-docs/building-and-testing-angular.md#formatting-your-source-code).
## <a name="commit"></a> Commit Message Format
*This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].*
We have very precise rules over how our Git commit messages must be formatted.
This format leads to **easier to read commit history**.
Each commit message consists of a **header**, a **body**, and a **footer**.
```
<header>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The `header` is mandatory and must conform to the [Commit Message Header](#commit-header) format.
The `body` is mandatory for all commits except for those of type "docs".
When the body is present it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-body) format.
The `footer` is optional. The [Commit Message Footer](#commit-footer) format describes what the footer is used for and the structure it must have.
#### <a name="commit-header"></a>Commit Message Header
## <a name="commit"></a> Commit Message Guidelines
We have very precise rules over how our Git commit messages must be formatted:
```
<type>(<scope>): <short summary>
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
│ elements|forms|http|language-service|localize|platform-browser|
│ platform-browser-dynamic|platform-server|router|service-worker|
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|
│ devtools
│
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
```
The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is optional.
##### Type
Must be one of the following:
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
* **ci**: Changes to our CI configuration files and scripts (examples: Github Actions, SauceLabs)
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **test**: Adding missing tests or correcting existing tests
##### Scope
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
The following is the list of supported scopes:
* `animations`
* `bazel`
* `benchpress`
* `common`
* `compiler`
* `compiler-cli`
* `core`
* `elements`
* `forms`
* `http`
* `language-service`
* `localize`
* `platform-browser`
* `platform-browser-dynamic`
* `platform-server`
* `router`
* `service-worker`
* `upgrade`
* `zone.js`
There are currently a few exceptions to the "use package name" rule:
* `packaging`: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
* `changelog`: used for updating the release notes in CHANGELOG.md
* `dev-infra`: used for dev-infra related changes within the directories /scripts and /tools
* `docs-infra`: used for docs-app (angular.dev) related changes within the /adev directory of the repo
* `migrations`: used for changes to the `ng update` migrations.
* `devtools`: used for changes in the [browser extension](./devtools/README.md).
* none/empty string: useful for `test` and `refactor` changes that are done across all packages (e.g. `test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `docs: fix typo in tutorial`).
##### Summary
Use the summary field to provide a succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize the first letter
* no dot (.) at the end
#### <a name="commit-body"></a>Commit Message Body
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
Explain the motivation for the change in the commit message body. This commit message should explain _why_ you are making the change.
You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
#### <a name="commit-footer"></a>Commit Message Footer
The footer can contain information about breaking changes and deprecations and is also the place to reference GitHub issues, Jira tickets, and other PRs that this commit closes or is related to.
For example:
```
BREAKING CHANGE: <breaking change summary>
<BLANK LINE>
<breaking change description + migration instructions>
<BLANK LINE>
<BLANK LINE>
Fixes #<issue number>
```
or
```
DEPRECATED: <what is deprecated>
<BLANK LINE>
<deprecation description + recommended update path>
<BLANK LINE>
<BLANK LINE>
Closes #<pr number>
```
Breaking Change section should start with the phrase `BREAKING CHANGE: ` followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
Similarly, a Deprecation section should start with `DEPRECATED: ` followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path.
### Revert commits
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
The content of the commit message body should contain:
- information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
- a clear description of the reason for reverting the commit message.
See [Commit Message Guidelines][commit-message-guidelines] for details.
## <a name="cla"></a> Signing the CLA
@@ -390,9 +241,9 @@ The following documents can help you sort out issues with GitHub accounts and mu
[coc]: https://github.com/angular/code-of-conduct/blob/main/CODE_OF_CONDUCT.md
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
[corporate-cla]: https://cla.developers.google.com/about/google-corporate
[dev-doc]: ./contributing-docs/building-and-testing-angular.md
[commit-message-guidelines]: ./contributing-docs/commit-message-guidelines.md
[github]: https://github.com/angular/angular
[discord]: https://discord.gg/angular
[individual-cla]: https://cla.developers.google.com/about/google-individual
+1 -6
View File
@@ -26,9 +26,6 @@
<p align="center">
<a href="https://www.npmjs.com/@angular/core">
<img src="https://img.shields.io/npm/v/@angular/core.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen" alt="Angular on npm" />
</a>&nbsp;
<a href="https://discord.gg/angular">
<img src="https://img.shields.io/discord/463752820026376202.svg?logo=discord&logoColor=fff&label=Discord&color=7389d8" alt="Discord conversation" />
</a>
</p>
@@ -127,7 +124,6 @@ Join the conversation and help the community.
- [X (formerly Twitter)][X (formerly Twitter)]
- [Bluesky][bluesky]
- [Discord][discord]
- [Gitter][gitter]
- [YouTube][youtube]
- [StackOverflow][stackoverflow]
- Find a Local [Meetup][meetup]
@@ -141,7 +137,7 @@ Join the conversation and help the community.
[changelog]: CHANGELOG.md
[ng]: https://angular.dev
[documentation]: https://angular.dev/overview
[angularmaterial]: https://material.angular.io/
[angularmaterial]: https://material.angular.dev/
[cli]: https://angular.dev/tools/cli
[architecture]: https://angular.dev/essentials
[componentstemplates]: https://angular.dev/tutorials/learn-angular/1-components-in-angular
@@ -157,7 +153,6 @@ Join the conversation and help the community.
[X (formerly Twitter)]: https://www.twitter.com/angular
[bluesky]: https://bsky.app/profile/angular.dev
[discord]: https://discord.gg/angular
[gitter]: https://gitter.im/angular/angular
[stackoverflow]: https://stackoverflow.com/questions/tagged/angular
[youtube]: https://youtube.com/angular
[meetup]: https://www.meetup.com/find/?keywords=angular
+125 -28
View File
@@ -1,10 +1,8 @@
workspace(
name = "angular",
managed_directories = {
"@npm": ["node_modules"],
},
)
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//:yarn.bzl", "YARN_LABEL")
@@ -34,32 +32,43 @@ http_archive(
],
)
# Fetch Aspect lib for utilities like write_source_files
# NOTE: We cannot move past version 1.23.2 of aspect_bazel_lib because it requires us to move to bazel 6.0.0 which
# breaks our usage of managed_directories
http_archive(
name = "aspect_bazel_lib",
sha256 = "4b2e774387bae6242879820086b7b738d49bf3d0659522ea5d9363be01a27582",
strip_prefix = "bazel-lib-1.23.2",
url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v1.23.2.tar.gz",
name = "aspect_rules_js",
sha256 = "75c25a0f15a9e4592bbda45b57aa089e4bf17f9176fd735351e8c6444df87b52",
strip_prefix = "rules_js-2.1.0",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.1.0/rules_js-v2.1.0.tar.gz",
)
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_dependencies()
# Setup the Node.js toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
NODE_VERSION = "18.20.5"
NODE_18_REPO = {
"18.20.5-darwin_arm64": ("node-v18.20.5-darwin-arm64.tar.gz", "node-v18.20.5-darwin-arm64", "bdfeaf59dbf29aec08c0c66130edf0a8a17014b4f2997727641dfd0b58b51f48"),
"18.20.5-darwin_amd64": ("node-v18.20.5-darwin-x64.tar.gz", "node-v18.20.5-darwin-x64", "dff01068da7d3fe7b515f72a3903dca96a34dc377f6f426b6a813901274b6441"),
"18.20.5-linux_arm64": ("node-v18.20.5-linux-arm64.tar.xz", "node-v18.20.5-linux-arm64", "a77db6ab34267f3bc80e02ed68abf51b7065eb5c82fcd69adc4b40e390d9b116"),
"18.20.5-linux_ppc64le": ("node-v18.20.5-linux-ppc64le.tar.xz", "node-v18.20.5-linux-ppc64le", "63b4c6801c96fb452e3bd8125e8b5b195ecacc4fa2505e47a128e94587999aeb"),
"18.20.5-linux_s390x": ("node-v18.20.5-linux-s390x.tar.xz", "node-v18.20.5-linux-s390x", "617d7456e16534a4b4e03f5285cc8d13581f39cdad9196efff2516d6588de319"),
"18.20.5-linux_amd64": ("node-v18.20.5-linux-x64.tar.xz", "node-v18.20.5-linux-x64", "e4a3a21e5ac7e074ed50d2533dd0087d8460647ab567464867141a2b643f3fb3"),
"18.20.5-windows_amd64": ("node-v18.20.5-win-x64.zip", "node-v18.20.5-win-x64", "910237449895b4de61026568dc076fa6c3ffcd667563ed03112a4a77e1f1556b"),
}
nodejs_register_toolchains(
name = "nodejs",
node_repositories = {
"18.20.5-darwin_arm64": ("node-v18.20.5-darwin-arm64.tar.gz", "node-v18.20.5-darwin-arm64", "bdfeaf59dbf29aec08c0c66130edf0a8a17014b4f2997727641dfd0b58b51f48"),
"18.20.5-darwin_amd64": ("node-v18.20.5-darwin-x64.tar.gz", "node-v18.20.5-darwin-x64", "dff01068da7d3fe7b515f72a3903dca96a34dc377f6f426b6a813901274b6441"),
"18.20.5-linux_arm64": ("node-v18.20.5-linux-arm64.tar.xz", "node-v18.20.5-linux-arm64", "a77db6ab34267f3bc80e02ed68abf51b7065eb5c82fcd69adc4b40e390d9b116"),
"18.20.5-linux_ppc64le": ("node-v18.20.5-linux-ppc64le.tar.xz", "node-v18.20.5-linux-ppc64le", "63b4c6801c96fb452e3bd8125e8b5b195ecacc4fa2505e47a128e94587999aeb"),
"18.20.5-linux_s390x": ("node-v18.20.5-linux-s390x.tar.xz", "node-v18.20.5-linux-s390x", "617d7456e16534a4b4e03f5285cc8d13581f39cdad9196efff2516d6588de319"),
"18.20.5-linux_amd64": ("node-v18.20.5-linux-x64.tar.xz", "node-v18.20.5-linux-x64", "e4a3a21e5ac7e074ed50d2533dd0087d8460647ab567464867141a2b643f3fb3"),
"18.20.5-windows_amd64": ("node-v18.20.5-win-x64.zip", "node-v18.20.5-win-x64", "910237449895b4de61026568dc076fa6c3ffcd667563ed03112a4a77e1f1556b"),
},
# We need at least Node 18.20.5 due to some transitive dependencies.
node_version = "18.20.5",
node_repositories = NODE_18_REPO,
node_version = NODE_VERSION,
)
load("@aspect_rules_js//js:toolchains.bzl", "rules_js_register_toolchains")
rules_js_register_toolchains(
node_repositories = NODE_18_REPO,
node_version = NODE_VERSION,
)
# Download npm dependencies.
@@ -73,9 +82,10 @@ yarn_install(
data = [
YARN_LABEL,
"//:.yarnrc",
"//:tools/npm-patches/@angular+ng-dev+0.0.0-a6dcd24107d12114198251ee5d20cda814a1986a.patch",
"//:tools/npm-patches/@bazel+jasmine+5.8.1.patch",
"//tools:postinstall-patches.js",
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-d30a56c19bafaac67cf44e605ed8c2c0e45b0a51.patch",
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-2670abf637fa155971cdd1f7e570a7f234922a65.patch",
"//tools/esm-interop:patches/npm/@bazel+concatjs+5.8.1.patch",
"//tools/esm-interop:patches/npm/@bazel+esbuild+5.7.1.patch",
"//tools/esm-interop:patches/npm/@bazel+protractor+5.7.1.patch",
@@ -87,13 +97,65 @@ yarn_install(
exports_directories_only = False,
manual_build_file_contents = npm_package_archives(),
package_json = "//:package.json",
# We prefer to symlink the `node_modules` to only maintain a single install.
# See https://github.com/angular/dev-infra/pull/446#issuecomment-1059820287 for details.
symlink_node_modules = True,
yarn = YARN_LABEL,
yarn_lock = "//:yarn.lock",
)
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm2",
data = [
"//:package.json",
"//:pnpm-workspace.yaml",
"//packages/compiler:package.json",
"//packages/compiler-cli:package.json",
"//tools/bazel/rules_angular_store:package.json",
],
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
update_pnpm_lock = True,
verify_node_modules_ignored = "//:.bazelignore",
yarn_lock = "//:yarn.lock",
)
load("@npm2//:repositories.bzl", "npm_repositories")
npm_repositories()
http_archive(
name = "aspect_rules_ts",
sha256 = "9acd128abe77397505148eaa6895faed57839560dbf2177dd6285e51235e2724",
strip_prefix = "rules_ts-3.3.1",
url = "https://github.com/aspect-build/rules_ts/releases/download/v3.3.1/rules_ts-v3.3.1.tar.gz",
)
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
rules_ts_dependencies(
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.8.2 | jq -r '.dist.integrity'
ts_integrity = "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
ts_version_from = "//:package.json",
)
http_archive(
name = "aspect_rules_rollup",
sha256 = "c4062681968f5dcd3ce01e09e4ba73670c064744a7046211763e17c98ab8396e",
strip_prefix = "rules_rollup-2.0.0",
url = "https://github.com/aspect-build/rules_rollup/releases/download/v2.0.0/rules_rollup-v2.0.0.tar.gz",
)
http_archive(
name = "aspect_rules_jasmine",
sha256 = "0d2f9c977842685895020cac721d8cc4f1b37aae15af46128cf619741dc61529",
strip_prefix = "rules_jasmine-2.0.0",
url = "https://github.com/aspect-build/rules_jasmine/releases/download/v2.0.0/rules_jasmine-v2.0.0.tar.gz",
)
load("@aspect_rules_jasmine//jasmine:dependencies.bzl", "rules_jasmine_dependencies")
rules_jasmine_dependencies()
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
aspect_bazel_lib_dependencies()
@@ -143,10 +205,10 @@ cldr_xml_data_repository(
# sass rules
http_archive(
name = "io_bazel_rules_sass",
sha256 = "54bca211ea0a4de2c740a6e24b9d11225942a95452799b6a64dba36e082b7249",
strip_prefix = "rules_sass-c01e8848f30f8e4672babcbe41c3ac3551f3a800",
sha256 = "bff856619317a388292970a7d4bfea8c9e627a1886fe7132075d378d4067c09e",
strip_prefix = "rules_sass-cbe5261f925751a465a1a54bf2147e5f696ec567",
urls = [
"https://github.com/bazelbuild/rules_sass/archive/c01e8848f30f8e4672babcbe41c3ac3551f3a800.zip",
"https://github.com/bazelbuild/rules_sass/archive/cbe5261f925751a465a1a54bf2147e5f696ec567.zip",
],
)
@@ -193,3 +255,38 @@ yarn_install(
yarn = YARN_LABEL,
yarn_lock = "//packages/core/schematics/migrations/signal-migration/test/ts-versions:yarn.lock",
)
git_repository(
name = "devinfra",
commit = "90560ac34ffbb40189d98d8e54110e9c43575761",
remote = "https://github.com/angular/dev-infra.git",
)
load("@devinfra//bazel:setup_dependencies_1.bzl", "setup_dependencies_1")
setup_dependencies_1()
load("@devinfra//bazel:setup_dependencies_2.bzl", "setup_dependencies_2")
setup_dependencies_2()
git_repository(
name = "rules_angular",
commit = "ad3a2d652f41c953fad8f55c3959fde628fa8ebf",
remote = "https://github.com/devversion/rules_angular.git",
)
load("@rules_angular//setup:step_1.bzl", "rules_angular_step1")
rules_angular_step1()
load("@rules_angular//setup:step_2.bzl", "rules_angular_step2")
rules_angular_step2()
load("@rules_angular//setup:step_3.bzl", "rules_angular_step3")
rules_angular_step3(
angular_compiler_cli = "@angular//tools/bazel/rules_angular_store:node_modules/@angular/compiler-cli",
typescript = "@angular//:node_modules/typescript",
)
+4 -1
View File
@@ -23,7 +23,9 @@ APPLICATION_FILES = [
exclude = [
"src/**/*.spec.ts",
],
)
) + [
"//adev/src/content/examples:embeddable",
]
TEST_FILES = APPLICATION_FILES + [
"karma.conf.js",
@@ -58,6 +60,7 @@ APPLICATION_DEPS = [
"@npm//@angular/platform-server",
"@npm//@angular/router",
"@npm//@angular/ssr",
"@npm//fflate",
"@npm//marked",
"@npm//ngx-progressbar",
"@npm//rxjs",
+1 -1
View File
@@ -20,7 +20,7 @@ cd angular
yarn
# Build and run local dev server
# Note: Initial build will take some time
# NOTE: Initial build will take some time
yarn docs
```
+7 -1
View File
@@ -33,7 +33,13 @@
"polyfills": [],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/robots.txt", "src/assets"],
"assets": [
"src/favicon.ico",
"src/robots.txt",
"src/assets",
"src/llms.txt",
"src/llms-full.txt"
],
"styles": ["@angular/docs/styles/global-styles.scss", "./src/local-styles.scss"],
"scripts": [],
"webWorkerTsConfig": "tsconfig.worker.json",
+90
View File
@@ -0,0 +1,90 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
//tslint:disable:no-console
import {execSync} from 'node:child_process';
import {existsSync, constants as fsConstants} from 'node:fs';
import {copyFile, mkdtemp, readdir, readFile, realpath, unlink, writeFile} from 'node:fs/promises';
import {tmpdir} from 'node:os';
import {join} from 'node:path';
export async function copyJsonAssets({repo, githubApi, assetsPath, destPath}) {
const buildInfoPath = join(destPath, '_build-info.json');
if (!existsSync(buildInfoPath)) {
throw new Error(`${buildInfoPath} does not exist.`);
}
const branch = process.env.GITHUB_REF;
const {sha: currentSha} = JSON.parse(await readFile(buildInfoPath, 'utf-8'));
const latestSha = await githubApi.getShaForBranch(branch);
console.log(`Comparing ${currentSha}...${latestSha}.`);
const affectedFiles = await githubApi.getAffectedFiles(currentSha, latestSha);
const changedFiles = affectedFiles.filter((file) => file.startsWith(`${assetsPath}/`));
if (changedFiles.length === 0) {
console.log(`No '${assetsPath}/**' files changed between ${currentSha} and ${latestSha}.`);
return;
}
console.log(
`The below files changed between ${currentSha} and ${latestSha}:\n` +
changedFiles.map((f) => '* ' + f).join('\n'),
);
const temporaryDir = await realpath(await mkdtemp(join(tmpdir(), 'copy-json-assets-')));
const execOptions = {cwd: temporaryDir, stdio: 'inherit'};
execSync('git init', execOptions);
execSync(`git remote add origin https://github.com/${repo}.git`, execOptions);
// fetch a commit
execSync(`git fetch origin ${latestSha}`, execOptions);
// reset this repository's main branch to the commit of interest
execSync('git reset --hard FETCH_HEAD', execOptions);
// get sha when files where changed
const shaWhenFilesChanged = execSync(`git rev-list -1 ${latestSha} "${assetsPath}/"`, {
encoding: 'utf8',
cwd: temporaryDir,
stdio: ['ignore', 'pipe', 'ignore'],
}).trim();
// Delete existing asset files.
const apiFilesUnlink = (await readdir(destPath))
.filter((f) => f.endsWith('.json'))
.map((f) => unlink(join(destPath, f)));
await Promise.allSettled(apiFilesUnlink);
// Copy new asset files
const tempAssetsDir = join(temporaryDir, assetsPath);
const assetFilesCopy = (await readdir(tempAssetsDir)).map((f) => {
const src = join(tempAssetsDir, f);
const dest = join(destPath, f);
return copyFile(src, dest, fsConstants.COPYFILE_FICLONE);
});
await Promise.allSettled(assetFilesCopy);
// Write SHA to file.
await writeFile(
buildInfoPath,
JSON.stringify(
{
branchName: branch,
sha: shaWhenFilesChanged,
},
undefined,
2,
),
);
console.log('\nChanges: ');
execSync(`git status --porcelain`, {stdio: 'inherit'});
console.log(`Successfully updated asset files in '${destPath}'.\n`);
}
+77
View File
@@ -0,0 +1,77 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {get} from 'node:https';
import {posix} from 'node:path';
const GITHUB_API = 'https://api.github.com/repos/';
export class GithubClient {
#token;
#ua;
#api;
constructor(repo, token, ua) {
this.#token = token;
this.#ua = ua;
this.#api = posix.join(GITHUB_API, repo);
}
/**
* Get the affected files.
*
* @param {string} baseSha
* @param {string} headSha
* @returns Promise<string[]>
*/
async getAffectedFiles(baseSha, headSha) {
const {files} = JSON.parse(await this.#httpGet(`${this.#api}/compare/${baseSha}...${headSha}`));
return files.map((f) => f.filename);
}
/**
* Get SHA of a branch.
*
* @param {string} branch
* @returns Promise<string>
*/
async getShaForBranch(branch) {
const sha = await this.#httpGet(`${this.#api}/commits/${branch}`, {
headers: {Accept: 'application/vnd.github.VERSION.sha'},
});
if (!sha) {
throw new Error(`Unable to extract the SHA for '${branch}'.`);
}
return sha;
}
#httpGet(url, options = {}) {
options.headers ??= {};
options.headers['Authorization'] = `token ${this.#token}`;
// User agent is required
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#user-agent-required
options.headers['User-Agent'] = this.#ua;
return new Promise((resolve, reject) => {
get(url, options, (res) => {
let data = '';
res
.on('data', (chunk) => {
data += chunk;
})
.on('end', () => {
resolve(data);
});
}).on('error', (e) => {
reject(e);
});
});
}
}
+107
View File
@@ -0,0 +1,107 @@
## Table of contents
adev/src/content/introduction/what-is-angular.md
adev/src/content/introduction/installation.md
adev/src/content/best-practices/style-guide.md
## Components
adev/src/content/introduction/essentials/components.md
adev/src/content/guide/components/selectors.md
adev/src/content/guide/components/styling.md
adev/src/content/guide/components/inputs.md
adev/src/content/guide/components/outputs.md
adev/src/content/guide/components/content-projection.md
adev/src/content/guide/components/lifecycle.md
## Template guides
adev/src/content/introduction/essentials/templates.md
adev/src/content/guide/templates/event-listeners.md
adev/src/content/guide/templates/binding.md
adev/src/content/guide/templates/control-flow.md
adev/src/content/guide/templates/variables.md
adev/src/content/guide/templates/defer.md
adev/src/content/guide/templates/expression-syntax.md
## Directives
adev/src/content/guide/directives/attribute-directives.md
adev/src/content/guide/directives/structural-directives.md
adev/src/content/guide/directives/directive-composition-api.md
adev/src/content/guide/image-optimization.md
## Signals
adev/src/content/introduction/essentials/signals.md
adev/src/content/guide/signals/linked-signal.md
adev/src/content/guide/signals/resource.md
## Dependency injection
adev/src/content/guide/di/dependency-injection.md
adev/src/content/guide/di/creating-injectable-service.md
adev/src/content/guide/di/dependency-injection-providers.md
adev/src/content/guide/di/dependency-injection-context.md
adev/src/content/guide/di/hierarchical-dependency-injection.md
adev/src/content/guide/di/lightweight-injection-tokens.md
## Rxjs
adev/src/content/ecosystem/rxjs-interop/signals-interop.md
adev/src/content/ecosystem/rxjs-interop/output-interop.md
## Http
adev/src/content/guide/http/setup.md
adev/src/content/guide/http/making-requests.md
adev/src/content/guide/http/interceptors.md
adev/src/content/guide/http/testing.md
## Forms
adev/src/content/guide/forms/reactive-forms.md
adev/src/content/guide/forms/typed-forms.md
adev/src/content/guide/forms/template-driven-forms.md
adev/src/content/guide/forms/form-validation.md
adev/src/content/guide/forms/dynamic-forms.md
## Routing
adev/src/content/guide/routing/common-router-tasks.md
adev/src/content/guide/routing/router-tutorial.md
adev/src/content/guide/routing/routing-with-urlmatcher.md
## SSR
adev/src/content/guide/ssr.md
adev/src/content/guide/hydration.md
adev/src/content/guide/incremental-hydration.md
## Testing
adev/src/content/guide/testing/overview.md
adev/src/content/guide/testing/code-coverage.md
adev/src/content/guide/testing/services.md
adev/src/content/guide/testing/components-basics.md
adev/src/content/guide/testing/components-scenarios.md
adev/src/content/guide/testing/debugging.md
adev/src/content/guide/testing/utility-apis.md
adev/src/content/guide/testing/component-harnesses-overview.md
adev/src/content/guide/testing/using-component-harnesses.md
adev/src/content/guide/testing/creating-component-harnesses.md
## Animations
adev/src/content/guide/animations/css.md
adev/src/content/guide/animations/route-animations.md
adev/src/content/guide/animations/migration.md
## Others
adev/src/content/guide/zoneless.md
adev/src/content/reference/roadmap.md
adev/src/content/best-practices/update.md
adev/src/content/guide/http/security.md
adev/src/content/guide/i18n/overview.md
+140
View File
@@ -0,0 +1,140 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// The purpose of this script is to generate a llms-full.txt
// Run with `node adev/scripts/shared/llms.mjs` to generate llms-full.txt from the list in llms-list.md
//tslint:disable:no-console
import fs from 'fs/promises';
import path from 'path';
const INPUT_MD_FILENAME = 'adev/scripts/shared/llms-list.md';
const OUTPUT_FILENAME = 'adev/src/llms-full.txt';
function postProcessOutputContent(content) {
// Helper to map custom languages to standard Markdown languages
const mapLanguage = (lang) => {
if (!lang) return ''; // For code blocks without a specified language
const lowerLang = lang.trim().toLowerCase();
if (lowerLang === 'angular-ts') return 'typescript';
if (lowerLang === 'angular-html') return 'html';
return lowerLang; // Use as is for other languages like shell, etc.
};
// Process docs-code-multifile and their inner docs-code elements
content = content.replace(
/<docs-code-multifile>([\s\S]*?)<\/docs-code-multifile>/gs,
(match, innerHTML) => {
let multifileResult = '';
// Regex for <docs-code> within <docs-code-multifile>, expecting 'header' and optional 'language'
const codeRegex =
/<docs-code\s+header="([^"]+)"(?:\s+language="([^"]*)")?[^>]*>([\s\S]*?)<\/docs-code>/gs;
let codeMatch;
while ((codeMatch = codeRegex.exec(innerHTML)) !== null) {
const header = codeMatch[1].trim();
const langAttr = codeMatch[2]; // Language attribute might be undefined
const language = mapLanguage(langAttr);
let code = codeMatch[3].trim();
// Note: If code content includes HTML entities like &lt;, they would need unescaping here.
// e.g., code = code.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&');
multifileResult += `\`\`\`${language}\n// ${header}\n${code}\n\`\`\`\n`;
}
return multifileResult;
},
);
// Process standalone docs-code elements
content = content.replace(
/<docs-code(?:\s+language="([^"]*)")?[^>]*>([\s\S]*?)<\/docs-code>/gs,
(match, langAttr, codeContent) => {
const language = mapLanguage(langAttr);
let code = codeContent.trim();
// Note: HTML entity unescaping might be needed here as well.
return `\`\`\`${language}\n${code}\n\`\`\`\n`;
},
);
// Process code block languages
content = content.replace(/```([\w-]+)\s*/gs, (match, lang, code) => {
const mappedLang = mapLanguage(lang); // lang can be undefined if no language was specified
return `\`\`\`${mappedLang}\n`;
});
// Remove docs-decorative-header elements
content = content.replace(
/<docs-decorative-header[^>]*>[\s\S]*?<\/docs-decorative-header>/gs,
'',
);
// Remove docs-card elements
content = content.replace(/<docs-card\b[^>]*>[\s\S]*?<\/docs-card>/gi, '');
// remove docs-pill-row elements
content = content.replace(/<docs-pill-row\b[^>]*>[\s\S]*?<\/docs-pill-row>/gi, '');
// Remove docs-callout tags, keeping the content within them
content = content.replace(/<docs-callout[^>]*>([\s\S]*?)<\/docs-callout>/gis, '$1');
// Remove docs-card-container tags, keeping the content within them
content = content.replace(/<docs-card-container>/g, '');
content = content.replace(/<\/docs-card-container>/g, '');
return content;
}
async function main() {
const inputFilePath = path.resolve(process.cwd(), INPUT_MD_FILENAME);
const baseDirForIncludes = path.dirname(inputFilePath);
console.log(`Starting processing of: ${inputFilePath}`);
let mainFileContent;
try {
mainFileContent = await fs.readFile(inputFilePath, 'utf-8');
} catch (error) {
console.error(`Error: Failed to read input file "${inputFilePath}".`);
console.error(error.message);
process.exit(1); // Exit with error code
}
let processedContent = mainFileContent;
const matches = [...mainFileContent.matchAll(/(.*\.md)/g)];
console.log(`Found ${matches.length} files`);
let resultString = '';
for (const match of matches) {
const filePath = match[0];
const absolutePathToIncludeFile = path.resolve(filePath);
try {
console.log(` Including content from: ${absolutePathToIncludeFile}`);
const includedFileContent = await fs.readFile(absolutePathToIncludeFile, 'utf-8');
const processedFile = postProcessOutputContent(includedFileContent);
resultString += processedFile; // Append the content of the included file
} catch (fileReadError) {
console.warn(` Warning: Could not read file "${absolutePathToIncludeFile}"`);
}
}
// Basic cleanup of blank lines
processedContent = resultString.replace(/(?:\s*\n){3,}/g, '\n');
const outputFilePath = path.resolve(process.cwd(), OUTPUT_FILENAME);
try {
await fs.writeFile(outputFilePath, processedContent, 'utf-8');
console.log(`Successfully generated combined file: ${outputFilePath}`);
} catch (error) {
console.error(`Error: Failed to write output file "${outputFilePath}".`);
console.error(error.message);
process.exit(1); // Exit with error code
}
}
main();
+3
View File
@@ -0,0 +1,3 @@
# Generating data for `angular.dev/api` CDK packages
This script updates the Angular CDK api JSON files stored in `adev/src/content/cdk`. This files are used to generate the [angular.dev api](https://angular.dev/api) pages for the CDK packages.
+35
View File
@@ -0,0 +1,35 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {dirname, resolve as resolvePath} from 'node:path';
import {fileURLToPath} from 'node:url';
import {copyJsonAssets} from '../shared/copy-json-assets.mjs';
import {GithubClient} from '../shared/github-client.mjs';
const scriptDir = dirname(fileURLToPath(import.meta.url));
const CDK_BUILDS_REPO = 'angular/cdk-builds';
const CDK_APIS_CONTENT_PATH = resolvePath(scriptDir, '../../src/content/cdk');
async function main() {
await copyJsonAssets({
repo: CDK_BUILDS_REPO,
assetsPath: '_adev_assets',
destPath: CDK_APIS_CONTENT_PATH,
githubApi: new GithubClient(
CDK_BUILDS_REPO,
process.env.ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN,
'ADEV_Angular_CDK_Sources_Update',
),
});
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
+13 -141
View File
@@ -6,154 +6,26 @@
* found in the LICENSE file at https://angular.dev/license
*/
//tslint:disable:no-console
import {execSync} from 'node:child_process';
import {readFile, writeFile, readdir, mkdtemp, realpath, copyFile, unlink} from 'node:fs/promises';
import {tmpdir} from 'node:os';
import {get} from 'node:https';
import {dirname, resolve as resolvePath, posix, join} from 'node:path';
import {dirname, resolve as resolvePath} from 'node:path';
import {fileURLToPath} from 'node:url';
import {existsSync, constants as fsConstants} from 'node:fs';
const GITHUB_API = 'https://api.github.com/repos/';
const CLI_BUILDS_REPO = 'angular/cli-builds';
const GITHUB_API_CLI_BUILDS = posix.join(GITHUB_API, CLI_BUILDS_REPO);
import {copyJsonAssets} from '../shared/copy-json-assets.mjs';
import {GithubClient} from '../shared/github-client.mjs';
const scriptDir = dirname(fileURLToPath(import.meta.url));
const CLI_BUILDS_REPO = 'angular/cli-builds';
const CLI_HELP_CONTENT_PATH = resolvePath(scriptDir, '../../src/content/cli/help');
const CLI_SHA_PATH = join(CLI_HELP_CONTENT_PATH, 'build-info.json');
async function main() {
if (!existsSync(CLI_SHA_PATH)) {
throw new Error(`${CLI_SHA_PATH} does not exist.`);
}
const branch = process.env.GITHUB_REF;
const {sha: currentSha} = JSON.parse(await readFile(CLI_SHA_PATH, 'utf-8'));
const latestSha = await getShaFromCliBuilds(branch);
console.log(`Comparing ${currentSha}...${latestSha}.`);
const affectedFiles = await getAffectedFiles(currentSha, latestSha);
const changedHelpFiles = affectedFiles.filter((file) => file.startsWith('help/'));
if (changedHelpFiles.length === 0) {
console.log(`No 'help/**' files changed between ${currentSha} and ${latestSha}.`);
return;
}
console.log(
`The below help files changed between ${currentSha} and ${latestSha}:\n` +
changedHelpFiles.map((f) => '* ' + f).join('\n'),
);
const temporaryDir = await realpath(await mkdtemp(join(tmpdir(), 'cli-src-')));
const execOptions = {cwd: temporaryDir, stdio: 'inherit'};
execSync('git init', execOptions);
execSync('git remote add origin https://github.com/angular/cli-builds.git', execOptions);
// fetch a commit
execSync(`git fetch origin ${latestSha}`, execOptions);
// reset this repository's main branch to the commit of interest
execSync('git reset --hard FETCH_HEAD', execOptions);
// get sha when files where changed
const shaWhenFilesChanged = execSync(`git rev-list -1 ${latestSha} "help/"`, {
encoding: 'utf8',
cwd: temporaryDir,
stdio: ['ignore', 'pipe', 'ignore'],
}).trim();
// Delete existing JSON help files.
const helpFilesUnlink = (await readdir(CLI_HELP_CONTENT_PATH))
.filter((f) => f.endsWith('.json'))
.map((f) => unlink(join(CLI_HELP_CONTENT_PATH, f)));
await Promise.allSettled(helpFilesUnlink);
// Copy new help files
const tempHelpDir = join(temporaryDir, 'help');
const helpFilesCopy = (await readdir(tempHelpDir)).map((f) => {
const src = join(tempHelpDir, f);
const dest = join(CLI_HELP_CONTENT_PATH, f);
return copyFile(src, dest, fsConstants.COPYFILE_FICLONE);
});
await Promise.allSettled(helpFilesCopy);
// Write SHA to file.
await writeFile(
CLI_SHA_PATH,
JSON.stringify(
{
branchName: branch,
sha: shaWhenFilesChanged,
},
undefined,
2,
await copyJsonAssets({
repo: CLI_BUILDS_REPO,
assetsPath: 'help',
destPath: CLI_HELP_CONTENT_PATH,
githubApi: new GithubClient(
CLI_BUILDS_REPO,
process.env.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN,
'ADEV_Angular_CLI_Sources_Update',
),
);
console.log('\nChanges: ');
execSync(`git status --porcelain`, {stdio: 'inherit'});
console.log(`Successfully updated help files in '${CLI_HELP_CONTENT_PATH}'.\n`);
}
/**
* Get SHA of a branch.
*
* @param {string} branch
* @param {string} headSha
* @returns Promise<string>
*/
async function getShaFromCliBuilds(branch) {
const sha = await httpGet(`${GITHUB_API_CLI_BUILDS}/commits/${branch}`, {
headers: {Accept: 'application/vnd.github.VERSION.sha'},
});
if (!sha) {
throw new Error(`Unable to extract the SHA for '${branch}'.`);
}
return sha;
}
/**
* Get the affected files.
*
* @param {string} baseSha
* @param {string} headSha
* @returns Promise<string[]>
*/
async function getAffectedFiles(baseSha, headSha) {
const {files} = JSON.parse(
await httpGet(`${GITHUB_API_CLI_BUILDS}/compare/${baseSha}...${headSha}`),
);
return files.map((f) => f.filename);
}
function httpGet(url, options = {}) {
options.headers ??= {};
options.headers[
'Authorization'
] = `token ${process.env.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN}`;
// User agent is required
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#user-agent-required
options.headers['User-Agent'] = `ADEV_Angular_CLI_Sources_Update`;
return new Promise((resolve, reject) => {
get(url, options, (res) => {
let data = '';
res
.on('data', (chunk) => {
data += chunk;
})
.on('end', () => {
resolve(data);
});
}).on('error', (e) => {
reject(e);
});
});
}
+59 -16
View File
@@ -1,28 +1,50 @@
load("//tools:defaults.bzl", "ng_module", "ng_package")
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
load("//adev/shared-docs:defaults.bzl", "ng_project")
load("//tools:defaults.bzl", "pkg_npm")
load("//tools:defaults2.bzl", "ng_package")
package(default_visibility = ["//visibility:private"])
package(default_visibility = ["//visibility:public"])
ng_module(
rules_js_tsconfig(
name = "tsconfig_build",
src = "tsconfig.json",
visibility = [
"//adev/shared-docs:__subpackages__",
],
)
rules_js_tsconfig(
name = "tsconfig_test",
src = "tsconfig-test.json",
visibility = [
"//adev/shared-docs:__subpackages__",
],
deps = [
":tsconfig_build",
"//:node_modules/@types/jasmine",
],
)
ng_project(
name = "docs",
srcs = [
"index.ts",
],
module_name = "@angular/docs",
deps = [
"//adev/shared-docs/components",
"//adev/shared-docs/constants",
"//adev/shared-docs/directives",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/pipes",
"//adev/shared-docs/providers",
"//adev/shared-docs/services",
"//adev/shared-docs/testing",
"//adev/shared-docs/utils",
"//adev/shared-docs/components:components_rjs",
"//adev/shared-docs/directives:directives_rjs",
"//adev/shared-docs/interfaces:interfaces_rjs",
"//adev/shared-docs/pipes:pipes_rjs",
"//adev/shared-docs/providers:providers_rjs",
"//adev/shared-docs/services:services_rjs",
"//adev/shared-docs/testing:testing_rjs",
"//adev/shared-docs/utils:utils_rjs",
],
)
ng_package(
name = "npm_package",
name = "pkg",
srcs = [
"package.json",
"//adev/shared-docs/icons",
@@ -40,10 +62,31 @@ ng_package(
"//adev/shared-docs/pipeline/tutorials/common:files",
"//adev/shared-docs/styles",
],
package = "@angular/docs",
visibility = [
"//adev:__pkg__",
"//adev/shared-docs:__pkg__",
],
deps = [
":docs",
":docs_rjs",
],
)
copy_to_directory(
name = "pkg_middle",
srcs = [
":pkg",
],
replace_prefixes = {
"pkg": "",
},
)
# Temporarily include this intermediate `pkg_npm` so that the rest of the adev tooling is able to
# properly performing linking using information from rules_nodejs toolchain providers.
pkg_npm(
name = "npm_package",
package_name = "@angular/docs",
nested_packages = [
":pkg_middle",
],
)
+6 -6
View File
@@ -1,16 +1,13 @@
load("//tools:defaults.bzl", "ts_library")
load("//adev/shared-docs:defaults.bzl", "ts_project")
package(default_visibility = ["//visibility:private"])
ts_library(
ts_project(
name = "components",
srcs = [
"index.ts",
],
visibility = [
"//adev/shared-docs:__pkg__",
],
deps = [
interop_deps = [
"//adev/shared-docs/components/algolia-icon",
"//adev/shared-docs/components/breadcrumb",
"//adev/shared-docs/components/cookie-popup",
@@ -25,4 +22,7 @@ ts_library(
"//adev/shared-docs/components/top-level-banner",
"//adev/shared-docs/components/viewers",
],
visibility = [
"//adev/shared-docs:__pkg__",
],
)
@@ -1,8 +1,8 @@
load("//tools:defaults.bzl", "ng_module")
load("//adev/shared-docs:defaults.bzl", "ng_project")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "algolia-icon",
srcs = [
"algolia-icon.component.ts",
@@ -10,11 +10,11 @@ ng_module(
assets = [
"algolia-icon.component.html",
],
interop_deps = [
"//packages/core",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
"//adev/shared-docs/components/search-dialog:__pkg__",
],
deps = [
"//packages/core",
],
)
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "breadcrumb",
srcs = [
"breadcrumb.component.ts",
@@ -12,16 +13,18 @@ ng_module(
":breadcrumb.component.css",
"breadcrumb.component.html",
],
interop_deps = [
"//packages/common",
"//packages/core",
"//packages/router",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
"//adev/shared-docs/components/viewers:__pkg__",
],
deps = [
"//adev/shared-docs/interfaces",
"//adev/shared-docs/services",
"//packages/common",
"//packages/core",
"//packages/router",
"//adev/shared-docs/interfaces:interfaces_rjs",
"//adev/shared-docs/services:services_rjs",
],
)
@@ -30,13 +33,13 @@ sass_binary(
src = "breadcrumb.component.scss",
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":breadcrumb",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/services",
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "cookie-popup",
srcs = [
"cookie-popup.component.ts",
@@ -12,14 +13,16 @@ ng_module(
":cookie-popup.component.css",
"cookie-popup.component.html",
],
interop_deps = [
"//packages/common",
"//packages/core",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
deps = [
"//adev/shared-docs/providers",
"//adev/shared-docs/utils",
"//packages/common",
"//packages/core",
"//adev/shared-docs/providers:providers_rjs",
"//adev/shared-docs/utils:utils_rjs",
],
)
@@ -28,13 +31,13 @@ sass_binary(
src = "cookie-popup.component.scss",
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":cookie-popup",
"//adev/shared-docs/providers",
"//adev/shared-docs/testing",
@@ -1,8 +1,9 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "copy-source-code-button",
srcs = [
"copy-source-code-button.component.ts",
@@ -10,30 +11,34 @@ ng_module(
assets = [
"copy-source-code-button.component.html",
],
interop_deps = [
"//packages/common",
"//packages/core",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
"//adev/shared-docs/components/viewers:__pkg__",
],
deps = [
"//adev/shared-docs/components/icon",
"//packages/common",
"//packages/core",
"@npm//@angular/cdk",
"//:node_modules/@angular/cdk",
"//adev/shared-docs/components/icon:icon_rjs",
],
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":copy-source-code-button",
"//packages/core",
"//packages/core/testing",
"//packages/platform-browser",
"@npm//@angular/cdk",
],
deps = [
"//:node_modules/@angular/cdk",
],
)
+6 -6
View File
@@ -1,9 +1,9 @@
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//adev/shared-docs:defaults.bzl", "ng_project")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "icon",
srcs = [
"icon.component.ts",
@@ -11,6 +11,10 @@ ng_module(
assets = [
":icon.component.css",
],
interop_deps = [
"//packages/common",
"//packages/core",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
"//adev/shared-docs/components/copy-source-code-button:__pkg__",
@@ -20,10 +24,6 @@ ng_module(
"//adev/shared-docs/components/top-level-banner:__pkg__",
"//adev/shared-docs/components/viewers:__pkg__",
],
deps = [
"//packages/common",
"//packages/core",
],
)
sass_binary(
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "navigation-list",
srcs = [
"navigation-list.component.ts",
@@ -12,17 +13,20 @@ ng_module(
":navigation-list.component.css",
"navigation-list.component.html",
],
interop_deps = [
"//packages/common",
"//packages/core",
"//packages/router",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
deps = [
"//adev/shared-docs/components/icon",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/pipes",
"//adev/shared-docs/services",
"//packages/common",
"//packages/core",
"//packages/router",
"//:node_modules/@angular/material",
"//adev/shared-docs/components/icon:icon_rjs",
"//adev/shared-docs/interfaces:interfaces_rjs",
"//adev/shared-docs/pipes:pipes_rjs",
"//adev/shared-docs/services:services_rjs",
],
)
@@ -34,13 +38,13 @@ sass_binary(
],
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":navigation-list",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/services",
@@ -7,8 +7,15 @@
<li class="docs-faceted-list-item">
@if (item.path) {
@if (item.isExternal) {
<a [href]="item.path" target="_blank">
<span [class.docs-external-link]="item.isExternal">{{ item.label }}</span>
<a
[href]="item.path" target="_blank"
[matTooltip]="item.label"
[matTooltipDisabled]="item.label.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
<span [class.docs-external-link]="item.isExternal" class="docs-faceted-list-item-text">{{ item.label }}</span>
@if (item.children && item.level! > 1 && !item.isExpanded) {
<docs-icon>chevron_right</docs-icon>
}
@@ -16,17 +23,23 @@
} @else {
<a
[routerLink]="'/' + item.path"
[routerLinkActiveOptions]="{
queryParams: 'ignored',
fragment: 'ignored',
matrixParams: 'exact',
paths: 'exact',
exact: false
}"
routerLinkActive="docs-faceted-list-item-active"
[routerLinkActiveOptions]="{ exact: true }"
(click)="emitClickOnLink()"
[matTooltip]="item.label"
[matTooltipDisabled]="item.label.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
<span>{{item.label}}</span>
<span class="docs-faceted-list-item-text">{{item.label}}</span>
@if (item.children && !item.isExpanded) {
<docs-icon>chevron_right</docs-icon>
}
@@ -35,8 +48,14 @@
} @else {
<!-- Nav Section Header -->
@if (item.level !== collapsableLevel() && item.level !== expandableLevel()) {
<div class="docs-secondary-nav-header">
<span>{{item.label}}</span>
<div class="docs-secondary-nav-header"
[matTooltip]="item.label"
[matTooltipDisabled]="item.label.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
<span class="docs-faceted-list-item-text">{{item.label}}</span>
</div>
}
@@ -54,13 +73,17 @@
[class.docs-expanded-button]="item.children && item.level == collapsableLevel()"
[class.docs-not-expanded-button]="item.children && item.level === expandableLevel()"
[class.docs-nav-item-has-icon]="
item.children && item.level === expandableLevel() && !item.isExpanded
"
item.children && item.level === expandableLevel() && !item.isExpanded"
[matTooltip]="item.label"
[matTooltipDisabled]="item.label.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
@if (item.children && item.level === collapsableLevel()) {
<docs-icon>arrow_back</docs-icon>
}
<span>{{ item.label }}</span>
<span class="docs-faceted-list-item-text">{{ item.label }}</span>
</button>
}
}
@@ -45,6 +45,12 @@
border: 0;
}
.docs-faceted-list-item-text {
max-width: calc(100% - 1rem);
overflow: hidden;
text-overflow: ellipsis;
}
.docs-nav-item-has-icon {
&::after {
// FIXME: for some reason this disappears when transformed
@@ -115,7 +121,7 @@ a,
// Add padding-bottom to last item in the list
.docs-navigation-list {
width: 100%;
width: 15rem;
li:last-of-type {
ul:last-of-type {
@@ -144,3 +150,12 @@ a,
margin-inline-end: 0.4rem;
}
}
::ng-deep .API-tooltip{
.mat-mdc-tooltip-surface{
max-width: unset;
width:auto;
word-break: keep-all;
white-space: pre;
}
}
@@ -13,10 +13,18 @@ import {RouterLink, RouterLinkActive} from '@angular/router';
import {IconComponent} from '../icon/icon.component';
import {IsActiveNavigationItem} from '../../pipes/is-active-navigation-item.pipe';
import {NgTemplateOutlet} from '@angular/common';
import {MatTooltipModule} from '@angular/material/tooltip';
@Component({
selector: 'docs-navigation-list',
imports: [RouterLink, RouterLinkActive, IconComponent, IsActiveNavigationItem, NgTemplateOutlet],
imports: [
RouterLink,
RouterLinkActive,
IconComponent,
IsActiveNavigationItem,
NgTemplateOutlet,
MatTooltipModule,
],
templateUrl: './navigation-list.component.html',
styleUrls: ['./navigation-list.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "search-dialog",
srcs = [
"search-dialog.component.ts",
@@ -12,21 +13,25 @@ ng_module(
":search-dialog.component.css",
"search-dialog.component.html",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
deps = [
"//adev/shared-docs/components/algolia-icon",
"//adev/shared-docs/components/text-field",
"//adev/shared-docs/directives",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/pipes",
"//adev/shared-docs/services",
interop_deps = [
"//packages/common",
"//packages/core",
"//packages/forms",
"//packages/router",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
deps = [
"//:node_modules/@angular/cdk",
"//:node_modules/rxjs",
"//adev/shared-docs/components/algolia-icon:algolia-icon_rjs",
"//adev/shared-docs/components/text-field:text-field_rjs",
"//adev/shared-docs/directives:directives_rjs",
"//adev/shared-docs/interfaces:interfaces_rjs",
"//adev/shared-docs/pipes:pipes_rjs",
"//adev/shared-docs/services:services_rjs",
],
)
sass_binary(
@@ -34,13 +39,13 @@ sass_binary(
src = "search-dialog.component.scss",
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":search-dialog",
"//adev/shared-docs/components/algolia-icon",
"//adev/shared-docs/interfaces",
@@ -3,15 +3,15 @@
<docs-text-field
[autofocus]="true"
[hideIcon]="true"
[ngModel]="searchQuery()"
(ngModelChange)="updateSearchQuery($event)"
[formControl]="searchControl"
[resetLabel]="'Clear the search'"
class="docs-search-input"
placeholder="Search docs"
/>
@if (searchResults() && searchResults()!.length > 0) {
@if (searchResults.hasValue() && searchResults.value().length > 0) {
<ul class="docs-search-results docs-mini-scroll-track">
@for (result of searchResults(); track result.objectID) {
@for (result of searchResults.value(); track result.id) {
<li docsSearchItem [item]="result">
<a
[routerLink]="'/' + result.url | relativeLink: 'pathname'"
@@ -22,45 +22,35 @@
<!-- Icon -->
<span class="docs-search-result-icon" aria-hidden="true">
<i role="presentation" class="material-symbols-outlined docs-icon-small">
{{ result.hierarchy.lvl0 === 'Tutorials' ? 'code' : 'description'}}
{{ result.type === 'code' ? 'code' : 'description'}}
</i>
</span>
<!-- Results type -->
<span class="docs-search-results__type">
@let snippet = result._snippetResult.hierarchy?.lvl1?.value ?? '';
<ng-container
[ngTemplateOutlet]="highlightSnippet"
[ngTemplateOutletContext]="{snippet}"
/>
</span>
<span class="docs-search-results__type" [innerHtml]="result.labelHtml"></span>
</div>
@let content = result._snippetResult.content;
@let hierarchy = result._snippetResult.hierarchy;
@if (content || hierarchy?.lvl2 || hierarchy?.lvl3 || hierarchy?.lvl4) {
<span class="docs-search-results__type docs-search-results__lvl2">
@let snippet = getBestSnippetForMatch(result);
<ng-container
[ngTemplateOutlet]="highlightSnippet"
[ngTemplateOutletContext]="{snippet}"
/>
@if (result.subLabelHtml) {
<span
class="docs-search-results__type docs-search-results__lvl2"
[innerHtml]="result.subLabelHtml"
>
</span>
}
</div>
<!-- Page title -->
<span class="docs-result-page-title">{{ result.hierarchy?.lvl0 }}</span>
<span class="docs-result-page-title">{{ result.category }}</span>
</a>
</li>
}
</ul>
} @else {
<div class="docs-search-results docs-mini-scroll-track">
@if (searchResults() === undefined) {
@if (!searchResults.hasValue()) {
<div class="docs-search-results__start-typing">
<span>Start typing to see results</span>
</div>
} @else if (searchResults()?.length === 0) {
} @else if (searchResults.value().length === 0) {
<div class="docs-search-results__no-results">
<span>No results found</span>
</div>
@@ -68,23 +58,82 @@
</div>
}
<div class="docs-algolia">
<span>Search by</span>
<a target="_blank" rel="noopener"
href="https://www.algolia.com/developers/?utm_source=angular.dev&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch">
<docs-algolia-icon />
</a>
<div class="docs-search-footer">
<ul class="docs-search-commands">
<li>
<kbd class="docs-search-commands-key">
<svg width="15" height="15" aria-label="Enter key" role="img">
<g
fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.2"
>
<path d="M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"></path>
</g>
</svg>
</kbd>
<span>to select</span>
</li>
<li>
<kbd class="docs-search-commands-key">
<svg width="15" height="15" aria-label="Arrow down" role="img">
<g
fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.2"
>
<path d="M7.5 3.5v8M10.5 8.5l-3 3-3-3"></path>
</g>
</svg>
</kbd>
<kbd class="docs-search-commands-key">
<svg width="15" height="15" aria-label="Arrow up" role="img">
<g
fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.2"
>
<path d="M7.5 11.5v-8M10.5 6.5l-3-3-3 3"></path>
</g>
</svg>
</kbd>
<span>to navigate</span>
</li>
<li>
<kbd class="docs-search-commands-key"
><svg width="15" height="15" aria-label="Escape key" role="img">
<g
fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.2"
>
<path
d="M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"
></path>
</g>
</svg>
</kbd>
<span>to close</span>
</li>
</ul>
<div class="docs-algolia">
<span>Search by</span>
<a
target="_blank"
rel="noopener"
href="https://www.algolia.com/developers/?utm_source=angular.dev&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"
>
<docs-algolia-icon />
</a>
</div>
</div>
</div>
</dialog>
<ng-template #highlightSnippet let-snippet="snippet">
@let parts = splitMarkedText(snippet);
@for (part of parts; track $index) {
@if (part.highlight) {
<mark>{{part.text}}</mark>
} @else {
<span>{{part.text}}</span>
}
}
</ng-template>
@@ -2,6 +2,8 @@ dialog {
background-color: transparent;
border: none;
padding-block-end: 3rem;
margin: 0 auto;
top: 15vh;
&::backdrop {
backdrop-filter: blur(5px);
@@ -23,23 +25,16 @@ dialog {
height: 2.6875rem; // 43px;
padding-inline-start: 1rem;
position: relative;
&::after {
content: 'Esc';
position: absolute;
right: 1rem;
color: var(--gray-400);
font-size: 0.875rem;
}
}
ul {
.docs-search-results {
max-height: 50vh;
overflow-y: auto;
overscroll-behavior: contain;
list-style-type: none;
padding-inline: 0;
padding-block-start: 1rem;
padding-block-end: 1rem;
margin: 0;
border-block-end: 1px solid var(--senary-contrast);
@@ -49,12 +44,17 @@ dialog {
padding-inline-end: 1rem;
padding-block: 0.25rem;
mark {
background: #e62600;
background: var(--red-to-orange-horizontal-gradient);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
/**
* This rule needs ng-deep to be applied to elements that are created via a [innerHTML] binding
*/
::ng-deep {
mark {
background: #e62600;
background: var(--red-to-orange-horizontal-gradient);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
}
a {
@@ -135,21 +135,52 @@ dialog {
}
}
.docs-algolia {
.docs-search-footer {
display: flex;
align-items: center;
justify-content: end;
justify-content: space-between;
color: var(--gray-400);
padding: 1rem;
font-size: 0.75rem;
font-weight: 500;
gap: 0.25rem;
background-color: var(--page-background);
border-radius: 0 0 0.25rem 0.25rem;
container-type: inline-size;
container-name: footer;
.docs-search-commands {
display: flex;
list-style: none;
gap: 1rem;
margin: 0;
padding: 0;
li {
display: flex;
gap: 0.25rem;
}
.docs-search-commands-key {
display: flex;
align-items: center;
}
}
@container footer (max-width: 600px) {
.docs-search-commands li {
display: none;
}
}
.docs-algolia {
display: flex;
gap: 0.25rem;
align-items: center;
}
docs-algolia-icon {
display: inline-flex;
margin-block-start: 0.12rem;
display: block;
margin-block-start: 5px;
margin-inline-start: 0.15rem;
width: 4rem;
}
@@ -9,54 +9,59 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {SearchDialog} from './search-dialog.component';
import {WINDOW} from '../../providers';
import {Search} from '../../services';
import {ENVIRONMENT, WINDOW} from '../../providers';
import {ALGOLIA_CLIENT, Search} from '../../services';
import {FakeEventTarget} from '../../testing/index';
import {By} from '@angular/platform-browser';
import {AlgoliaIcon} from '../algolia-icon/algolia-icon.component';
import {RouterTestingModule} from '@angular/router/testing';
import {Router} from '@angular/router';
import {provideExperimentalZonelessChangeDetection} from '@angular/core';
import {
ApplicationRef,
provideExperimentalZonelessChangeDetection,
ResourceStatus,
} from '@angular/core';
import {SearchResult} from '../../interfaces';
describe('SearchDialog', () => {
let fixture: ComponentFixture<SearchDialog>;
const fakeSearch = {
searchQuery: jasmine.createSpy(),
searchResults: jasmine.createSpy(),
};
const searchResults = jasmine.createSpy();
const fakeWindow = new FakeEventTarget();
beforeEach(async () => {
fakeSearch.searchResults.and.returnValue([]);
fakeSearch.searchQuery.and.returnValue('');
let search: Search;
await TestBed.configureTestingModule({
beforeEach(async () => {
searchResults.and.returnValue([]);
TestBed.configureTestingModule({
imports: [SearchDialog, RouterTestingModule],
providers: [
provideExperimentalZonelessChangeDetection(),
{
provide: Search,
useValue: fakeSearch,
},
{
provide: WINDOW,
useValue: fakeWindow,
},
{provide: ENVIRONMENT, useValue: {algolia: {index: 'fakeIndex'}}},
{provide: ALGOLIA_CLIENT, useValue: {search: searchResults}},
{provide: WINDOW, useValue: fakeWindow},
],
}).compileComponents();
});
fixture = TestBed.createComponent(SearchDialog);
fixture.detectChanges();
search = TestBed.inject(Search);
});
it('should navigate to active item when user pressed Enter', () => {
it('should navigate to active item when user pressed Enter', async () => {
const router = TestBed.inject(Router);
const navigateByUrlSpy = spyOn(router, 'navigateByUrl');
fakeSearch.searchResults.and.returnValue(fakeSearchResults);
fixture.detectChanges();
search.searchQuery.set('fakeQuery');
searchResults.and.returnValue(Promise.resolve({results: [{hits: fakeSearchResults}]}));
// Fire the request
TestBed.inject(ApplicationRef).tick();
// Wait for the resource to resolve
await TestBed.inject(ApplicationRef).whenStable();
fakeWindow.dispatchEvent(
new KeyboardEvent('keydown', {
@@ -78,9 +83,15 @@ describe('SearchDialog', () => {
expect(algoliaIcon).toBeTruthy();
});
it('should display `No results found` message when there are no results for provided query', () => {
fakeSearch.searchResults.and.returnValue([]);
fixture.detectChanges();
it('should display `No results found` message when there are no results for provided query', async () => {
search.searchQuery.set('fakeQuery');
searchResults.and.returnValue(Promise.resolve({results: [{hits: []}]}));
// Fire the request
TestBed.inject(ApplicationRef).tick();
// Wait for the resource to resolve
await TestBed.inject(ApplicationRef).whenStable();
const noResultsContainer = fixture.debugElement.query(
By.css('.docs-search-results__no-results'),
@@ -90,7 +101,7 @@ describe('SearchDialog', () => {
});
it('should display `Start typing to see results` message when there are no provided query', () => {
fakeSearch.searchResults.and.returnValue(undefined);
searchResults.and.returnValue(undefined);
fixture.detectChanges();
const startTypingContainer = fixture.debugElement.query(
@@ -100,9 +111,15 @@ describe('SearchDialog', () => {
expect(startTypingContainer).toBeTruthy();
});
it('should display list of the search results when results exist', () => {
fakeSearch.searchResults.and.returnValue(fakeSearchResults);
fixture.detectChanges();
it('should display list of the search results when results exist', async () => {
search.searchQuery.set('fakeQuery');
searchResults.and.returnValue(Promise.resolve({results: [{hits: fakeSearchResults}]}));
// Fire the request
TestBed.inject(ApplicationRef).tick();
// Wait for the resource to resolve
await TestBed.inject(ApplicationRef).whenStable();
const resultListContainer = fixture.debugElement.query(By.css('ul.docs-search-results'));
const resultItems = fixture.debugElement.queryAll(By.css('ul.docs-search-results li a'));
@@ -12,7 +12,6 @@ import {
ElementRef,
Injector,
OnDestroy,
Signal,
afterNextRender,
effect,
inject,
@@ -20,22 +19,20 @@ import {
viewChild,
viewChildren,
} from '@angular/core';
import {NgTemplateOutlet} from '@angular/common';
import {WINDOW} from '../../providers/index';
import {ClickOutside} from '../../directives/index';
import {Search} from '../../services/index';
import {TextField} from '../text-field/text-field.component';
import {FormsModule} from '@angular/forms';
import {FormControl, ReactiveFormsModule} from '@angular/forms';
import {ActiveDescendantKeyManager} from '@angular/cdk/a11y';
import {SearchItem} from '../../directives/search-item/search-item.directive';
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
import {Router, RouterLink} from '@angular/router';
import {filter, fromEvent} from 'rxjs';
import {fromEvent} from 'rxjs';
import {AlgoliaIcon} from '../algolia-icon/algolia-icon.component';
import {RelativeLink} from '../../pipes/relative-link.pipe';
import {SearchResult, SnippetResult} from '../../interfaces';
@Component({
selector: 'docs-search-dialog',
@@ -43,12 +40,11 @@ import {SearchResult, SnippetResult} from '../../interfaces';
imports: [
ClickOutside,
TextField,
FormsModule,
ReactiveFormsModule,
SearchItem,
AlgoliaIcon,
RelativeLink,
RouterLink,
NgTemplateOutlet,
],
templateUrl: './search-dialog.component.html',
styleUrls: ['./search-dialog.component.scss'],
@@ -57,6 +53,7 @@ export class SearchDialog implements OnDestroy {
onClose = output();
dialog = viewChild.required<ElementRef<HTMLDialogElement>>('searchDialog');
items = viewChildren(SearchItem);
textField = viewChild(TextField);
private readonly search = inject(Search);
private readonly relativeLink = new RelativeLink();
@@ -71,7 +68,18 @@ export class SearchDialog implements OnDestroy {
searchQuery = this.search.searchQuery;
searchResults = this.search.searchResults;
// We use a FormControl instead of relying on NgModel+signal to avoid
// the issue https://github.com/angular/angular/issues/13568
// TODO: Use signal forms when available
searchControl = new FormControl(this.searchQuery(), {nonNullable: true});
constructor() {
this.searchControl.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {
this.searchQuery.set(value);
});
// Thinkig about refactoring this to a single afterRenderEffect ?
// Answer: It won't have the same behavior
effect(() => {
this.items();
afterNextRender(
@@ -91,6 +99,9 @@ export class SearchDialog implements OnDestroy {
if (!this.dialog().nativeElement.open) {
this.dialog().nativeElement.showModal?.();
}
// We want to select the pre-existing text on opening
// In order to change the search input with minimal user interaction.
this.textField()?.input().nativeElement.select();
},
});
@@ -106,46 +117,6 @@ export class SearchDialog implements OnDestroy {
});
}
splitMarkedText(snippet: string): Array<{highlight: boolean; text: string}> {
const parts: Array<{highlight: boolean; text: string}> = [];
while (snippet.indexOf('<ɵ>') !== -1) {
const beforeMatch = snippet.substring(0, snippet.indexOf('<ɵ>'));
const match = snippet.substring(snippet.indexOf('<ɵ>') + 3, snippet.indexOf('</ɵ>'));
parts.push({highlight: false, text: beforeMatch});
parts.push({highlight: true, text: match});
snippet = snippet.substring(snippet.indexOf('</ɵ>') + 4);
}
parts.push({highlight: false, text: snippet});
return parts;
}
getBestSnippetForMatch(result: SearchResult): string {
// if there is content, return it
if (result._snippetResult.content !== undefined) {
return result._snippetResult.content.value;
}
const hierarchy = result._snippetResult.hierarchy;
if (hierarchy === undefined) {
return '';
}
function matched(snippet: SnippetResult | undefined) {
return snippet?.matchLevel !== undefined && snippet.matchLevel !== 'none';
}
// return the most specific subheader match
if (matched(hierarchy.lvl4)) {
return hierarchy.lvl4!.value;
}
if (matched(hierarchy.lvl3)) {
return hierarchy.lvl3!.value;
}
if (matched(hierarchy.lvl2)) {
return hierarchy.lvl2!.value;
}
// if no subheader matched the query, fall back to just returning the most specific one
return hierarchy.lvl3?.value ?? hierarchy.lvl2?.value ?? '';
}
ngOnDestroy(): void {
this.keyManager.destroy();
}
@@ -155,10 +126,6 @@ export class SearchDialog implements OnDestroy {
this.onClose.emit();
}
updateSearchQuery(query: string) {
this.search.updateSearchQuery(query);
}
private navigateToTheActiveItem(): void {
const activeItemLink: string | undefined = this.keyManager.activeItem?.item?.url;
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "select",
srcs = [
"select.component.ts",
@@ -12,14 +13,14 @@ ng_module(
":select.component.css",
"select.component.html",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
deps = [
interop_deps = [
"//packages/common",
"//packages/core",
"//packages/forms",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
)
sass_binary(
@@ -27,13 +28,13 @@ sass_binary(
src = "select.component.scss",
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":select",
"//packages/core",
"//packages/core/testing",
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "slide-toggle",
srcs = [
"slide-toggle.component.ts",
@@ -12,14 +13,14 @@ ng_module(
":slide-toggle.component.css",
"slide-toggle.component.html",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
deps = [
interop_deps = [
"//packages/common",
"//packages/core",
"//packages/forms",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
)
sass_binary(
@@ -27,13 +28,13 @@ sass_binary(
src = "slide-toggle.component.scss",
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":slide-toggle",
"//packages/core",
"//packages/core/testing",
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "table-of-contents",
srcs = [
"table-of-contents.component.ts",
@@ -12,32 +13,37 @@ ng_module(
":table-of-contents.component.css",
"table-of-contents.component.html",
],
interop_deps = [
"//packages/common",
"//packages/core",
"//packages/router",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
"//adev/shared-docs/components/viewers:__pkg__",
],
deps = [
"//adev/shared-docs/components/icon",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/services",
"//packages/common",
"//packages/core",
"//packages/router",
"//adev/shared-docs/components/icon:icon_rjs",
"//adev/shared-docs/interfaces:interfaces_rjs",
"//adev/shared-docs/services:services_rjs",
],
)
sass_binary(
name = "style",
src = "table-of-contents.component.scss",
deps = [
"//adev/shared-docs/styles",
],
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":table-of-contents",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/providers",
@@ -6,26 +6,18 @@
<ul class="docs-faceted-list">
<!-- TODO: Hide li elements with class docs-toc-item-h3 for laptop, table and phone screen resolutions -->
@for (item of tableOfContentItems(); track item.id) {
<li
class="docs-faceted-list-item"
[class.docs-toc-item-h2]="item.level === TableOfContentsLevel.H2"
[class.docs-toc-item-h3]="item.level === TableOfContentsLevel.H3"
>
<!-- Not using routerLink + fragment because of: https://github.com/angular/angular/issues/30139 -->
<a
[href]="location.path() + '#' + item.id"
[class.docs-faceted-list-item-active]="item.id === activeItemId()"
>
{{ item.title }}
</a>
</li>
<li class="docs-faceted-list-item" [class.docs-toc-item-h2]="item.level === TableOfContentsLevel.H2"
[class.docs-toc-item-h3]="item.level === TableOfContentsLevel.H3">
<!-- Not using routerLink + fragment because of: https://github.com/angular/angular/issues/30139 -->
<a [href]="location.path() + '#' + item.id" [class.docs-faceted-list-item-active]="item.id === activeItemId()">
{{ item.title }}
</a>
</li>
}
</ul>
</nav>
@if (shouldDisplayScrollToTop()) {
<button type="button" (click)="scrollToTop()">
<docs-icon role="presentation">arrow_upward_alt</docs-icon>
Back to the top
</button>
}
</aside>
<button type="button" (click)="scrollToTop()">
<docs-icon role="presentation">arrow_upward_alt</docs-icon>
Back to the top
</button>
</aside>
@@ -1,14 +1,17 @@
@use '../../styles/media-queries' as mq;
:host {
display: flex;
flex-direction: column;
position: fixed;
right: 16px;
right: 1rem;
top: 0;
height: fit-content;
width: 14rem;
padding-inline: 1rem;
padding-right: 2rem;
max-height: 100vh;
overflow-y: scroll;
box-sizing: border-box;
aside {
margin-bottom: 2rem;
@@ -19,7 +22,7 @@
display: none;
}
@media only screen and (max-width: 1430px) {
@include mq.for-large-desktop-down {
position: relative;
right: 0;
max-height: min-content;
@@ -90,7 +93,7 @@ button {
}
}
@media only screen and (max-width: 1430px) {
@include mq.for-large-desktop-down {
display: none;
}
}
}
@@ -11,8 +11,8 @@ import {
Component,
DestroyRef,
input,
computed,
inject,
afterNextRender,
} from '@angular/core';
import {Location} from '@angular/common';
import {TableOfContentsLevel} from '../../interfaces/index';
@@ -39,12 +39,15 @@ export class TableOfContents {
tableOfContentItems = this.tableOfContentsLoader.tableOfContentItems;
activeItemId = this.scrollSpy.activeItemId;
shouldDisplayScrollToTop = computed(() => !this.scrollSpy.scrollbarThumbOnTop());
TableOfContentsLevel = TableOfContentsLevel;
ngAfterViewInit() {
this.tableOfContentsLoader.buildTableOfContent(this.contentSourceElement());
this.scrollSpy.startListeningToScroll(this.contentSourceElement(), this.destroyRef);
constructor() {
afterNextRender({
read: () => {
this.tableOfContentsLoader.buildTableOfContent(this.contentSourceElement());
this.scrollSpy.setupActiveItemListener(this.contentSourceElement(), this.destroyRef);
},
});
}
scrollToTop(): void {
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "text-field",
srcs = [
"text-field.component.ts",
@@ -12,15 +13,17 @@ ng_module(
":text-field.component.css",
"text-field.component.html",
],
interop_deps = [
"//packages/common",
"//packages/core",
"//packages/forms",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
"//adev/shared-docs/components/search-dialog:__pkg__",
],
deps = [
"//adev/shared-docs/components/icon",
"//packages/common",
"//packages/core",
"//packages/forms",
"//adev/shared-docs/components/icon:icon_rjs",
],
)
@@ -29,13 +32,13 @@ sass_binary(
src = "text-field.component.scss",
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":text-field",
"//packages/core",
"//packages/core/testing",
@@ -6,7 +6,28 @@
type="text"
[attr.placeholder]="placeholder()"
[attr.name]="name()"
[ngModel]="value()"
(ngModelChange)="setValue($event)"
[value]="value()"
(input)="setValue(inputRef.value)"
class="docs-text-field"
/>
@if (resetLabel() && inputRef.value.length > 0) {
<button
type="reset"
[title]="resetLabel()"
class="docs-text-reset"
[attr.aria-label]="resetLabel()"
(click)="clearTextField()"
>
<svg width="20" height="20" viewBox="0 0 20 20">
<path
d="M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z"
stroke="currentColor"
fill="none"
fill-rule="evenodd"
stroke-linecap="round"
stroke-linejoin="round"
></path>
</svg>
</button>
}
@@ -7,3 +7,11 @@
docs-icon + .docs-text-field {
font-size: 1rem;
}
button {
color: var(--secondary-contrast);
&:hover {
color: var(--vivid-pink);
}
}
@@ -28,4 +28,13 @@ describe('TextField', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
it('should update DOM when setting the value via the CVA', () => {
component.setValue('test');
fixture.detectChanges();
expect(fixture.nativeElement.querySelector('input').value).toBe('test');
// If we were using ngModel instead of the value binding, we would get an empty string
// because of https://github.com/angular/angular/issues/13568
});
});
@@ -46,6 +46,7 @@ export class TextField implements ControlValueAccessor {
readonly disabled = model<boolean>(false);
readonly hideIcon = input<boolean>(false);
readonly autofocus = input<boolean>(false);
readonly resetLabel = input<string | null>(null);
// Implemented as part of ControlValueAccessor.
private onChange: (value: string) => void = (_: string) => {};
@@ -62,8 +63,8 @@ export class TextField implements ControlValueAccessor {
}
// Implemented as part of ControlValueAccessor.
writeValue(value: string): void {
this.value.set(value);
writeValue(value: unknown): void {
this.value.set(typeof value === 'string' ? value : null);
}
// Implemented as part of ControlValueAccessor.
@@ -90,4 +91,8 @@ export class TextField implements ControlValueAccessor {
this.onChange(value);
this.onTouched();
}
clearTextField() {
this.setValue('');
}
}
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "top-level-banner",
srcs = [
"top-level-banner.component.ts",
@@ -12,15 +13,17 @@ ng_module(
":top-level-banner.component.css",
"top-level-banner.component.html",
],
interop_deps = [
"//packages/common",
"//packages/core",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
deps = [
"//adev/shared-docs/components/icon",
"//adev/shared-docs/directives",
"//adev/shared-docs/providers",
"//packages/common",
"//packages/core",
"//adev/shared-docs/components/icon:icon_rjs",
"//adev/shared-docs/directives:directives_rjs",
"//adev/shared-docs/providers:providers_rjs",
],
)
@@ -29,13 +32,13 @@ sass_binary(
src = "top-level-banner.component.scss",
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":top-level-banner",
"//adev/shared-docs/providers",
"//packages/core",
+23 -17
View File
@@ -1,9 +1,10 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "viewers",
srcs = [
"docs-viewer/docs-viewer.component.ts",
@@ -14,21 +15,24 @@ ng_module(
":example-viewer/example-viewer.component.css",
"example-viewer/example-viewer.component.html",
],
interop_deps = [
"//packages/common",
"//packages/core",
"//packages/router",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
],
deps = [
"//adev/shared-docs/components/breadcrumb",
"//adev/shared-docs/components/copy-source-code-button",
"//adev/shared-docs/components/table-of-contents",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/providers",
"//packages/common",
"//packages/core",
"//packages/router",
"@npm//@angular/cdk",
"@npm//@angular/material",
"@npm//@types/dom-view-transitions",
"//:node_modules/@angular/cdk",
"//:node_modules/@angular/material",
"//:node_modules/@types/dom-view-transitions",
"//:node_modules/rxjs",
"//adev/shared-docs/components/breadcrumb:breadcrumb_rjs",
"//adev/shared-docs/components/copy-source-code-button:copy-source-code-button_rjs",
"//adev/shared-docs/components/table-of-contents:table-of-contents_rjs",
"//adev/shared-docs/interfaces:interfaces_rjs",
"//adev/shared-docs/providers:providers_rjs",
],
)
@@ -45,13 +49,13 @@ sass_binary(
],
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["**/*.spec.ts"],
),
deps = [
interop_deps = [
":viewers",
"//adev/shared-docs/components/breadcrumb",
"//adev/shared-docs/components/copy-source-code-button",
@@ -66,8 +70,10 @@ ts_library(
"//packages/platform-browser/animations",
"//packages/router",
"//packages/router/testing",
"@npm//@angular/cdk",
"@npm//@angular/material",
],
deps = [
"//:node_modules/@angular/cdk",
"//:node_modules/@angular/material",
],
)
@@ -1,5 +1,6 @@
@use '../../../styles/links' as links;
@use '../../../styles/anchor' as anchor;
@use '../../../styles/media-queries' as mq;
:host {
--translate-y: clamp(5px, 0.25em, 7px);
@@ -8,21 +9,31 @@
.docs-viewer {
display: flex;
flex-direction: column;
padding: var(--layout-padding);
max-width: var(--page-width);
width: 100%;
padding: 0px;
box-sizing: border-box;
padding-inline: var(--layout-padding);
@media only screen and (max-width: 1430px) {
@include mq.for-large-desktop-down {
container: docs-content / inline-size;
}
// If rendered on the docs page, accommodate width for TOC
docs-docs & {
@media only screen and (min-width: 1430px) and (max-width: 1550px) {
width: calc(100% - 195px - var(--layout-padding));
max-width: var(--page-width);
}
@include mq.for-extra-large-desktop-up {
max-width: var(--page-width);
}
//applying styles when TOC position got translated to the top right
@include mq.for-large-desktop-up {
// take the available space except a reserved area for TOC
margin-left: -16rem;
width: calc(100% - 16rem);
}
// restrict the content to be fluid until it reaches that width
// $screen-xl is the breakpoint where Main content stop being fluid and made fixed
>*:not(docs-table-of-contents) {
max-width: calc(mq.$screen-xxl - var(--secondary-nav-width) - var(--primary-nav-width) - var(--layout-padding)*2)
}
pre {
@@ -79,6 +90,7 @@
}
a:not(.docs-github-links):not(.docs-card):not(.docs-pill):not(.docs-example-github-link) {
&[href^='http:'],
&[href^='https:'] {
@include links.external-link-with-icon();
@@ -86,6 +98,7 @@
}
&-scroll-margin-large {
h2,
h3 {
scroll-margin: 5em;
@@ -95,7 +108,8 @@
.docs-header {
margin-block-end: 1rem;
& > p:first-child {
&>p:first-child {
color: var(--quaternary-contrast);
font-weight: 500;
margin: 0;
@@ -126,4 +140,4 @@
}
}
}
}
}
@@ -121,7 +121,7 @@ describe('DocViewer', () => {
expect(checkIcon.nativeElement.innerHTML).toBe('check');
});
it('should display example viewer in multi file mode when user clicks expand', async () => {
it('should display example viewer in multi file mode when provided example is multi file snippet', async () => {
const fixture = TestBed.createComponent(DocViewer);
fixture.componentRef.setInput(
'docContent',
@@ -131,10 +131,6 @@ describe('DocViewer', () => {
await fixture.whenStable();
const exampleViewer = fixture.debugElement.query(By.directive(ExampleViewer));
const expandButton = fixture.debugElement.query(
By.css('button[aria-label="Expand code example"]'),
);
expandButton.nativeElement.click();
expect(exampleViewer).not.toBeNull();
expect(exampleViewer.componentInstance.view()).toBe(CodeExampleViewMode.MULTI_FILE);
@@ -49,8 +49,7 @@ export const DOCS_VIEWER_SELECTOR = 'docs-viewer';
export const DOCS_CODE_SELECTOR = '.docs-code';
export const DOCS_CODE_MUTLIFILE_SELECTOR = '.docs-code-multifile';
// TODO: Update the branch/sha
export const GITHUB_CONTENT_URL =
'https://github.com/angular/angular/blob/main/adev/src/content/examples/';
export const GITHUB_CONTENT_URL = 'https://github.com/angular/angular/blob/main/';
@Component({
selector: DOCS_VIEWER_SELECTOR,
@@ -61,6 +60,7 @@ export const GITHUB_CONTENT_URL =
encapsulation: ViewEncapsulation.None,
host: {
'[class.docs-animate-content]': 'animateContent',
'[class.docs-with-TOC]': 'hasToc',
},
})
export class DocViewer implements OnChanges {
@@ -196,13 +196,13 @@ export class DocViewer implements OnChanges {
const exampleRef = this.viewContainer.createComponent(ExampleViewer);
this.countOfExamples++;
exampleRef.instance.metadata = {
exampleRef.setInput('metadata', {
title: title ?? firstCodeSnippetTitle,
path,
files: snippets,
preview,
id: this.countOfExamples,
};
});
exampleRef.instance.githubUrl = `${GITHUB_CONTENT_URL}/${snippets[0].name}`;
exampleRef.instance.stackblitzUrl = `${ASSETS_EXAMPLES_PATH}/${snippets[0].name}.html`;
@@ -293,9 +293,6 @@ export class DocViewer implements OnChanges {
}
}
// Trigger change detection after setting inputs.
componentRef.changeDetectorRef.detectChanges();
// Attach a view to the ApplicationRef for change detection
// purposes and for hydration serialization to pick it up
// during SSG.
@@ -100,26 +100,59 @@ describe('ExampleViewer', () => {
expect(component.tabs()![2].name).toBe('another-example.ts');
});
it('should expandable be false when none of the example files have defined visibleLinesRange ', waitForAsync(async () => {
it('should expand button not appear when there is no hidden line', waitForAsync(async () => {
component.metadata = getMetadata();
await component.renderExample();
expect(component.expandable()).toBeFalse();
const button = fixture.debugElement.query(By.css('button[aria-label="Expand code example"]'));
expect(button).toBeNull();
}));
it('should expandable be true when at least one example file has defined visibleLinesRange ', waitForAsync(async () => {
it('should have line with hidden line class when expand button is present', waitForAsync(async () => {
const expectedCodeSnippetContent =
'typescript code<br/>' + '<div class="line">hidden line</div>';
component.metadata = getMetadata({
files: [
{name: 'example.ts', content: 'typescript file'},
{
name: 'example.html',
content: 'html file',
visibleLinesRange: '[1, 2]',
name: 'example.ts',
content: `<pre><code>${expectedCodeSnippetContent}</code></pre>`,
visibleLinesRange: '[1]',
},
{name: 'another-example.ts', content: 'css file'},
],
});
await component.renderExample();
expect(component.expandable()).toBeTrue();
fixture.detectChanges();
const hiddenLine = fixture.debugElement.query(By.css('div[class="line hidden"]'));
expect(hiddenLine).toBeTruthy();
}));
it('should have no more line with hidden line class when expand button is clicked', waitForAsync(async () => {
const expectedCodeSnippetContent =
'typescript code<br/>' + '<div class="line">hidden line</div>';
component.metadata = getMetadata({
files: [
{
name: 'example.ts',
content: `<pre><code>${expectedCodeSnippetContent}</code></pre>`,
visibleLinesRange: '[1]',
},
],
});
await component.renderExample();
fixture.detectChanges();
const expandButton = fixture.debugElement.query(
By.css('button[aria-label="Expand code example"]'),
);
expandButton.nativeElement.click();
fixture.detectChanges();
const hiddenLine = fixture.debugElement.query(By.css('div[class="line hidden"]'));
expect(hiddenLine).toBeNull();
}));
it('should set exampleComponent when metadata contains path and preview is true', waitForAsync(async () => {
@@ -7,18 +7,21 @@
*/
import {
afterNextRender,
ChangeDetectionStrategy,
Component,
DestroyRef,
Input,
Type,
computed,
inject,
ChangeDetectorRef,
ViewChild,
signal,
Component,
computed,
DestroyRef,
ElementRef,
forwardRef,
inject,
Injector,
input,
Input,
signal,
Type,
viewChild,
} from '@angular/core';
import {CommonModule, DOCUMENT} from '@angular/common';
import {MatTabGroup, MatTabsModule} from '@angular/material/tabs';
@@ -47,19 +50,17 @@ export const HIDDEN_CLASS_NAME = 'hidden';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ExampleViewer {
// TODO: replace by signal-based input when it'll be available
@Input({required: true}) set metadata(value: ExampleMetadata) {
this.exampleMetadata.set(value);
}
exampleMetadata = input.required<ExampleMetadata>({alias: 'metadata'});
@Input() githubUrl: string | null = null;
@Input() stackblitzUrl: string | null = null;
@ViewChild('codeTabs') matTabGroup?: MatTabGroup;
readonly matTabGroup = viewChild<MatTabGroup>('codeTabs');
private readonly changeDetector = inject(ChangeDetectorRef);
private readonly clipboard = inject(Clipboard);
private readonly destroyRef = inject(DestroyRef);
private readonly document = inject(DOCUMENT);
private readonly injector = inject(Injector);
private readonly elementRef = inject(ElementRef<HTMLElement>);
private readonly exampleViewerContentLoader = inject(EXAMPLE_VIEWER_CONTENT_LOADER);
@@ -74,8 +75,8 @@ export class ExampleViewer {
CodeExampleViewMode = CodeExampleViewMode;
exampleComponent?: Type<unknown>;
expandable = signal<boolean>(false);
expanded = signal<boolean>(false);
exampleMetadata = signal<ExampleMetadata | null>(null);
snippetCode = signal<Snippet | undefined>(undefined);
tabs = computed(() =>
this.exampleMetadata()?.files.map((file) => ({
@@ -89,9 +90,6 @@ export class ExampleViewer {
? CodeExampleViewMode.SNIPPET
: CodeExampleViewMode.MULTI_FILE,
);
expandable = computed(() =>
this.exampleMetadata()?.files.some((file) => !!file.visibleLinesRange),
);
async renderExample(): Promise<void> {
// Lazy load live example component
@@ -103,18 +101,27 @@ export class ExampleViewer {
this.snippetCode.set(this.exampleMetadata()?.files[0]);
this.changeDetector.detectChanges();
afterNextRender(
() => {
// Several function below query the DOM directly, we need to wait until the DOM is rendered.
this.setCodeLinesVisibility();
this.setCodeLinesVisibility();
this.elementRef.nativeElement.setAttribute(
'id',
`example-${this.exampleMetadata()?.id.toString()!}`,
);
this.elementRef.nativeElement.setAttribute(
'id',
`example-${this.exampleMetadata()?.id.toString()!}`,
this.matTabGroup()?.realignInkBar();
this.listenToMatTabIndexChange();
const lines = this.getHiddenCodeLines();
const lineNumbers = this.getHiddenCodeLineNumbers();
this.expandable.set(lines.length > 0 || lineNumbers.length > 0);
},
{injector: this.injector},
);
this.matTabGroup?.realignInkBar();
this.listenToMatTabIndexChange();
}
toggleExampleVisibility(): void {
@@ -135,8 +142,9 @@ export class ExampleViewer {
}
private listenToMatTabIndexChange(): void {
this.matTabGroup?.realignInkBar();
this.matTabGroup?.selectedIndexChange
const matTabGroup = this.matTabGroup();
matTabGroup?.realignInkBar();
matTabGroup?.selectedIndexChange
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((index) => {
this.snippetCode.set(this.exampleMetadata()?.files[index]);
@@ -157,21 +165,9 @@ export class ExampleViewer {
}
private handleExpandedStateForCodeBlock(): void {
const lines = <HTMLDivElement[]>(
Array.from(
this.elementRef.nativeElement.querySelectorAll(
`.${CODE_LINE_CLASS_NAME}.${HIDDEN_CLASS_NAME}`,
),
)
);
const lines = this.getHiddenCodeLines();
const lineNumbers = <HTMLSpanElement[]>(
Array.from(
this.elementRef.nativeElement.querySelectorAll(
`.${CODE_LINE_NUMBER_CLASS_NAME}.${HIDDEN_CLASS_NAME}`,
),
)
);
const lineNumbers = this.getHiddenCodeLineNumbers();
const gapLines = <HTMLDivElement[]>(
Array.from(
@@ -239,4 +235,24 @@ export class ExampleViewer {
element.parentNode?.insertBefore(separator, element);
}
}
private getHiddenCodeLines(): HTMLDivElement[] {
return <HTMLDivElement[]>(
Array.from(
this.elementRef.nativeElement.querySelectorAll(
`.${CODE_LINE_CLASS_NAME}.${HIDDEN_CLASS_NAME}`,
),
)
);
}
private getHiddenCodeLineNumbers(): HTMLSpanElement[] {
return <HTMLSpanElement[]>(
Array.from(
this.elementRef.nativeElement.querySelectorAll(
`.${CODE_LINE_NUMBER_CLASS_NAME}.${HIDDEN_CLASS_NAME}`,
),
)
);
}
}
-28
View File
@@ -1,28 +0,0 @@
load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:private"])
ts_library(
name = "constants",
srcs = [
"index.ts",
],
visibility = [
"//adev/shared-docs:__subpackages__",
],
deps = [
":lib",
],
)
ts_library(
name = "lib",
srcs = glob(
[
"*.ts",
],
exclude = [
"index.ts",
],
),
)
-13
View File
@@ -1,13 +0,0 @@
/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// Used for both the table of contents and the home animation
export const RESIZE_EVENT_DELAY = 500;
// Used for the home animation
export const WEBGL_LOADED_DELAY = 250;
-9
View File
@@ -1,9 +0,0 @@
/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export * from './delay';
+25
View File
@@ -0,0 +1,25 @@
load("//tools:defaults2.bzl", _ng_project = "ng_project", _ts_project = "ts_project")
def ts_project(name, tsconfig = None, testonly = False, **kwargs):
if tsconfig == None:
if native.package_name().startswith("adev/shared-docs"):
tsconfig = "//adev/shared-docs:tsconfig_test" if testonly else "//adev/shared-docs:tsconfig_build"
_ts_project(
name = name,
tsconfig = tsconfig,
testonly = testonly,
**kwargs
)
def ng_project(name, tsconfig = None, testonly = False, **kwargs):
if tsconfig == None:
if native.package_name().startswith("adev/shared-docs"):
tsconfig = "//adev/shared-docs:tsconfig_test" if testonly else "//adev/shared-docs:tsconfig_build"
_ng_project(
name = name,
tsconfig = tsconfig,
testonly = testonly,
**kwargs
)
+6 -6
View File
@@ -1,18 +1,18 @@
load("//tools:defaults.bzl", "ts_library")
load("//adev/shared-docs:defaults.bzl", "ts_project")
package(default_visibility = ["//visibility:private"])
ts_library(
ts_project(
name = "directives",
srcs = [
"index.ts",
],
visibility = [
"//adev/shared-docs:__subpackages__",
],
deps = [
interop_deps = [
"//adev/shared-docs/directives/click-outside",
"//adev/shared-docs/directives/external-link",
"//adev/shared-docs/directives/search-item",
],
visibility = [
"//adev/shared-docs:__subpackages__",
],
)
@@ -1,28 +1,29 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "click-outside",
srcs = [
"click-outside.directive.ts",
],
visibility = [
"//adev/shared-docs/directives:__pkg__",
],
deps = [
interop_deps = [
"//packages/common",
"//packages/core",
],
visibility = [
"//adev/shared-docs/directives:__pkg__",
],
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":click-outside",
"//packages/core",
"//packages/core/testing",
@@ -1,31 +1,34 @@
load("//tools:defaults.bzl", "karma_web_test_suite", "ng_module", "ts_library")
load("//adev/shared-docs:defaults.bzl", "ng_project", "ts_project")
load("//tools:defaults.bzl", "karma_web_test_suite")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "external-link",
srcs = [
"external-link.directive.ts",
],
interop_deps = [
"//packages/common",
"//packages/core",
"//packages/router",
],
visibility = [
"//adev/shared-docs/directives:__pkg__",
],
deps = [
"//adev/shared-docs/providers",
"//adev/shared-docs/utils",
"//packages/common",
"//packages/core",
"//packages/router",
"//adev/shared-docs/providers:providers_rjs",
"//adev/shared-docs/utils:utils_rjs",
],
)
ts_library(
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
interop_deps = [
":external-link",
"//adev/shared-docs/providers",
"//packages/core",
@@ -1,18 +1,20 @@
load("//tools:defaults.bzl", "ng_module")
load("//adev/shared-docs:defaults.bzl", "ng_project")
package(default_visibility = ["//visibility:private"])
ng_module(
ng_project(
name = "search-item",
srcs = [
"search-item.directive.ts",
],
interop_deps = [
"//packages/core",
],
visibility = [
"//adev/shared-docs/directives:__pkg__",
],
deps = [
"//adev/shared-docs/interfaces",
"//packages/core",
"@npm//@angular/cdk",
"//:node_modules/@angular/cdk",
"//adev/shared-docs/interfaces:interfaces_rjs",
],
)
@@ -8,7 +8,7 @@
import {Directive, ElementRef, Input, inject, signal} from '@angular/core';
import {Highlightable} from '@angular/cdk/a11y';
import {SearchResult} from '../../interfaces/search-results';
import {SearchResultItem} from '../../interfaces';
@Directive({
selector: '[docsSearchItem]',
@@ -17,7 +17,9 @@ import {SearchResult} from '../../interfaces/search-results';
},
})
export class SearchItem implements Highlightable {
@Input() item?: SearchResult;
// Those inputs are required by the Highlightable interface
// We can't migrate them to signals yet
@Input() item?: SearchResultItem;
@Input() disabled = false;
private readonly elementRef = inject(ElementRef<HTMLLIElement>);
@@ -36,14 +38,6 @@ export class SearchItem implements Highlightable {
this._isActive.set(false);
}
getLabel(): string {
if (!this.item?.hierarchy) {
return '';
}
const {hierarchy} = this.item;
return `${hierarchy.lvl0}${hierarchy.lvl1}${hierarchy.lvl2}`;
}
scrollIntoView(): void {
this.elementRef?.nativeElement.scrollIntoView({block: 'nearest'});
}

Some files were not shown because too many files have changed in this diff Show More