15343 Commits

Author SHA1 Message Date
Alan Agius
607a97cdeb refactor(@angular/ssr): bundle Critters
This commit bundles the Critters library to ensure compatibility with Nodeless environments. Additionally, all licenses for bundled libraries, including Critters, are now included in the package. This helps maintain compliance with open-source license requirements.
2024-08-24 07:37:36 +02:00
aparzi
a381a3db18 feat(@schematics/angular): add option to export component as default
Introduces option `--export-default` to control whether the generated component uses a default export instead of a named export.

Closes: #25023
2024-08-23 23:56:34 +02:00
Alan Agius
ac102aa9c6 ci: run modules and packages tests using a single bazel invocation
Optimize Bazel build with unified module and package tests
2024-08-23 21:24:35 +02:00
Angular Robot
bcbbee32fd build: update angular 2024-08-23 13:57:53 +02:00
Alan Agius
358f85e4d2 build: update dependency webpack to v5.94.0 2024-08-23 13:55:59 +02:00
Alan Agius
d43180af5f fix(@angular/ssr): add missing peer dependency on @angular/platform-server
This is a required peer dependency which was not listed.
2024-08-22 22:10:42 +02:00
Alan Agius
c279523e51 build: update material packages to 19.0.0-next.1 2024-08-22 21:18:30 +02:00
Alan Agius
4aa95bda24 build: clean up redundant exclude field from tsconfig-build.json
The exclude field has been removed from `tsconfig-build.json` as it is redundant. This configuration is used by Bazel, which already specifies the input files explicitly, making the exclude field unnecessary. This change simplifies the configuration without impacting the build process.
2024-08-22 20:44:56 +02:00
Alan Agius
7ea85e9fcb release: cut the v19.0.0-next.1 release 19.0.0-next.1 2024-08-22 19:27:48 +02:00
Alan Agius
5f7edd8e2d build: update dependency zone.js to ~0.15.0 and angular 2024-08-22 19:20:15 +02:00
Charles Lyding
4d5af43886 refactor(@angular/build): use Angular compiler CLI private tooling export
The `@angular/compiler-cli/private/tooling` package export is now used instead
of the main package export to allow cleanup of the compiler-cli package. This
secondary export has existed for several major versions.
2024-08-22 17:48:04 +02:00
Charles Lyding
276ce442a5 refactor(@angular-devkit/build-angular): use Angular compiler CLI private tooling export
The `@angular/compiler-cli/private/tooling` package export is now used instead
of the main package export to allow cleanup of the compiler-cli package. This
secondary export has existed for several major versions.
2024-08-22 17:48:04 +02:00
Charles Lyding
8eb8a87cdb refactor(@ngtools/webpack): use Angular compiler CLI private tooling export
The `@angular/compiler-cli/private/tooling` package export is now used instead
of the main package export to allow cleanup of the compiler-cli package. This
secondary export has existed for several major versions.
2024-08-22 17:48:04 +02:00
Alan Agius
5ba0b07afe refactor(@angular/ssr): reorganize platform providers initialization in AngularServerApp
Removed redundant `.push()` call by directly adding the provider during array initialization phase.
2024-08-22 14:34:18 +02:00
Angular Robot
b75bbfff77 build: update github/codeql-action action to v3.26.4 2024-08-22 13:05:39 +02:00
Angular Robot
1c30de2121 build: update all non-major dependencies 2024-08-22 13:05:22 +02:00
Charles Lyding
d223d1eda3 refactor(@schematics/angular): increase new application anyComponentStyle budget thresholds
The 2kB/4kB warning/error thresholds for any component style within an application
has now been increased to 4kB/8kB for warnings/errors respectively. This allows for
more complex styles within a component while also reducing the likelihood of the budget
rule being disabled or removed. The new limits still provide diagnostics for extreme
size cases such as accidentally importing all Bootstrap or Material styles into an
individual component. Such instances are a primary use case for the budget.
2024-08-21 20:47:31 +02:00
Alan Agius
e40384e637 refactor(@angular-devkit/build-angular): remove deprecated browserTarget
The `browserTarget` option has been removed as part of the refactoring process. This option was part of a private API and is no longer used. Projects relying on this option should migrate to using the `buildTarget` option.

