15963 Commits

Author SHA1 Message Date
Angular Robot
6fc31fd348 build: update angular 2025-01-08 11:34:47 -08:00
Jan Krems
2c14d4616b docs: release notes for the v19.0.7 release 2025-01-08 10:34:46 -08:00
Charles Lyding
88431b7564 fix(@schematics/angular): application migration should migrate ng-packagr builder package
The `use-application-builder` update migration will now attempt to migrate
the `ng-packagr` builder to use the `@angular/build` package if no other
`@angular-devkit/build-angular` usage is present.
2025-01-08 12:21:48 -05:00
Charles Lyding
02825eec53 feat(@schematics/angular): use @angular/build package in library generation schematic
The newly introduced `ng-packagr` builder within the `@angular/build` package
is now used when generating a new library with `ng generate library`. This
builder provides the same functionality as the `ng-packagr` builder found
within the `@angular-devkit/build-angular` package but removes the need for
projects to install `@angular-devkit/build-angular` if using the `application`
builder from `@angular/build`.
2025-01-08 12:21:48 -05:00
Charles Lyding
2c9d7368fc feat(@angular/build): add ng-packagr builder to the package
To support migration to the `@angular/build` package which contains the
`application` builder that is used by all new projects, the `ng-packagr`
builder used to build Angular libraries is also now available within this
package. This removes the need for projects that are using the application
builder but also would like to build a library from having to install the
Webpack related `@angular-devkit/build-angular` package.  This can result
in a significant reduction in overall Node.js packages installed within the
project.
2025-01-08 12:21:48 -05:00
Alan Agius
bfe9ee36cc fix(@angular/build): warn when @angular/localize/init is imported directly
Importing `@angular/localize/init` directly can cause unpredictable behavior, as highlighted in multiple reports:
- https://github.com/angular/angular/issues/59422
- https://github.com/angular/angular/issues/48545
- https://github.com/angular/angular/issues/59405

This update introduces a warning to alert developers of the potential risks associated with direct imports.
2025-01-08 17:28:01 +01:00
Joey Perrott
22bd88c40f ci: prevent NpmPackageExtract from being placed remote cache
Placing all of the node_modules files into remote cache is too much
2025-01-08 07:58:55 -08:00
Paul Gschwendtner
8c94d22469 build: migrate @angular/ssr to ts_project
Migrates `@angular/ssr` to `ts_project`. Possible after
various upstream fixes for `ng_package` and interop changes.
2025-01-08 07:42:19 -08:00
Santosh Yadav
e76800ce54 fix(@angular/build): fix incorrect budget calculation
This PR makes change to kB value which was incorrect earlier

Fixes angular#29040
2025-01-08 07:41:11 -08:00
Alan Agius
6edb908837 fix(@angular/ssr): throw error when using route matchers
Route matchers are not currently supported in Angular SSR. This commit ensures an error is issued when a route matcher is detected.
2025-01-08 15:53:35 +01:00
Alan Agius
8639a3b6d9 fix(@angular/build): pass define option defined in application builder to Vite prebundling
This update ensures that the `define` option is correctly passed to Vite during the prebundling phase of the application builder, improving compatibility and optimization of the build process.

Closes #29278
2025-01-08 15:48:17 +01:00
Alan Agius
48cae815cf fix(@angular/build): skip vite SSR warmup file configuration when SSR is disabled
This change addresses recent updates in Vite that trigger pre-transform errors when SSR files (`/server.mjs`, `/main.server.mjs`) are missing. Skipping the configuration prevents unnecessary errors during the build process.
2025-01-08 15:47:52 +01:00
Alan Agius
ebc3cc8003 refactor(@angular/build): remove redundant ESLint disabling comments
Remove comments
2025-01-08 15:14:35 +01:00
Charles Lyding
aab42488e9 refactor(@angular/build): support multiple results per application build action
The `application` builder may now return more than one build result per
rebuild action. This will typically occur when using the development server
with HMR enabled. In this scenario, component template update results may
be sent to the development server in addition to incremental updates for
global styles. TailwindCSS, for instance, may update the global stylesheet
for an application based on the usage of styles within a given template.
2025-01-08 09:12:36 -05:00
Paul Gschwendtner
04b818436e build: do not include tsconfig files in npm archives
`rules_js` includes `tsconfig.json` files in the `DeclarationInfo`
provider. This ends up causing these files to be part of the npm
archives.
2025-01-08 14:12:01 +01:00
Alan Agius
e66b24bfa9 build: resolve issue with uncompiled @angular/build/private being included
Reference: 3735297d21
2025-01-08 13:47:05 +01:00
Paul Gschwendtner
ceec32f9cb ci: enable rules_js interop mode for ng-dev release tool
This ensures that the Bazel lock files are automatically updated.

See: 289aa644e6
2025-01-08 13:39:46 +01:00
Alan Agius
7519593275 docs: update license year to include current year
Include 2025.
2025-01-08 13:16:40 +01:00
Joey Perrott
4000959af8 ci: add flag for preventing NpmPackageExtract from executing on RBE
Prevent NpmPackageExtract from running on RBE and overwhelming our quota
2025-01-07 11:21:20 -08:00
Joey Perrott
34e703196c Revert "ci: run less jobs per executor for RBE"
This reverts commit 1c011a25b1f6c0d80fa486fdadcaf9d5f8571409.
2025-01-07 11:21:20 -08:00
Angular Robot
0826b30125 build: update all non-major dependencies 2025-01-07 18:02:08 +01:00
Angular Robot
9795a9e50b build: update angular 2025-01-07 07:46:14 -08:00
Alan Agius
2f921219f9 fix(@angular/build): add asset tracking to application builder watch files
This commit updates the application builder to include assets in the watch process, triggering file re-copying when changes are detected.

Closes #28415
2025-01-07 15:39:53 +01:00
Alan Agius
ef3dc2ed02 fix(@angular/build): enable serving files with bundle-like names
Ensure files with names resembling bundles, such as `main.js`, can be served correctly. This resolves issues where specific filenames were mistakenly treated as generated bundles, preventing them from being accessed directly.

Closes #29232
2025-01-07 15:39:42 +01:00
Alan Agius
f3c6dfed91 refactor(@angular/build): remove no longer correct type
`buildApplication` no longer yields the `outputFiles` and `assetFiles`.
2025-01-07 15:19:15 +01:00
Alan Agius
b78ccb073a test: remove browser builder AOT tests
These cases are covered in other spec files.
2025-01-07 13:52:07 +01:00
Alan Agius
4d88743b02 test: lower debounceTime in browser builder tests
The current `debounceTime` values are unnecessarily high, resulting in slow test execution. Reducing these times will improve efficiency.
2025-01-07 13:52:07 +01:00
Charles Lyding
3b5afbb52c test(@angular/build): separate application and dev-server integration test targets
The integration tests for the application and dev-server targets within
`@angular/build` have been separated into two bazel targets. This allows
more fine-grained control of test options for each builder as well as reducing
the overall size of each target.
2025-01-07 07:17:56 -05:00
Joey Perrott
1c011a25b1 ci: run less jobs per executor for RBE
Use less jobs per bazel run to reduce the rate at which we perform API calls for RBE
2025-01-06 15:49:16 -08:00
Angular Robot
783cc7f972 build: lock file maintenance 2025-01-06 15:48:41 -08:00
Charles Lyding
7b15a15af8 build: migrate tests infrastructure to ts_project
The miscellaneous test infrastructure targets within `tests/` have been migrated to the `rules_js` ts_project rule.
2025-01-06 13:10:15 -05:00
Charles Lyding
8b68d9fe7c build: migrate @angular-devkit/schematics to ts_project
The `@angular-devkit/schematics` package has been migrated to the `rules_js` ts_project rule.
The tsconfig path mappings for the `@angular-devkit` scope have also been cleaned up now that
all the packages within this scope have been migrated.
2025-01-06 12:19:23 -05:00
Charles Lyding
0581c4502c refactor(@angular/build): support application incremental build result in dev-server
The dev-server will now leverage the incremental build result data from the application
builder. This removes the need to directly analyze all the newly built files within the
dev-server to determine what type of update is needed. Incremental build results also
only contain the files that are new and/or modified and removes the need to pass a potentially
large amount of file content between the application build and the dev-server.
2025-01-06 11:00:38 -05:00
Alan Agius
ddae37fdf3 refactor(@angular/build): normalize source path for windows compatibility
This update resolves an issue that prevents SSR from functioning correctly on Windows when using the latest Vite.
2025-01-06 15:33:51 +01:00
Alan Agius
aa6bf07f35 fix(@angular-devkit/architect): provide better error when builder is not defined
When a builder is not defined a more actionable error message is now displayed.

