Commit Graph

13738 Commits

Author SHA1 Message Date
Kristiyan Kostadinov d144a3bd91 fix(ivy): not throwing error for unknown properties on container nodes (#29691)
Fixes Ivy not throwing an error if it runs into an invalid property binding on a container node (e.g. `<div *ngFor="let row of rows">` instead of `<div *ngFor="let row if rows">`).

This PR resolves FW-1219.

PR Close #29691
2019-04-08 12:03:34 -07:00
Matias Niemelä 66b87cef33 fix(ivy): add dev mode counter information to styling (#29579)
In order to optimize performance for styling-related operations in
Angular, debug counters need to be introduced. This patch adds various
counters to ngDevMode which are fired each time a styling-related
binding is updated.

PR Close #29579
2019-04-08 12:03:21 -07:00
Pete Bacon Darwin c65ac7fbad perf(ivy): ngcc - exit early if the targeted package has been compiled (#29740)
Previously we always walked the whole folder tree looking for
entry-points before we tested whether a target package had been
processed already. This could take >10secs!

This commit does a quick check of the target package before doing
the full walk which brings down the execution time for ngcc in this
case dramatically.

```
$ time ./node_modules/.bin/ivy-ngcc -t @angular/common/http/testing
Compiling @angular/core : fesm2015 as esm2015
Compiling @angular/core : fesm5 as esm5
Compiling @angular/core : esm2015 as esm2015
Compiling @angular/core : esm5 as esm5
Compiling @angular/common/http : fesm2015 as esm2015
Compiling @angular/common/http : fesm5 as esm5
Compiling @angular/common/http : esm2015 as esm2015
Compiling @angular/common/http : esm5 as esm5
Compiling @angular/common/http/testing : fesm2015 as esm2015
Compiling @angular/common/http/testing : fesm5 as esm5
Compiling @angular/common/http/testing : esm2015 as esm2015
Compiling @angular/common/http/testing : esm5 as esm5

real	0m19.766s
user	0m28.533s
sys	0m2.262s
```

```
$ time ./node_modules/.bin/ivy-ngcc -t @angular/common/http/testing
The target entry-point has already been processed

real	0m0.666s
user	0m0.605s
sys	0m0.113s
```

PR Close #29740
2019-04-08 09:48:20 -07:00
Pete Bacon Darwin ed12d7e949 test(ivy): ngcc - improve and use the `MockLogger` (#29740)
Previously the console logger was being used in integration tests
leading to lots of output during test runs.

PR Close #29740
2019-04-08 09:48:20 -07:00
Keen Yee Liau cf40105fc0 build: ignore packages/bazel/node_modules (#29738)
PR Close #29738
2019-04-08 09:48:08 -07:00
Pawel Kozlowski 38a3a5a1f1 refactor(ivy): remove unused code related to listeners clanup (#29725)
PR Close #29725
2019-04-08 09:47:55 -07:00
Alan Agius 902a53a4f6 feat(bazel): update the build to use the new architect api (#29720)
With this change the builder has been updated to use the latest architect API and make it compatable with the latest CLI

Fixes https://github.com/angular/angular-cli/issues/14082

PR Close #29720
2019-04-08 09:47:34 -07:00
Alan Agius e38115536f build: update angular cli packages to latest beta (#29720)
PR Close #29720
2019-04-08 09:47:34 -07:00
Paul Gschwendtner 6d35c5094a test(core): add test for template variable object property assignment (#29708)
The `template-var-assignment` schematic currently complains if someone
assigns a value to a template variable. This will no longer work with Ivy, but
it should be totally fine to update a property of the template variable if it refers
to an object. This commit adds a test that ensures that we don't incorrectly report
any failure for such property writes in bound events.

PR Close #29708
2019-04-08 09:46:57 -07:00
Paul Gschwendtner 4a2fb86b1e refactor(core): polish failure messages for template-var-assignment schematic (#29708)
Improves the failure messages for the `template-var-assignment` schematic. After manual
testing of the schematic it's not quite clear for developers what the failure message means
without any context. The schematic now also references a short markdown file mentioning
what needs to be changed, but eventually this document needs to be expanded with more
information and context of the reasoning behind this change within Ivy.

PR Close #29708
2019-04-08 09:46:57 -07:00
George Kalpakas 8bbf481d60 refactor(docs-infra): rename properties (blacklisted --> ignored) (#29754)
PR Close #29754
2019-04-08 09:46:34 -07:00
George Kalpakas c5bba8d9f2 build(docs-infra): do not include `announcements.json` in sitemap (#29754)
The `announcements.json` file should not be included in the sitemap and
including it causes an error in Google Search Console (because the
generated URL does not exist).

(This is a follow-up to fbef94a8e.)

PR Close #29754
2019-04-08 09:46:33 -07:00
Pete Bacon Darwin e02684e609 fix(compiler-cli): ensure LogicalProjectPaths always start with a slash (#29627)
Previously, if a matching rootDir ended with a slash then the path
returned from `logicalPathOfFile()` would not start with a slash,
which is inconsistent.

PR Close #29627
2019-04-08 09:46:16 -07:00
Matias Niemelä ec56354306 fix(ivy): ensure parent/sub-class components evaluate styling correctly (#29602)
The new styling algorithm in angular is designed to evaluate host
bindings stylinh priority in order of directive evaluation order. This,
however, does not work with respect to parent/sub-class directives
because sub-class host bindings are run after the parent host bindings
but still have priority. This patch ensures that the host styling bindings
for parent and sub-class components/directives are executed with respect
to the styling algorithm prioritization.

Jira Issue: FW-1132

PR Close #29602
2019-04-05 16:49:52 -07:00
JoostK 5c13feebfd test(ivy): verify ngOnDestroy is called for tree-shakeable providers (#28943)
This test verifies that Ivy's module injector does not suffer from
#28927 to prevent regressing on this behavior going forward.

PR Close #28943
2019-04-05 09:40:00 -07:00
JoostK 30b04424a3 fix(core): call ngOnDestroy for tree-shakeable providers (#28943)
Prior to this change, any provider that was independently resolved using
its InjectableDef would not be considered when destroying the module it
was requested from. This commit provides a fix for this issue by storing
the resolved provider in the module's list of provider definitions.

Fixes #28927

PR Close #28943
2019-04-05 09:40:00 -07:00
Rado Kirov f8cdda63d4 refactor: uniformly access all index sigs with index access. (#29390)
Follow-up to https://github.com/angular/angular/pull/28937

A build-time check to enforce this is part of tsetse -
https://tsetse.info/property-renaming-safe but I don't know how to turn
it on for this repositories bazel builds.

PR Close #29390
2019-04-05 09:34:26 -07:00
Judy Bogart b6f48dbe19 docs: correct route path description (#29669)
PR Close #29669
2019-04-04 15:40:59 -07:00
Carlos Ortiz García 609024f93d fix(core): Deprecate TestBed.get(...):any (#29290)
Adds an overload to TestBed.get making parameters strongly typed and
deprecated previous signature that accepted types `any`. The function
still returns `any` to prevent build breakages, but eventually stronger
type checks will be added so a future Angular version will break builds
due to additional type checks.
See previous breaking change - #13785

Issue #26491

PR Close #29290
2019-04-04 15:32:23 -07:00
Greg Magolan 9c056b974a build(bazel): tslib.js still required in ts_devserver & ts_web_test_suite for schematics (#29694)
PR Close #29694
2019-04-04 14:27:05 -07:00
Greg Magolan c0ec8425c2 build(bazel): remove unnecessary scripts from ts_devserver & ts_web_test_suite in bazel schematics (#29694)
PR Close #29694
2019-04-04 14:27:05 -07:00
Greg Magolan b02cb3dc01 build(bazel): remove unnecessary scripts from ts_devserver & ts_web_test_suite in /integration/bazel (#29694)
PR Close #29694
2019-04-04 14:27:05 -07:00
Greg Magolan 2e66ddfdce fix(bazel): add configuration_env_vars = ["compile"] to generated @npm//@angular/bazel/bin:ngc-wrapped nodejs_binary (#29694)
PR Close #29694
2019-04-04 14:27:04 -07:00
Greg Magolan 7fbe138b1f build(bazel): update to nodejs rules 0.27.10 (#29694)
PR Close #29694
2019-04-04 14:27:04 -07:00
Judy Bogart 0c47dc0466 docs: add universal terms to glossary (#28492)
PR Close #28492
2019-04-04 14:26:36 -07:00
Keen Yee Liau 2bd9214435 fix(bazel): remove karma-jasmine from ts_web_test_suite (#29695)
It's not needed.

PR Close #29695
2019-04-04 14:26:11 -07:00
Pete Bacon Darwin 433b7b02a4 test(docs-infra): fix eslint warnings (#29673)
```
warning  An "it" that uses an async method should handle failure (use "done.fail")  jasmine/no-promise-without-done-fail
```

PR Close #29673
2019-04-04 10:52:36 -07:00
Pete Bacon Darwin a4f3f3f81d build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673)
Now, one can add an `@alias` tag to API docs, which tells dgeni that this
API element (usually a `const`) is really just an alias for some API element
defined elsewhere.

Dgeni will then look up this API element and copy over the properties from
the alias to the current doc.

For example, we would like to privately export an Enum from `@angular/core`
but then publicly export this from `@angular/common`:

**packages/core/private_exports.ts**

```ts
/**
 * Description of this document.
 */
export enum ɵSomeEnum { ... }
```

**packages/common/public_api.ts**

```ts
import {ɵSomeEnum} from '@angular/core';

 /**
 * @alias core/ɵSomeEnum
 */
export const SomeEnum = ɵSomeEnum;
```

In the generated docs there will be a page for `common/SomeEnum`, which
will be rendered as an enum, rather than a const, showing the description
extracted from the `core/ɵSomeEnum`.

---

The implementation of this feature required some refactoring of the other
processing:

1. Previously `ɵ` prefixed exports were not even considered.
2. Due to 1. some processors needed to have guards added to ignore such
   private exports (`addMetadataAliases` and `checkContentRules`).
3. The processing of package pages had to be reworked (and split) so that
   it picked up the aliased export docs after their alias proeprties had
   been copied.

See FW-1207, FW-632, #29249

PR Close #29673
2019-04-04 10:52:36 -07:00
Pete Bacon Darwin 6233cd55f7 style(docs-infra): fix typo (#29673)
PR Close #29673
2019-04-04 10:52:36 -07:00
Paul Gschwendtner c3aea737ff build: add render3 entry-point to legacy test systemjs config (#29675)
Until the legacy job has been migrated to Bazel w/ Saucelabs, we
need to add the `render3` entry-point to the test SystemJS configuration
so that developers don't get inconsistent behavior between Bazel tests
and the legacy tests. e.g. https://circleci.com/gh/angular/angular/270102

PR Close #29675
2019-04-04 10:52:11 -07:00
musou1500 eaa49bdc04 docs: fix typo in getting-started/routing (#29676)
PR Close #29676
2019-04-04 10:51:44 -07:00
Filipe Silva 96b76dc3f1 fix(core): add missing migration to npm package (#29705)
While running `ng update @angular/core --next`, the following error would be displayed:

```
Cannot find module '....\node_modules\@angular\core\schematics\migrations\template-var-assignment\index'
```

This happened because the Schematics migration was referenced, but not included.

This commit fixes that bug by including the migration in the Bazel npm package dependencies.

PR Close #29705
2019-04-04 10:51:19 -07:00
zverbeta afd2417ecd docs: add ibm carbon ui library (#29706)
PR Close #29706
2019-04-04 10:50:05 -07:00
Ben Lesh 699ecac2c2 refactor(ivy): Add i18n create op codes debug info (#29348)
Simply adds a `debug` property to the array of create opcodes while inside
`readCreateOpCodes` in i18n. This `debug` property has a property called `operations`
that is a human-readable list of operations that will be performed, as derived
from the op codes themselves, and the view it's acting upon.

PR Close #29348
2019-04-03 15:54:42 -07:00
Dave c7ff728723 docs: add angular.de to the workshops page (#28856)
undo unrelated whitespace change

PR Close #28856
2019-04-03 15:39:20 -07:00
Maxime Lafarie d96f62fdc4 docs: add ngx-smart-modal to doc resources (#29661)
PR Close #29661
2019-04-03 15:36:29 -07:00
Stephen Fluin b9fead7f83 docs: update announcements for home page (#29671)
Updated dates, add tracking to links

PR Close #29671
2019-04-03 15:36:03 -07:00
George Kalpakas 648adb1894 build(docs-infra): upgrade cli command docs sources to b00300ebd (#29679)
Updating [angular#master](https://github.com/angular/angular/tree/master) from [cli-builds#master](https://github.com/angular/cli-builds/tree/master).
Relevant changes in [commit range](f63f8c60f...b00300ebd):

**Modified**
- help/build.json
- help/generate.json

PR Close #29679
2019-04-03 15:31:15 -07:00
Alan 9810c6c0f9 fix(bazel): support running ng-add on minimal applications (#29681)
Minimal applications don't have `test` and `e2e` targets but we are not currently checking if they exists.

Fixes #29680

PR Close #29681
2019-04-03 15:30:46 -07:00
RudarDaman 8e83b3bec1 docs: remove trailing comma in BAZEL.md (#29682)
PR Close #29682
2019-04-03 15:30:20 -07:00
Pete Bacon Darwin 3246399bff fix(ivy): ngcc - show logging via CLI by default (#29686)
The new logger implementation caused a regression where
by default the ngcc CLI did not output any logging messages.

PR Close #29686
2019-04-03 15:27:39 -07:00
Pete Bacon Darwin 0f4f315f8e test(ivy): update ngcc integration test dependencies (#29686)
PR Close #29686
2019-04-03 15:27:38 -07:00
Jason Aden 0a530e6b47 release: cut the v8.0.0-beta.11 release 2019-04-03 15:02:25 -07:00
Jason Aden dc5577dcb1 docs: release notes for the v7.2.12 release 2019-04-03 14:56:26 -07:00
Vani a6809e0e7d docs: update location API docs (#27010)
PR Close #27010
2019-04-02 16:11:28 -07:00
Vani ddb935fac7 docs: update examples region to match the description in the guide (#29259)
PR Close #29259
2019-04-02 16:09:19 -07:00
Carlos Ortiz García afd4a4ed4d feat(core): Add "AbstractType<T>" interface (#29295)
This new interface will match classes whether they are abstract or
concrete. Casting as `AbstractType<MyConcrete>` will return a type that
isn't newable. This type will be used to match abstract classes in the
`get()` functions of `Injector` and `TestBed`.
Type isn't used yet so this isn't a breaking change.

Issue #26491

PR Close #29295
2019-04-02 16:07:22 -07:00
JoostK 60afe88bcc feat(ivy): do not emit empty providers/imports for defineInjector (#29598)
The defineInjector function specifies its providers and imports array to
be optional, so if no providers/imports are present these keys may be
omitted. This commit updates the compiler to only generate the keys when
necessary.

PR Close #29598
2019-04-02 16:03:54 -07:00
JoostK 2d372f48db feat(ivy): exclude declarations from injector imports (#29598)
Prior to this change, a module's imports and exports would be used verbatim
as an injectors' imports. This is detrimental for tree-shaking, as a
module's exports could reference declarations that would then prevent such
declarations from being eligible for tree-shaking.

Since an injector actually only needs NgModule references as its imports,
we may safely filter out any declarations from the list of module exports.
This makes them eligible for tree-shaking once again.

PR Close #29598
2019-04-02 16:03:54 -07:00
JoostK 45c6360e5a feat(ivy): emit module scope metadata using pure function call (#29598)
Prior to this change, all module metadata would be included in the
`defineNgModule` call that is set as the `ngModuleDef` field of module
types. Part of the metadata is scope information like declarations,
imports and exports that is used for computing the transitive module
scope in JIT environments, preventing those references from being
tree-shaken for production builds.

This change moves the metadata for scope computations to a pure function
call that patches the scope references onto the module type. Because the
function is marked pure, it may be tree-shaken out during production builds
such that references to declarations and exports are dropped, which in turn
allows for tree-shaken any declaration that is not otherwise referenced.

Fixes #28077, FW-1035

PR Close #29598
2019-04-02 16:03:54 -07:00