Socket
Socket
Sign inDemoInstall

gitmoji-cli

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitmoji-cli - npm Package Compare versions

Comparing version 8.2.3 to 8.3.0

3

lib/commands/commit/index.js

@@ -5,3 +5,3 @@ import inquirer from 'inquirer';

import COMMIT_MODES from "../../constants/commit.js";
import withHook, { registerHookInterruptionHandler, cancelIfNeeded } from "./withHook/index.js";
import withHook, { registerHookInterruptionHandler, cancelIfNeeded, skipIfGitmojiIsPresent } from "./withHook/index.js";
import withClient from "./withClient/index.js";

@@ -24,2 +24,3 @@ import prompts from "./prompts.js";

if (options.mode === COMMIT_MODES.HOOK) {
skipIfGitmojiIsPresent(options);
registerHookInterruptionHandler();

@@ -26,0 +27,0 @@ return cancelIfNeeded().then(() => promptAndCommit(options));

import { execa } from 'execa';
import fs from 'fs';
import getDefaultCommitContent from "../../../utils/getDefaultCommitContent.js";
const withHook = answers => {

@@ -48,2 +49,13 @@ try {

export const cancelIfNeeded = () => cancelIfAmending().then(cancelIfRebasing);
export const skipIfGitmojiIsPresent = options => {
const {
title
} = getDefaultCommitContent(options);
const UNICODE_EMOJI_REGEX = /[\p{Extended_Pictographic}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}]/u;
const SHORTCODE_EMOJI_REGEX = /:[a-z_]+:/;
if (!title) return;
if (UNICODE_EMOJI_REGEX.test(title) || SHORTCODE_EMOJI_REGEX.test(title)) {
process.exit(0);
}
};
export default withHook;
{
"name": "gitmoji-cli",
"version": "8.2.3",
"version": "8.3.0",
"type": "module",

@@ -51,7 +51,7 @@ "description": "A gitmoji client for using emojis on commit messages.",

"fuse.js": "6.6.2",
"inquirer": "^9.2.3",
"inquirer": "^9.2.6",
"inquirer-autocomplete-prompt": "^3.0.0",
"meow": "^11.0.0",
"node-fetch": "^3.3.1",
"ora": "^6.3.0",
"ora": "^6.3.1",
"path-exists": "^5.0.0",

@@ -64,5 +64,5 @@ "proxy-agent": "5.0.0",

"@babel/cli": "7.21.5",
"@babel/core": "7.21.8",
"@babel/core": "7.22.1",
"@babel/plugin-syntax-import-assertions": "^7.18.6",
"@babel/preset-env": "7.21.5",
"@babel/preset-env": "7.22.2",
"@babel/preset-flow": "7.21.4",

@@ -73,7 +73,7 @@ "babel-plugin-module-extension-resolver": "^1.0.0-rc.2",

"codecov": "3.8.3",
"eslint": "8.40.0",
"eslint": "8.41.0",
"eslint-plugin-ft-flow": "2.0.3",
"eslint-plugin-immutable": "1.0.0",
"flow-bin": "^0.206.0",
"hermes-eslint": "0.11.1",
"flow-bin": "^0.207.0",
"hermes-eslint": "0.12.0",
"husky": "8.0.3",

@@ -86,3 +86,3 @@ "jest": "29.5.0",

"prettier": "2.8.8",
"turbo": "^1.9.4"
"turbo": "^1.9.9"
},

@@ -89,0 +89,0 @@ "jest": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc