2529 Commits

Author SHA1 Message Date
Charles Lyding
e402c2358c build: adjust BUILD file external comment markers
Improvements to the syncing process allow for reduced usage of the comment markers.
2022-08-31 08:37:19 -04:00
Alan Agius
9aab9ad54d fix(@angular-devkit/build-angular): issue warning when using deprecated tilde imports
With this change we add a warning when using deprecated tilde/`~` imports.
2022-08-30 12:26:14 -04:00
Angular Robot
56b3299f12 build: update all non-major dependencies 2022-08-30 08:54:10 -04:00
Alan Agius
f155f59361 build: update ng-packagr to 15.0.0-next.0
This version supports Angular 15.
2022-08-30 08:53:41 -04:00
Alan Agius
2300be6a41 build: update dependencies to Angular 15.0.0-next 2022-08-30 08:53:41 -04:00
Charles Lyding
504e9678ed Revert "test: enable rbe on all unit tests"
This reverts commit 1193886df5e8110de20ba534e2b4572da72b5e4a.
2022-08-29 13:58:19 -04:00
Jason Bedard
1193886df5 test: enable rbe on all unit tests 2022-08-29 08:19:46 -04:00
Angular Robot
ea5edbebb5 build: update all non-major dependencies 2022-08-29 08:18:24 -04:00
Charles Lyding
d50d09f98d fix(@angular-devkit/build-angular): allow esbuild-based builder to use SVG Angular templates
The experimental esbuild-based browser application builder will now consider SVG files as
Angular component templates. Previously, only HTML files were considered templates and this
resulted in the esbuild-based builder to try to process the SVG file as a stylesheet.
2022-08-29 08:17:47 -04:00
Alan Agius
1c042f38a6 refactor(@angular-devkit/build-angular): remove deprecated usage of canParse
All parsers now implement `parser.analyze`.
2022-08-29 08:17:31 -04:00
Charles Lyding
2b34935727 refactor(@angular-devkit/build-angular): reorganize esbuild builder setup steps
This contains several minor adjustments to the setup steps for the experimental
esbuild-based browser application builder. It better groups the output directory
deletion and creation steps as well as moves entry point normalization into the
normalize options helper function. This should reduce the size of the main
execution function as well as aid in future profiling of the build phases.
2022-08-29 08:15:49 -04:00
Charles Lyding
b647d8069f fix(@angular-devkit/build-angular): correct esbuild builder global stylesheet sourcemap URL
The sourcemap URL in the output CSS files for global stylesheets is now correctly updated to
reflect the name of the global stylesheet output file and not the internal `stdin` virtual
file name.
2022-08-25 10:18:08 -07:00
Charles Lyding
87a61aac36 perf(@angular-devkit/build-angular): with esbuild builder only load Sass compiler when needed
Previously, the Sass compiler was imported on the start of every build regardless of its usage.
The Sass compiler will now only be loaded if a Sass stylesheet is requested.
2022-08-23 12:31:52 -07:00
Charles Lyding
a910ae992c perf(@angular-devkit/build-angular): avoid extra string creation with no sourcemaps for esbuild sass
When using the experimental esbuild-based browser application builder with Sass stylesheets, an
additional string creation for each output stylesheet will now be avoided when sourcemaps are disabled.
2022-08-23 12:31:52 -07:00
Charles Lyding
823852d8c2 refactor(@angular-devkit/build-angular): process esbuild builder global stylesheets and code at the same time
The global stylesheet processing using esbuild and the code bundling that also uses esbuild are now executed
asynchronously. Previously, the global stylesheet processing was required to wait until the code bundling was
complete before starting. Any warnings and/or errors for global stylesheets will also now be shown even if there
are errors during code bundling.
2022-08-23 12:31:14 -07:00
Charles Lyding
4f4f9c9063 refactor(@angular-devkit/build-angular): move esbuild builder global stylesheet bundling into separate function
The global stylesheet bundling and processing code has been moved out of the main builder execution function
and into a separate function. This shortens the length of the main execution function for the builder and also
allows for further refactoring to allow the code and global stylesheet bundling to be executed at the same time.
2022-08-23 12:31:14 -07:00
Alan Agius
147f8c3ebb fix(@angular-devkit/build-angular): correctly handle parenthesis in url
PR #23691 introduced a regression that caused paranthesis in url not to be handled correctly.

