Home Blogs Programming The Long and Winding Path ...

The Long and Winding Path to Angular 9.0.0

Angular 8, with polite delay, saw the light of day in June 2019. The next official release of the framework - Angular 9.0.0 - will be available in the fall of 2019, around October or November. 

What to expect from the upcoming version? Let’s check out the highlights of the Next versions.

In this article, we’ve compiled the changes that were introduced in versions of Angular 9.0.0-next.1 to Angular 9.0.0-next.7, including the bug fixes, breaking changes, reverts, deprecations, code refactoring, features, and performance improvements.

==========

In this article:

  • Angular 9.0.0-next.1
  • Angular 9.0.0-next.2
  • Angular 9.0.0-next.3
  • Angular 9.0.0-next.4
  • Angular 9.0.0-next.5
  • Angular 9.0.0-next.6
  • Angular 9.0.0-next.7

==========

Angular 9.0.0-next.1

Bug fixes

  • language-service:
    • getSourceFile() should only be called on TS files 
    • Make Definition and QuickInfo compatible with TS LS
  • upgrade:
    • compile downgraded components synchronously (if possible) 

Angular 9.0.0-next.2

Bug fixes

  • bazel:
    • disable treeshaking when generating FESM and UMD bundles
  • ivy:
    • reuse compilation scope for incremental template changes.
  • compiler:
    • do not remove whitespace wrapping i18n expansions 

Performance Improvements

  • ivy:
    • doesn’t read global state when interpolated values don’t change

Angular 9.0.0-next.3

