From 80bc998ef3d85f570be8d644d93f3ee6883ab2bc Mon Sep 17 00:00:00 2001 From: Daniel Emod Kovacs Date: Sun, 8 Mar 2020 01:15:25 +0100 Subject: [PATCH] chore(gatsby-core-utils): get-gatsby-version to TS --- .../src/{get-gatsby-version.js => get-gatsby-version.ts} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename packages/gatsby-core-utils/src/{get-gatsby-version.js => get-gatsby-version.ts} (72%) diff --git a/packages/gatsby-core-utils/src/get-gatsby-version.js b/packages/gatsby-core-utils/src/get-gatsby-version.ts similarity index 72% rename from packages/gatsby-core-utils/src/get-gatsby-version.js rename to packages/gatsby-core-utils/src/get-gatsby-version.ts index f9d4097f3fd6a..ec32804a9467a 100644 --- a/packages/gatsby-core-utils/src/get-gatsby-version.js +++ b/packages/gatsby-core-utils/src/get-gatsby-version.ts @@ -1,6 +1,6 @@ import path from "path" -module.exports = () => { +const getGatsbyVersion = (): string => { try { return require(path.join( process.cwd(), @@ -12,3 +12,5 @@ module.exports = () => { return `` } } + +export default getGatsbyVersion