Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'yalc push' does not trigger 'npm prePublishOnly' script. #205

Open
zanerock opened this issue Sep 26, 2022 · 0 comments
Open

'yalc push' does not trigger 'npm prePublishOnly' script. #205

zanerock opened this issue Sep 26, 2022 · 0 comments

Comments

@zanerock
Copy link

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/[email protected] published in store.
Pushing @foo/[email protected] in /Users/joe/.liq/playground/foo/baz

but

$ yalc push
@foo/[email protected] published in store.
Pushing @foo/[email protected] in /Users/joe/.liq/playground/foo/baz

Solution

yalc push should behave the same / call the same internal method as yalc publish --push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant