Commit Graph

20847 Commits

Author SHA1 Message Date
iRealNirmal 741c295129 docs: update file structure document (#41923)
Since angular 11 extra package.json isn't generated and with version 12 strict mode is opt out bases.
Updated document to reflect the state

Closes #40841.

PR Close #41923
2021-05-03 14:26:38 -07:00
David Shevitz 3b589030a8 docs: Remove references to protractor from documentation (#41731)
PR Close #41731
2021-05-03 14:26:09 -07:00
Kapunahele Wong 253ed5d484 docs: improve accessibility of form-validation example (#41283)
PR Close #41283
2021-05-03 14:25:11 -07:00
George Kalpakas 6967f3ca28 build(docs-infra): revert `watchr` to v3.0.1 to restore `docs-watch` performance (#41903)
[`watchr` v4.0.0][1] changes the way watched directories are
scanned/watched, thus causing a great increase in the consumed CPU and
RAM. This affects the performance of the `docs-watch` and transitively
`serve-and-sync` npm scripts.
(For reference, on my local machine it goes from 0% CPU and 275MB RAM
with v3.0.1 to 50% CPU and 10GB RAM with v4+.)

This commit pins `watchr` to version 3.0.1 (which is the latest version
that does not cause performance issues) and disabled automatic updates
via Renovate.

[1]: https://github.com/bevry/watchr/releases/tag/v4.0.0

PR Close #41903
2021-05-03 10:05:31 -07:00
Jesse Palmer 38f47be7af docs: update tagline (#41922)
Seems like the tagline has changed on the [Angular Twitter account](https://twitter.com/angular) and angular.io. This change makes this doc in line with those two resources.
PR Close #41922
2021-05-03 10:04:05 -07:00
Mikhail f12d067539 docs(forms): reduce ambiguity in forms data flow wording (#41900)
PR Close #41900
2021-05-03 10:01:14 -07:00
Gopal Jayaraman 6e11febf60 fix(common): add right ContentType for boolean values with HttpClient request body(#38924) (#41885)
currently a boolean as body is seen as text/plain, where is should be seen as application/json, since it is valid JSON, like numbers.

PR Close #41885
2021-05-03 10:00:16 -07:00
Mathias Schäfer 74da3724e4 docs: Update link to Testing Angular online book (#41906)
The book has moved to a its own domain.
PR Close #41906
2021-04-30 14:34:48 -07:00
Joey Perrott c0694bf538 fix(dev-infra): remove getBaseDir method from GitClient (#41898)
Remove the getBaseDir method from GitClient as the baseDir is determined
once during construction and does not need to be rediscovered.  The property
access should always be used.

PR Close #41898
2021-04-30 14:33:59 -07:00
Alan Agius f0696cdcfa test: update `runtime-es2015` sizes follow CLI updates (#41871)
These size changes are caused by a new Webpack version.

PR Close #41871
2021-04-30 14:31:09 -07:00
Renovate Bot 5a38f17683 build: update angular (#41871)
PR Close #41871
2021-04-30 14:31:09 -07:00
David Shevitz b5134e2e39 docs: remove references to Trusted Types due to incompatibility with Webpack 5 (#41754)
PR Close #41754
2021-04-30 14:30:31 -07:00
Renovate Bot 3909136aba build: update all non-major dependencies (#41884)
PR Close #41884
2021-04-30 14:25:09 -07:00
Pete Bacon Darwin 9b4b281c52 fix(core): handle multiple i18n attributes with expression bindings (#41882)
When there are multiple attributes that are marked for i18n translation,
which contain expression bindings, we were generating i18n update op-codes
that did not accurately map to the correct value to be bound in the lView.
Each attribute's bindings were relative to the start of the lView first
attributes values rather than to their own.

This fix passes the current binding index to `generateBindingUpdateOpCodes()`
when processing i18n attributes to account for this.

Fixes #41869

PR Close #41882
2021-04-30 14:20:15 -07:00
Igor Minar 72384a3357 fix(docs-infra): switch over to img[loading=lazy] for front page images (#34900)
This should speed up the perceived loading latency as the image loading won't block rendering.

https://addyosmani.com/blog/lazy-loading/

PR Close #34900
2021-04-30 14:16:23 -07:00
JoostK e27ac018ed fix(animations): ensure consistent transition namespace ordering (#19854)
When including a component in a template, the component's host element
is immediately appended as child of the parent node upon creation.
Hence, `hostElement.parentNode` will be a valid reference. However, if
the parent component is being inserted as an embedded view—through
`ngIf` for example—then the parent's node itself will not have been
inserted yet. This means that we cannot properly determine the position
of the transition namespace, as any `containsElement` check will return
false given that the partial DOM tree has not been inserted yet, even
though it will be contained within an existing transition namespace once
the partial tree is attached.

This commit fixes the issue by not just looking at the existence of a
parent node, but rather a more extensive check using the driver's
`containsElement` method.

PR Close #19854
2021-04-30 14:15:47 -07:00
JoostK 35450c78f7 fix(compiler-cli): prefer non-aliased exports in reference emitters (#41866)
This commit changes the reference emitters in the Ivy compiler to prefer
non-aliased exports if they exist. This avoids selecting "private
exports" that may not be stable, e.g. the reexports that have been added
by the View Engine compiler. Such reexports are not stable and are
therefore not suitable to be emitted into partial compilations, as the
output of partial compilations should only reference stable symbols
from upstream libraries.

An alternative solution has been considered where ViewEngine-generated
exports would gain a certain prefix, such that the Ivy compiler could
just exclude those exports (see #41443). However, that solution would
be insufficient in case a library is built using partial compilation and
while depending itself on a VE-compiled library from earlier versions of
Angular, where the magic prefix would be missing. For such libraries,
ngcc would have generated reexports using the declared name if not already
present so this change does result in choosing the correct export.

Because ngcc always generates reexports using the declared name even if
an aliased export is present, this change causes those ngcc-generated
exports to be chosen in downstream libraries using partial compilation.
This is unfortunate as it means that the declared names become
effectively public even if the library author was intentionally
exporting it using an alias. This commit does not address this problem;
it is expected that this should not result in widespread issues across
the library ecosystem.

Fixes #41277

PR Close #41866
2021-04-30 14:15:10 -07:00
JoostK 2cc73526bc build: exclude compiler compliance tests from Saucelabs tests (#41866)
The legacy-unit-tests-saucelabs job does not need to compile the
compiler compliance tests as they are not used in those tests. Since
the compliance tests can be configured to use specific compiler options,
the generic tsconfig that is used in legacy-unit-tests-saucelabs may not
succeed to compile the compliance tests so this commit excludes those
source files.

PR Close #41866
2021-04-30 14:15:10 -07:00
Kristiyan Kostadinov 6581a1b48d perf(core): minor improvements to listener instructions (#41807)
Makes the following improvements to the listener instructions to make them slightly smaller and more memory-efficient.

1. Removes the default value from the `useCapture` parameter since it generates more code than just castint to `false`.
2. Removes the `useCapture` and `eventTargetResolver` parameters from `ɵɵsyntheticHostListener` since they won't be generated by the compiler, as far as I can tell.
3. Makes it so that we don't have to return a target name from a `GlobalTargetResolver`. This allows us to save on some memory, because we can return a reference to the target without having to wrap it in an object literal.

DEPRECATIONS:
`EventManagerPlugin.getGlobalEventTarget` is now deprecated and won't be called from Ivy code anymore. Global events will go through `addEventListener`.

PR Close #41807
2021-04-30 14:14:00 -07:00
Kristiyan Kostadinov 2dd96e08ae Revert "perf(core): avoid storing LView in __ngContext__ (#41358)" (#41901)
This reverts commit 18b33e79d3.

PR Close #41901
2021-04-30 14:12:52 -07:00
Alan Agius 0dfd940a18 Revert "build: update dependency karma to v6 (#41696)" (#41904)
This reverts commit 595a75cda4.

PR Close #41904
2021-04-30 13:30:16 -07:00
Wojciech Okoński ea89617880 docs(docs-infra): fix handling of client-side errors in networking (#36608)
Previously example for handling client-side errors in networking didn't work when there was no Internet connection.
Caught error is ProgressEvent in such case, not ErrorEvent and error.error.message is undefined.

PR Close #36608
2021-04-29 13:51:42 -07:00
Kristiyan Kostadinov 36c7bebe40 test(core): make tests more resilient to header offset changes (#41883)
Updates some tests where values related to the `HEADER_OFFSET` are hardcoded, causing them to break when the offset is updated. This comes up once in a while during refactorings and these changes should save us some time in the future.

PR Close #41883
2021-04-29 13:51:07 -07:00
Alan Agius 77d920e461 ci: replace `matchCurrentVersion` RegExp negate with semver version (#41886)
While RegExp negation should work as per documentation https://docs.renovatebot.com/configuration-options/#matchcurrentversion it appears that in this case it is not working. See the following commit 076f13da86, therefore we work around this by using a semver version that excludes anything which doesn't match `>= 1`.

PR Close #41886
2021-04-29 13:50:25 -07:00
Andrew Kushnir e53c80c7ca ci: changes to `packages/common/http` should not require `fw-common` approval (#41887)
Currently when the change is made to the code inside the `packages/common/http` folder, both `fw-http` and `fw-common` group members are assigned for review. However only `fw-http` is required and should be sufficient. This commit updates the PullApprove config to exclude `packages/common/http` path from the list of folders that `fw-common` "owns".

PR Close #41887
2021-04-29 13:49:37 -07:00
Alan Agius ca0fcd6c08 ci: only run `publish_snapshot` when not PR (#41877)
Currently, the non forked PRs such as Renovate will run `publish_snapshot` because `CIRCLE_PR_NUMBER` is not defined for PRs which are opened from non forked repos. Instead we add a filter to only run `publish_snapshot` on releasable branches.

Example of run were the mentioned variable is not defined https://app.circleci.com/pipelines/github/angular/angular/32093/workflows/7c8c4cfc-e6f6-44fc-a6dc-a82a6ac862db/jobs/976611

PR Close #41877
2021-04-29 10:16:03 -07:00
George Kalpakas f3331a8350 build(docs-infra): upgrade cli command docs sources to ac6fc449e (#41878)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](2310e277b...ac6fc449e):

**Modified**
- help/add.json
- help/analytics.json
- help/deploy.json
- help/e2e.json
- help/help.json
- help/lint.json
- help/new.json
- help/run.json
- help/test.json

PR Close #41878
2021-04-29 10:09:09 -07:00
cexbrayat 79e82f22a5 docs: remove ts-node form dev deps (#41873)
Follow-up to #41826

The CLI now no longer installs `ts-node` since Protractor has been removed.
See https://github.com/angular/angular-cli/pull/20601 for the relevant PR in angular-cli.
This change has been released in the CLI v12.0.0-rc.1

PR Close #41873
2021-04-29 10:08:14 -07:00
Alan Agius 05209fa397 ci: exclude packages which don't have a major from being batched (#41865)
With this change we exclude packages that are not stable yet from being batched in the `all non-major dependencies`. The reason behind this is that these package can contain breaking changes in minor versions, hence they should be treated as breaking and a PR should be opened separately.
PR Close #41865
2021-04-29 10:07:27 -07:00
Alan Agius 9eea39fb2f ci: enable Renovate for remark packages (#41865)
Automatic updates of these packages is now possible as AIO tooling has been updated to use the latest version.

See: https://github.com/angular/angular/pull/41721
PR Close #41865
2021-04-29 10:07:26 -07:00
Sam Severance d80ad951c6 docs: correct toh router tutorial (#41859)
* `SelectivePreloadingStrategyService` is already provided in the root
   module, so it should not be added to `AppRoutingModule` providers
   array

PR Close #41859
2021-04-29 10:05:30 -07:00
Renovate Bot 595a75cda4 build: update dependency karma to v6 (#41696)
PR Close #41696
2021-04-29 10:04:24 -07:00
Teri Glover 55d9713664 docs: Edits to remove jargon (#41536)
PR Close #41536
2021-04-28 15:11:32 -07:00
Keen Yee Liau c31d6ea24e docs: remove tslint, codelyzer & protractor from dev deps (#41826)
TSLint and Codelyzer were deprecated in v11.
Protractor is no longer installed by default in new projects in v12.

PR Close #41826
2021-04-28 14:33:11 -07:00
Kapunahele Wong 695b72a972 docs: imrpove accessibility of lifecycle hooks example (#41071)
PR Close #41071
2021-04-28 14:26:34 -07:00
Kapunahele Wong 3ccad85b01 docs: add error page for NG6999 (#41708)
Adds page for NG6999 error for VE builds that attempt
to consume an Ivy-compiled library.
Will go here: https://angular.io/errors/NG6999

PR Close #41708
2021-04-28 14:22:46 -07:00
Cosmin Ababei 42a64f8676 docs: remove mention of scheduleTick in markForCheck (#41845)
markForCheck doesn't call scheduleTick, thus I removed the comment which mentioned this.
PR Close #41845
2021-04-28 12:34:49 -07:00
Pete Bacon Darwin 76c824b6da build(docs-infra): update to latest puppeteer (#41764)
The updates to WebDriver required an update to puppeteer to ensure
that the correct Chromium was downloaded.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 4f20cd16b4 build(docs-infra): add `assert` polyfill (#41764)
With this change we add the `assert` polyfill which is required because `timezone-mock` is a Node.JS library which is being used in Browser.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius bdb8deaa51 build(docs-infra): remove `src/generated` from `ng test` configuration (#41764)
Assets are stored in memory during `ng test` hence since `src/generated` are unused we shouldn't include them.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 17ffb7480f build(docs-infra): update angular packages to `12.0.0-rc.0` (#41764)
Update Angular packages to `12.0.0-rc.0`

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 754e5ba839 build: update angular package to `12.0.0-rc.0` (#41764)
Update Angular packages to `12.0.0-rc.0`

PR Close #41764
2021-04-28 12:33:20 -07:00
Jessica Janiuk bbda73e55a docs: release notes for the v12.0.0-rc.1 release 2021-04-28 12:09:20 -07:00
Jessica Janiuk 444775c352 docs: release notes for the v11.2.12 release 2021-04-28 11:33:23 -07:00
George Kalpakas 641fa6944f ci: re-enable the `@angular/components` unit tests (#41816)
Previously, the `components-repo-unit-tests` CI job was temporarily
disabled due to a version mismatch between the `rules_nodejs`
dependency version on the two repos (angular/angular and
angular/components).

Now that both repos have been updated to a `rules_nodejs` version
>=2.0.0, we can re-enable the job and have `@angular/components` unit
tests run on every build.

PR Close #41816
2021-04-28 09:57:48 -07:00
George Kalpakas 044b380e5a build: update remark packages (#41721)
This commit updates the `remark` packages to v12 instead of the latest
(v13), because v13 is a major breaking change that requires more
investigation and work.

More specifically, v13 replaces the internals of `remark` with a new
CommonMark-compliant parser. (See their [release notes][1] for more
info.)

This change causes our old `remark` plugins (in [renderMarkdown.js][2])
to stop working.

[1]: https://github.com/remarkjs/remark/releases/tag/13.0.0
[2]: d42019d412/aio/tools/transforms/remark-package/services/renderMarkdown.js (L17-L24)

PR Close #41721
2021-04-28 09:27:23 -07:00
Alan Agius 1aed2f3234 fix(dev-infra): replace `chalk` require with namespace import (#41847)
Since we now use version 4 we can use namespace imports and leverage in build types.

PR Close #41847
2021-04-28 09:22:31 -07:00
Renovate Bot 876ca8edba build: update dependency chalk to v4 (#41847)
PR Close #41847
2021-04-28 09:22:31 -07:00
George Kalpakas fff2ca540f fix(dev-infra): correctly detect prettier config (#41860)
This commit uses the correct property name (`prettier` vs `pretter`) to
check whether prettier is enabled via the config.

(It also fixes some typos in `dev-infra`.)

PR Close #41860
2021-04-28 09:21:09 -07:00
George Kalpakas 3b7d4ebbd6 fix(docs-infra): do not redirect disambiguated URLs (#41842)
In #41788, logic was added to disambiguate case-insensitively equal docs
paths/URLs. This process includes appending a `-\d+` suffix to some
paths/URLs (for example, `/.../inject-1`). Unfortunately, some of the
Firebase redirects configured in `firebase.json` would match these URLs
and redirect them to non-existing paths.
Example failures: [stable][1], [next][2]

NOTE:
This was not picked up in the regular CI tests run for PRs, because the
local devserver and the preview server used to test PRs do not support
Firebase-like redirects.

This commit fixes this by ensuring these disambiguated paths/URLs are
not matched by the redirect rules by checking whether the part of the
suffix after the `-` contains any numeric digits. While this check is
not ideal, it should be good enough for our purpose, since the legacy
URLs that we do want to redirect contain suffixes such as `-class`,
`-function` and thus no numeric digits.

[1]: https://circleci.com/gh/angular/angular/974345
[2]: https://circleci.com/gh/angular/angular/974346

PR Close #41842
2021-04-27 14:05:23 -07:00