Releases: exogen/postinstall-build
v5.0.3
v5.0.2
v5.0.1
v5.0.0
Added
- Support for installing only the necessary build dependencies! #20
- New
--verbose
option. When enabled,postinstall-build
will print informational messages about what it is doing (and why) at each step. Overrides the--silent
option (the last one specified wins). #21 - A warning is now printed if a potentially incompatible version of npm is detected. There are many broken versions of npm that do not work with
postinstall-build
😢 – this should help explain why. #23
Changed
- If
postinstall
was triggered fromnpm install
(no args) being run in the package itself, and we expect it to have already installeddevDependencies
, then the installation step will be skipped completely. Previously,npm install --only=dev
was run, which should have been a no-op anyway. - Previously, if no build artifact was supplied, an exception was thrown. Now the error is logged and the process exits with status code 1. This should effectively be the same as before, but the exact behavior is consistent with the error handling in other steps.
v4.1.0
v4.0.0
Changes
package.json:bin
now points to a different file thanpackage.json:main
. This means that doingrequire('postinstall-build')
, while never officially supported, no longer runs thepostinstall-build
script (instead, it exports the function that runs it). This is to protect against misbehaving dependencies that may import modules they happen to find undernode_modules
and expect there to be no side effects. See #18.
v3.0.1
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-cli
install it), resulting in itsnpm
script 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-build
will now execute$npm_execpath
instead of justnpm
when the user agent is npm. (If your build command starts withnpm run …
and you want to fix that, too, you can use the--script
option, andpostinstall-build
will make sure to use the correctnpm
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 annpm 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.