This repository was archived by the owner on Oct 12, 2024. It is now read-only.
fix(deps): update dependency @angular/core to v12 [security] - autoclosed #68
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.0
GitHub Vulnerability Alerts
CVE-2021-4231
A vulnerability was found in Angular up to 11.0.4/11.1.0-next.2. It has been classified as problematic. Affected is the handling of comments. The manipulation leads to cross site scripting. It is possible to launch the attack remotely but it might require an authentication first. Upgrading to version 10.2.5, 11.0.5 or 11.1.0-next.3 is advised to to address this issue.
Release Notes
angular/angular (@angular/core)
v12.0.0
Compare Source
12.0.0 (2021-05-12)
Bug Fixes
XhrFactory
(#41393) (7dfa446)@font-face
rules (#41815) (2a11cda), closes #41751:host-context()
selectors (#40494) (07b7af3), closes #19199ts.Program
s correctly (#41291) (deacc74)rootDirs
to absolute (#41359) (3e0fda9), closes #36290useInlining
option to type check config (#41043) (09aefd2), closes #40963readConfiguration
existing options should override options in tsconfig (#40694) (b7c4d07)angularCompilerOptions
in tsconfig from node (#40694) (5eb1954), closes #36715emitDistinctChangesOnlyDefaultValue
to true (#41121) (7096246)XhrFactory
to useBrowserXhr
(#41313) (e0028e5), closes #41311Build System
ng_package
no longer generate minified UMDs (#41425) (5a8bc1b)Features
historyGo
method toLocation
service (#38890) (e05a6f3)DatePipe
(#40766) (c56ecab), closes #26922appendAll()
method onHttpParams
(#20930) (575a2d1), closes #20798forwardRef
inprovidedIn
ofInjectable
declaration (#41426) (f7c294e), closes #41205XhrFactory
import (#41313) (95ff5ec)APP_INITIALIZER
token (#40986) (ca721c2), closes #40729emitEvent
option for AbstractControl-based class methods (#31031) (4ec045e), closes #29662getRenameInfo
(#40439) (4e8198d)findRenameLocations
(#40140) (9a5ac47)__read
helper as used by TypeScript 4.2 (#41201) (66e9970)__spreadArray
helper 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.
PlatformLocation
class, namelyonPopState
andonHashChange
,used to return
void
. Now those methods return functions that can be calledto remove event handlers.
HttpParams
class now acceptstring | 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.
application that provides translations for these messages, will need to
migrate their message ids using the
localize-migrate
command line tool.ng.getDirectives
function 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
ng
namespace, which handled this situation without raising an exception.
Now calling the
ng.getDirectives
function for such DOM nodes wouldresult in an empty array returned from that function.
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 beremoved in a future major release.
The previous implementation would fire changes
QueryList.changes.subscribe
whenever the
QueryList
was recomputed. This resulted in an artificiallyhigh number of change notifications, as it is possible that recomputing
QueryList
results in the same list. When theQueryList
gets 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
@ContentChildren
and@ViewChildren
, that controls the behavior.For backward compatibility before v12
emitDistinctChangesOnlyDefaultValue
was set tofalse
. This changechanges the default to
true
.APP_INITIALIZER
token 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.get
orTestBed.inject
API to injectthe
APP_INITIALIZER
token, you may need to update the code to account forthe 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
orProvider[]
.core: Minimum supported
zone.js
version is0.11.4
forms: The
emitEvent
option was added to the followingFormArray
andFormGroup
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
orFormGroup
classes 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.
min
andmax
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) andcorresponding form control status would reflect that.
XhrFactory
has been moved from@angular/common/http
to@angular/common
.Before
After
Migration path: add null check.
RouterLinkActive.routerLinkActiveOptions
input 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: Branch creation - "" (UTC), Automerge - 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 this update again.
This PR was generated by Mend Renovate. View the repository job log.