Commit Graph

14968 Commits

Author SHA1 Message Date
Eric Corson d3744457ab docs: fix typo in CLI overview (#31608)
PR Close #31608
2019-07-17 13:26:31 -04:00
Kapunahele Wong fc61284dbe docs: remove prerequisite section in NgModules docs (#31169)
PR Close #31169
2019-07-17 13:26:00 -04:00
crisbeto 12fd06916b fix(ivy): don't match directives against attribute bindings (#31541)
Fixes Ivy matching directives against attribute bindings (e.g. `[attr.some-directive]="foo"`). Works by excluding attribute bindings from the attributes array during compilation. This has the added benefit of generating less code.

**Note:** My initial approach to implementing this was to have a different marker for attribute bindings so that they can be ignored when matching directives, however as I was implementing it I realized that the attributes in that array were only used for directive matching (as far as I could tell). I decided to drop the attribute bindings completely, because it results in less generated code.

PR Close #31541
2019-07-16 23:59:13 -04:00
crisbeto 9e83822679 fix(ivy): a couple of typos in error messages (#31571)
Fixes a couple of typos that were noticed after the initial PR (#31543) got merged in.

PR Close #31571
2019-07-16 23:58:52 -04:00
Judy Bogart 54794f9b31 docs: clarify docs for runtime validation change (#31596)
PR Close #31596
2019-07-16 23:58:11 -04:00
Judy Bogart 897bd18fbc docs: clarify meaning of injectable decorator (#31573)
PR Close #31573
2019-07-16 23:57:50 -04:00
Pawel Kozlowski 1ac07757dd refactor(ivy): cleanup implementation of container related instructions (#31142)
PR Close #31142
2019-07-16 14:27:52 -04:00
Keen Yee Liau 0110de2662 fix(language-service): Eagarly initialize data members (#31577)
Data members in TypeScriptServiceHost of Map type should be eagerly
initialized to address issue/24571. This eliminates the need to
constantly check for truthiness and makes code much more readable.

More PRs to follow to address issue/24571.

PR Close #31577
2019-07-16 14:26:16 -04:00
Santosh Yadav f166b6d8f6 docs: add note about current working directory for cli projects (#31507)
Fixes #29878

PR Close #31507
2019-07-16 13:02:56 -04:00
Andrew Kushnir 09576e9683 fix(ivy): use goog.LOCALE for Closure Compiler to define default LOCALE_ID (#31519)
Prior to this commit, default value for LOCALE_ID was not setup for Closure Compiler. In Closure Compiler, we can use `goog.LOCALE` as a default value, which will be replaced at build time with current locale.

PR Close #31519
2019-07-16 13:02:10 -04:00
crisbeto 40d785f0a0 perf(ivy): avoid generating extra parameters for host property bindings (#31550)
Currently we reuse the same instruction both for regular property bindings and property bindings on the `host`. The only difference between the two is that when it's on the host we shouldn't support inputs. We have an optional parameter called `nativeOnly` which is used to differentiate the two, however since `nativeOnly` is preceeded by another optional parameter (`sanitizer`), we have to generate two extra parameters for each host property bindings every time (e.g. `property('someProp', 'someValue', null, true)`).

These changes add a new instruction called `hostProperty` which avoids the need for the two parameters by removing `nativeOnly` which is always set and it allows us to omit `sanitizer` when it isn't being used.

These changes also remove the `nativeOnly` parameter from the `updateSyntheticHostBinding` instruction, because it's only generated for host elements which means that we can assume that its value will always be `true`.

PR Close #31550
2019-07-16 13:01:42 -04:00
Pete Bacon Darwin 46c03bd866 build(docs-infra): never show linenums for triple-backticked code blocks (#31493)
PR Close #31493
2019-07-16 13:00:55 -04:00
nikz99 d5d8657d30 docs(core): Remove repeated example (#31555)
PR Close #31555
2019-07-16 13:00:26 -04:00
George Kalpakas 8853f13f82 build(docs-infra): upgrade cli command docs sources to a8fe15cb6 (#31585)
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](8fe3aa3c2...a8fe15cb6):

**Modified**
- help/analytics.json

##

PR Close #31585
2019-07-16 13:00:05 -04:00
Jon Wallsten 3166cffd28 fix(compiler-cli): Return original sourceFile instead of redirected sourceFile from getSourceFile (#26036)
Closes #22524

PR Close #26036
2019-07-15 17:33:40 -04:00
Santosh Yadav 40705f3366 docs: include svg files in stackblitz and download examples (#31559)
Fixes #31537

PR Close #31559
2019-07-15 16:48:23 -04:00
Kapunahele Wong 19bc11139d docs: fix typo in static query migration guide (#31572)
PR Close #31572
2019-07-15 16:46:33 -04:00
crisbeto 31ea254a07 fix(ivy): align NgModule assertions with ViewEngine (#31543)
Aligns Ivy's `NgModule` assertion messages with the ones from `ViewEngine` and adds a few that hadn't been implemented.

PR Close #31543
2019-07-15 13:58:19 -04:00
istiti caf8c0a437 docs: add FAQ about updating libraries to static query migration guide (#31447)
PR Close #31447
2019-07-15 13:57:43 -04:00
Stephen Fluin d6c80871f5 docs: remove and update resource list (#31469)
PR Close #31469
2019-07-15 12:23:33 -04:00
Ivan Tham edc51f76c4 style(docs-infra): fix indentation in `rx-library` example (#31553)
PR Close #31553
2019-07-15 12:13:19 -04:00
Kapunahele Wong c529be9f24 docs: add microsyntax details (#31517)
PR Close #31517
2019-07-12 17:55:57 -04:00
Pete Bacon Darwin b65e11e3c3 build(docs-infra): display CLI positional option enum values (#31529)
Previously we on;ly displayed enum values for named options.
Now positional options get equal justice.

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

PR Close #31529
2019-07-12 17:55:28 -04:00
Stefanie Fluin 3a09d01c63 fix(docs-infra): fix API list search color and styles (#31272)
- Add more spacing to inputs.
- Correct placeholder colors in inputs.
- Add aria label to input for accessibility.
- Clean up layout styles and mobile view.

Fixes #31265

PR Close #31272
2019-07-12 17:55:02 -04:00
Ayaz Hafiz 604d9063c5 feat(ivy): index template elements for selectors, attributes, directives (#31240)
Add support for indexing elements in the indexing module.
Opening and self-closing HTML tags have their selector indexed, as well
as the attributes on the element and the directives applied to an
element.

PR Close #31240
2019-07-12 17:54:08 -04:00
vikerman c4c340a7c4 fix(zone.js): fix zone for Jasmine 3.3. (#31497)
If zonejs is sent undefined callbacks it proceeds to attempt to call them, then fails, catches it own fail, rewrites the stack to hide the mistake, and reports a TypeError with a callstack unrelated to inputs.

Throw early if the callback is undefined (as can happen if JS or any-ified TS calls zone invokeTask).

Check for undefined onCommplete callback to zonejs jasmine wrapper.

PR Close #31497
2019-07-12 13:46:14 -04:00
Joey Perrott 32aa18be78 build: add tsconfig-test to dependency for tsconfig in core/test/strict_types (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
Joey Perrott 80fa84c177 build: export tsconfig-test.json file in //tools/BUILD (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
Joey Perrott e44ba0ffa9 build: use standalone strategy for TypescriptCompile and AngularTemplateCompile (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
Joey Perrott 19a28e599b build: Add incompatible_list_based_execution_strategy_selection flags back in (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
Alex Eagle 14ad7562c6 build: use remote actions for TS/NG compilations on CircleCI (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
Ayaz Hafiz 0c61a35ea3 fix(bazel): pass custom bazel compiler host rather than rewriting one (#31496)
Switch back to passing a custom bazel host instead of rewriting one that
is passed to `compile` now that the Angular indexer is stable.

Revert "feat(bazel): allow passing and rewriting an old bazel host"

This reverts commit 0a4c1c8f803a65f5c156af90e67f7d7d68ebc7f8.

PR Close #31496
2019-07-12 11:37:58 -04:00
Pete Bacon Darwin fac20bd8d1 fix(ivy): ngcc - resolve `main` property paths correctly (#31509)
There are two places in the ngcc processing where it needs to load the
content of a file given by a general path:

* when determining the format of an entry-point.
 To do this ngcc uses the value of the relevant property in package.json.
 But in the case of `main` it must parse the contents of the entry-point
 file to decide whether the format is UMD or CommonJS.

* when parsing the source files for dependencies to determine the order in
which compilation must occur. The relative imports in each file are parsed
and followed recursively, looking for external imports.

Previously, we naively assumed that the path would match the file name exactly.
But actually we must consider the standard module resolution conventions.
E.g. the extension (.js) may be missing, or the path may refer to a directory
containing an index.js file.

This commit fixes both places.

This commit now requires the `DependencyHost` instances to check
the existence of more files than before (at worst all the different possible
post-fixes). This should not create a significant performance reduction for
ngcc. Since the results of the checks will be cached, and similar work is
done inside the TS compiler, so what we lose in doing it here, is saved later
in the processing. The main performance loss would be where there are lots
of files that need to be parsed for dependencies that do not end up being
processed by TS. But compared to the main ngcc processing this dependency
parsing is a small proportion of the work done and so should not impact
much on the overall performance of ngcc.

// FW-1444

PR Close #31509
2019-07-12 11:37:35 -04:00
Andrew Kushnir 63e458dd3a fix(ivy): handle ICUs with placeholders in case other nested ICUs are present (#31516)
Prior to this fix, the logic to set the right placeholder format for ICUs was a bit incorrect: if there was a nested ICU in one of the root ICU cases, that led to a problem where placeholders in subsequent branches used the wrong ({$placeholder}) format instead of {PLACEHOLDER} one. This commit updates the logic to make sure we properly transform all placeholders even if nested ICUs are present.

PR Close #31516
2019-07-12 11:37:16 -04:00
Andrew Kushnir d545bbeee4 fix(ivy): handle ModuleWithProviders in R3TestBed correctly (#31415)
Prior to this commit, it was impossible to override providers defined via ModuleWithProviders using TestBed.overrideProvider API. The problem was caused by the fact that we were not taking into account these providers while calculating accumulated set of provider overrides. This commit updates the logic to extract providers from ModuleWithProviders and calculate the final set of overrides taking them into account.

PR Close #31415
2019-07-11 18:27:13 -04:00
George Kalpakas 4bb283cbb2 build: remove redundant `@types/source-map` dependency (#31468)
In version 0.6.1 that we are using, `source-map` ships with
[its own typings][1], so there is no need to use `@types/source-map`.
The types were even removed from `DefinitelyTyped` in
DefinitelyTyped/DefinitelyTyped@1792bfaa2.

[1]: https://github.com/mozilla/source-map/blob/0.6.1/package.json#L72

PR Close #31468
2019-07-11 17:18:12 -04:00
George Kalpakas a08b4b3519 build(compiler-cli): remove unused dependency (`shelljs`) (#31468)
Since, 7186f9c01 `compiler-cli` is no longer depending on `shelljs` for
production code. (We still use it in tests and infrastructure/tooling.)

Incidentally, this should also help with #29460.

PR Close #31468
2019-07-11 17:18:12 -04:00
George Kalpakas 0e86551a63 ci(docs-infra): run a11y audits on certain pages on CI (#31414)
PR Close #31414
2019-07-11 17:13:47 -04:00
George Kalpakas 5c738417db feat(docs-infra): support checking the scores on all audit categories (#31414)
Previously, the `test-pwa-score` script would only check the `pwa`
score. (All categories were reported, but a min. score could only be
specified for `pwa`.)

This commit adds support for checking the scores on all available
categories (such as a11y, performance, seo, etc.).

PR Close #31414
2019-07-11 17:13:47 -04:00
George Kalpakas 3d9ba19ff8 refactor(docs-infra): slightly improve log output of `test-pwa-score` (#31414)
This commit slightly improves the log outout of the `test-pwa-score`
script (e.g. by showing the total duration, indenting messages to group
them together, etc.). It, also, includes various minor refactorings.

These changes are in preparation of augmenting the script to support
checking the scores on all available categories (such as a11y,
performance, seo, etc.) in a subsequent commit.

PR Close #31414
2019-07-11 17:13:47 -04:00
George Kalpakas 8b7a4d7550 refactor(docs-infra): switch `test-pwa-score` to use headless Chrome (#31414)
This is slightly faster (15%-20%). Currently, this doesn't make a
noticeable difference, since the total time is 10s-15s, but it might
add up, if we decide to run audits on multiple pages.

PR Close #31414
2019-07-11 17:13:47 -04:00
George Kalpakas 76b755e292 build(docs-infra): upgrade lighthouse to 5.1.0 (#31414)
PR Close #31414
2019-07-11 17:13:47 -04:00
Pawel Kozlowski 565a58e261 refactor(ivy): limit usage of global state (#31490)
PR Close #31490
2019-07-11 17:13:20 -04:00
Pawel Kozlowski 7014b67e51 refactor(ivy): don't pass LView where only TView is needed (#31490)
PR Close #31490
2019-07-11 17:13:20 -04:00
George Kalpakas 6f50aad5c4 build(docs-infra): upgrade cli command docs sources to 8fe3aa3c2 (#31485)
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](9edecc522...8fe3aa3c2):

**Modified**
- help/add.json
- help/build.json
- help/update.json

##

PR Close #31485
2019-07-11 17:12:59 -04:00
crisbeto ef44f51d58 refactor(ivy): remove instruction usage from other instructions (#31456)
Removes direct calls from one instruction into another, moves the shared logic into a separate function and removes the state getters from the shared function.

This PR resolves FW-1340.

PR Close #31456
2019-07-11 15:10:20 -04:00
Hamid 9204de96a1 fix: use the correct WTF array to iterate over (#31208)
PR Close #31208
2019-07-11 15:08:54 -04:00
Kapunahele Wong 7c62a8f9ca docs: remove heroes reference in i18n example (#31515)
Closes #31514

PR Close #31515
2019-07-11 15:07:55 -04:00
Stefanie Fluin a55c6df07b feat(docs-infra): add prominent archive mode banner styling (#31245)
Fixes #25968

PR Close #31245
2019-07-11 13:00:11 -04:00
Stefanie Fluin d33204956f fix(docs-infra): fix code hover style in TOC (#31173)
Fixes #31170

PR Close #31173
2019-07-11 12:57:32 -04:00