757 Commits

Author SHA1 Message Date
Alan Agius
32bae6dbd8 refactor: small refactor in AOT plugin file 2019-06-12 14:54:15 -07:00
Judy Bogart
23553d12eb docs: remove ref to apps in ng_packagr doc 2019-06-11 10:23:43 -07:00
Judy Bogart
dc117324ac docs: differentiate lib build from app build 2019-06-11 10:23:43 -07:00
Alan Agius
69e47c2249 fix(@angular-devkit/build-angular): browsers that partially support ES6 modules are being marked as not supported
`caniuse-api` only returns `true` for a feature when it's fully supported. This might causes redundant ES5 builds if users opt to support only browsers which do support ES6 modules but either require polyfills such as Safari 10.1 or when both bundles will be downloaded such as `Edge 18`

See: 1b74c10257/src/index.js (L49) and https://github.com/Nyalab/caniuse-api/issues/82

Fixes #14580
2019-06-11 09:55:03 -07:00
Alan Agius
1dd399c4d2 fix(@angular-devkit/build-angular): nomodule polyfill for Safari
10.1 and iOS Safari 10.3

The nomodule polyfill needs to be loaded prior to any script and be
outside of webpack compilation because otherwise webpack will cause the
script to be wrapped in `window["webpackJsonp"]` which causes it to
fail.

This polyfill will only be injected when the either Safari 10.1 or iOS
Safari 10.3 support is required, which is based on the browsers  defined in browserslist file.

Fixes #14680
2019-06-11 09:55:03 -07:00
Alan Agius
473b4c4a5a test: fix flakes of rebuilds TS worker
Not quite sure why such a long 'debounceTime' is needed anything under `2500` is a constant failure locally and this is also rather flaky on CI when it doesn't run as the first test.

It seems that the outputted files contents don't get updated in time.
2019-06-11 09:54:14 -07:00
Alan Agius
905f3acae8 build: update angular framework packages to next` 2019-06-11 09:52:56 -07:00
Alan Agius
53d027837e fix(@angular-devkit/architect): error out when invalid configurations are provided
Fixes #14654
2019-06-10 13:43:39 -07:00
Renovate Bot
eacacef848 build: update browserslist to version 4.6.2 2019-06-10 13:37:03 -07:00
Renovate Bot
30345c3499 build: update postcss to version 7.0.17 2019-06-07 13:33:09 -07:00
Filipe Silva
819892a359 ci: remove appveyor and buildkite 2019-06-06 16:02:17 -07:00
Renovate Bot
66a18defc2 build: update sass to version 1.21.0 2019-06-06 16:00:41 -07:00
Alan Agius
8828a7d271 fix(@angular-devkit/build-angular): re-order ES5 polyfills in karma HTMLs
Similar to the index HTML page (6ec09919b5/tests/legacy-cli/e2e/tests/misc/support-ie.ts (L30-L37)) ES5 polyfills should be loaded prior to the other polyfills. This is because other polyfills such as `zone.js` require these for example `Symbol` and `Object.isFrozen`

Fixes #14618
2019-06-06 14:32:20 -07:00
Renovate Bot
1648a67ff2 build: update file-loader to version 4.0.0 2019-06-06 14:29:24 -07:00
Renovate Bot
301b1fe8f4 build: update webpack to version 4.33.0 2019-06-06 14:27:27 -07:00
Alan
6893fc1cdd fix(@angular-devkit/build-angular): server build is generating un-needed polyfill file
Fixes #14655
2019-06-06 14:26:30 -07:00
Alan
e3bb367db1 fix(@ngtools/webpack): rebuilding project with errors reports cannot find .ts files in JIT
When the first build in JIT has an error we are not emitting files. This ends up causing an issue because subsequent builds only trigger partial emits of files and only emits the full set of files if the number of files changed is greater than 20.

This logic adds the behavior that we only enter the 'only 20 files' part when the previous build was successful.

Fixes #14644
2019-06-06 14:25:40 -07:00
Renovate Bot
195807141c build: update autoprefixer to version 9.6.0 2019-06-06 14:25:03 -07:00
Alan Agius
8d479c93d2 test: add test to verify that the new es2015 class wrapping logic handles wrapping of tslib and tsickle classes
Related to https://github.com/ngrx/platform/issues/1905 and https://github.com/ng-packagr/ng-packagr/issues/1307

Fixes #14613
2019-06-06 14:15:30 -07:00
Alan Agius
8104fce690 fix(@angular-devkit/build-optimizer): wrap ClassDeclarations in an IIFE for better treeshaking
With this change we wrap ClassDeclarations inside an IIFE, also we move some code from the class fold into the wrap-enums.

This changes the below code:
```js
export class Foo {
	method() {
	}
}
Foo.bar = 'barValue';
__decorate([
	methodDecorator
], Foo.prototype, "method", null);
```

to

```js
export const Foo = /*@__PURE__*/ (() => {
  class Foo {
    method() {
    }
  }
  Foo.bar = 'barValue';
  __decorate([
    methodDecorator
  ], Foo.prototype, "method", null);

  return Foo;
})();
```

Fixes #14610
2019-06-06 14:15:30 -07:00
Alan Agius
f5200775f9 fix(@angular-devkit/build-optimizer): wrap es2015 class expressions for better tree-shaking
ClassExpressions such as the below are not treeshakable unless we wrap them in an IIFE

```js
let AggregateColumnDirective = class AggregateColumnDirective {
	constructor(viewContainerRef) { }
};
AggregateColumnDirective = __decorate([
	Directive({}),
	__metadata("design:paramtypes", [ViewContainerRef])
], AggregateColumnDirective);
```

With this change we wrap the above in an IIFE and mark it as a PURE function.
```js
const AggregateColumnDirective = /*@__PURE__*/ (() => {
	let AggregateColumnDirective = class AggregateColumnDirective {
		constructor(viewContainerRef) { }
	};
	AggregateColumnDirective = __decorate([
		Directive({}),
		__metadata("design:paramtypes", [ViewContainerRef])
	], AggregateColumnDirective);

	return AggregateColumnDirective;
})();
```

With this pattern if the class is unused it will be dropped.

Note: In future we should rename `wrap-enums` to something more generic, and combine class-fold with this transformer especially considering the future fix that needs to be done for https://github.com/angular/angular-cli/issues/14610

Fixes #14577
2019-06-06 14:15:30 -07:00
Alan Agius
bebd8b6c09 refactor: use standard node resolution and use async/await instead of rxjs 2019-06-06 14:07:37 -07:00
Judy Bogart
7ef64dbe46 docs: more complete description 2019-06-06 14:06:53 -07:00
Judy Bogart
3ec845caf3 docs: make connection of live-reload and public-host explicit 2019-06-06 14:06:53 -07:00
Nick Webster
a976e45f8b fix(@angular-devkit/build-angular): exclude map files from 'bundle' budgets 2019-05-30 14:05:59 -07:00
Renovate Bot
e7419d5d24 build: update semver to version 6.1.1 2019-05-30 14:05:06 -07:00
Renovate Bot
559e7423be build: update browserslist to version 4.6.1 2019-05-30 14:04:52 -07:00
Charles Lyding
19ed795cb1 fix(@angular-devkit/architect): support all observable types as build results
Fixes #14579
2019-05-30 13:33:51 -07:00
Paul Gschwendtner
a57f053867 fix(@angular/cli): ng-update migrations not running with --migrate-only
With Angular CLI version 8, migrations cannot be re-run with the
`--migrate-only` flag as there was a recent regression introduced
in e406f00909 (diff-0d0a748fb9a38a7ccde08d9b42e70bce) as it now passes
a normalized platform path to the `engine.createCollection` call.

This breaks as there is incorrect logic within
`node-modules-engine-host` that causes the schematic collection to be
searched within the `package.json#schematics` entry. This is incorrect
as migration schematics specify their migration schematics in a separate
schematic collection file which is part of `package.json#ng-update`.

