Commit graph

30773 commits

Author SHA1 Message Date
Paul Gschwendtner
4e803ae293 refactor(migrations): add support for simpler variant of tsurge migration (#57484)
Introduces a simpler, smaller variant of the current `Tsurge` migration
class. The difference is simply that for the migration phase (the third
stage), some migrations do not need a full set of workers re-analyzing
every compilation unit again to compute the "final migration
replacements".

This can be the case, for example, if a migration eagerly computes all
replacements in the analyze stage, visiting every unit, and then after
deriving the global metadata, problematic replacements are simply
filtered (e.g. via some unique IDs again).

PR Close #57484
2024-08-23 12:01:59 +00:00
Paul Gschwendtner
f1f5fa11d9 refactor(migrations): clean up unused google3 code from signal input migration (#57484)
The code was replaced by the automatic Tsurge batch runner. This commit
cleans up the now unused code.

PR Close #57484
2024-08-23 12:01:59 +00:00
Otmane
ed920c39c5 docs: fix indentation of file tree in app-shell (#57436)
This commit adds indentations to the file tree section in `app-shell.md`, it makes the tree easier to read. The indentation is now two spaces instead of no spaces.

PR Close #57436
2024-08-22 09:11:49 -07:00
Paweł Kubiak
38fec144dc docs(docs-infra): add top level banner component (#57458)
docs(docs-infra): add top level banner component

- create top level banner component
- write unit tests
- close banner and keep state in the local storage
- fix: support screens of tablets and phones

PR Close #57458
2024-08-22 09:06:46 -07:00
Matthieu Riegler
9867ac1ee9 docs: new date for v19 (#57461)
PR Close #57461
2024-08-22 09:04:41 -07:00
Andrew Kushnir
e75e61a637 refactor(compiler): create an internal util method to detect matching directives and pipes (#57466)
This commit adds an internal util method that allows to detect:

* which selectors are matching nodes in a template
* which pipes are present in a template

Both directives and pipes are split into 2 buckets: eagerly used and the ones that might potentially be defer-loaded.

PR Close #57466
2024-08-22 09:04:04 -07:00
Dylan Hunn
aff6729398 docs: release notes for the v18.2.1 release 2024-08-22 09:03:04 -07:00
Dylan Hunn
66da115ed8 release: cut the v19.0.0-next.1 release 2024-08-22 08:50:58 -07:00
Andrew Kushnir
5cc63c2135 build: update zone.js peer dependency for core package to 0.15.0 (#57431)
This commit updates zone.js peer dependency versioon for core package to 0.15.0.

PR Close #57431
2024-08-21 13:17:52 -07:00
Andrew Kushnir
d1d4adcba2 release: cut the zone.js-0.15.0 release (#57418)
PR Close #57418
2024-08-21 11:30:53 -07:00
Matthieu Riegler
cb3128d925 docs(docs-infra): fix regressions around members & deprecations (#57465)
This commit fixes regressions introduced by #57255

PR Close #57465
2024-08-21 11:26:26 -07:00
steciuk
45343f711b docs: remove extra space in DI example code (#57472)
PR Close #57472
2024-08-21 11:25:53 -07:00
Angular Robot
2ed52dde8d build: update github/codeql-action action to v3.26.3 (#57455)
See associated pull request for more information.

PR Close #57455
2024-08-20 13:20:01 -07:00
Angular Robot
2af89449f9 build: update dependency algoliasearch to v5 (#57397)
See associated pull request for more information.

Closes #57387 as a pr takeover

PR Close #57397
2024-08-20 13:17:59 -07:00
Adam Koch
32ddac1fd6 docs: remove incorrect documentation around the use of timezone abbreviations (#57425)
The ability to use an abbreviated timezone was removed in v5 (issue https://github.com/angular/angular/issues/20225 discusses this) and no alternative has been merged. See issue https://github.com/angular/angular/issues/40865 and PR https://github.com/angular/angular/pull/48482 The text suggests there is a way to pass in a timezone other than by an offset but there isn't.

PR Close #57425
2024-08-20 10:51:37 -07:00
Kristiyan Kostadinov
b063468027 feat(core): support TypeScript 5.6 (#57424)
Updates the repo to add support for the upcoming TypeScript 5.6.

PR Close #57424
2024-08-19 22:45:45 -07:00
Charles Lyding
9e87593055 feat(compiler-cli): ensure template style elements are preprocessed as inline styles (#57429)
Previously, style elements within a template were used directly and not provided
to the optional transformation step that may be present on the resource host interface.
This causes such styles to not be processed by the Angular CLI's stylesheet pipeline
and could cause the styles to not work properly on all browsers. The style elements
are now processed in the same manner as inline styles within a component's metadata.
Link elements within a stylesheet were already being processed as `styleUrls`
equivalent and there is no behavior change in that regard.

PR Close #57429
2024-08-19 22:45:20 -07:00
Paul Gschwendtner
270fb8349f refactor(migrations): leverage tsurge for signal input migration (#57451)
This commit simplifies the batching support for the signal input
migration by using the new tsurge framework we've built.

This allows for consistent setup across all possible entry-points and
also simplifies the 1P setup given that we can simply use the Tsurge
macros, instead of having to maintain our own Go-based runner.

PR Close #57451
2024-08-19 22:44:42 -07:00
Paul Gschwendtner
d3c01efef3 refactor(migrations): improve generic assignability in tsurge and pass more info (#57451)
* Improves some of the generic assignability for tsurge. Anything is
  allowed to be returned from an overridden `prepareProgram` method.
  This is useful for the signal input migration.
* Passes the absolute root paths to migrations. This is helpful for the
  signal input migration and there is no other way to access it. It's
  better to pass specifically, compared to passing the whole unsafe
  `ParsedConfiguration` object.

PR Close #57451
2024-08-19 22:44:42 -07:00
Angular Robot
3afce0f8c2 build: update dependency ngx-progressbar to v12 (#57452)
See associated pull request for more information.

Closes #57443 as a pr takeover

PR Close #57452
2024-08-19 22:43:48 -07:00
Matthieu Riegler
f47901ae2e docs(docs-infra): Fix heading parsing (#57386)
fixes #57384

PR Close #57386
2024-08-19 09:24:07 -07:00
Matthieu Riegler
eb215ad231 docs(docs-infra): remove remaining ngZone (#57229)
PR Close #57229
2024-08-19 09:22:01 -07:00
Matthieu Riegler
b87bbf6c95 docs(docs-infra): Add tests for marked rendering (#57344)
On top of #57338, to make sure we prevent similar regressions on marked rendering.

PR Close #57344
2024-08-19 09:21:16 -07:00
Michael Derfler
a2990757cc docs: fix links to docs (#57391)
PR Close #57391
2024-08-19 09:20:15 -07:00
Andrew Kushnir
dc075a2fc6 docs: add eager to lazy route migration (#57421)
PR Close #57421
2024-08-19 09:19:42 -07:00
Andrew Kushnir
c967ccbaf3 docs: cleanup existing migration docs for consistency (#57421)
PR Close #57421
2024-08-19 09:19:42 -07:00
Andrew Kushnir
123a60d426 docs: drop references to removed typed-forms migration (#57421)
PR Close #57421
2024-08-19 09:19:42 -07:00
Andrew Kushnir
c5c540d056 docs: drop references to removed module-with-providers migration (#57421)
PR Close #57421
2024-08-19 09:19:42 -07:00
Joey Perrott
7ee9e7f386 fix(docs-infra): leverage http_server rule from @angular/build-tooling for adev local serving (#57427)
Use the http_server rule to serve adev locally to allow for slightly faster rebuilds and livereload on changes

PR Close #57427
2024-08-19 09:18:47 -07:00
Paul Gschwendtner
368f36dab3 refactor(migrations): framework to build batchable migrations (#57396)
Introduces a migration framework to build batchable migrations that
can run in Large Scale mode against e.g. all of Google, using workers.

This is the original signal input migration infrastructure extracted
into a more generic framework that we can use for writing additional
ones for output, signal queries etc, while making sure those are not
scoped to a single `ts.Program` that limits them to per-directory
execution in very large projects (e.g. G3).

The migration will be updated to use this, and in 1P we will add
helpers to easily integrate such migrations into a Go-based pipeline
runner.

PR Close #57396
2024-08-17 08:54:15 -05:00
Andrew Kushnir
baa125480e docs: update CHANGELOG to drop a breaking change from 18.2.0 version (#57419)
This commit updates the CHANGELOG to remove an entry about a breaking change in Zone.js, since the change was not actually released. It will be released separately in Zone.js package.

PR Close #57419
2024-08-16 11:21:17 -04:00
Andrew Kushnir
0bbbd78482 docs: add withEventReplay and withI18nSupport links to provideClientHydration docs (#57382)
PR Close #57382
2024-08-15 16:10:27 -04:00
vladboisa
9c739430ac docs(docs-infra): move link tag for correct view (#57395)
Move the link tag to the down, for correctly parsing of '@link'

Fixes #57332

PR Close #57395
2024-08-15 15:51:52 -04:00
cexbrayat
ac93839d69 fix(migrations): avoid migrating route component in tests (#57317)
The migration was migrating all files in a project (like most migrations).
As there is no gain in migrating components used in test files. Excluding the test files reduces the migration noise.

PR Close #57317
2024-08-15 15:51:22 -04:00
David LJ
0de267d7eb docs: update version table for 18.2 (#57414)
PR Close #57414
2024-08-15 15:50:53 -04:00
Andrew Scott
f03d274e87 fix(core): ComponentFixture autoDetect feature works like production (#55228)
This commit fully integrates the `autoDetect` feature into
`ApplicationRef.tick` without special handling for errors.

This commit also shares the method of autoDetect for change detection between
the zoneless and zone component fixture implementations. The difference
is now limited to:

* autoDetect is defaulted to true with zoneless
* detectChanges with zoneless is AppRef.tick while it is
  ChangeDetectorRef.detectChanges with zones. This should likely
  converge more in the future. Not going through AppRef.tick means that
  the zone fixture does not get guaranteed `afterRender` executions and
  does not get the rerunning behavior if the fixture is marked dirty by
  a render hook.

BREAKING CHANGE: The `autoDetect` feature of `ComponentFixture` will now
attach the fixture to the `ApplicationRef`. As a result, errors during
automatic change detection of the fixture be reported to the `ErrorHandler`.
This change may cause custom error handlers to observe new failures that were previously unreported.

PR Close #55228
2024-08-15 15:45:45 -04:00
Andrew Scott
3b0dca75d6 fix(core): Allow zoneless scheduler to run inside fakeAsync (#56932)
The zoneless scheduler callback was executed in the root zone rather
than simply in `runOutsideAngular` to allow us to land the hybrid mode
change detection (scheduler always enabled, even for zones) without
breaking a ton of existing `fakeAsync` tests that could/would fail with
the "timer(s) still in queue" error. However, this caused another
problem: when a test executes inside `fakeAsync`, it cannot flush the
scheduled time. A similar problem exists with event and run coalescing (#56767).
This change would allow `fakeAsync` to flush the zoneless-scheduled
change detections and minimize breaking existing tests
by flushing pending timers at the end of the test, which actually now
matches what's done internally.

PR Close #56932
2024-08-15 12:32:24 -04:00
Kristiyan Kostadinov
58a79b6e43 fix(migrations): preserve type when using inject decorator (#57389)
Updates the migration so that it passes the type as a generic in the case of `@Inject(SOME_TOKEN) foo: SomeType`. This is done for two reasons:
1. It's a fairly common pattern and it ensures that the code can still be compiled.
2. It avoids leaving behind unused imports.

PR Close #57389
2024-08-15 12:11:59 -04:00
Kristiyan Kostadinov
4ae66f25d0 fix(migrations): account for members with doc strings and no modifiers (#57389)
Fixes that the migration was duplicating the doc strings of members that don't have modifiers.

PR Close #57389
2024-08-15 12:11:58 -04:00
Angular Robot
7716da8ce9 build: update dependency saucelabs to v8 (#57407)
See associated pull request for more information.

PR Close #57407
2024-08-15 12:11:28 -04:00
Andrew Kushnir
d4449fce21 fix(core): handle hydration of components that project content conditionally (#57383)
This commit fixes an issue when hydration serialization tries to calculate DOM path to a content projection node (`<ng-content>`), but such nodes do not have DOM representation.

Resolves #56750.

PR Close #57383
2024-08-15 11:22:04 -04:00
Erik Wegner
751880a16a docs(common): fix example code (#57406)
Fix example code for interceptor.

PR Close #57406
2024-08-15 10:46:03 -04:00
Jeremy Elbourn
736c67bc15 docs: add small clarification to ng-content (#57408)
This expands the recommendation to avoid conditionally showing `<ng-content>` with additional context

PR Close #57408
2024-08-15 10:45:16 -04:00
Andrew Kushnir
5537bf802f release: cut the v19.0.0-next.0 release 2024-08-14 09:49:00 -07:00
Andrew Kushnir
c1f1c028a9 docs: release notes for the v18.2.0 release 2024-08-14 09:43:10 -07:00
Andrew Kushnir
c5b598ea32 docs: release notes for the v18.1.5 release 2024-08-14 09:32:07 -07:00
Matthieu Riegler
9857570165 docs(docs-infra): fix markdown link rendering (#57377)
fixes #57376

PR Close #57377
2024-08-13 15:53:55 -07:00
Thomas Nguyen
6882cc7d9e refactor(core): Add experimental support to have one event contract when there are multiple apps on the page. (#57355)
This may be removed if this turns out not to work out so well...

PR Close #57355
2024-08-13 12:10:34 -07:00
Thomas Nguyen
8bea2e3965 refactor(core): Call stopPropagation and preventDefault unconditionally within the patched methods. (#57354)
This fixes a few tests in g3 and is a bug fix for the event dispatcher. Otherwise, bubbling might
continue.

PR Close #57354
2024-08-13 12:09:56 -07:00
Thomas Nguyen
8e945c7cc9 fix(core): Account for addEventListener to be passed a Window or Document. (#57354)
This happened to work for other event listeners since both had a
addEventListener method.

PR Close #57354
2024-08-13 12:09:56 -07:00