16340 Commits

Author SHA1 Message Date
Alan Agius
f92787947f fix(@angular/build): suppress asset missing warning for /index.html requests
Prevent incorrect warning display when the Service Worker requests `/index.html`.
2025-02-14 14:35:12 +01:00
Alan Agius
87b310a13f test: reduce flakiness of reuse-dep-optimization-cache e2e test
This commit reduces test flakiness by modifying the logic to perform the fetch only after the app is bundled.
2025-02-14 13:22:25 +01:00
Alan Agius
04f331a534 build: update all non-major dependencies
Update packages
2025-02-14 13:11:21 +01:00
Kristiyan Kostadinov
0a77fe09eb build: update to TypeScript 5.8
Updates the repo to TypeScript 5.8 and expands the peer dependency ranges.
2025-02-14 11:39:20 +01:00
Alan Agius
09f5006b5c fix(@angular/cli): prefer installed package as fallback when listing package groups
Previously, the package group name defaulted to the first item in the list. This update prioritizes an installed package as the fallback instead.

Closes #29627
2025-02-13 21:40:05 +01:00
Alan Agius
f5689e9525 refactor(@angular/cli): handle undefined ng add collection name
Fixes an issue where JSON help extraction fails if the `ng add` collection name is undefined.
2025-02-13 16:09:43 +01:00
Angular Robot
57a08c92f2 build: update angular 2025-02-13 14:04:37 +01:00
Alan Agius
1274be0b39 ci: handle error when running bazel sync --only=repo
When the pnpm lock file is updated this command exits with a non zero error code.
2025-02-13 12:14:24 +01:00
Alan Agius
3d823b3866 ci: replace bazel run @npm2//:sync with bazel sync --only=repo
In certain scenarios, running `bazel run @npm2//:sync` does not reliably update the aspect lock files. For example:

```
# Update the version in package.json
$ yarn bazel run @npm2//:sync  # Lock file is updated
$ git restore .aspect
$ yarn bazel run @npm2//:sync  # Lock file is NOT updated
```

Switching to `bazel sync --only=repo` guarantees that the lock file is consistently updated.

More context: https://angular-team.slack.com/archives/C042EU9T5/p1739398554132249
2025-02-13 11:55:14 +01:00
cexbrayat
2bae1a9c0c fix(@angular-devkit/build-angular): support aot option for karma browser builder 2025-02-13 10:05:15 +01:00
Kristiyan Kostadinov
adf4ea5d4c fix(@schematics/angular): remove animations module from ng new app
Previously the animations module was added to the `ng new` app, because `platform-server` was using it. That's no longer the case as of https://github.com/angular/angular/pull/59762 so these changes remove the dependency.
2025-02-13 10:05:06 +01:00
Alan Agius
8c7c7ac691 fix(@angular/cli): correctly parse and resolve relative schematic collection names on Windows
Previously, the logic incorrectly extracted the drive letter as the collection name when the schematic collection was specified as relative on Windows. This fix ensures that relative paths are parsed and resolved correctly, preventing the drive letter from being mistakenly treated as the collection name.

Closes #29559
2025-02-13 08:47:45 +01:00
Angular Robot
751a598056 build: update angular 2025-02-13 07:43:08 +01:00
Doug Parker
2d84dd515f release: cut the v19.2.0-next.2 release 19.2.0-next.2 2025-02-12 15:17:46 -08:00
Doug Parker
a1a309da15 docs: release notes for the v19.1.7 release 2025-02-12 12:29:30 -08:00
Doug Parker
db02acbccf docs: release notes for the v17.3.12 release 2025-02-12 11:51:26 -08:00
Alan Agius
b9c98be87b Revert "ci: temporary disable updating esbuild"
This reverts commit 25007e125db7baca13d69fa1c560e1a8c0f7bf14.
2025-02-12 20:31:56 +01:00
Alan Agius
a2747391aa build: update to esbuild 0.25.0
This commit updates esbuild to 0.25.0
2025-02-12 20:31:56 +01:00
Charles Lyding
8a416e761c test: remove animations check from material build E2E test
The latest version of Angular material no longer adds `@angular/animations`
to application code when using `ng add`.
2025-02-12 20:14:57 +01:00
Angular Robot
1355d086fe build: update all non-major dependencies 2025-02-12 08:49:47 -08:00
Charles Lyding
964fb778b7 fix(@angular/build): support per component updates of multi-component files
The HMR component update candidate analysis has been improved to now perform
more fine-grained checks for cases where more than one component is present
in a single TypeScript file. Previously it was possible for all components
present in a TypeScript file to be considered update candidates when only
one of the components had relevant changes to its template and/or styles.
2025-02-12 11:34:45 -05:00
Alan Agius
25007e125d ci: temporary disable updating esbuild
Versions 0.25.0 breaks sourcemaps, this requires further investigation and if it's possible to mitigate from our end.
2025-02-12 14:14:21 +01:00
Alan Agius
be15b886c7 fix(@angular/build): configure Vite CORS option
Vite's `allowedHosts` option does not enable CORS; instead, it allows the dev server to respond to requests with a matching hostname (e.g., http://example.com/main.js). It only verifies that the request’s hostname is on the allowed list. However, this does not consider the `origin` in the case of a CORS request.

This commit updates Vite's configuration to enable CORS.

