Welcome to the Linux Foundation Forum!

In Chapter 6 must the Semver range ^6.2.1 be considered the same as 6.x.x?

Hello,
in Chapter 6, Packages & Dependencies - Understanding Semver, there is the following text explaining Semver range.

Using a caret on version numbers is basically the same as using an x in the MINOR and PATCH positions, so ^6.2.1 is the same as 5.x.x.

Is 5.x.x correct? I assume 5.x.x is a typo.
Must not that be 6.x.x?

Best,
Zorawar

Best Answer

  • zorawar
    zorawar Posts: 14
    Answer ✓

    Hi,
    after completing Chapter 6 labs I understand this better. It should be 6.x.x.
    The result of running the following
    node -p "const semver = require('semver'); console.log(new semver.Range('^6.2.1').range)"
    is this - >=6.2.1 <7.0.0-0.

    Hopefully, the typo can be corrected in the lesson.

Answers

Categories

Upcoming Training