Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
commit f3470e014981589eba6808d0350e935d7ffdd2b5 2 parents 05dfac3 + 630728d
Victor Voisin authored

Showing 1,262 changed files with 12,773 additions and 1,874 deletions. Show diff stats Hide diff stats

  1. +1 0  .gitignore
  2. +12 0 AUTHORS
  3. +1 1  Makefile
  4. +2 2 README.md
  5. +2 0  doc/api/deprecate.md
  6. +8 7 doc/api/npm.md
  7. +23 7 doc/cli/config.md
  8. +2 0  doc/cli/deprecate.md
  9. +10 3 doc/cli/disputes.md
  10. +46 0 doc/cli/faq.md
  11. +209 0 doc/cli/global.md
  12. +3 0  doc/cli/install.md
  13. +26 5 doc/cli/json.md
  14. +1 3 doc/cli/registry.md
  15. +19 0 doc/cli/rm.md
  16. +49 4 doc/cli/scripts.md
  17. +3 3 doc/cli/semver.md
  18. +22 0 doc/cli/stars.md
  19. +4 1 doc/cli/update.md
  20. +10 1 doc/cli/version.md
  21. +3 1 doc/cli/view.md
  22. +4 1 lib/build.js
  23. +302 85 lib/cache.js
  24. +14 2 lib/dedupe.js
  25. +1 1  lib/deprecate.js
  26. +178 51 lib/install.js
  27. +1 1  lib/link.js
  28. +21 9 lib/ls.js
  29. +5 0 lib/npm.js
  30. +5 0 lib/outdated.js
  31. +18 5 lib/publish.js
  32. +4 0 lib/run-script.js
  33. +8 5 lib/search.js
  34. +27 0 lib/stars.js
  35. +1 0  lib/uninstall.js
  36. +1 0  lib/unpublish.js
  37. +15 3 lib/utils/error-handler.js
  38. +1 1  lib/utils/exec.js
  39. +11 4 lib/utils/lifecycle.js
  40. +6 9 lib/utils/sha.js
  41. +69 21 lib/utils/tar.js
  42. +15 10 node_modules/abbrev/lib/abbrev.js
  43. +24 10 node_modules/abbrev/package.json
  44. +27 0 node_modules/chmodr/LICENSE
  45. +3 0  node_modules/chmodr/README.md
  46. +54 0 node_modules/chmodr/chmodr.js
  47. +28 0 node_modules/chmodr/package.json
  48. +63 0 node_modules/chmodr/test/basic.js
  49. +58 0 node_modules/chmodr/test/sync.js
  50. +2 3 node_modules/fstream-npm/fstream-npm.js
  51. +27 0 node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE
  52. +3 2 node_modules/fstream-npm/node_modules/fstream-ignore/package.json
  53. +2 2 node_modules/fstream-npm/package.json
  54. +27 0 node_modules/fstream/LICENSE
  55. +5 0 node_modules/fstream/lib/file-writer.js
  56. +2 2 node_modules/fstream/lib/proxy-writer.js
  57. +2 3 node_modules/fstream/lib/writer.js
  58. +5 7 node_modules/fstream/package.json
  59. +57 18 node_modules/glob/glob.js
  60. +6 9 node_modules/glob/package.json
  61. +122 7 node_modules/glob/test/00-setup.js
  62. +30 85 node_modules/glob/test/bash-comparison.js
  63. +348 0 node_modules/glob/test/bash-results.json
  64. +39 28 node_modules/glob/test/mark.js
  65. +113 0 node_modules/glob/test/nocase-nomagic.js
  66. +8 41 node_modules/glob/test/pause-resume.js
  67. +32 29 node_modules/glob/test/root.js
  68. +7 3 node_modules/graceful-fs/graceful-fs.js
  69. +4 3 node_modules/graceful-fs/package.json
  70. +5 0 node_modules/graceful-fs/test/open.js
  71. +9 1 node_modules/ini/README.md
  72. +27 3 node_modules/ini/ini.js
  73. +4 3 node_modules/ini/package.json
  74. +15 0 node_modules/ini/test/fixtures/foo.ini
  75. +13 3 node_modules/ini/test/foo.js
  76. +1 0  node_modules/init-package-json/node_modules/promzard/package.json
  77. +5 1 node_modules/init-package-json/package.json
  78. +12 10 node_modules/lockfile/LICENSE
  79. +30 48 node_modules/lockfile/lockfile.js
  80. +4 3 node_modules/lockfile/package.json
  81. +43 0 node_modules/lockfile/test/basic.js
  82. +41 0 node_modules/lru-cache/README.md
  83. +50 2 node_modules/lru-cache/lib/lru-cache.js
  84. +6 5 node_modules/lru-cache/package.json
  85. +34 0 node_modules/lru-cache/test/basic.js
  86. +52 0 node_modules/lru-cache/test/foreach.js
  87. +50 0 node_modules/lru-cache/test/memory-leak.js
  88. +6 4 node_modules/minimatch/minimatch.js
  89. +27 0 node_modules/minimatch/node_modules/sigmund/LICENSE
  90. +53 0 node_modules/minimatch/node_modules/sigmund/README.md
  91. +283 0 node_modules/minimatch/node_modules/sigmund/bench.js
  92. +38 0 node_modules/minimatch/node_modules/sigmund/package.json
  93. +39 0 node_modules/minimatch/node_modules/sigmund/sigmund.js
  94. +24 0 node_modules/minimatch/node_modules/sigmund/test/basic.js
  95. +5 4 node_modules/minimatch/package.json
  96. +2 1  node_modules/mkdirp/.travis.yml
  97. +26 24 node_modules/mkdirp/README.markdown
  98. +10 8 node_modules/mkdirp/package.json
  99. +6 0 node_modules/node-gyp/.jshintrc
  100. +16 5 node_modules/node-gyp/README.md
  101. +6 1 node_modules/node-gyp/addon.gypi
  102. 0  node_modules/node-gyp/{legacy/tools → }/gyp/.npmignore
  103. 0  node_modules/node-gyp/{legacy/tools → }/gyp/AUTHORS
  104. +4 0 node_modules/node-gyp/{legacy/tools → }/gyp/DEPS
  105. 0  node_modules/node-gyp/{legacy/tools → }/gyp/LICENSE
  106. 0  node_modules/node-gyp/{legacy/tools → }/gyp/MANIFEST
  107. 0  node_modules/node-gyp/{legacy/tools → }/gyp/OWNERS
  108. +109 0 node_modules/node-gyp/gyp/PRESUBMIT.py
  109. +1 0  node_modules/node-gyp/{legacy/tools → }/gyp/buildbot/buildbot_run.py
  110. 0  node_modules/node-gyp/{legacy/tools → }/gyp/codereview.settings
  111. 0  node_modules/node-gyp/{legacy/tools → }/gyp/gyp
  112. 0  node_modules/node-gyp/{legacy/tools → }/gyp/gyp.bat
  113. 0  node_modules/node-gyp/{legacy/tools → }/gyp/gyp_dummy.c
  114. +12 2 node_modules/node-gyp/{legacy/tools → }/gyp/gyptest.py
  115. +17 16 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/MSVSNew.py
  116. +2 2 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/MSVSProject.py
  117. +22 8 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/MSVSSettings.py
  118. +9 8 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/MSVSSettings_test.py
  119. +2 2 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/MSVSToolFile.py
  120. +3 2 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/MSVSUserFile.py
  121. +145 43 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/MSVSVersion.py
  122. +2 2 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/SCons.py
  123. +57 15 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/__init__.py
  124. +79 8 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/common.py
  125. +71 0 node_modules/node-gyp/gyp/pylib/gyp/common_test.py
  126. +13 4 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/easy_xml.py
  127. +5 4 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/easy_xml_test.py
  128. 0  node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/__init__.py
  129. +1,092 0 node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
  130. +31 2 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/dump_dependency_json.py
  131. +273 0 node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
  132. 0  node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/gypd.py
  133. 0  node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/gypsh.py
  134. +183 177 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/make.py
  135. +345 105 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/msvs.py
  136. +4 2 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/msvs_test.py
  137. +732 199 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/ninja.py
  138. +44 0 node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
  139. +31 3 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/scons.py
  140. +46 21 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/generator/xcode.py
  141. +682 401 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/input.py
  142. +22 16 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/mac_tool.py
  143. +722 0 node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
  144. +18 11 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/ninja_syntax.py
  145. 0  node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/sun_tool.py
  146. +193 0 node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
  147. +223 130 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/xcode_emulation.py
  148. +98 67 node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/xcodeproj_file.py
  149. 0  node_modules/node-gyp/{legacy/tools → }/gyp/pylib/gyp/xml_fix.py
  150. 0  node_modules/node-gyp/{legacy/tools → }/gyp/pylintrc
  151. 0  node_modules/node-gyp/{legacy/tools → }/gyp/samples/samples
  152. 0  node_modules/node-gyp/{legacy/tools → }/gyp/samples/samples.bat
  153. 0  node_modules/node-gyp/{legacy/tools → }/gyp/setup.py
  154. +23 0 node_modules/node-gyp/gyp/test/actions-bare/gyptest-bare.py
  155. +25 0 node_modules/node-gyp/gyp/test/actions-bare/src/bare.gyp
  156. +11 0 node_modules/node-gyp/gyp/test/actions-bare/src/bare.py
  157. +72 0 node_modules/node-gyp/gyp/test/actions-multiple/gyptest-all.py
  158. +226 0 node_modules/node-gyp/gyp/test/actions-multiple/src/actions.gyp
  159. +9 0 node_modules/node-gyp/gyp/test/actions-multiple/src/copy.py
  160. +12 0 node_modules/node-gyp/gyp/test/actions-multiple/src/filter.py
  161. +11 0 node_modules/node-gyp/gyp/test/actions-multiple/src/foo.c
  162. +1 0  node_modules/node-gyp/gyp/test/actions-multiple/src/input.txt
  163. +22 0 node_modules/node-gyp/gyp/test/actions-multiple/src/main.c
  164. +26 0 node_modules/node-gyp/gyp/test/actions-none/gyptest-none.py
  165. +12 0 node_modules/node-gyp/gyp/test/actions-none/src/fake_cross.py
  166. +1 0  node_modules/node-gyp/gyp/test/actions-none/src/foo.cc
  167. +35 0 node_modules/node-gyp/gyp/test/actions-none/src/none_with_source_files.gyp
  168. +26 0 node_modules/node-gyp/gyp/test/actions-subdir/gyptest-action.py
  169. +11 0 node_modules/node-gyp/gyp/test/actions-subdir/src/make-file.py
  170. +31 0 node_modules/node-gyp/gyp/test/actions-subdir/src/none.gyp
  171. +11 0 node_modules/node-gyp/gyp/test/actions-subdir/src/subdir/make-subdir-file.py
  172. +28 0 node_modules/node-gyp/gyp/test/actions-subdir/src/subdir/subdir.gyp
  173. +102 0 node_modules/node-gyp/gyp/test/actions/gyptest-all.py
  174. +69 0 node_modules/node-gyp/gyp/test/actions/gyptest-default.py
  175. +24 0 node_modules/node-gyp/gyp/test/actions/gyptest-errors.py
  176. +24 0 node_modules/node-gyp/gyp/test/actions/src/action_missing_name.gyp
  177. +114 0 node_modules/node-gyp/gyp/test/actions/src/actions.gyp
  178. +21 0 node_modules/node-gyp/gyp/test/actions/src/confirm-dep-files.py
  179. +46 0 node_modules/node-gyp/gyp/test/actions/src/subdir1/counter.py
  180. +74 0 node_modules/node-gyp/gyp/test/actions/src/subdir1/executable.gyp
  181. +20 0 node_modules/node-gyp/gyp/test/actions/src/subdir1/make-prog1.py
  182. +20 0 node_modules/node-gyp/gyp/test/actions/src/subdir1/make-prog2.py
  183. +12 0 node_modules/node-gyp/gyp/test/actions/src/subdir1/program.c
  184. +11 0 node_modules/node-gyp/gyp/test/actions/src/subdir2/make-file.py
  185. +33 0 node_modules/node-gyp/gyp/test/actions/src/subdir2/none.gyp
  186. +21 0 node_modules/node-gyp/gyp/test/actions/src/subdir3/generate_main.py
  187. +29 0 node_modules/node-gyp/gyp/test/actions/src/subdir3/null_input.gyp
  188. +56 0 node_modules/node-gyp/gyp/test/additional-targets/gyptest-additional.py
  189. +13 0 node_modules/node-gyp/gyp/test/additional-targets/src/all.gyp
  190. +56 0 node_modules/node-gyp/gyp/test/additional-targets/src/dir1/actions.gyp
  191. +11 0 node_modules/node-gyp/gyp/test/additional-targets/src/dir1/emit.py
  192. +6 0 node_modules/node-gyp/gyp/test/additional-targets/src/dir1/lib1.c
  193. +31 0 node_modules/node-gyp/gyp/test/assembly/gyptest-assembly.py
  194. +4 0 node_modules/node-gyp/gyp/test/assembly/src/as.bat
  195. +62 0 node_modules/node-gyp/gyp/test/assembly/src/assembly.gyp
  196. +15 0 node_modules/node-gyp/gyp/test/assembly/src/lib1.S
  197. +3 0  node_modules/node-gyp/gyp/test/assembly/src/lib1.c
  198. +12 0 node_modules/node-gyp/gyp/test/assembly/src/program.c
  199. +22 0 node_modules/node-gyp/gyp/test/build-option/gyptest-build.py
  200. +13 0 node_modules/node-gyp/gyp/test/build-option/hello.c
  201. +15 0 node_modules/node-gyp/gyp/test/build-option/hello.gyp
  202. +85 0 node_modules/node-gyp/gyp/test/builddir/gyptest-all.py
  203. +85 0 node_modules/node-gyp/gyp/test/builddir/gyptest-default.py
  204. +21 0 node_modules/node-gyp/gyp/test/builddir/src/builddir.gypi
  205. +6 0 node_modules/node-gyp/gyp/test/builddir/src/func1.c
  206. +6 0 node_modules/node-gyp/gyp/test/builddir/src/func2.c
  207. +6 0 node_modules/node-gyp/gyp/test/builddir/src/func3.c
  208. +6 0 node_modules/node-gyp/gyp/test/builddir/src/func4.c
  209. +6 0 node_modules/node-gyp/gyp/test/builddir/src/func5.c
  210. +10 0 node_modules/node-gyp/gyp/test/builddir/src/prog1.c
  211. +30 0 node_modules/node-gyp/gyp/test/builddir/src/prog1.gyp
  212. +10 0 node_modules/node-gyp/gyp/test/builddir/src/subdir2/prog2.c
  213. +19 0 node_modules/node-gyp/gyp/test/builddir/src/subdir2/prog2.gyp
  214. +10 0 node_modules/node-gyp/gyp/test/builddir/src/subdir2/subdir3/prog3.c
  215. +19 0 node_modules/node-gyp/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp
  216. +10 0 node_modules/node-gyp/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c
  217. +19 0 node_modules/node-gyp/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp
  218. +10 0 node_modules/node-gyp/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c
  219. +19 0 node_modules/node-gyp/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp
  220. +15 0 node_modules/node-gyp/gyp/test/cflags/cflags.c
  221. +16 0 node_modules/node-gyp/gyp/test/cflags/cflags.gyp
  222. +65 0 node_modules/node-gyp/gyp/test/cflags/gyptest-cflags.py
  223. +29 0 node_modules/node-gyp/gyp/test/compilable/gyptest-headers.py
  224. +26 0 node_modules/node-gyp/gyp/test/compilable/src/headers.gyp
  225. +7 0 node_modules/node-gyp/gyp/test/compilable/src/lib1.cpp
  226. +6 0 node_modules/node-gyp/gyp/test/compilable/src/lib1.hpp
  227. +9 0 node_modules/node-gyp/gyp/test/compilable/src/program.cpp
  228. +34 0 node_modules/node-gyp/gyp/test/compiler-override/compiler-global-settings.gyp.in
  229. +17 0 node_modules/node-gyp/gyp/test/compiler-override/compiler-host.gyp
  230. +16 0 node_modules/node-gyp/gyp/test/compiler-override/compiler.gyp
  231. +7 0 node_modules/node-gyp/gyp/test/compiler-override/cxxtest.cc
  232. +55 0 node_modules/node-gyp/gyp/test/compiler-override/gyptest-compiler-env.py
  233. +52 0 node_modules/node-gyp/gyp/test/compiler-override/gyptest-compiler-global-settings.py
  234. +6 0 node_modules/node-gyp/gyp/test/compiler-override/my_cc.py
  235. +6 0 node_modules/node-gyp/gyp/test/compiler-override/my_cxx.py
  236. +6 0 node_modules/node-gyp/gyp/test/compiler-override/my_ld.py
  237. +7 0 node_modules/node-gyp/gyp/test/compiler-override/test.c
  238. +15 0 node_modules/node-gyp/gyp/test/configurations/basics/configurations.c
  239. +32 0 node_modules/node-gyp/gyp/test/configurations/basics/configurations.gyp
  240. +29 0 node_modules/node-gyp/gyp/test/configurations/basics/gyptest-configurations.py
  241. +21 0 node_modules/node-gyp/gyp/test/configurations/inheritance/configurations.c
  242. +40 0 node_modules/node-gyp/gyp/test/configurations/inheritance/configurations.gyp
  243. +33 0 node_modules/node-gyp/gyp/test/configurations/inheritance/gyptest-inheritance.py
  244. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/actions.gyp
  245. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/all_dependent_settings.gyp
  246. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/configurations.gyp
  247. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/dependencies.gyp
  248. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/direct_dependent_settings.gyp
  249. +39 0 node_modules/node-gyp/gyp/test/configurations/invalid/gyptest-configurations.py
  250. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/libraries.gyp
  251. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/link_settings.gyp
  252. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/sources.gyp
  253. +17 0 node_modules/node-gyp/gyp/test/configurations/invalid/standalone_static_library.gyp
  254. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/target_name.gyp
  255. +18 0 node_modules/node-gyp/gyp/test/configurations/invalid/type.gyp
  256. +58 0 node_modules/node-gyp/gyp/test/configurations/target_platform/configurations.gyp
  257. +8 0 node_modules/node-gyp/gyp/test/configurations/target_platform/front.c
  258. +40 0 node_modules/node-gyp/gyp/test/configurations/target_platform/gyptest-target_platform.py
  259. +3 0  node_modules/node-gyp/gyp/test/configurations/target_platform/left.c
  260. +3 0  node_modules/node-gyp/gyp/test/configurations/target_platform/right.c
  261. +12 0 node_modules/node-gyp/gyp/test/configurations/x64/configurations.c
  262. +38 0 node_modules/node-gyp/gyp/test/configurations/x64/configurations.gyp
  263. +31 0 node_modules/node-gyp/gyp/test/configurations/x64/gyptest-x86.py
  264. +40 0 node_modules/node-gyp/gyp/test/copies/gyptest-all.py
  265. +40 0 node_modules/node-gyp/gyp/test/copies/gyptest-default.py
  266. +38 0 node_modules/node-gyp/gyp/test/copies/gyptest-slash.py
  267. +23 0 node_modules/node-gyp/gyp/test/copies/gyptest-updir.py
  268. +36 0 node_modules/node-gyp/gyp/test/copies/src/copies-slash.gyp
  269. +21 0 node_modules/node-gyp/gyp/test/copies/src/copies-updir.gyp
  270. +70 0 node_modules/node-gyp/gyp/test/copies/src/copies.gyp
  271. +1 0  node_modules/node-gyp/gyp/test/copies/src/directory/file3
  272. +1 0  node_modules/node-gyp/gyp/test/copies/src/directory/file4
  273. +1 0  node_modules/node-gyp/gyp/test/copies/src/directory/subdir/file5
  274. +1 0  node_modules/node-gyp/gyp/test/copies/src/file1
  275. +1 0  node_modules/node-gyp/gyp/test/copies/src/file2
  276. +1 0  node_modules/node-gyp/gyp/test/copies/src/parentdir/subdir/file6
  277. +18 0 node_modules/node-gyp/gyp/test/custom-generator/gyptest-custom-generator.py
  278. +14 0 node_modules/node-gyp/gyp/test/custom-generator/mygenerator.py
  279. +15 0 node_modules/node-gyp/gyp/test/custom-generator/test.gyp
  280. +15 0 node_modules/node-gyp/gyp/test/cxxflags/cxxflags.cc
  281. +16 0 node_modules/node-gyp/gyp/test/cxxflags/cxxflags.gyp
  282. +65 0 node_modules/node-gyp/gyp/test/cxxflags/gyptest-cxxflags.py
  283. +11 0 node_modules/node-gyp/gyp/test/defines-escaping/defines-escaping.c
  284. +19 0 node_modules/node-gyp/gyp/test/defines-escaping/defines-escaping.gyp
  285. +184 0 node_modules/node-gyp/gyp/test/defines-escaping/gyptest-defines-escaping.py
  286. +22 0 node_modules/node-gyp/gyp/test/defines/defines-env.gyp
  287. +23 0 node_modules/node-gyp/gyp/test/defines/defines.c
  288. +38 0 node_modules/node-gyp/gyp/test/defines/defines.gyp
  289. +34 0 node_modules/node-gyp/gyp/test/defines/gyptest-define-override.py
  290. +51 0 node_modules/node-gyp/gyp/test/defines/gyptest-defines-env-regyp.py
  291. +85 0 node_modules/node-gyp/gyp/test/defines/gyptest-defines-env.py
  292. +27 0 node_modules/node-gyp/gyp/test/defines/gyptest-defines.py
  293. +9 0 node_modules/node-gyp/gyp/test/dependencies/a.c
  294. +3 0  node_modules/node-gyp/gyp/test/dependencies/b/b.c
  295. +22 0 node_modules/node-gyp/gyp/test/dependencies/b/b.gyp
  296. +9 0 node_modules/node-gyp/gyp/test/dependencies/b/b3.c
  297. +4 0 node_modules/node-gyp/gyp/test/dependencies/c/c.c
  298. +22 0 node_modules/node-gyp/gyp/test/dependencies/c/c.gyp
  299. +3 0  node_modules/node-gyp/gyp/test/dependencies/c/d.c
  300. +23 0 node_modules/node-gyp/gyp/test/dependencies/double_dependency.gyp
  301. +12 0 node_modules/node-gyp/gyp/test/dependencies/double_dependent.gyp
  302. +18 0 node_modules/node-gyp/gyp/test/dependencies/extra_targets.gyp
  303. +19 0 node_modules/node-gyp/gyp/test/dependencies/gyptest-double-dependency.py
  304. +21 0 node_modules/node-gyp/gyp/test/dependencies/gyptest-extra-targets.py
  305. +39 0 node_modules/node-gyp/gyp/test/dependencies/gyptest-lib-only.py
  306. +25 0 node_modules/node-gyp/gyp/test/dependencies/gyptest-none-traversal.py
  307. +16 0 node_modules/node-gyp/gyp/test/dependencies/lib_only.gyp
  308. +14 0 node_modules/node-gyp/gyp/test/dependencies/main.c
  309. +46 0 node_modules/node-gyp/gyp/test/dependencies/none_traversal.gyp
  310. +26 0 node_modules/node-gyp/gyp/test/dependency-copy/gyptest-copy.py
  311. +25 0 node_modules/node-gyp/gyp/test/dependency-copy/src/copies.gyp
  312. +7 0 node_modules/node-gyp/gyp/test/dependency-copy/src/file1.c
  313. +7 0 node_modules/node-gyp/gyp/test/dependency-copy/src/file2.c
  314. +13 0 node_modules/node-gyp/gyp/test/errors/duplicate_basenames.gyp
  315. +12 0 node_modules/node-gyp/gyp/test/errors/duplicate_node.gyp
  316. +22 0 node_modules/node-gyp/gyp/test/errors/duplicate_rule.gyp
  317. +14 0 node_modules/node-gyp/gyp/test/errors/duplicate_targets.gyp
  318. +49 0 node_modules/node-gyp/gyp/test/errors/gyptest-errors.py
