19967 Commits
Author SHA1 Message Date
Misko Hevery 9517ae3f23 release: cut the v11.1.2 release 11.1.2 2021-02-03 14:01:50 -08:00
ayazhafiz 0ee9ea8148 refactor(language-service): pull out interfaces on package toplevel (#40621) (#40695)
This is patch PR for #40621.

Two motivations behind this change:

1. We would like to expose the types of the Language Service to external
   users (like the VSCode extension) via the npm package, on the top
   level of the package
2. We would like the View Engine and Ivy LS to share a common interface
   (notably after the inclusion of `getTcb`, the Ivy LS upholds a
   strict superset of `ts.LanguageService`; previously both VE and Ivy
   LS were aligned on `ts.LanguageService`.)

To this end, this commit refactors the exports on the toplevel of the
`language-service/` package to just be types common to both the VE and
Ivy language services. The VE and Ivy build targets then import and use
these types accordingly, and the expectation is that an external user
will just import the relevant typings from the toplevel package without
diving into either the VE or Ivy sources.

Follow up on #40607

PR Close #40621

PR Close #40695
2021-02-03 10:14:27 -08:00
Alex Rickabaugh 65ee5431b8 refactor(compiler-cli): remove the overrideComponentTemplate API (#40680)
The `TemplateTypeChecker.overrideComponentTemplate` operation was originally
conceived as a "fast path" for the Language Service to react to a template
change without needing to go through a full incremental compilation step. It
served this purpose until the previous commit, which switches the LS to use
the new resource-only incremental change operation provided by `NgCompiler`.

`overrideComponentTemplate` is now no longer utilized, and is known to have
several hard-to-overcome issues that prevent it from being useful in any
other situations. As such, this commit removes it entirely.

PR Close #40680
2021-02-03 09:14:36 -08:00
Alex Rickabaugh 0047eb3cf8 perf(language-service): update NgCompiler via resource-only path when able (#40680)
This commit changes the Language Service's "compiler factory" mechanism to
leverage the new resource-only update path for `NgCompiler`. When an
incoming change only affects a resource file like a component template or
stylesheet, going through the new API allows the Language Service to avoid
unnecessary incremental steps of the `NgCompiler` and return answers more
efficiently.

PR Close #40680
2021-02-03 09:14:36 -08:00
Alan Agius cb10bac906 docs: clarify that fileReplacements only supports compilation source files (#40687)
fileReplacements is intended to only work on compilation source files

PR Close #40687
2021-02-03 09:10:23 -08:00
George Kalpakas 058a07148c build(docs-infra): upgrade cli command docs sources to 829e1bae4 (#40685)
Updating [angular#11.1.x](https://github.com/angular/angular/tree/11.1.x) from
[cli-builds#11.1.x](https://github.com/angular/cli-builds/tree/11.1.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/73ab73f51...829e1bae4):

**Modified**
- help/new.json

PR Close #40685
2021-02-03 09:09:10 -08:00
Andrew Kushnir 3351380e0a refactor(forms): avoid duplicated code in AbstractControlStatus directive (#40651)
This commit updates `AbstractControlStatus` directive code to remove duplicated logic in getters and replaces
that logic with a new function that accepts an argument.

PR Close #40651
2021-02-03 09:08:02 -08:00
Pete Bacon Darwin 8f9ba8eca6 fix(core): ensure the type T of EventEmitter<T> can be inferred (#40644)
The `AsyncPipe.transform<T>(emitter)` method must infer the `T`
type from the `emitter` parameter. Since we changed the `AsyncPipe`
to expect a `Subscribable<T>` rather than `Observable<T>` the
`EventEmitter.subscribe()` method needs to have a tighter signature.
Otherwise TypeScript struggles to infer the type and ends up making
it `unknown`.

Fixes #40637

PR Close #40644
2021-02-03 09:07:29 -08:00
Eliran Eliassy 1d9b2c1590 docs: add eliran eliassy to GDE list (#39521)
PR Close #39521
2021-02-03 09:06:19 -08:00
George Kalpakas 20654c95d8 refactor(docs-infra): remove unused styles for .heading CSS class (#40427)
This commit removes some styles for the `.heading` CSS class which do
not have any effect (either because they are overridden in other rules
or because they do not make any difference).

NOTE:
The `.heading` class is kept in the HTML to make it easier to associate
the `.heading-children` element with its corresponding `.heading`
parent.

PR Close #40427
2021-02-02 12:04:56 -08:00
George Kalpakas d3a9211c35 refactor(docs-infra): simplify the CSS rules for styling the "collapsed/expanded" sidenav icons (#40427)
This commit simplifies the styling of the "collapsed/expanded" icons in
sidenav nav-items with children by consolidating the CSS rules in one
block (instead of having duplicate blocks for different levels).

PR Close #40427
2021-02-02 12:04:56 -08:00
George Kalpakas e7d153cd91 fix(docs-infra): fix the styling of the cards in docs introduction page (#40427)
This commit fixes the layout and appearance of the cards shown in the
docs introduction page (`/docs`) in the following ways:

- Center the cards.
- Ensure two cards are shown per line (instead of 3 one the first line
  and 1 on the second).
- Adjust their widths to ensure their content fits well in them
  (given that the cards have a fixed height).
- Use more engaging styles to better indicate that the cards are
  clickable (as discussed [here][1]).

[1]: https://github.com/angular/angular/pull/40427#discussion_r560688953

PR Close #40427
2021-02-02 12:04:56 -08:00
George Kalpakas 9bcaeac03d refactor(docs-infra): clean up styles in _card.scss (#40427)
This commit cleans up the styles in `_card.scss` by:
- Fixing incosistenct indentation/newlines.
- Removing rules for unused selectors.
- Removing unnecessary styles.

PR Close #40427
2021-02-02 12:04:56 -08:00
George KalpakasandStefanie Fluin e330cc9b31 fix(docs-infra): improve legibility and focus on content (#40427)
This commit changes the layout of the main content to improve
legibility, especially on wider screens:

- Limit main content width to 50em (800px by default).
- Center main content on the page.

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
2021-02-02 12:04:56 -08:00
George KalpakasandStefanie Fluin 06a355a5fe fix(docs-infra): improve typography styles (incl. bigger font size/line height) (#40427)
Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
2021-02-02 12:04:56 -08:00
George KalpakasandStefanie Fluin ef1910fa25 fix(docs-infra): make content links more prominent on hover (#40427)
Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
2021-02-02 12:04:56 -08:00
George KalpakasandStefanie Fluin 6a41e52c2f fix(docs-infra): improve heading styles (#40427)
This commit includes some general improvements to heading styles
(font-weight, margin/padding). It also adds a horizontal separator above
`<h2>` headings to segment important sections more easily.
(As a consequence, we can remove several `<hr />` elements right before
`<h2>` headings.)

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
2021-02-02 12:04:56 -08:00
George KalpakasandStefanie Fluin b62d4e09dd fix(docs-infra): fix padding in sidenav and ensure all nav-items have equal height (#40427)
This commit improves the padding nav-menus and nav-items in the sidenav.
It also ensures that all nav-items have the same height, regardless of
their level and of whether they have children or not.

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
2021-02-02 12:04:56 -08:00
George KalpakasandStefanie Fluin 24063b0852 fix(docs-infra): remove uppercase style from sidenav nav-items (#40427)
Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
2021-02-02 12:04:56 -08:00
George KalpakasandStefanie Fluin a208a850cc fix(docs-infra): update the sidenav background to better distinguish from main content (#40427)
Previously, we used a box-shadow to indicate that the sidenav is
separate from the main content.

This commits updates the sidenav styling to remove the shadow and give
it a slightly different background color instead.

Co-authored-by: Stefanie Fluin <[email protected]>

PR Close #40427
2021-02-02 12:04:56 -08:00
Viktor Uhryn 2dc774bc2f docs: fix typo in lazy-loading guide (#40668)
PR Close #40668
2021-02-02 12:04:22 -08:00
Alex Rickabaugh 00eeebf43f fix(compiler-cli): preserve user line endings in diagnostic template parse (#40597)
Normally the template parsing operation normalizes all template line endings
to '\n' only. This normalization operation causes source mapping errors when
the original template uses '\r\n' line endings.

The compiler already parses templates again to create a "diagnostic"
template AST with accurate source maps, to avoid other parsing issues that
affect source map accuracy. This commit configures this diagnostic parse to
also preserve line endings.

PR Close #40597
2021-01-29 11:15:16 -08:00
JiaLiPassion 6a11c9abcf refactor(router): fix several typos in router spec (#40626)
Fix a couple typos in router tests.

PR Close #40626
2021-01-29 11:14:35 -08:00
Pete Bacon Darwin b823049f89 fix(common): parse YYYY strings as UTC dates (#40629)
In b6cd38ff05 we fixed the DatePipe so
that when it parsed date strings that looked like `YYYY-MM` it created a UTC
date that was not affected by the local timezone of the JavaScript engine.

This commit does the same for date strings of the form `YYYY`.

(Note that the previous commit, mentioned above, attempted to fix this case
too but the test was not actually checking the correct input string.)

Fixes #33944

PR Close #40620

PR Close #40629
2021-01-29 11:14:05 -08:00
Pete Bacon Darwin cafd4f58c9 fix(common): parse YYYY-MM strings as UTC dates (#40620)
In 2aba8b0 we fixed the DatePipe so that when it parsed date strings
that looked like `YYYY-MM-DD` it created a UTC date that was not
affected by the local timezone of the JavaScript engine.

This commit does the same for date strings of the form `YYYY-MM`
and `YYYY`.

Fixes #33944

PR Close #40620
2021-01-28 16:00:58 -08:00
twerske 4cf9f00df7 docs: add guide for NG0302 (#40580)
new guide for pipe not found common error
link from pipe error to new guide
add embedded debugging video

PR Close #40580
2021-01-28 15:56:40 -08:00
Pete Bacon Darwin da44b474ec ci: add pete to the fw-http group (#40619)
This allows @petebacondarwin to approve PRs for the
`@angular/common/http` package.

PR Close #40619
2021-01-28 15:54:52 -08:00
Teri Glover 0e61225244 docs: fix typo to remove space (#40601)
PR Close #40601
2021-01-28 15:54:20 -08:00
Misko Hevery e706f46a16 Revert "fix(core): remove duplicated EMPTY_ARRAY constant (#40587)"
This reverts commit abdf25c679.
2021-01-28 14:36:46 -08:00
Andrew Scott 5dab521c72 fix(compiler): Don't set expression text to synthetic $implicit when empty (#40583)
When parsing interpolations, if we encounter an empty interpolation
(`{{}}`), the current code uses a "pretend" value of `$implicit` for the
name as if the interplotion were really `{{$implicit}}`. This is
problematic because the spans are then incorrect downstream since they
are based off of the `$implicit` text.

This commit changes the interpretation of empty interpolations so that
the text is simply an empty string.

Fixes https://github.com/angular/vscode-ng-language-service/issues/1077
Fixes https://github.com/angular/vscode-ng-language-service/issues/1078

PR Close #40583
2021-01-28 09:06:18 -08:00