yarn @angular/compiler-cli 13.0.0

latest releases: 14.2.0-next.0, 14.1.1, 14.1.0...
9 months ago

13.0.0 (2021-11-03)

Breaking Changes


  • The behavior of the SpyLocation used by the RouterTestingModule has changed
    to match the behavior of browsers. It no longer emits a 'popstate' event
    when Location.go is called. In addition, simulateHashChange now
    triggers both a hashchange and a popstate event.
    Tests which use location.go and expect the changes to be picked up by
    the Router should likely change to simulateHashChange instead.
    Each test is different in what it attempts to assert so there is no
    single change that works for all tests. Each test using the SpyLocation to
    simulate browser URL changes should be evaluated on a case-by-case basis.


  • TypeScript versions older than 4.4.2 are no longer supported.

  • NodeJS versions older than v12.20.0 are no longer
    supported due to the Angular packages using the NodeJS package exports
    feature with subpath patterns.

  • The WrappedValue class can no longer be imported from @angular/core,
    which may result in compile errors or failures at runtime if outdated
    libraries are used that are still using WrappedValue. The usage of
    WrappedValue should be removed as no replacement is available.


  • A new type called FormControlStatus has been introduced, which is a union of all possible status strings for form controls. AbstractControl.status has been narrowed from string to FormControlStatus, and statusChanges has been narrowed from Observable<any> to Observable<FormControlStatus>. Most applications should consume the new types seamlessly. Any breakage caused by this change is likely due to one of the following two problems: (1) the app is comparing AbstractControl.status against a string which is not a valid status; or, (2) the app is using statusChanges events as if they were something other than strings.


  • The default url serializer would previously drop
    everything after and including a question mark in query parameters. That
    is, for a navigation to /path?q=hello?&other=123, the query
    params would be parsed to just {q: 'hello'}. This is
    incorrect because the URI spec allows for question mark characers in
    query data. This change will now correctly parse the params for the
    above example to be {v: 'hello?', other: '123'}.

  • Previously null and undefined inputs for routerLink were
    equaivalent to empty string and there was no way to disable the link's
    In addition, the href is changed from a property HostBinding() to an
    attribute binding (HostBinding('attr.href')). The effect of this
    change is that DebugElement.properties['href'] will now return the
    href value returned by the native element which will be the full URL
    rather than the internal value of the RouterLink href property.

  • The router will no longer replace the browser URL when a new navigation
    cancels an ongoing navigation. This often causes URL flicker and was
    only in place to support some AngularJS hybrid applications. Hybrid
    applications which rely on the navigationId being present on initial
    navigations that were handled by the Angular router should instead
    subscribe to NavigationCancel events and perform the
    location.replaceState themselves to add navigationId to the Router
    In addition, tests which assert urlChanges on the SpyLocation may
    need to be adjusted to account for the replaceState which is no longer

  • It is no longer possible to use Route.loadChildren using a string
    value. The following supporting classes were removed from

  • NgModuleFactoryLoader

  • SystemJsNgModuleFactoryLoader

The @angular/router package no longer exports these symbols:

  • SpyNgModuleFactoryLoader
  • DeprecatedLoadChildren

The signature of the setupTestingRouter function from
@angular/core/testing has been changed to drop its NgModuleFactoryLoader
parameter, as an argument for that parameter can no longer be created.


  • The return type of SwUpdate#activateUpdate and SwUpdate#checkForUpdate changed to Promise<boolean>.

Although unlikely, it is possible that this change will cause TypeScript type-checking to fail in
some cases. If necessary, update your types to account for the new
return type.


  • The renderModuleFactory symbol in @angular/platform-server is no longer necessary as of Angular v13.

The renderModuleFactory calls can be replaced with renderModule.


  • The SwUpdate#activated observable is deprecated.

The SwUpdate#activated observable only emits values as a direct response to calling
SwUpdate#activateUpdate() and was only useful for determining whether the call resulted in an
update or not. Now, the return value of SwUpdate#activateUpdate() can be used to determine the
outcome of the operation and therefore using SwUpdate#activated does not offer any benefit.

  • The SwUpdate#availalbe observable is deprecated.

The new SwUpdate#versionUpdates observable provides the same information and more. Therefore, it
is possible to rebuild the same behavior as SwUpdate#availalbe using the events emitted by
SwUpdate#versionUpdates and filtering for VersionReadyEvent events.
As a result, the SwUpdate#availalbe observable is now redundant.