BREAKING CHANGE: The `browserTarget` option has been removed from the DevServer and ExtractI18n builders. `buildTarget` is to be used instead.
2024-08-21 19:53:04 +02:00
Alan Agius
9692a9054c feat(@angular/ssr): improve handling of aborted requests in AngularServerApp
Introduce support for handling request signal abortions in the `AngularServerApp`. This is particularly useful in the development server integration where a 30-second timeout is enforced for requests/responses.
2024-08-21 18:46:03 +02:00
Alan Agius
d6a34034d7 refactor(@angular/build): remove automatic addition of @angular/localize/init polyfill and related warnings
The logic that automatically added the `@angular/localize/init` polyfill has been removed.

BREAKING CHANGE: The `@angular/localize/init` polyfill will no longer be added automatically to projects. To prevent runtime issues, ensure that this polyfill is manually included in the "polyfills" section of your "angular.json" file if your application relies on Angular localization features.
2024-08-21 15:42:21 +02:00
Alan Agius
e58c585295 refactor(@angular/ssr): remove duplicate resetAngularServerApp method
The `resetAngularServerApp` method was identical to `destroyAngularServerApp` and was mistakenly retained due to an incorrect merge. This commit removes the redundant method.
2024-08-21 15:42:13 +02:00
Alan Agius
60d24b24c5 build: mark server tests as flaky
These server tests frequently fail due to timeouts. Despite efforts, the root cause has not yet been identified, so they are being marked as flaky to prevent blocking the pipeline while further investigation continues.
2024-08-21 15:42:02 +02:00
Alan Agius
0d8a1006d4 refactor(@angular-devkit/core): remove deprecated fileBuffer function in favor of stringToFileBuffer
BREAKING CHANGE: The deprecated `fileBuffer` function is no longer available. Update your code to use `stringToFileBuffer` instead to maintain compatibility.

**Note:** that this change does not affect application developers.
2024-08-21 14:26:00 +02:00
Alan Agius
90b94e089b docs: release notes for the v18.2.1 release 2024-08-21 13:57:06 +02:00
Alan Agius
1c185183c3 refactor(@angular/ssr): expose private APIs for build system integration and refactor app management
- Exposed several utility functions as private APIs to support the integration with the build system.
- Removed `isDevMode` and caching logic from `AngularAppEngine`. This was necessary to better handle updates when using Vite. Instead, `AngularServerApp` is now treated as a singleton to simplify management.
- Switched asset storage from an `Object` to a `Map` in the manifest for improved efficiency and consistency.

This refactor sets the groundwork for seamless wiring with the build system.
2024-08-21 09:30:01 +02:00
Angular Robot
d6155d2761 build: update angular 2024-08-21 07:44:20 +02:00
Angular Robot
4df3cef1f5 build: update all non-major dependencies 2024-08-21 07:44:07 +02:00
Charles Lyding
7992218a9c fix(@schematics/angular): remove declaration and sourceMap from default tsconfig
The `declaration` TypeScript option has been removed from the default generated
`tsconfig` for new projects. This option was explicitly set to `false`. However,
the default value for the option is already `false`.
Also, the `sourceMap` option has been removed. Source map generation is controlled
by the build options and not the TypeScript configuration.
2024-08-20 23:57:15 +02:00
Charles Lyding
e72eb05cc6 refactor(@angular/build): template style elements should always be CSS
Now that style elements within templates are processed as inline component
styles, the style contents should only be considered CSS. This ensures
consistent behavior prior to when style elements were processed. It also ensures
that the styles will function as expected in JIT mode where template styles
cannot be preprocessed and must be written in a browser supported language.
2024-08-20 19:54:04 +02:00
Alan Agius
0676e2a4c7 test: verify that component styles are not empty
Some tests check for the presence of component styles in the DOM. However, with recent changes to the framework, the style tag is no longer created when styles are empty. Updated tests to ensure that component styles are not empty.
2024-08-20 19:05:55 +02:00
Angular Robot
d5a305716b build: update angular 2024-08-20 19:05:55 +02:00
Charles Lyding
0b161bc761 fix(@angular-devkit/build-angular): remove outdated browser-esbuild option warning
The `resourcesOutputPath` option from the browser builder is supported as of 18.2.
The unsupported warning is now removed. The warning logic has also been consolidated
now that there are only several warnings left.
2024-08-20 17:05:39 +02:00
Charles Lyding
6b544f70e7 fix(@angular/build): support reading on-disk files during i18n extraction
If an application has JavaScript files that are sourced directly from disk,
the extraction would previously fail due to the i18n extractor only able
to access the in-memory generated JavaScript files. The extractor can now
access both memory and disk-based JavaScript files.
2024-08-20 17:05:27 +02:00
Charles Lyding
83b7343ec2 Revert "build: change to local repo's build system(path to npm_package_archive.tgz files)"
This reverts commit eedeee2f4fc4f0cd3124611aa733d320847f5bd3.

