conventional-changelog / standard-version

:trophy: Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org
ISC License
7.7k stars 796 forks source link

-t with empty string is ignored when using pnpm #899

Open OliverDudgeon opened 2 years ago

OliverDudgeon commented 2 years ago

Describe the bug

Current behavior I use this command

pnpm dlx standard-version --dry-run -t "" 

I'd expect the resulting git tag to have no "v" at the start (as per the README) but it does: ✔ tagging release v0.1.2

Environment

trongthanh commented 2 years ago

I'd like to add that, this only happens with pnpm dlx and pnpm exec (standard-version installed locally). These cases works as expected:

P.S 1: Because it doesn't honor the version prefix param, pnpm dlx standard-version -t "" will collect all features and fixes from the whole repo history.

P.S 2: I suspect that it has to do with that empty string -t "". If I set -t "ver", the tag is properly prefixed.

Updated:

Playing around, I found these work-around the empty string param passed through pnpm dlx and pnpm exec:

pnpm dlx standard-version --dry-run -t '""'
pnpm dlx standard-version --dry-run -t "''"
pnpm dlx standard-version --dry-run -t \"\"

Maybe this is a bug at pnpm

Environment:

TimothyJones commented 2 years ago

I agree, this sounds like a pnpm bug.