3577 Commits

Author SHA1 Message Date
Charles Lyding
42438302d8 refactor(@angular/build): avoid write file logic for internal application build action
The internal "buildApplicationInternal" function is only used by several consumers that
require writing the output files to disk. One, `browser-esbuild`, directly writes
to the disk. The two experimental unit test builders also have unique requirements
and also directly write. This leaves only the main `application` builder that relies on the
internal file writing functionality of `buildApplicationInternal`. To avoid unneeded
logic for the other usages (`dev-server`, `extract-i18n`, unit testing, etc.), the
disk writing logic is now elevated to the `application` build itself. The internal
function will now always provide the output files within the result objects generated
from a successful build. This also removes the need for the other usages to specify
that files should not be written to disk.
2024-08-06 08:23:18 -04:00
Angular Robot
349e052f41 build: update all non-major dependencies 2024-08-05 15:43:13 -04:00
Charles Lyding
bb802d14eb refactor(@angular-devkit/build-angular): only write test related files in Jest builder
With the structured build results available, the Jest builder can now more
easily write only the needed files to a temporary location. This reduces
the need to assume build directory output structure and reduces the amount
of potential filesystem calls. The temporary files are also now written
into a UUID subdirectory within the existing `dist/test-out` location.
This allows for multiple projects to be tested concurrently without
overwriting each other.
2024-08-05 13:46:42 -04:00
Charles Lyding
24be1e7ff8 refactor(@angular-devkit/build-angular): only write test related files in WTR builder
With the structured build results available, the WTR builder can now more
easily write only the needed files to a temporary location. This reduces
the need to assume build directory output structure and reduces the amount
of potential filesystem calls. The temporary files are also now written
into a UUID subdirectory within the existing `dist/test-out` location.
This allows for multiple projects to be tested concurrently without
overwriting each other.
2024-08-05 13:46:42 -04:00
Angular Robot
2bf8e7f296 build: update all non-major dependencies 2024-07-30 12:40:39 +02:00
Angular Robot
22938486c5 build: update all non-major dependencies 2024-07-29 14:39:15 +02:00
Alan Agius
0466fb74a2 fix(@angular/build): resolve error with extract-i18n builder for libraries
The `extract-i18n` builder is only intended to be used with application projects.

Closes #28109
2024-07-29 09:06:42 +02:00
Angular Robot
5091430c19 build: update dependency sass-loader to v16 2024-07-29 08:55:24 +02:00
Angular Robot
790835162c build: update all non-major dependencies 2024-07-25 09:42:23 -07:00
Angular Robot
a131c9bec9 build: update dependency sass-loader to v15 2024-07-24 09:05:56 -07:00
Angular Robot
94b331e667 build: update all non-major dependencies 2024-07-22 12:53:59 -07:00
Charles Lyding
421b6e75b4 refactor(@angular/build): provide structured application builder result types
The application builder now provides structured output types to its internal
consumers. The architect builders themselves and the programmatic API is
not changed. These output result types allow for the development server to
receive additional information regarding the build and update the active
browser appropriately. This functionality is not yet implemented but the
additional result types provide the base infrastructure to enable future
features. The result types also allow for reduced complexity inside other
builders such as i18n extraction and the browser compatibility builder.
The usage is not yet fully optimized and will be refined in future changes.
2024-07-19 10:08:38 -04:00
Angular Robot
64b50815e1 build: update all non-major dependencies 2024-07-18 10:04:45 -07:00
Angular Robot
e21e9867f0 build: update all non-major dependencies 2024-07-17 09:34:41 -07:00
Angular Robot
346ad54a58 build: update all non-major dependencies 2024-07-15 09:29:51 -07:00
Angular Robot
81a3563b6f build: update all non-major dependencies 2024-07-12 11:19:35 +02:00
Angular Robot
ba13d03176 build: update dependency terser to v5.31.2 2024-07-11 13:24:05 +02:00
Charles Lyding
5895e9fb01 test: enable no-case-declarations lint rule
The `no-case-declarations` rule is now enabled and all failures
in have been addressed within the published code. Unit tests
have been excluded.
2024-07-11 08:19:56 +02:00
Charles Lyding
eced3a8ecc test: enable no-fallthrough lint rule
The `no-fallthrough` rule is now enabled and all failures
have been addressed within the code.
2024-07-11 08:19:56 +02:00
Alan Agius
01c1ec087e build: update Angular dependencies to version 18.2.0-next.0 2024-07-10 16:00:13 +02:00
Angular Robot
22d9369aef build: update all non-major dependencies 2024-07-10 09:07:48 +02:00
Charles Lyding
4286bb03b5 refactor(@angular/build): remove direct usage of undici dependency for SSR
The Node.js types (`@types/node`) now contains the information for the `Response`
class and the global `fetch` function. The `Response` object is also globally
accessible in all versions of Node.js supported by the Angular CLI. This removes
the need to depend directly on the `undici` package.
The `undici` package is still used for unit-testing and remains as a development
dependency.
2024-07-08 18:54:18 +02:00
Angular Robot
b0b39b30d3 build: update all non-major dependencies 2024-07-03 09:27:02 -04:00
Charles Lyding
d449c9d093 build: update @discovery/json-ext to v0.6.0 2024-07-02 10:13:04 -04:00
Angular Robot
394e761a5b build: update dependency webpack-merge to v6 2024-07-02 09:33:08 -04:00
Alan Agius
f49c8d3b0a fix(@angular-devkit/build-angular): rollback terser to 5.29.2
More information in https://github.com/terser/terser/issues/1539

