Commit Graph

1254 Commits

Author SHA1 Message Date
Robert Kowalski
80282edb6c npm-run: fix commands with whitespaces on windows
Fixes #4403
2014-01-11 12:44:24 -05:00
Evan Lucas
8b4bb4815d On a 404, specify the parent package if it exists
Fixes #4340. The error gets a `parent` property, and the message output displays
that.
2013-12-22 19:59:54 -05:00
Quinn Slack
d7e67bf0d9 Add --ignore-scripts option.
It causes all npm commands to no longer run package.json scripts. Most notably,
`npm install --ignore-scripts` will not run preinstall and prepublish scripts.
2013-12-15 20:55:08 -05:00
Robert Kowalski
ec2c50f9bc Alter text, so people will post the full output in issues.
If people would post the full output in issues, it would save us
a lot of time.

Also removed the Google group, as it has no traffic.
2013-11-26 00:41:54 -05:00
Nathan Rajlich
d885f81ec6 lifecycle: proxy the child process' "signal" to npm
This way, if an `npm test` script (or any other lifecycle process) ends
up exiting because of a signal like a SIGSEGV, then npm will exit the same
way (since the `code` will be null when a signal is present), and not
obscure the signal the occurred.

For example, given this `package.json` file:

``` json
{
  "name": "sigsegv",
  "version": "0.0.0",
  "scripts": {
    "test": "node -e 'process.kill(process.pid, \"SIGSEGV\")'"
  }
}
```

Before this patch, npm would obscure the seg fault exit status:

```
$ npm test

> sigsegv@0.0.0 test /Users/nrajlich/t
> node -e 'process.kill(process.pid, "SIGSEGV")'

$ echo $?
0
```

After this patch, the proper signal is relayed to npm, and thus the shell:

```
$ node ../npm/bin/npm-cli.js test

> sigsegv@0.0.0 test /Users/nrajlich/t
> node -e 'process.kill(process.pid, "SIGSEGV")'

Segmentation fault: 11

$ echo $?
139
```
2013-11-10 12:48:29 -08:00
Robert Kowalski
baafe15bd1 Tell users it's not our fault when no compatible versions are found
Fixes #3810
2013-11-02 18:37:44 +01:00
isaacs
5b95751baf scripts: Only run one script at a time
This prevents the output from build scripts from being comingled with
one another.
2013-10-28 11:18:41 -07:00
Robert Kowalski
bb4d78049e Add better error message for missing package.json
Hopefully this will enable users that are using npm for the
very first time to help themselves.
2013-10-27 20:03:12 +01:00
isaacs
e380dc5aab scripts: Avoid 'weird errors' from numeric codes
Regression introduced by transition to spawn from utils/exec.js
2013-10-23 23:09:46 -07:00
Thom Blake
e6faed80da Add exitCode property
As a polyfill to the node process.exitCode behavior - see
https://github.com/joyent/node/pull/6190
2013-09-13 19:27:06 +01:00
isaacs
6025b1078c add ECONNRESET to 'network issues' category 2013-07-24 14:12:32 -07:00
Robert Kowalski
c8f4100cdb show better error message for proxy users
This will hopefully enable the npm users behind a proxy to help
themselves in case of a proxy/network issue.
2013-07-24 22:45:54 +02:00
Robert Kowalski
dec660c2a1 ls: show git urls in parentheses
If a project specifies git urls for dependencies these are shown
in parentheses after the name@version to make it easier for
users to recognize potential forks of a project.

Fixes #3570
2013-06-25 01:19:08 -04:00
isaacs
81740ce1c1 Separate tar and cache lockfile usage
Folders were getting double-locked, resulting in an unnecessary 1000ms
hang for everything added to cache.  Since we tar things multiple times
(stupidly) this led to about a 5-10s increase in latency for lots of
operations.

