code: function increment(type, version) {
    debug(`incrementing ${version} by ${type}`);
  
    let [major, minor, patch] = version
      .replace('v', '')
      .split('.')
      .map((v) => parseInt(v, 10));
  
    if (major === 0) {
      switch (type) {
        case 'major':
          minor += 1;
          patch = 0;
          break;
        case 'minor':
          patch += 1;
          break;
        case 'patch':
          patch += 1;
          break;
        default:
          throw new Error('unrecognized change type');
      }
    }
    else {
      switch (type) {
        case 'major':
          major += 1;
          minor = 0;
          patch = 0;
          break;
        case 'minor':
          minor += 1;
          patch = 0;
          break;
        case 'patch':
          patch += 1;
          break;
        default:
          throw new Error('unrecognized change type');
      }
    }
  
    return `${major}.${minor}.${patch}`;
  }
docs: /* eslint-disable complexity 
  Increments a semver
  @param {string} type
  @param {string} version
  @returns {string}