1919 Commits

Author SHA1 Message Date
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Renovate Bot
e813f47559 build: update all non-major dependencies packages 2021-04-26 20:39:01 +02:00
Alan Agius
2d5987102a refactor(@angular-devkit/build-angular): remove no longer needed casting 2021-04-25 11:50:09 +02:00
Renovate Bot
222b2e72e0 build: update webpack to version 5.35.1 2021-04-24 14:25:31 +02:00
Renovate Bot
992828c991 build: update postcss to version 8.2.12 2021-04-24 13:37:13 +02:00
Charles Lyding
767f0fffdc perf(@angular-devkit/build-angular): avoid async downlevel for known ES2015 code
Library code inside fesm2015/esm2015/_esm2015 directories has been downlevelled to ES2015 which will not have native async/await. As a result, code from those directories can be skipped from the additional checks as well as the downlevel processing. RxJS uses the `_esm2015` directory naming convention.
2021-04-24 09:21:15 +02:00
Alan Agius
b55fc08aa4 fix(@angular-devkit/build-angular): output webpack-dev-server and webpack-dev-middleware errors
With this change we configure `webpack-dev-middleware` and `webpack-dev-server` to print errors to the console, which previously were not displayed. This is because both of these libraries log/emit errors using the logger and the compilation API.

Certain errors such as the one below, were being swallowed during `ng serve`.
```
An unhandled exception occurred: Prevent writing to file that only differs in casing or query string from already written file.
This will lead to a race-condition and corrupted files on case-insensitive file systems.
/home/circleci/ng/aio/dist/generated/docs/api/router/Routes.json
/home/circleci/ng/aio/dist/generated/docs/api/router/ROUTES.json
```
2021-04-23 14:33:55 +02:00
Renovate Bot
56d8bc10d6 build: update core-js to version 3.11.0 2021-04-23 13:39:06 +02:00
Alan Agius
b2e1d90c63 perf(@angular-devkit/build-angular): improve incremental time during Karma tests
With this change we now use Webpack memory cache when running Karma in watch mode.
2021-04-22 15:40:50 +02:00
Alan Agius
4c8e03256f fix(@angular-devkit/build-angular): remove left-over forkTypeChecker option 2021-04-22 15:40:36 +02:00
Renovate Bot
f28412c3e0 build: update babel packages 2021-04-22 09:49:19 +02:00
Renovate Bot
f96914f0d3 build: update webpack to version 5.35.0 2021-04-21 12:44:50 -07:00
Renovate Bot
4c9cbecc8d build: update sass to version 1.32.11 2021-04-21 12:44:33 -07:00
Alan Agius
eed56ab839 fix(@angular-devkit/build-angular): avoid triggering file change after file build
When using the `ContextReplacementPlugin` https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/webpack/configs/common.ts#L496 the new resource path will be watched by Webpack file watcher. This causes a redundant file remove event after the first build, which causes another partial rebuild right way.

Note: changing the call to ` new ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)/);` doesn't address the problem.
2021-04-21 12:41:56 -07:00
Charles Lyding
2ac73c75e7 fix(@angular-devkit/build-angular): set Tailwind CSS mode when using Tailwind
Tailwind now suppports an environment variable named `TAILWIND_MODE` with possible values of `build` and `watch`. If the variable has not been set, the tooling will now set the variable based on the builder's `watch` option.
2021-04-21 12:39:39 -07:00
Alan Agius
82ca7d0852 fix(@angular-devkit/build-angular): show warning when using stylus
Stylus is not actively maintained and only 0.3% of the Angular CLI users use it.
2021-04-21 12:39:18 -07:00
Alan Agius
0a74d0d28d fix(@angular-devkit/build-angular): change several builder options defaults
BREAKING CHANGE:

A number of browser and server builder options have had their default values changed. The aim of these changes is to reduce the configuration complexity and support the new "production builds by default" initiative.

**Browser builder**
| Option                                 | Previous default value    | New default value |
|----------------------------------------|---------------------------|-------------------|
| optimization                           | false                     | true              |
| aot                                    | false                     | true              |
| buildOptimizer                         | false                     | true              |
| sourceMap                              | true                      | false             |
| extractLicenses                        | false                     | true              |
| namedChunks                            | true                      | false             |
| vendorChunk                            | true                      | false             |