Fixes #14565
2019-05-30 10:19:16 -07:00
Alan Agius
c70cf991ac refactor(@angular-devkit/architect): remove index2 from testing folder 2019-05-28 21:00:29 +02:00
Renovate Bot
80c7479bbf build: update mini-css-extract-plugin to version 0.7.0 2019-05-28 20:53:05 +02:00
Renovate Bot
c1cb92ff6b build: update core-js to version 3.1.3 2019-05-28 20:52:45 +02:00
Renovate Bot
bf7c4aadbe build: update terser-webpack-plugin to version 1.3.0 2019-05-28 20:52:15 +02:00
Renovate Bot
5df02a3de5 build: update webpack to version 4.32.2 2019-05-23 19:16:49 +02:00
Renovate Bot
db819cbd2c build: update semver to version 6.1.0 2019-05-23 19:16:31 +02:00
Alan
3a400c54cb fix(@angular-devkit/build-angular): dev-server port number mismatches in logs when using port=0
Fixes #14499
2019-05-23 19:15:50 +02:00
Charles Lyding
2b777e446f fix(@angular-devkit/core): properly replace an added value in workspace API
Replacing a previous added value in the same session should cause the replace operation to become an add operation with the original add operation elided.
2019-05-23 19:14:19 +02:00
Renovate Bot
f651a2bd30 build: update webpack to version 4.32.1 2019-05-22 14:25:36 +02:00
Renovate Bot
8d5b735cd0 build: update core-js to version 3.1.2 2019-05-22 10:04:28 +02:00
Alan
b361a97abe fix(@angular-devkit/build-angular): absolute outputPath outputs index.html in wrong location
Fixes #14474
2019-05-21 09:07:58 -04:00
Renovate Bot
6d36d1b9b6 build: update core-js to version 3.1.1 2019-05-21 09:06:51 -04:00
Alan Agius
a7f2346e14 fix(@angular-devkit/build-angular): normalize sourceMap options in karma webpack plugin
`sourceMap` option can be either a boolean or an object,we need to normalize it before trying to get the `script` value.

Fixes #14457
2019-05-21 09:01:58 -04:00
Renovate Bot
ffaf76491c build: update webpack-dev-server to version 3.4.1 2019-05-21 09:01:22 -04:00
Renovate Bot
221249d9d1 build: update terser-webpack-plugin to version 1.2.4 2019-05-15 14:31:44 -07:00
Filipe Silva
74f2ee68d6 fix(@angular-devkit/build-angular): show error for missing modules
Fix #14421
2019-05-15 14:13:44 -07:00
Renovate Bot
d02e80c528 build: update webpack-dev-middleware to version 3.7.0 2019-05-15 14:12:34 -07:00
Charles Lyding
56d6dc848b refactor(@angular-devkit/build-angular): use standard node resolution methods where possible 2019-05-15 14:12:23 -07:00
Charles Lyding
06c1e1c051 refactor(@angular-devkit/build-angular): simplify webpack stats output 2019-05-15 14:12:13 -07:00
Charles Lyding
2172db1ed0 fix(@angular-devkit/schematics): deprecate synchronous testing methods
All schematics can potentially be async.  The synchronous test method variants (`runSchematic`/`runExternalSchematic`) will fail if the schematic, any of its rules, or any schematic it calls are async.
2019-05-15 14:10:27 -07:00
Alan
e333450dc0 feat(@angular-devkit/build-angular): add a post transformation hook to index generation
Fixes #14392
2019-05-14 10:51:56 -07:00