Skip to content

v3.0.0

Choose a tag to compare

@exogen exogen released this 25 Mar 00:58
· 36 commits to master since this release

Changed

  • In some cases, npm itself can end up being installed somewhere in your dependency tree (for example, older versions of ember-cli install it), resulting in its npm script shadowing the version you‘re actually using. This means any npm run … or npm install … you have in your lifecycle scripts (like those from postinstall-build) may end up running an unexpected, incompatible version of npm.

    To solve this, postinstall-build will now execute $npm_execpath instead of just npm when the user agent is npm. (If your build command starts with npm run … and you want to fix that, too, you can use the --script option, and postinstall-build will make sure to use the correct npm reference 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-build script accepts a new flag --only-as-dependency. When present, it will skip building when you do an npm install in 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.