This change correct this behaviour and adds a test case to valid this.

Closes #23773
2022-08-22 16:01:14 -07:00
Kristiyan Kostadinov
48dec89e91 build: update to TypeScript 4.8 RC
Updates to the TypeScript 4.8 RC and adds some code to account for a breaking change where the decorators and modifiers of an AST node have been combined into a single array.
2022-08-22 15:28:47 -06:00
Angular Robot
3651209e95 build: update all non-major dependencies 2022-08-17 10:35:20 +02:00
Angular Robot
b5cb05fce7 build: update all non-major dependencies 2022-08-16 18:56:01 +02:00
Angular Robot
ba41c177d5 build: update all non-major dependencies 2022-08-15 14:30:00 +02:00
Alan Agius
4368c85983 refactor: remove unused local variables 2022-08-12 08:19:26 -04:00
Alan Agius
78cacc30e5 refactor(@angular-devkit/build-angular): remove workaround for handle options requests
The upstream fix https://github.com/webpack/webpack-dev-server/issues/4180 has been merged and released as part of `webpack-dev-server` version `4.10.0`
2022-08-11 09:40:42 -04:00
Angular Robot
45e67491f3 build: update all non-major dependencies 2022-08-11 07:18:55 -04:00
Charles Lyding
50c783307e fix(@angular-devkit/build-angular): use valid CSS comment for sourcemaps with Sass in esbuild builder
CSS does not support the single line JS comment (`//`) but rather only the multi-line comment (`/* */`).
When generating the sourcemap URL comment with the modern Sass API, the multi-line comment syntax will
now be used. This removes the esbuild warnings per Sass file that would have otherwise been generated
when stylesheet sourcemaps are enabled for the build.
2022-08-11 07:17:41 -04:00
Alan Agius
7de9b470cb fix(@angular-devkit/build-angular): avoid collect stats from chunks with no files
This commit updates to bundle stats logic to skip checking chunks with no files.

Closes #23717
2022-08-10 09:55:19 -04:00
Angular Robot
a5f3ab41e4 build: update all non-major dependencies 2022-08-10 07:20:52 -04:00
Charles Lyding
f474bf532f fix(@angular-devkit/build-angular): process stylesheet resources from url tokens with esbuild browser builder
Stylesheet url tokens (`url(....)`) will now be processed when using the esbuild-based experimental browser
application builder. The paths will be resolved via the bundler's resolution system and then loaded
via the bundler's `file` loader. The functionality is implemented using an esbuild plugin to allow for all
file types to be supported without the need to manually specify each current and future file extension within
the build configuration.
The `externalDependencies` option also applies to the referenced resources. This allows for resource paths
specified with the option to remain unprocessed within the application output. This is useful if the relative
path for the resource does not exist on disk but will be available when the application is deployed.
2022-08-09 09:42:58 -04:00
Angular Robot
2dbc55e665 build: update all non-major dependencies 2022-08-08 12:15:49 -04:00
Angular Robot
36b68a5195 build: update all non-major dependencies 2022-08-05 16:47:36 -07:00
Alan Agius
3fb569b5c8 feat(@angular-devkit/build-angular): switch to Sass modern API in esbuild builder
With this change we replace Sass legacy with the modern API in the experimental esbuilder. The goal is that in the next major version this change is propagated to the Webpack builder.

Based on the benchmarks that we did Sass modern API is faster compared to the legacy version.
2022-08-05 10:56:41 -07:00
Alan Agius
6258153d01 build: update all non-major dependencies
(cherry picked from commit db047b22e31ee196792636ee3349e3033ded0f49)
2022-08-04 11:27:22 -07:00
Alan Agius
44c25511ea feat(@angular-devkit/build-angular): add ability to serve service worker when using dev-server
With this change we add the ability for the dev-server to serve service workers when configured in the browser builder.

