This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge remote branch 'origin/v0.6'

Conflicts:
	Makefile
	configure
	src/node_version.h
  • Loading branch information...
2 parents 08a91ac + cc5cea3 commit 8b28d599a72e717dc00d10f2cc68e64ac6fd5330 @ry ry committed Jan 9, 2012
Showing with 1,123 additions and 463 deletions.
  1. +9 −0 AUTHORS
  2. +41 −1 ChangeLog
  3. +31 −16 Makefile
  4. +1 −1 README.md
  5. +14 −3 deps/npm/Makefile
  6. +84 −0 deps/npm/doc/cli/disputes.md
  7. +47 −19 deps/npm/doc/cli/faq.md
  8. +4 −0 deps/npm/doc/cli/index.md
  9. +1 −0 deps/npm/doc/cli/owner.md
  10. +1 −0 deps/npm/doc/cli/registry.md
  11. +1 −1 deps/npm/html/api/bin.html
  12. +1 −1 deps/npm/html/api/bugs.html
  13. +1 −1 deps/npm/html/api/commands.html
  14. +1 −1 deps/npm/html/api/config.html
  15. +1 −1 deps/npm/html/api/deprecate.html
  16. +1 −1 deps/npm/html/api/docs.html
  17. +1 −1 deps/npm/html/api/edit.html
  18. +1 −1 deps/npm/html/api/explore.html
  19. +1 −1 deps/npm/html/api/help-search.html
  20. +1 −1 deps/npm/html/api/init.html
  21. +1 −1 deps/npm/html/api/install.html
  22. +1 −1 deps/npm/html/api/link.html
  23. +1 −1 deps/npm/html/api/load.html
  24. +1 −1 deps/npm/html/api/ls.html
  25. +2 −2 deps/npm/html/api/npm.html
  26. +1 −1 deps/npm/html/api/outdated.html
  27. +1 −1 deps/npm/html/api/owner.html
  28. +1 −1 deps/npm/html/api/pack.html
  29. +1 −1 deps/npm/html/api/prefix.html
  30. +1 −1 deps/npm/html/api/prune.html
  31. +1 −1 deps/npm/html/api/publish.html
  32. +1 −1 deps/npm/html/api/rebuild.html
  33. +1 −1 deps/npm/html/api/restart.html
  34. +1 −1 deps/npm/html/api/root.html
  35. +1 −1 deps/npm/html/api/run-script.html
  36. +1 −1 deps/npm/html/api/search.html
  37. +1 −1 deps/npm/html/api/start.html
  38. +1 −1 deps/npm/html/api/stop.html
  39. +1 −1 deps/npm/html/api/submodule.html
  40. +1 −1 deps/npm/html/api/tag.html
  41. +1 −1 deps/npm/html/api/test.html
  42. +1 −1 deps/npm/html/api/uninstall.html
  43. +1 −1 deps/npm/html/api/unpublish.html
  44. +1 −1 deps/npm/html/api/update.html
  45. +1 −1 deps/npm/html/api/version.html
  46. +1 −1 deps/npm/html/api/view.html
  47. +1 −1 deps/npm/html/api/whoami.html
  48. +1 −1 deps/npm/html/doc/README.html
  49. +1 −1 deps/npm/html/doc/adduser.html
  50. +1 −1 deps/npm/html/doc/bin.html
  51. +1 −1 deps/npm/html/doc/bugs.html
  52. +1 −1 deps/npm/html/doc/build.html
  53. +1 −1 deps/npm/html/doc/bundle.html
  54. +1 −1 deps/npm/html/doc/cache.html
  55. +1 −1 deps/npm/html/doc/changelog.html
  56. +1 −1 deps/npm/html/doc/coding-style.html
  57. +1 −1 deps/npm/html/doc/completion.html
  58. +1 −1 deps/npm/html/doc/config.html
  59. +1 −1 deps/npm/html/doc/deprecate.html
  60. +1 −1 deps/npm/html/doc/developers.html
  61. +115 −0 deps/npm/html/doc/disputes.html
  62. +1 −1 deps/npm/html/doc/docs.html
  63. +1 −1 deps/npm/html/doc/edit.html
  64. +1 −1 deps/npm/html/doc/explore.html
  65. +47 −21 deps/npm/html/doc/faq.html
  66. +1 −1 deps/npm/html/doc/folders.html
  67. +1 −1 deps/npm/html/doc/help-search.html
  68. +1 −1 deps/npm/html/doc/help.html
  69. +5 −1 deps/npm/html/doc/index.html
  70. +1 −1 deps/npm/html/doc/init.html
  71. +1 −1 deps/npm/html/doc/install.html
  72. +1 −1 deps/npm/html/doc/json.html
  73. +1 −1 deps/npm/html/doc/link.html
  74. +1 −1 deps/npm/html/doc/list.html
  75. +2 −2 deps/npm/html/doc/npm.html
  76. +1 −1 deps/npm/html/doc/outdated.html
  77. +2 −2 deps/npm/html/doc/owner.html
  78. +1 −1 deps/npm/html/doc/pack.html
  79. +1 −1 deps/npm/html/doc/prefix.html
  80. +1 −1 deps/npm/html/doc/prune.html
  81. +1 −1 deps/npm/html/doc/publish.html
  82. +1 −1 deps/npm/html/doc/rebuild.html
  83. +2 −2 deps/npm/html/doc/registry.html
  84. +1 −1 deps/npm/html/doc/removing-npm.html
  85. +1 −1 deps/npm/html/doc/restart.html
  86. +1 −1 deps/npm/html/doc/root.html
  87. +1 −1 deps/npm/html/doc/run-script.html
  88. +1 −1 deps/npm/html/doc/scripts.html
  89. +1 −1 deps/npm/html/doc/search.html
  90. +1 −1 deps/npm/html/doc/semver.html
  91. +1 −1 deps/npm/html/doc/star.html
  92. +1 −1 deps/npm/html/doc/start.html
  93. +1 −1 deps/npm/html/doc/stop.html
  94. +1 −1 deps/npm/html/doc/submodule.html
  95. +1 −1 deps/npm/html/doc/tag.html
  96. +1 −1 deps/npm/html/doc/test.html
  97. +1 −1 deps/npm/html/doc/uninstall.html
  98. +1 −1 deps/npm/html/doc/unpublish.html
  99. +1 −1 deps/npm/html/doc/update.html
  100. +1 −1 deps/npm/html/doc/version.html
  101. +1 −1 deps/npm/html/doc/view.html
  102. +1 −1 deps/npm/html/doc/whoami.html
  103. +35 −16 deps/npm/lib/npm.js
  104. +1 −1 deps/npm/lib/utils/cmd-shim.js
  105. +1 −1 deps/npm/lib/utils/fetch.js
  106. +6 −27 deps/npm/lib/utils/ini.js
  107. +2 −2 deps/npm/lib/utils/npm-registry-client/get.js
  108. +15 −2 deps/npm/lib/utils/read-json.js
  109. +1 −1 deps/npm/man/man1/README.1
  110. +1 −1 deps/npm/man/man1/adduser.1
  111. +1 −1 deps/npm/man/man1/bin.1
  112. +1 −1 deps/npm/man/man1/bugs.1
  113. +1 −1 deps/npm/man/man1/build.1
  114. +1 −1 deps/npm/man/man1/bundle.1
  115. +1 −1 deps/npm/man/man1/cache.1
  116. +1 −1 deps/npm/man/man1/changelog.1
  117. +1 −1 deps/npm/man/man1/coding-style.1
  118. +1 −1 deps/npm/man/man1/completion.1
  119. +1 −1 deps/npm/man/man1/config.1
  120. +1 −1 deps/npm/man/man1/deprecate.1
  121. +1 −1 deps/npm/man/man1/developers.1
  122. +124 −0 deps/npm/man/man1/disputes.1
  123. +1 −1 deps/npm/man/man1/docs.1
  124. +1 −1 deps/npm/man/man1/edit.1
  125. +1 −1 deps/npm/man/man1/explore.1
  126. +50 −27 deps/npm/man/man1/faq.1
  127. +1 −1 deps/npm/man/man1/folders.1
  128. +1 −1 deps/npm/man/man1/help-search.1
  129. +1 −1 deps/npm/man/man1/help.1
  130. +4 −1 deps/npm/man/man1/index.1
  131. +1 −1 deps/npm/man/man1/init.1
  132. +1 −1 deps/npm/man/man1/install.1
  133. +1 −1 deps/npm/man/man1/json.1
  134. +1 −1 deps/npm/man/man1/link.1
  135. +1 −1 deps/npm/man/man1/list.1
  136. +2 −2 deps/npm/man/man1/npm.1
  137. +1 −1 deps/npm/man/man1/outdated.1
  138. +4 −1 deps/npm/man/man1/owner.1
  139. +1 −1 deps/npm/man/man1/pack.1
  140. +1 −1 deps/npm/man/man1/prefix.1
  141. +1 −1 deps/npm/man/man1/prune.1
  142. +1 −1 deps/npm/man/man1/publish.1
  143. +1 −1 deps/npm/man/man1/rebuild.1
  144. +4 −1 deps/npm/man/man1/registry.1
  145. +1 −1 deps/npm/man/man1/removing-npm.1
  146. +1 −1 deps/npm/man/man1/restart.1
  147. +1 −1 deps/npm/man/man1/root.1
  148. +1 −1 deps/npm/man/man1/run-script.1
  149. +1 −1 deps/npm/man/man1/scripts.1
  150. +1 −1 deps/npm/man/man1/search.1
  151. +1 −1 deps/npm/man/man1/semver.1
  152. +1 −1 deps/npm/man/man1/star.1
  153. +1 −1 deps/npm/man/man1/start.1
  154. +1 −1 deps/npm/man/man1/stop.1
  155. +1 −1 deps/npm/man/man1/submodule.1
  156. +1 −1 deps/npm/man/man1/tag.1
  157. +1 −1 deps/npm/man/man1/test.1
  158. +1 −1 deps/npm/man/man1/uninstall.1
  159. +1 −1 deps/npm/man/man1/unpublish.1
  160. +1 −1 deps/npm/man/man1/update.1
  161. +1 −1 deps/npm/man/man1/version.1
  162. +1 −1 deps/npm/man/man1/view.1
  163. +1 −1 deps/npm/man/man1/whoami.1
  164. +1 −1 deps/npm/man/man3/bin.3
  165. +1 −1 deps/npm/man/man3/bugs.3
  166. +1 −1 deps/npm/man/man3/commands.3
  167. +1 −1 deps/npm/man/man3/config.3
  168. +1 −1 deps/npm/man/man3/deprecate.3
  169. +1 −1 deps/npm/man/man3/docs.3
  170. +1 −1 deps/npm/man/man3/edit.3
  171. +1 −1 deps/npm/man/man3/explore.3
  172. +1 −1 deps/npm/man/man3/help-search.3
  173. +1 −1 deps/npm/man/man3/init.3
  174. +1 −1 deps/npm/man/man3/install.3
  175. +1 −1 deps/npm/man/man3/link.3
  176. +1 −1 deps/npm/man/man3/load.3
  177. +1 −1 deps/npm/man/man3/ls.3
  178. +2 −2 deps/npm/man/man3/npm.3
  179. +1 −1 deps/npm/man/man3/outdated.3
  180. +1 −1 deps/npm/man/man3/owner.3
  181. +1 −1 deps/npm/man/man3/pack.3
  182. +1 −1 deps/npm/man/man3/prefix.3
  183. +1 −1 deps/npm/man/man3/prune.3
  184. +1 −1 deps/npm/man/man3/publish.3
  185. +1 −1 deps/npm/man/man3/rebuild.3
  186. +1 −1 deps/npm/man/man3/restart.3
  187. +1 −1 deps/npm/man/man3/root.3
  188. +1 −1 deps/npm/man/man3/run-script.3
  189. +1 −1 deps/npm/man/man3/search.3
  190. +1 −1 deps/npm/man/man3/start.3
  191. +1 −1 deps/npm/man/man3/stop.3
  192. +1 −1 deps/npm/man/man3/submodule.3
  193. +1 −1 deps/npm/man/man3/tag.3
  194. +1 −1 deps/npm/man/man3/test.3
  195. +1 −1 deps/npm/man/man3/uninstall.3
  196. +1 −1 deps/npm/man/man3/unpublish.3
  197. +1 −1 deps/npm/man/man3/update.3
  198. +1 −1 deps/npm/man/man3/version.3
  199. +1 −1 deps/npm/man/man3/view.3
  200. +1 −1 deps/npm/man/man3/whoami.3
  201. +1 −0 deps/npm/node_modules/fstream/lib/link-writer.js
  202. +1 −1 deps/npm/node_modules/fstream/package.json
  203. +2 −2 deps/npm/node_modules/tar/lib/pack.js
  204. +1 −1 deps/npm/node_modules/tar/package.json
  205. +1 −1 deps/npm/package.json
  206. +39 −13 deps/npm/scripts/install.sh
  207. +40 −0 deps/npm/scripts/release.sh
  208. +4 −3 deps/npm/test/run.js
  209. +12 −0 deps/uv/src/unix/internal.h
  210. +8 −1 doc/api/http.markdown
  211. +4 −3 doc/api/net.markdown
  212. +1 −1 doc/api/tls.markdown
  213. +4 −4 doc/cla.html
  214. +7 −7 doc/index.html
  215. +1 −1 doc/logos/index.html
  216. +2 −2 doc/template.html
  217. +20 −18 lib/events.js
  218. +21 −17 lib/http.js
  219. +1 −1 node.gyp
  220. +4 −0 src/node.cc
  221. +12 −15 src/node_crypto.cc
  222. +0 −1 src/node_crypto.h
  223. +47 −31 src/node_http_parser.cc
  224. +7 −0 test/simple/test-event-emitter-check-listener-leaks.js
  225. +10 −2 test/simple/test-http-parser-bad-ref.js
  226. +4 −2 test/simple/test-http-parser.js
  227. +10 −4 test/simple/test-http-response-close.js
  228. +21 −9 test/simple/test-sys.js
  229. +10 −0 vcbuild.bat
