'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var path = require('path');

function getPkgVersion() {
  const version = process.env.npm_package_version;
  if (!version) {
    try {
      return require(path.resolve("package.json")).version;
    } catch {
    }
  }
  return version;
}

exports.getPkgVersion = getPkgVersion;
