182 Commits

Author SHA1 Message Date
Alan Agius
36c2423042 revert: fix(@ngtools/webpack): emit lazy routes errors on rebuilds
This reverts commit edb84b340ff996df2ca6a2aaf765304cc64fef3e

The team has decided to bring back the faster but potentially less accurate method of detecting lazy routes upon JIT rebuilds (first builds will always use the more complete Angular compiler method). Applications that do not have lazy routes within libraries and that only use direct string literals with loadChildren should not be affected by the potential of less accurate detection. Note that the function overload of loadChildren also does not apply to this situation.

For those projects where correctness of lazy route detection outweighs rebuild speed, please consider using AOT mode for development. AOT mode will also provide a full set of template errors as well which JIT mode is not capable of doing.

Fixes #13102
2019-01-08 13:38:13 -08:00
Renovate Bot
c045a7fea4 build: update speed-measure-webpack-plugin to version 1.2.5 2019-01-08 13:37:10 -08:00
Tiago Temporin
b233e8f59d refactor(@angular-devkit/build-angular): improve check port
Closes 8595
2019-01-08 13:36:55 -08:00
Renovate Bot
5b7464ace8 build: update terser-webpack-plugin to version 1.2.0 2018-12-26 12:34:23 -08:00
Renovate Bot
28b97db93a build: update webpack-dev-server to version 3.1.14 2018-12-26 12:33:39 -08:00
Filipe Silva
3b52fa43d3 fix(@angular-devkit/build-angular): resolve project root for fork process
Fix https://github.com/angular/angular-cli/issues/13113
2018-12-26 12:32:49 -08:00
Renovate Bot
3e8c461670 build: update loader-utils to version 1.2.1 2018-12-26 11:33:24 -08:00
Alan Agius
02a498ef39 build: update webpack to 4.28.2 2018-12-26 11:27:25 -08:00
Alan Agius
b071d1cd1d build: update several dependencies
This is so that renovate won't trigger for these dependencies
2018-12-21 09:31:20 -08:00
Renovate Bot
ce42a4ce4e build: update semver to version 5.6.0 2018-12-20 13:18:17 -08:00
Renovate Bot
c717d61b1a build: update postcss-import to version 12.0.1 2018-12-20 13:17:57 -08:00
Renovate Bot
80823ac280 build: update portfinder to version 1.0.20 2018-12-20 13:17:27 -08:00
Renovate Bot
e05f0ab19e build: update postcss to version 7.0.7 2018-12-20 11:38:53 -08:00
Alan
5e6b42c5e3 test: add tests for elide imports
This also adds the option to provide addition files when using `createTypescriptContext` this is paramount for the elide imports tests as without this certain symbols won't have the full details.

Which will cause tests to be false positive and re-surface issues like #13212
2018-12-20 11:38:01 -08:00
Renovate Bot
bdef022ea2 build: update tree-kill to version 1.2.1 2018-12-20 11:35:35 -08:00
Renovate Bot
e1c9eec86a build: update opn to version 5.4.0 2018-12-20 11:34:53 -08:00
Renovate Bot
acca02383d build: update node-sass to version 4.11.0 2018-12-20 11:34:40 -08:00
Renovate Bot
719d6abdbc build: update mini-css-extract-plugin to version 0.5.0 2018-12-20 11:34:21 -08:00
Renovate Bot
5a02a83d56 build: update ajv to version 6.6.2 2018-12-19 14:02:07 -08:00
Alan Agius
8bded93d8a fix(@ngtools/webpack): import as results in the alias being undefined with Typescript 3.2
When using the `specifier.propertyName` with `typeChecker.getSymbolAtLocation` it will return a more detailed symbol then we originally have in the `usedSymbols` set.

We should probably use `symbol.id` to actually check if the symbols are the same, however the `id` is not exposed in the Symbol interface.

Using `node.name` will return the same symbol that we have stored in the set.

Fixes #13212
2018-12-19 10:55:05 -08:00
Alan Agius
5111d15ff2 build: update to TypeScript 3.2 and Angular 7.2 RC 2018-12-19 10:55:05 -08:00
Amadou Sall
18566b0442 fix(@angular-devkit/build-angular): remove circular dependencies warnings in ngfactory files
Fixes #11135
2018-12-19 10:26:18 -08:00
Renovate Bot
37c9513a8e build: update autoprefixer to version 9.4.3 2018-12-19 10:14:48 -08:00
Renovate Bot
09cb5701ab build: update copy-webpack-plugin to version 4.6.0 2018-12-19 10:14:36 -08:00
Renovate Bot
8eca63d263 build: update less to version 3.9.0 2018-12-19 10:14:10 -08:00
Renovate Bot
95c301a60b build: update license-webpack-plugin to version 2.0.4 2018-12-19 10:13:54 -08:00
jonwrede
bc9d6eb3e7 fix(@angular-devkit/build-angular): remove invalid colors option of ProgressPlugin
ProgressPlugin has no option colors https://github.com/webpack/webpack/issues/8487
ng serve fails if progress is shown
2018-12-12 11:13:49 -08:00
Alan Agius
42962571be fix(@angular-devkit/build-angular): output non human readable lint result
At the moment, when the tslint formatted is non human readable, it is being fully silenced.

This changes this behaviour and only emit the formatted result.

