v3.0.0
Changed
-
In some cases, npm itself can end up being installed somewhere in your dependency tree (for example, older versions of
ember-cliinstall it), resulting in itsnpmscript shadowing the version you‘re actually using. This means anynpm run …ornpm install …you have in your lifecycle scripts (like those frompostinstall-build) may end up running an unexpected, incompatible version of npm.To solve this,
postinstall-buildwill now execute$npm_execpathinstead of justnpmwhen the user agent is npm. (If your build command starts withnpm run …and you want to fix that, too, you can use the--scriptoption, andpostinstall-buildwill make sure to use the correctnpmreference for you.)This is technically backwards incompatible, but should only be breaking in extremely rare cases that were questionable to begin with.
Added
- The
postinstall-buildscript accepts a new flag--only-as-dependency. When present, it will skip building when you do annpm installin the package‘s own directory (for development). The build will only occur if the package is being installed as a dependency (and the specified build artifact is missing). Fixes #13.