generators/lib/drupalProjectVersion.js
function toDrupalMajorVersion(version) {
    var regex = /^(\d+)\.\d+\.[x\d+]/;
    var match = version.match(regex)
    if (match) {
      return match[1] + '.x';
    }

    return version;
  }
function toDrupalMajorVersion(version) {
    var regex = /^(\d+)\.\d+\.[x\d+]/;
    var match = version.match(regex)
    if (match) {
      return match[1] + '.x';
    }

    return version;
  }
function toDrupalMajorVersion ( version ) { var regex = / ^(\d+)\.\d+\.[x\d+] / ; var match = version . match ( regex ) if ( match ) { return match [ 1 ] + '.x' ; } return version ; }
The Drupal update system uses a pre-semver approach of version numbering.

Major versions must be in the form of "8.x", as opposed to other semver
ranges or version numbers.
The Drupal update system uses a pre - semver approach of version numbering .