20915 Commits

Author SHA1 Message Date
Alex Rickabaugh 0a2191f8e7 Revert "refactor(core): optimize calls to split and slice while computing version parts (#41208)"
This reverts commit 744bd2b64f.

This commit seems to cause issues in Safari.
12.0.0
2021-05-12 14:24:15 -04:00
Alex Rickabaugh 52cd8c928a release: cut the v12.0.0 release (#42065)
PR Close #42065
2021-05-12 13:32:32 -04:00
Alex Rickabaugh 1f84ac1d5f release: cut the v12.0.0-rc.3 release (#42031)
PR Close #42031
12.0.0-rc.3
2021-05-10 17:47:57 -04:00
JoostK d5555558d0 fix(platform-browser): prevent memory leak of style nodes if shadow DOM encapsulation is used (#42005)
Prior to this change, any inserted `<style>` nodes into shadow dom trees would be retained
in memory, even after the shadow dom tree has been removed. This commit fixes the memory
leak by tracking the inserted `<style>` nodes per host element, such that removal of the
host element also releases the style nodes.

Fixes #36655

PR Close #42005
2021-05-10 16:12:22 -04:00
iRealNirmal 150b2ece1d build(docs-infra): fixed i18n broken stackblitz example (#42001)
This commit fixes the broken stackblitz example of i18n.

Closes #41838.

PR Close #42001
2021-05-10 16:11:38 -04:00
Pete Bacon Darwin a4e03d3f7a build(docs-infra): show a dist-tag when installing the CLI on non-stable versions (#41991)
It is important to use the correct major version of the Angular CLI when
following the examples in the tutorials. This commit provides a custom
element that renders an appropriate dist-tag in the setup step of
the tutorial when the docs are not in "stable" mode.

Fixes #39821

PR Close #41991
2021-05-10 16:10:34 -04:00
Igor Minar d43e3515e1 docs: clarify the IE11 deprecation timeline, and link to the RFC (#42023)
PR Close #42023
2021-05-10 12:41:59 -04:00
Alan Agius b6de210feb test: refactor test to work with latest @types/jasmine (#41956) (#42024)
In some cases we are using private APIs. This change adds casting were needed to make the build successful.

PR Close #41956

PR Close #42024
2021-05-10 12:34:46 -04:00
Renovate Bot c909bb8f57 build: update all non-major dependencies (#41956) (#42024)
Manually merged from PR #41956 to 12.0.x, resolving a simple conflict in
`packages/localize/package.json`.

PR Close #42024
2021-05-10 12:34:46 -04:00
Richard Sithole 388f4056e6 docs: fix a grammatical error in lazy-loading-ngmodules guide (#42008)
PR Close #42008
2021-05-10 11:53:20 -04:00
Ajit Singh cffba6fa0b build: update node version to stop aio from breaking while generating docs (#42009)
When aio yarn docs-only command runs on v12.14.1 it fails details given on issue #41979. Upgrading node version to v12.17.0 solves this but creates a new warning (node:467072) ExperimentalWarning: The ESM module loader is experimental.
This warning gets removed in v12.20.0. Upgrading node version to 12.20.0

PR Close #42009
2021-05-10 10:39:39 -04:00
JoostK 1449c5c8ff fix(core): do not retain dynamically compiled components and modules (#42003)
The JIT compiler has a mapping from component to the owning NgModule
and tracks whether a certain NgModule class has been verified; these
maps causes any JIT compiled component and NgModule to be retained even
if they are no longer referenced from anywhere else. This commit
switches the maps to `WeakMap` to allow garbage collecting any
components and NgModules that are no longer referenced elsewhere.

Fixes #19997

PR Close #42003
2021-05-10 10:36:24 -04:00
Pete Bacon Darwin b99520101f refactor(compiler-cli): remove redundant potentialSourceMapUrl property (#42000)
Now that there is no need to work around the source-map bug in TypeScript
(https://github.com/Microsoft/TypeScript/issues/29300) we can just use
`resolvedTemplateUrl` for the source-map URL, rather than having a separate
property.

PR Close #42000
2021-05-10 10:33:28 -04:00
Pete Bacon Darwin 876069ee94 docs(compiler-cli): fix typo (#42000)
PR Close #42000
2021-05-10 10:33:28 -04:00
Pete Bacon Darwin 007ffd3374 refactor(compiler-cli): remove unused import (#42000)
The `makeDiagnostic()` function is not used in this file.

PR Close #42000
2021-05-10 10:33:27 -04:00
Pete Bacon Darwin b575707ef2 refactor(compiler-cli): remove TS bug workaround (#42000)
The TS bug at https://github.com/Microsoft/TypeScript/issues/29300 was
fixed in TS 3.3, so the workaround is no longer required.

PR Close #42000
2021-05-10 10:33:27 -04:00
Teri Glover 4f4880b17f docs: Edited to remove jargon (#41976)
PR Close #41976
2021-05-10 10:29:39 -04:00
Pete Bacon Darwin effde9d1bf refactor(core): remove unnecessary cast (#41960)
The `as any` is no longer needed since `providedIn` can accept `'any'`.

PR Close #41960
2021-05-10 10:28:35 -04:00
Pete Bacon Darwin 04450b48c5 refactor(docs-infra): remove unused CSS rule (#41960)
The `.ngmodule-iist` is no longer used so can be removed.

PR Close #41960
2021-05-10 10:28:34 -04:00
Pete Bacon Darwin 26a1197bc7 build(docs-infra): add NgModules references to provided injectables (#41960)
Parse the `providers` property of each NgModule doc and add this doc to
the `ngModules` property of each provided injectable.

PR Close #41960
2021-05-10 10:28:34 -04:00
Pete Bacon Darwin bb55ec4f56 build(docs-infra): associate providedIn injectables with their NgModule (#41960)
Such injectables were not appearing in the providers lists of their NgModule.
This commit updates the doc-gen to support associating these automatically.
Further, it also allows developers to mark other injectables that are provided
in an NgModule with a reference to the NgModule where they are provided.

The commit also does a refactoring of the `processNgModuleDocs` dgeni
processor code, to make it easier to maintain.

Fixes #41203

PR Close #41960
2021-05-10 10:28:34 -04:00
Andrew J Asche a8dd75879a fix(docs-infra): update glossary to include the term template-input-variable (#41632)
Template input variables are now described in the glossary.

PR Close #41632
2021-05-10 10:27:57 -04:00
Julien Marcou 6bec2d47f3 refactor(core): optimize calls to split and slice while computing version parts (#41208)
Reduce the number of calls made to `split` and `slice` while computing version parts by deconstructing the result.

PR Close #41208
2021-05-10 10:26:37 -04:00
Julien Marcou e3bb6fcd82 docs: fix package name in version.ts files in different packages (#41208)
PR Close #41208
2021-05-10 10:26:37 -04:00
Alex Rickabaugh 7a4d9805ea fix(compiler-cli): use '' for the source map URL of indirect templates (#41973)
Indirect templates are templates produced by a non-literal expression value
of the `template` field in `@Component`. The compiler can statically
determine the template string, but there is not guaranteed to be a physical
file which contains the bytes of the template string. For example, the
template string may be computed by a concatenation expression: 'a' + 'b'.

Previously, the compiler would use the TS file path as the source map path
for indirect templates. This is incorrect, however, and breaks source
mapping for such templates, since the offsets within the template string do
not correspond to bytes of the TS file.

This commit returns the compiler to its old behavior for indirect templates,
which is to use `''` as the source map URL for such templates.

Fixes #40854

PR Close #41973
2021-05-07 15:46:21 -04:00
Paul Gschwendtner c580fbb60c fix(dev-infra): merge tool should ensure that token has workflow oauth scope (#41989)
Currently if a PR modifies any file that configures a Github action
(e.g. a workflow file), the caretaker might face an error when merging
such PR:

```
! [remote rejected]       merge_pr_target_11.2.x -> 11.2.x (refusing to allow a Personal Access Token to create or update workflow
```

This happens because Github requires the token being used for the
push operation to have the `workflow` scope set. This is a special
scope added by Github to ensure that no changes can be made on
upstream branches that might expose the `GITHUB_TOKEN` environment
variable, which is available for push builds and could cause the
token being leaked.

With this commit we enforce that the caretaker adds the workflow
scope to their github token. Since PRs can only be merged if reviewed
thoroughly, it's acceptable to allow workflow file changes being
merged through the merge tool by the caretaker (especially since we
also allow CircleCI config files being merged with the default
`repo`/`public_repo` scope).

PR Close #41989
2021-05-07 14:10:40 -04:00
Pete Bacon Darwin 89c02980ae build(docs-infra): ensure that terminal code snippets render correctly (#41986)
After the changes to the `lang-none` styling in #41335, code snippets marked with

```
language="none" class="code-shell"
```

were being styled with the same foreground and background colours.

It turns out that most of these ought to be marked `language="sh"`
in which case the `code-shell` style became redundant and has been
removed.

Fixes #41984

PR Close #41986
2021-05-07 13:11:05 -04:00
Joey Perrott d6c217b777 fix(dev-infra): set the default LogLevel of GitClient logging to DEBUG (#41899)
Previously by default GitClient would log the commands it was executing at the
INFO level. This change moves the default level of this logging to DEBUG, while
still allowing callers of the methods to set the log level back to INFO.

PR Close #41899
2021-05-07 10:15:21 -04:00
profanis c38dce7d7a docs: change the documentation of creating-libraries by providing material links (#41982)
while reading the documentation, I noticed that there were
references in the material's documentation. Since the
links were absent, I had to google the terms and
continue my study. I find it easier for the reader not
to be distracted by googling, but just clicking
and following the suggested links

PR Close #41982
2021-05-07 10:11:11 -04:00
mgechev afb036309a ci: introduce action implementing feature request prioritization process (#41975)
Enable a GitHub action that implements our new feature request
[process](https://github.com/angular/angular/blob/ce8e011a9f7c6bac94292d632b0cc8822f710a66/docs/GITHUB_PROCESS.md#feature-request-process).

As a prerequisite, we need to create the following labels:
- `in backlog`
- `votes required`
- `under consideration`
- `insufficient votes`

The bot will also use the existing `feature` label to identify feature
requests.

With its current configuration, we need to kick the process off
manually. We currently also have a limit, meaning the bot will process
only 50 feature requests before it exits. Additionally, now the bot will
not close issues, it'll just comment on them and if they have an
insufficient number of votes, the bot will label them with `insufficient
votes`.

On the next iteration, we can:
- Expand the limit from 50 to infinity (removing the option from the
yml file)
- Set a cron configuration to kick off the bot automatically
- Enable autoclose by setting the `close-when-no-sufficient-votes` to
`true`

PR Close #41975
2021-05-07 10:09:47 -04:00
mgechev e9ddc57f94 fix(core): invoke profiler around ngOnDestroy lifecycle hooks (#41969)
Invoke the profiler for `ngOnDestroy` lifecycle hooks for services,
components, directives, and pipes.

PR Close #41969
2021-05-07 10:04:24 -04:00
Renovate Bot 921703f388 build: update angular (#41955)
PR Close #41955
2021-05-07 10:03:37 -04:00
Joey Perrott 51cc14292d docs: reword a few phrases in the GITHUB_PROCESS.md doc (#41977)
Reword a few things in the explanation around our `Feature request process` to make
the process a little clearer.

PR Close #41977
2021-05-06 18:11:08 -07:00
mgechev 8dd5216c9e docs: use relative path for the feature request process diagram (#41970)
Center the diagram and use a relative path to make sure we don't break a branch if we restructure `master`/`main`.

PR Close #41970
2021-05-06 17:35:35 -04:00
Georgii Dolzhykov 21f523699b refactor(compiler): stricter types for HTML AST (#41360)
A Node can only be an instance of one of the six classes.
This relation can be accurately expressed using a union type.

PR Close #41360
2021-05-06 17:34:55 -04:00
Joey Perrott 568a69cfda feat(dev-infra): include release notes in Github release entries when publishing (#41964)
Include the release notes entry for the release in the release created on Github.

PR Close #41964
2021-05-06 15:45:52 -04:00
va-stefanek e218a8b839 refactor(common): change missing NgSwitch provider error message (#41704)
change error message of invalid NgSwitch use and add corner cases tests

PR Close #41704
2021-05-06 15:44:42 -04:00
iRealNirmal bc23ed0012 docs: update testing components doc with generated compileComponent (#41947)
Updated testing-components-scenarios.md to match CLI generated test case.

Closes #39740

PR Close #41947
2021-05-06 15:40:36 -04:00
Kapunahele Wong e56cb5fc9f docs: add redirect and update updating-to-v11 to v12 (#41625)
PR Close #41625
2021-05-06 15:15:09 -04:00
Kapunahele Wong 5999c837ca feat(docs-infra): add support for unformatted code-snippets (#41335)
This commit adds support for skipping formatting in `<aio-code>`
elements (which are used by `<code-example>` and `<code-pane>` elements
under the hood) by specifying the `language` option as `'root'`.

This is useful for code-snippets that include plain text.

PR Close #41335
2021-05-06 15:03:48 -04:00
Joey Perrott cbe01a3ffa build: update release configuration to use new release notes system (#41905)
Update the ng-dev config for release to use the new release notes system
for generating release notes.

PR Close #41905
2021-05-06 09:40:30 -04:00
Joey Perrott 4d18e317ad feat(dev-infra): Set up new common release notes generation tooling (#41905)
Enables the new common release notes generation within the ng-dev release publishing
tooling.

PR Close #41905
2021-05-06 09:40:29 -04:00
George Kalpakas 343a54654f build(docs-infra): upgrade cli command docs sources to 0f1fe9a4d (#41959)
Updating [angular#12.0.x](https://github.com/angular/angular/tree/12.0.x) from
[cli-builds#12.0.x](https://github.com/angular/cli-builds/tree/12.0.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/320213975...0f1fe9a4d):

**Modified**
- help/build.json
- help/generate.json

PR Close #41959
2021-05-06 09:40:01 -04:00
Alan Agius c6d10b3e3a docs: replace client-project in app-shell documentation (#41957)
This option no longer exists, instead we now point to the `cli/generate#app-shell-command` guide.

PR Close #41957
2021-05-06 09:38:09 -04:00
mgechev dc8d84689c docs: introduce details about feature request automation (#41953)
PR Close #41953
2021-05-06 09:36:49 -04:00
Renovate Bot 65bc1fe248 build: update dependency fs-extra to v10 (#41937)
PR Close #41937
2021-05-06 09:36:18 -04:00
Kristiyan Kostadinov 3e365ba81e fix(compiler): preserve @page rules in encapsulated styles (#41915)
Currently the compiler treats `@page` rules in the same way as `@media`, however that is incorrect and it results in invalid CSS, because `@page` allows style declarations at the root (e.g. `@page (margin: 50%) {}`) and it only allows a limited set of at-rules to be nested into it. Given these restrictions, we can't really encapsulate the styles since they apply at the document level when the user tries to print.

These changes make it so that `@page` rules are preserved so that we don't break the user's CSS.

More information: https://www.w3.org/TR/css-page-3

Fixes #26269.

PR Close #41915
2021-05-06 09:33:56 -04:00
Kapunahele Wong 9ecc115e73 docs: edit strict-mode.md to remove references for opting in (#41542)
As of v12, strict mode is the default, so you don't have
to opt in anymore. This commit removes the instructions
to add --strict to the ng new.

PR Close #41542
2021-05-06 09:32:42 -04:00
Misko Hevery 768d4ac94d release: cut the v12.0.0-rc.2 release 12.0.0-rc.2 2021-05-05 15:43:57 -07:00
David Shevitz df2ff0497d docs: initial commit of content projection topic. (#41143)
Content projection is an important part of Angular. However, it has
never been documented in the Angular documentation set. This topic
attempts to provide the basics of content projection for developers. It
is not a comprehensive guide; rather, it is a starting point that we
can hopefully expand upon in the future.

PR Close #41143
2021-05-05 13:47:27 -07:00