7855 Commits

Author SHA1 Message Date
Alan Agius
0b27cfb720 build: update minimum supported node.js version to 12.14
This is to match the ranges in the framework repo.
2021-04-27 17:26:56 +02:00
Alan Agius
9d6c1dad95 refactor(@angular-devkit/build-angular): remove old worker_threads detection
We now don't support Node 10 hence `worker_threads` are always available.
2021-04-27 15:46:54 +02:00
Alan Agius
38acdb70d5 test(@angular-devkit/build-angular): update HMR test to support new chrome driver 2021-04-27 14:55:18 +02:00
Alan Agius
3059b5d926 build: update chrome driver to 91.0.4472.19 2021-04-27 14:55:18 +02:00
Renovate Bot
da91bf3b0c build: update puppeteer to version 9.0.0 2021-04-27 14:55:18 +02:00
Alan Agius
29615c5ec4 build: update lock file to force same Webpack version 2021-04-27 13:52:48 +02:00
Renovate Bot
6864168cdb build: update webpack to version 5.36.0 2021-04-27 13:52:48 +02:00
Alan Agius
cb0561a9aa ci: remove commitMessage from Renovate configuration
Renovate creates better commit message.
2021-04-27 13:25:30 +02:00
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Joey Perrott
770d2743d2 build: update tslint to check for proper and correct file header
Update the file header expectation in linting to be Google LLC rather
than Google Inc.
2021-04-27 08:35:22 +02:00
Renovate Bot
d272de8ea5 build: update to version 2021-04-27 08:34:40 +02:00
Renovate Bot
e813f47559 build: update all non-major dependencies packages 2021-04-26 20:39:01 +02:00
Alan Agius
aba23e74c2 ci: configure Renovate to ignore quicktype-core
This is needed as currently this breaks lock file maintenance Renovate  PR https://github.com/angular/angular-cli/pull/20107 due to quicktype-core has an unspecified dependency on lodash.

```
  bazel-out/host/bin/tools/quicktype_runner.sh packages/angular_devkit/build_angular/src/app-shell/schema.json bazel-out/k8-fastbuild/bin/packages/angular_devkit/build_angular/src/app-shell/schema.ts)
Execution platform: //tools:rbe_ubuntu1604-angular
Error: Cannot find module 'lodash'. Please verify that the package.json has a valid "main" entry
    at Function.module.constructor._resolveFilename (/b/f/w/bazel-out/host/bin/tools/quicktype_runner.sh.runfiles/angular_cli/tools/quicktype_runner_require_patch.js:480:17)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/b/f/w/bazel-out/host/bin/tools/quicktype_runner.sh.runfiles/npm/node_modules/quicktype-core/dist/language/Dart.js:14:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
INFO: Elapsed time: 81.607s, Critical Path: 8.94s
2021-04-25 16:17:50 +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
bd557f98bd build: update @types/copy-webpack-plugin to version 8.0.0 2021-04-25 11:50:09 +02:00
Santosh Yadav
27bab2a66f fix(@schematics/angular): remove lint command from package.json
Angular 12 does not provide the default linter but CLI adds the ng lint
this PR removes the ng lint from new app created

Fixes #20618
2021-04-25 10:21:16 +02:00
Alan Agius
5a82689eb4 ci: configure renovate to group all non-major dependencies
With this change we configure renovate to group all non-major dependencies and create a single PR
2021-04-24 17:35:14 +02:00
Renovate Bot
222b2e72e0 build: update webpack to version 5.35.1 2021-04-24 14:25:31 +02:00
Renovate Bot
9af16dc659 build: update pacote to version 11.3.3 2021-04-24 14:16:26 +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
Renovate Bot
2bea25908f build: update pacote to version 11.3.2 2021-04-23 13:38:16 +02:00
Alan Agius
09676c90a9 fix(@angular-devkit/core): improve handling of set schema values
Closes #20594
2021-04-23 07:22:47 +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
Alan Agius
5558047eef fix(@angular/cli): add package manager name and version in ng version output 2021-04-22 14:23:13 +02:00
Renovate Bot
81678e83a7 build: update angular packages 2021-04-22 11:17:33 +02:00
cexbrayat
26ec477262 fix(@schematics/angular): remove Protractor from home page 2021-04-22 10:57:10 +02:00
cexbrayat
29cf8125ca fix(@schematics/angular): remove jasmine-spec-reporter and ts-node from default workspace
The dependencies are only needed for protractor tests, so they should only be added by the e2e schematics.
2021-04-22 10:56:36 +02:00
mzocateli
48701a9708 fix(@angular-devkit/schematics-cli): accept windows like paths for schematics
correctly identify schematics paths like 'C:/dir/collection.json:schematic' that used to return 'C' as collection
2021-04-22 09:54:08 +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
3d30e89c61 docs(@schematics/angular): remove hidden schematics from readme
Universal and E2E schematics are hidden/private.
2021-04-21 12:44:03 -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
86754e4750 refactor(@ngtools/webpack): use Webpack 5 modified/removed file sets for changed list
Webpack 5 directly provides the set of modified and removed files. This feature allows for the removal of the file timestamp logic within the plugin that was previously used to generated the set of changed files on a rebuild.
2021-04-21 12:41:35 -07:00
Charles Lyding
e8f22ab36d refactor(@ngtools/webpack): remove Webpack 4 specific type casting
Webpack 5 contains improved types and exports that reduce the need to perform additional type casting throughout the Angular Webpack Plugin.
2021-04-21 12:40:19 -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
0272fc55b6 refactor(@schematics/angular): remove stylus from style options
BREAKING CHANGE:

`styl` (Stylus) is no longer a supported value as `style` in `application`, `component`, `ng-new` schematics. 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
Keen Yee Liau
49ba5e20aa refactor(@schematics/angular): Do not include Protractor test in new project
Do not include Protractor for new projects since we do not have a concrete
plan for Protractor yet.
2021-04-21 12:38:46 -07:00
Alan Agius
a8ff9d408b test(@angular-devkit/build-angular): add debounceTime to stabilize FS 2021-04-21 12:38:17 -07:00
Renovate Bot
09fc6e523a build: update to version 2021-04-21 12:38:17 -07:00
David Shevitz
bb3f36f30a docs: remove reference to protractor. 2021-04-21 12:35:50 -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
b8fc1dc915 fix(@ngtools/webpack): only track actual resource file dependencies
Webpack's `fileDependencies` Set could contain directories as well as files. The directories were previously stored and incorrectly used during cache invalidation which resulted in excessive cache validation.
This change attempts to skip directories by ignoring any `fileDependencies` entry that does not have a file extension.
2021-04-21 12:34:37 -07:00
Charles Lyding
8dfc8e73f3 perf(@ngtools/webpack): cache results of processed inline resources
When in watch mode, both the file and inline resources will now be cached between rebuilds. This removes the need to reprocess inline resources that have not changed even if the containing TypeScript file has changed.
2021-04-21 12:34:37 -07:00