18554 Commits

Author SHA1 Message Date
Joey Perrott f815aa1991 build: add configuration for the caretaker command (#38601)
Add configuration information for the new caretaker command

PR Close #38601
2020-09-01 13:05:37 -07:00
Joey Perrott 1523f217e2 feat(dev-infra): check services/status information of the repository for caretaker (#38601)
The angular team relies on a number of services for hosting code, running CI, etc. This
tool allows for checking the operational status of all services at once as well as the current
state of the repository with respect to merge and triage ready issues and prs.

PR Close #38601
2020-09-01 13:05:35 -07:00
David Shevitz 626ac45482 docs: Restructure table of contents to provide a more streamlined experience (#38658)
PR Close #38658
2020-08-31 17:11:27 -07:00
crisbeto a938180688 fix(compiler): incorrectly inferring namespace for HTML nodes inside SVG (#38477)
The HTML parser gets an element's namespace either from the tag name
(e.g. `<svg:rect>`) or from its parent element `<svg><rect></svg>`) which
breaks down when an element is inside of an SVG `foreignElement`,
because foreign elements allow nodes from a different namespace to be
inserted into an SVG.

These changes add another flag to the tag definitions which tells child
nodes whether to try to inherit their namespaces from their parents.
It also adds a definition for `foreignObject` with the new flag,
allowing elements placed inside it to infer their namespaces instead.

Fixes #37218.

PR Close #38477
2020-08-31 13:25:41 -07:00
Joey Perrott 7d5ea554e9 refactor(dev-infra): use a mixin to require a github-token for an ng-dev command (#38630)
Creates a mixin for requiring a github token to be provided to a command.  This mixin
allows for a centralized management of the requirement and handling of the github-token.

PR Close #38630
2020-08-31 12:32:29 -07:00
Dwayne Hinterlang b060837e70 docs: Remove confusion between do/avoid templates (#38647)
PR Close #38647
2020-08-31 10:25:18 -07:00
Juan José Arboleda 9a649809ca refactor(forms): remove extra space in error message (#38637)
Remove extra whitespace at package/forms/model.ts error messages

PR Close #38637
2020-08-31 09:31:58 -07:00
Paul Gschwendtner 67db658dc4 refactor(dev-infra): improve error message for unexpected version branches (#38622)
Currently the merge script default branch configuration throws an error
if an unexpected version branch is discovered. The error right now
assumes to much knowledge of the logic and the document outlining
the release trains conceptually.

We change it to something more easy to understand that doesn't require
full understanding of the versioning/labeling/branching document that
has been created for the Angular organization.

PR Close #38622
2020-08-31 09:30:00 -07:00
Joey Perrott 4e8592e610 feat(dev-infra): write outputs of command runs to ng-dev log file (#38599)
Creates infrastructure to write outputs of command runs to ng-dev log file.
Additionally, on commands which fail with an exit code greater than 1, an
error log file is created with the posix timestamp of the commands run time
as an identifier.

PR Close #38599
2020-08-31 08:47:18 -07:00
Akash d366b17b5d docs: ng generate module command doc change (#38480)
PR Close #38480
2020-08-31 08:43:22 -07:00
GavinMK 8a3785d799 docs: remove first person and space in CircleCI in the testing guide. (#38631)
PR Close #38631
2020-08-31 08:42:07 -07:00
narmit bcaafb41b1 docs: remove double space in start-data. (#38642)
PR Close #38642
2020-08-31 08:41:32 -07:00
Da-Woon Chung 9cdf857d59 docs: fix broken markdown in start/start-data (#38644)
PR Close #38644
2020-08-31 08:40:59 -07:00
Juan José Arboleda abc1c99ab5 refactor(dev-infra): remove style type from commit style guide (#38639)
The `style` commit type is not part of the commit parser config,
it should be removed from the documentation.

PR Close #38639
2020-08-31 08:40:16 -07:00
Joey Perrott cb6bf40550 fix(bazel): fix integration test for bazel building (#38629)
Update the API used to request a timestamp.  The previous API we relied on for this
test application, worldclockapi.com no longer serves times and simply 403s on all
requests.  This caused our test to timeout as the HTTP request did not handle a failure
case.  By moving to a new api, the HTTP request responds as expected and timeouts
are corrected as there is not longer a pending microtask in the queue.

PR Close #38629
2020-08-28 11:16:42 -07:00
Joey Perrott fc600e5710 build: update ng-dev merge config to reflect new label updates (#38620)
Update the ng-dev merge configuration to reflect the new label updates

PR Close #38620
2020-08-28 08:03:26 -07:00
Joey Perrott a6ce102b44 ci: update angular robot to be based on new label updates (#38620)
Update the angular robot configuration to reflect the new label updates

PR Close #38620
2020-08-28 08:03:24 -07:00
Andrew Kushnir 76c955fe50 docs(forms): exclude internal-only methods and properties from docs (#38583)
Prior to this commit, a lot of internal-only class properties and methods (such as `ngOnChanges`)
of the Forms package directives were exposed on angular.io website. These fields are not expected
to be called externally (they are used/invoked by framework only), since they are part of internal
implementations of the following interfaces:

* Angular lifecycle hook interfaces
* ControlValueAccessor interface
* Validator interface

Having these internal-only fields in docs creates unnecessary noise on directive detail pages.
This commit adds the `@nodoc` annotation to these properties and methods to keep fields in the
golden files, but hide them in docs.

PR Close #38583
2020-08-27 16:39:40 -07:00
Paul Gschwendtner e3a71ae91d ci: update github robot to reflect new target labels (#38428)
Updates the Github robot to reflect the updated target
labels that are used as part of the canonical versioning
and labeling for the Angular organization.

PR Close #38428
2020-08-27 14:52:49 -07:00
Paul Gschwendtner 44fcc0a044 build: use new labeling and branching in merge script (#38428)
We introduced a new shared configuration for merge script
labels that follow the proposal of:
https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU

These label semantics and the branching are set up for the Angular
framework with this commit. The goal is that labeling and merging
is consistent between all Angular projects and that clear rules
are defined for branching. This was previously not the case.

PR Close #38428
2020-08-27 14:52:47 -07:00
Joey Perrott 5c3db4f149 docs: update docs to reflect new PR targeting methods for release trains (#38401)
As part of the migration to a common strategy/method for branching and releasing across
the main angular repositories, updates need to be made to the documentation. These changes
reflect the updates made and is based on the following document which describes the
merging label expectations: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU

PR Close #38401
2020-08-27 14:52:07 -07:00
Joey Perrott 43ddfbaf31 build: bump to lastest sha of angular/dev-infra's lock-closed action (#38615)
Update to the latest lock-closed action to fix the link which is used.

PR Close #38615
2020-08-27 10:58:31 -07:00
Sonu Kapoor 94fd5c772b test(docs-infra): add commands to run the unit tests (#34537)
This commit adds the necessary custom commands to run the tests in a
node environment.

PR Close #34537
2020-08-27 09:06:03 -07:00
Sonu Kapoor 1b440e8527 test(docs-infra): add missing tests for obserables and promises (#34537)
This commit adds missing tests for obserables and promises which
are both stand-alone mini-apps.

PR Close #34537
2020-08-27 09:06:01 -07:00
Sam Vloeberghs 89ff4467fd docs: add Sam Vloeberghs to GDE list (#37970)
PR Close #37970
2020-08-26 12:52:59 -07:00
George Kalpakas f00e1bc9a5 docs: remove outdated CircleCI link from DEVELOPER.md (#38554)
CircleCI updated their UI and now the URLs are different (and cannot be
constructed based on the build number alone). This commit removes a
reference of the obsolete URL pattern to avoid confusion.

Example old URL:
https://circleci.com/gh/angular/angular/<build-number>#artifacts

Example new URL:
https://app.circleci.com/pipelines/github/angular/angular/<build-number>/workflows/<workflow-id>/jobs/<job-id>/artifacts

PR Close #38554
2020-08-26 12:52:29 -07:00
Sonu Kapoor 0d439fd2c3 fix(docs-infra): add guard to not render anchor link for private api (#38589)
This commit adds a guard that prevents rendering anchor links for
private api's.

Closes #38564

PR Close #38589
2020-08-26 12:51:06 -07:00
Misko Hevery 7d8dce11c0 release: cut the v10.0.14 release 10.0.14 2020-08-26 11:32:54 -07:00
Aristeidis Bampakos 91689193bf docs: Minor fixes in NgModules section (#36177)
Apply minor fixes to various guides of the NgModules section

PR Close #36177
2020-08-25 15:24:06 -07:00
Aristeidis Bampakos d06636848e docs: add correct path for karma.conf.js file (#38571)
In the latest Angular CLI versions, the `karma.conf.js` file resides in the root folder of the Angular CLI project.

PR Close #38571
2020-08-25 09:56:35 -07:00
Aristeidis Bampakos 4e263eb391 docs: fix typo in the testing component basics guide (#38573)
The guide ends with a sentence that implies there are more tests following the end of the guide.

PR Close #38573
2020-08-25 09:56:02 -07:00
Dmitrii Kanatnikov 3c684d93c8 fix(zone.js): zone.js toString patch should check typeof Promise is function (#38350)
Close #38361

zone.js monkey patch toString, and check the instance is `Promise` or not by using `instanceof Promise`,
sometimes when Promise is not available, the `instanceof` operation fails
and throw `TypeError: Right-hand side of 'instanceof' is not an object`
this PR check `typeof Promise` equals to function or not to prevent the error.

PR Close #38350
2020-08-25 09:51:54 -07:00
Misko Hevery 81db6a3171 release: cut the v10.0.12 release 10.0.12 2020-08-24 15:15:10 -07:00
windmichael 8224e65e70 docs(localize): fix angular.json syntax (#38553)
In chapter internationalization (i18n) at section "Deploy multiple locales" the syntax for angular.json is wrong.
This commit fixes the angular.json, when specifying the translation file and the baseHref for a locale.

PR Close #38553
2020-08-24 09:25:38 -07:00
Keen Yee Liau 9e50cef507 test(language-service): [Ivy] return cursor position in overwritten template (#38552)
In many testing scenarios, there is a common pattern:

1. Overwrite template (inline or external)
2. Find cursor position
3. Call one of language service APIs
4. Inspect spans in result

In order to faciliate this pattern, this commit refactors
`MockHost.overwrite()` and `MockHost.overwriteInlineTemplate()` to
allow a faux cursor symbol `¦` to be injected into the template, and
the methods will automatically remove it before updating the script snapshot.
Both methods will return the cursor position and the new text without
the cursor symbol.

This makes testing very convenient. Here's a typical example:

```ts
const {position, text} = mockHost.overwrite('template.html', `{{ ti¦tle }}`);
const quickInfo = ngLS.getQuickInfoAtPosition('template.html', position);
const {start, length} = quickInfo!.textSpan;
expect(text.substring(start, start + length)).toBe('title');
```

PR Close #38552
2020-08-24 09:25:07 -07:00
Keen Yee Liau 66d8c223a9 feat(language-service): introduce hybrid visitor to locate AST node (#38540)
This commit introduces two visitors, one for Template AST and the other
for Expression AST to allow us to easily find the node that most closely
corresponds to a given cursor position.

This is crucial because many language service APIs take in a `position`
parameter, and the information returned depends on how well we can find
a good candidate node.

In View Engine implementation of language service, the search for the node
and the processing of information to return the result are strongly coupled.
This makes the code hard to understand and hard to debug because the stack
trace is often littered with layers of visitor calls.

With this new feature, we could test the "searching" part separately and
colocate all the logic (aka hacks) that's required to retrieve an accurate
span for a given node.

Right now, only the most "narrow" node is returned by the main exported
function `findNodeAtPosition`. If needed, we could expose the entire AST
path, or expose other methods to provide more context for a node.

Note that due to limitations in the template AST interface, there are
a few known cases where microsyntax spans are not recorded properly.
This will be dealt with in a follow-up PR.

PR Close #38540
2020-08-24 09:24:21 -07:00
crisbeto 814b43647d fix(compiler-cli): adding references to const enums in runtime code (#38542)
We had a couple of places where we were assuming that if a particular
symbol has a value, then it will exist at runtime. This is true in most cases,
but it breaks down for `const` enums.

Fixes #38513.

PR Close #38542
2020-08-21 12:23:24 -07:00
George Kalpakas 6b98567b6b fix(dev-infra): ignore comments when validating commit messages (#38438)
When creating a commit with the git cli, git pre-populates the editor
used to enter the commit message with some comments (i.e. lines starting
with `#`). These comments contain helpful instructions or information
regarding the changes that are part of the commit. As happens with all
commit message comments, they are removed by git and do not end up in
the final commit message.

However, the file that is passed to the `commit-msg` to be validated
still contains these comments. This may affect the outcome of the commit
message validation. In such cases, the author will not realize that the
commit message is not in the desired format until the linting checks
fail on CI (which validates the final commit messages and is not
affected by this issue), usually several minutes later.

Possible ways in which the commit message validation outcome can be
affected:
- The minimum body length check may pass incorrectly, even if there is
  no actual body, because the comments are counted as part of the body.
- The maximum line length check may fail incorrectly due to a very long
  line in the comments.

This commit fixes the problem by removing comment lines before
validating a commit message.

Fixes #37865

PR Close #38438
2020-08-21 12:17:17 -07:00
Aristeidis Bampakos 7f2a3e4b6b docs: apply code styling in template reference variables guide (#38522)
PR Close #38522
2020-08-20 13:01:37 -07:00
Ajit Singh 1775f351d6 fix(docs-infra): fix vertical alignment of external link icons (#38410)
At some places external link icons appear as a subscript. For example
https://github.com/angular/angular/blame/8366effeec8e74c1a11d2a6e1a48d42e849e4653/aio/content/guide/roadmap.md\#L37
this commit places external link icons in the middle to improve there
positioning in a line.

PR Close #38410
2020-08-20 09:40:05 -07:00
Santosh Yadav 1df52d9acd docs: udpate the details (#37967)
updating my twitter handle and bio as it is changed from
Angular and Web Tech to Angular also the
twitter handle is changed to SantoshYadavDev

PR Close #37967
2020-08-20 09:39:05 -07:00
Leon Yu 77e8db4484 docs(core): Fix typo in JSDoc for AbstractType<T> (#38541)
PR Close #38541
2020-08-20 09:30:24 -07:00
Misko Hevery c90262e619 Revert "Revert "fix(core): remove closing body tag from inert DOM builder (#38454)""
This reverts commit 87bbf69ce8.
2020-08-20 08:56:01 -07:00
Misko Hevery 87bbf69ce8 Revert "fix(core): remove closing body tag from inert DOM builder (#38454)"
This reverts commit 552853648c.
2020-08-19 21:02:55 -07:00
Bjarki 552853648c fix(core): remove closing body tag from inert DOM builder (#38454)
Fix a bug in the HTML sanitizer where an unclosed iframe tag would
result in an escaped closing body tag as the output:

_sanitizeHtml(document, '<iframe>') => '&lt;/body&gt;'

This closing body tag comes from the DOMParserHelper where the HTML to be
sanitized is wrapped with surrounding body tags. When an opening iframe
tag is parsed by DOMParser, which DOMParserHelper uses, everything up
until its matching closing tag is consumed as a text node. In the above
example this includes the appended closing body tag.

By removing the explicit closing body tag from the DOMParserHelper and
relying on the body tag being closed implicitly at the end, the above
example is sanitized as expected:

_sanitizeHtml(document, '<iframe>') => ''

PR Close #38454
2020-08-19 14:18:47 -07:00
Pete Bacon Darwin 07b99f5975 fix(localize): parse all parts of a translation with nested HTML (#38452)
Previously nested container placeholders (i.e. HTML elements) were
not being fully parsed from translation files. This resulted in bad
translation of messages that contain these placeholders.

Note that this causes the canonical message ID to change for
such messages. Currently all messages generated from
templates use "legacy" message ids that are not affected by
this change, so this fix should not be seen as a breaking change.

Fixes #38422

PR Close #38452
2020-08-19 14:16:48 -07:00
Pete Bacon Darwin 57d1a483fc fix(localize): include the last placeholder in parsed translation text (#38452)
When creating a `ParsedTranslation` from a set of message parts and
placeholder names a textual representation of the message is computed.
Previously the last placeholder and text segment were missing from this
computed message string.

PR Close #38452
2020-08-19 14:16:45 -07:00
Alex Rickabaugh d662a6449e refactor(compiler-cli): add getTemplateOfComponent to TemplateTypeChecker (#38355)
This commit adds a `getTemplateOfComponent` method to the
`TemplateTypeChecker` API, which retrieves the actual nodes parsed and used
by the compiler for template type-checking. This is advantageous for the
language service, which may need to query other APIs in
`TemplateTypeChecker` that require the same nodes used to bind the template
while generating the TCB.

Fixes #38352

PR Close #38355
2020-08-19 14:07:07 -07:00
Aristeidis Bampakos e57a2b3c47 docs: Typos fixes in the binding syntax guide (#38519)
PR Close #38519
2020-08-19 14:05:53 -07:00
atscott a3f3082bf0 release: cut the v10.0.11 release 10.0.11 2020-08-19 09:05:11 -07:00