Skip to content

Update angular monorepo to v12 (major)#106

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
renovate/major-angular-monorepo
May 12, 2021
Merged

Update angular monorepo to v12 (major)#106
kodiakhq[bot] merged 1 commit into
mainfrom
renovate/major-angular-monorepo

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 12, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@angular/common 11.2.14 -> 12.0.0 age adoption passing confidence
@angular/compiler 11.2.14 -> 12.0.0 age adoption passing confidence
@angular/compiler-cli 11.2.14 -> 12.0.0 age adoption passing confidence

Release Notes

angular/angular

v12.0.0

Compare Source

Bug Fixes
Build System
Features
Performance Improvements
BREAKING CHANGES
  • Minified UMD bundles are no longer included in the distributed NPM packages.
  • animations: DOM elements are now correctly removed when the root view is removed.
    If you are using SSR and use the app's HTML for rendering, you will need
    to ensure that you save the HTML to a variable before destorying the
    app.
    It is also possible that tests could be accidentally relying on the old behavior by
    trying to find an element that was not removed in a previous test. If
    this is the case, the failing tests should be updated to ensure they
    have proper setup code which initializes elements they rely on.
  • common: Methods of the PlatformLocation class, namely onPopState and onHashChange,
    used to return void. Now those methods return functions that can be called
    to remove event handlers.
  • common: The methods of the HttpParams class now accept string | number | boolean
    instead of string for the value of a parameter.
    If you extended this class in your application,
    you'll have to update the signatures of your methods to reflect these changes.
  • compiler-cli: Linked libraries no longer generate legacy i18n message ids. Any downstream
    application that provides translations for these messages, will need to
    migrate their message ids using the localize-migrate command line tool.
  • core: Angular no longer maintains support for node v10
  • core: Previously the ng.getDirectives function threw an error in case a
    given DOM node had no Angular context associated with it (for example
    if a function was called for a DOM element outside of an Angular app).
    This behavior was inconsistent with other debugging utilities under ng
    namespace, which handled this situation without raising an exception.
    Now calling the ng.getDirectives function for such DOM nodes would
    result in an empty array returned from that function.
  • core: Switching default of emitDistinctChangesOnlyDefaultValue
    which changes the default behavior and may cause some applications which
    rely on the incorrect behavior to fail.

emitDistinctChangesOnly flag has also been deprecated and will be
removed in a future major release.

The previous implementation would fire changes QueryList.changes.subscribe
whenever the QueryList was recomputed. This resulted in an artificially
high number of change notifications, as it is possible that recomputing
QueryList results in the same list. When the QueryList gets recomputed
is an implementation detail, and it should not be the thing that determines
how often change event should fire.

Unfortunately, fixing the behavior outright caused too many existing
applications to fail. For this reason, Angular considers this fix a
breaking fix and has introduced a flag in @ContentChildren and
@ViewChildren, that controls the behavior.

export class QueryCompWithStrictChangeEmitParent {
  @​ContentChildren('foo', {
    // This option is the new default with this change.
    emitDistinctChangesOnly: true,
  })
  foos!: QueryList<any>;
}

For backward compatibility before v12
emitDistinctChangesOnlyDefaultValue was set to false. This change
changes the default to true.

  • core: The type of the APP_INITIALIZER token has been changed to more accurately
    reflect the types of return values that are handled by Angular. Previously,
    each initializer callback was typed to return any, this is now
    Promise<unknown> | Observable<unknown> | void. In the unlikely event that
    your application uses the Injector.get or TestBed.inject API to inject
    the APP_INITIALIZER token, you may need to update the code to account for
    the stricter type.

Additionally, TypeScript may report the TS2742 error if the APP_INITIALIZER
token is used in an expression of which its inferred type has to be emitted
into a .d.ts file. To workaround this, an explicit type annotation is needed,
which would typically be Provider or Provider[].

  • core: Minimum supported zone.js version is 0.11.4

  • forms: The emitEvent option was added to the following FormArray and FormGroup methods:

  • FormGroup.addControl

  • FormGroup.removeControl

  • FormGroup.setControl

  • FormArray.push

  • FormArray.insert

  • FormArray.removeAt

  • FormArray.setControl

  • FormArray.clear

If your app has custom classes that extend FormArray or FormGroup classes and override the
above-mentioned methods, you may need to update your implementation to take the new options into
account and make sure that overrides are compatible from a types perspective.

  • forms: Previously min and max attributes defined on the <input type="number">
    were ignored by Forms module. Now presence of these attributes would
    trigger min/max validation logic (in case formControl, formControlName
    or ngModel directives are also present on a given input) and
    corresponding form control status would reflect that.
  • platform-browser: XhrFactory has been moved from @angular/common/http to @angular/common.

Before

import {XhrFactory} from '@&#8203;angular/common/http';

After

import {XhrFactory} from '@&#8203;angular/common';
  • router: Strict null checks will report on fragment potentially being null.
    Migration path: add null check.
  • router: The type of the RouterLinkActive.routerLinkActiveOptions input was
    expanded to allow more fine-tuned control. Code that previously read
    this property may need to be updated to account for the new type.

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate Bot force-pushed the renovate/major-angular-monorepo branch from 0526e78 to 1b11e3c Compare May 12, 2021 23:00
@kodiakhq kodiakhq Bot merged commit 2de0a20 into main May 12, 2021
@kodiakhq kodiakhq Bot deleted the renovate/major-angular-monorepo branch May 12, 2021 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant