Comparing version 1.5.1 to 1.5.2
const git = require('simple-git')() | ||
exports.git = require('simple-git')() | ||
const getRepo = async () => { | ||
const remotes = await git.getRemotes(true) | ||
exports.getRepo = async () => { | ||
const remotes = await exports.git.getRemotes(true) | ||
const gh = remotes.find((remote) => remote.refs.push.includes('github.com')) | ||
const regexp = RegExp(/github.com[/:](.*?)\/(.*?)\.git$/) | ||
const regexp = RegExp(/github.com[/:](.*?)\/(.*?)(\.git$|$)/) | ||
@@ -17,9 +18,9 @@ const matches = regexp.exec(gh.refs.push) | ||
module.exports.getInfo = async () => { | ||
exports.getInfo = async () => { | ||
const info = {} | ||
const status = await git.status() | ||
const status = await exports.git.status() | ||
info.branch = status.current | ||
const log = await git.log() | ||
const log = await exports.git.log() | ||
@@ -29,3 +30,3 @@ info.hash = log.latest.hash | ||
info.repo = await getRepo() | ||
info.repo = await exports.getRepo() | ||
@@ -32,0 +33,0 @@ console.log(info) |
{ | ||
"name": "hukum", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "An NPM module that displays Github Action progress in the terminal and aims to improve your development experience by printing status in realtime.", | ||
@@ -17,3 +17,3 @@ "keywords": [ | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 0" | ||
"test": "nyc --reporter=lcov --reporter=text mocha" | ||
}, | ||
@@ -37,4 +37,8 @@ "author": "abskmj@gmail.com", | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"mocha": "^8.2.0", | ||
"nyc": "^15.1.0", | ||
"sinon": "^9.2.1", | ||
"standard": "^14.3.4" | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
   | ||
   [](https://github.com/abskmj/hukum) | ||
@@ -64,3 +64,11 @@ # Hukum - Displays Github Action progress in terminal | ||
# Changelog | ||
The changelog is available at [CHANGELOG.md](CHANGELOG.md) | ||
# Sponsor / Support | ||
If you find the project interesting or helpful, please consider sponsoring or supporting it at [github.com](https://github.com/abskmj/hukum). | ||
# Links | ||
- [NPM Repository](https://www.npmjs.com/package/hukum) | ||
- [Changelog](https://github.com/abskmj/hukum/releases) | ||
- [Report an issue](https://github.com/abskmj/hukum/issues) | ||
- [Source Code](https://github.com/abskmj/hukum) | ||
- [License](https://github.com/abskmj/hukum/blob/master/LICENSE) | ||
- [Sponsor](https://github.com/abskmj/hukum) |
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
91638
214
0
73
5