2856 Commits

Author SHA1 Message Date
Renovate Bot
47dd77d928 build: update all non-major dependencies 2021-09-23 06:56:26 -04:00
Charles Lyding
9b207bddac refactor(@angular-devkit/build-angular): support ESM @angular/service-worker usage
With the Angular CLI currently being a CommonJS package, this change uses a dynamic import to load `@angular/service-worker/config` which may be ESM. CommonJS code can load ESM code via a dynamic import. Unfortunately, TypeScript will currently, unconditionally downlevel dynamic import into a require call. require calls cannot load ESM code and will result in a runtime error. To workaround this, a Function constructor is used to prevent TypeScript from changing the dynamic import. Once TypeScript provides support for keeping the dynamic import this workaround can be dropped and replaced with a standard dynamic import.
2021-09-23 06:52:06 -04:00
Charles Lyding
77561e796a refactor(@angular-devkit/build-angular): support ESM @angular/compiler-cli linker usage
This is a followup PR for #21771 that addresses partial compilation linker usage.
With the Angular CLI currently being a CommonJS package, this change uses a dynamic import to load `@angular/compiler-cli/linker[/babel]` which may be ESM. CommonJS code can load ESM code via a dynamic import. Unfortunately, TypeScript will currently, unconditionally downlevel dynamic import into a require call. require calls cannot load ESM code and will result in a runtime error. To workaround this, a Function constructor is used to prevent TypeScript from changing the dynamic import. Once TypeScript provides support for keeping the dynamic import this workaround can be dropped and replaced with a standard dynamic import.
2021-09-23 06:52:06 -04:00
Charles Lyding
0d76bf04bc fix(@angular-devkit/build-angular): support WASM-based esbuild optimizer fallback
In the event that the Angular CLI is executed on a platform that does not yet have native support for esbuild, the WASM-based variant of esbuild will now be used. If the first attempt to optimize a file fails to execute the native variant of esbuild, future executions will instead use the WASM-based variant instead which will execute regardless of the native platform. The WASM-based variant, unfortunately, can be significantly slower than the native version (some cases can be several times slower). For install time concerns regarding the esbuild post-install step, esbuild is now listed as an optional dependency which will allow the post-install step to fail but allow the full npm install to pass. This install scenario should only occur in the event that the esbuild native binary cannot be installed or is otherwise unavailable.
2021-09-22 16:09:57 +02:00
Renovate Bot
3a7e8505d3 build: update all non-major dependencies 2021-09-22 11:22:42 +02:00
Alan Agius
9efcb32e37 fix(@angular-devkit/build-webpack): better handle concurrent dev-servers
Webpack-dev-server doesn't handle concurrency very well. When using port 0, and 2 processes start at the same time, they end up being given the same port. The main reason for the issue is that it find a free port, put only uses at a later stage.
2021-09-21 16:07:30 +02:00
Renovate Bot
13b9f7f45a build: update all non-major dependencies 2021-09-21 10:04:37 +02:00
Charles Lyding
3e6324f7c7 refactor(@angular-devkit/build-angular): support an ESM-only @angular/compiler-cli package
This uses a dynamic import to load `@angular/compiler-cli` which may be ESM. CommonJS code can load ESM code via a dynamic import. Unfortunately, TypeScript will currently, unconditionally downlevel dynamic import into a require call. require calls cannot load ESM code and will result in a runtime error. To workaround this, a Function constructor is used to prevent TypeScript from changing the dynamic import. Once TypeScript provides support for keeping the dynamic import this workaround can be dropped and replaced with a standard dynamic import.
2021-09-20 10:31:59 +02:00
Charles Lyding
b87771061c refactor(@angular-devkit/build-angular): support async partial Webpack configuration generators
Partial Webpack configuration generators are used to create the various aspects of the final Webpack configuration for build, testing, and serving. They previously could only be synchronous but may need to perform asynchronous actions to setup the Webpack configuration in the future. This is particularly relevant as the CLI transitions from CommonJS to ESM wherein synchronous require calls need to be replaced with asynchronous dynamic imports. For dynamic imports to be successfully used the configuration generators need to support asynchronous operations.
2021-09-20 10:31:59 +02:00
Charles Lyding
19eb5cb425 refactor(@angular-devkit/build-angular): use type imports for @angular/compiler-cli peer dependency
The `@angular/compiler-cli` is used as a peer dependency and has the potential to not be present. As a result static imports should only be used for types and value imports should be dynamic so that they can be guarded in the event of package absence. There are still several instances of static imports for values but these will be corrected in follow-ups.
2021-09-20 10:31:59 +02:00
Renovate Bot
d8554de60b build: update dependency core-js to v3.18.0 2021-09-20 10:28:10 +02:00
Renovate Bot
d1e28b4f1e build: update all non-major dependencies 2021-09-19 09:02:53 +02:00
Renovate Bot
ed376fe02e build: update all non-major dependencies 2021-09-17 19:57:23 +02:00
Renovate Bot
504f47fd74 build: update all non-major dependencies 2021-09-16 09:19:36 +02:00
Renovate Bot
3f31a6757f build: update all non-major dependencies 2021-09-14 09:05:32 +01:00
Charles Lyding
590c156642 fix(@angular-devkit/build-angular): add web-streams-polyfill to downlevel exclusion list
Polyfill related packages should not be downlevelled due to the nature of their code which may need to perform feature testing or leverage native capabilities to extract browser support information necessary to properly polyfill a given browser. In the case of `web-streams-polyfill`, it leverages the `%AsyncIteratorPrototype%`, when available, to fully polyfill its stream implementations.  To access `%AsyncIteratorPrototype%`, a native async generator is needed and therefore the code present in the package cannot have this case of a native async generator downlevelled. `core-js` is also excluded for similar (and additional reasons).
2021-09-14 09:03:28 +01:00
Alan Agius
df8f909d80 fix(@angular-devkit/build-angular): handle FORCE_COLOR when stdout is not instance of WriteStream
In some cases, custom implementation of stdout, don't extend `WriteStream` which causes colors not to be included in the output.