Sorry, we could not display the entire diff because too many files (1,262) changed.
1  .gitignore
@@ -16,3 +16,4 @@ npm-debug.log
16 16 /npmrc
17 17 /release/
18 18 /npm-*.tgz
  19 +/node_modules/npm-registry-client/test/fixtures
12 AUTHORS
@@ -71,10 +71,22 @@ Domenic Denicola <domenic@domenicdenicola.com>
71 71 James Halliday <mail@substack.net>
72 72 Jeremy Cantrell <jmcantrell@gmail.com>
73 73 Ribettes <patlogan29@gmail.com>
  74 +Einar Otto Stangvik <einaros@gmail.com>
74 75 Don Park <donpark@docuverse.com>
75 76 Kei Son <heyacct@gmail.com>
76 77 Nicolas Morel <marsup@gmail.com>
77 78 Mark Dube <markisdee@gmail.com>
  79 +Nathan Rajlich <nathan@tootallnate.net>
78 80 Maxim Bogushevich <boga1@mail.ru>
79 81 Justin Beckwith <justbe@microsoft.com>
80 82 Meaglin <Meaglin.wasabi@gmail.com>
  83 +Ben Evans <ben@bensbit.co.uk>
  84 +Nathan Zadoks <nathan@nathan7.eu>
  85 +Brian White <mscdex@gmail.com>
  86 +Jed Schmidt <tr@nslator.jp>
  87 +Ian Livingstone <ianl@cs.dal.ca>
  88 +Patrick Pfeiffer <patrick@buzzle.at>
  89 +Paul Miller <paul@paulmillr.com>
  90 +seebees <seebees@gmail.com>
  91 +Carl Lange <carl@flax.ie>
  92 +Jan Lehnardt <jan@apache.org>