docs - 747553dd68deprecate ViewEngine-based renderModuleFactory (#43757)


feat - 62d7005a52add strict_templates and experimental_extended_template_diagnostics to ng_module() rule (#43582)
feat - d977701a43allow for custom conditions to be set in ng_package targets (#43764)
feat - 4886585875create transition for enabling partial compilation (#43431)
feat - cd1b52483eexpose esm2020 and es2020 conditions in APF package exports (#43740)
feat - 49b82ae561implement partial compilation APF v13 for ng_package rule (#43431)
feat - 274cb38e0bswitch prodmode output to ES2020 (#43431)
feat - 73ac50c447wire up partial compilation build setting in ng_module (#43431)
fix - e0a72857ccconstruct a manifest file even when warnings are emitted (#43582)
fix - dbe656d1e0ngc-wrapped should not rely on linker for external workspaces (#43690)


feat - adf4481211add injection token for default date pipe timezone (#43611)
fix - c6a93001ebsynchronise location mock behavior with the navigators (#41730)


fix - 14b492df26do not error if $any is used inside a listener (#43866)


feat - bed121c34finline resources when generating class metadata calls (#43178)
fix - 263feba5c2handle nullable expressions correctly in the nullish coalescing extended template diagnostic (#43572)
fix - 8f7fdc59afnot evaluating new signature for __spreadArray (#43618)
fix - 426a3ecae7updates ngc to pass the build when only warnings are emitted (#43673)


feat - a3960846daadd createNgModuleRef function to create NgModuleRef based on NgModule class (#43580)
feat - fe1f6421d2add getNgModuleById function to retrieve loaded NgModules by id (#43580)
feat - 81c7eb813cadd migration to opt out existing apps from new test module teardown behavior (#43353)
feat - e57691c9c5Add migration to update empty routerLinks in templates (#43176)
feat - 7dccbdd27badd support for Types in ViewContainerRef.createComponent (#43022)
feat - c14085e434drop support for TypeScript 4.2 and 4.3 (#43642)
feat - 94ba59bc9denable test module teardown by default (#43353)
feat - ea61ec2562support TypeScript 4.4 (#43281)
feat - e0a0d05d45update node version support range to support v16 (#43740)
fix - 7396021e4bavoid duplicating comments in TestBed teardown migration (#43776)
fix - 7fd0428aaedon't rethrow errors if test teardown has been disabled (#43635)
fix - 66fb311d20incorrect signature for initTestEnvironment (#43615)
fix - 8ae99821d6support InjectFlags argument in NodeInjector.get() (#41592)
perf - 8878183521remove support for the deprecated WrappedValue (#43507)


fix - a468213f34remove ng-add schematic (#43975)
fix - f544a53f5fremove incorrect @angular/platform-browser peer dependency (#43975)


feat - d9d8f950e9allow disabling min/max validators dynamically (by setting the value to null) (#42978)
feat - e49fc96ed3Make Form Statuses use stricter types. (#42952)


feat - b10d90bef6Add method for retrieving the component template at the cursor location (#43208)
feat - d5f9890c92auto-apply optional chaining on nullable symbol (#42995)
feat - 69957f72e2provide snippets for attribute (#43590)
fix - fc3b50e427exclude the SafePropertyRead when applying the optional chaining (#43321)


fix - 95a68c5dc3account for CRLF characters in template migrations (#44013)
fix - 77bd2538cbapply individual expression edits to preserve newline characters (#43519)
fix - d849350c7bEnsure routerLink migration doesn't update unrelated files (#43519)
fix - 2efc18e675migration failed finding tsconfig file (#43343)
fix - b6f2a55147prevent migrations from updating external templates multiple times (#44013)


feat - 4f3beffdbfemit activate/deactivate events when an outlet gets attached/detached (#43333)
feat - faf9f5a3bcnew output that would notify when link is activated (#43280)
feat - 3c6b653089Option to correctly restore history on failed navigation (#43289)
fix - 784671597eAllow question marks in query param values (#31187)
fix - 796da641f0Do not modify parts of URL excluded from with 'eager' updates (#43421)
fix - 772e08d14efix Router's public API for canceledNavigationResolution (#43842)
fix - ccb09b4558null/undefined routerLink should disable navigation (#43087)
fix - 9e039ca68bOnly trigger router navigation on popstate events from Location subscription (#43328)
fix - c5d0bd4966Prevent URL flicker when new navigations cancel ongoing ones (#43496)
fix - adc68b100breuse route strategy fix (#43791)
refactor - 361273fad5remove support for loadChildren string syntax (#43591)


feat - 59225f5586SwUpdate#activeUpdate and SwUpdate#checkForUpdate should have a meaningful outcome (#43668)
feat - 0dc45446feexpose more version update events (#43668)

Special Thanks

Ahmed Ayed, Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Bjarki, Charles Lyding, Dmitrij Kuba, Doug Parker, Dylan Hunn, George Kalpakas, Jessica Janiuk, Jochen Kraushaar, Joe Martin (Crowdstaffing), Joey Perrott, Jon Rimmer, JoostK, Kristiyan Kostadinov, Maximilian Köller, Paul Gschwendtner, Pei Wang, Pete Bacon Darwin, Tomasz Domański, Willy Schott, anandtiwary, dario-piotrowicz, iRealNirmal, ivanwonder, krzysztof-grzybek, mgechev and vthinkxie

Don't miss a new compiler-cli release

NewReleases is sending notifications on new releases.