Commit Graph

15987 Commits

Author SHA1 Message Date
George Kalpakas a2d2a5d572 build(docs-infra): enable `fullTemplateTypeCheck` (and fix failures) (#32980)
PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas b2666a2857 build(docs-infra): enable more TypeScript strictness flags (#32980)
PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas 9abc1f9156 build(docs-infra): update @angular/cli to 9.0.0-next.8 (#32980)
The payload size increase in the ES5 bundles is (at least partially)
expected, due to fixing some down-leveling corner cases.

Related CLI issue: angular/angular-cli#15673

PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas 4283e1f784 build(docs-infra): update @angular/material to 9.0.0-next.0 (#32980)
Upgrading to @angular/material 9.0.0-next.0 increases the bundle size
slightly (~1.3KB). This is a natural expectation of library
fixes/improvements.

PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas 4541b9b565 build(docs-infra): update payload sizes (#32980)
There seems to be a ~3KB regression for IVy introduced in 4e35e348a.

PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas dcd28b591d build(docs-infra): clean up and update dependencies to match latest CLI (#32980)
This commit includes the following types of changes:
- Remove unused dependencies.
- Move dev dependencies from `devDependencies` to `dependencies` (and
  vice versa for production dependencies).
- Update `@types/*`.
- Update dependencies to more closely match the dependencies installed
  by the latest CLI for new apps.

Also, ensured that the latest version of `webdriver-manager` (v12.1.7)
was installed for `protractor`, which correctly installs a ChromeDriver
version that is compatible with the latest version of Chrome.

PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas 4e1f37fc17 refactor(docs-infra): replace `mousewheel` event with `wheel` event (#32980)
This commit replaces the non-standard, depecated [mousewheel][1] event
(which is not supported in Firefox and possibly other browsers too) with
the standard [wheel][2] event, which works on all supported browsers
according to [MDN's compatibility table][3].

I manually tested it in Chrome, Firefox, Edge and IE11.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event
[2]: https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event
[3]: https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event#Browser_compatibility

PR Close #32980
2019-10-10 13:56:14 -07:00
FaustmannChr be54c580bf docs(common): Fixes typo (#33003)
PR Close #33003
2019-10-10 13:55:40 -07:00
Yulia Tsareva 676a95a21c docs: fix typo in guide (#32893)
PR Close #32893
2019-10-10 13:54:58 -07:00
John Ralph Umandal a3ef3e11c4 docs: changed 'function' word in to 'steps' (#32211)
changed word for better method's interpretation.

PR Close #32211
2019-10-10 13:54:23 -07:00
John Ralph Umandal 57d099ceea docs: fixed a misleading sentence (#32211)
Reading this sentence, make the reader think that the second argument strictly accepts one single animate, which is not
PR Close #32211
2019-10-10 13:54:23 -07:00
Alex Rickabaugh 6028159dfb release: cut the v9.0.0-next.10 release 2019-10-09 14:43:34 -07:00
Alex Rickabaugh 748edb81ec docs: release notes for the v8.2.10 release 2019-10-09 14:14:23 -07:00
crisbeto 305f3686c3 build: fix compilation error in benchmark (#33067)
A PR that updates one of the benchmarks and another one that changes the signature for `elementStart` got in around the same time which is causing a compilation error. These changes fix the error.

PR Close #33067
2019-10-09 13:40:10 -07:00
Pete Bacon Darwin 009cab8dce test(ivy): i18n - add compile time translation to integration test (#32881)
PR Close #32881
2019-10-09 13:19:38 -07:00
Pete Bacon Darwin 90855f331f refactor(ivy): i18n - rename `I18nError` to `TranslationParserError` (#32881)
This closer reflects what caused the error.

PR Close #32881
2019-10-09 13:19:38 -07:00
Pete Bacon Darwin 2cdb3a079d feat(ivy): i18n - implement compile-time inlining (#32881)
This commit implements a tool that will inline translations and generate
a translated copy of a set of application files from a set of translation
files.

PR Close #32881
2019-10-09 13:19:38 -07:00
crisbeto d5b87d32b0 perf(ivy): move attributes array into component def (#32798)
Currently Ivy stores the element attributes into an array above the component def and passes it into the relevant instructions, however the problem is that upon minification the array will get a unique name which won't compress very well. These changes move the attributes array into the component def and pass in the index into the instructions instead.

Before:
```
const _c0 = ['foo', 'bar'];

SomeComp.ngComponentDef = defineComponent({
  template: function() {
    element(0, 'div', _c0);
  }
});
```

After:
```
SomeComp.ngComponentDef = defineComponent({
  consts: [['foo', 'bar']],
  template: function() {
    element(0, 'div', 0);
  }
});
```

A couple of cases that this PR doesn't handle:
* Template references are still in a separate array.
* i18n attributes are still in a separate array.

PR Close #32798
2019-10-09 13:16:55 -07:00
Pete Bacon Darwin b2b917d2d8 feat(ngcc): expose `--create-ivy-entry-points` option on ivy-ngcc (#33049)
This allows a postinstall hook to generate the same
output as the CLI integration does.

See https://github.com/angular/angular/pull/32999#issuecomment-539937368

PR Close #33049
2019-10-09 13:16:16 -07:00
Pawel Kozlowski 9f0c549bc8 perf(ivy): avoid memory allocation in the isAnimationProp check (#32997)
Accessing a string's character at index allocates a new, single character string.
A better (faster) check is to use `charCodeAt` that doesn't trigger allocation.

This simple change speeds up the element_text_create benchmark by ~7%.

PR Close #32997
2019-10-08 13:02:11 -07:00
Pawel Kozlowski affae99b22 perf(ivy): add static attributes to the element_text_create benchmark (#32997)
PR Close #32997
2019-10-08 13:02:11 -07:00
Alex Rickabaugh ed711418f1 style(bazel): fix 2 unformatted .bzl files 2019-10-08 10:45:48 -07:00
Alex Eagle c653a16b57 build: load build_bazel_rules_nodejs through external (#33041)
PR Close #33041
2019-10-08 10:24:41 -07:00
Greg Magolan 64823f561c build: add history-server to @angular/bazel schematics (#32889)
The history_server rule is not longer shipped with rules_nodejs as it has been replaced by auto-generated rule `load("@npm//history-server:index.bzl", "history_server")` which requires the user to add history-server to their package.json.

PR Close #32889
2019-10-08 09:27:11 -07:00
Greg Magolan e1d07b2fd2 build: add JSEcmaScripModuleInfo provider to ng_module (#32889)
PR Close #32889
2019-10-08 09:27:11 -07:00
Alex Eagle cdfbda3d3b build: add missing http-server dep to bazel example (#32889)
Also update rules_nodejs 0.38.0->0.38.1

PR Close #32889
2019-10-08 09:27:11 -07:00
Paul Gschwendtner 78ada980a6 ci: avoid postinstall error when building material-unit-tests job (#32889)
The components repository updated to rules_nodejs#0.38.0 before Angular Bazel did.
To do this, the `@angular/bazel` v0.38.0 compatibility changes were patched on postinstall.

This now conflicts because we install a `@angular/bazel` version in the `material-unit-tests` job
that already includes these compatibility changes. This would result in the patch being a noop
for which the `patch` command throws an error.

We can remove this once components can install a released version of `@angular/bazel` that is
compatible with `rules_nodejs#0.38.0`.

PR Close #32889
2019-10-08 09:27:11 -07:00
Paul Gschwendtner 3830f6fc14 ci: update material-unit-test commit (#32889)
Updates the `material-unit-test` job to run tests against
the latest commit of the Angular Components repository.

We need to update to a version where components already
updated to `rules_nodejs#0.38.0`.

PR Close #32889
2019-10-08 09:27:11 -07:00
Alex Eagle f783244ad1 build: update to rules_nodejs 0.38 (#32889)
PR Close #32889
2019-10-08 09:27:11 -07:00
crisbeto 2265cb5938 refactor(core): remove deprecated Renderer (#33019)
Removes the `Renderer` and related symbols which have been deprecated since version 4.

BREAKING CHANGES:
* `Renderer` has been removed. Use `Renderer2` instead.
* `RenderComponentType` has been removed. Use `RendererType2` instead.
* `RootRenderer` has been removed. Use `RendererFactory2` instead.

PR Close #33019
2019-10-08 09:23:00 -07:00
Danny Skoog c507dda21a docs: correct sentence in AoT compiler guide (#33020)
PR Close #33020
2019-10-07 13:13:57 -07:00
Koala 40d87dd801 docs: fix accessibility lint rules (#32661)
Add and fix accessibility rules, bump codelyzer to support pseudo events
for template-click-events-have-key-events rule.

PR Close #32661
2019-10-07 11:22:48 -07:00
Santosh Yadav 0ce8621196 docs: add dotnettricks to training (#32771)
PR Close #32771
2019-10-07 11:03:03 -07:00
Atef Ben Ali 2089727db9 docs: add missing parenthesis (#31041)
PR Close #31041
2019-10-07 11:02:33 -07:00
Paul Gschwendtner c1bb88603e fix(common): expand type for "ngForOf" input to work with strict null checks (#31371)
Currently the `ngForOf` input accepts `null` or `undefined` as valid
values. Although when using strict template input type checking
(which will be supported by `ngtsc`), passing `null` or `undefined`
with strict null checks enabled causes a type check failure because
the type for the `ngForOf` input becomes too strict if strict null checks
are enabled. The type of the input needs to be expanded to also accept
`null` or `undefined` to behave consistently regardless of the
`strictNullChecks` flag.

This is necessary because whenever strict input type checking is enabled
by default, most of the Angular projects that use `*ngFor` with the async pipe
will either need to disable template type checking or strict null checks
because the `async` pipe returns `null` if the observable hasn't been
emitted yet.

See for example how this affects the `angular/components` repository and
how much bloat the workaround involves: https://github.com/angular/components/pull/16373/files#r296942696.

PR Close #31371
2019-10-07 11:01:22 -07:00
LASLEDJ fee28e20bb feat(forms): formGroupName and formArrayName also accepts a number (#32607)
For consistency, `FormGroupName` and `FormaArrayName` also accepts a
number as input's type like `FormControlName`

Closes https://github.com/angular/angular/issues/32436

PR Close #32607
2019-10-07 11:00:49 -07:00
Kristiyan Kostadinov 3efb060127 fix(ivy): unable to bind style zero (#32994)
Fixes not being able to bind zero as a value in style bindings.

Fixes #32984.

PR Close #32994
2019-10-07 11:00:19 -07:00
JoostK c61e4d7841 fix(ivy): process nested animation metadata (#32818)
In View Engine, animation metadata could occur in nested arrays which
would be flattened in the compiler. When compiling a component for Ivy
however, the compiler no longer statically evaluates a component's
animation metadata and is therefore unable to flatten it statically.
This resulted in an issue to find animations at runtime, as the metadata
was incorrectly registered with the animation engine.

Although it would be possible to statically evaluate the animation
metadata in ngtsc, doing so would prevent reusable animations exported
from libraries from being usable as ngtsc's partial evaluator is unable
to read values inside libraries. This is unlike ngc's usage of static
symbols represented in a library's `.metadata.json`, which explains how
the View Engine compiler is able to flatten the animation metadata
statically.

As an alternative solution, the metadata flattening is now done in the
runtime during the registration of the animation metadata with the
animation engine.

Fixes #32794

PR Close #32818
2019-10-07 10:51:37 -07:00
Santosh Yadav 393398e6f5 build(docs-infra): update in-memory-we-api and karma-jasmine-html-reporter version (#32892)
The `karma-jasmine-html-reporter` update also includes a fix for
taras42/karma-jasmine-html-reporter#31.

Fixes #29802

PR Close #32892
2019-10-07 10:51:19 -07:00
George Kalpakas e007918e35 refactor(forms): refactor `Validators.email()` regexp for easier comparison with WHATWG version (#32961)
As mentioned in the previous commit, the regexp used by
`Validators.email()` is a slightly enhanced version of the
[WHATWG one](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).

This commit refactors the regexp (without changing its behavior) to make
it more closely match the format of WHATWG version, so that it is easier
for people to compare it against the WHATWG one and understand the
differences.

The main changes were:
- Changing the order of characters/character classes inside `[...]`;
  e.g. `[A-Za-z]` --> `[a-zA-Z]`
- Mark all groups as non-capturing (since we do not use the captured
  values); e.g. `(foo)` --> `(?:foo)`
  (This could theoretically also have a positive performance impact, but
  I suspect JavaScript engines are already optimizing away capturing
  groups when they are not used.)

PR Close #32961
2019-10-07 10:51:00 -07:00
George Kalpakas 3c2770bfc7 docs(forms): expand e-mail validation description (#32961)
Previously, there was no documentation of what `Validators.email()`
expects as a valid e-mail address, making it difficult for people to
determine whether it covers their requirements or not. Even more so that
the used pattern slightly deviates from the
[WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).
One's only option was to look at the source code and try to decipher the
regexp pattern.

This commit adds a high-level description of the validator and mentions
its similarity to and differences from the WHATWG version. It also adds
a brief explanation of the regexp's behavior and references for more
information in the source code to provide more context to
maintainers/users trying to understand the implementation in the future.

Fixes #18985
Fixes #25186
Closes #32747

PR Close #32961
2019-10-07 10:51:00 -07:00
Andrew Kushnir 90fb5d9f7a fix(ivy): generate ng-reflect properties for i18n attributes (#32989)
Prior to this change, ng-reflect properties were not created in case an attribute was marked as translatable (for ex. `i18n-title`). This commit adds the logic to generate ng-reflect for such cases.

PR Close #32989
2019-10-07 10:50:44 -07:00
cexbrayat d18289fa9c fix(ivy): missing schematics field in localize package (#33025)
The schematics added in #32791 is currently failing as the package.json does not reference it.

```
> ng add @angular/localize@9.0.0-next.9
+ @angular/localize@9.0.0-next.9
added 1 package from 1 contributor in 6.745s
Installed packages for tooling via npm.
The package that you are trying to add does not support schematics. You can try using a different version of the package or contact the package author to add ng-add support.
```

PR Close #33025
2019-10-07 10:21:29 -07:00
Andrew Kushnir bad3434337 fix(ivy): avoid exposing `ng` with Closure Compiler enhanced optimizations (#33010)
Prior to this commit, the `ng` was exposed in global namespace, which turned out to be problematic when minifying code with Closure, since it sometimes clobber our `ng` global. This commit aligns Ivy debugging tools behavior with existing logic in "platform-browser" package (packages/platform-browser/src/dom/util.ts#L31) by avoiding `ng` in global namespace when Closure Compiler is used.

PR Close #33010
2019-10-07 10:19:54 -07:00
Charles Lyding 0119f46daf fix(core): set migration schematic versions to valid semver versions (#32991)
PR Close #32991
2019-10-04 13:54:39 -07:00
Charles Lyding f8eca840ee fix(core): update migration descriptions with links to AIO documentation (#32991)
PR Close #32991
2019-10-04 13:54:39 -07:00
Kristiyan Kostadinov 7f6429d802 refactor: re-enable dynamic queries migration (#32992)
Re-enables the dynamic queries migration, now that we have all of the necessary framework changes in place.

Also moves the logic that identifies static queries out of the compiler and into the static queries migration, because that's the only place left that's using it.

PR Close #32992
2019-10-04 13:54:09 -07:00
cexbrayat 94b9b7e154 docs(core): update static flag documentation (#32993)
Followup to #32720 that removed the logic that statically determines whether a query is dynamic.
This updates the docs to reflect that, and mentions that the flag now defaults to false.

PR Close #32993
2019-10-04 13:53:55 -07:00
JiaLiPassion 3a53e2c960 fix(core): ngNoopZone should have the same signature with ngZone (#32068)
Close #32063

PR Close #32068
2019-10-04 11:48:12 -07:00
Alan 01677b21b6 refactor(core): add `createMigrationCompilerHost` (#32827)
Current we need to create and override certain compiler host methods in every schematic because schematics use a virtual fs. We this change we extract this logic to a common util.

PR Close #32827
2019-10-04 11:45:35 -07:00