Closes #21732
2021-09-14 09:00:24 +01:00
Renovate Bot
be81752905 build: update all non-major dependencies 2021-09-08 10:19:14 +02:00
Charles Lyding
decb1d14b0 fix(@angular-devkit/build-angular): improve Safari browserslist to esbuild target conversion
The browser targets provided by `browserslist` have several differences than what `esbuild` expects for the Safari browsers. The first is that the iOS Safari is named `ios_saf` within browserslist and `ios` by esbuild. The former is now converted to the later when generating the target list for esbuild.  The second difference is that `browserslist` supports a `TP` (Technology Preview) version for Safari but esbuild expects a numeric value for all versions. Since a TP version of Safari is assumed to be the latest unreleased version and as a result supports all currently known features, a high version number (999) is used as a replacement when generating the target list for esbuild.
2021-09-07 17:52:43 +02:00
Renovate Bot
b78400aa18 build: update dependency @babel/core to v7.15.5 2021-09-04 13:58:06 +02:00
Renovate Bot
40ebaa035e build: update all non-major dependencies 2021-09-04 10:27:31 +02:00
Renovate Bot
7ab1cf3b29 build: update all non-major dependencies 2021-09-03 10:34:02 +02:00
Renovate Bot
7550ecbaf6 build: update all non-major dependencies 2021-09-02 18:25:48 +02:00
Alan Agius
c13cc888d0 build: update ng-packagr to version 13.0.0-next.1 2021-09-02 17:54:09 +02:00
Renovate Bot
93957e5e59 build: update all non-major dependencies 2021-09-01 07:45:33 +02:00
Renovate Bot
588285c386 build: update all non-major dependencies 2021-08-31 08:33:31 +02:00
Renovate Bot
f082868239 build: update dependency esbuild to v0.12.24 2021-08-28 08:30:23 +02:00
Alan Agius
76d6d8826f fix(@angular-devkit/build-angular): set browserslist defaults
By default, browserslist defaults are too inclusive: 83764ea81f/index.js (L516-L522)

We change the default query to browsers that Angular support: https://angular.io/guide/browser-support
2021-08-27 15:57:57 +02:00
Alan Agius
32dbf659ac feat(@angular-devkit/build-angular): update webpack-dev-server to version 4
BREAKING CHANGE:

