Commit graph

36863 commits

Author SHA1 Message Date
AleksanderBodurri
f30bd26b0a fix(devtools): implement signal read error handling in DevTools (#61911)
Fixes: #61900

Previously in DevTools we would read signal values to display preview values in the UI without safely catching any errors thrown in their evaluations.

Now those signal functions are run in a safe context, their errors are caught and handled in the UI as well as replayed in the console.

PR Close #61911
2025-06-19 10:15:39 +02:00
ivanwonder
5d2e85920e feat(language-service): support to fix missing required inputs diagnostic (#50911)
Support to add the missing required inputs into the element and append
after the last attribute of the element.

But it skips the structural directive shorthand attribute. For example,
`<a *ngFor=""></a>`, its shorthand is `<ng-template ngFor>`, the `valueSpan`
of the `ngFor` is empty, and the info is lost, so it can't use to insert
the missing attribute after it.

PR Close #50911
2025-06-19 10:13:26 +02:00
Angular Robot
0cd6f363ca build: update cross-repo angular dependencies (#62079)
See associated pull request for more information.

PR Close #62079
2025-06-19 10:12:19 +02:00
Milo
24d299ea97 refactor(devtools): connect signal graph into directive explorer (#62108)
add an open signal graph button that can be enabled from
devtools-tabs, display the signal graph in a split pane

PR Close #62108
2025-06-19 10:09:21 +02:00
Shuaib Hasan Akib
bbd253b391 docs(docs-infra): fix spelling mistake (#62126)
PR Close #62126
2025-06-19 10:07:41 +02:00
Joey Perrott
557ac51c32 build: migrate to using new jasmine_test (#62131)
Migrate additional targets to jasmine_test

PR Close #62131
2025-06-19 10:06:27 +02:00
Matthieu Riegler
c0aa1301b3 docs: add homepage link to AI (#62130)
PR Close #62130
2025-06-19 10:05:32 +02:00
Matthieu Riegler
0d4bd89840 docs: add helpful banner with link to best practices (#62137)
PR Close #62137
2025-06-19 10:03:53 +02:00
Matthieu Riegler
c3e11e5852 docs: update best-practices prompt styling (#62128)
PR Close #62128
2025-06-18 13:52:56 -07:00
Pawel Kozlowski
085e29fb23 release: cut the v20.1.0-next.2 release 2025-06-18 19:48:44 +02:00
Pawel Kozlowski
81d918aa6d docs: release notes for the v20.0.4 release 2025-06-18 19:36:22 +02:00
Joey Perrott
908c6c1d30 build: split compiler-cli compliance test into more shards (#62119)
It seems that new jasmine_test runner times out with the larger size shards, by splitting into double the shards the test consistently passes as expected

PR Close #62119
2025-06-18 18:20:22 +02:00
Kristiyan Kostadinov
34adfdea82 fix(migrations): more robust trailing comma removal in unused imports migration (#62118)
Fixes the following issues with the logic in the unused imports migration that deals with trailing commas:
1. It was generating overlapping text ranges which can break internally.
2. It wasn't handling some cases that produce trailing commas.

PR Close #62118
2025-06-18 15:57:12 +02:00
Andrew Scott
572c32a038 fix(core): Wrap ErrorEvent with no error property (#62081)
This commit updates the global error listener to wrap the global ErrorEvent in a new Error with cause
if the error property is undefined.

fixes #62078

PR Close #62081
2025-06-18 13:57:24 +02:00
Angular Robot
5885eca899 build: update dependency google-closure-compiler to v20250615 (#62114)
See associated pull request for more information.

PR Close #62114
2025-06-18 10:46:07 +02:00
Matthieu Riegler
416553065a docs(docs-infra): cookie consent should be top-most (#62103)
PR Close #62103
2025-06-18 10:40:52 +02:00
guimasi1
2db71568e8 docs: remove duplicate entry for tagged template literals (#62082)
The value literal table listed tagged template strings as both supported and unsupported. The row under Unsupported literals was removed.
PR Close #62082
2025-06-18 09:42:08 +02:00
Angular Robot
a06c7228ad build: lock file maintenance (#62062)
See associated pull request for more information.

PR Close #62062
2025-06-18 09:32:26 +02:00
Angular Robot
5868a2ea15 build: update dependency aspect_rules_js to v2.3.8 (#62090)
See associated pull request for more information.

PR Close #62090
2025-06-18 09:28:47 +02:00
Ben Hong
5f6e336b21 docs: add dedicated redirecting routes guide (#62005)
docs: update language block

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

docs: enhance redirects function docs

docs: fix future tense usage

docs: update phrasing to be present tense

docs: update redirect guides to use better phrasing and examples

docs: fix typo on code example

Co-authored-by: Andrew Scott <atscott01@gmail.com>

docs: fix typo in code example

Co-authored-by: Andrew Scott <atscott01@gmail.com>

docs: update syntax of code snippet

Co-authored-by: Andrew Scott <atscott01@gmail.com>

docs: update description on redirect function and api docs

PR Close #62005
2025-06-18 09:07:32 +02:00
Matthieu Riegler
cd4ac81fc6 docs: explicit that class bindings still support object (#62102)
PR Close #62102
2025-06-18 09:03:34 +02:00
kodeti
3f3c98627c docs(docs-infra): fix minor typo on Components page (#62112)
Fix typo on Introduction > Essentials > Components page as "Use profile" is likely meant to be written as "User profile".
PR Close #62112
2025-06-18 09:01:23 +02:00
Joey Perrott
3a0cfd544d build: migrate to using new jasmine_test (#62086)
Use the new jasmine_test based on rules_js instead of jasmine_node_test from rules_nodejs

PR Close #62086
2025-06-18 08:27:26 +02:00
Joey Perrott
4d9e50e208 build: update the ts_integrity expected for the typescript version in WORKSPACE (#62109)
Update the WORKSPACE to expect the correct sha.

PR Close #62109
2025-06-17 23:42:16 +00:00
marktechson
39237e85ab docs: add update AI instructions (#62089)
Adds context information for use with LLMs, IDEs and more.

PR Close #62089
2025-06-17 19:30:24 +02:00
Joey Perrott
18a7ce892c build: migrate back to using the @npm// sourced benchmark_test macro (#62101)
Use the benchmark macro from @npm// instead of @devinfra//

PR Close #62101
2025-06-17 18:51:21 +02:00
Kristiyan Kostadinov
2e0c98bd3f feat(core): support bindings in TestBed (#62040)
Adds support for passing in `Binding` objects into `TestBed.createComponent`. This makes it easier to test components by avoiding the need to create a wrapper component. Furthermore, it keeps the behavior consistent between tests and the actual app. For example, given a custom checkbox that looks like this:

```typescript
@Component({
  selector: 'my-checkbox',
  template: '...',
  host: {'[class.checked]': 'isChecked()'}
})
export class MyCheckbox {
  isChecked = input(false);
}
```

A test for the `isChecked` input would look something like this:

```typescript
it('should toggle the checked class', () => {
  @Component({
    imports: [MyCheckbox],
    template: '<my-checkbox [isChecked]="isChecked"/>',
  })
  class Wrapper {
    isChecked = false;
  }

  const fixture = TestBed.createComponent(Wrapper);
  const checkbox = fixture.nativeElement.querySelector('my-checkbox');
  fixture.detectChanges();
  expect(checkbox.classList).not.toContain('checked');

  fixture.componentInstance.isChecked = true;
  fixture.detectChanges();
  expect(checkbox.classList).toContain('checked');
});
```

Whereas with the new API, the test would look like this:

```typescript
it('should toggle the checked class', () => {
  const isChecked = signal(false);
  const fixture = TestBed.createComponent(MyCheckbox, {
    bindings: [inputBinding('isChecked', isChecked)]
  });
  const checkbox = fixture.nativeElement.querySelector('my-checkbox');
  fixture.detectChanges();
  expect(checkbox.classList).not.toContain('checked');

  isChecked.set(true);
  fixture.detectChanges();
  expect(checkbox.classList).toContain('checked');
});
```

PR Close #62040
2025-06-17 11:49:27 +02:00
Milo
89efd27884 refactor(devtools): create devtools signals view (#61919)
create a component for the devtools signal pane, including view source, view value, and flashing of node updates

PR Close #61919
2025-06-17 11:19:53 +02:00
Shuaib Hasan Akib
64409dbabc docs(router): improve discoverability of route guard section (#62060)
PR Close #62060
2025-06-17 11:19:14 +02:00
hawkgs
132fd3c301 refactor(devtools): reorganize profiler components (#62073)
Reorganize the components under `[...]/devtools-tabs/profiler`.

PR Close #62073
2025-06-17 10:52:07 +02:00
Matthieu Riegler
b963a5281a docs: remove mention of ngModel in directives overview (#62088)
Fixes #62072

PR Close #62088
2025-06-17 10:50:42 +02:00
Doug Parker
95efa08c5b release: bump Angular DevTools version to 1.0.34 (#62085)
PR Close #62085
2025-06-17 10:49:55 +02:00
Andreas Gödecke
cf2bc910c9 docs: fix markdown syntax (#62084)
PR Close #62084
2025-06-17 10:46:27 +02:00
Joey Perrott
1182fe7053 build: migrate to usages of @devinfra// instead of @npm//@angular/build-tooling (#62050)
Use workspace imported devinfra deps instead of npm dep

PR Close #62050
2025-06-16 10:23:30 +02:00
Matthieu Riegler
2e3925a65c refactor(localize): add tripleslash type of Application builder (#62037)
Prior to this change, the triple slash directive was only added on the angular-devkit application builder.

Fixes #61968

PR Close #62037
2025-06-15 12:39:36 +02:00
hawkgs
be2747eb26 fix(devtools): errors caused by the injector tree (#62029)
Errors:
- Attempting to translate SVGs when the tab is not on focus (Regression from #61241)
- Null injector node focus error

Extra:
- Improve scoping of the injector-tree component class members

PR Close #62029
2025-06-13 12:34:06 +02:00
Jam Hsu
dacb3f25ea docs: remove developer preview hint for withI18nSupport (#62039)
PR Close #62039
2025-06-13 12:32:41 +02:00
Matthieu Riegler
0e4678ffc5 docs: fix code spans in Mapping section on elements.md (#61994)
PR Close #61994
2025-06-13 12:31:27 +02:00
Joey Perrott
9c0b41796e build: migrate adev to use new jasmine_test (#62034)
Use jasmine_test instead of jasmine_node_test in adev

PR Close #62034
2025-06-13 12:30:15 +02:00
arturovt
31da435854 fix(core): inject APP_ID before injector is destroyed (#61885)
In this commit, we request `APP_ID` outside the `onDestroy` callback because the injector might already be in a destroyed state when the callback runs.

PR Close #61885
2025-06-12 15:56:51 +02:00
Angular Robot
1fcf67cb17 build: update cross-repo angular dependencies (#62006)
See associated pull request for more information.

PR Close #62006
2025-06-12 15:55:19 +02:00
Matthieu Riegler
4040a6ba5d refactor(migrations): support local string tokens for inject migration (#62013)
The `localTypeChecker` allows us to at least support locally defined strings in addition to string literals.

PR Close #62013
2025-06-12 15:53:20 +02:00
Michael Berger
28484cbe0f docs(core): correct standalone jsdocs (#62025)
PR Close #62025
2025-06-12 15:51:23 +02:00
Doug Parker
38f8705aab docs: adds --jobs 4 to Firefox release flags (#62015)
This seems to be helpful for Mozilla reviewers to reproduce the build without encountering Bazel errors like:

```
Server terminated abruptly (error code: 14, error message: 'Socket closed', log file: '/home/parallels/.cache/bazel/_bazel_parallels/ae710c6507eb251f9511ac4228641059/server/jvm.out')
```

`--local_ram_resources` is also useful, but I'm not sure what to set it to by default or how necessary it is, so let's just start with `--jobs 4` for now. The 4 is arbitrary as I don't have insight into how many jobs are actually appropriate, but we can go with this for now and tweak the number later if it still causes issues.

PR Close #62015
2025-06-12 13:48:39 +02:00
Angular Robot
5a52f47df1 build: update dependency google-closure-compiler to v20250609 (#62007)
See associated pull request for more information.

PR Close #62007
2025-06-12 13:44:48 +02:00
Suhas Talekar
0ccc0ac3b6 docs: fix typos (#62022)
Fixes typo error
PR Close #62022
2025-06-12 13:38:50 +02:00
Jessica Janiuk
8424b3bcd5 fix(core): Fixes template outlet hydration (#61989)
Projected nodes were missing ssrId information and were skipping annotating template information, which caused templates to be destroyed and recreated rather than hydrated.

fixes: #50543

PR Close #61989
2025-06-12 12:53:21 +02:00
Paul Gschwendtner
61fb6e79ff build: fix hermetic execution of packages/core/test/... (#62027)
Due to a bug that is currently in progress of being resolved in the
`rules_js` toolchain (see:
https://github.com/aspect-build/rules_js/issues/362), we were seeing
subtle differences between `main` and PRs/local builds as RBE is a
strict sandbox environment while the normal linux/darwin sandbox isn't
necessarily.

This commit fixes the issue by avoiding the interop targets that don't
bring in the actual transitive node modules.

PR Close #62027
2025-06-12 12:16:56 +02:00
Angular Robot
6f779b2782 build: update github/codeql-action action to v3.29.0 (#62023)
See associated pull request for more information.

PR Close #62023
2025-06-12 10:15:01 +02:00
hawkgs
966f96ce4e refactor(devtools): use a ResizeObserver for the responsive split (#61525)
Do not rely on `window:resize` since the split can be resized by other split panels as well.

PR Close #61525
2025-06-12 10:08:54 +02:00