1361 Commits

Author SHA1 Message Date
Alan Agius
33f5b60069 refactor(@angular-devkit/build-angular): remove target parameter from BuildBrowserFeatures ctor 2020-09-23 11:22:58 -05:00
Alan Agius
8d770ed0db test: remove test which is no longer relevent
We removed webpack specific build logs from the CLI, therefore this test is no longer relevant.
2020-09-22 10:29:53 -05:00
Alan Agius
d3ad09508f refactor(@angular-devkit/architect): remove deprecated TestLogger
BREAKING CHANGE:

Deprecated `TestLogger` has been removed. Use `logging` API from `'@angular-devkit/core'` instead.

**Note:** this change doesn't effect application developers.
2020-09-22 10:29:53 -05:00
Renovate Bot
ab9968d76e build: update rollup to version 2.28.1 2020-09-22 10:29:35 -05:00
Renovate Bot
5e43259ded build: update terser-webpack-plugin to version 4.2.2 2020-09-21 11:56:12 -05:00
Renovate Bot
4261bdbf9d build: update copy-webpack-plugin to version 6.1.1 2020-09-21 11:55:56 -05:00
Charles Lyding
e5266fdd44 refactor(@angular-devkit/build-angular): temporarily disable Webpack 5 license extraction
The license extraction plugin is currently causing errors when building/serving with Webpack 5.  This change temporarily disables the option when Webpack 5 is used until further investigation can take place and to unblock initial Webpack 5 support.
2020-09-21 11:55:11 -05:00
Charles Lyding
ea2b19cedc refactor(@angular-devkit/build-angular): adjust Webpack configuration based on version 4/5
This change adds helpers to allow the Webpack configuration to be automatically adjusted based on the Webpack version in use.
These helpers are then used to provide configuration compatibility for Webpack 5 which has several differences to the Webpack 4 configuration.
Behavior is maintained between the two versions so that external option behavior is not altered.
2020-09-21 11:55:11 -05:00
Renovate Bot
4781b9245e build: update webpack to version 4.44.2 2020-09-18 14:55:08 -05:00
Renovate Bot
44887a87e6 build: update terser to version 5.3.2 2020-09-18 14:54:51 -05:00
Renovate Bot
83ffaee7db build: update sass to version 1.26.11 2020-09-18 14:53:57 -05:00
Alan Agius
99210b203d fix(@angular-devkit/build-angular): add node-sass deprecation warning 2020-09-18 14:53:31 -05:00
Renovate Bot
d077afde93 build: update rollup to version 2.27.1 2020-09-18 14:53:17 -05:00
Alan Agius
5996896076 feat(@angular-devkit/build-angular): improve build stats output format
With this change we also remove sourcemaps from build info to align with Webpack 5 output.
2020-09-18 14:52:38 -05:00
Alan Agius
13b17baebe refactor(@angular-devkit/build-angular): add spinners for localize and downlevelling 2020-09-16 10:38:58 -04:00
Renovate Bot
976cea459b build: update postcss-loader to version 4.0.2 2020-09-16 07:13:49 -04:00
Renovate Bot
25a3f453af build: update terser-webpack-plugin to version 4.2.1 2020-09-16 07:13:14 -04:00
Renovate Bot
0235cb0a89 build: update rollup to version 2.27.0 2020-09-16 07:11:37 -04:00
Alan Agius
0d10de5cbb refactor(@angular-devkit/build-angular): re-structure folder structure and move code
Previous
```
packages/angular_devkit/build_angular
├── plugins
│   └── webpack
└── src
    ├── angular-cli-files
    │   ├── models
    │   │   └── webpack-configs
    │   ├── plugins
    │   └── utilities
    │       ├── index-file
    │       └── service-worker
    ├── app-shell
    ├── browser
    │   └── specs
    ├── dev-server
    ├── extract-i18n
    ├── karma
    ├── ng-packagr
    ├── protractor
    ├── server
    ├── tslint
    ├── utils
    └── webpack
        └── models
```