Bug fixes

  • bazel:
    • pin [@microsoft](https://github.com/microsoft)/api-extractor
  • ivy:
    • get name directly from nativeNode
    • handle empty bindings in the template type checker 
    • in ngcc, handle inline exports in commonjs code
    • ngcc should only index .d.ts exports within the package 
    • ngTemplateOutlet error when switching between null and template value
    • run template type-checking for all components 
  • compiler:
    • return enableIvy true when using readConfiguration
  • ngcc:
    • handle deep imports that already have an extension
    • ignore format properties that exist but are undefined
  • language-service:
    • instantiate MetadataResolver once
    • remove ‘context’ used for module resolution
  • common:
    • update $locationShim to notify onChange listeners before emitting AngularJS events

Features

  • language-service:
    • support selector-less directive as base classes in Ivy
    • make the Ivy compiler the default for ngc 
    • convert all ngtsc diagnostics to ts.Diagnostics
  • core: 
    • add undecorated classes migration schematic
  • forms:
    • formControlName also accepts a number
  • compiler:
    • allow selector-less directives as base classes in View Engine

Performance Improvements

  • ivy:
    • auto-call select(0) for non-empty views only
    • avoid first template pass checks during view creation
    • avoid for-of loops at runtime
    • improve NaN checks in change detection
    • interpolation micro-benchmark
    • noop change detection micro-benchmark
    • don’t create holey arrays 
    • read selected index only when need in prop bindings
    • split hooks processing into init and check phases
    • split view processing into render (create) and refresh (update) pass
  • core:
    • make sanitization tree-shakable in Ivy mode

Breaking changes

  • ivy:
    • make Hammer support tree-shakable. Previously, in Ivy applications, Hammer providers were included by default. With this commit, apps that want Hammer support must import HammerModule in their root module.

Angular 9.0.0-next.4

Bug fixes

  • ivy:
    • debug node names should match user declaration
    • ngtsc throws if “flatModuleOutFile” is set to null
    • reset binding index before executing a template in refreshView call
  • ngcc:
    • does not analyze dependencies for non-Angular entry-points

Features

  • ivy:
    • use the schema registry to check DOM bindings
  • core:
    • add undecorated classes with decorated fields schematic

Performance Improvements

  • ivy:
    • minimize writes to the lView[BINDING_INDEX] / binding root 
    • store binding metadata in the ngDevMode only

Angular 9.0.0-next.5

Bug fixes

  • ivy:
    • add missing closure extern for $localize 
    • ensure binding ordering doesn’t mess up when a NO_CHANGE value is encountered 
    • 18n – handle translated text containing HTML comments 
    • ngcc – improve the “ngcc version changed” error message 
    • Prevent errors when querying for elements outside Angular context
  • ngcc:
    • handle compilation diagnostics
  • language-service:
    • create DirectiveKind enum
    • invalidate Reflector caches when the program changes
    • update all files/directories owned by DevInfra to new DevInfra Framework team alias
    • re-add regressed templateUrl tests 
    • use ts.CompletionEntry for completions
  • common:
    • HttpParams fromObject accepts ReadonlyArray

Features

  • ivy:
    • implement $localize() global function
  • language-service:
    • add definitions for templateUrl
  • core:
    • Adds DI support for providedIn: 'platform'|'any' 
    • Introduce TestBed.inject to replace TestBed.get

Performance Improvements

  • ivy:
    • add a microbenchmark for map-based style and class bindings 
    • add a microbenchmark for style and class bindings 
    • add element and text creation benchmark
    • guard directive-related operations with a TNode flag
    • properly initialize global state in the element_text_create benchmark
    • remove renderStringify calls for text nodes creation 
    • remove repeated memory read / write in addComponentLogic 
    • run registerPostOrderHooks in the first template pass only
  • core:
    • Make PlatformLocation tree-shakable

Reverts

  • docs:
    • create Issue and Pull Request markdown doc, explaining automatic locking policy

Breaking changes

  • ivy:
    • This commit removes the public export of hasBeenProcessed()
  • core:
    • Injector.get now accepts abstract classes to return type-safe values. The previous implementation returned any through the deprecated implementation.

Angular 9.0.0-next.6

Bug fixes

  • core:
    • improve the “missing $localize” error message
  • ivy:
    • capture template source mapping details during preliminary analysis 
    • handle expressions in i18n attributes properly
    • i18n – do not generate jsdoc comments for $localize 
    • maintain coalesced listeners order 
    • match class and attribute value without case-sensitivity 
    • node placed in incorrect order inside ngFor with ng-container 
    • restore global state after running refreshView 
    • template compiler should render correct $localize placeholder names 
    • unable to bind to properties that start with class or style 
    • unable to override ComponentFactoryResolver provider in tests 
    • warn instead of throwing for unknown properties
  • service-worker:
    • keep serving clients on older versions if the latest is invalidated
  • ngcc:
    • only back up the original prepublishOnly script and not the overwritten one
  • language-service:
    • Return empty external files during project initialization 
    • Use module resolution cache 

Code Refactoring

  • bazel:
    • remove @angular/bazel protractor rule now provided by @bazel/protractor

Features

  • language-service:
    • add definitions for styleUrls 
    • add a script to rebuild, refresh Angular dist
  • service-worker:
    • recover from EXISTING_CLIENTS_ONLY mode when there is a valid update

Performance Improvements

  • ivy:
    • check for animation synthetic props in dev mode only 
    • introduce a node-based micro-benchmarks harness 
    • replace select instruction with advance
    • run tree benchmark with bundles and ngDevMode off
  • ngcc:
    • process tasks in parallel in async mode

Breaking changes

  • bazel:
    • Angular bazel users using protractor_web_test_suite from @angular/bazel npm package should now switch to the @bazel/protractor npm package.

Angular 9.0.0-next.7

Bug Fixes

  • bazel:
    • ng_package(data) should support non-text files
  • compiler-cli: 
    • fix typo in the diagnostic template info
  • core: 
    • initialize global ngDevMode without top-level side effects
    • make injector.get() return default value with InjectFlags.Self flag
  • ivy: 
    • avoid unnecessary i18n instructions generation for with structural directives
    • correct debug array names
    • DebugNode throws exceptions when querying some properties
    • ensure that window.ng utilities are published when NgModules are used
    • i18n – start generated placeholder name at PH
    • i18n – update the compiler to output MessageIds
    • i18n – use MessageId for matching translations
  • language-service: 
    • Lazily instantiate MetadataResolver
    • Use tsLSHost.fileExists() to resolve modules
  • ngcc:
    • consistently use outer declaration for classes
    • correctly read static properties for aliased classes
    • resolve imports in .d.ts files for UMD/CommonJS bundles
    • support UMD global factory in comma lists

Features

  • bazel:
    • support ts_library targets as entry-points for ng_package
  • core: 
    • add dynamic queries schematic
    • Mark TestBed.get as deprecated
  • ivy: 
    • expose window.ng.getDebugNode helper
    • i18n – add syntax support for $localize metadata block
    • i18n – reorganize entry-points for better reuse
  • language-service: 
    • enable logging on TypeScriptHost
    • provide diagnostic for invalid templateUrls
    • provide diagnostics for invalid styleUrls

Performance Improvements

  • ivy: 
    • avoid metamorphic reads during property binding
    • avoid repeated view reads in pipe instructions
    • avoid repeated LView reads in property instructions
    • avoid unnecessary DOM reads in styling instructions
    • binding update benchmark
    • convert all node-based benchmark to use a testing harness
    • guard listening to outputs with isDirectiveHost
    • initialize TNode inputs/outputs on the first creation pass
    • introduce a benchmark for listeners registration
    • limit TNode.outputs reads
    • run the expanding rows benchmark with es2015
  • language-service:
    • keep analyzedModules cache when source files don’t change

Deprecations

  • core: 
    • TestBed.get function is marked as deprecated, use TestBed.inject instead.

"Top Offshore Development Companies According to SDCR site"

You may also like