10455 Commits

Author SHA1 Message Date
Angular Robot
f412d7b5a4 build: update angular 2023-05-12 13:25:44 -04:00
Charles Lyding
d8930facc0 feat(@angular-devkit/build-angular): support incremental TypeScript semantic diagnostics in esbuild builder
When using the esbuild-based browser application builder with CLI caching enabled, TypeScript's `incremental`
option will also be enabled by default. A TypeScript build information file will be written after each build and
an attempt to load and use the file will be made during compilation setup. Caching is enabled by default within
the CLI and can be controlled via the `ng cache` command. This is the first use of persistent caching for the
esbuild-based builder. If the TypeScript `incremental` option is manually set to `false`, the build system will
not alter the value. This can be used to disable the behavior, if preferred, by setting the option to `false` in
the application's configured `tsconfig` file.
NOTE: The build information only contains information regarding the TypeScript compilation itself and does not
contain information about the Angular AOT compilation. TypeScript does not have knowledge of the AOT compiler
and it therefore cannot include that information in its build information file. Angular AOT analysis is still
performed for each build.
2023-05-12 11:33:51 -04:00
Charles Lyding
3ede1a2cac feat(@angular-devkit/build-angular): allow forcing esbuild builder with dev-server
To allow lower overhead trial of the developer preview of the esbuild-based builder system,
the development server now has an option to force the usage of the esbuild-based
build system while still retaining the default Webpack-based build system for the
`build` command. The `forceEsbuild`/`--force-esbuild` option can be added to the
`angular.json` options for the `serve` target or used on the command line, respectively.
The `browser-esbuild` builder will be used to build the application using the options
specified by the server configuration's `browserTarget` option. Unsupported build options
will be ignored. If using a third-party builder, a warning will be issued but the build
will still be attempted. Third-party builder usage in this context is considered
unsupported and may result in unexpected behavior or build failures.
2023-05-11 15:43:29 -04:00
Angular Robot
35d239e937 build: update angular 2023-05-10 23:39:19 +00:00
Charles Lyding
a24be350e7 docs: release notes for the v16.0.1 release 2023-05-10 16:13:37 -04:00
Angular Robot
f6c1f088c9 build: update all non-major dependencies 2023-05-10 15:33:55 +00:00
Alan Agius
a70e7a42f1 refactor(@angular-devkit/core): update stringToFileBuffer and fileBufferToString to use TextDecoder and TextEncoder
`TextDecoder` and `TextEncoder` can now be used on Node.js
2023-05-10 15:33:35 +00:00
Charles Lyding
1333a4e8c0 refactor(@angular-devkit/build-angular): emit affected files as a group in esbuild builder
The internal emit strategy for the TypeScript/Angular compiler has been adjusted to prefill
the memory cache during the initial phase of the build. Previously each file was emitted
during the bundling process as requested by the bundler. This change has no immediate effect
on the build process but enables future build performance improvements.
2023-05-10 11:20:43 +00:00
Alan Agius
22c1cb66c5 fix(@angular-devkit/schematics): do not generate an UpdateBuffer for created and overridden files
`UpdateBuffer` only supports UTF-8 encoded files, which causes schematics to emit corrupted binary like files such as images.

This commit also introduce an errors when the `UpdateRecorder` is used for non UTF-8 files.

