code: function validateDependency(packageJson, dependency) {
    const version = findDependency(dependency.package, packageJson);
    if (!version) {
      return;
    }
  
    let major;
    try {
      major = semverUtils.parseRange(version)[0].major;
    }
    catch (exception) {
      console.log('DvhbWebpack: cannot parse ' + dependency.name + ' version which is "' + version + '".');
      console.log('DvhbWebpack might not work properly. Please report this issue at ' + consts.BUGS_URL);
      console.log();
    }
  
    if (major < dependency.from) {
      throw new DvhbWebpackError('DvhbWebpack: ' + dependency.name + ' ' + dependency.from + ' is required, ' +
        'you are using version ' + major + '.');
    }
    else if (major > dependency.to) {
      console.log('DvhbWebpack: ' + dependency.name + ' is supported up to version ' + dependency.to + ', ' +
        'you are using version ' + major + '.');
      console.log('DvhbWebpack might not work properly, report bugs at ' + consts.BUGS_URL);
      console.log();
    }
  }
docs: Check versions of a project dependency.
  
  @param {Object} packageJson package.json.
  @param {Object} dependency Dependency details.