Check on the latest available versions

We will leverage npm CLI tool to discover the latest available versions of Angular Material:

  1. Execute npm info @angular/material and observe the output:
{ 
name: '@angular/material',
description: 'Angular Material',
'dist-tags': { latest: '5.0.0' },
versions:
[ ...
'5.0.0-rc.0',
'5.0.0-rc.1',
'5.0.0-rc.2',
'5.0.0-rc.3',
'5.0.0-rc0',
'5.0.0' ],
...
time: {
created: ...
'5.0.0-rc0': '2017-11-06T20:15:29.863Z',
'5.0.0-rc.1': '2017-11-21T00:38:56.394Z',
'5.0.0-rc.0': '2017-11-27T19:21:19.781Z',
'5.0.0-rc.2': '2017-11-28T00:13:13.487Z',
'5.0.0-rc.3': '2017-12-05T21:20:42.674Z',
'5.0.0': '2017-12-06T20:19:25.466Z'
}

You can observe that, combined with the time information found deeper in the output, since the 5.0.0-rc0 release 5 new releases have been pushed, the final version is the major 5.0.0 release of the library.

If there are other major versions of the Material library available, such as 6.0.0, you should still stick to the 5.x.x version, since our @angular/core version is at 5.x.x. As rule of thumb, you should aim to keep Angular and Material on the same major versions.
  1. Research the latest available versions of @angular/core,  @angular/animations@angular/cdk, @angular/flex-layout, @angular/material, and hammerjs
  2. To reduce the amount of information you need to weed through, execute npm info <package-name> versions for each package
  3. Document your findings in a table similar to the following; we'll discuss how to determine your target version here:
Package Current Latest Target
@angular/core 5.0.0 5.1.0 5.0.0
@angular/animations 5.0.0 5.1.0 5.0.0
@angular/cdk 5.0.0-rc0 5.0.0 5.0.0
@angular/flex-layout 2.0.0-beta.10-4905443 2.0.0-rc.1 2.x.x
@angular/material 5.0.0-rc0 5.0.0 5.0.0
hammerjs 2.0.8 2.0.8 2.x.x

 

Research results reveal that a new minor version of Angular was released, which is useful information to have. In determining your target version, stay conservative. Follow the following guidance:

  • Do not update Angular components while updating Material
  • If you intended to also update Angular components, do it in separate phases and ensure that you execute your tests after each individual phase
  • Update any Beta or RC package to its latest available version
  • When new versions of packages are available, stay within the same Major release of the package
  • Adhere to these guidelines, unless the documentation suggests otherwise
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.17.27