https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
13d1763 release: cut the v10.0.4 release 15 July 2020, 17:56:55 UTC
e3b8010 fix(ngcc): report a warning if ngcc tries to use a solution-style tsconfig (#38003) In CLI v10 there was a move to use the new solution-style tsconfig which became available in TS 3.9. The result of this is that the standard tsconfig.json no longer contains important information such as "paths" mappings, which ngcc might need to correctly compute dependencies. ngcc (and ngc and tsc) infer the path to tsconfig.json if not given an explicit tsconfig file-path. But now that means it infers the solution tsconfig rather than one that contains the useful information it used to get. This commit logs a warning in this case to inform the developer that they might not have meant to load this tsconfig and offer alternative options. Fixes #36386 PR Close #38003 14 July 2020, 20:21:32 UTC
6626739 docs(core): fixes minor typo in initNgDevMode function docs (#38042) PR Close #38042 14 July 2020, 20:17:33 UTC
396033d refactor(forms): remove unnecessary `!` operators from validators (#36805) When we added the strict null checks, the lexer had some `!` operators added to prevent the compilation from failing. See #24571 PR Close #36805 14 July 2020, 18:01:54 UTC
02ee9d2 docs(forms): Fix typos in template-driven forms tutorial (#37933) Fix two typos in the 'Building a template-driven form` that caused the guide to not be displayed correctly. PR Close #37933 14 July 2020, 18:01:30 UTC
a4c7f18 docs(forms): Minor fix in forms overview guide (#37933) Remove an article from the `Data flow in forms` section of the forms overview guide. The use of `the` and `a` together is not syntactically correct. PR Close #37933 14 July 2020, 18:01:30 UTC
d690eec docs(router): fix typo in "spotlight on pathmatch" (#38039) https://angular.io/guide/router-tutorial-toh#pathmatch PR Close #38039 14 July 2020, 16:20:19 UTC
10e4dfa docs(router): fix typo in https://angular.io/guide/router#activated-route (#38034) In angular.io, it linked to the wrong part of the page. https://angular.io/guide/router#activated-route PR Close #38034 14 July 2020, 16:10:26 UTC
f8d948b docs: fix live examples in testing guides (#38038) In #37957, parts of the testing guide were broken out into separate guides. As part of that work, the `<live-example>` tags were also copied to the new guides. These `<live-example>` tags did not specify the targeted example project via the `name` attribute, thus they were implicitly targeting the example with the same name as the guide they were in. See the [Docs style guide][1] for more info. However, there is only one example project (`testing/`) and all `<live-example>` tags were supposed to target that. This worked fine on the `testing.md` guide, but it broke on other guides (which tried to target non-existing example projects based on their names). This commit fixes it by explicitly specifying which example is targeted by the `<live-example>` tags. It also removes the `embedded-style` attribute that has no effect. [1]: https://angular.io/guide/docs-style-guide#live-examples Fixes #38036 PR Close #38038 14 July 2020, 16:10:01 UTC
9cf78d5 docs(core): Fixed typo in Type JSdoc (#37930) Updated comment doc in packages/core/src/interface/type.ts PR Close #37930 13 July 2020, 21:30:56 UTC
45471db refactor(dev-infra): allow for consumption with rules_nodejs v2.0.0 (#37968) With `rules_nodejs` v2.0.0 being in RC phase currently, we should make sure that the package is compatible so that we can use it in the components repo in combination with rules_nodejs v2.0.0. In v2.0.0 of the NodeJS rules, Bazel workspaces are recommended to no longer be symlinked under a separate repository. Instead, bazel rules and targets should be accessed directly from the user-selected NPM repository. Usually `@npm`, so that the import changes to `@npm//@angular/dev-infra-private/<..>`. PR Close #37968 13 July 2020, 21:18:23 UTC
387e838 fix(language-service): remove completion for string (#37983) If the user inputs a string(e.g. `<div [ngClass]="'str~{cursor}'"></div>`), the completion is useless. PR Close #37983 13 July 2020, 21:16:56 UTC
eec6e4b docs: fixed typo in https://angular.io/guide/glossary (#36220) PR Close #36220 13 July 2020, 21:10:07 UTC
b711f25 docs(router): fix typo 'containa' to 'contains' (#36764) Closes #36763 PR Close #36764 13 July 2020, 21:09:33 UTC
788f045 docs: Add Scully to resources.json (#37678) Add Scully to the resource page by adding it to the "Tooling" subcategory in resources.json file PR Close #37678 13 July 2020, 21:08:41 UTC
45b1775 docs: remove Markus Padourek from angular collaborators (#37962) This person was never onboarded PR Close #37962 13 July 2020, 21:08:14 UTC
53e4ff7 docs: fix typo in router.md (#37227) This commit fixes a typo in the router documentation. "Benfits of a routing module" => "Benefits of a routing module" PR Close #37227 13 July 2020, 16:27:29 UTC
7813a7d docs(http): Remove extra semicolons in the http guide (#37228) An extra semicolon in searchHeroes function was removed in the http guide found in aio/content/guide/http.md docs(http): Remove extra semicolon in a code example found in the http guide Removed extra semicolon in handleError function in the file located at aio/content/examples/http/src/app/config/config.service.ts, which serves as a source of code examples for the http guide. Replace a comma for a dot in the comment at line 79 to ensure consistency with the rest of the document. Capitalized and added a dot at the end of the comment at line 84 to ensure consistency with the other comments. PR Close #37228 13 July 2020, 16:25:20 UTC
c0ced6d build(docs-infra): ensure the correct files are in the i18n example (#37947) The Stackblitz and zip-file include `doc-files` unnecssarily and are missing the locale files. This commit updates the `stackblitz.json` to fix this. PR Close #37947 13 July 2020, 16:24:34 UTC
8157ee8 build(docs-infra): remove unnecessary zipper.json file (#37947) The `zipper.json` file is only needed if the example does not have a `stackblitz.json` file, which this (i18n) example does. Moreover, it appears that having both can cause the generated zip file to be corrupted and not unzippable. Fixes #37849 PR Close #37947 13 July 2020, 16:24:34 UTC
ab051ab docs: reformat and update CONTRIBUTING.md (#37951) This doc is very old and rusty. I'm reformatting it to follow the one-setence-per-line rule. I also updated a few sections, since they were either poorly written or obsolete. PR Close #37951 13 July 2020, 16:23:04 UTC
5a61ef0 build: add .gitmessage file with commit message template (#37951) Git provides a way to create a commit message template via the `.gitmessage` file. Introduce an Angular-specific .gitmessage template based on the original Commit Message Guidelines. https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines If this template workflow is proven in practice, we can move the commit message guidelines into the .gitmessage file to prevent duplication of the content. This change is a follow up on #37949 and is inspired by info found in the following blog post: https://thoughtbot.com/blog/better-commit-messages-with-a-gitmessage-template PR Close #37951 13 July 2020, 16:23:04 UTC
c451dbd build: adding shared .ng-dev/gitconfig file for convenience and consistent git config (#37951) This file is inert unless it's explicitly included into the local git config via: ``` git config --add include.path '../.ng-dev/gitconfig' ``` Calling that command will append the following into `.git/config` of the current git workspace (i.e. $GIT_DIR, typically `angular/.git/config`): ``` [include] path = ../.ng-dev/gitconfig ``` I'm intentionally keeping the config inert for now until we prove that this is a good idea. Eventually we could roll this change out to all the contributors via an npm post-install script. PR Close #37951 13 July 2020, 16:23:04 UTC
0d38288 docs: Move router tutorial (toh) from router.md to new file (#37979) In an effort to make angular documentation easier for users to read, we are moving the router tutorial currently in router.md to a new file. To support this change, we have done the following: * Update files to fix any broken links caused by moving the file * Updated the new file to follow tutorial guidelines * Add the new file to the table of contents under, Tutorials. PR Close #37979 10 July 2020, 22:04:56 UTC
2e9b953 docs(router): fix routerLink docs (#37997) The current content for the routerLink commands input does not make it to aio. fixes #35414 PR Close #37997 10 July 2020, 18:24:29 UTC
a94383f fix(compiler): check more cases for pipe usage inside host bindings (#37883) Builds on top of #34655 to support more cases that could be using a pipe inside host bindings (e.g. ternary expressions or function calls). Fixes #37610. PR Close #37883 10 July 2020, 18:00:21 UTC
75c40dd feat(dev-infra): commit message validation should skip lines consisting of URLs (#37890) The dev-infra commit message validation optionally can check for lines to not exceed a given amount of characters. This is desired for most commit messages, but sometimes not actionable if a long URL is inserted into the commit message. With this commit, we skip the max line length check for lines that start with an URL. PR Close #37890 10 July 2020, 17:59:29 UTC
86a75a0 build: split dev-infra configuration into individual files (#37890) Splits the dev-infra configurations into individual files inside the `.ng-dev/` folder. This helps with clarity as there is no single configuration file that becomes extremely large and difficult to maintain. Additionally, more explicit configuration types are now used. This fixed the max-line length setting for commit message validation. This option is currently named incorrectly and a noop. PR Close #37890 10 July 2020, 17:59:29 UTC
c776825 fix(dev-infra): include `bazel` utility files in npm package (#37891) We recently added a new folder for common bazel utilities to `dev-infra`. The `ng_rollup_bundle` rule relies on an utility that is provided by this `bazel/` folder. Unfortunately though it looks like this folder is currently not included in the NPM package, so that the `ng_rollup_bundle` rule does not work as expected. This commit fixes that by including the bazel utilities in the NPM package. PR Close #37891 10 July 2020, 17:06:12 UTC
1cc9383 build: set up caretaker note label in merge tooling (#37778) Leverage the caretaker note label configuration in ng-dev's merge tooling to prompt the caretaker for confirmation when a PR has the `PR action: merge-assistance` label. This should help to surface for the caretaker, PRs which may need additional steps taken, announcement messaging, etc. PR Close #37778 10 July 2020, 16:58:36 UTC
8ed1e53 test: update symbol goldens to reflect optimized application (#37778) Interestingly enough, our rollup bundle optimization pipeline did not work properly before 1b827b058e5060963590628d4735e6ac83c6dfdd. Unused declarations were not elided because build optimizer did not consider the Angular packages as side-effect free. Build optimizer has a hard-coded list of Angular packages that are considered side-effect free. Though this one did not match in the old version of the rollup bundle rule, as internal sources were resolved through their resolved bazel-out paths. Hence build optimizer could not detect the known Angular framework packages. Now though, since we leverage the Bazel-idiomatic `@bazel/rollup` implementation, sources are resolved through linked `node_modules`, and build optimizer is able to properly detect files as side-effect free. PR Close #37778 10 July 2020, 16:58:35 UTC
7833c88 ci: update components-repo-unit-tests job commit (#37778) Updates to the latest commit of the `angular/components` repository. We need to do this because we removed the `esm5.bzl` output flavour aspect, but an old version of the components repo relied on this file to exist. This is no longer the case, and we can simply update the version of the components repo we can test against. PR Close #37778 10 July 2020, 16:58:35 UTC
12f1773 fix(language-service): non-existent module format in package output (#37778) The language-service package currently sets the `module` `package.json` property and refers to a folder called `fesm5`. The language-service though does not build with `ng_package` so this folder never existed. Now with APF v10, ng package would not generate this folder either. We should just remove the property as the primary entry-point is the UMD bundle resolved through `main`. There is no module flavour exposed to the NPM package as `pkg_npm` uses the named AMD module devmode output that doesn't work for `module`. PR Close #37778 10 July 2020, 16:58:35 UTC
5be3236 test: remove unused stale ng_package test golden file (#37778) It looks like there is a leftover golden in the `ng_package` tests that is no longer used anywhere and does not reflect the latest Angular Package Format v10 changes. We should be able to remove it to keep our codebase healthy. PR Close #37778 10 July 2020, 16:58:35 UTC
5b7d2ee refactor(dev-infra): ng_rollup_bundle rule should leverage `@bazel/rollup` (#37778) Refactors the `ng_rollup_bundle` rule to a macro that relies on the `@bazel/rollup` package. This means that the rule no longer deals with custom ESM5 flavour output, but rather only builds prodmode ES2015 output. This matches the common build output in Angular projects, and optimizations done in CLI where ES2015 is the default optimization input. The motiviation for this change is: * Not duplicating rollup Bazel rules. Instead leveraging the official rollup rule. * Not dealing with a third TS output flavor in Bazel.The ESM5 flavour has the potential of slowing down local development (as it requires compilation replaying) * Updating the rule to be aligned with current CLI optimizations. This also _fixes_ a bug that surfaced in the old rollup bundle rule. Code that is unused, is not removed properly. The new rule fixes this by setting the `toplevel` flag. This instructs terser to remove unused definitions at top-level. This matches the optimization applied in CLI projects. Notably the CLI doesn't need this flag, as code is always wrapped by Webpack. Hence, the unused code eliding runs by default. PR Close #37778 10 July 2020, 16:58:35 UTC
6cd10a1 feat(bazel): provide LinkablePackageInfo from ng_module (#37778) Adds the `LinkablePackageInfo` to the `ng_module` rule. This allows the linker to properly link `ng_module` targets in Node runtime actions. Currently this does not work properly and packages like `@angular/core` are not linked, so we cannot rely on the linker. https://github.com/bazelbuild/rules_nodejs/blob/9a5de3728b05bf1647bbb87ad99f54e626604705/internal/linker/link_node_modules.bzl#L144-L146. PR Close #37778 10 July 2020, 16:58:35 UTC
822652a refactor(bazel): cleanup ng_package rule to not build fesm5 and esm5 output (#37778) As of Angular Package Format v10, we no longer ship a `fesm5` and `fesm5` output in packages. We made this change to the `ng_package` rule but intentionally did not clean up related build actions. This follow-up commit cleans this up by: * No longer building fesm5 bundles, or providing esm2015 output. * No longer requesting and building a third flavor for ESM5. We can use TSC to downlevel ES2015 sources/prodmode output similarly to how it is done in `ng-packagr`. The third output flavor (ESM5) resulted in a build slow-down as we required a full recompilation of sources. Now, we only have a single compilation for prodmode output, and then downlevel it on-demand to ES5 for the UMD bundles. Here is timing for building the release packages in `angular/angular` before this change, and afterwards: * Before: 462.157s = ~7.7min * After: 339.703s = ~5.6min This signifies a time reduction by 27% when running `./scripts/build/build-packages-dist.sh`. PR Close #37778 10 July 2020, 16:58:35 UTC
cf47ace refactor(dev-infra): migrate github api in GitClient to rely on GithubClient (#37778) GitClient now uses GithubClient for github API interactions. GithubClient is a class which extends Octokit and provides a member which allows for GraphQL requests against the Github GraphQL api, as well as providing convenience methods for common/repeated Github API requests. PR Close #37778 10 July 2020, 16:58:35 UTC
0595f11 refactor(dev-infra): cleanup shared package dependencies (#37778) Cleans up the dependencies used in the shared dev-infra package configuration. With the recent benchmarking utilities that have been added, a lot of peer dependencies have been added. We decided that we don't want to list every used dependencies as peer dependency as that could result in unnecessary churn/noise for consumers of the dev-infra package. Additionally, not all parts of the dev-infra package are necessarily used. Due to this, we want to apply the following rules for the package dependencies: 1. If a dependency is only used in a shipped Bazel macro/rule that can be optionally consumed, omit it from `package.json`. Bazel reports the missing dependency on its own, so we want to avoid adding it to the package json file. 2. Otherwise, if the dependency is large and commonly used (like buildifier), add it to the `peerDependencies`. If not, add it to the dependencies that are always brought in. We consider it as acceptable to bring in a few small dependencies that might not be used or not. Making all of those option would complicate the use of the dev-infra package. ds PR Close #37778 10 July 2020, 16:58:35 UTC
35df312 refactor(dev-infra): use shelljs instead of fs-extra for benchmark utils (#37778) We added a new dependency on `fs-extra` to the dev-infra package. We can remove this dependency and replace it with `shelljs` that is extensively used in other places already. The motiviation is that we can reduce dependencies needed for for consumption of the shared dev-infra package. PR Close #37778 10 July 2020, 16:58:34 UTC
489eb85 feat(dev-infra): support for caretaker note label in merge script (#37595) (#37778) Adds support for a caretaker note label to the merge script. Whenever a configured label is applied, the merge script will not merge automatically, but instead prompt first in order to ensure that the caretaker paid attention to the manual caretaker note on the PR. This helps if a PR needs special attention. PR Close #37595 PR Close #37778 10 July 2020, 16:58:34 UTC
b76a2dc fix(bazel): ng_module rule does not expose flat module information in Ivy (#36971) The `ng_module` rule supports the generation of flat module bundles. In View Engine, information about this flat module bundle is exposed as a Bazel provider. This is helpful as other rules like `ng_package` could rely on this information to determine entry-points for the APF. With Ivy this currently does not work because the flat module information is not exposed in the provider. The reason for this is unclear. We should also provide this information in Ivy so that rules like `ng_package` can also determine the correct entry-points when a package is built specifically with `--config=ivy`. PR Close #36971 09 July 2020, 22:11:17 UTC
f2f5f7f docs(animations): Added consistency in code examples (#37081) PR Close #37081 09 July 2020, 22:08:01 UTC
8ee23ba docs: add explanation for providedIn any (#35283) Angular 9 introduces a new value for providedIn called `any` which lets us use unique instance for servicec in each lazy loaded module, this PR is to document the same fixes #35179 PR Close #35283 09 July 2020, 17:12:00 UTC
ecb422b ci: fix payload size (#37993) Payload size test is failing on the 10.0.x branch at the moment. PR Close #37993 09 July 2020, 17:09:10 UTC
60389d5 refactor(service-worker): use nominal type for normalized URLs (#37922) Some ServiceWorker operations and methods require normalized URLs. Previously, the generic `string` type was used. This commit introduces a new `NormalizedUrl` type, a special kind of `string`, to make this requirement explicit and use the type system to enforce it. PR Close #37922 09 July 2020, 16:44:58 UTC
b186db7 fix(service-worker): correctly handle relative base href (#37922) In some cases, it is useful to use a relative base href in the app (e.g. when an app has to be accessible on different URLs, such as on an intranet and the internet - see #25055 for a related discussion). Previously, the Angular ServiceWorker was not able to handle relative base hrefs (for example when building the with `--base-href=./`). This commit fixes this by normalizing all URLs from the ServiceWorker configuration wrt the ServiceWorker's scope. Fixes #25055 PR Close #37922 09 July 2020, 16:44:58 UTC
324b6f1 test(service-worker): make mock implementations more similar to actual ones (#37922) This commit makes the mock implementations used is ServiceWorker tests behave more similar to the actual ones. PR Close #37922 09 July 2020, 16:44:58 UTC
cdba1d3 refactor(service-worker): move asset URL normalization to `Adapter` (#37922) This is in preparation of enabling the ServiceWorker to handle relative paths in `ngsw.json` (as discussed in #25055), which will require normalizing URLs in other parts of the ServiceWorker. PR Close #37922 09 July 2020, 16:44:58 UTC
dc42c97 fix(service-worker): correctly serve `ngsw/state` with a non-root SW scope (#37922) The Angular ServiceWorker can serve requests to a special virtual path, `ngsw/state`, showing [information about its internal state][1], which can be useful for debugging. Previously, this would only work if the ServiceWorker's [scope][2] was the root directory (`/`). Otherwise, (e.g. when building the app with `--baseHref=/some/path/`), the ServiceWorker would fail to detect a request to `/some/path/ngsw/state` as matching `ngsw/state` and would not serve it with the debugging information. This commit fixes it by ensuring that the ServiceWorker's scope is taken into account when detecting a request to `ngsw/state`. [1]: https://angular.io/guide/service-worker-devops#locating-and-analyzing-debugging-information [2]: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/scope Fixes #30505 PR Close #37922 09 July 2020, 16:44:57 UTC
bc00e8d docs: add Formly library to the list of resources (#37257) This commit adds the Formly library to the Angular list of resources at aio/content/marketing/resources.json. PR Close #37257 09 July 2020, 16:19:49 UTC
720b71d docs(router): get rid of unnecessary line in wildcard route example and fixing wildcard docregions (#37127) The wildcard example leads to display a 404 page with the PageNotFoundComponent. But before, there is a wildcard to redirect to the FirstComponent and because of the routes order the FirstComponent will be displayed; which it is not the target of the wildcard route example code. Also, fixing some wildcard docregions PR Close #37127 08 July 2020, 23:04:51 UTC
1132b07 test: fix test failure in saucelabs ivy ie10 (#37892) One of the ivy acceptance tests currently fails in IE10. This is because we recently added a new test that asserts that injecting `ViewRef` results in a `NullInjectorError`. Due to limitations in TypeScript and in polyfills for `setPrototypeOf`, the error cannot be thrown as `ViewRef` is always considered injectable. In reality, `ViewRef` should not be injectable, as explicitly noted in https://github.com/angular/angular/commit/c00f4ab2ae703e8a3ee4a3850170c9bbf0f9bc42. There seems no way to simulate the proper prototype chain in such browsers that do not natively support `__proto__`, so TypeScript and `core-js` polyfills simply break the prototype chain and assign inherited properties directly on `ViewRef`. i.e. so that `ViewRef.__NG_ELEMENT_ID__` exists and DI picks it up. There is a way for TypeScript to theoretically generate proper prototype chain in ES5 output, but they intend to only bother about the proper prototype chain in ES6 where `setPrototypeOf` etc. are offically standarized. See the response: https://github.com/microsoft/TypeScript/issues/1601#issuecomment-94892833. PR Close #37892 08 July 2020, 23:03:34 UTC
9230194 build(docs-infra): update @angular/cli to 10.0.1 (#37898) This commit updates the version of Angular CLI used in angular.io to version 10.0.1. It also reverts some changes (namely commits 38dfbc775f1 and eee2fd22e0a) which were made due to an older bug that is fixed in the latest version. See #37688 for more details. Fixes #37699 PR Close #37898 08 July 2020, 23:02:47 UTC
d724896 refactor(docs-infra): avoid Material style duplication warning (#37898) This commit removes some duplicate imports of Material themes and theming-related utilities. While this change does not have any impact on the size of the generated `styles.css` file, it silences a build warning pointing to [Avoiding duplicated theming styles][1]. [1]: https://github.com/angular/components/blob/db4b0cd1bff0bbb1741d22975bcfe1069aea3a53/guides/duplicate-theming-styles.md PR Close #37898 08 July 2020, 23:02:47 UTC
29866df build(docs-infra): update @angular/material to 10.0.1 (#37898) This commit updates the version of Angular Components used in angular.io to version 10.0.1. It also updates the angular.io app to adapt to breaking changes. PR Close #37898 08 July 2020, 23:02:47 UTC
a249622 build(docs-infra): update @angular/core to 10.0.2 (#37898) This commit updates the version of Angular framework used in angular.io to version 10.0.2. It also features a commit message with a 100+ chars long body. PR Close #37898 08 July 2020, 23:02:47 UTC
9f2393f refactor(core): remove duplicated WrappedValue class (#37940) Before this refactoring we had the WrappedValue class in 2 separate places: - packages/core/src/change_detection/change_detection_util.ts - packages/core/src/util/WrappedValue.ts This commit removes the duplicate, leaving the class that has the deprecation notice. PR Close #37940 08 July 2020, 23:02:17 UTC
d5f8040 docs: break testing doc into multiple docs (#37957) This commit breaks up the testing document into nine total documents, with each document focusing on an existing section of the current testing documentation. There are no content changes. PR Close #37957 08 July 2020, 23:01:50 UTC
e0b8ea1 docs(elements): fix typo (you custom element --> your custom element) (#37966) PR Close #37966 08 July 2020, 23:01:22 UTC
879b227 ci: decrease the minBodyLength commit message limit to 20 chars (#37949) The motivation behind this change is to improve the productivity in the angular/angular repo without sacrificing the original goal of having better understanding of changes within the repo. When the minBodyLength limit was originally introduced the goal was simple: force committers to provide more contextual information for each change coming into the repo. Too often we found ourselves in a situation where nobody understood what motivated some of the changes and we needed more contextual info to know if the change was correct, desirable, and still relevant (at a later point in time). When the limit was introduced, we needed to pick a minimum body length - given no data, and frustration with even big changes being committed with just a words in the subject (along the lines of "fix(core): fixing a bug"), we overcompensated and started off with a really high bar of minBodyLength set to 100 chars. This turned out to be impractical and created a big friction point in making valid changes in the angular/angular repo, and in fact caused some of the refactorings and smaller changes to be either skipped or combined into other commits which increased the burden for code reviewers. The evidence in the friction points can be seen in the number of PRs that fail to pass the current lint check on the first try, but more importantly also in the "creative" writing that some of the committers are forced to resort to in order to satisfy the current checks. Examples: - https://github.com/angular/angular/commit/286fbf42c65a02e6da7420cd19a2c5baff3f2656 - https://github.com/angular/angular/commit/b2816a1536075397d876ba27ce2b7dcd785d4a39 Given that we primarily care to document the motivation behind each change (the answer to the ultimate question: WHY?), I've collected several *common* & *valid* commit messages that are minimalistic and capture the WHY sufficiently: ``` Refactoring for readability. => 28 chars Improving variable naming. => 26 chars Additional test coverage. => 25 chars Cleaning up the code. => 21 chars Simplified the code. => 20 chars ``` These commit message bodies in addition to the commit message subject should sufficiently satisfy the need to capture the context and motivation behind each change without creating an undue burden on committers. Example minimalistic commit message: ------ refactor(core): cleanup the expression parser Simplifying the code. ---- Given this research, I'm decreasing the minBodyLenth in angular/angular to 20 chars. The commit message quality can be additionally improved by implementing a commit message template via `.gitmessage` that will guide the committers in following our commit message guidelines via instructions provided in the form of in-the-flow help rather than as an after the fact lint check. More info: https://thoughtbot.com/blog/better-commit-messages-with-a-gitmessage-template I'm intentionally deferring such change for a separate PR as not to complicate or delay the minBodyLength limit decrease. PR Close #37949 08 July 2020, 22:43:03 UTC
f24972b release: cut the v10.0.3 release 08 July 2020, 20:44:29 UTC
d2886b3 build: filter out duplicate cherry-picked commits in changelog (#37956) Often changelogs are generated from the patch branch and then cherry-picked into the `CHANGELOG.md` file in `master` for better access and readability. This is problematic though as `conventional-changelog` (the tool we use for generating the changelog), will duplicate commits when a future changelog is generated from `master` then (i.e. for a new minor release). This happens because conventional-changelog always generates the changelog from the latest tag in a given branch to `HEAD`. The tag in the patch branch does not correspond to any SHA in `master` so the intersection of commits is not automatically omitted. We work around this naively (until we have a better tool provided by dev-infra), by deduping commits that are already part of the changelog. This has proven to work as expected in the components repo. PR Close #37956 08 July 2020, 19:04:47 UTC
f296fea docs: minor fixes to docs related to updating to v10 (#37897) This commit includes a couple of minor fixes to docs related to updating to v10: - Fix markdown link in "Updating to Angular version 10" guide. - Correctly display numbered list in "Solution-style `tsconfig.json` migration" guide. PR Close #37897 07 July 2020, 19:17:05 UTC
2605fc4 feat(dev-infra): merge script should link to original commit when cherry-picking with API strategy (#37889) The merge script uses `git cherry-pick` for both the API merge strategy and the autosquash strategy. It uses cherry-pick to push commits to different target branches (e.g. into the `10.0.x` branch). Those commits never point to the commits that landed in the primary Github branch though. For the autosquash strategy the pull request number is always included, so there is a way to go back to the source. On the other hand though, for commits cherry-picked in the API merge strategy, the pull request number might not always be included (due to Github's implementation of the rebase merge method). e.g. https://github.com/angular/components/commit/27f52711c0618a9ae4eab4c888c8ab3245638e77 For those cases we'd want to link the cherry-picked commits to the original commits so that the corresponding PR is easier to track down. This is not needed for the autosquash strategy (as outlined before), but it would have been good for consistency. Unfortunately though this would rather complicate the strategy as the autosquash strategy cherry-picks directly from the PR head, so the SHAs that are used in the primary branch are not known. PR Close #37889 07 July 2020, 19:16:22 UTC
9d54b3a fix(docs-infra): prevent search-bar from overlapping nav-items (#37938) As part of angular.io's responsive layout, the menu shown in the top-bar is collapsed into the sidenav on narrow screens at the point where the search-bar (on the right side of the top-bar) would overlap with the menu's nav-items. Previously, the value used as break-point would work on marketing pages, where the hamburger button is not shown on wide screens. However, on docs pages (where the hamburger button is always shown, pushing the menu further to the right), the search-bar would still overlap the menu nav-items on some resolutions. This commit fixes it by raising the screen width threshold at a value that ensures there is no overlap even on pages where the hamburger button is visible alongside the top-bar menu. Fixes #37937 PR Close #37938 06 July 2020, 20:57:38 UTC
d09a628 refactor(docs-infra): decouple showing the top-menu in top-bar from showing the sidenav (#37938) As part of angular.io's responsive layout, the following rules are applied: - On wide screens, a menu is shown in the top-bar and the sidenav is shown side-by-side with the docs content. - On narrow screens, the top-menu is moved from the top-bar to the sidenav and the sidenav is closed by default and floats over the content when manually opened. Previously, the break-points at which the top-menu was shown in the top-bar and the sidenav was shown side-by-side with the content were the same (using a single variable). This commit decouples the two break-points to make it possible to use different values in the future. PR Close #37938 06 July 2020, 20:57:38 UTC
1c168c3 refactor(docs-infra): use Sass variable for top-bar hamburger button show/hide threshold (#37938) Use a Sass variable for the screen width break-point at which the top-bar hamburger button is hidden/shown. This allows more easily updating the break-point. PR Close #37938 06 July 2020, 20:57:38 UTC
0f74479 build(docs-infra): improve applying post-install patches (#37896) In `aio/`, we have a mechanism to apply patches in a `postinstall` hook. See `aio/tools/cli-patches/README.md` for more info. Previously, we had to update `aio/tools/cli-patches/patch.js` to list each `.patch` file separately. While working on #37688, I found it helpful for the script to automatically pick up `.patch` files. This commit updates the script to automatically pick up and apply `.patch` files from the `aio/tools/cli-patches/` directory. If one wants to keep a `.patch` file but not apply it, they can change the file's extension or move it to a sub-directory (without having to update the script). PR Close #37896 06 July 2020, 20:56:15 UTC
790bb94 fix(core): handle spaces after `select` and `plural` ICU keywords (#37866) Currently when the `plural` or `select` keywords in an ICU contain trailing spaces (e.g. `{count, select , ...}`), these spaces are also included into the key names in ICU vars (e.g. "VAR_SELECT "). These trailing spaces are not desirable, since they will later be converted into `_` symbols while normalizing placeholder names, thus causing mismatches at runtime (i.e. placeholder will not be replaced with the correct value). This commit updates the code to trim these spaces while generating an object with placeholders, to make sure the runtime logic can replace these placeholders with the right values. PR Close #37866 06 July 2020, 20:55:48 UTC
2adcad6 fix(dev-infra): fix typo in ng-dev config (#37862) The logic to exclude certain types of commits (specifically 'docs' ones) was implemented in https://github.com/angular/angular/commit/c5b125b7db50914840849a8d86cbb3304d2f4e68. The ng-dev config was updated in the followup commit https://github.com/angular/angular/commit/acf3cff9eedbcfbc4476e0597d0a3c7a883bd05f, but there was a typo that prevented the new logic from being activated. This commit updates the name of the config option in the ng-dev config to the right one (minBodyLengthTypeExcludes). PR Close #37862 06 July 2020, 20:55:19 UTC
242ef1a docs: mention for depreciation for `Testbed.get()` (#37815) As mention in https://angular.io/guide/deprecations for this API, it may be important mention for this to make developers migrate or avoid using it PR Close #37815 06 July 2020, 20:42:28 UTC
842b6a1 docs: clean up api doc in core (#37053) Add introductions to usage examples and edit descriptions to be more complete and consistent with current API reference styles PR Close #37053 30 June 2020, 19:11:16 UTC
9833552 docs: add missing single quote (#37854) The current code is missing a single quote at the end of the import. (cherry picked from commit e13171ea2960dd0fa0666cb964b53799d2883e3a) PR Close #37854 30 June 2020, 19:10:14 UTC
ca7ee79 release: cut the v10.0.2 release 30 June 2020, 18:40:40 UTC
f9f2ba6 docs: add Sonu Kapoor to the collaborator list (#37777) After 6 months of continuous contributions, Sonu Kapoor did finally make it into the collaborator list. PR Close #37777 30 June 2020, 17:47:55 UTC
aea1d21 docs: update `/config/app-package-json` redirect (#37774) With this change we change the redirect for `/config/app-package-json` from `https://webpack.js.org/configuration/optimization/#optimizationsideeffects` to `https://angular.io/guide/strict-mode#non-local-side-effects-in-applications` The latter page has more details. PR Close #37774 30 June 2020, 17:45:53 UTC
57a518a perf(compiler-cli): fix memory leak in retained incremental state (#37835) Incremental compilation allows for the output state of one compilation to be reused as input to the next compilation. This involves retaining references to instances from prior compilations, which must be done carefully to avoid memory leaks. This commit fixes such a leak with a complicated retention chain: * `TrackedIncrementalBuildStrategy` unnecessarily hangs on to the previous `IncrementalDriver` (state of the previous compilation) once the current compilation completes. In general this is unnecessary, but should be safe as long as the chain only goes back one level - if the `IncrementalDriver` doesn't retain any previous `TrackedIncrementalBuildStrategy` instances. However, this does happen: * `NgCompiler` indirectly causes retention of previous `NgCompiler` instances (and thus previous `TrackedIncrementalBuildStrategy` instances) through accidental capture of the `this` context in a closure created in its constructor. This closure is wrapped in a `ts.ModuleResolutionCache` used to create a `ModuleResolver` class, which is passed to the program's `TraitCompiler` on construction. * The `IncrementalDriver` retains a reference to the `TraitCompiler` of the previous compilation, completing the reference chain. The final retention chain thus looks like: * `TrackedIncrementalBuildStrategy` of current program * `.previous`: `IncrementalDriver` of previous program * `.lastGood.traitCompiler`: `TraitCompiler` * `.handlers[..].moduleResolver.moduleResolutionCache`: cache * (via `getCanonicalFileName` closure): `NgCompiler` * `.incrementalStrategy`: `TrackedIncrementalBuildStrategy` of previous program. The closure link is the "real" leak here. `NgCompiler` is creating a closure for `getCanonicalFileName`, delegating to its `this.adapter.getCanonicalFileName`, for the purposes of creating a `ts.ModuleResolutionCache`. The fact that the closure references `NgCompiler` thus eventually causes previous `NgCompiler` iterations to be retained. This is also potentially problematic due to the shared nature of `ts.ModuleResolutionCache`, which is potentially retained across multiple compilations intentionally. This commit fixes the first two links in the retention chain: the build strategy is patched to not retain a `previous` pointer, and the `NgCompiler` is patched to not create a closure in the first place, but instead pass a bound function. This ensures that the `NgCompiler` does not retain previous instances of itself in the first place, even if the build strategy does end up retaining the previous incremental state unnecessarily. The third link (`IncrementalDriver` unnecessarily retaining the whole `TraitCompiler`) is not addressed in this commit as it's a more architectural problem that will require some refactoring. However, the leak potential of this retention is eliminated thanks to fixing the first two issues. PR Close #37835 29 June 2020, 23:34:52 UTC
29b8318 build(docs-infra): update to latest dgeni-packages (#37793) This update of dgeni-packages to 0.28.4 fixes the rendering of type initializers for classes and interfaces. Closes #37694 PR Close #37793 29 June 2020, 22:01:16 UTC
1d3df78 docs: correct the spelling mistake in observables error handling code (#36437) This commit fixes a spelling error in the word error in the observables.md guide. It is currently spelled errror and the mistake is not intentional. PR Close #36437 29 June 2020, 22:00:39 UTC
fd06ffa docs: change definition of providedIn any (#35292) change in the definition of providedIn:any any instance creates a singleton instance for each lazy loaded module and one instance for eager loaded module PR Close #35292 29 June 2020, 22:00:01 UTC
36a1622 docs: correct left nav to remove duplicated page links (#37833) The major sections Angular Libraries, Schematics, and CLI Builders appear twice, in their old location under Techniques, and in the new correct location under Extending Angular. PR Close #37833 29 June 2020, 21:57:37 UTC
7a91b23 fix(core): fake_async_fallback should have the same logic with fake-async (#37680) PR https://github.com/angular/angular/pull/37523 failed when trying to use `rxjs delay` operator inside `fakeAsync`, and the reasons are: 1. we need to import `rxjs-fake-async` patch to make the integration work. 2. since in `angular` repo, the bazel target `/tools/testing:node` not using `zone-testing` bundle, instead it load `zone-spec` packages seperately, so it causes one issue which is the `zone.js/testing/fake-async` package is not loaded, we do have a fallback logic under `packages/core/testing` calles `fake_async_fallback`, but the logic is out of date with `fake-async` under `zone.js` package. So this PR, I updated the content of `fake_async_fallback` to make it consistent with `fake-async`. And I will make another PR to try to remove the `fallback` logic. PR Close #37680 29 June 2020, 19:22:52 UTC
4b90b6a fix(ngcc): prevent including JavaScript sources outside of the package (#37596) When ngcc creates an entry-point program, the `allowJs` option is enabled in order to operate on the JavaScript source files of the entry-point. A side-effect of this approach is that external modules that don't ship declaration files will also have their JavaScript source files loaded into the program, as the `allowJs` flag allows for them to be imported. This may pose an issue in certain edge cases, where ngcc would inadvertently operate on these external modules. This can introduce all sorts of undesirable behavior and incompatibilities, e.g. the reflection host that is selected for the entry-point's format could be incompatible with that of the external module's JavaScript bundles. To avoid these kinds of issues, module resolution that would resolve to a JavaScript file located outside of the package will instead be rejected, as if the file would not exist. This would have been the behavior when `allowJs` is set to false, which is the case in typical Angular compilations. Fixes #37508 PR Close #37596 29 June 2020, 19:21:23 UTC
b13daa4 refactor(ngcc): let `isWithinPackage` operate on paths instead of source files (#37596) Changes `isWithinPackage` to take an `AbsoluteFsPath` instead of `ts.SourceFile`, to allow for an upcoming change to use it when no `ts.SourceFile` is available, but just a path. PR Close #37596 29 June 2020, 19:21:23 UTC
0c6f026 docs: Changing typo Stacblitz into Stackblitz in the Tour of Hereos tutorial docs page (#37794) Changing the typo of Stacblitz into Stackblitz in the tour of hereos tutorial docs page since that is the actual name of the service PR Close #37794 29 June 2020, 19:17:41 UTC
a2520bd docs: remove first person from 2 sentences (#37768) This commit removes two instances of the first person in the Dependency injection providers documentation. PR Close #37768 29 June 2020, 19:17:04 UTC
b928a20 docs: add Amadou Sall to GDE page (#36509) This commit adds Amadou Sall to the Angular GDE page along with a biography, his role at Air France, and a photograph. PR Close #36509 29 June 2020, 19:16:23 UTC
89e16ed fix(elements): fire custom element output events during component initialization (#37570) Previously, event listeners for component output events attached on an Angular custom element before inserting it into the DOM (i.e. before instantiating the underlying component) didn't fire for events emitted during initialization lifecycle hooks, such as `ngAfterContentInit`, `ngAfterViewInit`, `ngOnChanges` (initial call) and `ngOnInit`. The reason was that `NgElementImpl` [subscribed to events][1] _after_ calling [ngElementStrategy#connect()][2], which is where the [initial change detection][3] takes place (running the initialization lifecycle hooks). This commit fixes this by: 1. Ensuring `ComponentNgElementStrategy#events` is defined and available for subscribing to, even before instantiating the component. 2. Changing `NgElementImpl` to subscribe to `NgElementStrategy#events` (if available) before calling `NgElementStrategy#connect()` (which initializes the component instance) if available. 3. Falling back to the old behavior (subscribing to `events` after calling `connect()` for strategies that do not initialize `events` before their `connect()` is run). NOTE: By falling back to the old behavior when `NgElementStrategy#events` is not initialized before calling `NgElementStrategy#connect()`, we avoid breaking existing custom `NgElementStrategy` implementations (with @remackgeek's [ElementZoneStrategy][4] being a commonly used example). Jira issue: [FW-2010](https://angular-team.atlassian.net/browse/FW-2010) [1]: https://github.com/angular/angular/blob/c0143cb2abdd172de1b95fd1d2c4cfc738640e28/packages/elements/src/create-custom-element.ts#L167-L170 [2]: https://github.com/angular/angular/blob/c0143cb2abdd172de1b95fd1d2c4cfc738640e28/packages/elements/src/create-custom-element.ts#L164 [3]: https://github.com/angular/angular/blob/c0143cb2abdd172de1b95fd1d2c4cfc738640e28/packages/elements/src/component-factory-strategy.ts#L158 [4]: https://github.com/remackgeek/elements-zone-strategy/blob/f1b6699495a8c0909dbbfbdca12770ecca843e15/projects/elements-zone-strategy/src/lib/element-zone-strategy.ts Fixes #36141 PR Close #37570 29 June 2020, 17:33:40 UTC
1a1f99a fix(ngcc): ensure lockfile is removed when analyzeFn fails (#37739) Previously an error thrown in the `analyzeFn` would cause the ngcc process to exit immediately without removing the lockfile, and potentially before the unlocker process had been successfully spawned resulting in the lockfile being orphaned and left behind. Now we catch these errors and remove the lockfile as needed. PR Close #37739 29 June 2020, 17:29:12 UTC
df2cd37 fix(core): error when invoking callbacks registered via ViewRef.onDestroy (#37543) (#37783) Invoking a callback registered through `ViewRef.onDestroy` throws an error, because we weren't registering it correctly in the internal data structure. These changes also remove the `storeCleanupFn` function, because it was mostly identical to `storeCleanupWithContext` and was only used in one place. Fixes #36213. PR Close #37543 PR Close #37783 29 June 2020, 17:27:39 UTC
12a71bc fix(core): determine required DOMParser feature availability (#36578) (#37783) Verify that HTML parsing is supported in addition to DOMParser existence. This maybe wasn't as important before when DOMParser was used just as a fallback on Firefox, but now that DOMParser is the default choice, we need to be more accurate. PR Close #37783 29 June 2020, 17:27:39 UTC
7d270c2 refactor(core): split inert strategies to separate classes (#36578) (#37783) The `inertDocument` member is only needed when using the InertDocument strategy. By separating the DOMParser and InertDocument strategies into separate classes, we can easily avoid creating the inert document unnecessarily when using DOMParser. PR Close #37783 29 June 2020, 17:27:39 UTC
b0b7248 fix(core): do not trigger CSP alert/report in Firefox and Chrome (#36578) (#37783) If [innerHTML] is used in a component and a Content-Security-Policy is set that does not allow inline styles then Firefox and Chrome show the following message: > Content Security Policy: The page’s settings observed the loading of a resource at self (“default-src”). A CSP report is being sent. This message is caused because Angular is creating an inline style tag to test for a browser bug that we use to decide what sanitization strategy to use, which causes CSP violation errors if inline CSS is prohibited. This test is no longer necessary, since the `DOMParser` is now safe to use and the `style` based check is redundant. In this fix, we default to using `DOMParser` if it is available and fall back to `createHTMLDocument()` if needed. This is the approach used by DOMPurify too. The related unit tests in `html_sanitizer_spec.ts`, "should not allow JavaScript execution when creating inert document" and "should not allow JavaScript hidden in badly formed HTML to get through sanitization (Firefox bug)", are left untouched to assert that the behavior hasn't changed in those scenarios. Fixes #25214. PR Close #37783 29 June 2020, 17:27:38 UTC
78460c1 test(core): update symbols used in the test app (#37785) This commit updates the golden file that contains the set of symbols used in the test TODO app. The `storeCleanupFn` function was replaced by `storeCleanupWithContext` in https://github.com/angular/angular/commit/75b119eafc8a9c3d02bbdc06835fc3e46b495882 and this commit updates the golden file to reflect that. PR Close #37785 26 June 2020, 23:44:00 UTC
75b119e fix(core): error when invoking callbacks registered via ViewRef.onDestroy (#37543) Invoking a callback registered through `ViewRef.onDestroy` throws an error, because we weren't registering it correctly in the internal data structure. These changes also remove the `storeCleanupFn` function, because it was mostly identical to `storeCleanupWithContext` and was only used in one place. Fixes #36213. PR Close #37543 26 June 2020, 22:02:43 UTC
64b0ae9 fix(core): don't consider inherited NG_ELEMENT_ID during DI (#37574) Special DI tokens like `ChangeDetectorRef` and `ElementRef` can provide a factory via `NG_ELEMENT_ID`. The problem is that we were reading it off the token as `token[NG_ELEMENT_ID]` which will go up the prototype chain if it couldn't be found on the current token, resulting in the private `ViewRef` API being exposed, because it extends `ChangeDetectorRef`. These changes fix the issue by guarding the property access with `hasOwnProperty`. Fixes #36235. PR Close #37574 26 June 2020, 22:01:21 UTC
7c0b25f fix(language-service): incorrect autocomplete results on unknown symbol (#37518) This commit fixes a bug whereby the language service would incorrectly return HTML elements if autocomplete is requested for an unknown symbol. This is because we walk through every possible scenario, and fallback to element autocomplete if none of the scenarios match. The fix here is to return results from interpolation if we know for sure we are in a bound text. This means we will now return an empty results if there is no suggestions. This commit also refactors the code a little to make it easier to understand. PR Close #37518 26 June 2020, 21:51:33 UTC
07b5df3 release: cut the v10.0.1 release 26 June 2020, 20:17:36 UTC
e702372 ci: exclude "docs" commit type from minBodyLength commit message validation (#37764) docs commits are sometimes trivial (e.g. an obvious typo fix) and in such cases its very akward to to write up 100 chars worth of text about why this typo fix is the best thing in the world and why it is so important and crucial that we must know why we are fixing the typo at all. After all most typos are not just typos. Or are they? We'll shall see... PR Close #37764 26 June 2020, 18:13:10 UTC
back to top