Closes #29549
2025-02-12 10:43:18 +01:00
Alan Agius
b50b6ee920 perf(@angular/build): cache translated i18n bundles for faster builds
When disk caching is enabled, translated i18n bundles are stored on disk, improving performance and speeding up both incremental and non-incremental builds.
2025-02-11 20:15:54 +01:00
Younes Jaaidi
523d539c66 feat(@angular-devkit/build-angular): add aot option to karma 2025-02-11 08:47:37 -08:00
Alan Agius
8faaf51d61 refactor(@angular/build): remove outdated allowedHosts warning
The warning is no longer accurate, as `allowedHosts` is now used in Vite.
2025-02-11 17:08:32 +01:00
Alan Agius
833dc986db fix(@angular/ssr): properly handle baseHref with protocol
Enhances handling of `baseHref` when it includes a full URL with a protocol.

Closes #29590
2025-02-10 15:33:31 -08:00
Angular Robot
e99f2c2efd build: lock file maintenance 2025-02-10 15:26:20 -08:00
Angular Robot
4db39ac03b build: update github/codeql-action action to v3.28.9 2025-02-10 15:26:07 -08:00
Charles Lyding
beefed839f fix(@angular/build): always provide Vite client helpers with development server
In addition to the WebSocket code, the Vite client module contains helper
functions which may be injected into modules at request time. These helpers
are required for certain behavior to function. Previously, when `--no-live-reload`
was used, these helpers may not have been available which led to runtime
errors. These runtime errors will no longer occur. However, the browser console
will now log that the Vite client cannot connect to the development server
WebSocket. This is expected in this case since live reload functionality
was disabled and the server side is intentionally not available.
2025-02-10 15:25:19 -08:00
Alan Agius
b553069896 fix(@angular/build): handle unlocalizable files correctly in localized prerender
Ensure proper handling of unlocalizable files during localized prerendering to prevent errors.

Closes #29587
2025-02-10 17:31:58 +01:00
Alan Agius
aa0ae457b0 fix(@schematics/angular): include default export for Express app
This update is required for Firebase functions compatibility.

Closes #29488
2025-02-10 17:31:37 +01:00
Alan Agius
880a50c50c fix(@angular/build): exclude unmodified files from logs with --localize
Ensures that only modified files are displayed in logs when using the `--localize` flag, preventing unnecessary noise.

Closes #29586
2025-02-10 16:31:06 +01:00
Alan Agius
dca408b926 build: update all non-major dependencies 2025-02-10 16:29:51 +01:00
Angular Robot
0dca33c961 build: update schematics dependencies to ~5.6.0 2025-02-10 16:26:22 +01:00
Angular Robot
021985fcb1 build: update angular 2025-02-07 11:04:05 -08:00
Angular Robot
cf2d54b222 build: update all non-major dependencies 2025-02-06 15:19:51 -08:00
Alan Agius
17a7b8cf01 refactor(@angular/build): also add server.preTransformRequests
5c1360179c moved `preTransformRequests` from the `server` to `dev` section. But vite, still uses the `server` section in such cases bcdb51a1ac/packages/vite/src/node/server/index.ts (L673) and
bcdb51a1ac/packages/vite/src/node/server/middlewares/indexHtml.ts (L475)
2025-02-06 12:25:54 -08:00
Alan Agius
414736bc0f fix(@angular/ssr): accurately calculate content length for static pages with \r\n
JS engines convert `\r\n` to `\n` in template literals, potentially leading to incorrect byte length calculations. This fix ensures the correct content length is determined.

Closes #29567
2025-02-06 11:51:26 -08:00
Alan Agius
53de5c167a docs: release notes for the v19.1.6 release 2025-02-05 13:49:47 -08:00
Charles Lyding
b24089ef86 fix(@angular/build): ensure full rebuild after initial error build in watch mode
If an initial build of an application results in an error during watch mode
(including `ng serve`), the following non-error rebuild will now always be
a full build result. This ensures that all new files are available for later
incremental build result updates.
2025-02-05 13:16:48 -08:00
Charles Lyding
5c1360179c fix(@angular/build): avoid pre-transform errors with Vite pre-bundling
Vite 6.0 change the option location of the `preTransformRequests`
to the `dev` section of the Vite configuration. While the previous `server`
section option of the same name is still present, it currently does not
change behavior when configured.
2025-02-05 13:16:32 -08:00
Angular Robot
dc11340113 build: update all non-major dependencies 2025-02-05 06:52:05 -08:00
Angular Robot
bde185c8cb build: update github/codeql-action digest to dd74661 2025-02-05 06:45:51 -08:00
Younes Jaaidi
ef7ea536fe feat(@angular-devkit/build-angular): add aot option to jest 2025-02-04 07:46:16 -08:00
Angular Robot
5123ff4a58 build: update all non-major dependencies 2025-02-04 07:19:17 -08:00
Charles Lyding
9525eee739 refactor(@angular/build): allow component update invalidation from client
If HMR is enabled, a component update has the potential to be unsupported
at runtime or may cause an exception. While build time analysis attempts
to verify that an update is possible, there could be cases that are as of
yet unknown. For those cases, the runtime can now signal this information
back to the development server which will clear the errant component update
and trigger a full page reload. This action will be logged to the development
server console along with an optional message from the client.
2025-02-04 07:11:15 -05:00
Alan Agius
25dbe7cfc1 refactor(@angular/ssr): simplify preload append logic in metadata
Replace `filter` and `map` with a `for...of` loop to improve readability in the preload append logic within metadata.
2025-02-03 15:20:18 -08:00
Alan Agius
c716ce1523 fix(@schematics/angular): skip ssr migration when @angular/ssr is not a dependency
This commit updates the `update-ssr-imports` migration to not run when the @angular/ssr` package is not listed as a dependency.

Closes #29560
2025-02-03 15:13:24 -08:00
Jan Martin
c48a2da287 build: Preserve newlines when gathering stdout
If the chunk happens to end in a new line or other meaningful
whitespace, stripping it can lead to two words (e.g. targets)
being squished together and broken.
2025-02-03 14:35:34 -08:00