Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customize Commit message while using npm version patch

Is it possible to customize the commit message while using npm version patch?

I' d like to change it to :up-arrow: @VERSIONNUMBER

like image 458
Stephan Ahlf Avatar asked Jan 05 '16 06:01

Stephan Ahlf


People also ask

Does npm version create a commit?

from-git will try to read the latest git tag, and use that as the new npm version. If run in a git repo, it will also create a version commit and tag. This behavior is controlled by git-tag-version (see below), and can be disabled on the command line by running npm --no-git-tag-version version .

How does npm version work?

It is managed by npm when we install, update, or otherwise change our dependencies. Without a package-lock. json file, when you npm install the dependencies for an existing project, npm will install the latest available version of each dependency allowed by the version prefix in package.

How do I change npm version?

You can downgrade the npm version by specifying a version in the related commands. If you want to downgrade npm to a specific version, you can use the following command: npm install -g npm@[version. number] where the number can be like 4.9. 1 or 8 or v6.

Which of the following commands is used to find the version of npm?

Explanation. Executing $ npm --version command will show the version of npm instance.


1 Answers

Since npm 2.7.4 (and commit 3703b0b, March 2015):

The message in npm version -m <message> is mapped to the message config parameter in .npmrc.

That does not seem to be tied specifically to patch only though.
This test shows a config which modifies the commit message:

sign-git-tag=false
message=":bookmark: %s"

You can try and replace :bookmark: with :up-arrow:.

like image 88
VonC Avatar answered Sep 30 '22 12:09

VonC