Closes #25174
2023-05-10 11:20:29 +00:00
Alan Agius
7dc0049be9 fix(@angular/pwa): compress PWA icons
This commit reduces the size the generated PWA icons.
2023-05-09 15:53:06 +00:00
Charles Lyding
82bdc9e460 fix(@angular-devkit/build-angular): avoid CommonJS warnings for relative imports with esbuild builders
When using the esbuild-based browser application builder, CommonJS file warnings were incorrectly being
issued for relative file imports. The CommonJS warnings are only intended to be generated for node module
imports.
2023-05-09 15:52:38 +00:00
Charles Lyding
45e98a4f5b fix(@angular-devkit/build-angular): clean incoming index URL before processing in esbuild builder
When using the esbuild-based browser application builder with the development server, the incoming
URL for the index HTML may contain search parameters or other URL elements that can cause the index
HTML content to not be found or processed incorrected by the development server. These elements are
cleaned prior to comparison and the original URL is not longer passed to Vite to avoid unneeded
Vite specific processing of the content.
2023-05-09 14:05:20 +00:00
Charles Lyding
ca8e5087fb fix(@angular-devkit/build-angular): show error note for CSS url() tilde usage in esbuild builder
When using the esbuild-based browser application builder with a `url()` in a stylesheet that uses
that Webpack-specific tilde prefix, a note will be added to the resolution error providing additional
information regarding the removal of the tilde.
2023-05-09 14:00:33 +00:00
Doug Parker
9d8f6289fa docs: update release doc to be more clear about peer dependency updates and timing 2023-05-08 19:32:56 +00:00
Angular Robot
a883e10471 build: lock file maintenance 2023-05-08 16:49:29 +00:00
Angular Robot
c109fb6a16 build: update all non-major dependencies 2023-05-08 15:50:28 +00:00
Charles Lyding
892fcc6892 fix(@angular-devkit/build-angular): convert dev-server glob proxy entries for esbuild builder
When using the esbuild-based browser application builder with the development server, an
underlying Vite server is used. The Vite server currently does not support glob-based entries
for the proxy configuration. They must either be prefix strings or regular expressions. The
Webpack-based development server, however, does support globs. To remove the need to have
different proxy configuration files for the two servers, the entries will now be normalized
to regular expressions when using the Vite server. This allows existing proxy configurations
to work without modification.
2023-05-08 15:45:21 +00:00
Alan Agius
740610a902 Revert "fix(@angular-devkit/build-angular): set public class fields as properties (#24849)"
This reverts commit 04274afc15084ead2916e11055aa8f1d2f61951d.

Closes: #25161
2023-05-08 13:35:05 +00:00
Alan Agius
126b23edea fix(@angular-devkit/build-angular): disable runtime errors from being displayed in overlay
By default now webpack-dev-server adds runtime errors in an overlay. See: aab01b3c4e this commit disables this functionality.

Closes #25151
2023-05-08 13:34:49 +00:00
Angular Robot
0c3da6235a build: update angular 2023-05-08 13:07:27 +00:00
Leosvel Pérez Espinosa
e15100d597 fix(@angular-devkit/build-angular): fix index option const value for browser-esbuild 2023-05-08 13:06:48 +00:00
Angular Robot
ccfc74b2af build: update github/codeql-action action to v2.3.3 2023-05-08 13:06:18 +00:00
Charles Lyding
a68ef0bbb4 fix(@angular-devkit/build-angular): properly set base dev-server path with esbuild
When using the esbuild-based browser application builder with the development server,
the `baseHref` build option will now be properly propagated to the underlying Vite
server.
2023-05-08 13:06:01 +00:00
Charles Lyding
3aa1c4ec1a fix(@angular-devkit/build-angular): workaround for esbuild static block AOT generated code
esbuild currently has a defect involving self-referencing a class within a static code block or
static field initializer. This is not an issue for projects that use the default browserslist as these
elements are an ES2022 feature which is not support by all browsers in the default list. However, if a
custom browserslist is used that only has newer browsers than the static code elements may be present.
This issue is compounded by the default usage of the tsconfig `"useDefineForClassFields": false` option
present in generated CLI projects which causes static code blocks to be used instead of static fields.
esbuild currently unconditionally downlevels all static fields in top-level classes so to workaround the
Angular issue only static code blocks are disabled here.