**Server builder**
| Option        | Previous default value | New default value |
|---------------|------------------------|-------------------|
| optimization  | false                  | true              |
| sourceMap     | true                   | false             |
2021-04-21 12:39:01 -07:00
Alan Agius
a8ff9d408b test(@angular-devkit/build-angular): add debounceTime to stabilize FS 2021-04-21 12:38:17 -07:00
Charles Lyding
85ce5ec3b0 fix(@angular-devkit/build-angular): always inject live reload client when using live reload
The current stable version of `webpack-dev-server` does not fully handle Webpack 5's configuration options. In this case, the `target` option can now be an array. However, the array form is ignored by the dev server which can cause the live reload client code to not be included in the output bundles. To remedy this, the `injectClient` option is used when live reload is enabled which forces the client code to be included regardless of the `target` option.
2021-04-21 12:34:56 -07:00
Charles Lyding
ef6996aeff perf(@angular-devkit/build-angular): use Webpack's GC memory caching in watch mode
The GC caching mode will remove any unused cache entries after each rebuild. This prevents old modules from being retained indefinitely during long-lived development sessions.
2021-04-21 12:34:10 -07:00
Renovate Bot
a6cc86786b build: update core-js to version 3.10.2 2021-04-20 09:31:37 -05:00
Renovate Bot
4eb9151510 build: update css-loader to version 5.2.4 2021-04-20 09:31:12 -05:00
Charles Lyding
e107055b6f fix(@angular-devkit/build-angular): disable Webpack 5 automatic public path support
The Webpack 5 automatic public path support can cause an incorrect public path to be used to load assets and lazy loaded routes. The current logic relies on the last script element found at runtime in the application's index HTML which may not be related to the application scripts. Now if a `deployUrl` is not specified, the Webpack `publicPath` option is defaulted to an empty string which provides equivalent behavior to Webpack 4.
2021-04-20 09:29:49 -05:00
Alan Agius
7d56d480c1 fix(@angular-devkit/build-angular): recover from CSS optimization errors 2021-04-20 09:29:12 -05:00
Alan Agius
04f5dfe5e2 fix(@angular-devkit/build-angular): use new Webpack watch API in karma webpack plugin
In Webpack 5, the Webpack callback must be used when Webpack is running in watch mode.

