version(str, flags, description) {
    if (str === undefined) return this._version;
    this._version = str;
    flags = flags || '-V, --version';
    description = description || 'output the version number';
    const versionOption = this.createOption(flags, description);
    this._versionOptionName = versionOption.attributeName();
    this._registerOption(versionOption);

    this.on('option:' + versionOption.name(), () => {
      this._outputConfiguration.writeOut(`${str}\n`);
      this._exit(0, 'commander.version', str);
    });
    return this;
  }
Get or set the program version.

This method auto-registers the "-V, --version" option which will print the version number.

You can optionally supply the flags and description to override the defaults.

@param {string} [str]
@param {string} [flags]
@param {string} [description]
@return {(this | string | undefined)} `this` command for chaining, or version string if no arguments