Closes #27866
2024-07-02 15:11:07 +02:00
Alan Agius
164c0d805d fix(@angular-devkit/build-angular): reduce the number of max workers to available CPUs minus one
This commit reduces the maximum number of workers to the available CPUs minus 1. This adjustment ensures that some resources are left for the main thread, preventing it from being starved of CPU cycles.
2024-07-01 15:11:59 +02:00
Alan Agius
f16fbd82ad build: update all non-major dependencies 2024-07-01 13:44:11 +02:00
Angular Robot
9c26db46d7 build: update dependency https-proxy-agent to v7.0.5 2024-06-28 11:38:05 -07:00
Angular Robot
7c4e0918d9 build: update all non-major dependencies 2024-06-27 10:09:22 -07:00
Angular Robot
169daf1a2e build: update dependency piscina to v4.6.1 2024-06-26 08:31:48 -07:00
Charles Lyding
d56c8de284 refactor: minor code cleanup to improve code health
Several smaller code changes to improve type information and remove now
unneeded code structures based on improvements to both Node.js, TypeScript,
and underlying dependencies.
2024-06-25 16:57:16 -04:00
Charles Lyding
fa9bce0e9a test: enable @typescript-eslint/no-unnecessary-type-assertion lint rule
The `@typescript-eslint/no-unnecessary-type-assertion` rule is now enabled and all failures
have been addressed within the code.
2024-06-25 16:57:03 -04:00
Charles Lyding
741cf7fe1e test: enable @typescript-eslint/await-thenable lint rule
The `@typescript-eslint/await-thenable` rule is now enabled and all failures
have been addressed within the code.
2024-06-25 16:57:03 -04:00
Alan Agius
0d2d9860fd build: remove @types/browserslist
`browserslist` now ships it's own typings
2024-06-25 21:20:26 +02:00
Alan Agius
aebfde28c7 build: update all non-major dependencies
Closes #27881
2024-06-25 20:53:49 +02:00
Charles Lyding
17e168379e build: additional fixes for tsetse rule compliance
Due to bazel rules_nodejs caching, several additional `JSON.parse` usages were not
caught in the first set of fixes. These have now been addressed. Also,
the `must-use-promises` rule has been patched to match the behavior of the
`@typescript-eslint/no-floating-promises` for consistency.
The bazel option `suppressTsconfigOverrideWarnings` was also removed from the
`tsconfig` as it is a no-op and was previously used for now removed feature.
Test files are currently excluded from the `JSON.parse` rule to avoid large
changes to test code.
2024-06-25 11:17:33 -04:00
Charles Lyding
39f946a848 build: enabled isolated modules TypeScript option
The TypeScript `isolatedModules` option is now enabled for all TypeScript
code within the repository. As a result, all packages will now be built
with the option enabled. This does not affect projects created with the CLI
and is only related to the building of the actual Angular CLI code.
The `isolatedModules` option ensures that code can be emitted without the
TypeScript typechecker and allows tools other than TypeScript to potentially
be used. Code was updated to correct all errors after the option was enabled.
Additionally, some early code fixes were done to add function and accessor
return types to prepare for future `isolatedDeclarations` usage. More changes
would be needed to consider turning on `isolatedDeclarations`, however.
2024-06-23 15:34:49 +02:00
Angular Robot
a442f8c3a3 build: update all non-major dependencies 2024-06-20 09:15:40 +02:00
Charles Lyding
dd07049277 fix(@angular/build): use Node.js available parallelism for default worker count
The Node.js `os.availableParallelism` API now provides more accurate values
when used within containers such as many CI environments. This provides a
better default when using resource limited CI setups. The value is still
set to a maximum default of four. However, the `NG_BUILD_MAX_WORKERS`
environment variable can be used to set the value to an explicit value
if required.
2024-06-18 16:23:51 +02:00
Angular Robot
a1f60f93c4 build: update all non-major dependencies 2024-06-18 09:41:37 +02:00
Charles Lyding
fb2981dc4e fix(@angular-devkit/build-angular): use istanbul-lib-instrument directly for karma code coverage
The `istanbul-lib-instrument` package provides the required functionality needed
to instrument code for test coverage within the context of the Angular CLI.
Since the build pipeline already contains a customized babel preset, this package
can be integrated directly into the pipeline.
This reduces the number of dependencies required for `@angular-devkit/build-angular`
including the deprecated `inflight` package.
2024-06-17 13:58:42 +02:00
Alan Agius
1039a6425f build: update all non-major dependencies 2024-06-14 18:25:29 +02:00
Alan Agius
667fb8756f build: update copy-webpack-plugin to 12.0.2 2024-06-13 10:10:34 -04:00
Angular Robot
a4d81759b8 build: update all non-major dependencies 2024-06-13 08:15:35 -04:00
Alan Agius
34f2a1278f build: update open to version 10
Closes #27825
2024-06-12 16:25:51 +02:00
Alan Agius
4b95aece8a refactor: replace custom promise-based setTimeout with native Node.js setTimeout
In this commit, the custom implementation of a promise-based setTimeout function has been replaced with the native Node.js setTimeout function, which now returns a promise.
2024-06-11 12:51:16 +02:00
Charles Lyding
ce850da171 build: update yarn version to v4.2.2 2024-06-10 18:17:03 -04:00
Angular Robot
26c36a119d build: update all non-major dependencies 2024-06-10 11:32:16 -04:00
Charles Lyding
d6aa216553 refactor(@angular-devkit/build-angular): remove unused inquirer dependency
The functionality that previously used `inquirer` was moved to the `@angular/build` package.
2024-06-07 08:58:25 -04:00