1291 Commits

Author SHA1 Message Date
Chulki Lee
021770b9cb Do not add the directory containing node executable
Adding the directory containing current node executable may lead to run
different executable than original PATH.
See #5876 for details
2014-08-14 13:35:39 -07:00
isaacs
0511261b66 tar.js: Comment should describe why not what 2014-08-13 12:23:31 -07:00
isaacs
1d5c41dd0d rename .gitignore when unpacking foreign tarballs
Fix #5658

Note that this doesn't actually *ignore* the files specified by the
.gitignore and/or .npmignore files.  That would likely require removing
them after the fact, as well as all the same logic that exists in
fstream-npm, since tar does not give us a directory listing, and
tarballs may have their files in any random order.
2014-08-13 12:20:51 -07:00
isaacs
9aac2670a7 Detect non-gzipped tar files more reliably
In addition to starting with the string `package/`, they may also start
with a `pax_global_header`, and this is almost certainly an indication
that we are dealing with a tar file.  For example, git adds a global
header with the commit sha when producing archive files.
2014-08-13 12:17:30 -07:00
Forrest L Norvell
d987707442 move fetch into npm-registry-client
The primary purpose is so that everything doing network requests
includes auth, if so required. Sends bearer token by default, will send
HTTP Basic auth with `always-auth` set in the config.
2014-08-07 17:56:53 -07:00
bcoe
df4b0e7fc1 making it so that you can pass arguments to run-scripts. 2014-07-22 17:23:32 -07:00
Forrest L Norvell
9ef8fe4d6e replace some.js with (Zalgo-safe) async-some@1.0.0 2014-07-01 18:49:46 -07:00
Forrest L Norvell
63c3277f08 make gentlyRm safer and tidier
Checks to ensure that it's only reoving files managed by npm, and
uses fs-vacuum to ensure that empty directories are cleand up as it
goes. Maybe slightly overdone.
2014-07-01 18:49:46 -07:00
Forrest L Norvell
4f54043709 npm-package-arg@2.0.0 2014-07-01 18:49:45 -07:00
Forrest L Norvell
0c007eefb5 switch to npm-package-arg from whatever that was 2014-07-01 18:49:45 -07:00
Forrest L Norvell
cfcbf34fe4 chasing down errant uses of old auth, part 1 2014-07-01 18:43:16 -07:00
Forrest L Norvell
0689ba249b use --scope to map scope to registry 2014-07-01 18:43:16 -07:00
Forrest L Norvell
4b85f1e3db @scope:registry-base-url → @scope:registry 2014-07-01 18:16:43 -07:00
Forrest L Norvell
7f55057807 first piece of @org/package module specifiers 2014-07-01 18:16:43 -07:00
isaacs
4994c1c1d7 typo in lib/utils/git.js 2014-06-27 15:28:57 -07:00
Bradley Meck
59eb112eec Use core.longpaths on win32 git - fixes #5525 2014-06-27 15:06:53 -07:00
Domenic Denicola
6c146fbec0 Remove spurious er.code = assignments.
They literally do nothing in all cases.
2014-06-25 01:50:18 -04:00
Domenic Denicola
c08715478a Update EROFS error to be a bit more informative. 2014-06-24 18:33:33 -04:00
Chris Williams
fd1e8b0f83 Add user-friendly errors for ENOSPC and EROFS.
Fixes #5101.
2014-06-24 18:27:03 -04:00
Forrest L Norvell
48d1d82f4d removed redundant dependency 2014-06-13 12:44:43 -07:00
isaacs
aa620a8b5c Properly handle errors that can occur in the config-loading process 2014-06-12 14:51:45 -07:00
isaacs
9f00306790 stop the spinner when the process finishes
Required for node 0.8 compatibility
2014-05-23 14:32:34 -07:00
isaacs
1707fcedb7 npmconf@1.0.0, Refactor config/uid/prefix loading process
Closes #4751
2014-05-14 12:41:32 -07:00
Forrest L Norvell
3294bfaf6d remove the 'use strict' and jshint bits 2014-05-07 18:00:51 -07:00
Forrest L Norvell
355bb7e0f3 refactor add* into separate files 2014-05-07 18:00:50 -07:00
Forrest L Norvell
cc8dd4e632 split out cache locking into separate file 2014-05-07 17:37:11 -07:00
isaacs
bf761dddd1 Busy Spinner, no http noise
One step closer to #5213
2014-05-07 15:18:38 -07:00
isaacs
aca48cfbe5 fetch: Send referer and npm-session headers 2014-05-05 16:16:51 -07:00
isaacs
1053c97891 bump tap dep, make tests stderr a bit quieter 2014-04-28 16:30:01 -07:00
Yeonghoon Park
8b5e7b6ae5 Add test for lifecycle.makeEnv() 2014-04-18 00:04:04 -04:00
Yeonghoon Park
3e03524f8a Fix lifecycle to pass Infinity for config env value 2014-04-18 00:04:03 -04:00
isaacs
2241a09c84 view: handle unpublished packages properly 2014-04-12 18:23:06 -07:00
Raynos (Jake Verbaten)
c95cf086e5 do not log if silent 2014-04-10 10:55:43 -07:00
isaacs
1d29b17f51 read-installed@2.0.0 2014-03-15 22:18:10 -07:00
isaacs
09223de877 Forbid deleting important npm dirs
Re #4691
2014-02-15 08:23:07 -08:00
isaacs
bb6fb4d158 read-installed@1.0.0 2014-02-14 17:33:03 -08:00
Dylan Greene
3cbf381fc7 Replace references to isaacs/npm with npm/npm. 2014-02-06 23:34:06 -05:00
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