Angular 9 Next Versions: Ivy, Bazel and more

Angular 9 next versions are here. Besides updates to Ivy, the update includes three features for the Language Service and Service Worker and changes the integration of Protractor into Bazel. This results in another breaking change for Angular 9.

Angular 8, with polite delay, saw the light of day in June. But after the release is before the release and already in the autumn is Angular 9 on the plan, more precisely: in October or November, it should be ready. Whether this appointment is met, or Angular 9 is a gift from Nicholas? We will see. But until then it is still a long way and initially are the smaller releases, so Angular 8.1, 8.2, etc. into the house.

Angular 9 Next versions

Next 6 version

With Angular 9.0.0-next.6 many new features have been released on the framework. Among them are quite a few bugfixes, but also some performance improvements, features as well as a code refactoring, which causes a Breaking Change, have made it into the release. It can clearly be seen on the changelog that people are still working on Ivy. Four out of five performance improvements related to Ivy; also among the bug fixes are mainly fixed bugs on the new compiler. Among them is, for example, a bug that resulted from the integration of $localize into Ivy in the previous version. The latest release states that no jsdoc comments should be generated for $localize . These were the same as for goog.getMsg() , so an error message had been issued.

However, the new release features are not in the range of Ivy this time around. But there was something new at the Language Service. Added support for styleUrl definitions, which works in a similar way to the definitions of templateUrl and should unify the procedure. For the Language Service Integration Tests, a script was added that reinstalls the Angular distribution for each build. With the new script, the installation can be done outside the root directory. In addition, some changes have been made to the service worker related to the EXISTING_CLIENTS_ONLY mode. Below is a new feature that allows you to return from this mode if a corresponding update is available.

Refactoring was done in Angular 9.0.0-next.6 on the protractor integration for Bazel. So far, the rule protractor_web_test_suite rule in the npm package @ angular / bazel, but has now been removed. Instead, it can now be found in the package @ bazel / protractor. If you work with this rule, you have to adjust your project accordingly, as this is a breaking change.

Next 5 version

Attention! After the next.3 version of Angular 9 included the last Breaking Change and Ivy chose the default compiler, there are also two Breaking Changes in the current release. The first concerns public export of hasBeenProcessed() , which will no longer take place. The reason for the removal is simple: the function was never used. Since a change to the function is a breaking change, it has been completely removed. The second breaking change concerns the method Injector.get , which now allows abstract classes to output type-safe values.

But Angular 9.0.0-next.5 has more in store than Breaking Changes: There are also new features, five in number. Since we just talked about the Ivy compiler we start there. For the compiler, the global function $localize() implemented. The Bazel section has been updated to the latest version of [@microsoft](https://github.com/microsoft)/api-extractor . TestBed.inject , the TestBed.inject method has been built into the core of Angular to replace TestBed.get . In addition, the Decorator providedIn extended, so now ‘platform’ and ‘any’ can be used.

The performance of the Ivy Compiler was again in focus, nine improvements were made for this purpose. Among other things, micro-benchmarks for normal and map-based style and class bindings were introduced. A benchmark for creating elements and text has also been added. Calls to renderStringify when creating text nodes and the repeating read / write process in addComponentLogic . Also, the PlatformLocation class is now tree-shakable.

Next 4 version

Since the previous pre-release version of Angular 9, Ivy has been defined as the default compiler and renderer. No wonder, then, that most changes to the latest release are related to Ivy. Among other things, some bugs were fixed, including the annoying bug that prevented the bindings index from refreshView reset before calling a template while calling refreshView .

A new feature for Ivy is the use of the DomElementSchemaRegistry to test Bindings to the DOM by ngtsc . In the future, this will avoid errors in apps caused by the lib.dom.d.ts schema lib.dom.d.ts or its non-smooth usage in Connection with the DomElementSchemaRegistry arise.

For about 6 percent low processing time in production mode to ensure the exclusive storage of binding metadata in ngDevMode . Users can also look forward to an approximately 12 percent increase in performance: By refactoring the handling of lView[BINDING_INDEX] (no duplicate entries at this point anymore), Angular should become faster.

Angular 9 Next 3 version

Ivy has arrived as the default compiler and renderer in Angular 9.0.0-next.3. In Angular 8.x and the previous releases for the Angular 9 development Ivy is still available as an opt-in feature. The change to the standard had already been announced for Angular 9; This should be one of the key innovations for the upcoming major release. Now the time has come: Anyone testing the Next versions of Angular 9 will be delivered as a standard pipeline for rendering and compiling.

As part of this change, of course, some innovations to Ivy were integrated into the release. So all ngtsc diagnostics for Ivy were converted to ts.Diagnostics. In addition, selector-free directives can now be used as base classes with Ivy. Also a Breaking Change for Ivy is included in the release. For example, Hammer.js will be Tree Shakeble in the future, so Hammer Providers will no longer ship if HammerModule not imported into the root module. In terms of performance, the changelog adds ten new features related to Ivy to the new Next release; some bug fixes for Ivy are also included in the Next release. In addition, Angular 9.0.0-next.3 includes a number of other changes that affect other parts of the framework, such as the core and language service.

Next 2 version

With Angular 9.0.0-next.2 the third Next-Release is ready for the upcoming Major-Version. This time we have two new features for Ivy, the new renderer to be completed with Angular 9. The bugfix for Ivy affects the behavior of incremental changes to components. If these are part of a NgModule, an error has occurred so far because the information about the Compilation Scope was lost from the NgModule and was not recreated. Now this information is registered through the ComponentScopeRegistry interface so that it is available for incremental compilations. For the performance of Ivy, a refactoring was performed, by which the global state in the context of interpolated values ​​is no longer read, as long as it is not necessary.

The other two bugfixes in the release concern Bazel and the compiler. For Bazel, treeshaking was disabled when generating FESM and UMD bundles. The bugfix on the compiler concerns the removal of whitespace in the wrapping of i18n expansions.

Further information on Angular 9.0.0 next versions can be found in the changelog on GitHub .

Recent Articles

spot_img

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here