Fixes #25127
2023-05-08 13:05:42 +00:00
Charles Lyding
57f0be7990 fix(@angular-devkit/build-angular): prevent relative import failure with Less in esbuild builder
When using the esbuild-based browser application builder, relative Less imports could cause
a fatal exception. This has now been corrected.
2023-05-04 20:26:54 +00:00
Charles Lyding
fe997085a2 test(@angular-devkit/build-angular): enable additional build E2E tests for esbuild builder
All the tests within the `build/library` and `build/styles` test directories will now
be run for the esbuild-based builder E2E CI.
2023-05-04 20:26:54 +00:00
Charles Lyding
2a2817db74 fix(@angular-devkit/build-angular): avoid hash filenames for non-injected global styles/scripts
When using the esbuild-based browser application builder, non-injected global styles and scripts
were unintentionally being output with filenames that contain a hash. This can prevent the filenames
from being discoverable and therefore usable at runtime. The output filenames will now no longer
contain a hash component which matches the behavior of the Webpack-based builder.
2023-05-04 20:26:40 +00:00
Angular Robot
67e940635c build: update all non-major dependencies 2023-05-04 20:26:09 +00:00
Doug Parker
d160856958 refactor: widen peer dependencies to ^16.0.0 || ^16.1.0-next.0 2023-05-03 19:38:47 +00:00
Doug Parker
b70899ab2d docs: add @angular/pwa to version bump list in release documentation 2023-05-03 19:21:05 +00:00
Doug Parker
3879379f70 docs: release notes for the v16.0.0 release 2023-05-03 11:00:08 -07:00
Doug Parker
e94405d870 docs: release notes for the v15.2.8 release 2023-05-03 09:33:38 -07:00
Angular Robot
6c7f81fa40 build: update github/codeql-action action to v2.3.2 2023-05-02 21:11:18 +00:00
Angular Robot
62728542c6 build: update angular 2023-05-02 21:10:58 +00:00
Doug Parker
20ebd47901 docs: release notes for the v16.0.0-rc.4 release 2023-04-28 12:02:47 -07:00
Alan Agius
2fabeabf7f fix(@angular-devkit/build-angular): JIT support for standalone applications
This commit fixes and issue were standalone applications would fail during runtime because the `@angular/compiler` is not available.

We now add the `@angular/compiler` as part of the bundle when JIT mode is enabled.
2023-04-28 18:00:36 +00:00
Charles Lyding
3dd584a21d refactor(@angular-devkit/build-angular): update esbuild builder option status messages
The status of the esbuild-based browser application builder has been changed to developer
preview. Warning messages for unsupported options are now updated to reflect this change.
2023-04-28 17:51:39 +00:00
Angular Robot
17112a38a0 build: update all non-major dependencies 2023-04-28 07:33:11 +00:00
Doug Parker
beda3e532c docs: release notes for the v16.0.0-rc.3 release 2023-04-27 16:13:06 -07:00
Alan Agius
4a38e8ab35 refactor(@angular-devkit/build-angular): exclude @angular/platform-server/init from unsafe optimizations in esbuild
While currently esbuild is not use to bundle server bundles, it will in the future. This commit adds a check for the `@angular/platform-server/init` entry-point to be excluded from advanced optimizations.
2023-04-27 14:44:27 +00:00
Alan Agius
bf4229da22 fix(@angular-devkit/build-angular): always enable looseEnums build optimizer rule
With this change TypeScript enums are always processing in "loose" mode. Previously, this was only done for `@angular/` packages.
2023-04-27 14:44:27 +00:00
Alan Agius
24a6501ec6 refactor: replace node with process.execPath
This is ensure that the same node executable is used to spawn Jest
2023-04-27 12:52:38 +00:00
Alan Agius
3ec88270ba perf(@angular-devkit/build-angular): do not inline sourcemap when using vite dev-server
Vite inlines the source map as part of content (ba62be40b4/packages/vite/src/node/server/send.ts (L59-L63)) with no option to disable this behaviour. While this is improves performances when Vite is used without prebundling. When using prebundling this is causes an overhead as the response can grow drastically, in some cases over 50mb.
2023-04-27 12:26:35 +00:00
Alan Agius
621d0885b6 fix(@angular-devkit/build-angular): exclude @angular/platform-server/init from unsafe optimizations
`@angular/platform-server/init` entry-point is side-effectful and thus it's not safe to perform advanced optimizations.
2023-04-27 12:26:14 +00:00
Alan Agius
873272f644 fix(@schematics/angular): provide migration that disables build optimizer on dev server builds
In https://github.com/angular/angular-cli/pull/25070 we turned on `buildOptimizer` by default for server builds. This causes existing projects development builds to always run build-optimizer. This migration will set `buildOptimizer` to false, when `optimization` is disabled.
2023-04-27 12:25:54 +00:00
Angular Robot
ae54da2990 build: update all non-major dependencies 2023-04-27 10:07:18 +00:00
Angular Robot
0ec9a21895 build: update angular 2023-04-27 10:03:33 +00:00
Angular Robot
8dfd1e9e4b build: update github/codeql-action action to v2.3.1 2023-04-27 10:02:01 +00:00
Angular Robot
367ddabed0 build: update dependency rxjs to v7.8.1 2023-04-27 10:01:39 +00:00
Doug Parker
b5dd22663d docs: release notes for the v16.0.0-rc.2 release 2023-04-27 11:59:00 +02:00