Commit graph

32797 commits

Author SHA1 Message Date
Matthieu Riegler
b9eaedee02 docs(docs-infra): use v19 index for algolia search 2025-11-06 07:53:01 -08:00
Matthieu Riegler
05ab1dd76e docs(docs-infra): pull version picker info from shared versions.json
fixes #64842
2025-11-04 19:00:52 +00:00
Alan Agius
b2c79793c8 build: update lock files (#63719)
Update pnpm and aspect lock files to make builds green.

PR Close #63719
2025-09-11 15:35:19 +00:00
Alan Agius
fbe9b9f9c1 release: cut the v19.2.15 release (#63698)
PR Close #63698
2025-09-10 11:08:17 -07:00
Alan Agius
70d0639bc1
fix(core): introduce BootstrapContext for improved server bootstrapping (#63639)
* fix(core): introduce `BootstrapContext` for improved server bootstrapping

This commit introduces a number of changes to the server bootstrapping process to make it more robust and less error-prone, especially for concurrent requests.

Previously, the server rendering process relied on a module-level global platform injector. This could lead to issues in server-side rendering environments where multiple requests are processed concurrently, as they could inadvertently share or overwrite the global injector state.

The new approach introduces a `BootstrapContext` that is passed to the `bootstrapApplication` function. This context provides a platform reference that is scoped to the individual request, ensuring that each server-side render has an isolated platform injector. This prevents state leakage between concurrent requests and makes the overall process more reliable.

BREAKING CHANGE:
The server-side bootstrapping process has been changed to eliminate the reliance on a global platform injector.

Before:
```ts
const bootstrap = () => bootstrapApplication(AppComponent, config);
```

After:
```ts
const bootstrap = (context: BootstrapContext) =>
  bootstrapApplication(AppComponent, config, context);
```

A schematic is provided to automatically update `main.server.ts` files to pass the `BootstrapContext` to the `bootstrapApplication` call.

In addition, `getPlatform()` and `destroyPlatform()` will now return `null` and be a no-op respectively when running in a server environment.
2025-09-09 10:56:38 -07:00
Joey Perrott
6f6db999cd ci: update to latest version of dev-infra actions (#61991)
Update to the latest sha of the dev-infra actions

PR Close #61991
2025-06-10 15:50:46 -07:00
Matthieu Riegler
9317b1c2b8 docs: fix deprecated docs navigation background color. (#61776)
Backport of #58848 into v19 / main.

PR Close #61776
2025-06-02 16:43:28 -04:00
Matthieu Riegler
1e840613af build: remove ng_update_migration integration test. (#61822)
The CLI already covers this in their E2E tests.

PR Close #61822
2025-06-02 14:00:03 -04:00
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