Commit Graph

19131 Commits

Author SHA1 Message Date
Andrew Kushnir 08a4c5b5df release: cut the v11.0.0-rc.0 release 11.0.0-rc.0 2020-10-21 18:35:45 +00:00
Keen Yee Liau b4e8399144 fix(platform-server): Resolve absolute URL from baseUrl (#39334)
This commit fixes a bug when `useAbsoluteUrl` is set to true and
`ServerPlatformLocation` infers the base url from the supplied
`url`. User should explicitly set the `baseUrl` when they turn on
`useAbsoluteUrl`.

Breaking change:
If you use `useAbsoluteUrl` to setup `platform-server`, you now need to
also specify `baseUrl`.
We are intentionally making this a breaking change in a minor release,
because if `useAbsoluteUrl` is set to `true` then the behavior of the
application could be unpredictable, resulting in issues that are hard to
discover but could be affecting production environments.

PR Close #39334
2020-10-21 09:41:58 -07:00
George Kalpakas d8c9f42689 build(docs-infra): upgrade cli command docs sources to edfbf4ba4 (#39361)
Updating [angular#11.0.x](https://github.com/angular/angular/tree/11.0.x) from
[cli-builds#11.0.x](https://github.com/angular/cli-builds/tree/11.0.x).

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

**Modified**
- help/build.json
- help/generate.json
- help/serve.json
- help/update.json
- help/xi18n.json

PR Close #39361
2020-10-21 08:28:04 -07:00
Arnaud Bernard 8b36487cbc docs: remove style commit type from CONTRIBUTING.md (#39357)
Commit type Style is still present in Commiit Message Header while it shouldn't

PR Close #39357
2020-10-21 08:25:33 -07:00
Alan Agius 63b8c04372 docs: add strictInputAccessModifiers to strict mode guide (#39353)
This change also remove the duplicate mention of strictTemplates

PR Close #39353
2020-10-21 08:24:47 -07:00
Kapunahele Wong e30c6519d3 docs: edit property binding doc (#38799)
This commit edits the property binding doc copy and adds some
docregions to clarify explanations.

PR Close #38799
2020-10-21 08:23:45 -07:00
Bjarki ac53101fc6 build: upgrade karma to version 4.4.0 (#39180)
Upgrade the karma dependency to version 4.4.0 in the root package.json
and in integration tests. Compared to version 4.3.0, which most of the
packages were previously depending on, it has the following changes:

Bug Fixes
- runner: remove explicit error on all tests failed

Features
- client: Add trusted types support
- Preprocessor can return Promise
- config: add failOnSkippedTests option.
- config: clientDisplayNone sets client elements display none.
- deps: Remove core-js dependency.

The motivation for upgrading the package is the Trusted Types support
that it adds, which is necessary to enable Trusted Types in Angular's
unit tests.

PR Close #39180
2020-10-20 16:27:56 -07:00
Kristiyan Kostadinov 161b278b6f fix(router): incorrect signature for createUrlTree (#39347)
The type of the `navigationExtras` param was accidetally changed to the wrong symbol
in https://github.com/angular/angular/commit/783a5bd7bbae35562e21aaa27771c54091fb9812.
These changes revert it to the correct one.

PR Close #39347
2020-10-20 13:36:13 -07:00
Joey Perrott 3738233f16 fix(common): update locales using new CLDR data (#39343)
Update the derived locales based on the new CLDR data.

PR Close #39343
2020-10-20 13:22:38 -07:00
Joey Perrott 38a3c31ada build: update to cldr v37 (#39343)
Update to use a newer version of CLDR data, version 37.

PR Close #39343
2020-10-20 13:22:38 -07:00
Dave Shevitz 595062e415 docs: Add Component Overview topic to angular.io (#39186)
PR Close #39186
2020-10-20 10:47:47 -07:00
Joey Perrott f341da8a43 build: revert back to downloading cldr-data directly rather than via npm (#39341)
Revert back to downloading cldr-data directly as the npm package seems
to no longer be maintained and additionally, it carries a ~350mb cost
in our node modules that is unnecessarily downloaded by most developers
and on CI.

PR Close #39341
2020-10-20 10:46:20 -07:00
George Kalpakas 44913944a9 build(docs-infra): upgrade cli command docs sources to d00915917 (#39339)
Updating [angular#11.0.x](https://github.com/angular/angular/tree/11.0.x) from
[cli-builds#11.0.x](https://github.com/angular/cli-builds/tree/11.0.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/2c78d4463...d00915917):

**Modified**
- help/deploy.json

PR Close #39339
2020-10-20 08:49:54 -07:00
Jessica Janiuk 5167eead45 docs: add Jessica Janiuk to contributors.json (#39253)
PR Close #39253
2020-10-19 16:25:19 -07:00
Andrew Kushnir 736e0644b0 refactor(compiler): remove support for TypeScript 3.9 (#39313)
This commit removes TypeScript 3.9 support.

BREAKING CHANGE:

TypeScript 3.9 is no longer supported, please upgrade to TypeScript 4.0.

PR Close #39313
2020-10-19 14:34:46 -07:00
George Kalpakas e0322282e6 build(docs-infra): upgrade cli command docs sources to 2c78d4463 (#39319)
Updating [angular#11.0.x](https://github.com/angular/angular/tree/11.0.x) from
[cli-builds#11.0.x](https://github.com/angular/cli-builds/tree/11.0.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/a88d21174...2c78d4463):

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

PR Close #39319
2020-10-19 14:33:49 -07:00
Josh Wiegand 51301b9f4b docs: clarify grammatical error (#39279)
The sentence is grammatically incorrect. The new sentence fixes the error.
PR Close #39279
2020-10-19 14:32:44 -07:00
Joey Perrott d3087be237 feat(dev-infra): prompt caretaker to confirm the merge branches on merge (#39333)
Perviously, it was not immediately clear what branches a PR would merge
into during the merge process.  This prompt allows for caretakers to
understand and acknowledge where the PR will merge to.

PR Close #39333
2020-10-19 12:06:18 -07:00
Aristeidis Bampakos aba1cb4672 docs: change definition of NgModules in Angular concepts guide (#36179)
Indicate that the basic building block in Angular is the component which is organized into modules

PR Close #36179
2020-10-19 11:22:33 -07:00
Keen Yee Liau 726c5ef679 Revert "test(language-service): Make project service a singleton (#39308)" (#39322)
This reverts commit 1b21350e17.

PR Close #39322
2020-10-19 09:25:19 -07:00
Johannes Hoppe d30911c4eb docs: add Johannes Hoppe to GDE resources (#34694)
PR Close #34694
2020-10-19 08:04:59 -07:00
Ferdinand Malcher e7f9e6fdac docs: add Ferdinand Malcher to GDE resources (#34694)
PR Close #34694
2020-10-19 08:04:59 -07:00
Vlasis Charalampous 8a744d5246 refactor(docs-infra): fix strictTemplates failures in accessibility docs example (#39248)
fix `strictTemplates` failures in `accessibility` docs example

PR Close #39248
2020-10-16 16:09:09 -07:00
Joey Perrott 6c9c70a0e4 ci: separate the windows CI tests into build and test (#39289)
Because the compiler-cli tests modify node_modules, this can cause
failures on windows CI specifically as node_modules are symlinked
to rather than copied.  By running the test and build actions in
separate commands, all of the tests are built to be executed before
and tests are executed and modify the node_modules content.

PR Close #39289
2020-10-16 14:22:24 -07:00
Keen Yee Liau d2ea9b05d8 test(language-service): Make project service a singleton (#39308)
Constructing a project service is expensive. Making it a singleton could
speed up tests considerably.

On my MacBook Pro, test execution went from 24.4s to 14.5s (~40% improvement).

PR Close #39308
2020-10-16 12:34:16 -07:00
Keen Yee Liau 60b4135795 test(language-service): wrap setup() in beforeAll to speed up fit() test (#39305)
Test harness `setup()` is expensive, in the order of ~2.5 seconds.

We could speed up `fit()` tests considerably if `setup()` is wrapped
in `beforeAll()` to avoid running it unnecessarily.

PR Close #39305
2020-10-16 12:33:36 -07:00
JiaLiPassion a0fde29f80 release: cut the zone.js-0.11.2 release to fix several new issues (#39298)
PR Close #39298
2020-10-16 10:18:55 -07:00
George Kalpakas 09de939694 build(docs-infra): upgrade cli command docs sources to a88d21174 (#39303)
Updating [angular#11.0.x](https://github.com/angular/angular/tree/11.0.x) from
[cli-builds#11.0.x](https://github.com/angular/cli-builds/tree/11.0.x).

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

**Modified**
- help/generate.json

PR Close #39303
2020-10-16 10:07:09 -07:00
Kapunahele Wong 13847816d3 docs: edit attribute-binding doc and move colSpan note to property binding (#38860)
This commit edits the copy of the attribute binding documentation, moves the
colspan section that is primarily about property binding to the property
binding document, and adds a docregion to the attribute-binding
example to help clarify a point in the document.
Part of the copy edit reformats the style precedence list in tabular format
so that it is easier to read and understand.

PR Close #38860
2020-10-16 10:06:18 -07:00
Aristeidis Bampakos 63a915b023 docs: Typos fixes in built-in directives guide (#38520)
PR Close #38520
2020-10-16 10:05:29 -07:00
Pete Bacon Darwin fdbc61111d build(docs-infra): add a tool to create new examples (#39283)
This tool can be run from anywhere in the aio folder as:

```sh
yarn create-example <example-name>
```

It will create some basic scaffold files to get the example started.
After creation the developer should then use `yarn boilerplate:add`
or similar to ensure that the example can be run and tested.

You can optionally provide an absolute path to a pre-existing CLI
project and it will copy over appropriate files (ignoring boilerplate)
to the newly created example.

```sh
yarn create-example <example-name> /path/to/other/cli/project
```

Fixes #39275

PR Close #39283
2020-10-16 08:14:42 -07:00
mcalmus f541e5f39d fix(core): guard reading of global ngDevMode for undefined. (#36055)
When reading globals such as `ngDevMode` the read should be guarded by `typeof ngDevMode` otherwise it will throw if not
defined in `"use strict"` mode.

PR Close #36055
2020-10-16 08:12:25 -07:00
Jessica Janiuk 20b801e707 refactor(core): renames checkNoChangesMode to be clearer (#39277)
getCheckNoChangesMode was discovered to be unclear as to the purpose of
it. This refactor is a simple renaming to make it much clearer what that
method and property does.

PR Close #39277
2020-10-15 17:01:24 -07:00
James Davies bed8c1c814 docs: Very minor spelling mistake (#39299)
1659: teh -> the
PR Close #39299
2020-10-15 17:00:21 -07:00
Andrew Scott 6acddb9518 refactor(language-service): Return directive defs when input name is part of selector (#39243)
When an input name is part of the directive selector, it would be good to return the directive as well
when performing 'go to definition' or 'go to type definition'. As an example, this would allow
'go to type definition' for ngIf to take the user to the NgIf directive.
'Go to type definition' would otherwise return no results because the
input is a generic type. This would also be the case for all primitive
input types.

PR Close #39243
2020-10-15 14:17:24 -07:00
Nicholas Papadopoulos 5e1c7e69e6 docs: fix typo at console.log (#39252)
PR Close #39252
2020-10-15 14:15:38 -07:00
CharaLagou 61cd1b685a docs(core): fix typo in the "Template statements" guide (#39244)
PR Close #39244
2020-10-15 14:14:28 -07:00
Joey Perrott b05af6dd53 refactor(dev-infra): remove branches created for g3 comparison (#39137)
Previously, temporary branches were created to be used for comparison to
the g3 branch, instead comparisons are now done using the branches
latest shas.

PR Close #39137
2020-10-15 14:11:33 -07:00
Stefanie Fluin cd4388e523 docs: update readme (#32084)
PR Close #32084
2020-10-15 14:08:20 -07:00
David Shevitz 9269ad9626 docs: Move pipes documentation from Components to Templates (#38983)
PR Close #38983
2020-10-15 14:07:30 -07:00
David Shevitz c1e0776d39 docs: deprecate displaying data in views topic (#38885)
The Displaying Data in Views topic is actually a small tutorial
that describes Angular features such as interpolation and
structural directives. These content is already covered in
our getting started tutorial and in Tour of Heroes.

This change adds redirects to the Template Syntax section
of the Getting Started tutorial and deletes displaying-data.md.

PR Close #38885
2020-10-15 14:05:30 -07:00
Joey Perrott 14f15ecd38 ci: add jessicajaniuk to require-minimum-review reviewers (#39268)
Add jessicajaniuk@ to the list of reviewers included in the required
minimum reviewers list.

PR Close #39268
2020-10-15 11:17:42 -07:00
macvag 56ab6d56e9 docs: Update output directory name in Deployment guide (#39247)
The default output directory is no longer `dist/` but `dist/project-name/`
PR Close #39247
2020-10-15 09:08:23 -07:00
Bjarki 6e18d2dacc fix(compiler): promote constants in templates to Trusted Types (#39211)
Angular treats constant values of attributes and properties in templates
as secure. This means that these values are not sanitized, and are
instead passed directly to the corresponding setAttribute or setProperty
function. In cases where the given attribute or property is
security-sensitive, this causes a Trusted Types violation.

To address this, functions for promoting constant strings to each of the
three Trusted Types are introduced to Angular's private codegen API. The
compiler is updated to wrap constant strings with calls to these
functions as appropriate when constructing the `consts` array. This is
only done for security-sensitive attributes and properties, as
classified by Angular's dom_security_schema.

PR Close #39211
2020-10-15 09:08:01 -07:00
Bjarki 9bfb508b87 build: replace @types/trusted-types dep with minimal type defs (#39211)
The @types/trusted-types type definitions are currently imported in
types.d.ts, which causes them to eventually be imported in core.d.ts.
This forces anyone compiling against @angular/core to provide the
@types/trusted-types package in their compilation unit, which we don't
want.

To address this, get rid of the @types/trusted-types and instead import
a minimal version of the Trusted Types type definitions directly into
Angular's codebase.

Update the existing references to Trusted Types to point to the new
definitions.

PR Close #39211
2020-10-15 09:08:00 -07:00
JiaLiPassion 497af77d7a build(zone.js): zone.js should output esm format for fesm2015 bundles (#39203)
Zone.js support `Angular package format` since `0.11`, but the `fesm2015` bundles
are not `esm` format, it still use `umd` bundle which is not correct, in this PR,
a new `esm` bundle output is added in `rollup_bundle` rule under `tools`, so
zone.js can use the new rule to generate `esm` bundles.

PR Close #39203
2020-10-15 09:07:38 -07:00
Pete Bacon Darwin 822b838fbc fix(ngcc): ensure that "inline exports" can be interpreted correctly (#39267)
Previously, inline exports of the form `exports.foo = <implementation>;` were
being interpreted (by the ngtsc `PartialInterpeter`) as `Reference` objects.
This is not what is desired since it prevents the value of the export
from being unpacked, such as when analyzing `NgModule` declarations:

```
exports.directives = [Directive1, Directive2];

@NgImport({declarations: [exports.directives]})
class AppModule {}
```

In this example the interpreter would think that `exports.directives`
was a reference rather than an array that needs to be unpacked.

This bug was picked up by the ngcc-validation repository. See
https://github.com/angular/ngcc-validation/pull/1990 and
https://circleci.com/gh/angular/ngcc-validation/17130

PR Close #39267
2020-10-14 14:11:45 -07:00
Pete Bacon Darwin ac0016cd82 refactor(compiler-cli): visit inline declarations with implementations differently (#39267)
Some inline declarations are of the form:

```
exports.<name> = <implementation>;
```

In this case the declaration `node` is `exports.<name>`.
When interpreting such inline declarations we actually want
to visit the `implementation` expression rather than visiting
the declaration `node`.

This commit adds `implementation?: ts.Expression` to the
`InlineDeclaration` type and updates the interpreter to visit
these expressions as described above.

PR Close #39267
2020-10-14 14:11:45 -07:00
George Kalpakas eb9eebbb45 refactor(elements): simplify code after IE<11 support removal (#39265)
Support for IE<11 is being removed in v11. PR #39090 removed some code
that was no longer needed.

Now that there are no longer multiple code-paths (which was previously
needed for IE<11 support), this commit simplifies the code further (for
example, to avoid unnecessary functions calls and to avoid iterating
over a component's inputs multiple times).

PR Close #39265
2020-10-14 14:11:22 -07:00
shaharkazaz aee2d3f994 docs: fix broken link (#39256)
PR Close #39256
2020-10-14 14:10:59 -07:00