19659 Commits

Author SHA1 Message Date
twerske d684e5a8d3 docs: add embedded videos to error guides (#40453)
add embedded youtube videos
provide visual debugging for top errors

PR Close #40453
2021-01-20 08:47:01 -08:00
David Shevitz 96e6f20ce2 docs: Return SVG topic to documentation; light edits for clarity (#40487)
PR Close #40487
2021-01-19 14:18:55 -08:00
Aristeidis Bampakos 724e44a44a docs: add Angular Builders to community resources (#40475)
PR Close #40475
2021-01-19 09:22:30 -08:00
abarghoud 9d07fa4172 feat(docs-infra): use Record type instead of key-value (#40463)
use Record type instead of key-value

Closes #39804

PR Close #40463
2021-01-19 09:21:28 -08:00
Alexey Elin 88436b11b2 docs: fix broken link to XSRF common protection mechanism (#40458)
PR Close #40458
2021-01-19 09:17:55 -08:00
Scott Wang e7ed209338 refactor(compiler): remove unused files in css_parser/ and corresponding spec tests (#37463)
Reasons for change:
- css_parser, css_ast, and css_lexer are not used anywhere and there are
no entry points from compiler.ts
- tested by building Angular and building/running aio with build-local

PR Close #37463
2021-01-15 11:37:24 -08:00
Aristeidis Bampakos 3ea6f623df docs: add Angular Nation to community resources (#40449)
PR Close #40449
2021-01-15 11:36:29 -08:00
George Kalpakas aec43ec9e6 feat(docs-infra): add shortcuts for the angular.io PWA (#40393)
This commits adds some shortcut definitions for the angular.io PWA. The
user agent can use them to assemble a context menu to be displayed by
the operating system when a user engages with the app's icon. (In
addition, shortcuts provide an easy way for users to add links to
specific pages on their home screen.)

See [here][1] for more details on the `shortcuts` property of the PWA
manifest.

The choice of pages to create shortcuts to was influenced by the
following facts/criteria:
- It seems that only the first 4 shortcuts are displayed by Chrome (at
  least on my Android phone).
- Since the PWA is mostly used on mobile, I omitted pages that are less
  likely to be useful for mobile users (such as pages related to CLI).

[1]: https://developer.mozilla.org/en-US/docs/Web/Manifest/shortcuts

PR Close #40393
2021-01-15 10:38:41 -08:00
George Kalpakas aa2582a76d refactor(docs-infra): more some pwa-manifest.json keys to the top to improve readability (#40393)
This commit moves some properties with simple, string values in
`pwa-manifest.json` to the top (i.e. above the more lengthy `icons`
array) to make them easier to discover.

PR Close #40393
2021-01-15 10:38:40 -08:00
Tibing ceca3dfac3 docs: add UI Bakery to IDEs section in resources (#40444)
PR Close #40444
2021-01-15 10:37:38 -08:00
Pete Bacon Darwin 2f7e315157 perf(ngcc): do not copy files that have been processed (#40429)
When using the `NewEntryPointWriter`, we must copy over all files from the
entry-point bundle to the new entry-point. But since we are going to
write out the modified files directly, there is no need to copy those.
This commit skips copying the files that have been modified.

PR Close #40429
2021-01-14 11:30:41 -08:00
Pete Bacon Darwin 5177750eea fix(ngcc): copy (and update) source-maps for unmodified source files (#40429)
When using the `NewEntryPointWriter` we copy unmodified files over to the new
entry-point in addition to writing out the source files that are processed by ngcc.
But we were not copying over associated source-map files for these unmodified
source files, leading to warnings in downstream tooling.

Now we will also copy over source-maps that reside as siblings of unmodified
source files. We have to make sure that the sources of the source-map point
to the correct files, so we also update the `sourceRoot` property of the copied
source-map.

Fixes #40358

PR Close #40429
2021-01-14 11:30:41 -08:00
twerske 2ff68ed638 docs: add guides for the top 10 errors (#40060)
add top 10 error guides
provide description and debugging for top errors

PR Close #40060
2021-01-14 11:28:54 -08:00
twerske 4e5dd47bda build(docs-infra): error guides in docs (#40060)
add /errors to docs
create formatting for error guides infra

PR Close #40060
2021-01-14 11:28:53 -08:00
Max Schorradt b88923b237 docs(core): change URL to shadow dom spec (#39797)
The old URL (https://w3c.github.io/webcomponents/spec/shadow/) is no longer available.
This commit updates to link to MDN instead.

Fixes #39822

PR Close #39797
2021-01-14 11:27:57 -08:00
Vytautas Petrikas 72e8899d17 docs(core): add Ivy note to entryComponents page (#35479)
PR Close #35479
2021-01-14 10:18:17 -08:00
George Kalpakas f3a96a50b6 build(docs-infra): upgrade cli command docs sources to f67800842 (#40426)
Updating [angular#11.0.x](https://github.com/angular/angular/tree/11.0.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/2677dd0a6...f67800842):

**Modified**
- help/add.json
- help/analytics.json
- help/build.json
- help/config.json
- help/deploy.json
- help/doc.json
- help/e2e.json
- help/generate.json
- help/lint.json
- help/new.json
- help/run.json
- help/serve.json
- help/test.json
- help/update.json

**Renamed**
- help/extract-i18n.json

PR Close #40426
2021-01-14 09:19:45 -08:00
Santosh Yadav a3102667a6 docs(common): updated differential loading section (#37913)
PR Close #37913
2021-01-14 09:16:36 -08:00
Bill Ludwig 5aa264f17c docs: update identity-revealed.directive.ts to use AbstractControl instead of FormGroup (#40132)
Changes example code to accept an `AbstractControl` instead of `FormGroup` in
`identityRevealedValidator` function.

Closes #40131.

PR Close #40132
2021-01-13 14:47:54 -08:00
Joey Perrott 18bc7d9ee4 build: remove pre-check script from publish scripts as it no longer performs its check (#40422)
Previously the pre-check confirmed that the stamping value was normal and expected, however
with the new stamping methodology of marking for publish via flag, the check no longer will
ever see anything but a passing version, since it is stamped as publish.

PR Close #40422
2021-01-13 14:42:59 -08:00
mgechev 3f6279d394 ci: add mgechev to docs-marketing approvers (#40396)
Add mgechev to docs-marketing approvals to allow approval of aio changes

PR Close #40396
2021-01-13 14:03:35 -08:00
Pete Bacon Darwin e2e272f6e8 build(docs-infra): fail if we attempt to autolink to a private doc (#40404)
Previously we only logged a warning if we attempted to auto-link
to a doc that had no `path` property, which implies that it is private
and is not rendered.

Now we fail hard during full doc-gen, although when running the
`yarn serv-and-sync` command it should not fail if changes are
only made to guides, which is what authors who use this tool
are most likely to do.

PR Close #40404
2021-01-13 14:03:06 -08:00
Pete Bacon Darwin 42078b19c3 build(docs-infra): ensure private exported subclasses are not rendered (#40404)
Previously, only the first layer of sub-classes were filtered to remove
private exports. But on recursing down further levels these were not
filtered out.

PR Close #40404
2021-01-13 14:03:06 -08:00
Pete Bacon Darwin 119de69e66 build(docs-infra): add @default tag-def support (#40404)
This tag-def is being used in the `platform-server` source code,
and was causing warnings in the doc-gen. Adding support
prevents the warning from being shown.
Other than that this change has no effect on the generated
documentation, since the `@default` tag is not used in any
templates.

PR Close #40404
2021-01-13 14:03:06 -08:00
Pete Bacon Darwin 5f63a312ea build(docs-infra): do not display stack trace on doc-gen error (#40404)
This commit updates `dgeni` to the latest version, which
will now only display the stack-trace after an error if the
logger is set to `debug`.

Fixes #39610

PR Close #40404
2021-01-13 14:03:05 -08:00
Alexey Elin 4f8ed35f2a docs: add links to TypeScript (#40410)
PR Close #40410
2021-01-13 14:02:33 -08:00
Keen Yee Liau fad959eae0 fix(language-service): diagnostic and definition should work for absolute url (#40412)
This commit fixes a bug in the **View Engine** implementation of
`getSemanticDiagnostics` and `getDefinitionAndBoundSpan` for node in the
decorator metadata that represents an external URL
(`templateUrl` or `styleUrls`).

The URL could be either relative or absolute, but the latter was not taken
into account.

Fix https://github.com/angular/vscode-ng-language-service/issues/1055

PR Close #40412
2021-01-13 14:01:40 -08:00
Andrew Scott c6ca7b4a12 release: cut the v11.0.9 release (#40414) 11.0.9 2021-01-13 10:49:09 -08:00
Kristiyan Kostadinov 642c45bbf1 fix(compiler): incorrectly inferring content type of SVG-specific title tag (#40259)
The parser has a list of tag definitions that it uses when parsing the template. Each tag has a
`contentType` which tells the parser what kind of content the tag should contain. The problem is
that the browser has two separate `title` tags (`HTMLTitleElement` and `SVGTitleElement`) and each
of them has to have a different `contentType`, otherwise the parser will throw an error further down
the pipeline.

These changes update the tag definitions so that each tag name can have multiple content types
associated with it and the correct one can be returned based on the element's prefix.

Fixes #31503.

PR Close #40259
2021-01-11 15:35:24 -08:00
Kapunahele Wong 3a5142a9b6 docs: edit getting started start-forms.md (#39681)
PR Close #39681
2021-01-11 15:34:13 -08:00
Kapunahele Wong 14983cc114 docs: edit getting started start-deployment.md (#40135)
PR Close #40135
2021-01-11 15:33:19 -08:00
Kapunahele Wong f73705ee66 docs: edit gh-pages instructions in deployment guide (#40139)
PR Close #40139
2021-01-11 15:32:48 -08:00
Andrew Kushnir bdb03aeaeb docs: resolve non-exiting references in contributors.json (#40369)
The previous commit introduced extra checks to verify contributors.json data and this commit contains the necessary
fixes to the problems identified by the new set of checks.

PR Close #40369
2021-01-11 15:32:22 -08:00
Andrew Kushnir eddf6fd8ba build(docs-infra): add more checks to verify contributors.json data (#40369)
This commit adds extra steps to verify contributors.json data, such as checking `lead` and `mentor` field as well as
making sure the list is sorted alphabetically.

PR Close #40369
2021-01-11 15:32:22 -08:00
Andrew Kushnir 7e0b9fd004 refactor(docs-infra): rename contributors/check-pictures.js to validate-data.js (#40369)
This commit renames contributors/check-pictures.js to contributors/validate-data.js, since this file script will also
be used to include other checks.

PR Close #40369
2021-01-11 15:32:22 -08:00
Andrew Kushnir bebf30a26c docs: include a note that all entries in contributors.json should be present in alphabetical order (#40369)
PR Close #40369
2021-01-11 15:32:22 -08:00
Andrew Kushnir 424b595bd0 docs: sort entries in contributors.json alphabetically (#40369)
Currently entries in the `contributors.json` file are not sorted and new entries are typically added at the very
end of the file, which is often causing merge conflicts. This commit updates the `contributors.json` to have all
entries sorted in alphabetical order (based on GitHub handles), which should reduce the number of merge conflicts.

PR Close #40369
2021-01-11 15:32:21 -08:00
Martin Sikora 95a7dcaf21 refactor(router): refactor and simplify router RxJS chains (#40290)
Refactor and simplifiy RxJS usage in the router package
in order to reduce its size and increase performance.

PR Close #40290
2021-01-11 15:30:56 -08:00
markostanimirovic f8495ca1c4 docs(router): clarify the description of legacy relativeLinkResolution (#40384)
PR Close #40384
2021-01-11 14:09:41 -08:00
Trotyl adf42daed6 fix(router): better ngZone checking for warning (#25839)
Do not warn that navigation was triggered outside Angular zone if the
Router was created outside Angular zone in the first place.

Closes #25837

PR Close #25839
2021-01-11 10:49:45 -08:00
George Kalpakas 001ada1bd6 refactor(service-worker): remove work-around for Chrome code highlighting bug (#40234)
Chrome debugger code highlighting bug [659515][1] has been fixed, so we
can remove the work-around.
(See #38332 for more details on the work-around.)

[1]: https://bugs.chromium.org/p/chromium/issues/detail?id=659515

PR Close #40234
2021-01-11 10:42:51 -08:00
George Kalpakas a7befd53de fix(service-worker): allow checking for updates when constantly polling the server (#40234)
Previously, the SW would wait to become idle before executing scheduled
tasks (including checks for newer app versions). It was considered idle
when it hadn't received any request for at least 5 seconds. As a result,
if the app performed polling (i.e. sent requests to the server) in a
shorter than 5 seconds interval, the SW would never detect and update to
a newer app version.
Related issue: #40207

This commit fixes this by adding a max delay to `IdleScheduler` to
ensure that no scheduled task will remain pending for longer than the
specified max delay.

PR Close #40234
2021-01-11 10:42:51 -08:00
George Kalpakas eb6ed422a9 refactor(service-worker): simplify Driver#handleFetch() method (#40234)
This commit refactors the `Driver#handleFetch()` method to not have to
call `event.waitUntil(this.idle.trigger())` in multiple places.

PR Close #40234
2021-01-11 10:42:51 -08:00
George Kalpakas 3a99adab7a refactor(service-worker): avoid unnecessarily creating Promises in Driver#deleteAllCaches() (#40234)
This commit refactors `Driver#deleteAllCaches()` to use `Array#map()`
instead of `Array#reduce()` for running async operations in parallel.
This allows avoiding having to recursively wrap Promises with
`Promise.all()`.

PR Close #40234
2021-01-11 10:42:51 -08:00
George Kalpakas 631f75d99f refactor(service-worker): notify clients about updates in parallel (#40234)
Previously, clients were notified about updates sequentially. This
wasn't necessary.

This commit changes the `Driver#notifyClientsAboutUpdate()` method to
notify the clients in parallel (by switching from `Array#reduce()` to
`Array#map()` and `Promise.all()`).

This also aligns the `notifyClientsAboutUpdate()` method with the
`notifyClientsAboutUnrecoverableState()` method.

PR Close #40234
2021-01-11 10:42:51 -08:00
George Kalpakas c01b5eabf0 fix(service-worker): ensure SW stays alive while notifying clients about unrecoverable state (#40234)
Previously, the `Driver#notifyClientsAboutUnrecoverableState()` method
would not wait for the completion of the promises created to notify the
clients. Theoretically, this could result in the SW instance's getting
destroyed by the browser before all clients have been notified. This is
extremely unlikely to happen in practice, since the async operations are
very quick, but it _is_ theoretically possible.

This commit ensures that the SW instance will remain alive while
notifying the clients by making `notifyClientsAboutUnrecoverableState()`
await the notification promises.

PR Close #40234
2021-01-11 10:42:50 -08:00
JoostK ff36485eb7 fix(compiler-cli): prevent stack overflow in decorator transform for large number of files (#40374)
The decorator downleveling transform patches `ts.EmitResolver.isReferencedAliasDeclaration`
to prevent elision of value imports that occur only in a type-position, which would
inadvertently install the patch repeatedly for each source file in the program.
This could potentially result in a stack overflow when a very large number of files is
present in the program.

This commit fixes the issue by ensuring that the patch is only applied once.
This is also a slight performance improvement, as `isReferencedAliasDeclaration`
is no longer repeatedly calling into all prior installed patch functions.

Fixes #40276

PR Close #40374
2021-01-11 10:39:10 -08:00
Pete Bacon Darwin 584b78a37e fix(ngcc): compute the correct package paths for target entry-points (#40376)
Previously, if there were path-mapped entry-points, where one contaied the
string of another - for example `worker-client` and `worker` - then the
base paths were incorrectly computed resulting in the wrong package path
for the longer entry-point. This was because, when searching for a matching
base path, the strings were tested using `startsWith()`, whereas we should
only match if the path was contained in a directory from a file-system
point of view.

Now we not only check whether the target path "starts with" the base path
but then also whether the target path is actually contained in the base path
using `fs.relative()`.

Fixes #40352
Fixes #40357

PR Close #40376
2021-01-11 10:38:17 -08:00
Pete Bacon Darwin 6c8cb5b71d refactor(compiler-cli): split up NodeJSFileSystem class (#40363)
This class is refactored to extend the new `NodeJSReadonlyFileSystem`
which itself extends `NodeJSPathManipulation`. These new classes allow
consumers to create file-systems that provide a subset of the full file-system.

PR Close #40363
2021-01-11 10:30:26 -08:00
Pete Bacon Darwin 4f533765d9 refactor(localize): update to use new file-system interfaces (#40363)
Now that `ReadonlyFileSystem` and `PathManipulation` interfaces are
available, this commit updates the localize package to use these more
focussed interfaces.

PR Close #40363
2021-01-11 10:30:26 -08:00