3555 Commits

Author SHA1 Message Date
Angular Robot
0154af9afa build: update all non-major dependencies 2024-05-14 14:29:10 +02:00
Charles Lyding
d74258a930 refactor(@angular/build): fix linting errors for updated Sass processing 2024-05-14 11:28:31 +02:00
Alan Agius
9ce8fefc5a refactor: replace angular.io link with angular.dev
This replaces https://angular.io/guide/build#configuring-commonjs-dependencies with https://angular.dev/tools/cli/build#configuring-commonjs-dependencies
2024-05-13 14:53:12 -07:00
Angular Robot
8b97d80aaa build: update all non-major dependencies 2024-05-08 08:54:52 +02:00
Angular Robot
6953b4bb13 build: update all non-major dependencies 2024-05-07 12:26:51 +02:00
Angular Robot
0fe5066ce7 build: update all non-major dependencies 2024-05-02 12:01:15 -04:00
Alan Agius
59b69f5855 fix(@angular/build): add a maximum rendering timeout for SSG
There might be cases were currently, the render application promise does not resolve because the application never becomes stable in most cases this is due to errors, this causes the worker to never exit and the build to keep running until it's manually terminated.

With this change, we add a maximum rendering timeout of 30seconds for each page.

Closes #27565
2024-05-02 16:56:43 +02:00
Alan Agius
abf18a64e3 build: update all non-major dependencies
(cherry picked from commit 807718f133489e8938a909bbb2204df6918d2c7e)
2024-05-02 10:19:09 -04:00
Charles Lyding
df82da5f47 build: replace @angular/build version with archive in local builds
When creating a local development build of the repository via `yarn build --local`,
the package version for `@angular/build` within `@angular-devkit/build-angular`
will now correctly be replaced with the path to the locally built archive of
`@angular/build`.
2024-05-01 15:32:51 -04:00
Angular Robot
4e923fa9cb build: update all non-major dependencies 2024-04-30 10:15:41 -04:00
Charles Lyding
4d679a8e01 refactor(@angular-devkit/build-angular): extract-18n buildTarget option is no longer required
The `extract-i18n` option schema has been updated to reflect that the
`buildTarget` option is not required. The option value will default
to the `build` target of the containing project. This removes the need
for an additional option and character count within the `angular.json`
file for the project. This change also applies to the deprecated
`browserTarget` option.
2024-04-29 12:10:39 -04:00
Angular Robot
1d7531b88f build: update all non-major dependencies 2024-04-29 06:54:11 -04:00
Alan Agius
29dd052ab1 fix(@angular-devkit/build-angular): disable Vite prebundling when script optimizations are enabled
This change ensures that `ngDevMode` is replaced in node packages, aligning the behavior of the Vite server more closely with a production environment.
2024-04-26 19:49:52 +02:00
Angular Robot
7cedcc815c build: update all non-major dependencies 2024-04-23 19:32:52 +02:00
Alan Agius
83d360d0e5 build: remove bootstrap and jquery from dev dependencies 2024-04-23 18:29:26 +02:00
Charles Lyding
4ffe07aa24 feat(@angular-devkit/build-angular): move Vite-based dev-server for application builder to new build system package
With the `application` builder already within the new `@angular/build` package,
the Vite-based `dev-server` builder is now also contained within this package.
Only the Vite-based aspects of the `dev-server` have been moved and only the
support for the `application` builder. The compatibility builder `browser-esbuild`
is not supported with `@angular/build:dev-server`. The existing `dev-server` builder
found within `@angular-devkit/build-angular` should continue to be used for both the
Webpack-based `browser` builder and the esbuild-based compatibility `browser-esbuild`
builder. To maintain backwards compatibility, the existing `@angular-devkit/build-angular:dev-server`
builder continues to support builders it has previously.