Fix that by adding 'tar://' to the start of all the locks created in
lib/utils/tar.js
2013-06-07 13:52:38 -07:00
Robert Kowalski
5cba624236 Use os.EOL instead of custom solutions 2013-06-01 21:04:58 -04:00
Robert Kowalski
82b9e7d1da Show an error message if git is missing, fixes #3297 2013-05-10 17:04:28 -07:00
ForbesLindesay
aacff496ea Remove some unused completions 2013-05-10 15:57:29 -07:00
Schabse Laks
bde3026496 Create missing configured prefix (fixes #3431) 2013-05-10 01:15:43 -04:00
Robert Kowalski
0499e71f76 better error message for proxy users, fixes #3415 2013-05-10 01:12:21 -04:00
isaacs
80d2e4eb64 use 'customFds' instead of 'stdio'
For the good of 0.6
2013-04-29 08:42:19 -07:00
ForbesLindesay
f44b1fd093 replace ./lib/utils/sha.js with sha
closes #3381
2013-04-28 21:20:09 -07:00
isaacs
1ef9748c81 fs WriteStream has destroy(), not close() 2013-04-28 21:14:11 -07:00
Robert Kowalski
8e879f558e remove exec.js, use child_process.execFile
Fixes #3312
2013-04-28 21:06:52 -07:00
isaacs
9385a8584a remove cmd-shim util
Forgot to do this earlier.  It's not used any more, the standalone
package is.
2013-04-04 08:57:00 -07:00
isaacs
66dcf0b2b6 fix 'cb() never called' errors due to v0.10.0 tls bug 2013-03-20 16:47:14 -07:00
isaacs
a37d157d35 exec: Handle spawn errors 2013-03-19 20:55:03 -07:00
isaacs
0b18669e26 Do not suggest publish -f on EPUBLISHCONFLICT
It gives people bad ideas.
2013-02-11 11:58:32 -08:00
isaacs
f468b62f01 Raise error if registry packages lack shasum, or if crypto is not available 2013-02-11 10:13:45 -08:00
isaacs
449d3fecd1 tar.js: Lock the tarballs as well as target folders 2013-02-05 18:36:31 -08:00
isaacs
87899ec660 tar.js: Don't unlock locks we didn't lock 2013-02-05 16:50:32 -08:00
Domenic Denicola
fc13f37bb8 Error out if an installation results in invalid peer dependencies.
Fixes #3079.
2013-01-29 22:55:16 -08:00
isaacs
1ca96790f5 Fix #3092 Exclude readme contents from lifecycle env 2013-01-24 12:07:50 -08:00
isaacs
c716ed61d9 Set PATH in the proper order in lifecycle scripts
Fix #3063
2013-01-16 11:49:05 -08:00
isaacs
f404483426 style 2013-01-14 18:44:38 -08:00
isaacs
e79e774681 git-remotes: Refactor code out of one function
Also, this makes the exec util use the 'close' event instead of 'exit',
since we're assuming that the data is all out by that point.
2013-01-14 17:54:32 -08:00
isaacs
ad8e21fc9d Expose npm bin as env.npm_execpath
This also makes the peer dep tests pass on unix, since the npm bin
location is different.
2013-01-09 11:34:00 -08:00
isaacs
9c63b765a6 Expose node's execPath to scripts
Re: einaros/ws#129
2012-11-08 15:30:06 -08:00
isaacs
9e2fc4ccfd Don't put array configs in the env for scripts
This breaks tests and such, now that the CA has GlobalSign as well
2012-09-09 17:49:23 -07:00
bogushevich
586edf0127 Set https-proxy to http by default 2012-08-19 21:20:07 -07:00
isaacs
76d56d979d Fix #2606 Better error message when not logged in 2012-08-17 15:42:25 -07:00
isaacs
a4a5ba79c1 Don't do the walk-up thing for the global prefix
Fix #2726
2012-08-16 15:29:24 -07:00
isaacs
be6389a0c4 Remove obsolete config stuff 2012-08-14 19:47:43 -07:00
isaacs
d20eb0fcdd Use new npmconf module 2012-08-14 19:47:43 -07:00
Nathan Rajlich
898594413b node exe dir to the PATH for lifestyle scripts
Fixes #2680.
2012-08-07 15:15:14 -07:00
einaros
cb5a9deef9 removed superfluous and erroneous node-gyp command replacement 2012-08-04 11:17:53 -07:00
isaacs
400763888f The token is an object. Treat it as one.
Allow objects in config files, and leverage the ini format's ability
to handle them intelligently.
2012-07-30 13:40:22 -07:00
isaacs
7bb6f33067 Cleanup stack printing 2012-07-23 23:09:06 -07:00
isaacs
cf4f225184 Don't print the whole stack so often 2012-07-23 18:25:30 -07:00
isaacs
a7b1011b47 Remove extraneous config option 2012-07-16 13:46:31 -07:00
isaacs
08f6e1de4d Remove unnecessary output util 2012-07-16 13:45:50 -07:00