mookme icon indicating copy to clipboard operation
mookme copied to clipboard

v2.5.1 has a regression

Open rstreefland opened this issue 1 year ago • 6 comments

Hi, I've noticed that v2.5.1 seems to have a regression that is caused by this commit.

On MacOS Sonoma (14.1.1) I get this error:

git commit -m test --allow-empty
error: required option '-t, --type <type>' not specified

The error goes away if I remove the -- that was added to the command in the pre-commit hook:

npx @escape.tech/mookme -- run --type pre-commit --args "$1"%

rstreefland avatar Jul 18 '24 13:07 rstreefland

This is happening to me using the pre-commit.json file. I am not sure if I need to add a flag to the init command

gorillanieto avatar Jul 18 '24 20:07 gorillanieto

I am new to mookme (coming from Husky), installed the latest version, followed the docs but ran into the same problem with the pre-commit. Glad its not just me.

rezelute avatar Jul 20 '24 22:07 rezelute

this is what worked for me: root_dir

rm -rf node_modules
rm -rf ./git/hooks

went to package.json and updated "postinstall": "npx @escape.tech/[email protected] init <rest of your settings> (needed to pin to 2.5.0)

then npm i and the error has gone away.

alanmynah avatar Aug 13 '24 09:08 alanmynah

My team is seeing the same issue

zackrossman avatar Aug 13 '24 20:08 zackrossman

Hello !

I didn't realize how breaking this change was... Sorry for the disagreement. My understanding is that npm 10 introduces the breaking change of the "--".

I'll need to figure out something for supporting both npm < 10 and npm 10. In the meantime I would suggest applying @alanmynah 's fix or upgrade to npm 10 ?

LMaxence avatar Aug 19 '24 18:08 LMaxence

I'm on npm version 10.2.3 and still seeing this issue

uncledru avatar Sep 11 '24 22:09 uncledru