Update angular monorepo to v12 (major)#124
Merged
Merged
Conversation
408e080 to
6c5b5f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
11.2.14->12.0.011.2.14->12.0.011.2.14->12.0.0Release Notes
angular/angular
v12.0.0Compare Source
Bug Fixes
XhrFactory(#41393) (7dfa446)@font-facerules (#41815) (2a11cda), closes #41751:host-context()selectors (#40494) (07b7af3), closes #19199ts.Programs correctly (#41291) (deacc74)rootDirsto absolute (#41359) (3e0fda9), closes #36290useInliningoption to type check config (#41043) (09aefd2), closes #40963readConfigurationexisting options should override options in tsconfig (#40694) (b7c4d07)angularCompilerOptionsin tsconfig from node (#40694) (5eb1954), closes #36715emitDistinctChangesOnlyDefaultValueto true (#41121) (7096246)XhrFactoryto useBrowserXhr(#41313) (e0028e5), closes #41311Build System
ng_packageno longer generate minified UMDs (#41425) (5a8bc1b)Features
historyGomethod toLocationservice (#38890) (e05a6f3)DatePipe(#40766) (c56ecab), closes #26922appendAll()method onHttpParams(#20930) (575a2d1), closes #20798forwardRefinprovidedInofInjectabledeclaration (#41426) (f7c294e), closes #41205XhrFactoryimport (#41313) (95ff5ec)APP_INITIALIZERtoken (#40986) (ca721c2), closes #40729emitEventoption for AbstractControl-based class methods (#31031) (4ec045e), closes #29662getRenameInfo(#40439) (4e8198d)findRenameLocations(#40140) (9a5ac47)__readhelper as used by TypeScript 4.2 (#41201) (66e9970)__spreadArrayhelper as used by TypeScript 4.2 (#41201) (7b1214e) #40394routerLinkActiveOptions(#40303) (6c05c80), closes #13205Performance Improvements
absoluteFromSourceFile(#41475) (fab1a64)BREAKING CHANGES
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.
PlatformLocationclass, namelyonPopStateandonHashChange,used to return
void. Now those methods return functions that can be calledto remove event handlers.
HttpParamsclass now acceptstring | number | booleaninstead of
stringfor 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.
application that provides translations for these messages, will need to
migrate their message ids using the
localize-migratecommand line tool.ng.getDirectivesfunction threw an error in case agiven 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
ngnamespace, which handled this situation without raising an exception.
Now calling the
ng.getDirectivesfunction for such DOM nodes wouldresult in an empty array returned from that function.
emitDistinctChangesOnlyDefaultValuewhich changes the default behavior and may cause some applications which
rely on the incorrect behavior to fail.
emitDistinctChangesOnlyflag has also been deprecated and will beremoved in a future major release.
The previous implementation would fire changes
QueryList.changes.subscribewhenever the
QueryListwas recomputed. This resulted in an artificiallyhigh number of change notifications, as it is possible that recomputing
QueryListresults in the same list. When theQueryListgets recomputedis 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
@ContentChildrenand@ViewChildren, that controls the behavior.For backward compatibility before v12
emitDistinctChangesOnlyDefaultValuewas set tofalse. This changechanges the default to
true.APP_INITIALIZERtoken has been changed to more accuratelyreflect the types of return values that are handled by Angular. Previously,
each initializer callback was typed to return
any, this is nowPromise<unknown> | Observable<unknown> | void. In the unlikely event thatyour application uses the
Injector.getorTestBed.injectAPI to injectthe
APP_INITIALIZERtoken, you may need to update the code to account forthe stricter type.
Additionally, TypeScript may report the TS2742 error if the
APP_INITIALIZERtoken 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
ProviderorProvider[].core: Minimum supported
zone.jsversion is0.11.4forms: The
emitEventoption was added to the followingFormArrayandFormGroupmethods:FormGroup.addControl
FormGroup.removeControl
FormGroup.setControl
FormArray.push
FormArray.insert
FormArray.removeAt
FormArray.setControl
FormArray.clear
If your app has custom classes that extend
FormArrayorFormGroupclasses and override theabove-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.
minandmaxattributes 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,formControlNameor
ngModeldirectives are also present on a given input) andcorresponding form control status would reflect that.
XhrFactoryhas been moved from@angular/common/httpto@angular/common.Before
After
Migration path: add null check.
RouterLinkActive.routerLinkActiveOptionsinput wasexpanded 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.
This PR has been generated by WhiteSource Renovate. View repository job log here.