Skip to content

Commit

Permalink
chore(gatsby-cli): Convert util/version to typescript (#22176)
Browse files Browse the repository at this point in the history
* chore(gatsby-cli): Convert util/version to typescript

* chore(gatsby-cli): Use gatsby-core-utils
  • Loading branch information
mottox2 authored Mar 14, 2020
1 parent c9e327c commit 4d25f4a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
25 changes: 0 additions & 25 deletions packages/gatsby-cli/src/util/version.js

This file was deleted.

14 changes: 14 additions & 0 deletions packages/gatsby-cli/src/util/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { setDefaultTags } from "gatsby-telemetry"
import { getGatsbyVersion } from "gatsby-core-utils"

export const getLocalGatsbyVersion = (): string => {
const version = getGatsbyVersion()

try {
setDefaultTags({ installedGatsbyVersion: version })
} catch (e) {
// ignore
}

return version
}

0 comments on commit 4d25f4a

Please sign in to comment.