sindresorhus / np

A better `npm publish`
MIT License
7.56k stars 299 forks source link

Issue with Dependency Packages on publish #731

Open ganeshsacharya opened 9 months ago

ganeshsacharya commented 9 months ago

Description

Assume there is a npm package which can only work for another package(so as to say a helper package), also it has a postinstall script which checks the parent package for something. In such cases on command np the workflow fails as the postinstall will never succeed.

Steps to reproduce

  1. Go to @njs2/sql
  2. check its postinstall script which np will find and execute on Step 4 (Installing dependencies using npm)
  3. It will fail

Expected behavior

Why not have an option to not execute postinstall script or any script which is not really needed for np to go through?

Environment

np - 7.7.0 Node.js - any npm - any Git - any OS - any