https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
7924a2e release: cut the v13.2.1 release (#44948) 02 February 2022, 18:42:38 UTC
98a1da9 build(docs-infra): upgrade cli command docs sources to 0f51d5c70 (#44943) Updating [angular#13.2.x](https://github.com/angular/angular/tree/13.2.x) from [cli-builds#13.2.x](https://github.com/angular/cli-builds/tree/13.2.x). ## Relevant changes in [commit range](https://github.com/angular/cli-builds/compare/9ac3df5d1...0f51d5c70): **Modified** - help/test.json PR Close #44943 02 February 2022, 17:07:59 UTC
165aa4f docs: update the survey expiration date (#44938) Extend with a few more days since the survey is still open. PR Close #44938 02 February 2022, 01:56:40 UTC
4a5ad17 fix(compiler-cli): ensure casing of logical paths is preserved (#44798) The logical filesystem would store a cached result based on the canonical path, where the cached value contains the physical path that was originally provided. This meant that other physical paths with an identical canonical path would use a cached result derived from another physical path. This inconsistency is not known to result in actual issues but is primarily being made as a performance improvement, as using the provided physical paths as cache key avoids the need to canonicalize the path if its result is already cached. PR Close #44798 02 February 2022, 00:04:38 UTC
d65a42b refactor(compiler-cli): use relative imports into dts files as fallback in type-check files (#44798) The generated imports should normally use module specifiers that are valid for use in production code, where arbitrary relative imports into e.g. node_modules are not allowed. For template type-checking code it is however acceptable to use relative imports, as such files are never emitted to JS code. It is desirable to allow a filesystem relative import as fallback if an import would otherwise fail to be generated, as doing so allows fewer situations from needing an inline type constructor. PR Close #44798 02 February 2022, 00:04:37 UTC
dee108b refactor(compiler): remove ViewEngine identifiers (#44676) This commit removes the leftover `Identifiers` class that was used in the ViewEngine compiler. The remaining usages of the `inlineInterpolate` and `interpolate` instructions were refactored to make use of an `InterpolationExpression` output expression to capture the argument list of an interpolation expression. An attempt was made to refactor this further by converting to the desired interpolation instruction immediately, but some downstream consumers are designed in a way where the argument list itself is needed, e.g. as other arguments need to be prepended/appended. PR Close #44676 02 February 2022, 00:04:14 UTC
5a75721 build: fix test for useUnknownInCatch (#44935) CI ran before the change to the tsconfig file PR Close #44935 01 February 2022, 23:40:17 UTC
ec49796 docs(router): provide better typing for resolver example (#44932) PR Close #44932 01 February 2022, 22:06:29 UTC
b4e4617 fix(common): include query parameters for open HTTP requests in `verify` (#44917) When `HttpTestingController.verify` is used to verify that there are not open, unexpected requests it would throw an error with the method and URL of all pending requests, excluding the query parameters. This is confusing, as e.g. `expectOne` matches a URL including its query parameters and `expectOne` does include the query parameters when it reports when no request could be matched. This commit changes the error that is reported by `verify` to include the query parameters. Closes #19974 PR Close #44917 01 February 2022, 21:41:43 UTC
812c1ba build: update all non-major dependencies (#44930) PR Close #44930 01 February 2022, 21:30:10 UTC
1cc1588 docs: fix incorrect title and tooltip in navigation (#44710) Fixes #44589 In the navigation pane, the title and tooltip for the page, Preparing component for translation, are incorrect. This PR fixes this issue. PR Close #44710 01 February 2022, 19:17:40 UTC
b6d2212 docs: correct the demo code of NgZone.run (#44733) `NgZone.run` needs to be within the async closure, not around its registration, refer to: https://github.com/angular/angular/issues/44714 PR Close #44733 01 February 2022, 19:16:16 UTC
a432ad6 build: Update 13.2.x for useUnknownInCatch (#44929) 36b16e667a99a69bbee8979e4f0517ed26f8d69c enabled `useUnknownInCatchVariables` but broke the build becaue the migration does not exist on the main branch. PR Close #44929 01 February 2022, 19:15:06 UTC
96b3b77 docs: explain how `ngsw.json` is generated (#44823) Update aio/content/guide/service-worker-devops.md ngsw.json is the manifest file which is generated at build time ( based on ngsw-config.json ). This explains this a bit clearer. At first, I thought that it was a wrongly named filename. Not is it explicitly described. Co-Authored-By: George Kalpakas <kalpakas.g@gmail.com> PR Close #44823 01 February 2022, 18:26:42 UTC
3659629 refactor(compiler-cli): remove leftover `_extendedTemplateDiagnostics` flag (#44920) This flag is currently a no-op because extended diagnostics are enabled in production. PR Close #44920 01 February 2022, 18:24:10 UTC
577d97f docs: add colon before introducing the list of items (#44751) PR Close #44751 01 February 2022, 18:20:47 UTC
36b16e6 build: enable useUnknownInCatchVariables (#44679) This unblocks the internal migration to turn the option on in g3. PR Close #44679 01 February 2022, 18:17:29 UTC
2916ac9 refactor(core): the `RuntimeError` class should support more compact syntax (#44783) This commit refactors the `RuntimeError` class to support a short version of providing error messages: ``` throw new RuntimeError( RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED, ngDevMode && 'Injector has already been destroyed.'); ``` In prod mode, the second argument becomes `false` andn this commit extends the typings to support that. This commit also contains a couple places were the `RuntimeError` class is used to demostrate the compact form. PR Close #44783 01 February 2022, 00:15:56 UTC
4644886 perf(animations): remove no longer needed CssKeyframes classes (#44903) (#44919) This commit removes CSS keyframes-based code that was used to support animations in old browsers. With IE11 deprecation, all supported browsers have native WebAnimations support, so the old code can be removed. This results in ~7KB decrease of the animations package bundle size, since most of the code was non-tree-shakable. Closes #44520. PR Close #44919 31 January 2022, 22:46:00 UTC
f5ce6cf refactor(compiler-cli): remove unused `canonical-path` dependency (#44918) This package is no longer used within `compiler-cli` so is being removed as a dependency. PR Close #44918 31 January 2022, 21:39:54 UTC
7ec482d fix(core): Add back support for namespace URIs in createElement of dom renderer (#44914) Support for namespace URIs rather than short namespace names was added in https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to support how Ivy passed around the namespace URI rather than short name at the time. As a side-effect, this meant that namespace URIs were supported by the default dom renderer as part of the public API (likely unintentionally). It did not, however extend the support to other parts of the system (setAttribute, setAttribute, and the ServerRenderer). In the future we should decide what exactly the semantics for dealing with namespaces should be and make it consistent. fixes #44028 PR Close #44914 31 January 2022, 21:39:29 UTC
98ba48e refactor(core): strict templates type-checking compatibility for perf tests (#44905) This commit updates a type used in the transplanted views perf tests, to make the test compatible with strict template type-checking. Currently, compiling the perf test results in the following TS error: ``` error TS2322: Type 'TemplateRef<{}>' is not assignable to type 'TemplateRef<NgForOfContext<any, any[]>>'. 17 <ng-container *ngFor="let n of views; template: template; trackBy: trackByIndex"></ng-container> ~~~~~~~~ ``` PR Close #44905 31 January 2022, 21:39:04 UTC
1aebbf8 fix(forms): ensure OnPush ancestors are marked dirty when the promise resolves (#44886) Currently, `ngModel` calls` setValue` after the `resolvedPromise` is resolved. The promise is resolved _after_ the child template executes. The change detection is run but `OnPush` views are not updated because they are not marked as dirty. PR Close #44886 31 January 2022, 21:38:39 UTC
250dc40 fix(core): flush delayed scoping queue while setting up TestBed (#44814) Previously, some NgModules that were added to the delayed scoping queue, never got removed from the queue before unit test execution. That resulted in some components (declared in those NgModules) missing their scope (which components/directives/pipes were matched). This commit adds the logic to invoke delayed scoping queue flushing before starting a test to avoid missing/incomplete scopes for Components used in a test. PR Close #44814 31 January 2022, 21:37:53 UTC
8fb2e3b docs: Update deployment docs for Vercel (#44904) PR Close #44904 31 January 2022, 21:32:42 UTC
626980f build: fix `update_all_goldens.js` to use ESM. (#44916) Attempting to run as is fails because we have `"type": "module"`. `shelljs` is a CommonJS module however, so we need to do a default import and destructure. ``` $ node packages/compiler-cli/test/compliance/update_all_goldens.js const {exec} = require('shelljs'); ^ ReferenceError: require is not defined in ES module scope, you can use import instead This file is being treated as an ES module because it has a '.js' file extension and '/home/douglasparker/Source/ng/packages/compiler-cli/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension. at file:///home/douglasparker/Source/ng/packages/compiler-cli/test/compliance/update_all_goldens.js:11:16 at ModuleJob.run (node:internal/modules/esm/module_job:183:25) at async Loader.import (node:internal/modules/esm/loader:178:24) at async Object.loadESM (node:internal/process/esm_loader:68:5) at async handleMainPromise (node:internal/modules/run_main:63:12) ``` PR Close #44916 31 January 2022, 21:31:11 UTC
5400a3d build: fix formatting in zone.js BUILD file (#44911) Fixes formatting in one of the Zone BUILD files. The lint check on the renovate branch did not check formatting as it seems. Needs more investigation as the PR was green. PR Close #44911 31 January 2022, 21:28:25 UTC
e07014f build: update legacy saucelabs bundle generation to account for esbuild update (#44911) Previously with ESBuild 0.14.11, when a file had dynamic requires to builtin NodeJS modules like `url`, the resolution completed successfully regardless of `--platform browser`. This seems to be fixed in ESBuild now. This unveiled some resolution errors with our Saucelabs bundle generation because the framework code sometimes switches dynamically to `require('url')` if `window.URL` is not defined. Previously this just didn't matter, but now the `require('url')` is checked and a module resolution error is reported given `url` not being available in the browser as a builtin module. We fix this by marking the module as external. We will not hit this code path anyway in the browser saucelabs code. Similarly we exclude all platform-server files from the bundle. This is not strictly needed after the `url` module being marked as external, but the issue showed that lots of unnecessary code for the server platform is included. This can be omitted (unfortunately not from the TS compilation without over-complicating things significantly more; experimented with that). PR Close #44911 31 January 2022, 21:28:25 UTC
85b889e build: update postinstall patch to account for benchmark macro changes (#44911) Updates the postinstall patch for the benchmark macro rule from dev-infra. We moved the ZoneJS setup to the bundler. This was necessary in order to switch away from the Go-based (windows-incompatible, m1-incompatible) concatjs devserver to a rather basic HTTP server (also provided by dev-infra now). PR Close #44911 31 January 2022, 21:28:25 UTC
881d469 build: update angular (#44911) Updates to the latest version of Angular. PR Close #44911 31 January 2022, 21:28:25 UTC
07185f4 fix(compiler-cli): enable nullish coalescing check only with `strictNullChecks` (#44862) TypeScript configures `strictNullChecks` to be disabled by default, so the nullish coalescing check should follow the same default. The rule actively depends on `strictNullChecks`, as TypeScript doesn't include `null`/`undefined` in its types otherwise so the check wouldn't have a way to differentiate between them. This commit also takes the `strict` flag into account when `strictNullChecks` itself is not configured. PR Close #44862 31 January 2022, 20:31:58 UTC
0778e6f fix(compiler-cli): accept nullish coalescing operator for any and unknown types (#44862) We should not make assumptions about the any and unknown types; using a nullish coalescing operator is acceptable for those. PR Close #44862 31 January 2022, 20:31:58 UTC
25f8305 docs(core): showcase host listener support for specific keys in events (#44833) PR Close #44833 31 January 2022, 20:30:45 UTC
b51d111 docs: update Nx headline (#44910) PR Close #44910 31 January 2022, 19:46:36 UTC
72cdd14 docs: add code format in content projection guide (#44907) PR Close #44907 31 January 2022, 19:45:47 UTC
c1fc425 fix(docs-infra): make it possible to see whole notification text on smaller screens (#44900) Previously, when the notification text did not fit on the viewport width, it got truncated and it was not possible to see the whole text. This commit fixes this by making the notification scrollable when the text overflows. PR Close #44900 31 January 2022, 19:44:52 UTC
e62c98f fix(docs-infra): make it easier to interact with notification on smaller screens (#44900) On smaller screens, the action button in `NotificationComponent` is hidden (due to limited horizontal screen "real estate"). Thus, the only way to perform the action is to click on the notification message, which is typically a link. Previously, the link inside the notification did not take up the whole height of the notification bar. As a result, clicking outside the link would dismiss the notification without following the link. This commit makes it easier to interact with the notification (esp. on smaller screens) by ensuring the link covers the whole notification bar (width and height). PR Close #44900 31 January 2022, 19:44:52 UTC
47c02ca refactor(compiler-cli): Update where and how the indexed errors are exposed (#44884) The initial commit e9124b42d5ac8f570b53a86691aff64d9f6c6ee1 stored the errors rather than throwing but did not store them in a place that was accessible to consumers. Instead, the errors should be added to the IndexedComponent so they can be surfaced where the index results are consumed PR Close #44884 31 January 2022, 18:36:55 UTC
94c9e47 Revert "fix(docs-infra): content overflow in mobile (#44851)" (#44899) This reverts commit c2e09e09114977fcdc93cd60db57e4c863a12d9a, because it messes up the table layouts on some resolutions/pages. See #44891 for details. Fixes #44891 PR Close #44899 31 January 2022, 17:10:50 UTC
6b7fffc fix(forms): Update the typed forms migration schematic to find all files. (#44881) We were breaking out of the loop that walks the source tree due to an incorrect return. PR Close #44881 28 January 2022, 21:59:35 UTC
641f27a fix(docs-infra): content overflow in mobile (#44851) When reading the docs page on mobile, some page tend to scroll in horizontal direction quite a lot which is unpleasant Fixes #44850 PR Close #44851 28 January 2022, 18:01:47 UTC
ab63ed3 test(docs-infra): fix type checking errors with new jasmine types (#44876) The jasmine types for `spyObj.calls().all()` seem to be more specific, relying on `ThisType<Fn>` to determine the context/receiver for an invoked spy. This type does not work as expected with class members as it seems. This commit fixes three of these type checking failures by explicitly casting the spy context to the actual class owning the method member. PR Close #44876 28 January 2022, 17:50:15 UTC
b89ee08 build: update angular (#44876) Updates to the latest versions of Angular organization NPM packages. PR Close #44876 28 January 2022, 17:50:15 UTC
553c8d1 build: lock file maintenance (#44876) Cleans up the lock file by maximizing the versions as allowed per our version ranges. PR Close #44876 28 January 2022, 17:50:15 UTC
f398717 docs: fix typo in update guide (#44853) PR Close #44853 28 January 2022, 17:37:25 UTC
c9abf34 docs: fix GitHub broken link in update guide (#44875) PR Close #44875 28 January 2022, 16:08:28 UTC
96d2c58 fix(docs-infra): fix links to CLI commands source code (#44835) Recently, the [CLI repository][1] switched to not prefixing tag names with a `v`. Update the `versionInfo` generated for CLI commands docs, so that the links to the source code (which include the tag name) are correct. Fixes #44822 [1]: https://github.com/angular/angular-cli PR Close #44835 28 January 2022, 16:07:47 UTC
49ca5bb refactor(forms): remove dead code (#37614) This functionally dead code was originally introduced via pull request were added to verify the fix, and the many comments on that issue after it was closed indicate that it wasn't actually resolved. In fact, setting `selectedIndex` does absolutely nothing here, since the selected index is immediately overridden by setting the `value` property. A working fix (with tests) for the IE/Safari bug is in pull request #23784. Originally this dead code was removed as part of that PR, but @AndrewKushnir recommended creating a separate PR for the cleanup. PR Close #37614 28 January 2022, 16:07:11 UTC
f6c2934 docs(core): edit and add docs for ng-container (#44762) PR Close #44762 28 January 2022, 15:55:33 UTC
1169fae docs: update survey id (#44865) The survey id is used as a key in the local storage to keep the state (don't show the message again). Reusing this survey id will make the message invisible to some users who already have that key in local storage. PR Close #44865 27 January 2022, 21:52:35 UTC
522b845 docs: enable the survey banner (#44861) PR Close #44861 27 January 2022, 19:43:54 UTC
2fa2f7d ci: only build test targets for components repo unit test job (#44832) To speed up the components CI job (avoiding it being a bottleneck in FW), we will stop building everything in `src/...`, but rather only build targets which are needed to run all tests within `src/...`. This notably should avoid unnecessary NPM package building. Arguably that part would also be valuable to have, but we already test the `ng_package` rule in FW itself, plus we run snapshot tests in the components repo as well. PR Close #44832 27 January 2022, 17:22:24 UTC
af19c44 ci: re-enable components repo unit tests job (#44832) Re-enables the components-repo unit tests job that we previously disabled due to the devmode target change that caused conflicts with `angular/components` patching `ng_module.bzl` of `@angular/bazel`. PR Close #44832 27 January 2022, 17:22:24 UTC
9f7157e refactor(compiler-cli): Tolerate source span errors in indexer (#44825) When the indexer encounters a location where the source span doesn't match up with the expected identifier, the current visitor code throws an error. Instead, this change creates an error and moves on to the next template item. This allows the indexer to continue analysis even when there are errors in the source mapping. In addition, it still allows callers to surface those errors in their own way while still providing as much indexed information as possible about a node. PR Close #44825 27 January 2022, 17:20:09 UTC
30ddeab build: update dependency globby to v13 (#44801) PR Close #44801 27 January 2022, 17:18:58 UTC
4a91d9b build: update dependency rules_pkg to v0.6.0 (#44818) PR Close #44818 27 January 2022, 01:37:42 UTC
fcc6528 test(animations): Add bundling size regression test for animations package (#44826) This adds a size regression test for the animations package to the test suite. PR Close #44826 26 January 2022, 20:54:36 UTC
dc0cac2 docs: cleanup CHANGELOG.md file (#44842) PR Close #44842 26 January 2022, 20:37:05 UTC
de1e35b release: cut the v13.2.0 release (#44838) 26 January 2022, 19:44:41 UTC
a38ae0a refactor(forms): Temporarily disable the typed forms migration. (#44828) It's best to disable this optional migration in the minor release, although it shouldn't run anyway -- we don't want people accidentally running it. This PR will be rolled back after the minor is out. PR Close #44828 26 January 2022, 01:03:48 UTC
fe3e4d6 fix(compiler-cli): Handle `ng-template` with structural directive in indexer (#44788) An `ng-template` with an inline template (i.e. has a structural directive) would previously not get an `undefined` `tagName` because the logic assumed the element would be `t.Element` or `t.Content` and read the tag name from the `name` property. For a `t.Template`, this exists instead on the `t.tagName`. The final result would be an `tagName` of `undefined` for the parent `t.Template`, causing failures in the indexer downstream. This `undefined` value is actually expected in the renderer code, even though the type does not specify this possibility. This change updates the type of `tagName` to be `string|null` and explicitly handles the case where there is a structural directive on an `ng-template`. You can see how the two are differentiated in the compliance code that was modified in this commit. PR Close #44788 25 January 2022, 22:15:45 UTC
6cb7c3e build(docs-infra): update `dgeni-packages` to v0.29.3 (#44810) This version includes angular/dgeni-packages#318 and thus fixes the rendering of overridden methods in API docs. Fixes #44468 PR Close #44810 25 January 2022, 17:24:41 UTC
966343b build: update angular (#44771) PR Close #44771 25 January 2022, 17:24:00 UTC
7e93513 docs: add link to AbstractControlOptions reference (#44764) PR Close #44764 24 January 2022, 22:53:17 UTC
7c7a1a1 docs: exclude setValue from async-validator-usage docregion (#44764) Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com> PR Close #44764 24 January 2022, 22:53:17 UTC
62217ef docs: add missing return statement to validate() (#44764) PR Close #44764 24 January 2022, 22:53:17 UTC
1fa14e0 docs: remove trailing space in code example (#44764) PR Close #44764 24 January 2022, 22:53:17 UTC
a71eb4c docs: fix UniqueAlterEgoValidatorDirective (#44764) PR Close #44764 24 January 2022, 22:53:17 UTC
ffd62b9 docs: expand async validators in reactive forms (#44764) * Hone docregions for code examples * Add more detailed description PR Close #44764 24 January 2022, 22:53:17 UTC
e545dd8 docs: revise text for adding async validators to template-driven forms (#44764) Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com> PR Close #44764 24 January 2022, 22:53:17 UTC
4883b7d docs: restore UniqueAlterEgoValidator (#44764) Update the docregion for the directive class to differentiate them PR Close #44764 24 January 2022, 22:53:17 UTC
8eb1f76 docs: fix UniqueAlterEgoValidatorDirective (#44764) * Use correct class name in providers * Update parameter & return signature for validate() PR Close #44764 24 January 2022, 22:53:17 UTC
37bbd97 docs: update async validators section (#44764) * Update the UniqueAlterEgoValidator code example * Add async-validator docregion to hero-form-reactive.component.2.ts * Fix typo under Implementing a custom async validator * Add h3 sections for adding async validators to reactive & template-driven forms PR Close #44764 24 January 2022, 22:53:17 UTC
9e9e82d docs: add note about using NG_ASYNC_VALIDATORS (#44764) When setting up an async validator in a template-driven form, it's necessary to register the directive with NG_ASYNC_VALIDATORS instead of NG_VALIDATORS. This was not mentioned in the docs. PR Close #44764 24 January 2022, 22:53:17 UTC
e12dfa5 test(animations): Add bundling symbol test for animations package (#44809) This adds a full bundling animation symbols test to the test suite. PR Close #44809 24 January 2022, 22:52:31 UTC
fa7c7af refactor(forms): update required validator and checkbox validator to inherit abstractValidator (#44162) Modified required validator and checkbox validator to inherit abstractValidator. For every validato type different PR will be raised as discussed in #42378. Closes #42267 PR Close #44162 24 January 2022, 22:50:58 UTC
a4aa9b3 Revert "feat(core): allow for injector to be specified when creating an embedded view (#44666)" (#44807) This reverts commit b49ffcd50e46ca7907ee2049f6cade8e080f5980. PR Close #44807 24 January 2022, 20:22:22 UTC
40f27a3 Revert "feat(common): add injector input to ngTemplateOutlet (#44761)" (#44807) This reverts commit ed21f5c75378e1ce717ee3d76d28c8c994209de1. PR Close #44807 24 January 2022, 20:22:22 UTC
94bfcdd fix(core): error if NgZone.isInAngularZone is called with a noop zone (#44800) When the user opts into the noop `NgZone`, they usually still interact with the static methods on the non-noop class. This change adds a check to handle the case where zone.js hasn't been loaded. Fixes #44784. PR Close #44800 24 January 2022, 18:44:44 UTC
f0a8303 docs(router): fixing `pathMatch` doc to style code correctly (#44796) PR Close #44796 24 January 2022, 18:42:52 UTC
abd1bc8 fix(compiler): correct spans when parsing bindings with comments (#44785) The previous fix for correcting spans with comments in https://github.com/angular/angular/commit/59eef29a6c5d568ca80595cd7018e21ad406c85d had the unfortunate side effect of _breaking_ the spans with comments when there was leading whitespace. This happened because the previous fix was testing one without a comment, identifying that the offset shouldn't have anything added to it, and then removing that offset adjustment (`offsets[i] + (expressionText.length - sourceToLex.length)`). Upon further investigation, this offset adjustment _was actually necessary_ for when the input had comments, but this was only because the `stripComments` function used `trim` to remove whitespace for these cases. This is the real problem -- not only does it create a ton of confusion but also it means that the behavior of the lexer and resulting spans is different between inputs with comments and inputs without comments. After reviewing how the `inputLength` of `_ParseAST` was used, it appears that the correct behavior would be to _not_ trim the input. The `inputLength` is used to advance the current index beyond points which have been processed. This _should_ include any whitespace. Additionally, `inputLength` doesn't appear to be needed at all. When there was no comment in the input, it was always equal to the `input.length` anyways. When there _is_ a comment, it should include that comment anyways to advance the index beyond the comment. PR Close #44785 24 January 2022, 18:41:54 UTC
7316e72 fix(compiler-cli): properly index <svg> elements when on a template (#44785) The original fix for svg elements in https://github.com/angular/angular/commit/92b23f48519a1adb460a431c356bcd9917fb059d did not account for svg elements when they also had a structural directive on them, making the node a template. This resulted in the logic added in fix above not being applied. PR Close #44785 24 January 2022, 18:41:54 UTC
ac2f262 docs: add extended diagnostics documentation (#44704) This includes the initial documentation for extended diagnostics with a page for each of the two initial checks. They follow the same general formula, and hopefully in the future they can be properly generated from metadata rather than copy-pasted as they are currently. PR Close #44704 24 January 2022, 18:41:13 UTC
f2fa67e fix(docs-infra): track error docs during `serve-and-sync` (#44704) Refs #42966. Look for changes in error docs (i.e. docs under `aio/content/error/`) in `authors-package`, so that such docs are tracked when running the `serve-and-sync` script. PR Close #44704 24 January 2022, 18:41:13 UTC
9bee561 fix(docs-infra): track error docs during `serve-and-sync` (#44704) Refs #42966. Look for changes in error docs (i.e. docs under `aio/content/error/`) in `authors-package`, so that such docs are tracked when running the `serve-and-sync` script. PR Close #44704 24 January 2022, 18:41:13 UTC
fce521e release: cut the v13.2.0-rc.1 release (#44804) 24 January 2022, 17:41:52 UTC
ade3057 refactor(common): unused return value from attemptFocus (#44457) The function attemptFocus had a return value that nowhere is used. But it still saves in the bundle. PR Close #44457 21 January 2022, 21:11:32 UTC
ed67a07 fix(compiler): properly compile DI factories when coverage reporting is enabled (#44732) When running tests with code coverage using Istanbul, the code is instrumented with coverage reporting statements. These statements are also inserted into synthesized constructors, preventing Angular from properly recognizing them as synthesized constructor. This commit changes the regex to detect synthesized constructors to allow for statements within the constructor before the `super(...arguments);` call. This is limited to code that does not contain a `}`, but this is sufficient to support Istanbul's coverage instrumentation statements. The tests have been extended with an input file that is being instrumented using `babel-plugin-istanbul` for both ES2015 and ES5 targets, in order to verify that the approach works for real-world usages. Fixes #31337 PR Close #44732 21 January 2022, 21:10:43 UTC
43eb934 build: update all non-major dependencies (#44713) PR Close #44713 21 January 2022, 19:21:52 UTC
d2ae96f fix(compiler-cli): skip `ExtendedTemplateCheckerImpl` construction if there were configuration errors (#44778) Previously, if a bad extended diagnostic category was given, it would fail with the expected error as well as an unexpected assertion error: ``` $ ng build -c development ✔ Browser application bundle generation complete. ./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Unexpected call to 'assertNever()' with value: test at /home/douglasparker/Source/ng-new/node_modules/@ngtools/webpack/src/ivy/loader.js:77:18 at processTicksAndRejections (internal/process/task_queues.js:95:5) ./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Unexpected call to 'assertNever()' with value: test at /home/douglasparker/Source/ng-new/node_modules/@ngtools/webpack/src/ivy/loader.js:77:18 at processTicksAndRejections (internal/process/task_queues.js:95:5) Error: error NG4004: Angular compiler option "extendedDiagnostics.checks['invalidBananaInBox']" has an unknown diagnostic category: "test". Allowed diagnostic categories are: warning error suppress ``` The assertion comes from `ExtendedTemplateCheckerImpl`, which expects a well-formed configuration, yet the compiler would construct it even when errors were found. This commit skips constructing and running extended diagnostics if the configuration had errors, which should avoid triggering these assertion errors. I'm unfortunately not able to actually test this change. The test passes even before the fix because the `ngc` binary and end-to-end tests [don't request diagnostics unless the configuration is considered valid](https://github.com/angular/angular/blob/ed21f5c75378e1ce717ee3d76d28c8c994209de1/packages/compiler-cli/src/perform_compile.ts#L292-L293). See [Slack](https://angular-team.slack.com/archives/C4WHZQMRA/p1642641305003800) for more details. PR Close #44778 21 January 2022, 19:20:48 UTC
5626b34 fix(core): consistently use namespace short name rather than URI (#44766) `Renderer2` APIs expect to be called with the namespace name rather than the namespace URI. Rather than passing around the URI and having to account for different calling contexts, this change consistently uses the namespace short names. Importantly, the URI was only used in `component_ref.ts` `create` (because `getNamespace returned the URIs`) and `createElementNode` in `node_manipulation.ts` (because `getNamespaceUri` also used the URIs). In contrast, attributes would use the _short names instead of URIs_ (see `setUpAttributes` in `attrs_utils.ts`). These names are pulled directly from the attribute, i.e. `xhtml:href` and not converted to URI. This dichotomy is confusing and unnecessary. The change here aligns the two approaches in order to provide consistently throughout the system. This relates to #44766 because the `createElementNode` was calling the `AnimationRenderer.createElement` which delegates to the `ServerRenderer`, which in turn was only set up to expect short names. As a result, the `NAMESPACE_URIS` lookup failed and `Domino` created the `svg` as a regular `Element` which does not have a `styles` property. resolves #44766 PR Close #44766 21 January 2022, 19:19:31 UTC
1671212 test: Update test to not declare component in multiple modules (#44766) When running locally, these integration tests appear to fail because the component is declared in many test modules. PR Close #44766 21 January 2022, 19:19:31 UTC
100091e fix(compiler-cli): remove leftover `_extendedTemplateDiagnostics` requirements (#44777) Refs #42966. There were two remaining places where `_extendedTemplateDiagnostics` needed to be set which should have been removed in #44712 but got missed. This updates them to only require `strictTemplates` and not `_extendedTemplateDiagnostics` so the feature is properly enabled in production. PR Close #44777 20 January 2022, 22:03:46 UTC
b7ff6f0 refactor(compiler): pass rootDir to tsickle (#44768) tsickle's underlying API has changed to require passing a rootDir to getGeneratedExterns. PR Close #44768 20 January 2022, 19:16:36 UTC
6b75263 docs: correct (possible) typo (#44759) change 'reference' to 'referencing' -- I believe this is is a typo and that this is the proper correction. PR Close #44759 20 January 2022, 17:22:37 UTC
caeb162 release: cut the v13.2.0-rc.0 release (#44765) 20 January 2022, 01:36:11 UTC
ed21f5c feat(common): add injector input to ngTemplateOutlet (#44761) Implements the new `injector` option from #44666 into `ngTemplateOutlet`. PR Close #44761 20 January 2022, 00:47:40 UTC
ec10570 fix(docs-infra): fix date parsing in a flaky test (#44763) Mock dates in EventsComponent tests are parsed in inconsistent ways across platforms/browsers, which makes the comparison to the mocked UTC "now" date behave differently causing the test to fail. This fix ensures that the mocked "now" date is parsed in the same way as the test dates to avoid inconsistencies. PR Close #44763 20 January 2022, 00:47:16 UTC
fa835b5 feat(compiler-cli): enable extended diagnostics by default (#44712) Refs #42966. Extended diagnostics provide additional analysis about Angular templates by emitting warnings for specific patterns known to be error prone or cause developer confusion. Currently, there are two such diagnostics which are enabled by default: * `invalidBananaInBox` emits a warning if a user writes a two-way binding backwards like `([foo])="bar"`, when they actually wanted `[(foo)]="bar"`. * `nullishCoalescingNotNullable` emits a warning if a binding attempts to perform nullish coalescing (`??`) on a type which does not include `null` or `undefined`, such as `{{ foo ?? 'bar' }}` where `foo` is defined as `string` instead of `string | null`. These diagnostics are enabled as warnings by default, but this can be configured in the `tsconfig.json` like so: ```jsonc { "angularCompilerOptions": { "extendedDiagnostics": { // The categories to use for specific diagnostics. "checks": { // Maps check name to its category. "invalidBananaInBox": "suppress" }, // The category to use for any diagnostics not listed in `checks` above. "defaultCategory": "error" } } } ``` Allowed categories for a diagnostic are `warning` (default), `error`, or `suppress`. `warning` emits the diagnostic but allows the compilation to succeed, `error` *will* fail the compilation, while `suppress` will ignore the diagnostic altogether. The initial release has two diagnostics, and we are hoping to expand this longer term to add more diagnostics and provide additional insight into Angular templates to detect and surface developer mistakes *before* hours of debugging are wasted. PR Close #44712 19 January 2022, 17:58:37 UTC
4e95a31 docs: deprecate unused config options from the `CompilerOptions` interface (#44749) DEPRECATED: Since Ivy, the CompilerOptions.useJit and CompilerOptions.missingTranslation config options are unused, passing them has no effect. PR Close #44749 19 January 2022, 17:42:40 UTC
back to top