Fixes #13173
2018-12-12 11:13:08 -08:00
Pascal Honegger
63a9bd464f docs: remove space for webpack-bundle-analyzer url 2018-12-10 13:41:12 -08:00
cexbrayat
4567aa1de4 style(@angular-devkit/build-angular): typo in stylesSourceMap 2018-12-10 13:39:25 -08:00
Alan Agius
51f4e075db test: remove debounce as it's causing flakes 2018-12-06 11:46:58 -08:00
Alan Agius
43231d9507 refactor: script webpack plugin remove webpack 3 code 2018-12-06 11:44:55 -08:00
Alan Agius
18ff08dfb3 refactor: remove webpack 3 code from cleancss plugin 2018-12-06 11:44:42 -08:00
Alan Agius
eaad125da9 refactor: normalizeFileReplacements and normalizeAssetPatterns no longer use rxjs 2018-12-06 11:44:27 -08:00
Alan Agius
af67b49342 refactor: clean up how to generate normalized build options and improve type safety 2018-12-06 11:44:27 -08:00
Alan Agius
4f8a5b7a55 feat(@angular-devkit/build-angular): fine grain settings for optimization 2018-12-06 11:44:27 -08:00
Alan Agius
45b6df511f fix(@angular-devkit/build-angular): lint non human readable formatters produces invalid output
fixes #12674
2018-12-06 11:24:27 -08:00
Alan Agius
8bc6e79d89 fix(@ngtools/webpack): files are not being updated when using allowJs or resolveJsonModule (#13089)
* fix(@ngtools/webpack): files are not being updated when using `allowJs` or `resolveJsonModule`

Fixes #13076 and Fixes #12964

* test: add tests for allowJs and resolveJsonModule in watch mode

* test: improve tests for `allowJs`

When not using `allowJs` js files are not processed by the tsc compiler, but still processed by webpack.

So a correct test should be to check that the JS is transpiled down to ES5 syntax.
2018-11-30 14:10:18 -08:00
Alan Agius
0692cacd06 feat(@schematics/angular): account for root level assets and resourcesOutputPath (#13074)
* feat(@schematics/angular): account for root level assets and `resourcesOutputPath`

By default we are only account for assets inside the assets folder. Which breaks the offline experience.

Fixes #13067

* test: add test to verify root level assets in service workers
2018-11-30 14:08:03 -08:00
Alan Agius
cd66d27170 refactor: deprecate evalSourceMap (#13063)
Missed a couple in https://github.com/angular/angular-cli/pull/12966
2018-11-30 14:06:55 -08:00
Alan Agius
8516d68213 feat(@angular-devkit/build-angular): fine grain settings for sourceMaps (#13062)
* feat(@angular/cli): update schema to match new `sourceMap`

* feat(@angular-devkit/build-angular): fine grain settings for sourceMaps

This PR add more control over which sourceMaps you want, Now you can enable sourceMaps for scripts only, styles only or both. Also we added another functionality which are hidden sourcemaps. These are normaly used for error reporting tools.

Fixes #7527
2018-11-30 13:11:52 -08:00
Alan Agius
508d4df482 choreUpdate angular and tsickle dependencies (#13034)
* build: update `@angular/packages` to `7.1.0`

* feat(@schematics/angular): use tsickle `>=0.34.0` when creating a library

This is the official version that supports 3.1+

* feat(@schematics/angular): use angular version `7.1.0`
2018-11-27 14:02:23 -08:00
Charles Lyding
bd55bf01d5 refactor(@angular-devkit/build-angular): enable direct template loading 2018-11-18 10:41:47 -08:00
Alan Agius
282eb52e08 refactor: use buildOptions directly 2018-11-15 17:09:43 -08:00
Alan Agius
a38566f18e feat(@angular-devkit/build-angular): add option to allow outputting css resources to a different folder
Added `resourcesOutputPath` option so that CSS assets such as images and fonts are outputted to a subfolder in `dist`
2018-11-15 17:09:43 -08:00
Charles Lyding
c631c1852f test: update angular test dependencies 2018-11-15 17:07:59 -08:00
Alan Agius
67630f5270 fix(@angular-devkit/build-angular): remove skipAppShell as it has no effect in browser builder
Closes #11478
2018-11-15 17:07:25 -08:00
Alan Agius
3c875a1148 refactor: deprecate evalSourceMap
This was previously done for build performance, however this is no needed anymore
2018-11-15 17:06:27 -08:00
Alan Agius
1dbd574714 fix(@ngtools/webpack): Fix lazy loading (#12945)
* revert: fix(@ngtools/webpack): output consistent filename

This reverts commit df172bdc8af4caa1a908592a8b9400d31c81eeb0.

* refactor(@ngtools/webpack): remove RegExp for ngfactory

This RegExp is not needed as if it actually works it will break lazy loading as in case of AOT, the name should always be suffixed with ngfactory

4c2ce4e8ba/packages/core/src/linker/system_js_ng_module_factory_loader.ts (L83)
2018-11-14 12:41:27 -08:00
Cédric Exbrayat
3c8b33ab3a fix(@angular-devkit/build-angular): add a base href to karma context (#12889)
This commits adds a base href value in the karma context iframe used to run unit tests.

It solves a very old issue in Angular https://github.com/angular/angular/issues/12295 where a unit test throws:

    No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.

even if the application is fine. This is because the `index.html` from Angular CLI contains a base href value, but not the Karma context iframe. So when adding a unit test with a testing module that imports a NgModule, for example `AppModule`, which itself imports `RouterModule`, the unit test used to throw an error (regression appeared in router 3.1).

That could be solved by either adding `RouterTestingModule` to the testing module, or by adding a provider `{ provide: APP_BASE_HREF, useValue: '/' }`, but required to understand the issue (see how many thumbs up there are on the original issue).

This solves the issue in a transparent way: developers won't even encounter the problem anymore.
2018-11-08 10:34:35 -08:00