Skip to content

Commit

Permalink
Move code
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jan 9, 2022
1 parent 6ec04a6 commit 0059bb8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/top/system/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ const getSystemVersions = async function (combinations, cwd) {
return Object.assign({}, ...versions, { Spyd: spydVersion })
}

// TODO: use static JSON imports once those are possible
const getSpydVersion = async function () {
const cwd = dirname(fileURLToPath(import.meta.url))
const {
packageJson: { version },
} = await readPackageUp({ cwd, normalize: false })
return version
}

const getRunnersVersions = async function (combinations, cwd) {
const ids = [...new Set(combinations.map(getRunnerId))]
return await Promise.all(
Expand Down Expand Up @@ -98,3 +89,12 @@ ${error.message}`,
)
}
}

// TODO: use static JSON imports once those are possible
const getSpydVersion = async function () {
const cwd = dirname(fileURLToPath(import.meta.url))
const {
packageJson: { version },
} = await readPackageUp({ cwd, normalize: false })
return version
}

0 comments on commit 0059bb8

Please sign in to comment.