No change to existing applications is required.
2024-04-23 07:27:26 -04:00
Charles Lyding
c2a8bf13db refactor(@angular-devkit/build-angular): move Vite dev-server @angular/build imports into separate file
To reduce the complexity of the move of the Vite-based dev-server builder
into the `@angular/build` package. The soon to be self-referencing imports
are now located in a separate file. Self-referencing imports are not well
supported inside the repository currently so this move allows the imports
to be adjusted in one location.
2024-04-22 09:06:33 -04:00
Charles Lyding
2391c878ab refactor(@angular-devkit/build-angular): remove Webpack-specific index option helper from Vite-based dev-server
The index output option helper from within the Webpack-based build system has been removed
from the Vite-based development server code to support separation of the builder. This
information will eventually be passed via the build system results and the direct option
access can then be removed completely.
2024-04-22 09:06:33 -04:00
Charles Lyding
1cebc3a5e9 refactor(@angular-devkit/build-angular): use dev-server implementation neutral builder output result interface
The dev-server builder will now only provide an interface with typed fields
for the combined set of common elements for the Webpack and Vite development
server implementations. Any additional builder specific runtime fields will
still be present and accessible.
2024-04-22 09:06:33 -04:00
Charles Lyding
810d213e18 feat(@angular/build): introduce new official build system package
The `@angular/build` package has been introduced to house the esbuild/Vite-based
build system that was newly introduced as stable in v17. The existing
`@angular-devkit/build-angular` package will continue to contain the Webpack-based
build system and to ensure backwards compatibility it will also provide aliases
for the esbuild/Vite-based build system. The changes here are the first stage
of the builder transition and moves the `application` builder into the new package.
The application builder can now be accessed when this package is installed directly
via `@angular/build:application`.

No changes are required for existing projects.
2024-04-18 17:24:23 +02:00
Charles Lyding
2ef958a7ce refactor(@angular-devkit/build-angular): remove @ngtools/webpack deep imports from application builder
The application builder previously used several TypeScript compiler host augmentation helper functions
and the bootstrap replacement transformer from the `@ngtools/webpack` package. To remove reliance on
Webpack-specific functionality. The subset of helpers have been copied into the application builder
itself. Some of the helpers will eventually be removed completely pending future updates to the
Angular compiler itself.
2024-04-18 17:24:23 +02:00
Alan Agius
87ba0e5848 refactor: replace usage of deprecated mapTo with map 2024-04-18 16:40:36 +02:00
Alan Agius
a189f17a12 build: update ng-packagr to 18.0.0-next.3 2024-04-18 16:40:36 +02:00
Alan Agius
53c319aaa9 feat(@angular-devkit/build-angular): add support for the poll option in the library builder
This commit adds support for polling when using the ng-packagr builder

Closes #27420
2024-04-18 16:40:36 +02:00
Alan Agius
d1c632af9a feat(@angular-devkit/build-angular): support native async/await when app is zoneless
This commit updates the esbuild based builders to emit native async/await when `zone.js` is not added as a polyfill.

Closes #22191
2024-04-18 14:34:09 +02:00
Angular Robot
8843188080 build: update all non-major dependencies 2024-04-17 20:01:54 +02:00
Alan Agius
d51cb598a7 feat(@angular-devkit/build-angular): inject event-dispatch in SSR HTML page
This commit add support in the Angular CLI to inject the event-dispatcher script when using the application builder.
2024-04-17 19:29:36 +02:00
Alan Agius
1c3ff61db8 fix(@angular-devkit/build-angular): address Unable to deserialize cloned data issue with Yarn PnP
Occasionally, when using Yarn PnP, an error message `Unable to deserialize cloned data` arises during the optimization phase of JavaScript bundles. This update rectifies the problem.

See: http://b/335203823
2024-04-17 15:41:29 +02:00
Charles Lyding
631303664e test: move builder testing infrastructure to separate bazel target module
The builder testing infrastructure and harness has been moved out of the
`@angular-devkit/build-angular` package and into a separate bazel only
module.  This allows the testing code to be shared with other packages
within the repository. It also removes test only code from within
the package that is not specific any of the included builders.
2024-04-17 10:23:50 +02:00
Alan Agius
43816a5b2d fix(@angular-devkit/build-angular): remove type="text/css" from style tag
`type="text/css"` is deprecated, for more info see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style#deprecated_attributes

