19342 Commits

Author SHA1 Message Date
Misko Hevery 61e98f8352 refactor(core): Consistent use of HEADER_OFFSET (in ɵɵ* instructions only) (#39233)
IMPORTANT: `HEADER_OFFSET` should only be refereed to the in the `ɵɵ*` instructions to translate
instruction index into `LView` index. All other indexes should be in the `LView` index space and
there should be no need to refer to `HEADER_OFFSET` anywhere else.

PR Close #39233
2020-10-21 18:33:01 -07:00
Misko Hevery f2fea8c94f refactor(core): cleanup i18n/icu data structures (#39233)
- Made `*OpCodes` array branded for safer type checking.
- Simplify `I18NRemoveOpCodes` encoding.
- Broke out  `IcuCreateOpCodes` from `I18nMutableOpCodes`.

PR Close #39233
2020-10-21 18:33:01 -07:00
Misko Hevery 3fcbdc5c25 refactor(core): rename COMMENT_MARKER to ICU_MARKER (#39233)
`COMMENT_MARKER` is a generic name which does not make it obvious that
it is used for ICU use case. `ICU_MARKER` is more explicit as it is used
exclusively with ICUs.

PR Close #39233
2020-10-21 18:33:01 -07:00
Misko Hevery cd2bf969f4 refactor(core): Rename debugMatch to matchDebug for consistency (#39233)
Previous function name `debugMatch` was not consistent with other match
functions.

PR Close #39233
2020-10-21 18:33:00 -07:00
Misko Hevery 279de9f0ff refactor(core): Create TNodeType.Text to display full template in TView debug (#39233)
When looking at `TView` debug template only Element nodes were displayed
as `TNode.Element` was used for both `RElement` and `RText`.
Additionally no text was stored in `TNode.value`. The result was that
the whole template could not be reconstructed. This refactoring creates
`TNodeType.Text` and store the text value in `TNode.value`.

The refactoring also changes `TNodeType` into flag-like structure make
it more efficient to check many different types at once.

PR Close #39233
2020-10-21 18:33:00 -07:00
Misko Hevery 7d43ca9dfe refactor(core): Remove hack where we TIcu was stored in tagName (#39233)
Remove casting where we stored `TIcu` in `TNode.tagName` which was of
type `string` rather than `TIcu'. (renamed to `TNode.value` in previous
commit.)

PR Close #39233
2020-10-21 18:33:00 -07:00
Misko Hevery 4e29200dfc refactor(core): Change TName.tagName to a more generic value name. (#39233)
This is a pre-requisite for making the `TNode.value` a generic storage
mechanism for attaching data to `TNode`.

PR Close #39233
2020-10-21 18:33:00 -07:00
Misko Hevery 0992b678f0 fix(core): Store ICU state in LView rather than in TView (#39233)
Before this refactoring/fix the ICU would store the current selected
index in `TView`. This is incorrect, since if ICU is in `ngFor` it will
cause issues in some circumstances. This refactoring properly moves the
state to `LView`.

closes #37021
closes #38144
closes #38073

PR Close #39233
2020-10-21 18:33:00 -07:00
Misko Hevery c83a389aea refactor(core): move i18n_spec.ts into i18n subfolder (#39233)
`i18n_spec.ts` file was incorrectly in the `render3` folder rather than `render3/i18n`

PR Close #39233
2020-10-21 18:33:00 -07:00
Misko Hevery f875b0d9b6 refactor(core): Change TemplateFixture to named parameters (#39233)
`TemplateFixture` used to have positional parameters and many tests got
hard to read as number of parameters reach 10+ with many of them `null`.
This refactoring changes `TemplateFixture` to take named parameters
which improves usability and readability in tests.

PR Close #39233
2020-10-21 18:33:00 -07:00
Joey Perrott 7f79e77c66 build: update bazelversion (#39351)
Updates to the latest version of bazel

PR Close #39351
2020-10-21 11:59:44 -07:00
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