Commit Graph

30355 Commits

Author SHA1 Message Date
Alex Rickabaugh a114ebad7e release: cut the v18.1.0-next.2 release 18.1.0-next.2 2024-06-12 16:26:51 -07:00
Alex Rickabaugh 38b84007b6 docs: release notes for the v18.0.3 release 2024-06-12 16:20:47 -07:00
Sasidharan SD f4b86bd9d5 docs: fix configure routes link (#56415)
PR Close #56415
2024-06-12 13:36:27 -07:00
Angular Robot 9e670ceea3 build: update io_bazel_rules_sass digest to 221f949 (#56393)
See associated pull request for more information.

PR Close #56393
2024-06-12 13:35:32 -07:00
Angular Robot 5cc9e8075a build: update babel dependencies to v7.24.7 (#56373)
See associated pull request for more information.

PR Close #56373
2024-06-12 13:11:12 -07:00
Andrew Kushnir 71c9609298 refactor(core): inject PendingTasks as optional in EventEmitter class (#56411)
This commit makes `PendingTasks` dependency in the `EventEmitter` class optional to make sure this code works with various test setups.

PR Close #56411
2024-06-12 13:10:40 -07:00
arturovt b8d5882127 fix(zone.js): allow enabling default beforeunload handling (#55875)
Prior to this commit, when zone.js was included, it wasn't possible to handle `beforeunload`
events correctly if event handlers returned strings to prompt the user.

With this change, we introduce a global configuration flag,
`__zone_symbol__enable_beforeunload`, to allow consumers to enable the default
`beforeunload` handling behavior.

This flag is necessary to prevent any breaking changes resulting from this modification.
The previous attempt to fix it caused a large number of failures in G3. Hence, we're
hiding that fix behind the configuration flag.

Closes #47579

PR Close #55875
2024-06-12 13:06:21 -07:00
ivanwonder b400e2e4d4 feat(language-service): autocompletion for the component not imported (#55595)
This PR allows the language service to suggest imports for all directives returned from the
compiler, and generate the TypeScript module import and the decorator import when the component
is selected by the user.

PR Close #55595
2024-06-12 13:04:32 -07:00
Alex Rickabaugh 70157aa3d0 docs(service-worker): fix formatting of directory structure example (#56412)
This example was using the `<code-example>` tag from AIO instead of the
`<docs-code>` tag from ADEV.

Fixes #56398

PR Close #56412
2024-06-12 12:01:22 -07:00
Joey Perrott 96d3ed8493 ci: use depth 100 to allow for some history in artifact repos (#56414)
Use depth 100 to allow for some history in the artifact repos, without the entire history being necessary
which caused us to run out of space on the CI runner.

PR Close #56414
2024-06-12 11:45:26 -07:00
Matthieu Riegler 160171e26a docs(docs-infra): generate valid HTML for the update guide. (#56390)
Nested block elements in a `p` element are not valid.
The p block automatically closes if another block-level element is parsed before the closing.

PR Close #56390
2024-06-11 17:17:03 -07:00
Joey Perrott 03957b1c06 fix(docs-infra): use anchors instead of button for version picker links (#56368)
Use anchors as links instead of buttons

PR Close #56368
2024-06-11 17:16:20 -07:00
Andrew Kushnir b3780b8e5f ci: update payload size for a couple integration apps (#56391)
This commit updates the payload size for a couple integration apps. Those apps were likely close to a threshold already and the most recent commit added a few extra bytes to go over the limit.

PR Close #56391
2024-06-11 16:50:19 -07:00
Andrew Scott d5c6ee432f fix(core): async EventEmitter should contribute to app stability (#56308)
async `EventEmitter` should contribute to app stability.

fixes #56290

PR Close #56308
2024-06-11 15:10:21 -07:00
Angular Robot 79299575af build: update github/codeql-action action to v3.25.8 (#56374)
See associated pull request for more information.

PR Close #56374
2024-06-11 12:39:32 -07:00
Paul Gschwendtner f0d63f17e2 build: update cross-repo angular dependencies (#56364)
This commit also performs lock file maintenance on all integration
tests, fixing some ambigous ESM/CJS dependency graph issues.

e.g.

```
Unknown error: Error [ERR_REQUIRE_ESM]: require() of ES Module /tmp/ng-integration-test-aTpQOT/test-sandbox/node_modules/string-width/index.js from /tmp/ng-integration-test-aTpQOT/test-sandbox/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /tmp/ng-integration-test-aTpQOT/test-sandbox/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
------------------------------------------
```

Closes #56261.

PR Close #56364
2024-06-11 12:35:47 -07:00
Andrew Scott 4c7d5d8acd fix(core): signals should be tracked when embeddedViewRef.detectChanges is called (#55719)
This commit fixes an issue where signals in embedded views are not
tracked if they are refreshed with `EmbeddedViewRef.detectChanges`
directly. We had previously assumed that embedded views were always
refreshed along with their hosts.

PR Close #55719
2024-06-11 12:35:02 -07:00
Joey Perrott 60ed6257e0 ci: remove tmp directory after publishing artifacts (#56385)
Remove teh tmp directory after publishing artifacts to prevent runner from running out of space.

PR Close #56385
2024-06-11 17:48:26 +00:00
Matthieu Riegler 25a5373af2 docs(docs-infra): guard access to navigator for prerendering (#56333)
PR Close #56333
2024-06-11 17:08:35 +00:00
Joey Perrott 0287ae5b68 ci: use full depth repositories for artifact publishing (#56383)
Use full depth repositories for artifact publishing to prevent the commits from not being able to find the path between commits during push.

PR Close #56383
2024-06-11 16:42:14 +00:00
Andrew Scott 4efe5000c0 refactor(router): Add back changes param to RouterLink ngOnChanges (#56371)
This parameter was removed in a recent change but is being added back to
avoid breaking code in a minor version.
While the changes parameter is not used, some code relies on it, mostly
through API misuse (extending `RouterLink`, manually calling `ngOnChanges`, etc.).

PR Close #56371
2024-06-11 08:30:57 -07:00
Matthieu Riegler 3cbddd2e42 refactor(compiler): Extract return type description (#56287)
Thie commit extracts return type description from the jsDoc.

Compiler part of #56277, will also need as dev-infra update.

PR Close #56287
2024-06-11 08:29:22 -07:00
Aristeidis Bampakos 54170cd60d docs: use language-agnostic links for external docs (#56377)
PR Close #56377
2024-06-11 08:26:30 -07:00
Pawel Kozlowski 31d9fa40bd fix(benchpress): adjust supported browser names for headless chrome (#56360)
The chrome version controlled by selenium reports chrome-headless-shell in the
current setup. This fix accounts for the updated browser name.

PR Close #56360
2024-06-11 08:25:10 -07:00
Angular Robot 5109a43410 docs: update Angular CLI help [main] (#56328)
Updated Angular CLI help contents.

PR Close #56328
2024-06-11 08:23:19 -07:00
Angular Robot feb9858a53 build: update all non-major dependencies (#56118)
See associated pull request for more information.

PR Close #56118
2024-06-11 08:21:47 -07:00
Jeremy Elbourn f0fbced1c5 docs: update and reorganize contributor docs (#56141)
* Move from `docs/` to `contributing-docs/`
* Updated file names to better communicate their content
* Consolidated content into fewer docs
* Updated and/or deleted obsolete info

PR Close #56141
2024-06-11 08:20:59 -07:00
Matthieu Riegler 567c2f6d90 docs: add NG0913 error doc (#56352)
File copied from AIO.

fixes #56351

PR Close #56352
2024-06-10 15:11:45 -07:00
vladboisa 33d1aa69e8 docs(docs-infra): add missing context (#56367)
Added some missing context for statement regarding base href

Fixes#56336

PR Close #56367
2024-06-10 15:08:37 -07:00
WilliamDecker 7535aeb906 ci: correct invalid attributes in prettierrc configuration (#56279)
Corrected options for "tabs" to "useTabs" (https://prettier.io/docs/en/options#tabs) and "semicolon" to "semi" (https://prettier.io/docs/en/options#semicolons) as outlined in the Prettier documentation.

PR Close #56279
2024-06-10 14:05:17 -07:00
Risqi Romadhoni e3f7d687aa docs: update link for Vite and esbuild in Angular CLI introduction (#56346)
PR Close #56346
2024-06-10 14:04:29 -07:00
Sasidharan SD 0918643cd7 docs: fix input validation link in reactive forms (#56334)
PR Close #56334
2024-06-10 14:02:56 -07:00
Preston West 38eaf46213 docs: fix 3 typos and a format issue (#56329)
PR Close #56329
2024-06-10 14:00:03 -07:00
arturovt 4616d2904d docs: update event-binding (#56322)
This commit updates the event binding part, where all `scroll` listeners are marked
as passive using the special zone.js configuration flag. The configuration has been
moved from the `polyfills` file to `index.html`. Since new apps no longer include a
`polyfills.ts` file but instead have a `polyfills` property in the builder, setting
the flag in `index.html` ensures compatibility with both configurations.

PR Close #56322
2024-06-10 13:57:24 -07:00
Denis Bendrikov 080e971db3 refactor(devtools): use dark scrollbars in dark mode (#56225)
Opt the devtools into the user's color scheme preferences

PR Close #56225
2024-06-10 13:55:43 -07:00
Angular Robot 6ca056532a build: lock file maintenance (#56361)
See associated pull request for more information.

PR Close #56361
2024-06-10 13:54:11 -07:00
Miles Malerba ea3c802056 feat(core): Add a schematic to migrate afterRender phase flag (#55648)
Adds an `ng update` migration to move users from using the phase flag
with `afterRender` / `afterNextRender` to passing a spec object instead.

PR Close #55648
2024-06-10 13:53:39 -07:00
Miles Malerba 38effcc63e fix(core): Add back phase flag option as a deprecated API (#55648)
Adds back the ability to set the phase of an `afterRender` /
`afterNextRender` callback using the `phase` option. However, this API
is now deprecated, and the phase should instead be specified by passing
a spec object rather than a callback function.

PR Close #55648
2024-06-10 13:53:39 -07:00
Miles Malerba a655e46447 feat(core): Redesign the afterRender & afterNextRender phases API (#55648)
Previously `afterRender` and `afterNextRender` allowed the user to pass
a phase to run the callback in as part of the `AfterRenderOptions`. This
worked, but made it cumbersome to coordinate work between phases.

```ts
let size: DOMRect|null = null;

afterRender(() => {
  size = nativeEl.getBoundingClientRect();
}, {phase: AfterRenderPhase.EarlyRead});

afterRender(() => {
  otherNativeEl.style.width = size!.width + 'px';
}, {phase: AfterRenderPhase.Write});
```

This PR replaces the old phases API with a new one that allows passing a
callback per phase in a single `afterRender` / `afterNextRender` call.
The return value of each phase's callback is passed to the subsequent
callbacks that were part of that `afterRender` call.

```ts
afterRender({
  earlyRead: () => nativeEl.getBoundingClientRect(),
  write: (rect) => {
    otherNativeEl.style.width = rect.width + 'px';
  }
});
```

This API also retains the ability to pass a single callback, which will
be run in the `mixedReadWrite` phase.

```ts
afterRender(() => {
  // read some stuff ...
  // write some stuff ...
});
```

PR Close #55648
2024-06-10 13:53:39 -07:00
Angular Robot 6db94d51db docs: update Angular CLI help [main] (#56280)
Updated Angular CLI help contents.

PR Close #56280
2024-06-07 09:45:58 -07:00
Preston West 257d94211c docs: fix typo in testing/services.md (#56316)
PR Close #56316
2024-06-07 09:34:15 -07:00
Kristiyan Kostadinov 96aa5c8a2c fix(migrations): resolve error in standalone migration (#56302)
This is related to an issue that was reported internally. We were assuming that `hasNgModuleMetadataElements` will return true only for property assignments initialized to arrays, but that's not the case.

These changes update the type and our assertions to more accurately reflect the AST and to avoid the error.

PR Close #56302
2024-06-07 09:33:41 -07:00
Andrew Scott a13f5da773 feat(router): Allow UrlTree as an input to routerLink (#56265)
This commit adds `UrlTree` as a valid input to `routerLink`. It
disallows using this together with any inputs that come from
`UrlCreationOptions`, such as `queryParams` or `fragment`.

We could, in the future, decide on a different approach for these, like merging or
replacing those in `urlTree` input. We cannot, however, go the other way
(decide to prevent those inputs if we've already decided to allow it and
using a merging/replacing strategy). For this reason, an error seems the
most reasonable approach to start and we can re-evaluate if there's a
compelling reason to.

fixes #34468

PR Close #56265
2024-06-07 09:33:14 -07:00
Aristeidis Bampakos a7e4a578d8 docs: use new link for update guide (#56054)
PR Close #56054
2024-06-07 09:32:46 -07:00
arturovt 2781b20567 docs: update NG0506 (#55973)
Provide a thorough explanation of why an application may remain unstable and
why developers should consider not running asynchronous code on the server outside
of the Angular zone, as this may lead to memory leaks.

PR Close #55973
2024-06-07 09:32:18 -07:00
Matthieu Riegler 7b0777b304 docs(docs-infra): Go zoneless and enable the zoneless scheduler (#55161)
PR Close #55161
2024-06-07 09:31:15 -07:00
Alan Agius 81486c2f47 fix(localize): add @angular/localize/init as polyfill in angular.json (#56300)
This commit addresses an issue where the `@angular/localize/init` polyfill is not included when there are no polyfills specified in the `angular.json` file.

PR Close #56300
2024-06-06 13:41:11 -07:00
Jessica Janiuk 181ed2a84a release: cut the zone.js-0.14.7 release (#56306)
PR Close #56306
zone.js-0.14.7
2024-06-06 13:40:34 -07:00
Jessica Janiuk 101edda018 release: cut the v18.1.0-next.1 release 18.1.0-next.1 2024-06-05 13:18:05 -07:00
Jessica Janiuk cc97f11891 docs: release notes for the v18.0.2 release 2024-06-05 12:58:08 -07:00