2  Makefile
@@ -92,7 +92,7 @@ doc/cli/index.md: $(markdowns) scripts/index-build.js scripts/doc-build.sh packa
92 92 node scripts/index-build.js > $@
93 93
94 94 node_modules/.bin/ronn:
95   - node cli.js install
  95 + node cli.js install ronn
96 96
97 97 doc: man
98 98
4 README.md
Source Rendered
@@ -42,11 +42,11 @@ There's a pretty robust install script at
42 42
43 43 You can set any npm configuration params with that script:
44 44
45   -npm_config_prefix=/some/path sh install.sh
  45 + npm_config_prefix=/some/path sh install.sh
46 46
47 47 Or, you can run it in uber-debuggery mode:
48 48
49   -npm_debug=1 sh install.sh
  49 + npm_debug=1 sh install.sh
50 50
51 51 ### Even Fancier
52 52
2  doc/api/deprecate.md
Source Rendered
@@ -25,6 +25,8 @@ The 'args' parameter must have exactly two elements:
25 25 Note that you must be the package owner to deprecate something. See the
26 26 `owner` and `adduser` help topics.
27 27
  28 +To un-deprecate a package, specify an empty string (`""`) for the `message` argument.
  29 +
28 30 ## SEE ALSO
29 31
30 32 * npm-publish(3)
15 doc/api/npm.md
Source Rendered
@@ -4,7 +4,7 @@ npm(3) -- node package manager
4 4 ## SYNOPSIS
5 5
6 6 var npm = require("npm")
7   - npm.load(configObject, function (er, npm) {
  7 + npm.load([configObject,] function (er, npm) {
8 8 // use the npm object, now that it's loaded.
9 9
10 10 npm.config.set(key, val)
@@ -25,12 +25,13 @@ This is the API documentation for npm.
25 25 To find documentation of the command line
26 26 client, see `npm(1)`.
27 27
28   -Prior to using npm's commands,
29   -`npm.load()` must be called with an object hash of
30   -top-level configs. In the npm command line client,
31   -this set of configs is parsed from the command line options. Additional
32   -configuration params are loaded from two configuration files. See
33   -`npm-config(1)` for more information.
  28 +Prior to using npm's commands, `npm.load()` must be called.
  29 +If you provide `configObject` as an object hash of top-level
  30 +configs, they override the values stored in the various config
  31 +locations. In the npm command line client, this set of configs
  32 +is parsed from the command line options. Additional configuration
  33 +params are loaded from two configuration files. See `npm-config(1)`
  34 +for more information.
34 35
35 36 After that, each of the functions are accessible in the
36 37 commands object: `npm.commands.<cmd>`. See `npm-index(1)` for a list of
30 doc/cli/config.md
Source Rendered
@@ -36,11 +36,15 @@ work the same.
36 36 `$HOME/.npmrc` (or the `userconfig` param, if set above)
37 37
38 38 This file is an ini-file formatted list of `key = value` parameters.
  39 +Environment variables can be replaced using `${VARIABLE_NAME}`. For example:
  40 +
  41 + prefix = ${HOME}/.npm-packages
39 42
40 43 ### Global config file
41 44
42 45 `$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above):
43   -This file is an ini-file formatted list of `key = value` parameters
  46 +This file is an ini-file formatted list of `key = value` parameters.
  47 +Environment variables can be replaced as above.
44 48
45 49 ### Built-in config file
46 50
@@ -167,6 +171,18 @@ then the user could change the behavior by doing:
167 171 Force npm to always require authentication when accessing the registry,
168 172 even for `GET` requests.
169 173
  174 +### bin-links
  175 +
  176 +* Default: `true`
  177 +* Type: Boolean
  178 +
  179 +Tells npm to create symlinks (or `.cmd` shims on Windows) for package
  180 +executables.
  181 +
  182 +Set to false to have it not do this. This can be used to work around
  183 +the fact that some file systems don't support symlinks, even on
  184 +ostensibly Unix systems.
  185 +
170 186 ### browser
171 187
172 188 * Default: OS X: `"open"`, others: `"google-chrome"`
@@ -228,7 +244,7 @@ explicitly used, and that only GET requests use the cache.
228 244
229 245 ### cache-min
230 246
231   -* Default: 0
  247 +* Default: 10
232 248 * Type: Number
233 249
234 250 The minimum time (in seconds) to keep items in the registry cache before
@@ -357,10 +373,10 @@ Operates in "global" mode, so that packages are installed into the
357 373 `prefix` folder instead of the current working directory. See
358 374 `npm-folders(1)` for more on the differences in behavior.
359 375
360   -* packages are installed into the `prefix/node_modules` folder, instead of the
  376 +* packages are installed into the `{prefix}/lib/node_modules` folder, instead of the
361 377 current working directory.
362   -* bin files are linked to `prefix/bin`
363   -* man pages are linked to `prefix/share/man`
  378 +* bin files are linked to `{prefix}/bin`
  379 +* man pages are linked to `{prefix}/share/man`
364 380
365 381 ### globalconfig
366 382
@@ -398,7 +414,7 @@ A proxy to use for outgoing https requests.
398 414
399 415 ### user-agent
400 416
401   -* Default: npm/{npm.version} node/{process.version}
  417 +* Default: node/{process.version} {process.platform} {process.arch}
402 418 * Type: String
403 419
404 420 Sets a User-Agent to the request header
@@ -575,7 +591,7 @@ standard output.
575 591
576 592 ### prefix
577 593
578   -* Default: node's process.installPrefix
  594 +* Default: see npm-folders(1)
579 595 * Type: path
580 596
581 597 The location to install global items. If set on the command line, then
2  doc/cli/deprecate.md
Source Rendered
@@ -18,6 +18,8 @@ something like this:
18 18 Note that you must be the package owner to deprecate something. See the
19 19 `owner` and `adduser` help topics.
20 20
  21 +To un-deprecate a package, specify an empty string (`""`) for the `message` argument.
  22 +
21 23 ## SEE ALSO
22 24
23 25 * npm-publish(1)
13 doc/cli/disputes.md
Source Rendered
@@ -4,8 +4,10 @@ npm-disputes(1) -- Handling Module Name Disputes
4 4 ## SYNOPSIS
5 5
6 6 1. Get the author email with `npm owner ls <pkgname>`
7   -1. Email the author, CC <i@izs.me>.
8   -2. After a few weeks, if there's no resolution, we'll sort it out.
  7 +2. Email the author, CC <i@izs.me>.
  8 +3. After a few weeks, if there's no resolution, we'll sort it out.
  9 +
  10 +Don't squat on package names. Publish code or move out of the way.
9 11
10 12 ## DESCRIPTION
11 13
@@ -40,7 +42,7 @@ Joe's appropriate course of action in each case is the same.
40 42
41 43 1. `npm owner ls foo`. This will tell Joe the email address of the
42 44 owner (Bob).
43   -2. Joe emails Bob, explaining the situation **as respecfully as possible**,
  45 +2. Joe emails Bob, explaining the situation **as respectfully as possible**,
44 46 and what he would like to do with the module name. He adds
45 47 isaacs <i@izs.me> to the CC list of the email. Mention in the email
46 48 that Bob can run `npm owner add joe foo` to add Joe as an owner of
@@ -75,6 +77,11 @@ but not limited to:
75 77 MIT-licensed program, and then removing or changing the copyright and
76 78 license statement)
77 79 3. Illegal content.
  80 +4. "Squatting" on a package name that you *plan* to use, but aren't
  81 + actually using. Sorry, I don't care how great the name is, or how
  82 + perfect a fit it is for the thing that someday might happen. If
  83 + someone wants to use it today, and you're just taking up space with
  84 + an empty tarball, you're going to be evicted.
78 85
79 86 If you see bad behavior like this, please report it right away.
80 87
46 doc/cli/faq.md
Source Rendered
@@ -72,6 +72,52 @@ Write your own package manager, then. It's not that hard.
72 72
73 73 npm will not help you do something that is known to be a bad idea.
74 74
  75 +## `"node_modules"` is the name of my deity's arch-rival, and a Forbidden Word in my religion. Can I configure npm to use a different folder?
  76 +
  77 +No. This will never happen. This question comes up sometimes,
  78 +because it seems silly from the outside that npm couldn't just be
  79 +configured to put stuff somewhere else, and then npm could load them
  80 +from there. It's an arbitrary spelling choice, right? What's the big
  81 +deal?
  82 +
  83 +At the time of this writing, the string `'node_modules'` appears 151
  84 +times in 53 separate files in npm and node core (excluding tests and
  85 +documentation).
  86 +
  87 +Some of these references are in node's built-in module loader. Since
  88 +npm is not involved **at all** at run-time, node itself would have to
  89 +be configured to know where you've decided to stick stuff. Complexity
  90 +hurdle #1. Since the Node module system is locked, this cannot be
  91 +changed, and is enough to kill this request. But I'll continue, in
  92 +deference to your deity's delicate feelings regarding spelling.
  93 +
  94 +Many of the others are in dependencies that npm uses, which are not
  95 +necessarily tightly coupled to npm (in the sense that they do not read
  96 +npm's configuration files, etc.) Each of these would have to be
  97 +configured to take the name of the `node_modules` folder as a
  98 +parameter. Complexity hurdle #2.
  99 +
  100 +Furthermore, npm has the ability to "bundle" dependencies by adding
  101 +the dep names to the `"bundledDependencies"` list in package.json,
  102 +which causes the folder to be included in the package tarball. What
  103 +if the author of a module bundles its dependencies, and they use a
  104 +different spelling for `node_modules`? npm would have to rename the
  105 +folder at publish time, and then be smart enough to unpack it using
  106 +your locally configured name. Complexity hurdle #3.
  107 +
  108 +Furthermore, what happens when you *change* this name? Fine, it's
  109 +easy enough the first time, just rename the `node_modules` folders to
  110 +`./blergyblerp/` or whatever name you choose. But what about when you
  111 +change it again? npm doesn't currently track any state about past
  112 +configuration settings, so this would be rather difficult to do
  113 +properly. It would have to track every previous value for this
  114 +config, and always accept any of them, or else yesterday's install may
  115 +be broken tomorrow. Complexity hurdle #5.
  116 +
  117 +Never going to happen. The folder is named `node_modules`. It is
  118 +written indelibly in the Node Way, handed down from the ancient times
  119 +of Node 0.3.
  120 +
75 121 ## Should I check my `node_modules` folder into git?
76 122
77 123 Mikeal Rogers answered this question very well:
209 doc/cli/global.md
Source Rendered
... ... @@ -0,0 +1,209 @@
  1 +npm-folders(1) -- Folder Structures Used by npm
  2 +===============================================
  3 +
  4 +## DESCRIPTION
  5 +
  6 +npm puts various things on your computer. That's its job.
  7 +
  8 +This document will tell you what it puts where.
  9 +
  10 +### tl;dr
  11 +
  12 +* Local install (default): puts stuff in `./node_modules` of the current
  13 + package root.
  14 +* Global install (with `-g`): puts stuff in /usr/local or wherever node
  15 + is installed.
  16 +* Install it **locally** if you're going to `require()` it.
  17 +* Install it **globally** if you're going to run it on the command line.
  18 +* If you need both, then install it in both places, or use `npm link`.
  19 +
  20 +### prefix Configuration
  21 +
  22 +The `prefix` config defaults to the location where node is installed.
  23 +On most systems, this is `/usr/local`, and most of the time is the same
  24 +as node's `process.installPrefix`.
  25 +
  26 +On windows, this is the exact location of the node.exe binary. On Unix
  27 +systems, it's one level up, since node is typically installed at
  28 +`{prefix}/bin/node` rather than `{prefix}/node.exe`.
  29 +
  30 +When the `global` flag is set, npm installs things into this prefix.
  31 +When it is not set, it uses the root of the current package, or the
  32 +current working directory if not in a package already.
  33 +
  34 +### Node Modules
  35 +
  36 +Packages are dropped into the `node_modules` folder under the `prefix`.
  37 +When installing locally, this means that you can
  38 +`require("packagename")` to load its main module, or
  39 +`require("packagename/lib/path/to/sub/module")` to load other modules.
  40 +
  41 +Global installs on Unix systems go to `{prefix}/lib/node_modules`.
  42 +Global installs on Windows go to `{prefix}/node_modules` (that is, no
  43 +`lib` folder.)
  44 +
  45 +If you wish to `require()` a package, then install it locally.
  46 +
  47 +### Executables
  48 +
  49 +When in global mode, executables are linked into `{prefix}/bin` on Unix,
  50 +or directly into `{prefix}` on Windows.
  51 +
  52 +When in local mode, executables are linked into
  53 +`./node_modules/.bin` so that they can be made available to scripts run
  54 +through npm. (For example, so that a test runner will be in the path
  55 +when you run `npm test`.)
  56 +
  57 +### Man Pages
  58 +
  59 +When in global mode, man pages are linked into `{prefix}/share/man`.
  60 +
  61 +When in local mode, man pages are not installed.
  62 +
  63 +Man pages are not installed on Windows systems.
  64 +
  65 +### Cache
  66 +
  67 +See `npm-cache(1)`. Cache files are stored in `~/.npm` on Posix, or
  68 +`~/npm-cache` on Windows.
  69 +
  70 +This is controlled by the `cache` configuration param.
  71 +
  72 +### Temp Files
  73 +
  74 +Temporary files are stored by default in the folder specified by the
  75 +`tmp` config, which defaults to the TMPDIR, TMP, or TEMP environment
  76 +variables, or `/tmp` on Unix and `c:\windows\temp` on Windows.
  77 +
  78 +Temp files are given a unique folder under this root for each run of the
  79 +program, and are deleted upon successful exit.
  80 +
  81 +## More Information
  82 +
  83 +When installing locally, npm first tries to find an appropriate
  84 +`prefix` folder. This is so that `npm install foo@1.2.3` will install
  85 +to the sensible root of your package, even if you happen to have `cd`ed
  86 +into some other folder.
  87 +
  88 +Starting at the $PWD, npm will walk up the folder tree checking for a
  89 +folder that contains either a `package.json` file, or a `node_modules`
  90 +folder. If such a thing is found, then that is treated as the effective
  91 +"current directory" for the purpose of running npm commands. (This
  92 +behavior is inspired by and similar to git's .git-folder seeking
  93 +logic when running git commands in a working dir.)
  94 +
  95 +If no package root is found, then the current folder is used.
  96 +
  97 +When you run `npm install foo@1.2.3`, then the package is loaded into
  98 +the cache, and then unpacked into `./node_modules/foo`. Then, any of
  99 +foo's dependencies are similarly unpacked into
  100 +`./node_modules/foo/node_modules/...`.
  101 +
  102 +Any bin files are symlinked to `./node_modules/.bin/`, so that they may
  103 +be found by npm scripts when necessary.
  104 +
  105 +### Global Installation
  106 +
  107 +If the `global` configuration is set to true, then npm will
  108 +install packages "globally".
  109 +
  110 +For global installation, packages are installed roughly the same way,
  111 +but using the folders described above.
  112 +
  113 +### Cycles, Conflicts, and Folder Parsimony
  114 +
  115 +Cycles are handled using the property of node's module system that it
  116 +walks up the directories looking for `node_modules` folders. So, at every
  117 +stage, if a package is already installed in an ancestor `node_modules`
  118 +folder, then it is not installed at the current location.
  119 +
  120 +Consider the case above, where `foo -> bar -> baz`. Imagine if, in
  121 +addition to that, baz depended on bar, so you'd have:
  122 +`foo -> bar -> baz -> bar -> baz ...`. However, since the folder
  123 +structure is: `foo/node_modules/bar/node_modules/baz`, there's no need to
  124 +put another copy of bar into `.../baz/node_modules`, since when it calls
  125 +require("bar"), it will get the copy that is installed in
  126 +`foo/node_modules/bar`.
  127 +
  128 +This shortcut is only used if the exact same
  129 +version would be installed in multiple nested `node_modules` folders. It
  130 +is still possible to have `a/node_modules/b/node_modules/a` if the two
  131 +"a" packages are different versions. However, without repeating the
  132 +exact same package multiple times, an infinite regress will always be
  133 +prevented.
  134 +
  135 +Another optimization can be made by installing dependencies at the
  136 +highest level possible, below the localized "target" folder.
  137 +
  138 +#### Example
  139 +
  140 +Consider this dependency graph:
  141 +
  142 + foo
  143 + +-- blerg@1.2.5
  144 + +-- bar@1.2.3
  145 + | +-- blerg@1.x (latest=1.3.7)
  146 + | +-- baz@2.x
  147 + | | `-- quux@3.x
  148 + | | `-- bar@1.2.3 (cycle)
  149 + | `-- asdf@*
  150 + `-- baz@1.2.3
  151 + `-- quux@3.x
  152 + `-- bar
  153 +
  154 +In this case, we might expect a folder structure like this:
  155 +
  156 + foo
  157 + +-- node_modules
  158 + +-- blerg (1.2.5) <---[A]
  159 + +-- bar (1.2.3) <---[B]
  160 + | +-- node_modules
  161 + | | `-- baz (2.0.2) <---[C]
  162 + | | `-- node_modules
  163 + | | `-- quux (3.2.0)
  164 + | `-- asdf (2.3.4)
  165 + `-- baz (1.2.3) <---[D]
  166 + `-- node_modules
  167 + `-- quux (3.2.0) <---[E]
  168 +
  169 +Since foo depends directly on bar@1.2.3 and baz@1.2.3, those are
  170 +installed in foo's `node_modules` folder.
  171 +
  172 +Even though the latest copy of blerg is 1.3.7, foo has a specific
  173 +dependency on version 1.2.5. So, that gets installed at [A]. Since the
  174 +parent installation of blerg satisfie's bar's dependency on blerg@1.x,
  175 +it does not install another copy under [B].
  176 +
  177 +Bar [B] also has dependencies on baz and asdf, so those are installed in
  178 +bar's `node_modules` folder. Because it depends on `baz@2.x`, it cannot
  179 +re-use the `baz@1.2.3` installed in the parent `node_modules` folder [D],
  180 +and must install its own copy [C].
  181 +
  182 +Underneath bar, the `baz->quux->bar` dependency creates a cycle.
  183 +However, because `bar` is already in `quux`'s ancestry [B], it does not
  184 +unpack another copy of bar into that folder.
  185 +
  186 +Underneath `foo->baz` [D], quux's [E] folder tree is empty, because its
  187 +dependency on bar is satisfied by the parent folder copy installed at [B].
  188 +
  189 +For a graphical breakdown of what is installed where, use `npm ls`.
  190 +
  191 +### Publishing
  192 +
  193 +Upon publishing, npm will look in the `node_modules` folder. If any of
  194 +the items there are not in the `bundledDependencies` array, then they will
  195 +not be included in the package tarball.
  196 +
  197 +This allows a package maintainer to install all of their dependencies
  198 +(and dev dependencies) locally, but only re-publish those items that
  199 +cannot be found elsewhere. See `npm-json(1)` for more information.
  200 +
  201 +## SEE ALSO
  202 +
  203 +* npm-faq(1)
  204 +* npm-json(1)
  205 +* npm-install(1)
  206 +* npm-pack(1)
  207 +* npm-cache(1)
  208 +* npm-config(1)
  209 +* npm-publish(1)
3  doc/cli/install.md
Source Rendered
@@ -165,6 +165,9 @@ rather than locally. See `npm-folders(1)`.
165 165 The `--link` argument will cause npm to link global installs into the
166 166 local space in some cases.
167 167
  168 +The `--no-bin-links` argument will prevent npm from creating symlinks for
  169 +any binaries the package might contain.
  170 +
168 171 See `npm-config(1)`. Many of the configuration params have some
169 172 effect on installation, since that's most of what npm does.
170 173
31 doc/cli/json.md
Source Rendered
@@ -118,6 +118,27 @@ you can specify the value for "bugs" as a simple string instead of an object.
118 118
119 119 If a url is provided, it will be used by the `npm bugs` command.
120 120
  121 +## license
  122 +
  123 +You should specify a license for your package so that people know how they are
  124 +permitted to use it, and any restrictions you're placing on it.
  125 +
  126 +The simplest way, assuming you're using a common license such as BSD or MIT, is
  127 +to just specify the name of the license you're using, like this:
  128 +
  129 + { "license" : "BSD" }
  130 +
  131 +If you have more complex licensing terms, or you want to provide more detail
  132 +in your package.json file, you can use the more verbose plural form, like this:
  133 +
  134 + "licenses" : [
  135 + { "type" : "MyLicense"
  136 + , "url" : "http://github.com/owner/project/path/to/license"
  137 + }
  138 + ]
  139 +
  140 +It's also a good idea to include a license file at the top level in your package.
  141 +
121 142 ## people fields: author, contributors
122 143
123 144 The "author" is one person. "contributors" is an array of people. A "person"
@@ -366,8 +387,8 @@ a version in the following fashion.
366 387 For example, the following are equivalent:
367 388
368 389 * `"~1.2.3" = ">=1.2.3 <1.3.0"`
369   -* `"~1.2" = ">=1.2.0 <2.0.0"`
370   -* `"~1" = ">=1.0.0 <2.0.0"`
  390 +* `"~1.2" = ">=1.2.0 <1.3.0"`
  391 +* `"~1" = ">=1.0.0 <1.1.0"`
371 392
372 393 ### X Version Ranges
373 394
@@ -416,9 +437,9 @@ In this case, it's best to list these additional items in a
416 437 `devDependencies` hash.
417 438
418 439 These things will be installed whenever the `--dev` configuration flag
419   -is set. This flag is set automatically when doing `npm link`, and can
420   -be managed like any other npm configuration param. See `npm-config(1)`
421   -for more on the topic.
  440 +is set. This flag is set automatically when doing `npm link` or when doing
  441 +`npm install` from the root of a package, and can be managed like any other npm
  442 +configuration param. See `npm-config(1)` for more on the topic.
422 443
423 444 ## bundledDependencies
424 445
4 doc/cli/registry.md
Source Rendered
@@ -82,9 +82,7 @@ ask for help on the <npm-@googlegroups.com> mailing list.
82 82
83 83 ## Is there a website or something to see package docs and such?
84 84
85   -No, but such a thing is planned, and a tiny bit developed.
86   -
87   -Stay tuned!
  85 +Yes, head over to <https://npmjs.org/>
88 86
89 87 ## SEE ALSO
90 88
19 doc/cli/rm.md
Source Rendered
... ... @@ -0,0 +1,19 @@
  1 +npm-rm(1) -- Remove a package
  2 +=============================
  3 +
  4 +## SYNOPSIS
  5 +
  6 + npm rm <name>
  7 + npm uninstall <name>
  8 +
  9 +## DESCRIPTION
  10 +
  11 +This uninstalls a package, completely removing everything npm installed
  12 +on its behalf.
  13 +
  14 +## SEE ALSO
  15 +
  16 +* npm-prune(1)
  17 +* npm-install(1)
  18 +* npm-folders(1)
  19 +* npm-config(1)
53 doc/cli/scripts.md
Source Rendered
@@ -6,6 +6,11 @@ npm-scripts(1) -- How npm handles the "scripts" field
6 6 npm supports the "scripts" member of the package.json script, for the
7 7 following scripts:
8 8
  9 +* prepublish:
  10 + Run BEFORE the package is published. (Also run on local `npm
  11 + install` without any arguments.)
  12 +* publish, postpublish:
  13 + Run AFTER the package is published.
9 14 * preinstall:
10 15 Run BEFORE the package is installed
11 16 * install, postinstall:
@@ -18,10 +23,6 @@ following scripts:
18 23 Run BEFORE the package is updated with the update command.
19 24 * update, postupdate:
20 25 Run AFTER the package is updated with the update command.
21   -* prepublish:
22   - Run BEFORE the package is published.
23   -* publish, postpublish:
24   - Run AFTER the package is published.
25 26 * pretest, test, posttest:
26 27 Run by the `npm test` command.
27 28 * prestop, stop, poststop:
@@ -35,6 +36,50 @@ following scripts:
35 36 Additionally, arbitrary scrips can be run by doing
36 37 `npm run-script <stage> <pkg>`.
37 38
  39 +## NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
  40 +
  41 +**tl;dr** Don't use `install`. Use a `.gyp` file for compilation, and
  42 +`prepublish` for anything else.
  43 +
  44 +You should almost never have to explicitly set a `preinstall` or
  45 +`install` script. If you are doing this, please consider if there is
  46 +another option.
  47 +
  48 +The only valid use of `install` or `preinstall` scripts is for
  49 +compilation which must be done on the target architecture. In early
  50 +versions of node, this was often done using the `node-waf` scripts, or
  51 +a standalone `Makefile`, and early versions of npm required that it be
  52 +explicitly set in package.json. This was not portable, and harder to
  53 +do properly.
  54 +
  55 +In the current version of node, the standard way to do this is using a
  56 +`.gyp` file. If you have a file with a `.gyp` extension in the root
  57 +of your package, then npm will run the appropriate `node-gyp` commands
  58 +automatically at install time. This is the only officially supported
  59 +method for compiling binary addons, and does not require that you add
  60 +anything to your package.json file.
  61 +
  62 +If you have to do other things before your package is used, in a way
  63 +that is not dependent on the operating system or architecture of the
  64 +target system, then use a `prepublish` script instead. This includes
  65 +tasks such as:
  66 +
  67 +* Compile CoffeeScript source code into JavaScript.
  68 +* Create minified versions of JavaScript source code.
  69 +* Fetching remote resources that your package will use.
  70 +
  71 +The advantage of doing these things at `prepublish` time instead of
  72 +`preinstall` or `install` time is that they can be done once, in a
  73 +single place, and thus greatly reduce complexity and variability.
  74 +Additionally, this means that:
  75 +
  76 +* You can depend on `coffee-script` as a `devDependency`, and thus
  77 + your users don't need to have it installed.
  78 +* You don't need to include the minifiers in your package, reducing
  79 + the size for your users.
  80 +* You don't need to rely on your users having `curl` or `wget` or
  81 + other system tools on the target machines.
  82 +
38 83 ## DEFAULT VALUES
39 84
40 85 npm will default some script values based on package contents.
6 doc/cli/semver.md
Source Rendered
@@ -11,8 +11,8 @@ As a node module:
11 11
12 12 $ npm install semver
13 13
14   - semver.valid('1.2.3') // true
15   - semver.valid('a.b.c') // false
  14 + semver.valid('1.2.3') // '1.2.3'
  15 + semver.valid('a.b.c') // null
16 16 semver.clean(' =v1.2.3 ') // '1.2.3'
17 17 semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
18 18 semver.gt('1.2.3', '9.8.7') // false
@@ -83,7 +83,7 @@ The following range styles are supported:
83 83 * `<1.2.3` Less than
84 84 * `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
85 85 * `~1.2.3` := `>=1.2.3 <1.3.0`
86   -* `~1.2` := `>=1.2.0 <2.0.0`
  86 +* `~1.2` := `>=1.2.0 <1.3.0`
87 87 * `~1` := `>=1.0.0 <2.0.0`
88 88 * `1.2.x` := `>=1.2.0 <1.3.0`
89 89 * `1.x` := `>=1.0.0 <2.0.0`
22 doc/cli/stars.md
Source Rendered
... ... @@ -0,0 +1,22 @@
  1 +npm-stars(1) -- View packages marked as favorites
  2 +=================================================
  3 +
  4 +## SYNOPSIS
  5 +
  6 + npm stars
  7 + npm stars [username]
  8 +
  9 +## DESCRIPTION
  10 +
  11 +If you have starred a lot of neat things and want to find them again
  12 +quickly this command lets you do just that.
  13 +
  14 +You may also want to see your friend's favorite packages, in this case
  15 +you will most certainly enjoy this command.
  16 +
  17 +## SEE ALSO
  18 +
  19 +* npm-star(1)
  20 +* npm-view(1)
  21 +* npm-whoami(1)
  22 +* npm-adduser(1)
5 doc/cli/update.md
Source Rendered
@@ -3,7 +3,7 @@ npm-update(1) -- Update a package
3 3
4 4 ## SYNOPSIS
5 5
6   - npm update [<name> [<name> ...]]
  6 + npm update [-g] [<name> [<name> ...]]
7 7
8 8 ## DESCRIPTION
9 9
@@ -12,6 +12,9 @@ This command will update all the packages listed to the latest version
12 12
13 13 It will also install missing packages.
14 14
  15 +If the `-g` flag is specified, this command will update globally installed packages.
  16 +If no package name is specified, all packages in the specified location (global or local) will be updated.
  17 +
15 18 ## SEE ALSO
16 19
17 20 * npm-install(1)
11 doc/cli/version.md
Source Rendered
@@ -27,7 +27,16 @@ resulting version number. For example:
27 27
28 28 If the `sign-git-tag` config is set, then the tag will be signed using
29 29 the `-s` flag to git. Note that you must have a default GPG key set up
30   -in your git config for this to work properly.
  30 +in your git config for this to work properly. For example:
  31 +
  32 + $ npm config set sign-git-tag true
  33 + $ npm version patch
  34 +
  35 + You need a passphrase to unlock the secret key for
  36 + user: "isaacs (http://blog.izs.me/) <i@izs.me>"
  37 + 2048-bit RSA key, ID 6C481CF6, created 2010-08-31
  38 +
  39 + Enter passphrase:
31 40
32 41 ## SEE ALSO
33 42
4 doc/cli/view.md
Source Rendered
@@ -69,7 +69,9 @@ was required by each matching version of yui3:
69 69
70 70 If only a single string field for a single version is output, then it
71 71 will not be colorized or quoted, so as to enable piping the output to
72   -another command.
  72 +another command. If the field is an object, it will be output as a JavaScript object literal.
  73 +
  74 +If the --json flag is given, the outputted fields will be JSON.
73 75
74 76 If the version range matches multiple versions, than each printed value
75 77 will be prefixed with the version it applies to.
5 lib/build.js
@@ -69,6 +69,9 @@ function writeBuiltinConf (folder, cb) {
69 69 }
70 70
71 71 function linkStuff (pkg, folder, global, didRB, cb) {
  72 + // allow to opt out of linking binaries.
  73 + if (npm.config.get("bin-links") === false) return cb()
  74 +
72 75 // if it's global, and folder is in {prefix}/node_modules,
73 76 // then bins are in {prefix}/bin
74 77 // otherwise, then bins are in folder/../.bin
@@ -109,7 +112,7 @@ function rebuildBundles (pkg, folder, parent, gtop, cb) {
109 112 chain(files.filter(function (file) {
110 113 // rebuild if:
111 114 // not a .folder, like .bin or .hooks
112   - return file.charAt(0) !== "."
  115 + return !file.match(/^[\._-]/)
113 116 // not some old 0.x style bundle
114 117 && file.indexOf("@") === -1
115 118 // either not a dep, or explicitly bundled
387 lib/cache.js
@@ -51,14 +51,16 @@ adding a local tarball:
51 51 */
52 52
53 53 exports = module.exports = cache
54   -exports.read = read
55   -exports.clean = clean
56   -exports.unpack = unpack
57   -exports.lock = lock
58   -exports.unlock = unlock
  54 +cache.read = read
  55 +cache.clean = clean
  56 +cache.unpack = unpack
  57 +cache.lock = lock
  58 +cache.unlock = unlock
59 59
60 60 var mkdir = require("mkdirp")
61 61 , exec = require("./utils/exec.js")
  62 + , spawn = require("child_process").spawn
  63 + , once = require("once")
62 64 , fetch = require("./utils/fetch.js")
63 65 , npm = require("./npm.js")
64 66 , fs = require("graceful-fs")
@@ -77,6 +79,8 @@ var mkdir = require("mkdirp")
77 79 , lockFile = require("lockfile")
78 80 , crypto = require("crypto")
79 81 , retry = require("retry")
  82 + , zlib = require("zlib")
  83 + , chmodr = require("chmodr")
80 84
81 85 cache.usage = "npm cache add <tarball file>"
82 86 + "\nnpm cache add <folder>"
@@ -136,6 +140,8 @@ function read (name, ver, forceBypass, cb) {
136 140 }
137 141
138 142 readJson(jsonFile, function (er, data) {
  143 + er = needVersion(er, data)
  144 + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
139 145 if (er) return addNamed(name, ver, c)
140 146 deprCheck(data)
141 147 c(er, data)
@@ -150,7 +156,7 @@ function ls (args, cb) {
150 156 if (0 === prefix.indexOf(process.env.HOME)) {
151 157 prefix = "~" + prefix.substr(process.env.HOME.length)
152 158 }
153   - ls_(args, npm.config.get("depth"), function(er, files) {
  159 + ls_(args, npm.config.get("depth"), function (er, files) {
154 160 console.log(files.map(function (f) {
155 161 return path.join(prefix, f)
156 162 }).join("\n").trim())
@@ -187,7 +193,7 @@ function clean (args, cb) {
187 193 // npm cache add <pkg> <ver>
188 194 // npm cache add <tarball>
189 195 // npm cache add <folder>
190   -exports.add = function (pkg, ver, scrub, cb) {
  196 +cache.add = function (pkg, ver, scrub, cb) {
191 197 if (typeof cb !== "function") cb = scrub, scrub = false
192 198 if (typeof cb !== "function") cb = ver, ver = null
193 199 if (scrub) {
@@ -229,7 +235,7 @@ function add (args, cb) {
229 235 spec = args[0]
230 236 }
231 237
232   - log.silly("cache add", "name=%j spec=%j args=%j", name, spec, args)
  238 + log.verbose("cache add", "name=%j spec=%j args=%j", name, spec, args)
233 239
234 240
235 241 if (!name && !spec) return cb(usage)
@@ -278,9 +284,11 @@ function fetchAndShaCheck (u, tmp, shasum, cb) {
278 284 log.error("fetch failed", u)
279 285 return cb(er, response)
280 286 }
281   - if (!shasum) return cb()
  287 + if (!shasum) return cb(null, response)
282 288 // validate that the url we just downloaded matches the expected shasum.
283   - sha.check(tmp, shasum, cb)
  289 + sha.check(tmp, shasum, function (er) {
  290 + return cb(er, response, shasum)
  291 + })
284 292 })
285 293 }
286 294
@@ -297,6 +305,10 @@ function addRemoteTarball (u, shasum, name, cb_) {
297 305 if (iF.length > 1) return
298 306
299 307 function cb (er, data) {
  308 + if (data) {
  309 + data._from = u
  310 + data._resolved = u
  311 + }
300 312 unlock(u, function () {
301 313 var c
302 314 while (c = iF.shift()) c(er, data)
@@ -304,46 +316,55 @@ function addRemoteTarball (u, shasum, name, cb_) {
304 316 })
305 317 }
306 318
  319 + var tmp = path.join(npm.tmp, Date.now()+"-"+Math.random(), "tmp.tgz")
  320 +
307 321 lock(u, function (er) {
308 322 if (er) return cb(er)
309 323
310 324 log.verbose("addRemoteTarball", [u, shasum])
311   - var tmp = path.join(npm.tmp, Date.now()+"-"+Math.random(), "tmp.tgz")
312 325 mkdir(path.dirname(tmp), function (er) {
313 326 if (er) return cb(er)
314   - // Tuned to spread 3 attempts over about a minute.
315   - // See formula at <https://github.com/tim-kos/node-retry>.
316   - var operation = retry.operation
317   - ( { retries: npm.config.get("fetch-retries")
318   - , factor: npm.config.get("fetch-retry-factor")
319   - , minTimeout: npm.config.get("fetch-retry-mintimeout")
320   - , maxTimeout: npm.config.get("fetch-retry-maxtimeout") })
321   -
322   - operation.attempt(function (currentAttempt) {
323   - log.info("retry", "fetch attempt " + currentAttempt
324   - + " at " + (new Date()).toLocaleTimeString())
325   - fetchAndShaCheck(u, tmp, shasum, function (er, response) {
326   - // Only retry on 408, 5xx or no `response`.
327   - var statusCode = response && response.statusCode
328   - var statusRetry = !statusCode || (statusCode === 408 || statusCode >= 500)
329   - if (er && statusRetry && operation.retry(er)) {
330   - log.info("retry", "will retry, error on last attempt: " + er)
331   - return
332   - }
333   - done(er)
334   - })
335   - })
  327 + addRemoteTarball_(u, tmp, shasum, done)
336 328 })
337   - function done (er) {
338   - if (er) return cb(er)
339   - addLocalTarball(tmp, name, cb)
340   - }
341 329 })
  330 +
  331 + function done (er, resp, shasum) {
  332 + if (er) return cb(er)
  333 + addLocalTarball(tmp, name, shasum, cb)
  334 + }
342 335 }
343 336
344   -// For now, this is kind of dumb. Just basically treat git as
345   -// yet another "fetch and scrub" kind of thing.
346   -// Clone to temp folder, then proceed with the addLocal stuff.
  337 +function addRemoteTarball_(u, tmp, shasum, cb) {
  338 + // Tuned to spread 3 attempts over about a minute.
  339 + // See formula at <https://github.com/tim-kos/node-retry>.
  340 + var operation = retry.operation
  341 + ( { retries: npm.config.get("fetch-retries")
  342 + , factor: npm.config.get("fetch-retry-factor")
  343 + , minTimeout: npm.config.get("fetch-retry-mintimeout")
  344 + , maxTimeout: npm.config.get("fetch-retry-maxtimeout") })
  345 +
  346 + operation.attempt(function (currentAttempt) {
  347 + log.info("retry", "fetch attempt " + currentAttempt
  348 + + " at " + (new Date()).toLocaleTimeString())
  349 + fetchAndShaCheck(u, tmp, shasum, function (er, response, shasum) {
  350 + // Only retry on 408, 5xx or no `response`.
  351 + var sc = response && response.statusCode
  352 + var statusRetry = !sc || (sc === 408 || sc >= 500)
  353 + if (er && statusRetry && operation.retry(er)) {
  354 + log.info("retry", "will retry, error on last attempt: " + er)
  355 + return
  356 + }
  357 + cb(er, response, shasum)
  358 + })
  359 + })
  360 +}
  361 +
  362 +// 1. cacheDir = path.join(cache,'_git-remotes',sha1(u))