19034 Commits

Author SHA1 Message Date
Alan Agius 8a084bfe43 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:08 -07:00
imkikus b765d27caa docs: fix more typos in component overview (#39445)
PR Close #39445
2020-10-27 10:47:35 -07:00
AleksanderBodurri 3b779a1be0 docs: fix typo in initializeInputAndOutputAliases docstring (#39438)
PR Close #39438
2020-10-27 10:46:37 -07:00
JoostK fcebc83daa 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
AleksanderBodurri b33956b147 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 5f205a73a9 docs: edit event-binding doc copy and headers (#38903)
PR Close #38903
2020-10-27 10:37:30 -07:00
Jethro Lee 895efe2fd9 docs: move placement of help note in tutorial (#38508)
PR Close #38508
2020-10-27 10:37:00 -07:00
Joey Perrott e3f8888e6c 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 308b93058d docs: fix typo in component overview (#39425)
Fixes #39424

PR Close #39425
2020-10-26 10:53:06 -07:00
Pete Bacon Darwin db51de8938 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:30 -07:00
George Kalpakas 0fb50daaea 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
Andrew Kushnir 16bff79938 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:42 -07:00
Aristeidis Bampakos c03585f497 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:32 -07:00
George Kalpakas c7a8352b20 build(docs-infra): upgrade cli command docs sources to b5fa18881 (#39395)
Updating [angular#10.2.x](https://github.com/angular/angular/tree/10.2.x) from
[cli-builds#10.2.x](https://github.com/angular/cli-builds/tree/10.2.x).

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

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

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/bfcad1d71...b5fa18881) since PR #39380:

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

##
Closes #39380

PR Close #39395
2020-10-23 15:18:43 -07:00
Joey Perrott ed88407ac9 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
Pete Bacon Darwin 09a4fe4b7c refactor(compiler-cli): support namespaced references (#39346)
The compiler uses a `Reference` abstraction to refer to TS nodes
that it needs to refer to from other parts of the source. Such
references keep track of any identifiers that represent the referenced
node.

Prior to this commit, the compiler (and specifically `ReferenceEmitter`
classes) assumed that the reference identifiers are always free standing.
In other words a reference identifier would be an expression like
`FooDirective` in the expression `class FooDirective {}`.

But in UMD/CommonJS source, a reference can actually refer to an "exports"
declaration of the form `exports.FooDirective = ...`.
In such cases the `FooDirective` identifier is not free-standing
since it is part of a property access, so the `ReferenceEmitter`
should take this into account when emitting an expression that
refers to such a `Reference`.

This commit changes the `LocalIdentifierStrategy` reference emitter
so that if the `node` being referenced is not a declaration itself and
is in the current file, then it should be used directly, rather than
trying to use one of its identifiers.

PR Close #39346
2020-10-23 15:17:15 -07:00
Pete Bacon Darwin bdaa714e09 fix(ngcc): capture UMD/CommonJS inner class implementation node correctly (#39346)
Previously, UMD/CommonJS class inline declarations of the form:

```ts
exports.Foo = (function() { function Foo(); return Foo; })();
```

were capturing the whole IIFE as the implementation, rather than
the inner class (i.e. `function Foo() {}` in this case). This caused
the interpreter to break when it was trying to access such an export,
since it would try to evaluate the IIFE rather than treating it as a class
declaration.

PR Close #39346
2020-10-23 15:17:15 -07:00
Krishnabisht07 ca0c670b50 docs: template files should have .html extension (#39384)
Fixes a typo in the component guide

PR Close #39384
2020-10-22 14:06:30 -07:00
Kapunahele Wong 107811707c docs: move hierarchical injectors to reference section (#39383)
PR Close #39383
2020-10-22 14:04:48 -07:00
George Kalpakas 92368bcc41 build(docs-infra): upgrade cli command docs sources to bfcad1d71 (#39380)
Updating [angular#10.2.x](https://github.com/angular/angular/tree/10.2.x) from
[cli-builds#10.1.x](https://github.com/angular/cli-builds/tree/10.1.x).

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

**Modified**
- help/update.json

PR Close #39380
2020-10-22 13:48:56 -07:00
AleksanderBodurri eec5d2a335 docs: update broken akita link in aio dev resources page (#39335)
fixes #39331

PR Close #39335
2020-10-22 13:43:55 -07:00
twerske cadb76cb50 refactor(core): group provider and circular errors (#39251)
group together similar error messages as part of error code efforts
ProviderNotFound & NodeInjector grouped into throwProviderNotFoundError
Cyclic dependency errors grouped into throwCyclicDependencyError

PR Close #39251
2020-10-22 13:42:35 -07:00
ayazhafiz 1146e4736b test(compiler): Demonstrate recoverable parsing of unterminated pipes (#39113)
There is no actionable change in this commit other than to pretty-print
EOF tokens. Actual parsing of unterminated pipes is already supported,
this just adds a test for it.

Part of #38596

PR Close #39113
2020-10-22 13:41:52 -07:00
Joey Perrott 38efd6486a refactor(dev-infra): create ng-dev executable locally in the repo (#39089)
Rather than running ng-dev via ts-node, going forward ng-dev is generated and run
locally via node.  Additionally, the generated file is tested on each commit to
ensure that the local generated version stays up to date.

PR Close #39089
2020-10-22 13:36:15 -07:00
Joey Perrott 513ed49fbe build: update bazelversion (#39351)
Updates to the latest version of bazel

PR Close #39351
2020-10-21 11:59:42 -07:00
Andrew Kushnir 61b1425aed release: cut the v10.2.0 release 10.2.0 2020-10-21 17:42:17 +00:00
Keen Yee Liau 71fb99f062 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

(cherry picked from commit 7768aeb62f)
2020-10-21 09:46:22 -07:00
George Kalpakas 7ca17a6249 build(docs-infra): upgrade cli command docs sources to cba6d86ca (#39360)
Updating [angular#10.1.x](https://github.com/angular/angular/tree/10.1.x) from
[cli-builds#10.1.x](https://github.com/angular/cli-builds/tree/10.1.x).

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

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

PR Close #39360
2020-10-21 08:27:13 -07:00
Arnaud Bernard 3cce723370 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:31 -07:00
Kapunahele Wong b7bf5258ce 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:44 -07:00
Dave Shevitz 823200c6c1 docs: Add Component Overview topic to angular.io (#39186)
PR Close #39186
2020-10-20 10:47:45 -07:00
Jessica Janiuk cd8ec3d902 docs: add Jessica Janiuk to contributors.json (#39253)
PR Close #39253
2020-10-19 16:25:18 -07:00
Josh Wiegand 02b87505ee docs: clarify grammatical error (#39279)
The sentence is grammatically incorrect. The new sentence fixes the error.
PR Close #39279
2020-10-19 14:32:42 -07:00
Joey Perrott 32a8e72a14 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:17 -07:00
Aristeidis Bampakos 7827d3ee73 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:32 -07:00
Johannes Hoppe 38db976617 docs: add Johannes Hoppe to GDE resources (#34694)
PR Close #34694
2020-10-19 08:04:58 -07:00
Ferdinand Malcher d8632ed541 docs: add Ferdinand Malcher to GDE resources (#34694)
PR Close #34694
2020-10-19 08:04:58 -07:00
Vlasis Charalampous 10db99588f 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:08 -07:00
Joey Perrott 8fd59dabba 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:23 -07:00
Kapunahele Wong d8e313bb6d 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:17 -07:00
Aristeidis Bampakos c602c9bdc6 docs: Typos fixes in built-in directives guide (#38520)
PR Close #38520
2020-10-16 10:05:27 -07:00
Pete Bacon Darwin 4a5f17cd8e 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:40 -07:00
mcalmus 02405f1406 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:24 -07:00
Jessica Janiuk 94d7ef3909 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:22 -07:00
James Davies 4fd70a2bf3 docs: Very minor spelling mistake (#39299)
1659: teh -> the
PR Close #39299
2020-10-15 17:00:20 -07:00
Nicholas Papadopoulos af170384b4 docs: fix typo at console.log (#39252)
PR Close #39252
2020-10-15 14:15:37 -07:00
CharaLagou 95fcb4164f docs(core): fix typo in the "Template statements" guide (#39244)
PR Close #39244
2020-10-15 14:14:26 -07:00
Joey Perrott f90c1f77d8 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:32 -07:00
Stefanie Fluin 6efbc8b58c docs: update readme (#32084)
PR Close #32084
2020-10-15 14:08:19 -07:00
David Shevitz 33c7d23fdd docs: Move pipes documentation from Components to Templates (#38983)
PR Close #38983
2020-10-15 14:07:29 -07:00