Causes snapshot publishing failures: https://github.com/angular/angular-cli/actions/runs/10471282117/job/29006137399
2024-08-20 16:52:21 +02:00
Angular Robot
615ee6cfad build: lock file maintenance 2024-08-20 14:12:09 +02:00
Angular Robot
e5a856aa0e build: update github/codeql-action action to v3.26.3 2024-08-20 14:11:48 +02:00
Angular Robot
4d19d7c1ea build: update all non-major dependencies 2024-08-20 14:11:36 +02:00
JAPNITSINGH
eedeee2f4f build: change to local repo's build system(path to npm_package_archive.tgz files) 2024-08-20 14:10:51 +02:00
Angular Robot
212034bab3 build: update all non-major dependencies 2024-08-19 13:24:50 +02:00
Alan Agius
71c06c69f6 fix(@angular/build): improve error message when an unhandled exception occurs during prerendering
This change enhances the error messaging when an unhandled exception occurs during the prerendering process. The updated error message provides more context and clarity.

**Previous Behavior**

```
ng b
An unhandled exception occurred: Some error!!!
See "/tmp/ng-S2ABKF/angular-errors.log" for further details.
```

**Updated Behavior:**
```
ng b
Browser bundles
Initial chunk files     | Names               |  Raw size | Estimated transfer size
main-AFPIPGGK.js        | main                | 218.00 kB |                59.48 kB
polyfills-Z2GOM3BN.js   | polyfills           |  35.82 kB |                11.80 kB
styles-5INURTSO.css     | styles              |   0 bytes |                 0 bytes

                        | Initial total       | 253.82 kB |                71.28 kB

Server bundles
Initial chunk files     | Names               |  Raw size
server.mjs              | server              |   1.11 MB |
chunk-HZL5H5M5.mjs      | -                   | 526.77 kB |
polyfills.server.mjs    | polyfills.server    | 269.91 kB |
chunk-GFWAPST7.mjs      | -                   |  19.16 kB |
chunk-5XUXGTUW.mjs      | -                   |   2.55 kB |
render-utils.server.mjs | render-utils.server |   1.46 kB |
main.server.mjs         | main.server         | 149 bytes |

Lazy chunk files        | Names               |  Raw size
chunk-7YC4RJ5P.mjs      | xhr2                |  12.08 kB |

Prerendered 1 static route.
Application bundle generation failed. [4.923 seconds]

✘ [ERROR] An error occurred while prerendering route '/'.

Error: Some error!!!
    at render (node_modules/@angular/build/src/utils/server-rendering/render-worker.js:20:20)
    at /angular-cli/abc/node_modules/piscina/dist/worker.js:146:32
```

Closes #28212
2024-08-15 15:52:31 +02:00
Angular Robot
e043c9669c build: update github/codeql-action action to v3.26.2 2024-08-15 08:00:35 -04:00
Angular Robot
086496cf21 build: update dependency aspect_bazel_lib to v2.8.0 2024-08-15 07:59:58 -04:00
Charles Lyding
a7f466a5fa release: cut the v19.0.0-next.0 release 19.0.0-next.0 2024-08-14 17:25:22 -04:00
Angular Robot
dc50233f4e build: update angular 2024-08-14 16:40:32 -04:00
Charles Lyding
618fdea00b build: update Angular versions to 19.0.0-next.0 2024-08-14 16:15:35 -04:00
Charles Lyding
3344d57d1c docs: release notes for the v18.2.0 release 2024-08-14 14:55:39 -04:00
Charles Lyding
39f7a88078 release: switch the next branch to v19.0.0-next.0 2024-08-14 13:46:27 -04:00
Alan Agius
cb078c2768 build: remove unnecessary excludes from tsconfig.json
The excluded files are no longer relevant.
2024-08-14 19:29:21 +02:00
Alan Agius
474571f087 build: remove Bazel typings workaround
The workaround is no longer necessary since the bug has been resolved upstream.
2024-08-14 19:12:27 +02:00
Angular Robot
91b561d652 build: update dependency watchpack to v2.4.2 2024-08-14 17:04:47 +02:00