diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 251039a..fad9912 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: # - name: Report # run: mkdir -p coverage && npx nyc report --reporter=text-lcov > coverage/lcov.info # - name: Coverage - # uses: coverallsapp/github-action@master + # uses: coverallsapp/github-action@main # with: # github-token: ${{ secrets.GITHUB_TOKEN }} - name: Release diff --git a/bin/index.js b/bin/index.js index d4e51e3..0495d38 100755 --- a/bin/index.js +++ b/bin/index.js @@ -2,12 +2,12 @@ 'use strict' const emailRegex = require('email-regex') -const existsFile = require('exists-file') const jsonFuture = require('json-future') const colors = require('picocolors') const execa = require('execa') const path = require('path') const mri = require('mri') +const fs = require('fs') const BOT_NAMES = ['ImgBotApp', 'greenkeeper', 'noreply', '\\bbot\\b', 'Travis CI'] @@ -81,7 +81,7 @@ const extractContributors = stdout => { } const getContributors = async () => { - if (!(await existsFile('.git'))) { + if (!fs.existsSync('.git')) { return processError({ message: 'Ops, not git directory detected!' }) @@ -89,8 +89,7 @@ const getContributors = async () => { const { print, cwd, save, ignorePattern } = flags const pkgPath = path.join(cwd, 'package.json') - const cmd = 'git shortlog -sne HEAD' - const { stdout, stderr } = await execa.command(cmd, { + const { stdout, stderr } = await execa.command('git shortlog -sne HEAD', { cwd, shell: true, stdio: ['ignore', 'pipe', 'pipe'] diff --git a/package.json b/package.json index d6adbdc..ada1dca 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,7 @@ ], "dependencies": { "email-regex": "~4.0.0", - "execa": "~5.1.0", - "exists-file": "~3.0.2", + "execa": "~5.1.1", "json-future": "~2.2.18", "mri": "~1.2.0", "picocolors": "~1.0.0" @@ -60,13 +59,13 @@ "devDependencies": { "@commitlint/cli": "latest", "@commitlint/config-conventional": "latest", + "@ksmithut/prettier-standard": "latest", "c8": "latest", "ci-publish": "latest", "conventional-github-releaser": "latest", "finepack": "latest", "nano-staged": "latest", "npm-check-updates": "latest", - "prettier-standard": "latest", "simple-git-hooks": "latest", "standard": "latest", "standard-markdown": "latest", @@ -101,8 +100,9 @@ ] }, "nano-staged": { - "*.js,!*.min.js,": [ - "prettier-standard" + "*.js": [ + "prettier-standard", + "standard --fix" ], "*.md": [ "standard-markdown"