2829 Commits

Author SHA1 Message Date
Renovate Bot
fc78658cb5 build: update all non-major dependencies 2021-07-08 11:30:46 -04:00
Charles Lyding
6eca86b817 refactor(@angular-devkit/build-angular): replace raw-loader with Webpack 5 asset modules
With Webpack 5, the `raw-loader` is no longer needed and its functionality is provided via configuration options within the Webpack configuration via asset modules.  Asset modules (https://webpack.js.org/guides/asset-modules/) provide a built-in way to provide `raw-loader`, `url-loader`, and `file-loader` functionality without additional dependencies.
2021-07-07 15:51:19 -04:00
Renovate Bot
7ee3a80eaf build: update all non-major dependencies 2021-07-07 11:17:09 -04:00
Alan Agius
20fd33f6d4 feat(@schematics/angular): destroy test module after every test
In version 12.1, the framework added the `destroyAfterEach` an opt-in feature that improves tests performance and also addresses two long-standing issues.

The idea, is to have this enabled by default in the future.  Related PR: https://github.com/angular/angular/pull/42566

Closes #21280
2021-07-07 10:31:20 -04:00
Charles Lyding
beb78ef79e refactor(@angular-devkit/build-angular): use Webpack provided watcher typings instead of custom
Webpack 5 now provides type definitions for the majority of the watch subsystem. These type definitions allow the removal of the custom types that were previously used.
2021-07-07 09:24:09 -04:00
Alan Agius
a5c69722ff fix(@angular-devkit/build-angular): ensure NG_PERSISTENT_BUILD_CACHE always creates a cache in the specified cache directory
This change fixes `NG_PERSISTENT_BUILD_CACHE` sometimes creating cache
entries that live outside of the cache directory by using a hex encoding
rather than a base64 encoding. This error is caused because the base64
alphabet includes `/`. According to the webpack documentation [1] the
default `cacheLocation` is:

  path.resolve(cache.cacheDirectory, cache.name)

Which means cache names with a leading `/` would remove the
`cacheDirectory` altogether.

[1]: https://webpack.js.org/configuration/other-options/#cachecachelocation
2021-07-06 11:38:12 -04:00
Alan Agius
07763702fd fix(@angular-devkit/build-angular): force linker sourceMapping option to false.
This is an interim solution until https://github.com/angular/angular/issues/42769 is fixed.

Closes #21271
2021-07-06 11:37:52 -04:00
Alan Agius
32050cabe5 Revert "fix(@angular-devkit/build-angular): control linker template sourcemapping via builder sourcemap options"
This reverts commit d4c5f8518d4801b9fd76de289a015dcbb8d8f69b.

Following a debugging and investigation with @petebacondarwin it appears that when the external template handling in the linker generates Babel AST nodes that reference the external template files which breaks Babel when it tried to flatten final source-map, which ends up no emitting any source-maps.

As an interim solution we should revert this.

Closes #21271
2021-07-06 11:37:52 -04:00
Alan Agius
1f6a5519fb test(@angular-devkit/build-angular): modify RegExp to handle output of mini-css-extract-plugin v2.1+ 2021-07-06 10:21:28 -04:00
Renovate Bot
2bd859e6d5 build: update all non-major dependencies 2021-07-06 10:21:28 -04:00
Charles Lyding
34e66ff4d2 refactor(@angular-devkit/build-angular): use Webpack provided loader types
Webpack now provides loader function type definitions. These type definitions are now used in custom loaders within the package.
This improves type safety and behavior correctness of the loaders when used with Webpack.
2021-07-02 15:44:39 -04:00
Alan Agius
8383c6b421 fix(@angular-devkit/build-angular): silence Sass compiler warnings from 3rd party stylesheets
With this change we enable `quietDeps`, which causes the Sass compiler not to emit warnings from a stylesheet that is loaded through load-path.

The `--verbose` option can be used to opt-out from this behaviour and display all warnings.

Closes #21235
2021-07-02 11:55:56 -04:00
Charles Lyding
3c2fb5c9c1 refactor(@angular-devkit/build-angular): avoid loading Webpack for differential loading sourcemaps
The `@ampproject/remapping` package is now used for source map processing instead of Webpack for differential loading and i18n processing. This dependency is already used within the recently added JavaScript optimizer refactoring and reduces the amount of code that needs to be loaded into each worker to support differential loading sourcemaps.
2021-07-02 11:54:24 -04:00
Renovate Bot
356f25a1dd build: update all non-major dependencies 2021-07-02 11:49:49 -04:00
Charles Lyding
9afe185fc6 build: enable noImplicitOverride TypeScript option
The `noImplicitOverride` TypeScript option improves code quality by ensuring that properties from base classes are not accidentally overriden.
Reference: https://www.typescriptlang.org/tsconfig#noImplicitOverride
2021-07-02 06:40:36 -04:00
Alan Agius
212939d6a3 Revert "refactor: disable esbuild worker threads"
This reverts commit 47a1ccc50729ad25e4fa4e38704c8dbd3b1737f7.
2021-07-01 13:29:22 +02:00
Renovate Bot
7091295a83 build: update dependency mini-css-extract-plugin to v2 2021-07-01 12:23:38 +02:00
Renovate Bot
42d4775016 build: update dependency typescript to v4.3.5 2021-07-01 11:05:58 +02:00
Renovate Bot
7ede2c9d80 build: update dependency esbuild to v0.12.13 2021-07-01 10:02:48 +02:00
Alan Agius
070a133647 fix(@angular-devkit/build-angular): configure webpack target in common configuration
Previously, `target` was unset for `test` which caused the target to be set incorrectly.

Closes #21239
2021-06-30 19:26:36 +02:00
Alan Agius
6a2b11906e perf(@angular-devkit/build-angular): cache JavaScriptOptimizerPlugin results
With this change we cache JavaScriptOptimizerPlugin results in memory or on the file system based on the caching strategy used.
2021-06-30 17:41:01 +02:00
Alan Agius
41e6457921 fix(@angular-devkit/build-angular): downlevel for await...of when targetting ES2018+
Closes #21196
2021-06-30 16:28:57 +02:00
Renovate Bot
398f56d545 build: update all non-major dependencies 2021-06-30 11:45:41 +02:00
Renovate Bot
73a0a04c24 build: update all non-major dependencies 2021-06-29 08:46:19 +02:00
Alan Agius
18cfa04317 feat(@angular-devkit/build-angular): add support to inline Adobe Fonts
With this change we add support to inline external Adobe fonts into the index html, we also add a `preconnect` hint which helps improve page load speed.

Closes #21186
2021-06-28 20:22:29 +02:00
Alan Agius
47a1ccc507 refactor: disable esbuild worker threads
This is a workaround for `TypeError [Error]: Cannot read property 'workerPort' of undefined`.
2021-06-28 17:57:57 +02:00
Renovate Bot
f69e4f3cc9 build: update all non-major dependencies 2021-06-28 17:57:57 +02:00
Alan Agius
9a751f0f81 fix(@angular-devkit/build-angular): handle ENOENT and ENOTDIR errors when deleting outputs
Closes #21202
2021-06-28 17:15:19 +02:00
Charles Lyding
fd4ae0fb16 refactor(@angular-devkit/build-angular): lazy load Webpack in differential loading processor
Webpack is a large dependency with a large dependency graph. By only loading Webpack when needed in the differential loading and i18n processors, initial startup time can be improved and memory usage can be reduced.
2021-06-28 14:42:12 +02:00
Charles Lyding
e49079d971 refactor(@angular-devkit/build-angular): remove jest-worker direct dependency
The worker pool for differential loading and i18n processing is now managed by the `piscina` dependency. This dependency is already used within the recently added JavaScript optimizer refactoring and reduces both the number of direct dependencies and amount of code to setup the worker pools.
2021-06-28 14:42:12 +02:00
Renovate Bot
ada64401d0 build: update all non-major dependencies 2021-06-27 16:02:14 +02:00
Renovate Bot
7d2f09875a build: update dependency style-loader to v3 2021-06-25 10:18:22 +02:00
Renovate Bot
82fbb993b3 build: update dependency esbuild to v0.12.9 2021-06-25 08:45:04 +02:00
Alan Agius
05a52c8c59 refactor: clean up remove unused code 2021-06-25 07:46:22 +02:00
Alan Agius
ebf3fab921 build: update eslint-plugin-import to 2.23.4 2021-06-25 07:46:12 +02:00
Alan Agius
6a9c7ffd97 ci: increase shards for karma tests
This should help to reduce heap out of memory errors during Karma tests.
2021-06-25 07:45:37 +02:00
Charles Lyding
da32daa75d perf(@angular-devkit/build-angular): use combination of esbuild and terser as a JavaScript optimizer
The javascript optimization pipeline is now a two-phase process.  `esbuild` is used in the first phase to remove the majority of the unused code and shorten identifiers in each output bundle script.  `esbuild` can accomplish this in a fraction of the time that `terser` previously required.  However, `esbuild` does not yet implement all of the optimizations that `terser` performs.  As a result, `terser` is used as a second phase to further optimize and reduce the size of the output bundle scripts.  Since `terser` is operating on a smaller input size, the time required for `terser` to complete is significantly reduced.  To further improve performance when source maps are enabled, the source map merging is now performed within the optimization workers. A maximum of four (4) optimization workers are currently used and this value can be adjusted via the `NG_BUILD_MAX_WORKERS` environment variable.
2021-06-25 07:44:57 +02:00
Alan Agius
203e1a4d60 refactor(@angular-devkit/build-angular): remove unused mime-types from style configuration 2021-06-25 07:44:46 +02:00
Renovate Bot
4e8566fa91 build: update dependency core-js to v3.15.1 2021-06-23 11:51:53 +01:00
Alan Agius
4fc33ca0c0 build: update to ng-packagr to 12.1.0-next.0 2021-06-23 11:51:09 +01:00
Renovate Bot
50b18858fc build: update all non-major dependencies 2021-06-22 17:40:09 +01:00
Alan Agius
06181c2fbf fix(@angular-devkit/build-angular): parse web-workers in tests when webWorkerTsConfig is defined
The logic was inverted which caused workers not to be parsed when `webWorkerTsConfig` is defined.
2021-06-22 17:39:12 +01:00
Renovate Bot
4cfb81e75a build: update all non-major dependencies 2021-06-21 11:13:21 +01:00
Renovate Bot
81cd7d0d8d build: update dependency typescript to v4.3.4 2021-06-21 11:12:58 +01:00
Charles Lyding
d4c5f8518d fix(@angular-devkit/build-angular): control linker template sourcemapping via builder sourcemap options
This change allows the linker sourcemap behavior to be controlled by the Webpack sourcemap configuration. For example, if a vendor file is being processed and vendor sourcemaps are disabled, the linker will now skip its internal sourcemap loading and processing steps.
2021-06-21 11:12:00 +01:00
Alan Agius
ab17b1721c fix(@angular-devkit/build-angular): handle ng-packagr errors more gracefully.
Ng-packagr will throw an error when a compilation fails.
2021-06-21 11:11:09 +01:00
Renovate Bot
b3c333aafd build: update dependency less-loader to v10 2021-06-18 11:19:47 +01:00
Renovate Bot
b2a4cb013e build: update dependency typescript to v4.3.3 2021-06-17 12:55:03 -04:00
Renovate Bot
8c4c464f5c build: update all non-major dependencies 2021-06-17 09:43:33 -04:00
Alberto Calvo
0fe6cfef64 fix(@angular-devkit/build-angular): use the name as chunk filename instead of id 2021-06-16 08:15:38 -04:00