Skip to content

Commit

Permalink
fix(deps): update dependency git-user-info to v2 (#20)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cody Olsen <81981+stipsan@users.noreply.github.com>
  • Loading branch information
renovate[bot] and stipsan authored Nov 15, 2022
1 parent 2065027 commit 71ea801
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 32 deletions.
37 changes: 10 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"get-it": "^7.0.2",
"get-latest-version": "^4.0.0",
"git-remote-origin-url": "^3.1.0",
"git-user-info": "^1.0.1",
"git-user-info": "^2.0.3",
"github-url-to-object": "^4.0.6",
"inquirer": "^8.2.5",
"meow": "^9.0.0",
Expand Down
7 changes: 3 additions & 4 deletions src/util/user.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import path from 'path'
import xdgBasedir from 'xdg-basedir'
// @ts-expect-error missing types
import gitUserInfo from 'git-user-info'
import {getGitUserInfo as _getGitUserInfo} from 'git-user-info'
import {validate as isValidEmail} from 'email-validator'
import {readJsonFile} from './files'
import {request} from './request'
Expand Down Expand Up @@ -98,8 +97,8 @@ async function getSanityUserInfo(): Promise<User | undefined> {
}
}

function getGitUserInfo(): User | undefined {
const user = gitUserInfo()
async function getGitUserInfo(): Promise<User | undefined> {
const user = await _getGitUserInfo()
return user ? {name: user.name, email: user.email} : undefined
}

Expand Down

0 comments on commit 71ea801

Please sign in to comment.