View
@@ -244,3 +244,12 @@ Kyle Robinson Young <kyle@dontkry.com>
Tim Oxley <secoif@gmail.com>
Ingmar Runge <ingmar@irsoft.de>
Russ Bradberry <rbradberry@gmail.com>
+Andreas Madsen <amwebdk@gmail.com>
+Adam Malcontenti-Wilson <adman.com@gmail.com>
+James Hartig <james.hartig@grooveshark.com>
+Shannen Saez <shannenlaptop@gmail.com>
+Seong-Rak Choi <ragiragi@hanmail.net>
+Dave Irvine <davman99@gmail.com>
+Ju-yeong Park <interruptz@gmail.com>
+Phil Sung <psung@dnanexus.com>
+Damon Oehlman <damon.oehlman@sidelab.com>
View
@@ -1,4 +1,44 @@
-2011.12.14, Version 0.6.6 (stable)
+2012.01.06, Version 0.6.7 (stable)
+
+* V8 hash collision fix (Breaks MIPS) (Bert Belder, Erik Corry)
+
+* Upgrade V8 to 3.6.6.15
+
+* Upgrade npm to 1.1.0-beta-10 (isaacs)
+
+* many doc updates (Ben Noordhuis, Jeremy Martin, koichik, Dave Irvine,
+ Seong-Rak Choi, Shannen, Adam Malcontenti-Wilson, koichik)
+
+* Fix segfault in node_http_parser.cc
+
+* dgram, timers: fix memory leaks (Ben Noordhuis, Yoshihiro Kikuchi)
+
+* repl: fix repl.start not passing the `ignoreUndefined` arg (Damon Oehlman)
+
+* #1980: Socket.pause null reference when called on a closed Stream (koichik)
+
+* #2263: XMLHttpRequest piped in a writable file stream hang (koichik)
+
+* #2069: http resource leak (koichik)
+
+* buffer.readInt global pollution fix (Phil Sung)
+
+* timers: fix performance regression (Ben Noordhuis)
+
+* #2308, #2246: node swallows openssl error on request (koichik)
+
+* #2114: timers: remove _idleTimeout from item in .unenroll() (James Hartig)
+
+* #2379: debugger: Request backtrace w/o refs (Fedor Indutny)
+
+* simple DTrace ustack helper (Dave Pacheco)
+
+* crypto: rewrite HexDecode without snprintf (Roman Shtylman)
+
+* crypto: don't ignore DH init errors (Ben Noordhuis)
+
+
+2011.12.14, Version 0.6.6
* npm update to 1.1.0-beta-4 (Isaac Z. Schlueter)
View
@@ -1,4 +1,5 @@
BUILDTYPE ?= Release
+PYTHON ?= python
ifeq ($(BUILDTYPE),Release)
all: out/Makefile node
@@ -38,41 +39,41 @@ distclean:
-rm config.gypi
test: all
- python tools/test.py --mode=release simple message
+ $(PYTHON) tools/test.py --mode=release simple message
test-http1: all
- python tools/test.py --mode=release --use-http1 simple message
+ $(PYTHON) tools/test.py --mode=release --use-http1 simple message
test-valgrind: all
- python tools/test.py --mode=release --valgrind simple message
+ $(PYTHON) tools/test.py --mode=release --valgrind simple message
test-all: all
python tools/test.py --mode=debug,release
$(MAKE) test-npm
test-all-http1: all
- python tools/test.py --mode=debug,release --use-http1
+ $(PYTHON) tools/test.py --mode=debug,release --use-http1
test-all-valgrind: all
- python tools/test.py --mode=debug,release --valgrind
+ $(PYTHON) tools/test.py --mode=debug,release --valgrind
test-release: all
- python tools/test.py --mode=release
+ $(PYTHON) tools/test.py --mode=release
test-debug: all
- python tools/test.py --mode=debug
+ $(PYTHON) tools/test.py --mode=debug
test-message: all
- python tools/test.py message
+ $(PYTHON) tools/test.py message
test-simple: all
- python tools/test.py simple
+ $(PYTHON) tools/test.py simple
test-pummel: all
- python tools/test.py pummel
+ $(PYTHON) tools/test.py pummel
test-internet: all
- python tools/test.py internet
+ $(PYTHON) tools/test.py internet
test-npm: node
./node deps/npm/test/run.js
@@ -138,11 +139,25 @@ docopen: out/doc/api/all.html
docclean:
-rm -rf out/doc
-VERSION=$(shell git describe)
+VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
TARNAME=node-$(VERSION)
-#dist: doc/node.1 doc/api
-dist: doc
+dist: $(TARBALL) $(PKG)
+
+PKGDIR=out/dist-osx
+
+pkg: $(PKG)
+
+$(PKG):
+ -rm -rf $(PKGDIR)
+ $(WAF) configure --prefix=/usr/local --without-snapshot
+ DESTDIR=$(PKGDIR) $(WAF) install
+ $(packagemaker) \
+ --id "org.nodejs.NodeJS-$(VERSION)" \
+ --doc tools/osx-pkg.pmdoc \
+ --out $(PKG)
+
+$(TARBALL): out/doc
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
mkdir -p $(TARNAME)/doc
cp doc/node.1 $(TARNAME)/doc/node.1
@@ -162,10 +177,10 @@ bench-idle:
./node benchmark/idle_clients.js &
jslint:
- PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
+ PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
cpplint:
- @python tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
+ @$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
lint: jslint cpplint
View
@@ -3,7 +3,7 @@ Evented I/O for V8 javascript. [![Build Status](https://secure.travis-ci.org/joy
### To build:
-Unix/Macintosh (requires python >= 2.5.2):
+Unix/Macintosh (requires python 2.6 or 2.7):
./configure
make
View
@@ -108,18 +108,29 @@ version: link
git add package.json &&\
git ci -m v$(shell npm -v)
-publish: link
+publish: link doc
+ git tag -d v$(shell npm -v) || true
+ git push origin :v$(shell npm -v) || true
+ npm unpublish npm@$(shell npm -v) || true
git tag -s -m v$(shell npm -v) v$(shell npm -v) &&\
git push origin --tags &&\
npm publish &&\
- make doc-publish
+ npm tag npm@$(shell npm -v) $(shell npm -v | awk -F. '{print $$1 "." $$2}') &&\
+ make doc-publish &&\
+ make zip-publish
docpublish: doc-publish
doc-publish: doc
rsync -vazu --stats --no-implied-dirs --delete html/doc/ npmjs.org:/var/www/npmjs.org/public/doc
rsync -vazu --stats --no-implied-dirs --delete html/api/ npmjs.org:/var/www/npmjs.org/public/api
+zip-publish: release
+ scp release/*.zip npmjs.org:/var/www/npmjs.org/public/dist/
+
+release:
+ @bash scripts/release.sh
+
sandwich:
@[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || echo "make it yourself"
-.PHONY: all latest install dev link doc clean uninstall test man doc-publish doc-clean docclean docpublish
+.PHONY: all latest install dev link doc clean uninstall test man doc-publish doc-clean docclean docpublish release zip-publish
@@ -0,0 +1,84 @@
+npm-disputes(1) -- Handling Module Name Disputes
+================================================
+
+## SYNOPSIS
+
+1. Get the author email with `npm owner ls <pkgname>`
+1. Email the author, CC <i@izs.me>.
+2. After a few weeks, if there's no resolution, we'll sort it out.
+
+## DESCRIPTION
+
+There sometimes arise cases where a user publishes a module, and then
+later, some other user wants to use that name. Here are some common
+ways that happens (each of these is based on actual events.)
+
+1. Bob writes a JavaScript module `foo`, which is not node-specific.
+ Bob doesn't use node at all. Joe wants to use `foo` in node, so he
+ wraps it in an npm module. Some time later, Bob starts using node,
+ and wants to take over management of his program.
+2. Bob writes an npm module `foo`, and publishes it. Perhaps much
+ later, Joe finds a bug in `foo`, and fixes it. He sends a pull
+ request to Bob, but Bob doesn't have the time to deal with it,
+ because he has a new job and a new baby and is focused on his new
+ erlang project, and kind of not involved with node any more. Joe
+ would like to publish a new `foo`, but can't, because the name is
+ taken.
+3. Bob writes a 10-line flow-control library, and calls it `foo`, and
+ publishes it to the npm registry. Being a simple little thing, it
+ never really has to be updated. Joe works for Foo Inc, the makers
+ of the critically acclaimed and widely-marketed `foo` JavaScript
+ toolkit framework. They publish it to npm as `foojs`, but people are
+ routinely confused when `npm install foo` is some different thing.
+4. Bob writes a parser for the widely-known `foo` file format, because
+ he needs it for work. Then, he gets a new job, and never updates the
+ prototype. Later on, Joe writes a much more complete `foo` parser,
+ but can't publish, because Bob's `foo` is in the way.
+
+The validity of Joe's claim in each situation can be debated. However,
+Joe's appropriate course of action in each case is the same.
+
+1. `npm owner ls foo`. This will tell Joe the email address of the
+ owner (Bob).
+2. Joe emails Bob, explaining the situation **as respecfully as possible**,
+ and what he would like to do with the module name. He adds
+ isaacs <i@izs.me> to the CC list of the email. Mention in the email
+ that Bob can run `npm owner add joe foo` to add Joe as an owner of
+ the `foo` package.
+3. After a reasonable amount of time, if Bob has not responded, or if
+ Bob and Joe can't come to any sort of resolution, email isaacs
+ <i@izs.me> and we'll sort it out.
+
+## REASONING
+
+In almost every case so far, the parties involved have been able to reach
+an amicable resolution without any major intervention. Most people
+really do want to be reasonable, and are probably not even aware that
+they're in your way.
+
+Module ecosystems are most vibrant and powerful when they are as
+self-directed as possible. If an admin one day deletes something you
+had worked on, then that is going to make most people quite upset,
+regardless of the justification. When humans solve their problems by
+talking to other humans with respect, everyone has the chance to end up
+feeling good about the interaction.
+
+## EXCEPTIONS
+
+Some things are not allowed, and will be removed without discussion if
+they are brought to the attention of the npm registry admins, including
+but not limited to:
+
+1. Malware (that is, a module designed to exploit or harm the machine on
+ which it is installed)
+2. Violations of copyright or licenses (for example, cloning an
+ MIT-licensed program, and then removing or changing the copyright and
+ license statement)
+3. Illegal content.
+
+If you see bad behavior like this, please report it right away.
+
+## SEE ALSO
+
+* npm-registry(1)
+* npm-owner(1)
View
@@ -32,35 +32,65 @@ tl;dr:
something with the `-g` flag, then its executables go in `npm bin -g`
and its modules go in `npm root -g`.
-## How do I install something everywhere?
+## How do I install something on my computer in a central location?
-Install it globally by tacking `-g` or `--global` to the command.
+Install it globally by tacking `-g` or `--global` to the command. (This
+is especially important for command line utilities that need to add
+their bins to the global system `PATH`.)
## I installed something globally, but I can't `require()` it
Install it locally.
-## I don't wanna.
+The global install location is a place for command-line utilities
+to put their bins in the system `PATH`. It's not for use with `require()`.
-Check out `npm link`. You might like it.
+If you `require()` a module in your code, then that means it's a
+dependency, and a part of your program. You need to install it locally
+in your program.
-## No, I really want 0.x style 'everything global' style.
+## Why can't npm just put everything in one place, like other package managers?
-Ok, fine. Do this:
+Not every change is an improvement, but every improvement is a change.
+This would be like asking git to do network IO for every commit. It's
+not going to happen, because it's a terrible idea that causes more
+problems than it solves.
- echo 'export NODE_PATH="'$(npm root -g)'"' >> ~/.bashrc
- . ~/.bashrc
- npm config set global true
+It is much harder to avoid dependency conflicts without nesting
+dependencies. This is fundamental to the way that npm works, and has
+proven to be an extremely successful approach. See `npm-folders(1)` for
+more details.
-This is not recommended.
+If you want a package to be installed in one place, and have all your
+programs reference the same copy of it, then use the `npm link` command.
+That's what it's for. Install it globally, then link it into each
+program that uses it.
-Many things **will not work** if you do this. Make sure you read and
-understand `npm-config(1)` and `npm-global(1)` before you complain
-about things being broken.
+## Whatever, I really want the old style 'everything global' style.
-When you realize what a mistake it was, do this to switch back:
+Write your own package manager, then. It's not that hard.
- npm config delete global --local
+npm will not help you do something that is known to be a bad idea.
+
+## Should I check my `node_modules` folder into git?
+
+Mikeal Rogers answered this question very well:
+
+<http://www.mikealrogers.com/posts/nodemodules-in-git.html>
+
+tl;dr
+
+* Check `node_modules` into git for things you **deploy**, such as
+ websites and apps.
+* Do not check `node_modules` into git for libraries and modules
+ intended to be reused.
+* Use npm to manage dependencies in your dev environment, but not in
+ your deployment scripts.
+
+## Is it 'npm' or 'NPM' or 'Npm'?
+
+npm should never be capitalized unless it is being displayed in a
+location that is customarily all-caps (such as the title of man pages.)
## If 'npm' is an acronym, why is it never capitalized?
@@ -73,7 +103,7 @@ acronym, and thus incorrectly named.)
National Association of Pastoral Musicians. You can learn more
about them at <http://npm.org/>.
-In software, "NPM" is a non-parametric mapping utility written by
+In software, "NPM" is a Non-Parametric Mapping utility written by
Chris Rorden. You can analyze pictures of brains with it. Learn more
about the (capitalized) NPM program at <http://www.cabiatl.com/mricro/npm/>.
@@ -186,11 +216,9 @@ Go to <http://admin.npmjs.org/reset>.
## I get ECONNREFUSED a lot. What's up?
Either the registry is down, or node's DNS isn't able to reach out.
-This happens a lot if you don't follow *all* the steps in the Cygwin
-setup doc.
To check if the registry is down, open up
-<http://registry.npmjs.org/-/short>
+<http://registry.npmjs.org/>
in a web browser. This will also tell you if you are just unable to
access the internet for some reason.
Oops, something went wrong.

0 comments on commit 8b28d59

Please sign in to comment.