Closes #9869
2022-08-04 11:26:30 -07:00
Charles Lyding
3e3dc6962d perf(@angular-devkit/build-angular): reduce babel transformation in esbuild builder
When using the experimental esbuild-based browser application builder, babel transformation
is now only performed on a file if the file requires the specific transformations enabled
for the build. This has the benefit of removing the need to parse and process files that
will not be affected by the enabled transformations.
From initial testing, this provides a 30% build time improvement for development builds of a
newly generated application and a 10% improvement for production builds.
2022-08-04 11:26:15 -07:00
Charles Lyding
8f9cee351e perf(@angular-devkit/build-angular): use esbuild in esbuild builder to downlevel native async/await
esbuild now allows specifying whether individual JavaScript features should be supported in addition
to specifying the target JavaScript version for the output. This capability is now used to provide
the native async/await downleveling that is required by Zone.js when using the experimental esbuild-
based browser application builder. Since esbuild does not yet support downleveling async iteration
or async generators, Babel is still used when either of these syntax features are detected.
2022-08-04 11:26:15 -07:00
Alan Agius
70bc35456a fix(@angular-devkit/build-angular): correctly handle data URIs with escaped quotes in stylesheets
Previously, the RegExp didn't correctly handle cases where data URIs had escaped quotes like the below

```css
url("data:image/svg+xml;charset=utf-8,<svg width=/"16/" height=/"15/"></svg>")
```

Closes #23680
2022-08-04 11:25:25 -07:00
Angular Robot
afdb266ad1 build: update all non-major dependencies 2022-08-03 10:34:50 -07:00
Jason Bedard
db5c1fc13c test: run tests on multiple node versions 2022-08-03 10:33:46 -07:00
Alan Agius
173823d772 build: remove dependency on font-awesome
This dependency is only used to valid that node packages are resolved correctly.

With this change we mock the structure of font-awesome to avoid having to install it.
2022-08-03 09:20:29 -07:00
Angular Robot
091ff403dd build: update all non-major dependencies 2022-08-02 09:49:56 -07:00
Alan Agius
b4a1b0f104 fix(@angular-devkit/build-angular): correctly respond to preflight requests
With this commit, we add a middleware that handles preflight requests as currently responses for this type of requests returning 404.

This is a temporary workaround until this issue is fixed upstream. See: https://github.com/webpack/webpack-dev-server/issues/4180

Closes #23639
2022-08-02 09:47:52 -07:00
Alan Agius
cdbb48f7b2 test(@angular-devkit/build-angular): re-write live-reload tests to use new test harness.
With this change we replace the live-reload proxy tests to use the new test harness. This is an effort to reduce the flakiness of these tests.
2022-08-01 11:19:48 -07:00
Angular Robot
f57cb7580d build: update all non-major dependencies to v0.14.51 2022-07-29 12:27:33 +02:00
Jason Bedard
35c43577d5
test: use random e2e test ports (#23541)
* test: use random e2e test ports

* test: use random ng serve ports
2022-07-28 19:23:42 +02:00
Alan Agius
8fd3e9fb3c fix(@angular-devkit/build-angular): catch clause variable is not an Error instance
Errors thrown in RxJs are not instanceof Error and therefore the check will always fail.

Closes #23631
2022-07-28 09:46:53 +02:00
Paul Gschwendtner
087ab46ca9 build: update dev-infra packages and account for build-tooling split from ng-dev
The dev-infra build tooling is now decoupled from `ng-dev`. This will
make it easier to update `ng-dev` without necessarily needing to upgrade
the whole build system, Bazel etc. This is useful when e.g. new release
tool features have been added and should also be ported to active LTS
branches.
2022-07-27 12:35:15 +02:00
Angular Robot
d55eada6c2 build: update all non-major dependencies 2022-07-25 16:33:08 +02:00
Alan Agius
aa83feb373 fix(@angular-devkit/build-angular): correctly set ngDevMode in esbuilder
During development we should not set `ngDevMode` to `true`, as this is expected to be an object literal.

Closes #23627
2022-07-22 12:48:39 -04:00
Alan Agius
c2c4cac13c test(@angular-devkit/build-angular): remove invalid project extensions from test projects
This causes logs to be printed during test runs.
2022-07-22 12:48:25 -04:00
Charles Lyding
6a142a22f8 fix(@angular-devkit/build-angular): allow the esbuild-based builder to fully resolve global stylesheet packages
The esbuild-based experimental builder will now leverage the bundler to perform resolution of CSS imports.
This allows for more comprehensive resolution including packages which use the `sass` and/or `style` custom
conditions within a `package.json` exports field.
2022-07-22 10:45:31 -04:00