The dev-server now uses WebSockets to communicate changes to the browser during HMR and live-reloaded. If during your development you are using a proxy you will need to enable proxying of WebSockets.
2021-08-27 15:40:10 +02:00
Alan Agius
a0b5897d50 feat(@angular-devkit/build-webpack): update webpack-dev-server to version 4
BREAKING CHANGE:

Support for `webpack-dev-server` version 3 has been removed. For more information about the migration please see: https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md

Note: this change only affects users depending on `@angular-devkit/build-webpack` directly.
2021-08-27 15:40:10 +02:00
Renovate Bot
4b323b139e build: update dependency cacache to v15.3.0 2021-08-27 07:15:52 +02:00
Renovate Bot
c0dfbfecdc build: update all non-major dependencies 2021-08-26 07:31:06 +02:00
Charles Lyding
a7de97e485 build: add Bazel ts_library rule package_name properties to all packages
rules_nodejs 4 requires that a package_name property be specified within a ts_library rule for the output to be linked into the package repository. Failing to add the property can cause test failures due to unresolved packages.
2021-08-26 07:30:44 +02:00
Alan Agius
9a46ba562a build: update dependency webpack-subresource-integrity to v5 2021-08-26 07:30:34 +02:00
Renovate Bot
ab3db39472 build: update all non-major dependencies 2021-08-24 10:51:32 +01:00
Charles Lyding
51f89d633f test: enable no-useless-escape lint rule
The `no-useless-escape` eslint rule has now been enabled which removes unneeded characters and complexity from string literals and regular expressions. All files that were in violation of this rule have also been corrected.
2021-08-24 10:51:14 +01:00
Renovate Bot
9e71069610 build: update all non-major dependencies 2021-08-23 11:07:13 +01:00
Alan Agius
961218aae7 refactor(@angular-devkit/build-angular): remove differential loading stats generation
This is no longer needed size differential loading was removed.
2021-08-23 11:05:53 +01:00
Renovate Bot
a6f8d33637 build: update all non-major dependencies 2021-08-20 10:05:13 +01:00
Lukas Spirig
0565ed62eb feat(@angular-devkit/schematics): add UpdateBuffer2 based on magic-string
This PR adds UpdateBuffer2 which should eventually
replace UpdateBuffer. UpdateBuffer2 internally uses
the magic-string library.
UpdateBuffer and related symbols have been marked
as deprecated.

Closes #21110
2021-08-20 10:04:33 +01:00
Renovate Bot
6be902ac83 build: update dependency core-js to v3.16.2 2021-08-18 12:00:15 -04:00
Alan Agius
aba54ae783 fix(@angular-devkit/build-angular): provide supported browsers to esbuild
With this change we provide the list of supported browsers to Esbuild during CSS optimizations, so it can perform optimizations based on the browser support needed.

Closes #21594
2021-08-18 10:14:39 -04:00
Renovate Bot
5326b49488 build: update all non-major dependencies 2021-08-17 10:09:45 -04:00
Renovate Bot
7f7d699c46 build: update dependency ajv-formats to v2.1.1 2021-08-16 12:22:47 -04:00
Alan Agius
69b972fe6d refactor(@angular-devkit/schematics): replace usage of deprecated JSON parser with jsonc-parser 2021-08-16 10:01:04 -04:00
Alan Agius
bb5760c0ab refactor(@angular-devkit/schematics-cli): remove usage of removed json parser 2021-08-16 10:01:04 -04:00
Alan Agius
d722fdf1f6 refactor(@angular-devkit/core): remove deprecated JSON parser
BREAKING CHANGE: The deprecated JSON parser has been removed from public API. [jsonc-parser](https://www.npmjs.com/package/jsonc-parser) should be used instead.
2021-08-16 10:01:04 -04:00
Simon Primetzhofer
9eb599da2b fix(@angular-devkit/build-angular): handle undefined entrypoints when marking async chunks
When using custom builders, it is possible to remove entries from the webpack-configuration
manually. This may eventually lead to undefined entryPoints in async-chunks.ts and aborts
the compilation.
2021-08-13 16:15:12 -04:00
Renovate Bot
f4874d5545 build: update all non-major dependencies 2021-08-13 16:13:31 -04:00
Renovate Bot
dd4e774655 build: update dependency tslib to v2.3.1 2021-08-12 06:41:34 -04:00