841 Commits

Author SHA1 Message Date
Renovate Bot
78acd2aeed build: update sass to version 1.22.8 2019-07-24 19:04:02 -07:00
Alan Agius
63f0049e43 feat(@ngtools/webpack): show warning when a TS compilations contains unused files
When a tsconfig without `includes` or `files` all files under the `rootDir` will be included in the compilation. This results in redundant files to inserted as part of the ts compilation which in some cases might reduce the compilation drastically.

Related to: TOOL-949
2019-07-24 19:03:35 -07:00
Charles Lyding
069a18200e fix(@angular-devkit/build-angular): support pnpm with ng serve
Webpack and its development server assume the presence of two node builtins (`events` & `querystring`).  Do to package hoisting npm/yarn will usually place the shims for those two builtins at locations that webpack find them.  This is however not guaranteed nor will it work with pnpm which strictly follows the prescribed dependency tree.
To remedy this, the specific node shims are enabled only for the specific internal webpack files that are used within the development server.  This ensures that the requirements of these files does not pollute the entire application.

Fixes #13680
2019-07-24 19:03:15 -07:00
Renovate Bot
83bd1284db build: update mini-css-extract-plugin to version 0.8.0 (#15098) 2019-07-17 11:07:48 -07:00
Charles
6d4f8a249c test: remove material-design-icons package as a development dependency (#15096)
The package is quite large at 33MB (46MB on disk).  The package is also only used in one test that is already covered by an E2E test.  The E2E test does not require the package to be present for development as the test installs it within a generated project during execution.  This also has the benefit of testing the icons package in a more real world use case; as well as allowing the test to serve as a guide for a user to add the package to their own application.
2019-07-16 14:41:59 -07:00
Alan Agius
0551360035 fix(@schematics/angular): exclusively list the files in tsconfigs (#15030)
* test: update tests to work with new stricter tsconfig file inclusions

* fix(@schematics/angular): exclusively list the files in tsconfigs

With the omission of `includes` or `files` in tsconfig files tsc will pick up all the files under the rootDir and make them as part of the compilation. In certain cases, redundant files will be picked up which will cause a slower compilations.

Related to: TOOL-949
2019-07-16 11:04:29 -07:00
Charles
f8a58213eb feat(@angular-devkit/build-angular): add defer attributes to classic scripts (#15087)
This change synchronizes the behavior of classic scripts and module scripts (`type="module"`).  Module scripts are deferred by default.  Also, certain injected scripts are not considered module scripts even in a ES2015+ build due to the strict mode behavior of module scripts.  Deferring such scripts also ensures consistent execution in those scenarios.
2019-07-16 09:58:19 -07:00
Minko Gechev
d274add7b4
fix(@angular/cli): use correct schematic defaults considering workspace (#15041)
Fix #14986

This PR includes some refactoring to simplify the interaction
of the `NodeWorkflow` and the `BaseWorkflow` with the registry.

We were registering redundant `addPostTransform`s. Some of them in
the constructor of the `BaseWorkflow`, which did not allow us to
intercept `addUndefinedDefaults`.

Additionally, we were setting the `validateOptionsWithSchema` transform
multiple times unnecessarily.

An issue left to fix is support for the `--project` option in
schematic commands. Currently, `getProjectName` does not know about
this option, since `createWorkflow` does not know how to parse the
command line arguments. The parsing logic is implemented partially
by the concrete implementation of the `SchematicCommand` template
method.
2019-07-16 09:58:01 -07:00
Renovate Bot
bf8441304c build: update sass to version 1.22.5 (#15089) 2019-07-16 07:27:26 -07:00
Renovate Bot
f568fe0684 build: update browserslist to version 4.6.6 (#15072) 2019-07-15 13:56:56 -07:00
Renovate Bot
20696fa9db build: update sass to version 1.22.4 (#15055) 2019-07-15 09:49:56 -07:00
Renovate Bot
1959b3b4c7 build: update ajv to version 6.10.2 (#15073) 2019-07-15 09:49:23 -07:00
Renovate Bot
d6df5d22a2 build: update caniuse-lite to version 1.0.30000984 (#15069) 2019-07-15 09:48:54 -07:00
Renovate Bot
7e80c12bcd build: update karma to version ~4.2.0 (#15068) 2019-07-15 09:48:41 -07:00
Alan
2676c2d86a refactor(@angular-devkit/build-optimizer): refactor wrap enums
Most of the logic that can find class statements to wrap can be used to wrap Enums, with the exception of TS 2.3+ enums which is slightly different.

This PR combines the enums and classes lookup logic and also simplifies the TS 2.3+ enum lookup logic
2019-07-11 19:11:51 -07:00
Renovate Bot
1bf6b3c2a4 build: update inquirer to version 6.5.0 2019-07-11 19:11:13 -07:00
Renovate Bot
77f2af00bb build: update browserslist to version 4.6.4 2019-07-10 15:26:07 -07:00
Alan
885005241e build: update webpack to version 4.35.3 2019-07-11 01:21:18 +08:00
Renovate Bot
d29cf86aa6 build: update ajv to version 6.10.1 2019-07-11 01:20:36 +08:00
Renovate Bot
bf87dd3d22 build: update caniuse-lite to version 1.0.30000983 2019-07-11 01:20:08 +08:00
Filipe Silva
9d9d46bab3 refactor: use buildOptimizerLoaderPath 2019-07-11 01:18:26 +08:00
Filipe Silva
9b7f196a80 feat(@angular-devkit/build-angular): run Build Optimizer only on TS-generated files 2019-07-11 01:18:26 +08:00
Filipe Silva
7d9ead4261 feat(@angular-devkit/build-optimizer): add BuildOptimizerWebpackPlugin
Using this webpack allows determining in advance if files from a package should be skipped by the Build Optimizer loader.
2019-07-11 01:18:26 +08:00
Alan
b48dede4e0 fix(@angular-devkit/build-angular): fix sourcemaps paths
`output.devtoolModuleFilenameTemplate` is not used when `SourceMapDevToolPlugin`

671cb184e3/lib/SourceMapDevToolPlugin.js (L77)

Current stacktraces are not properly formatted
```
http://localhost:9876/_karma_webpack_/webpack:/src/app/dummy.component.spec.ts:36:76
```

With this change we wil change this to
```
http://localhost:9876/src/app/validation-directive.ts:13:23
```

This also allows users to click on the stacktrace in the browser and go to source.
2019-07-11 01:17:57 +08:00
Charles Lyding
8e97df3888 feat(@angular-devkit/build-angular): allow control of index output path
This allows the output path of an application's index HTML file to be controlled independently of the input file.  The output path for the file will be considered relative to the application's configured output path.  This allows an application to contain multiple input index files for different configurations and allow the output file to remain constant.  This also enables the placement of the index file in a subdirectory within the output path or change the name of the output index file neither of which was previously possible.
2019-07-10 04:34:20 +08:00
Alan Agius
85011b36d3 build: update angular packages to 8.1.0 2019-07-10 04:17:05 +08:00
Alan Agius
86266a39fa fix(@ngtools/webpack): resources path normalizations
Compiler host `readResource` is always called with POSIX seperators. However the `denormalizePath` method doesn't convert forward slashes to back slashes which causes `getModifiedResourceFiles` to return an empty `Set`.

We were also assuming that `_changedFiles` is an FS path which was not the case as it's original type is `Path`

Fix #15012
2019-07-10 04:17:05 +08:00
Renovate Bot
aadaf093e4 build: update caniuse-lite to version 1.0.30000981 2019-07-10 04:15:47 +08:00
Charles Lyding
445f3873b9 fix(@angular-devkit/build-angular): use query option to set sockJS path in dev-server
Fixes #15002
2019-07-10 04:15:30 +08:00
Charles Lyding
8752f21abd fix(@angular-devkit/build-optimizer): wrap classes with a let variable
Classes can technically be re-assigned.  By using a let variable this behavior will be retained and prevent potential runtime errors.

Fixes #14930
2019-07-10 04:14:07 +08:00
Charles Lyding
f6953f0123 fix(@angular-devkit/build-angular): only add module script types to actual module scripts
`ng serve` was errantly adding a module type to custom script bundles.  These scripts may contain ES5 and non-strict compatible code and can therefore not be marked as module scripts.  `ng build` already correctly operates in this fashion.

Fixes #14952
2019-07-10 04:13:43 +08:00
Joey Perrott
5da90e9075 ci: setup RBE on CI 2019-07-10 04:07:42 +08:00
Renovate Bot
bfb03d2ab2 build: update autoprefixer to version 9.6.1 2019-07-10 04:06:04 +08:00
Renovate Bot
072ddd3dbd build: update sass to version 1.22.3 2019-07-10 04:05:50 +08:00
vikerman
5ef0846214 fix(@angular-devkit/architect): one more fix for newest version of rxjs 2019-07-02 12:46:30 -07:00
Renovate Bot
64eff51be6 build: update semver to version 6.2.0 2019-07-02 12:44:06 -07:00
Renovate Bot
a41e94a568 build: update magic-string to version 0.25.3 2019-07-02 12:43:24 -07:00
Renovate Bot
5b372dc7dd build: update sass to version 1.22.2 2019-07-02 11:08:08 -07:00
Hans Larsen
fd512b8217 refactor: do not report errors if there is no errors to report 2019-07-02 11:07:13 -07:00
Hans Larsen
af6c6d41d5 refactor: add count of component to analytics 2019-07-02 11:07:13 -07:00
Alan
2b367be1c3 feat(@angular-devkit/build-angular): deprecate scripts and styles lazy option in favor ofinject
The lazy option inside the script and style option is confusing as this option doesn't lazy load a bundle but rather it doesn't inject/reference the script in the HTML. While this option is an enabler for lazy loading, the users will still need to handle on how how this bundle will be lazy loaded. There are also potential use cases beyond lazy loading for the option.

Closes #14814
2019-07-02 11:05:51 -07:00
Alan Agius
8754ecbf99 fix(@angular-devkit/build-angular): IE11 errors when using scripts and differential loading
Invert the builds so that es2015 scripts output don't override the es5 version.

Fixes #14777
2019-07-02 10:58:36 -07:00
Charles Lyding
99fa7bd71f test: add initial ivy large test support 2019-07-02 10:04:09 -07:00
vikerman
77d4dd9733 fix(@angular-devkit/architect): fix for newest version of rxjs 2019-07-01 16:36:43 -07:00
Renovate Bot
fb8deb06d3 build: update webpack to version 4.35.2 2019-07-01 11:39:56 -07:00
Renovate Bot
c22d0d0268 build: update caniuse-lite to version 1.0.30000979 2019-07-01 11:38:37 -07:00
Renovate Bot
821d2fa4a7 build: update open to version 6.4.0 2019-07-01 11:37:50 -07:00
Alan Agius
68227565ce feat(@angular-devkit/build-angular): add crossorigin options
This options allows to define the crossorigin attribute setting of elements that provide CORS support

Closes #14743
2019-06-27 15:12:43 -07:00
Alan
70a4cbe306 style: enable no-debugger and no-console tslint rules 2019-06-27 09:28:35 -07:00
Suguru Inatomi
4bfa4e0c06 fix(@angular-devkit/build-angular): add Symbol.iterator polyfill for legacy browsers 2019-06-27 09:26:31 -07:00