https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
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
9c11183 docs: deprecate `CachedResourceLoader` and `RESOURCE_CACHE_PROVIDER` symbols (#44749) DEPRECATED: The `CachedResourceLoader` and `RESOURCE_CACHE_PROVIDER` symbols were previously necessary in some cases to test AOT-compiled components with View Engine, but they are no longer needed since Ivy. PR Close #44749 19 January 2022, 17:42:40 UTC
9f12e7f docs: deprecate `ComponentFactory` and `ComponentFactoryResolver` symbols (#44749) DEPRECATED: The `ComponentFactory` and `ComponentFactoryResolver` classes are deprecated. Since Ivy, there is no need to resolve Component factories. Please use other APIs where you Component classes can be used directly (without resolving their factories). PR Close #44749 19 January 2022, 17:42:40 UTC
2b01e17 docs: release notes for the v13.1.3 release (#44758) PR Close #44758 19 January 2022, 17:40:37 UTC
34d2292 docs: update deprecated form of the tap operator in http example (#44738) update deprecated form of the tap operator. Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments DEPRECATED: tap operator subscribe signature is deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments Closes #44708 PR Close #44738 19 January 2022, 17:22:02 UTC
b49ffcd feat(core): allow for injector to be specified when creating an embedded view (#44666) Adds support for passing in an optional injector when creating an embedded view through `ViewContainerRef.createEmbeddedView` and `TemplateRef.createEmbeddedView`. The injector allows for the DI behavior to be customized within the specific template. Fixes #14935. PR Close #44666 19 January 2022, 17:09:38 UTC
fb27867 Revert "refactor(forms): Move FormControl to an overridden exported constructor. (#44316)" (#44750) This reverts commit cd5200ea6863445adce24c62f30e49940a926522. PR Close #44750 19 January 2022, 03:54:51 UTC
bc03a2e refactor(core): make the error messages tree shakable (#44359) Long error messages can be tree-shaken in the production build and replaced with error codes. See: https://github.com/angular/angular/pull/44219#issuecomment-983216374 PR Close #44359 19 January 2022, 01:38:10 UTC
41b8ecc refactor(forms): Make a couple small cleanups encountered while rebasing typed forms. (#44748) These should all be no-ops publicly; they are just small issues encountered during a large rebase to bring typed-forms current. PR Close #44748 19 January 2022, 00:20:21 UTC
ece530f refactor(animations): change errors type from any to string (#44726) errors in the animations code are of type `any` but are consistently used as if there were `string`s, change `any` to `string` to make typing more accurate PR Close #44726 18 January 2022, 23:52:05 UTC
cd5200e refactor(forms): Move FormControl to an overridden exported constructor. (#44316) This implementation change was originally proposed as part of Typed Forms, and will have major consequences for that project as described in the design doc. Submitting it separately will greatly simplify the risk of landing Typed Forms. This change should have no visible impact on normal users of FormControl. See the Typed Forms design doc here: https://docs.google.com/document/d/1cWuBE-oo5WLtwkLFxbNTiaVQGNk8ipgbekZcKBeyxxo. PR Close #44316 18 January 2022, 22:51:53 UTC
1f6249d refactor(compiler): remove directive matching from template compiler (#44731) The directive matching pass that happens during template compilation is redundant, since directive matching has already happened during the resolution phase of ngtsc and only matching declarables are provided to the template compiler. In JIT mode the declarables only become available after the primary template compilation has completed, so there is no need to perform directive matching in both JIT and AOT mode. PR Close #44731 18 January 2022, 22:51:08 UTC
dac0430 refactor(compiler): store modifiers in a bitmask instead of an array (#44731) This commit slightly reduces memory usage of output AST by storing type and statement modifiers as a bitmask instead of using an array. PR Close #44731 18 January 2022, 22:51:08 UTC
5efebf8 perf(compiler-cli): reduce analysis work during incremental rebuilds (#44731) This commit reduces the analysis work that needs to happen during an incremental rebuild by properly recording files for which no traits were found in the set of files that have no traits, such that the same file doesn't have to be reanalyzed during subsequent rebuilds. It also excludes shim files from analysis. PR Close #44731 18 January 2022, 22:51:08 UTC
4307b82 refactor(common): make the error messages tree shakable (#44663) Make Long error messages tree-shakable in the production build with error codes. fixes #40096 PR Close #44663 18 January 2022, 18:31:44 UTC
ccb73c0 docs: add Ankit to GDE resources (#44659) PR Close #44659 18 January 2022, 17:25:07 UTC
35345b6 build: update angular (#44728) PR Close #44728 18 January 2022, 17:24:43 UTC
b66e479 fix(ngcc): support element accesses for export declarations (#44669) Bundlers like Rollup may use an element access expression for an export declaration, which causes ngcc to ignore those export declarations possibly resulting in incomplete processing of packages. Element access syntax may be used when the declared name is not considered as valid JS identifier, but bundlers may be conservative in determining whether an identifier can be used (to emit a property access) and opt for a string literal in an element access instead. The element access syntax introduces a problem for ngcc, where it wouldn't consider such export as class declaration, causing them to be skipped. The ngtsc compiler is implemented with the assumption that all class declarations use a `ts.Identifier` as name, whereas the element access is using a string literal for the declared name. This makes it troublesome for ngcc to support this syntax form in UMD bundles. To work around the problem, this function transforms these access expressions into regular property accesses. The source text is parsed to an AST to allow finding the element accesses in a robust way, after which the affected text ranges are replaced with property accesses in the original source text. Closes #44037 PR Close #44669 15 January 2022, 01:43:59 UTC
6e04815 docs(docs-infra): change the testing guide due to deprecation (#44674) The jasmine used in the docs is ```typescript expect(<variableName>).<matcher>(predicate, failOutput) ``` The new version should be ```typescript expect(<variableName>).withContext(failOutput).<matcher>(predicate) ``` So, this commit mainly focuses on changing the former to latter with format below ```typescript expect(<variableName>) .withContext(failOutput) .<matcher>(predicate) ``` And for RxJs, see https://rxjs.dev/deprecations/subscribe-arguments. > For example someone could name functions poorly and confuse the next reader: `source$.subscribe(doSomething, doSomethingElse, lol)` with that signature, you have to know unapparent details about subscribe, where using a partial observer solves that neatly: `source$.subscribe({ next: doSomething, error: doSomethingElse, complete: lol }`). This commit also does this conversion. Last, remove the unused imported `async` from file `twain.component.marbles.spec.ts`. PR Close #44674 13 January 2022, 20:46:24 UTC
c2da290 feat(docs-infra): Add a new processor for `@overriddenImplementation`. (#44689) This new processor, named `mergeOverriddenImplementation`, allows Dgeni to produce correct documentation for symbols with overridden exported constructors. For example, in the following example, the implementation documentation will be used, including the constructor signature: ``` export const Foo: FooCtor = FooImpl as FooCtor; ``` This is a major improvement over the current situation, in which no constructor signature is documented whatsoever. PR Close #44689 13 January 2022, 20:02:22 UTC
adc487f fix(animations): apply setStyles to only rootTimelines (#44515) during keyframe building only consider the root element's timelines for the style setting, so that the states styles (applied with '*') can be applied correctly resolves #32133 resolves #28654 PR Close #44515 13 January 2022, 20:01:50 UTC
d460e02 build: update all non-major dependencies (#44705) PR Close #44705 13 January 2022, 20:01:08 UTC
f06b0d9 test: update integration payload size checks golden file (#44440) This updates the size checks for Angular CLI version 13.1.3. The increase in size is due to changes in ESBuild. Before ```js class bS extends Wl { constructor(t, n, r, i) { super(t), (this.component = r); const o = Is(i + "-" + r.id, r.styles, []); n.addStyles(o), (this.contentAttr = "_ngcontent-%COMP%".replace(Gl, i + "-" + r.id)), (this.hostAttr = "_nghost-%COMP%".replace(Gl, i + "-" + r.id)); } applyToHost(t) { super.setAttribute(t, this.hostAttr, ""); } createElement(t, n) { const r = super.createElement(t, n); return super.setAttribute(r, this.contentAttr, ""), r; } } ``` Now ```js class ES extends Wl { constructor(t, n, r, i) { super(t), (this.component = r); const o = Is(i + "-" + r.id, r.styles, []); n.addStyles(o), (this.contentAttr = (function _S(e) { return "_ngcontent-%COMP%".replace(Gl, e); })(i + "-" + r.id)), (this.hostAttr = (function CS(e) { return "_nghost-%COMP%".replace(Gl, e); })(i + "-" + r.id)); } applyToHost(t) { super.setAttribute(t, this.hostAttr, ""); } createElement(t, n) { const r = super.createElement(t, n); return super.setAttribute(r, this.contentAttr, ""), r; } } ``` PR Close #44440 13 January 2022, 18:30:52 UTC
5df4665 build: update angular (#44440) PR Close #44440 13 January 2022, 18:30:52 UTC
3517e51 docs: add CoreUI UI Components Library to the resources list (#44613) PR Close #44613 13 January 2022, 18:27:51 UTC
3c0446c build: update shelljs dependencies to "^0.8.5" (#44697) Update shelljs dependencies to ^0.8.5 to fix a vulnerability reported to shelljs. PR Close #44697 13 January 2022, 18:27:32 UTC
2189588 docs: remove unnecessary parenthesis in View Encapsulation file (#44702) PR Close #44702 13 January 2022, 18:27:13 UTC
432e518 refactor(elements): remove the createCustomEvent function (#44703) the createCustomEvent function's pupose is to create customEvents even on browsers where `CustomEvent` is not a constructor, `CustomEvent` is currently available in all supported browsers (since IE11 support has ended), so remove the function as it is no longer needed PR Close #44703 13 January 2022, 18:26:54 UTC
290df4f refactor(animations): Remove unnecessary IE specific code (#44686) There were a few places we were still checking for Internet Explorer. This removes the references throughout the animations package. PR Close #44686 12 January 2022, 20:43:23 UTC
57d0ca1 ci: add golden files for runtime error codes (#44677) Runtime error codes in the Core, Common and Forms packages were not included into the `public-api` group reviews. This commit creates the necessary golden files to keep track of further changes in the runtime codes. This is a followup from https://github.com/angular/angular/pull/44398#issuecomment-1006910976. PR Close #44677 12 January 2022, 20:42:06 UTC
c7b210d refactor(forms): update email validator to inherit abstractValidator (#44545) Modified email validator to inherit abstractValidator. For every validato type different PR will be raised as discussed in #42378. Closes #42267 PR Close #44545 12 January 2022, 20:41:40 UTC
c888dfd docs: add Decoded Frontend YT channel to resources list (#44278) PR Close #44278 12 January 2022, 20:41:17 UTC
42ce3ac release: cut the v13.2.0-next.2 release (#44701) 12 January 2022, 19:21:10 UTC
555a57d docs: release notes for the v13.1.2 release (#44699) 12 January 2022, 18:55:28 UTC
e98b8f5 docs: add miniprogram cross-platform development resource with resources.json (#44646) PR Close #44646 11 January 2022, 22:04:21 UTC
de0ae1b build(docs-infra): upgrade cli command docs sources to 9ac3df5d1 (#44682) 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](https://github.com/angular/cli-builds/compare/481eb4544...9ac3df5d1): **Modified** - help/build.json PR Close #44682 11 January 2022, 22:04:01 UTC
92b23f4 fix(compiler-cli): properly index <svg> elements (#44678) In the `Element` node of a parsed `<svg>` element, the `name` is recorded as `:svg:svg`. When the Angular Indexer ran over this element, it would attempt to find this name in the template text and fail, as the namespace portion of the name was added automatically at parse time and is of course missing from the original template. This commit changes the indexer to detect these namespaced elements and only search for the tag name. PR Close #44678 11 January 2022, 19:16:18 UTC
b8ed03b fix(compiler): correct spans when parsing bindings with comments (#44678) When parsing a binding with a comment at the end of the expression, the parser previously had logic to offset the parsed spans by the length of the comment. This logic seemed not to serve any useful purpose, and instead resulted in the corruption of the spans. For example, in the expression `{{foo // comment}}`, the parser would map the parsed `foo` `PropertyRead` node at the location of the characters 'ent' from the comment suffix. This commit removes that logic, correcting the parsed spans of such nodes in the presence of comments. Removing this logic does not seem to have caused any tests to fail. PR Close #44678 11 January 2022, 19:16:18 UTC
f83fb3a fix(compiler-cli): handle property reads of `ThisReceiver` in the indexer (#44678) Previously, the Angular Indexer made an assumption that in any binding to a property of an `ImplicitReceiver`, the property name begins at the start of the binding. This is true for normal reads from `ImplicitReceiver` as the implicit receiver has no representation in the template. However, `ThisReceiver` inherits from `ImplicitReceiver` and _does_ have a template representation. Such a binding looks like `{{this.foo}}`. This commit corrects the logic of the indexer to use the `nameSpan` of the property binding instead of its `sourceSpan` to locate the identifier. PR Close #44678 11 January 2022, 19:16:18 UTC
83e6db4 refactor(compiler-cli): add validation to extended template diagnostics configuration (#44391) Refs #42966. This validates the `tsconfig.json` options for extended template diagnostics. It verifies: * `strictTemplates` must be enabled if `extendedDiagnostics` have any explicit configuration. * `extendedDiagnostics.defaultCategory` must be a valid `DiagnosticCategoryLabel`. * `extendedDiagnostics.checks` keys must all be real diagnostics. * `extendedDiagnostics.checks` values must all be valid `DiagnosticCategoryLabel`s. These include new error codes, each of which prints out the exact property that was the issue and what the available options are to fix them. It does disallow the config: ```json { "angularCompilerOptions": { "strictTemplates": false, "extendedDiagnostics": { "defaultCategory": "suppress" } } } ``` Such a configuration is technically valid and could be executed, but will be rejected by this verification logic. There isn't much reason to ever do this, since users could just drop `extendedDiagnostics` altogether and get the intended effect. This is unlikely to be a significant issue for users, so it is considered invalid for now to keep the implementation simple. PR Close #44391 11 January 2022, 17:33:16 UTC
9e5ac51 refactor(compiler-cli): add `defaultCategory` option (#44391) Refs #42966. The `defaultCategory` option is used for any extended template diagnostics which do not have any specific category specified for them. It defaults to `warning`, since that is the most common behavior expected for users. This provides an easy way for users to promote all diagnostics to errors or suppress all diagnostics. PR Close #44391 11 January 2022, 17:33:16 UTC
0cf1322 refactor(compiler-cli): use configured diagnostic category when emitting warnings from extended template diagnostics (#44391) Refs #42966. This updates `TemplateContext` to include a new `makeTemplateDiagnostic()` function which automatically uses the correct diagnostic category for that check. This makes sure that each diagnostic is emitted with the correct category. It also implicitly passes some known values like `component` and `code` to make the extended template diagnostics a little simpler. Diagnostics which are suppressed are never instantiated at all, which acts as a slight performance optimization since any emitted diagnostics would be ignored anyways. Unfortunately, diagnostics still have access to `ctx.templateTypeChecker.makeTemplateDiagnostic()` to manually create diagnostics with a different category. Both banana in box and nullish coalescing checks include tests to make sure they respect a manually configured category. This convention should hopefully give a reasonable certainty that new diagnostics will use the correct reporting function, even if that is not strictly enforced. PR Close #44391 11 January 2022, 17:33:16 UTC
416368a refactor(compiler-cli): add initial compiler options definitions for extended template diagnostics (#44391) Refs #42966. This includes a mapping of extended template diagnostics to their associated diagnostic category. It is generated from the list of diagnostic names, so the list should always be implicitly kept up to date. Usage looks like: ```json { "angularCompilerOptions": { "extendedDiagnostics": { "checks": { "invalidBananaInBox": "error", "nullishCoalescingNotNullable": "suppress" } } } } ``` PR Close #44391 11 January 2022, 17:33:16 UTC
4033fdf refactor(compiler-cli): add `allDiagnosticFactories` (#44391) Refs #42966. This is a static array of all the 1P extended template diagnostic factories built into the Angular compiler directly. It provides an encapsulated list of all diagnostics rather than requiring users to manually list each one individually. PR Close #44391 11 January 2022, 17:33:16 UTC
1446017 refactor(compiler-cli): call factories directly from extended template checker (#44391) Refs #42966. This moves extended template check factory invocations into the checker itself, where it can provide a more consistent API contract. Factories are called with compiler options and may return a `TemplateCheck` or `undefined` if the current options do not support that check. This allows `nullishCoalescingNotNullable` to disable itself when `strictNullChecks` is disabled without throwing errors. This gives extended template diagnostics a stronger abstraction model to define their behavior with. PR Close #44391 11 January 2022, 17:33:16 UTC
ed74e3a refactor(compiler-cli): add `ExtendedTemplateDiagnosticName` and `TemplateCheckFactory` (#44391) Refs #42966. The enum of extended template diagnostic names allows a global registry of first-party diagnostics with a developer-friendly string name which can be used for configuration. This name is used in the new `TemplateCheckFactory` to bind the name to a particular `ErrorCode` and make both available *before* constructing the actual template check, which is necessary to configure it appropriately. PR Close #44391 11 January 2022, 17:33:15 UTC
a4ab6d6 feat(compiler): add support for safe calls in templates (#44580) Adds support for safely calling functions that may be undefined inside template expressions. E.g. `maybeUndefined?.()` Fixes #42298. PR Close #44580 11 January 2022, 17:32:47 UTC
af2a131 feat(language-service): support completions for animation (#44630) Support completions for animation. PR Close #44630 10 January 2022, 21:22:44 UTC
73424de feat(compiler-cli): provide the animations for `DirectiveMeta` (#44630) In `language-service`, the `checker.getDirectiveMetadata` doesn't return the animations meta of the `Component`. but it's useful for animation completion. PR Close #44630 10 January 2022, 21:22:44 UTC
1a91218 fix(compiler-cli): enable narrowing of using type guard methods (#44447) The changes in 2028c3933f7fe2961999da475febde5a03bb694d caused method calls to be emitted using additional parenthesis into the TCB, which in turn prevented proper type narrowing when the method acts as a type guard. This commit special-cases method calls from property reads to avoid the additional parenthesis. Fixes #44353 PR Close #44447 10 January 2022, 21:20:05 UTC
ebf8446 docs: Updated described version number (#44365) Updated a mentioned version to a recent angular version number to cope up with the latest version PR Close #44365 10 January 2022, 19:58:52 UTC
dff497f build: update all non-major dependencies (#44502) PR Close #44502 10 January 2022, 19:55:23 UTC
c82e541 docs: improve the component styling guide (#44234) PR Close #44234 10 January 2022, 19:53:56 UTC
a55e842 docs: missing whitespace in HostListener example (#44624) PR Close #44624 10 January 2022, 19:53:08 UTC
5a4ddfd feat(router): Allow symbol keys for `Route` `data` and `resolve` properties (#44519) This commit adds the ability to use a symbol as the key for the `data` and `resolve` objects in a `Route` config. PR Close #44519 10 January 2022, 19:43:12 UTC
8ba43a1 fix(animations): retain triggers values for moved tracked list items (#44578) when reordering a list with animations the list items lose their current triggers values, that is because the reordering of an item is implemented as follows (_note:_ the following implementation has been added in PR #23534) - the item is removed and marked _setForRemoval_ - the item is re-inserted, and the _setForRemoval_ is changed to _setForMove_ - the player set for animating the removal is destroyed when _setForMove_ is detected the above steps allow the element not to be animated and to keep its styling but the triggers values get lost since the removal transition/player has already been initialized, so this change adds a _previousTriggersValues_ map in the _REMOVAL_FLAG_ field in order to restore the triggers values if/when the removal turns out to be a move, changing the above steps to: - the item is removed and marked setForRemoval __and its current triggers values are saved as well__ - the item is re-inserted, and the setForRemoval is changed to setForMove - the player set for animating the removal is destroyed when setForMove is detected __and the trigger values are re-applied in the engine's statesByElement map__ resolves #29526 PR Close #44578 07 January 2022, 22:15:52 UTC
13d5f64 build: update dependency google-closure-compiler to v20220104 (#44655) PR Close #44655 07 January 2022, 19:16:52 UTC
eeaabe7 fix(compiler-cli): incorrectly interpreting $any calls with a property read (#44657) This was flagged during the code review of #44580. When generating a type check block, we were interpreting any call to `$any` as an `as any` cast, even if it's part of a `PropertyRead` (e.g. `foo.$any(1)`). This is handled correctly in other parts of the compiler, but it looks like it was missed in the type checker. PR Close #44657 07 January 2022, 18:11:58 UTC
c57e22a refactor(docs-infra): remove IE11 code (#44570) since IE11 is no longer a supported browser, remove angular.io code implemented specifically for IE11 support this change reverts the following PRs: - #26059 (slightly) - #28188 (fully) - #32871 (fully) - #41183 (partially) PR Close #44570 07 January 2022, 18:11:35 UTC
back to top