Closes: #27471
2024-04-16 17:18:43 +02:00
Alan Agius
28906b8577 refactor: replace vite server.ws.send usages
The above mentioned API is deprecated.
2024-04-16 17:18:22 +02:00
Angular Robot
51d956bb87 build: update all non-major dependencies 2024-04-16 11:53:19 +02:00
Charles Lyding
4d27c38cd4 refactor(@angular-devkit/build-angular): reduce Webpack specific overlap in bundle budget calculator
Webpack-specific types and imports have been reduced within the logic and test code for the bundle
budget calculator. This reduces the amount of unused code that needs to be loaded when not using
a Webpack-based bundler. The Webpack component style budget plugin was also updated to use only
the `checkBudgets` function instead of the previous two function setup which limits the needed
amount of runtime exports for the plugin.
2024-04-15 09:49:22 -04:00
Angular Robot
b250831598 build: update all non-major dependencies 2024-04-15 12:34:09 +02:00
Charles Lyding
e6582e6931 refactor(@angular-devkit/build-angular): reduce Webpack specific overlap in stats table generation
Webpack-specific types and imports have been reduced within the logic for the build stats table generation.
This reduces the amount of unused code that needs to be loaded when not using a Webpack-based bundler.
2024-04-15 12:33:50 +02:00
Angular Robot
4fe345adb6 build: update all non-major dependencies 2024-04-12 09:27:02 -04:00
Alan Agius
83d1d233a2 feat(@angular-devkit/build-angular): enhance Sass rebasing importer for resources URL defined in variables and handling of external paths
This commit introduces enhancements to the Sass rebasing importer, enabling it to resolve resources whose paths are stored in variables or namespaced variables. Also this addresses an issue where URL paths in Sass and SCSS files, flagged as external, were incorrectly rebased, leading to resolution errors.

Closes #27445 and closes #27007
2024-04-12 09:26:01 -04:00
Charles Lyding
dcee94b282 refactor(@angular-devkit/build-angular): split Webpack-specific functionality from i18n option creation
The i18n option creation for a project, which is a combination of the `i18n` project field and the `localize`
build option, is now in a separate file from the Webpack specific i18n configuration setup.
This allows the i18n option creation to be used without loading anything Webpack specific.
2024-04-11 13:40:18 -04:00
Charles Lyding
75a01d6296 refactor(@angular-devkit/build-angular): directly resolve asset files in application builder
Instead of previously attempting to reuse the Webpack-based copy assets helper function,
the application builder will now only resolve all potential configured assets. This
avoids depending on non-obvious parameter behavior to prevent the actual copying of
the asset files.
2024-04-11 07:44:11 -04:00
Alan Agius
2acf95a949 fix(@angular-devkit/build-angular): do not generate an index.html file in the browser directory when using SSR.
BREAKING CHANGE: By default, the index.html file is no longer emitted in the browser directory when using the application builder with SSR. Instead, an index.csr.html file is emitted. This change is implemented because in many cases server and cloud providers incorrectly treat the index.html file as a statically generated page. If you still require the old behavior, you can use the `index` option to specify the `output` file name.

```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputPath": "dist/my-app",
      "index": {
        "input": "src/index.html",
        "output": "index.html"
      }
    }
  }
}
```
2024-04-10 17:00:50 +02:00
Alan Agius
733fba2e29 build: update dependency http-proxy-middleware to v3 2024-04-10 15:58:17 +02:00
Angular Robot
aea9ea6a98 build: update all non-major dependencies 2024-04-10 10:52:06 +02:00
Alan Agius
203c0eeb35 build: update all non-major dependencies 2024-04-08 10:10:09 -04:00
Alan Agius
afa76bb361 fix(@angular-devkit/build-angular): ensure esbuild-based builders exclusively produce ESM output
Previously, there were instances where the ESbuilder might incorrectly generate CJS code, leading to runtime errors.

Fixes #27421
2024-04-08 15:56:29 +02:00
Angular Robot
84e4a81b48 build: update dependency css-loader to v7 2024-04-06 15:47:24 +02:00
Angular Robot
c0e68e86d4 build: update all non-major dependencies 2024-04-03 13:31:18 -07:00
Angular Robot
fe19259aac build: update all non-major dependencies 2024-04-02 15:26:58 -07:00
Alan Agius
a673baf5ce Revert "fix(@schematics/angular): rename SSR port env variable"
This reverts commit 950a44521fdfb82000f6564ccc4c87d4a2b94680.
2024-04-02 11:51:45 -07:00
Angular Robot
3860fb3e42 build: update all non-major dependencies
(cherry picked from commit 7da0965ce3856cfc99158db8510ae339d3dc8fad)
2024-04-02 10:07:07 -07:00
Charles Lyding
83b943a74b refactor(@angular-devkit/build-angular): use single search directory list for postcss/tailwind configuration setup
Both the postcss and tailwind configuration file searching during the `application` builder setup look
in the project and workspace root for one of the related configuration files. To avoid unneeded
repeat file access, both searches now reuse directory contents information.
2024-04-02 09:17:34 -07:00