New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gitsu-cli

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitsu-cli - npm Package Compare versions

Comparing version
1.0.6
to
1.0.7
+12
-31
.github/workflows/build.yml

@@ -11,4 +11,2 @@ name: build

contents: write
pull-requests: read
statuses: write

@@ -19,39 +17,22 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npm run build
- run: npm run lint
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Lint
id: lint
run: npm run lint
release:
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Semantic Release
id: release
uses: cycjimmy/semantic-release-action@v4
node-version: 22
- run: npm ci
- run: npm run build
- run: npx semantic-release
env:

@@ -58,0 +39,0 @@ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@@ -0,1 +1,8 @@

## [1.0.7](https://github.com/jamieweavis/gitsu/compare/v1.0.6...v1.0.7) (2025-04-05)
### Bug Fixes
* handle git exec asynchronously ([cfcdb63](https://github.com/jamieweavis/gitsu/commit/cfcdb630fbd680759278f47a98f4481766d6ff0e))
## [1.0.6](https://github.com/jamieweavis/gitsu/compare/v1.0.5...v1.0.6) (2025-03-27)

@@ -2,0 +9,0 @@

{
"name": "gitsu-cli",
"version": "1.0.5",
"version": "1.0.6",
"description": "Command line util for quickly & easily switching git identities",

@@ -63,3 +63,2 @@ "author": "Jamie Weavis",

"lint-staged": "^15.5.0",
"semantic-release": "^24.2.3",
"ts-node": "^10.9.2",

@@ -66,0 +65,0 @@ "ts-node-dev": "^2.0.0"

@@ -16,9 +16,8 @@ "use strict";

const node_child_process_1 = require("node:child_process");
const node_util_1 = require("node:util");
const log_symbols_1 = __importDefault(require("log-symbols"));
const execPromise = (0, node_util_1.promisify)(node_child_process_1.exec);
exports.default = (user) => __awaiter(void 0, void 0, void 0, function* () {
try {
// If user is in a git repo, save user to local git config
yield (0, node_child_process_1.exec)(`cd ${process.cwd()} && git config user.name "${user.name}" && git config user.email "${user.email}"`);
// Save user to global git config
yield (0, node_child_process_1.exec)(`git config --global user.name "${user.name}" && git config --global user.email "${user.email}"`);
yield execPromise(`git config --global user.name "${user.name}" && git config --global user.email "${user.email}"`);
return true;

@@ -25,0 +24,0 @@ }

{
"name": "gitsu-cli",
"version": "1.0.6",
"version": "1.0.7",
"description": "Command line util for quickly & easily switching git identities",

@@ -63,3 +63,2 @@ "author": "Jamie Weavis",

"lint-staged": "^15.5.0",
"semantic-release": "^24.2.3",
"ts-node": "^10.9.2",

@@ -66,0 +65,0 @@ "ts-node-dev": "^2.0.0"

import { exec } from 'node:child_process';
import { promisify } from 'node:util';
import logSymbols from 'log-symbols';
const execPromise = promisify(exec);
import type { IUser } from '../types';

@@ -8,8 +11,3 @@

try {
// If user is in a git repo, save user to local git config
await exec(
`cd ${process.cwd()} && git config user.name "${user.name}" && git config user.email "${user.email}"`,
);
// Save user to global git config
await exec(
await execPromise(
`git config --global user.name "${user.name}" && git config --global user.email "${user.email}"`,

@@ -16,0 +14,0 @@ );

<svg viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg"><path d="m1.072 17.668 2.048-1.434 6.31 9.011-2.048 1.434z" fill="#42484c"/><path d="m3.897 16.909-2.457 1.721c-.225.158-.539.102-.696-.123-.158-.225-.102-.539.123-.696l2.457-1.721c.225-.158.539-.102.696.123.158.225.103.538-.123.696zm6.555 7.618-4.096 2.868c-.225.158-.539.102-.696-.123-.158-.225-.102-.539.123-.696l4.096-2.868c.225-.158.539-.102.696.123.158.225.102.538-.123.696z" fill="#66757f"/><path d="m6.971 26.966 2.868-2.008 5.161 7.373-2.867 2.008zm-4.752-7.66 2.048-1.434.573.82-2.048 1.433zm1.147 1.638 2.048-1.434.573.82-2.048 1.434zm1.147 1.639 2.048-1.434.574.82-2.048 1.434zm1.147 1.639 2.048-1.434.574.819-2.048 1.434z"/><path d="m23.35 20.14s3.921 3.102 2.223 6.86c.001 0-4.541-2.318-2.223-6.86z" fill="#292f33"/><path d="m25.967 25.593c.191-1.638-.552-3.065-1.296-4.05-.765-.365-1.418-.543-1.667-.602-.04.111-.061.215-.093.324.139 2.639 1.694 3.814 3.056 4.328z"/><g fill="#292f33"><path d="m23 20s4.905.968 5.112 5.086c0 0-5.099.013-5.112-5.086zm9 16v-2c0-3.314-2.685-6-6-6h-16c-3.313 0-6 2.686-6 6v2z"/><path d="m12.799 26.751h10.403v4.249h-10.403z"/><path d="m14 27h8s-1.018 7-4 7-4-7-4-7"/><path d="m13.64 30.038c1.744 1.268 2.848 1.963 4.36 1.963s2.615-.696 4.359-1.963v-5.749h-8.72v5.749z"/></g><path d="m13.632 25.973c1.216 1.374 2.724 1.746 4.364 1.746 1.639 0 3.146-.373 4.363-1.746v-3.491h-8.728v3.491z"/><path d="m11.444 15.936c0 1.448-.734 2.622-1.639 2.622s-1.639-1.174-1.639-2.622.734-2.623 1.639-2.623c.905-.001 1.639 1.174 1.639 2.623m16.389 0c0 1.448-.733 2.622-1.639 2.622-.905 0-1.639-1.174-1.639-2.622s.733-2.623 1.639-2.623c.906-.001 1.639 1.174 1.639 2.623" fill="#292f33"/><path d="m9.477 16.54c0-7.54 2.523-11.54 8.523-11.54s8.522 4 8.522 11.54c0 5.821-3.815 10.54-8.522 10.54s-8.523-4.719-8.523-10.54" fill="#292f33"/><path d="m11 28c0 1 1 3 3 5 1.581 1.581 2.719 3 2.719 3 .797-.005 1.9-.004 2.73-.001-.891-2.02-2.477-3.471-3.279-4.273-1-1-3.17-2.726-3.17-4.726 0-1-2 1-2 1" fill="#66757f"/><path d="m16.719 36 2.724-.001c-.512-1.161-1.251-2.127-1.94-2.897-.505.613-.992 1.346-1.405 2.16.388.449.621.738.621.738z" fill="#292f33"/><path d="m25 28c0 1-1 3-3 5-1.581 1.581-2.5 3-2.5 3-.902-.004-1.418-.002-3 0 .891-2.02 2.528-3.472 3.33-4.274 1-1 3.17-2.726 3.17-4.726 0-1 2 1 2 1" fill="#66757f"/><path d="m18 13.711c-2.995 0-8.116-2.044-7.064 1.98.614 2.348 1.417 2.881 3.475 2.606 2.124-.283 1.991-1.016 3.495-1.016s1.56.733 3.684 1.016c2.058.274 2.861-.258 3.475-2.606 1.051-4.024-4.07-1.98-7.065-1.98z" fill="#ffdc5d"/><path d="m14 17c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1s1 .45 1 1v1c0 .55-.45 1-1 1m8 0c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1s1 .45 1 1v1c0 .55-.45 1-1 1" fill="#662113"/></svg>