npm/npm — pull request #6404 by TheLudd (2014-10-05 11:46:10+00:00)
Title: Run script arguments are no longer passed to pre and post scripts

When the arguments after "--" are joined with the command to be
executed, a check is added to make sure that they are only added to
the exact comman specified by the user.

Rewrote assert function for run-script tests.

The assert function for run script previously only checked the last
line of output which made it difficult to test pre and posts scripts.
This change takes all output lines, removes empty lines and lines starting
with '>' (npm output) and joins the remainder with ';'. All tests still
pass unchanged and it should now be possible to test logging in pre and post
scripts where the output would be "pre script output;main output;post
script output".

Added tests for pre and post scripts.

Added tests for what has worked before but has not been tested. (that
pre and post scripts are executed along with the main script).

Added test running pre script explicitly with arguments

Test to make sure that if a pre script is exeuted explicitly, e.g.
"npm run prestart" it shoul accept arguments from the command line.

Added documentation for npm run-script.