'yalc push' does not trigger 'npm prePublishOnly' script.
zanerock opened this issue · 0 comments
zanerock commented
Overview
In the docs, it says that yalc push
is an alias for yalc publish --push
. Except the latter will invoke npm 'prepublishOnly' (and pepare, prepublish, etc.) while the latter does not.
To reproduce
In package.json
define a prepublishOnly
action:
{
...,
"scripts": {
"prepublishOnly": "echo -e "\nHi!\n"
},
...
}
Now you should see:
$ yalc publish --push
Hi!
@foo/bar@1.0.0-beta.93 published in store.
Pushing @foo/bar@1.0.0-beta.93 in /Users/joe/.liq/playground/foo/baz
but
$ yalc push
@foo/bar@1.0.0-beta.93 published in store.
Pushing @foo/bar@1.0.0-beta.93 in /Users/joe/.liq/playground/foo/baz
Solution
yalc push
should behave the same / call the same internal method as yalc publish --push