Now
```
packages/angular_devkit/build_angular
├── plugins
└── src
    ├── app-shell
    ├── browser
    │   └── specs
    ├── dev-server
    ├── extract-i18n
    ├── karma
    ├── ng-packagr
    ├── protractor
    ├── server
    ├── tslint
    ├── utils
    │   └── index-file
    └── webpack
        ├── configs
        ├── plugins
        └── utils
```
2020-09-14 16:40:39 -04:00
Charles Lyding
9144cf87ff refactor(@angular-devkit/build-angular): support Webpack 5 errors/warnings
Webpack 5 uses an object to represent errors and warnings unlike Webpack 4 which used a string.  This change provides support for both scenarios.
2020-09-14 15:54:30 -04:00
Renovate Bot
54f296ca00 build: update mini-css-extract-plugin to version 0.11.2 2020-09-13 20:04:16 -04:00
Renovate Bot
118f698524 build: update terser-webpack-plugin to version 4.2.0 2020-09-12 09:42:10 -04:00
Alan Agius
14d70d15b9 refactor(@angular-devkit/build-angular): add missing formatOptions which is non optional in v11.0.0-next.1
Related to https://github.com/angular/angular/pull/38787
2020-09-11 14:31:07 -04:00
Renovate Bot
79f13bddb2 build: update terser to version 5.3.1 2020-09-11 07:31:58 -04:00
Alan Agius
622d08447d refactor: use ansi-colors instead of removed terminal utils 2020-09-10 20:19:33 +02:00
Charles Lyding
f31f853de8 refactor(@angular-devkit/build-angular): use Webpack ChunkGraph API in SuppressExtractedTextChunksWebpackPlugin 2020-09-10 19:46:45 +02:00
Alan Agius
9087197e4a fix(@angular-devkit/build-angular): set logging level to verbose when using --verbose 2020-09-10 17:53:02 +02:00
Alan Agius
1ebd7e610d refactor(@angular-devkit/build-angular): use common logging function for webpack stats
With this change we align all builders to have the same output structure.
2020-09-10 16:21:28 +02:00
Alan Agius
0a9e1fd3af build: update postcss-loader to version 4.0 2020-09-09 18:31:29 +02:00
Charles Lyding
16fabddbf1 refactor(@angular-devkit/build-angular): support dedupe plugin with Webpack 5
The structure of the data from the `afterResolve` hook has changed in Webpack 5.  This change provides compatibility for both the Webpack 5+ and Webpack 4 variants.
2020-09-09 10:47:13 +02:00
Renovate Bot
ee4e1b2a19 build: update webpack-merge to version 5.1.4 2020-09-09 10:46:49 +02:00
Renovate Bot
e8a62b1dfd build: update rollup to version 2.26.11 2020-09-09 08:50:00 +02:00
Renovate Bot
fbfe70a503 build: update css-loader to version 4.3.0 2020-09-09 08:49:33 +02:00
Renovate Bot
ba9a8bb604 build: update mini-css-extract-plugin to version 0.11.1 2020-09-09 08:49:14 +02:00
Charles Lyding
22ecb13986 fix(@angular-devkit/build-angular): filter unactionable System.import webpack warning
Webpack 5+ has no facility to disable this warning. `System.import` is used in `@angular/core` for deprecated string-form lazy routes.
2020-09-09 00:05:40 +02:00
Alan Agius
72097ea55c refactor(@angular-devkit/build-angular): lazy require autoprefixer, mini-css-extract-plugin and postcss-import 2020-09-08 19:47:09 +02:00
Renovate Bot
8dac017e23 build: update rxjs to version 6.6.3 2020-09-07 14:44:16 +02:00
Keen Yee Liau
8995e49f0b feat(@angular-devkit/build-angular): Switch to karma-coverage
This commit switches coverage tooling from karma-coverage-istanbul-reporter
to karma-coverage since it's better supported.

Closes #17757
2020-09-06 12:22:25 +02:00
Renovate Bot
f52e5a7790 build: update rollup to version 2.26.10 2020-09-06 11:33:58 +02:00
Renovate Bot
14a3c03f01 build: update terser to version 5.3.0 2020-09-06 11:27:36 +02:00
Renovate Bot
1a39c5202a build: update sass-loader to version 10.0.2 2020-09-05 12:00:11 +02:00
Renovate Bot
a85224a8bc build: update less-loader to version 7.0.1 2020-09-04 13:33:23 +02:00
Renovate Bot
0f4a8dd509 build: update babel packages 2020-09-04 09:23:54 +02:00
Charles Lyding
5c3e87f644 fix(@angular-devkit/build-angular): update Angular peer dependencies to 11.0 prerelease 2020-09-03 23:28:42 +02:00
Alan Agius
ceeb6fba34 fix(@angular-devkit/build-angular): consider ascii_only terser setting when counting components in analytics 2020-09-03 20:23:21 +02:00
Alan Agius
5f064eba74 build: update @types/webpack to 4.41.22 2020-09-03 18:08:09 +02:00
Alan Agius
e95b73f6fb refactor(@angular-devkit/build-angular): set resolve roots to projectRoot
Previously roots was the same as context which was set to projectRoot, however in the previous change we changed the context to workspaceRoot.

