Commit Graph

19208 Commits

Author SHA1 Message Date
Joey Perrott 89835fe8fa feat(dev-infra): allow suppression of GitClients verbose logging (#39474)
Some usages of the `GitClient` are better served by suppressing the
logging of lines that express what commands are being run. Many usages
of `GitClient` are contained within tools which are best served by
keeping the output clean as mostly read actions are occurring.

PR Close #39474
2020-10-29 09:55:28 -07:00
Joey Perrott b0e114e51d build: create yarn command for running local version of ng-dev (#39474)
For better development experience of the dev-infra work, the `ng-dev:dev`
command runs the transpiled version of `ng-dev` making iterative
development easier.

PR Close #39474
2020-10-29 09:55:27 -07:00
Shadab Ansari eccf9d68b8 docs: Match browser name with custom launcher name (#39480)
The browser being launched needs to match the custom launcher name.
Otherwise Karma would still trigger the original Chrome executable without the flags.

PR Close #39480
2020-10-29 08:39:15 -07:00
Alan Agius b8c71c45de docs: rename ng xi18n to ng extract-i18n (#39337)
In Angular CLI version 11, xi18n has been changed from `ng xi18n` to `ng extract-i18n`.

PR Close #39337
2020-10-28 14:42:27 -07:00
Kapunahele Wong daab797f7d docs: move template ref vars doc to concepts section clarify, add scope section, and update headers (#31195)
Fixes #31186. This commit adds more context about the behavior
of template reference variables in nested templates and moves
doc into concepts section.

PR Close #31195
2020-10-28 14:41:45 -07:00
David Shevitz 7c52fc690d docs: archive user-input topic (#39309)
PR Close #39309
2020-10-28 14:41:09 -07:00
Alex Rickabaugh bf05c979a7 release: cut the v11.0.0-rc.1 release 11.0.0-rc.1 2020-10-28 14:03:23 -07:00
Jessica Janiuk ddc070e778 docs(core): add jessicajaniuk to pullapprove list (#39473)
This just adds jessicajessica to the pullapprove.yml file

PR Close #39473
2020-10-28 11:14:50 -07:00
Thibaut ACKERMANN d746804985 docs(router): Fix ActivationEnd link (#39469)
ActivationEnd goes to ActivationEnd and not to ActivationStart section

PR Close #39469
2020-10-28 11:06:06 -07:00
JiaLiPassion 17fe000879 docs(zone.js): update release doc (#39442)
In the current release doc, we are using some shortcut of `git` command
such as `git ci` `git co`, so in this PR we are updating them
to the normal command, so these commands will work event without
these shortcuts.

PR Close #39442
2020-10-28 10:59:49 -07:00
Joey Perrott 3870d5e629 build: add PullApprove: disable as a caretaker note label (#39430)
Add the label `PullApprove: disable` as a caretaker note label to
prompt caretakers to confirm that the PullApprove disabling is
intentional.

PR Close #39430
2020-10-28 10:59:11 -07:00
Joey Perrott 112f7e9b58 ci: allow for disabling PullApprove on a single PR via adding a label (#39430)
Alowing for disabling PullApprove on a single PR via adding a label allows
for an escape hatch if PullApprove is not acting as expected, or for cases
where reviews can be stepped over in obvious situations, such as a revert.

PR Close #39430
2020-10-28 10:59:11 -07:00
Deborah Kurata 2bc8b807c4 docs: Correct a few typographical errors. (#39405)
PR Close #39405
2020-10-28 10:58:27 -07:00
Aristeidis Bampakos 65d1ed38e0 docs: update Learning Angular book edition (#39400)
Update the resource Learning Angular book into the third edition

PR Close #39400
2020-10-28 10:57:43 -07:00
Oliver Schlegel 75110f7487 docs: Fix typo in changelog (#39223)
PR Close #39223
2020-10-28 10:56:20 -07:00
Gustav Bylund 2632510f87 docs: fix links to Material examples (#39093)
Also uses fixed git hashes so the line numbers won't get outdated in the
future

PR Close #39093
2020-10-28 10:53:17 -07:00
Carlos Caballero f61ac8a60e docs: add carlos caballero to GDE resources (#37976)
PR Close #37976
2020-10-28 10:52:35 -07:00
twerske 366be11150 refactor(core): add top 10 runtime error codes (#39188)
adds RuntimeError and code enum to improve debugging experience
refactor ExpressionChangedAfterItHasBeenCheckedError to code NG0100
refactor CyclicDependency to code NG0200
refactor No Provider to code NG0201
refactor MultipleComponentsMatch to code NG0300
refactor ExportNotFound to code NG0301
refactor PipeNotFound to code NG0302
refactor BindingNotKnown to code NG0303
refactor NotKnownElement to code NG0304

PR Close #39188
2020-10-28 10:05:02 -07:00
Andrew Kushnir 899218de1f refactor(forms): move common validators-related logic to the AbstractControlDirective class (#38280)
This commit refactors validators-related logic that is common across most of the directives.

A couple notes on this refactoring:
* common logic was moved to the `AbstractControlDirective` class (including `validator` and
`asyncValidator` getters)
* sync/async validators are now composed in `AbstractControlDirective` class eagerly when validators
are set with `_setValidators` and `_setAsyncValidators` calls and the result is stored in directive
instance (thus getters return cached versions of validator fn). This is needed to make sure composed
validator function remains the same (retains its identity) for a given directive instance, so that
this function can be added and later removed from an instance of an AbstractControl-based class
(like `FormControl`). Preserving validator function is required to perform proper cleanup (in followup
PRs) of the AbstractControl-based classes when a directive is destroyed.

PR Close #38280
2020-10-28 09:48:21 -07:00
Joey Perrott 399f491894 ci: bust cache of stored node_modules on CircleCI (#39461)
Update the cache keys used on CircleCI to bust the cache used in attempt
to address issue with tests on aio that are not reproducable locally.

Note: Going back to v1 as the cache version as caches are only held
for 15 days so we can safely return back to `v1` as the prefix

PR Close #39461
2020-10-27 14:53:10 -07:00
Nhan Nguyen 910fa51e76 docs: add install Firebase CLI step before using its commands (#39079)
PR Close #39079
2020-10-27 14:29:06 -07:00
JiaLiPassion f184578e2e docs(core): update a typo in the comment of ngZoneEventCoalescing (#39423)
PR Close #39423
2020-10-27 14:27:16 -07:00
ayazhafiz d76beda439 fix(compiler): do not throw away render3 AST on errors (#39413)
Currently render3's `parseTemplate` throws away the parsed AST and
returns an empty list of HTML nodes if HTML->R3 translation failed. This
is not preferrable in some contexts like that of a language service,
where we would like a well-formed AST even if it is has errors.

PR Close #39413
2020-10-27 13:37:20 -07:00
Pete Bacon Darwin 72e0c6b8be Revert "perf(ngcc): allow immediately reporting a stale lock file (#37250)" (#39435)
This reverts commit 561c0f81a0.

The original commit provided a quick escape from an already terminal
situation by killing the process if the PID in the lockfile was not
found in the list of processes running on the current machine.

But this broke use-cases where the node_modules was being shared between
multiple machines (or more commonly Docker containers on the same actual
machine).

Fixes #38875

PR Close #39435
2020-10-27 13:36:28 -07:00
Kristiyan Kostadinov bf1caa7ad1 fix(compiler): treat i18n attributes with no bindings as static attributes (#39408)
Currently `i18n` attributes are treated the same no matter if they have data bindings or not. This
both generates more code since they have to go through the `ɵɵi18nAttributes` instruction and
prevents the translated attributes from being injected using the `@Attribute` decorator.

These changes makes it so that static translated attributes are treated in the same way as regular
static attributes and all other `i18n` attributes go through the old code path.

Fixes #38231.

PR Close #39408
2020-10-27 13:31:30 -07:00
pmartijena 4b26a05dbc docs: fix grammatical errors and typos (#38868)
Fixed run on sentences, grammatical errors, and made "ivy" "Ivy" everywhere for consistency.
PR Close #38868
2020-10-27 13:18:02 -07:00
Alex Rickabaugh 70daf10b86 refactor(compiler-cli): API to get directives/pipes in scope (#39278)
This commit introduces two new methods to the TemplateTypeChecker, which
retrieve the directives and pipes that are "in scope" for a given component
template. The metadata returned by this API is minimal, but enough to power
autocompletion of selectors and attributes in templates.

PR Close #39278
2020-10-27 13:17:14 -07:00
Alex Rickabaugh 1bfc44d48a refactor(compiler-cli): cache Symbols in the TemplateTypeCheckerImpl (#39278)
This commit introduces caching of `Symbol`s produced by the template type-
checking infrastructure, in the same way that autocompletion results are
now cached.

PR Close #39278
2020-10-27 13:17:14 -07:00
Alex Rickabaugh 2a0a287121 refactor(compiler-cli): move global completion into new CompletionEngine (#39278)
This commit refactors the previously introduced `getGlobalCompletions()` API
for the template type-checker in a couple ways:

 * The return type is adjusted to use a `Map` instead of an array, and
   separate out the component context completion position. This allows for a
   cleaner integration in the language service.
 * A new `CompletionEngine` class is introduced which powers autocompletion
   for a single component, and can cache completion results.
 * The `CompletionEngine` for each component is itself cached on the
   `TemplateTypeCheckerImpl` and is invalidated when the component template
   is overridden or reset.

This refactoring simplifies the `TemplateTypeCheckerImpl` class by
extracting the autocompletion logic, enables caching for better performance,
and prepares for the introduction of other autocompletion APIs.

PR Close #39278
2020-10-27 13:17:14 -07:00
Joey Perrott 523a451a68 build: add husky ignored files to .gitignore (#39388)
Ahead of upgrading to husky v5, adding the shell file location
to .gitignore to prevent it from randomly showing up when devs
checkout older branches.  Beginning in v5, husky places its
shell files in a directory at `.husky/_` so these are placed
in the .gitignore to prevent being commited or tracked.

PR Close #39388
2020-10-27 11:07:22 -07:00
Alan Agius 13063c45d5 ci: add alan-agius4 to docs-cli in pullapprove configuration (#39448)
Add alan-agius4 to `docs-cli` group in pullapprove configuration.

PR Close #39448
2020-10-27 10:49:09 -07:00
George Kalpakas 89c6d109e1 build(docs-infra): upgrade cli command docs sources to d5c1851de (#39446)
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/deec40756...d5c1851de):

**Modified**
- help/build.json

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/deec40756...d5c1851de) since PR #39407:

**Modified**
- help/build.json

##
Closes #39407

PR Close #39446
2020-10-27 10:48:31 -07:00
imkikus 6c79598eb6 docs: fix more typos in component overview (#39445)
PR Close #39445
2020-10-27 10:47:36 -07:00
AleksanderBodurri 65abf7effa docs: fix typo in initializeInputAndOutputAliases docstring (#39438)
PR Close #39438
2020-10-27 10:46:38 -07:00
Andrew Kushnir d1840eed36 refactor(core): remove expandoStartIndex workaround (#39416)
This commit removes a workaround to calculate the `expandoStartIndex` value. That workaround was needed
because the `expandoStartIndex` was updated previously, so it pointed at the wrong location. The problem
was fixed in PR #39301 and the workaround is no longer needed.

PR Close #39416
2020-10-27 10:45:53 -07:00
JoostK cc329325ac fix(core): do not error when ngDevMode is undeclared (#39415)
In production mode, the `ngDevMode` global may not have been declared.
This is typically not a problem, as optimizers should have removed all
usages of the `ngDevMode` variables. This does however require the
bundler/optimizer to have been configured in a certain way, as to allow
for `ngDevMode` guarded code to be removed.

As an example, Terser can be configured to remove the `ngDevMode`
guarded code using the following configuration:

```js
const terserOptions = {
  // ...
  compress: {
    // ...
    global_defs: require('@angular/compiler-cli').GLOBAL_DEFS_FOR_TERSER,
  }
}
```

(Taken from https://github.com/angular/angular/issues/31595#issuecomment-519129090)

If this is not done, however, the bundle should still work (albeit with
larger code size due to missed tree-shaking opportunities). This commit
adds a check for whether `ngDevMode` has been declared, as it is a
top-level statement that executes before `ngDevMode` has been initialized.

Fixes #31595

PR Close #39415
2020-10-27 10:45:19 -07:00
Pete Bacon Darwin 32163ef355 fix(localize): render placeholder types in extracted XLIFF files (#39398)
The previous ViewEngine extraction tooling added `ctype` and `type`
attributes to XLIFF 1.2 and 2.0 translation files, respectively.

This commit adds this to the new $localize based extraction tooling.
Since the new extraction tooling works from the compiled output rather
than having direct access to the template content, the placeholder types
must be inferred from the name of the placeholder.  This is considered
reasonable, since it already does this to compute opening and closing
tag placeholders.

Fixes #38791

PR Close #39398
2020-10-27 10:42:16 -07:00
Andrew Kushnir 97b4653cab refactor(core): remove unused i18n placeholder for projection (#39172)
Runtime i18n logic doesn't distinguish `<ng-content>` tag placeholders and regular element tag
placeholders in i18n messages, so there is no need to have a special marker for projection-based
placeholders and element markers can be used instead.

PR Close #39172
2020-10-27 10:39:38 -07:00
AleksanderBodurri 291322fd53 docs(forms): add section under Validators.pattern detailing use of global and sticky flags gotcha (#39055)
Due to how the global and sticky flag make RegExp objects stateful,
adds section detailing how it is not recommended
to use these flags for control validations.

PR Close #39055
2020-10-27 10:38:49 -07:00
Kapunahele Wong a94852c97d docs: edit event-binding doc copy and headers (#38903)
PR Close #38903
2020-10-27 10:37:31 -07:00
Jethro Lee 758c52b3bf docs: move placement of help note in tutorial (#38508)
PR Close #38508
2020-10-27 10:37:00 -07:00
Joey Perrott a4ea0bbe67 fix(dev-infra): ensure hashbang is present in both published and local ng-devs (#39443)
The node hash bang was incidentally removed in the published ng-dev, it should
be included to allow for the command to be run without having to specify node.

PR Close #39443
2020-10-27 09:28:39 -07:00
Kiran Kumaar Sathyanarayana 3fbf32534c docs: fix typo in component overview (#39425)
Fixes #39424

PR Close #39425
2020-10-26 10:53:07 -07:00
Pete Bacon Darwin f5710c6902 fix(localize): serialize all the message locations to XLIFF (#39411)
Previously only the first message, for each id, was serialized
which meant that additional message location information
was lost.

Now all the message locations are included in the serialized
messages.

Fixes #39330

PR Close #39411
2020-10-26 10:52:31 -07:00
George Kalpakas e8e3771002 build(docs-infra): ignore doc.basePath when generating keywords for each document (#39409)
The `generateKeywords` dgeni processor automatically generates keywords
for each document by extracting words from each string property of a
`doc` object.

This commit adds `basePath` to the list of ignored properties, so that
it is _not_ considered when generating keywords. `basePath` mostly
contains the path to some root directory (such as
`/home/circleci/ng/packages`) and as such it does not contain useful
keywords.

For example, searching for `circleci` will match all API docs, because
it happens to be in the `basePath`:
https://v10.angular.io/?search=circleci

PR Close #39409
2020-10-26 10:52:01 -07:00
George Kalpakas 8bc295ffc3 build(docs-infra): upgrade cli command docs sources to deec40756 (#39407)
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/35611e878...deec40756):

**Modified**
- help/generate.json

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/35611e878...deec40756) since PR #39381:

**Modified**
- help/generate.json

##
Closes #39381

PR Close #39407
2020-10-26 10:51:36 -07:00
Andrew Kushnir f1a1a205d6 docs: improve DefaultValueAccessor directive docs (#39404)
This commit improves the DefaultValueAccessor directive docs by:
- adding the `ngDefaultControl` as a search keyword to the description
- adding an example of the `ngDefaultControl` usage

Closes #35375.

PR Close #39404
2020-10-26 10:50:43 -07:00
Aristeidis Bampakos b73d59e241 docs: use SimpleChanges in component interaction guide (#39342)
Use the SimpleChanges interface in the example of component interaction guide

PR Close #39342
2020-10-26 10:47:33 -07:00
JiaLiPassion 6669571884 fix(zone.js): remove global declaration (#37861)
Close #37531

Remove `global` declaration in `zone.ts` to avoid compile error when
upgrade to `@types/node` v12.12.68. Since the new type of global become
`NodeJS.global & typeof globalThis` and not compatible with `zone.ts` declaration.

PR Close #37861
2020-10-23 15:19:49 -07:00
Joey Perrott 84e09a06e3 fix(bazel): only providing stamping information if the --stamp flag is used (#39392)
Previously the volatile status file was always provided to the ng_rollup
action which prevented it from being cacheable remotely.  This change to
only provide this file as an input when the --stamp flag is used will allow
for the action to be remotely cached and prevent needing to run the action
on every CI run.

PR Close #39392
2020-10-23 15:18:15 -07:00