10482 Commits

Author SHA1 Message Date
Charles Lyding
c032162063 build: remove unused internal benchmarking tool
This benchmarking tool is unpublished and not used within the repository.
It is also largely unmaintained outside of periodic dependency updates.
2023-05-23 10:34:01 -04:00
Angular Robot
777b0bb228 build: lock file maintenance 2023-05-22 11:13:22 -04:00
Charles Lyding
c349b4cdbb ci: add initial Github Action lint workflow
The eslint CI action has now been moved to a Github Action.
The check also now adds annotations to PRs when eslint generates an error
or warning. The eslint cache is now saved and reused which provides improved
runtimes for the CI action.
2023-05-22 11:12:35 -04:00
Angular Robot
77336f7bcc build: update all non-major dependencies 2023-05-22 09:38:14 -04:00
Alan Agius
6a4ce53857 refactor: disable Webpack topLevelAwait
Webpack enabled top level await by default in version 5.83.0. (See: https://github.com/webpack/webpack/releases/tag/v5.83.0)

This commit restores the previous behaviour, as top level await is not supported due to Zone.js issues.
2023-05-22 09:37:09 -04:00
Charles Lyding
11e0a51b17 build: minor cleanup of bazel build rules
BUILD files for each package have had outdated glob excludes removed.
Additionally, some src args have been reduced to a single file where possible.
The root bazel ignore file has also been expanded to include all node module
directories in each package. The ignore file does not appear to currently support
globs so each path has been individually specified.
2023-05-22 09:36:44 -04:00
Alan Agius
b628cff77b build: update all non-major dependencies
(cherry picked from commit 1afbec1e36708737b6ae75277e0649d0e334d1b2)
2023-05-19 17:14:01 +02:00
Charles Lyding
8336ad80da perf(@angular-devkit/build-angular): enable in-memory load result caching for stylesheets in esbuild builder
The stylesheet related plugins for the esbuild-based browser application builder will now cache intermediate
load results when in watch mode. This reduces the potential amount of processing needed during a rebuild for
both `ng build --watch` and `ng serve`.
2023-05-19 12:18:03 +02:00
Charles Lyding
ffea33fc45 refactor(@angular-devkit/build-angular): use helper to setup esbuild plugin load caching
Within the esbuild-based browser application builder, a helper function has been introduced
to streamline the use of the load result cache within the internal plugins. This removes
repeat code that would otherwise be needed. The ability to use a load result cache with the
global script processing has also been added but has not yet been enabled.
2023-05-19 12:18:03 +02:00
Charles Lyding
4c82bb8e81 fix(@angular-devkit/build-angular): percent encode asset URLs in development server for esbuild
When using the esbuild-based browser application builder with the development server, configured
application assets are served directly from disk. The URLs passed to Vite are now percent encoded
to properly handle asset paths that may contain unsupported URL characters.
2023-05-19 10:29:40 +02:00
Angular Robot
a64911783b build: update angular 2023-05-19 10:28:25 +02:00
Angular Robot
541b291cfb build: update dependency tslib to v2.5.2 2023-05-19 10:28:15 +02:00
Charles Lyding
f1e4ed84e2 build: remove unneeded package resolutions
The package resolutions for `ajv` and `parse5` are no longer needed with the latest package versions.
2023-05-19 10:27:50 +02:00
Alan Agius
77f21c1ba1 build: update @types/node to 16.11.7
Node.js 14 is no longer supported.
2023-05-17 16:35:01 +02:00
Alan Agius
78547f6b01 release: cut the v16.1.0-next.0 release 16.1.0-next.0 2023-05-17 15:42:15 +02:00
Alan Agius
e2792f69bb build: update Angular deps to 16.1.0-next.0
This commits updates Angular packages to 16.1.0-next.0
2023-05-17 15:25:00 +02:00
Alan Agius
3b8b5c4a49 docs: release notes for the v16.0.2 release 2023-05-17 14:30:10 +02:00
Angular Robot
cbadb8080f build: update all non-major dependencies 2023-05-17 12:06:49 +00:00
Angular Robot
86e5e520b0 build: update angular 2023-05-16 12:33:40 +00:00
Angular Robot
63f7199a5d build: update all non-major dependencies 2023-05-16 12:33:12 +00:00
Charles Lyding
2d141fe3bc feat(@angular-devkit/build-angular): show estimated transfer size with esbuild builder
When using the esbuild-based browser application builder, the console build stats output
will now show the estimated transfer size of JavaScript and CSS files when optimizations
are enabled. This provides similar behavior to the default Webpack-based builder.
2023-05-16 12:32:56 +00:00
Angular Robot
c2bc6ffc88 build: update all non-major dependencies to v0.17.19 2023-05-15 12:51:20 +00:00
Charles Lyding
141d74d190 fix(@angular-devkit/build-angular): attempt relative global script read first in esbuild builder
When using a global script (`scripts` option) with the esbuild-based browser application builder,
an attempt to read the script as a relative path from the workspace root will be performed first.
This avoids the need to perform a potentially expensive module resolution attempt for files that
are directly available and also ensures the relative paths are given priority over any potential
modules with the same name. This matches prior behavior that also preferred relative paths.
2023-05-15 12:50:59 +00:00
Charles Lyding
ac95732df6 perf(@angular-devkit/build-angular): minor sourcemap ignorelist improvements for esbuild builder
This provides a minor performance benefit for the generation of the Chrome sourcemap ignorelist
generation. Memory is shared were possible and string searching is reduced in certain cases.
2023-05-15 12:50:36 +00:00
Charles Lyding
a9c6b449f6 fix(@angular-devkit/build-angular): normalize Vite dev-server Windows asset paths
When using the esbuild-based browser application builder with the Vite-based development
server on Windows, source asset paths were previously not normalized prior to being included
in request URLs. This could result in invalid asset request URLs due to invalid path
segment separators.
2023-05-15 12:49:28 +00:00
Angular Robot
419cc8282e build: update all non-major dependencies 2023-05-12 15:56:22 -04:00
Charles Lyding
d1f075e732 fix(@angular-devkit/build-angular): correctly generate serviceworker hashes for binary assets
When using the esbuild-based build system with the service worker enabled, binary assets were
unintentionally being hashed with the assumption of UTF-8 encoding. The assets are now hashed
directly to ensure correct output hashes.
2023-05-12 15:41:21 -04:00
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