Closes #29226
2025-01-06 15:19:00 +01:00
Alan Agius
a0b4ea23c4 fix(@angular/build): handle relative URLs when constructing new URLs during server fetch
Ensures proper handling of relative URLs to prevent errors in server-side fetch operations.

Closes #29236
2025-01-06 15:18:33 +01:00
Angular Robot
9b57ff0552 build: update all non-major dependencies 2025-01-06 11:55:29 +01:00
Charles Lyding
ba16ad6b56 fix(@angular/build): support incremental build file results in watch mode
When the application build is in watch mode, incremental build results will
now be generated. This allows fine-grained updates of the files in the output
directory and supports removal of stale application code files.
Note that stale assets will not currently be removed from the output directory.
More complex asset change analysis will be evaluated for inclusion in the future
to address this asset output behavior.
2025-01-06 11:55:03 +01:00
Charles Lyding
e648be602d test: remove several outdated E2E tests
Two tests related to the protractor builder have been removed (e2e-host & http-headers).
Two tests with existing integration tests have been removed (http-headers & proxy-config).
2025-01-06 11:54:48 +01:00
Julien Saguet
a5618693a1 fix(@angular/build): do not mark Babel _defineProperty helper function as pure
Fixes #29145
2025-01-06 11:54:34 +01:00
Matthieu Riegler
ccf3650665 refactor(@angular/ssr): clean up comment.
The double JSDoc start sequence was visible in the docs (https://angular.dev/api/ssr/provideServerRoutesConfig). This commit fixes it.
2025-01-06 11:54:19 +01:00
Angular Robot
ecf8f587d7 build: update angular 2025-01-06 10:32:55 +01:00
Charles Lyding
c40d726218 build: migrate E2E tests to ts_project
The E2E tests have been migrated to the `rules_js` ts_project rule.
2025-01-02 09:35:22 -05:00
Paul Gschwendtner
9b883fe288 build: migrate @angular/build to ts_project
This commit migrates `@angular/build` to `ts_project`.
2024-12-26 08:55:05 -07:00
Charles Lyding
7348e8c2f1 build: migrate @angular/pwa to ts_project
The `@angular/pwa` package has been migrated to the `rules_js` ts_project rule.
2024-12-23 13:33:36 -05:00
Charles Lyding
8a87ff810b build: migrate @angular/cli to ts_project
The `@angular/cli` package has been migrated to the `rules_js` ts_project rule.
2024-12-23 13:33:16 -05:00
Charles Lyding
0d9a8359cb build: migrate @angular-devkit/schematics-cli to ts_project
The `@angular-devkit/schematics-cli` package has been migrated to the `rules_js` ts_project rule.
2024-12-23 12:05:42 -05:00
Charles Lyding
d4a4bc859a build: migrate @schematics/angular to ts_project
The `@schematics/angular` package has been migrated to the `rules_js` ts_project rule.
2024-12-23 12:05:29 -05:00
Charles Lyding
2888673ca2 build: migrate modules/testing to ts_project
The `modules/testing/builder` target used for builder integration testing
has been migrated to the `rules_js` ts_project rule.
2024-12-23 10:09:26 -05:00
Charles Lyding
adae1e8ea5 ci: ensure passing build before rest of PR jobs 2024-12-23 10:02:00 -05:00