Commit graph

30351 commits

Author SHA1 Message Date
Angular Robot
7ea25eb392 build: update io_bazel_rules_sass digest to b222c61 (#56483)
See associated pull request for more information.

PR Close #56483
2024-06-18 09:28:20 -07:00
Andrew Scott
395d26ad16 fix(docs-infra): reference page restores scroll position or goes top when no anchor (#56478)
This contains follow-up fixes to 2a2439712a.
This commit updates scrolling on references page to scroll to the top
when there is no anchor in the URL. The behavior after the above commit would
be that the position doesn't change from whatever the previous page was
(potentially scrolled to the bottom). In addition, this restores the
previous scroll position when traversing through browser history rather
than always scrolling to the fragment.

PR Close #56478
2024-06-18 09:26:57 -07:00
Viktor T
841476da1c docs(docs-infra): Remove redundant API link (#56480)
As there is no longer a page for the localize API the URL pointing to this page is removed

PR Close #56480
2024-06-17 12:48:12 -07:00
Andrew Kushnir
1d48e72ba7 refactor(core): handle incomplete DOCUMENT instances during cleanup in tests (#56422)
`DOCUMENT` instances retrieved from DI may not contain a necessary function to complete the cleanup. In tests that don't interact with DOM, the `DOCUMENT` might be mocked and some functions might be missing. For such tests, DOM cleanup is not required and we can skip DOM cleanup logic if there are missing functions. For tests that use DOM, TestBed would behave the same as before and rely on more complete `DOCUMENT` instances.

PR Close #56422
2024-06-17 09:05:53 -07:00
Andrew Kushnir
38010d2b3a refactor(core): avoid exposing OutletInjector in injector resolution path (#56394)
Router's `OutletInjector` required a special handling in cases when `@defer` is used, see https://github.com/angular/angular/pull/55374 for additional info. As a result, the `ChainedInjector` that represents an `OutletInjector` instance is currently exposed via `getInjectorResolutionPath` function. This creates a problem, because other debug APIs used by DevTools can not interact with `ChainedInjector`s. This commit updates the logic around `getInjectorResolutionPath` utility to avoid exposing `OutletInjector`in the resolution path.

Resolves #56331.

PR Close #56394
2024-06-17 09:05:12 -07:00
Andrew Scott
c28aaa8663 docs(router): Remove deprecation on Router guard interfaces (#56408)
Many developers find these interfaces useful for various reasons. Beyond
that, the deprecation of the interfaces has incorrectly implied that
existing class-based guard implementations need to be migrated to
functions. Class injectables are _not_ deprecated and choosing to
implement a guard's state and logic as a class that is injectable in the
functions run inside the injection context is valid.

resolves #50234

PR Close #56408
2024-06-17 09:03:02 -07:00
Paul Gschwendtner
5c2f308858 refactor(core): ModelSignal should extend InputSignal (#56452)
This allows for helpers like the following to work intuitively for all
types of "input fields". It also establishes the intended mental
philosophy that a model is both an input and an output.

```ts
/** Unwraps all signal input properties. */
export type UnwrapSignalInputs<T> = {
  [K in keyof T]: T[K] extends InputSignalWithTransform<any, infer WriteT>
    ? WriteT
    : T[K];
};
```

PR Close #56452
2024-06-17 08:59:59 -07:00
Daniel Kimmich
01b82a358b docs: update security guide link to adev (#56469)
PR Close #56469
2024-06-17 08:54:09 -07:00
Arek
db335a6c9a docs: fix outdated links from docs to contributing-docs folder in markdown documents (#56462)
PR Close #56462
2024-06-17 08:53:18 -07:00
Sasidharan SD
cf5bf12271 docs: fix location strategy link (#56475)
PR Close #56475
2024-06-17 08:48:24 -07:00
Andrew Scott
f8b45806ac fix(docs-infra): Various scroll fixes for a.dev (#56464)
* Create custom scroller to manage scroll behavior more directly. There
  are two many special and weird behaviors in the site to use the
  built-in scrolling.
* Update scrolling to wait for application stability. This waits a bit
  longer than the current `Scroll` event, which happens in
  `afterNextRender` after the `NavigationEnd`. fixes #56446
* Disable scrolling on the API references page. It just never worked
  well with all the custom scroll locations
* Update card clicks on API references page to change the fragment of
  the URL (this allows docs viewers to link directly to an item). Also update
  API reference page to listen to fragment changes and use that as the
  scroll trigger rather than the click. This takes care of the initial
  scroll when the page loads as well.

fixes #56446

PR Close #56464
2024-06-17 08:46:50 -07:00
Angular Robot
456c4cf6f6 build: update actions/checkout digest to 692973e (#56438)
See associated pull request for more information.

PR Close #56438
2024-06-17 08:46:07 -07:00
Joey Perrott
4c0882ab9a ci: begin checking licenses of upstream dependencies to ensure they are approved (#56460)
Begin checking upstream dependency licenses.

PR Close #56460
2024-06-14 13:49:24 -07:00
Charles Lyding
fb1d0a2881 ci: use bazel downloaded saucelabs connect binary (#56456)
The saucelabs connect tunnel utility is now downloaded via bazel as needed.
For the directly invoked case the utility is downloaded via the local shell script.
Previously it was part of the root `package.json` and downloaded whenever
a package install was executed. The utility archive was also not an actual
package which incidentally worked with npm but does not work with newer versions
of yarn.

PR Close #56456
2024-06-14 13:48:39 -07:00
Aristeidis Bampakos
34e7d14d16 docs: fix broken link in ng-container API reference (#56445)
Closes #56444
PR Close #56445
2024-06-14 10:05:43 -07:00
Matthieu Riegler
0dbca3726c docs(core): remove the doc link for NG0952 (#56441)
We don't have any docs yet for that error, so I'm removing the minus sign which indicate that there is a dedicated error doc.

Fixes #56424

PR Close #56441
2024-06-14 10:05:01 -07:00
Andrew Kushnir
a620231c03 Revert "refactor(core): Use ActionResolver in Dispatcher. (#56369)" (#56440)
This reverts commit 4ebd2853fa.

PR Close #56440
2024-06-13 12:17:35 -07:00
JoostK
ec0d1bf6f3 fix(compiler-cli): insert constant statements after the first group of imports (#56431)
The linker inserts the constant statements that are needed to support compiled templates
after the import statements of an ESM file, but it failed to account for import statements
that are not at the top of the file. This is typically seen in FESM files where multiple
individual ESMs have been concatenated into a single ESM file, with imports in various places.
The linker would then find the very last import statement to insert the constant statements
after, but this may result in TDZ errors for component templates that have been emitted
earlier in the file.

This commit updates the Babel linker plugin to insert constant statements after the last
import of the first import group, therefore avoiding the TDZ error.

Fixes #56403

PR Close #56431
2024-06-13 10:15:02 -07:00
Paul Gschwendtner
571d06b6c3 refactor(compiler-cli): allow generating same import specifier in different files (#56406)
The import manager ensures generation of unique identifiers when
inserting imports. This is done by inspecting existing identifiers
within the original source file, while also checking if a similar
identifier was generated at an earlier time. This is correct behavior.

We can improve the detection so that the same identifier can be
generated in different files. This is beneficial for schematic/migration
use-cases where we wouldn't want to generate import aliases in multiple
files just because we generated an import to e.g. `input` previously.

E.g. it's fine to generate

```ts
// a.ts
import {input} from '@angular/core';

// b.ts
import {input} from `@angular/core';

// instead of `input as input_1`.

```

PR Close #56406
2024-06-13 10:14:11 -07:00
Paul Gschwendtner
ef660d1db2 refactor(compiler): expose shorthand object metadata in expression AST (#56405)
Whenever we parse object property assignment shorthands in expression
ASTs, the AST will have no information about whether the property read
for the `LiteralMap` is built based on the shorthand or not.

Exposing this information in the AST is useful for migrations as those
might need to decompose the shorthand into its longer form to e.g.
invoke a signal read.

PR Close #56405
2024-06-13 10:12:54 -07:00
Viktor T
34dc7007be docs: language-service - Fix quick info URLs (#56416)
- Made the links more specific
- Removed the AIO notation

PR Close #56416
2024-06-13 09:23:46 -07:00
Jens Kuehlers
072f6c79c6 docs: add v18.x and v19. release dates (#56429)
Add planned approximate v18 minor and v19 major
release dates.

PR Close #56429
2024-06-13 09:22:16 -07:00
Pawel Kozlowski
7c76eb55f2 refactor: add select scenario to the js-web-frameworks benchmark (#56362)
Add the row selection scenario to the existing benchmark so we can
automate perf measurements during experiments.

PR Close #56362
2024-06-13 08:59:19 -07:00
Pawel Kozlowski
d4761806e2 refactor: run js-web-frameworks with noop zone (#56362)
Align setup of this benchmark with
https://github.com/krausest/js-framework-benchmark/tree/master/frameworks/keyed/angular-cf-nozone
by running without zone.js using noop zone.

PR Close #56362
2024-06-13 08:59:19 -07:00
Jessica Janiuk
f5b6433d3a ci: bump github action commit message labels hash (#56435)
This updates to the latest git hash for the github action for commit messages.

PR Close #56435
2024-06-13 08:55:29 -07:00
Tom Wilkinson
247dce0023 refactor(core): Use ActionResolver in Dispatcher. (#56369)
`EventContract` usages in Angular now use `false` for
`useActionResolver`. Tests have been updated, with functionality that
depends on `ActionResolver` moving to dispatcher_test.ts.

PR Close #56369
2024-06-13 08:50:46 -07:00
Alex Rickabaugh
be09f0b3cb release: cut the v18.0.3 release 2024-06-12 16:17:49 -07:00
Sasidharan SD
0a8d30ed65 docs: fix configure routes link (#56415)
PR Close #56415
2024-06-12 13:36:27 -07:00
Angular Robot
7fabf5991b 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:34 -07:00
Angular Robot
995b7fccc2 build: update babel dependencies to v7.24.7 (#56373)
See associated pull request for more information.

PR Close #56373
2024-06-12 13:11:13 -07:00
Andrew Kushnir
8b8fd167a2 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
de2ed152a0 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
Alex Rickabaugh
e49a81bc5f 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
882cae1cd3 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
bf6f778e02 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
409ce86fff 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:21 -07:00
Andrew Kushnir
4204bee346 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:20 -07:00
Andrew Scott
dbd0fa00f8 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
5ec24c9b00 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
80618b0469 build: update cross-repo angular dependencies (#56365)
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 #56365
2024-06-11 12:37:14 -07:00
Andrew Scott
625ca3e2b3 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:03 -07:00
Joey Perrott
65bf5ecdad 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:27 +00:00
Matthieu Riegler
5717ff6a83 docs(docs-infra): guard access to navigator for prerendering (#56333)
PR Close #56333
2024-06-11 17:08:35 +00:00
Joey Perrott
ca78553a12 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:15 +00:00
Matthieu Riegler
96135e8af9 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
3267c28d5e docs: use language-agnostic links for external docs (#56377)
PR Close #56377
2024-06-11 08:26:30 -07:00
Pawel Kozlowski
ebf00aa065 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:11 -07:00
Angular Robot
cc0db4f5f4 docs: update Angular CLI help [18.0.x] (#56326)
Updated Angular CLI help contents.

PR Close #56326
2024-06-11 08:22:37 -07:00
Angular Robot
a61863058b build: update all non-major dependencies (#56118)
See associated pull request for more information.

PR Close #56118
2024-06-11 08:21:49 -07:00
Jeremy Elbourn
9f515c15f7 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:21:00 -07:00