import { version as nodeVersion } from 'process'

import readPkgUp from 'read-pkg-up'

// Caches it.
// TODO: use async instead
const {
  pkg: { version: autoserverVersion },
} = readPkgUp.sync()

// Retrieve environment-specific versions
export const getVersionsInfo = function() {
  const autoserver = `v${autoserverVersion}`

  return { node: nodeVersion, autoserver }
}

import { version as nodeVersion } from 'process'

import readPkgUp from 'read-pkg-up'

// Caches it.
// TODO: use async instead
const {
  package: { version: autoserverVersion },
} = readPkgUp.sync()

// Retrieve environment-specific versions
export const getVersionsInfo = function() {
  const autoserver = `v${autoserverVersion}`

  return { node: nodeVersion, autoserver }
}

Rename property for upgrade of read-pkg-up
Rename property for upgrade of read-pkg-up