With this change we maintain the same resolve root setting.

More info:
4a3e4bda6b/lib/config/defaults.js (L875)

 https://webpack.js.org/configuration/resolve/
2020-09-03 18:08:09 +02:00
Alan Agius
086d74d2b4 fix(@angular-devkit/build-angular): improve debugging experience
With this change we improve the debugging experience with 2 things.

1. Cleaner Karma stack traces in the terminal
Before
```
Chrome 84.0.4147.105 (Mac OS 10.15.5) AppComponent should have as title 'foo' FAILED
        Error: Expected 'foo' to equal 'fox'.
            at <Jasmine>
            at UserContext.<anonymous> (http://localhost:9876/_karma_webpack_/webpack:/projects/foo/src/app/app.component.spec.ts:22:23)
            at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:364:1)
            at ProxyZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-testing.js:292:1)
Chrome 84.0.4147.105 (Mac OS 10.15.5): Executed 3 of 3 (1 FAILED) (0 secs / 0.214 secs)
Chrome 84.0.4147.105 (Mac OS 10.15.5) AppComponent should have as title 'foo' FAILED
        Error: Expected 'foo' to equal 'fox'.
            at <Jasmine>
            at UserContext.<anonymous> (http://localhost:9876/_karma_webpack_/webpack:/projects/foo/src/app/app.component.spec.ts:22:23)
            at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:364:1)
            at ProxyZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zChrome 84.0.4147.105 (Mac OS 10.15.5): Executed 3 of 3 (1 FAILED) (0.225 secs / 0.214 secs)
```

After
```
Chrome 84.0.4147.105 (Mac OS 10.15.5) AppComponent should have as title 'foo' FAILED
        Error: Expected 'foo' to equal 'fox'.
            at <Jasmine>
            at UserContext.<anonymous> (projects/foo/src/app/app.component.spec.ts:22:23)
            at ZoneDelegate.invoke (node_modules/zone.js/dist/zone-evergreen.js:364:1)
            at ProxyZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.ProxyZoneSpec.onInvoke (node_modules/zone.js/dist/zone-testing.js:292:1)
Chrome 84.0.4147.105 (Mac OS 10.15.5): Executed 2 of 3 (1 FAILED) (0 secs / 0.225 secs)
Chrome 84.0.4147.105 (Mac OS 10.15.5) AppComponent should have as title 'foo' FAILED
        Error: Expected 'foo' to equal 'fox'.
            at <Jasmine>
            at UserContext.<anonymous> (projects/foo/src/app/app.component.spec.ts:22:23)
            at ZoneDelegate.invoke (node_modules/zone.js/dist/zone-evergreen.js:364:1)
Chrome 84.0.4147.105 (Mac OS 10.15.5): Executed 3 of 3 (1 FAILED) (0.281 secs / 0.237 secs)
```

2. Reduce VS Code configuration
Before
```
{
  "name": "ng test",
  "type": "chrome",
  "request": "launch",
  "url": "http://localhost:9876/debug.html",
  "webRoot": "${workspaceFolder}",
  "sourceMaps": true,
  "sourceMapPathOverrides": {
    "webpack:/*": "${webRoot}/*",
    "/./*": "${webRoot}/*",
    "/src/*": "${webRoot}/*",
    "/*": "*",
    "/./~/*": "${webRoot}/node_modules/*"
  }
},
```

After
```
{
  "name": "ng test",
  "type": "chrome",
  "request": "launch",
  "url": "http://localhost:9876/debug.html",
  "webRoot": "${workspaceFolder}",
},
```
2020-09-03 18:08:09 +02:00
Alan Agius
ee7d8f64c8 fix(@angular-devkit/build-angular): generate sourcemaps with relative paths in monorepo
With this change we fix the issue that when having a monorepo style workspace, sourcemaps sources references absolute paths.

Closes #17046
2020-09-03 18:08:09 +02:00
Charles Lyding
a3e404bf16 fix(@angular-devkit/build-angular): correct i18n function parameter type
The type of the first parameter of the internal unwrapTemplateLiteral function should be a `NodePath<types.TaggedTemplateExpression>` not a `NodePath<types.TemplateLiteral>`.
2020-09-03 00:23:30 +03:00