Related warning
```
.(node:6565) [DEP_WEBPACK_WATCH_WITHOUT_CALLBACK] DeprecationWarning: A 'callback' argument need to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.
```
2021-04-20 09:27:05 -05:00
Alan Agius
cb9e51f687 refactor(@angular-devkit/build-angular): remove custom Webpack Stats types
Webpack 5 contains improved types that we can leverage.
2021-04-20 09:27:05 -05:00
Renovate Bot
1c6ba1f9f6 build: update open to version 8.0.6 2021-04-19 20:33:19 +02:00
Renovate Bot
072f3a7009 build: update webpack to version 5.34.0 2021-04-19 20:33:01 +02:00
Renovate Bot
6d0207d4a2 build: update less-loader to version 8.1.1 2021-04-19 20:32:40 +02:00
Renovate Bot
fd655d463f build: update sass to version 1.32.10 2021-04-19 20:32:27 +02:00
Charles Lyding
5804fec902 refactor(@angular-devkit/build-angular): remove Webpack 4 specific type casting
Webpack 5 contains improved types and exports that reduce the need to perform additional type casting throughout the internal Webpack plugins.
2021-04-19 20:32:13 +02:00
Charles Lyding
e0cb8222ea fix(@angular-devkit/build-angular): replace Webpack 4 hashForChunk hook usage
Webpack 5 now uses a `chunkHash` hook that is accessible from `JavascriptModulesPlugin.getCompilationHooks()`. The `hashForChunk` hooks have been deprecated in Webpack 5.
2021-04-19 20:31:59 +02:00
Charles Lyding
e55923656c fix(@angular-devkit/build-angular): avoid double build optimizer processing
TypeScript files had the potential to be processed twice by the build optimizer. This did not affect the output code but could lead to longer production build times. The build optimizer is now configured in one centralized location for both TypeScript and JavaScript files. The Webpack configuration partial for TypeScript support is also reduced to one common function for both AOT and JIT as a result.
2021-04-19 20:30:21 +02:00
Renovate Bot
71717cf406 build: update mini-css-extract-plugin to version 1.5.0 2021-04-19 20:30:05 +02:00
Alan Agius
b8875397ce docs(@angular-devkit/build-angular): add readme file 2021-04-19 09:39:59 -05:00
Alan Agius
d7bedb7293 build: promote @angular-devkit/build-angular to stable 2021-04-14 15:50:27 -04:00
Charles Lyding
27e63e2b33 fix(@angular-devkit/build-angular): mark programmatic builder execution functions as experimental
While the builders when executed via the Angular CLI and their associated options are considered stable, the programmatic APIs are not considered officially supported and are not subject to the breaking change guarantees of SemVer.
The programmatic APIs for the builders are now explicitly marked as experimental. This allows the package to use a stable versioning scheme while also continuing to provide access to the experimental programmatic API elements of the package.
2021-04-14 14:32:37 -04:00
Charles Lyding
d3bc530c10 refactor(@angular-devkit/build-angular): use Node.js promise fs API in service-worker augmentation
With the minimum version of Node.js now set to v12, the promise fs API can now be leveraged within the tooling.
This change also uses `copyFile` (with copy-on-write where available) to setup the the service worker files as well a streaming APIs to generate service worker hashes. Both of which improves performance and reduces memory usage.
2021-04-14 10:17:21 -04:00
Renovate Bot
8dbc5e7ee0 build: update cssnano to version 5.0.1 2021-04-14 07:22:20 -04:00
Charles Lyding
bac563e5ee feat(@angular-devkit/build-angular): support specifying stylesheet language for inline component styles
A new build option named `inlineStyleLanguage` has been introduced that will allow a project to define the stylesheet language used in an application's inline component styles. Inline component styles are styles defined via the `styles` property within the Angular `Component` decorator. Both JIT and AOT mode are supported. However, JIT mode requires that inline styles only be string literals (compile-time partial evaluation is not supported in JIT mode). Currently supported language options are: `CSS` (default), `Sass`, `SCSS`, and `Less`. If the option is not specified, `CSS` will be used and enables existing projects to continue to function as expected.
2021-04-14 07:21:11 -04:00
Charles Lyding
330235230c refactor(@angular-devkit/build-angular): remove redundant webpack-sources dependency
The `webpack` package now exports the `Source` based classes directly.
2021-04-13 15:34:54 -04:00
Alan Agius
076ab0f11f refactor: add correct schema keys
With this change
- We replace `id` with `$id`,  this no longer valid in draft-07.
- Replace all `$schemas` to `http://json-schema.org/draft-07/schema`, this is needed to "pin" the schema to `draft-07`.

More information about `draft-07` can be found https://json-schema.org/draft-07/json-schema-release-notes.html
2021-04-13 10:51:12 -04:00
Alan Agius
c609e7104c build: update to cssnano to version 5.0.0
Closes #19106
2021-04-13 10:50:02 -04:00
Alan Agius
cc52e5453c fix(@angular-devkit/build-angular): remove duplicate application bundle generation complete message
In some scenarios in Webpack 5 percentage goes from 1 back to 0.99, ex: 0.99 -> 1 -> 0.99 -> 1. This causes the "complete" message to be displayed multiple times.
2021-04-13 10:49:40 -04:00
Alan Agius
1532e32cc2 refactor: clean up webpack 4 code 2021-04-13 10:49:17 -04:00
Renovate Bot
871f9eee77 build: update webpack to version 5.32.0 2021-04-13 10:43:33 -04:00
Charles Lyding
440f57943d build: update webpack to version 5.31.2 2021-04-12 14:08:43 -04:00
Charles Lyding
d47b4417d4 feat(@angular-devkit/build-angular): support processing component inline CSS styles
The internal Webpack configuration now includes support for style rules with MIME type conditions. This allows the data URIs generated for inline component CSS styles by the Angular Webpack plugin to be processed with the same loaders as file based styles.
2021-04-12 14:08:43 -04:00
Alan Agius
dee6b79489 refactor: remove @types/webpack 2021-04-12 10:02:07 -04:00
Alan Agius
0f4bbb58d4 refactor(@angular-devkit/build-angular): remove webpack 4 checks
These are no longer needed as we don't support Webpack 4 any longer
2021-04-12 10:02:07 -04:00