diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-08-17 13:05:20 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-08-17 13:05:20 +0200 |
commit | a177f55b0c022b5a77e9660beea5e190bc4c6e88 (patch) | |
tree | 969156e456a55ad3470a64fb3bca1806c8020463 | |
parent | 90ea68107a94b33e6b20cd9c2af8547b8c41da7c (diff) | |
parent | 9918e5d4f6fbc8fe63d0395170a2daef2484d17a (diff) | |
download | node-new-a177f55b0c022b5a77e9660beea5e190bc4c6e88.tar.gz |
Merge remote-tracking branch 'origin/v0.8'
Conflicts:
ChangeLog
src/node_version.h
test/message/stdin_messages.out
tools/install.py
316 files changed, 4168 insertions, 2029 deletions
@@ -354,3 +354,5 @@ Pavel Lang <langpavel@phpskelet.org> Peter Rybin <peter.rybin@gmail.com> Eugen Dueck <eugen@dueck.org> Gil Pedersen <git@gpost.dk> +Tyler Neylon <tylerneylon@gmail.com> +Golo Roden <webmaster@goloroden.de> @@ -21,7 +21,53 @@ * Fix #3521 Make process.env more like a regular Object (isaacs) -2012.08.02, Version 0.8.5 (Stable) +2012.08.15, Version 0.8.7 (Stable) + +* npm: Upgrade to 1.1.49 + +* website: download page (Golo Roden) + +* crypto: fix uninitialized memory access in openssl (Ben Noordhuis) + +* buffer, crypto: fix buffer decoding (Ben Noordhuis) + +* build: compile with -fno-tree-vrp when gcc >= 4.0 (Ben Noordhuis) + +* tls: handle multiple CN fields when verifying cert (Ben Noordhuis) + +* doc: remove unused util from child_process (Kyle Robinson Young) + +* build: rework -fvisibility=hidden detection (Ben Noordhuis) + +* windows: don't duplicate invalid stdio handles (Bert Belder) + +* windows: fix typos in process-stdio.c (Bert Belder) + + +2012.08.07, Version 0.8.6 (Stable), 0544a586ca6b6b900a42e164033dbf350765700a + +* npm: Upgrade to v1.1.48 + +* Add 'make binary' to build binary tarballs for all Unixes (Nathan Rajlich) + +* zlib: Emit 'close' on destroy(). (Dominic Tarr) + +* child_process: Fix stdout=null when stdio=['pipe'] (Tyler Neylon) + +* installer: prevent ETXTBSY errors (Ben Noordhuis) + +* installer: honor --without-npm, default install path (Ben Noordhuis) + +* net: make pause work with connecting sockets (Bert Belder) + +* installer: fix cross-compile installs (Ben Noordhuis) + +* net: fix .listen({fd:0}) (Ben Noordhuis) + +* windows: map WSANO_DATA to UV_ENOENT (Bert Belder) + + +2012.08.02, Version 0.8.5 (Stable), 9b86a4453f0c76f2707a75c0b2343aba33ec63bc * node: tag Encode and friends NODE_EXTERN (Ben Noordhuis) @@ -114,7 +114,7 @@ apidoc_sources = $(wildcard doc/api/*.markdown) apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \ $(addprefix out/,$(apidoc_sources:.markdown=.json)) -apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/logos out/doc/images +apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/download out/doc/logos out/doc/images apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*))) @@ -132,6 +132,7 @@ website_files = \ out/doc/pipe.css \ out/doc/about/index.html \ out/doc/community/index.html \ + out/doc/download/index.html \ out/doc/logos/index.html \ out/doc/changelog.html \ $(doc_images) @@ -192,8 +193,22 @@ docclean: -rm -rf out/doc VERSION=v$(shell $(PYTHON) tools/getnodeversion.py) +RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py) +PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]') +ifeq ($(findstring x86_64,$(shell uname -m)),x86_64) +DESTCPU ?= x64 +else +DESTCPU ?= ia32 +endif +ifeq ($(DESTCPU),x64) +ARCH=x64 +else +ARCH=x86 +endif TARNAME=node-$(VERSION) TARBALL=$(TARNAME).tar.gz +BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) +BINARYTAR=$(BINARYNAME).tar.gz PKG=out/$(TARNAME).pkg packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker @@ -201,9 +216,31 @@ dist: doc $(TARBALL) $(PKG) PKGDIR=out/dist-osx +release-only: + @if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \ + exit 0 ; \ + else \ + echo "" >&2 ; \ + echo "The git repository is not clean." >&2 ; \ + echo "Please commit changes before building release tarball." >&2 ; \ + echo "" >&2 ; \ + git status --porcelain | egrep -v '^\?\?' >&2 ; \ + echo "" >&2 ; \ + exit 1 ; \ + fi + @if [ "$(RELEASE)" = "1" ]; then \ + exit 0; \ + else \ + echo "" >&2 ; \ + echo "#NODE_VERSION_IS_RELEASE is set to $(RELEASE)." >&2 ; \ + echo "Did you remember to update src/node_version.cc?" >&2 ; \ + echo "" >&2 ; \ + exit 1 ; \ + fi + pkg: $(PKG) -$(PKG): +$(PKG): release-only rm -rf $(PKGDIR) rm -rf out/deps out/Release ./configure --prefix=$(PKGDIR)/32/usr/local --without-snapshot --dest-cpu=ia32 @@ -224,27 +261,7 @@ $(PKG): --out $(PKG) SIGN="$(SIGN)" PKG="$(PKG)" bash tools/osx-productsign.sh -$(TARBALL): node doc - @if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \ - exit 0 ; \ - else \ - echo "" >&2 ; \ - echo "The git repository is not clean." >&2 ; \ - echo "Please commit changes before building release tarball." >&2 ; \ - echo "" >&2 ; \ - git status --porcelain | egrep -v '^\?\?' >&2 ; \ - echo "" >&2 ; \ - exit 1 ; \ - fi - @if [ $(shell ./node --version) = "$(VERSION)" ]; then \ - exit 0; \ - else \ - echo "" >&2 ; \ - echo "$(shell ./node --version) doesn't match $(VERSION)." >&2 ; \ - echo "Did you remember to update src/node_version.cc?" >&2 ; \ - echo "" >&2 ; \ - exit 1 ; \ - fi +$(TARBALL): release-only node doc git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf - mkdir -p $(TARNAME)/doc/api cp doc/node.1 $(TARNAME)/doc/node.1 @@ -256,6 +273,22 @@ $(TARBALL): node doc rm -rf $(TARNAME) gzip -f -9 $(TARNAME).tar +tar: $(TARBALL) + +$(BINARYTAR): release-only + rm -rf $(BINARYNAME) + rm -rf out/deps out/Release + ./configure --prefix=/ --without-snapshot --dest-cpu=$(DESTCPU) + $(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1 + cp README.md $(BINARYNAME) + cp LICENSE $(BINARYNAME) + cp ChangeLog $(BINARYNAME) + tar -cf $(BINARYNAME).tar $(BINARYNAME) + rm -rf $(BINARYNAME) + gzip -f -9 $(BINARYNAME).tar + +binary: $(BINARYTAR) + dist-upload: $(TARBALL) $(PKG) ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION) scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL) @@ -280,4 +313,4 @@ cpplint: lint: jslint cpplint -.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all website-upload pkg blog blogclean +.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all website-upload pkg blog blogclean tar binary release-only diff --git a/common.gypi b/common.gypi index 3ceedc7741..d8cb5323af 100644 --- a/common.gypi +++ b/common.gypi @@ -7,6 +7,8 @@ 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds 'component%': 'static_library', # NB. these names match with what V8 expects 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way + 'gcc_version%': 'unknown', + 'clang%': 0, # Turn on optimizations that may trigger compiler bugs. # Use at your own risk. Do *NOT* report bugs if this option is enabled. @@ -53,7 +55,7 @@ 'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ], 'ldflags': [ '-Wl,--gc-sections' ], }, { - 'cflags': [ '-O2', '-fno-strict-aliasing', '-fno-tree-vrp' ], + 'cflags': [ '-O2', '-fno-strict-aliasing' ], 'cflags!': [ '-O3', '-fstrict-aliasing' ], 'conditions': [ # Required by the dtrace post-processor. Unfortunately, @@ -64,6 +66,9 @@ }, { 'cflags!': [ '-ffunction-sections', '-fdata-sections' ], }], + ['clang==1 or gcc_version >= 40', { + 'cflags': [ '-fno-tree-vrp' ], + }], ], }], ['OS=="solaris"', { @@ -333,8 +333,13 @@ def configure_node(o): o['variables']['v8_use_arm_eabi_hardfloat'] = b(hard_float) o['variables']['armv7'] = 1 if is_arch_armv7() else 0 - # clang has always supported -fvisibility=hidden, right? cc_version, is_clang = compiler_version() + o['variables']['clang'] = 1 if is_clang else 0 + + if not is_clang and cc_version != 0: + o['variables']['gcc_version'] = 10 * cc_version[0] + cc_version[1] + + # clang has always supported -fvisibility=hidden, right? if not is_clang and cc_version < (4,0,0): o['variables']['visibility'] = '' diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index 698bc9abdf..a385519bd1 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -1,4 +1,4 @@ language: node_js before_install: "make &>out || cat out; rm out" node_js: - - 0.6 + - 0.8 diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 32f5abc053..57fdf6afa8 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -72,3 +72,6 @@ James Halliday <mail@substack.net> Jeremy Cantrell <jmcantrell@gmail.com> Ribettes <patlogan29@gmail.com> Don Park <donpark@docuverse.com> +Kei Son <heyacct@gmail.com> +Nicolas Morel <marsup@gmail.com> +Mark Dube <markisdee@gmail.com> diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 9c38f97675..8a856e9fa4 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -92,7 +92,7 @@ doc/cli/index.md: $(markdowns) scripts/index-build.js scripts/doc-build.sh packa node scripts/index-build.js > $@ node_modules/.bin/ronn: - node cli.js install https://github.com/isaacs/ronnjs/tarball/master + node cli.js install doc: man @@ -127,7 +127,7 @@ doc-publish: doc node@npmjs.org:/home/node/npm-www/static/ zip-publish: release - scp release/* izs.me:/var/www/izs.me/static/public/npm/ + scp release/* node@nodejs.org:dist/npm/ release: @bash scripts/release.sh diff --git a/deps/npm/README.md b/deps/npm/README.md index 1257f14716..0c138134e4 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -35,31 +35,18 @@ paths, etc.) then read on. ## Fancy Install (Unix) -To install npm with one command, do this: - - curl http://npmjs.org/install.sh | sh - -To skip the npm 0.x cleanup, do this: - - curl http://npmjs.org/install.sh | clean=no sh - -To say "yes" to the 0.x cleanup, but skip the prompt: - - curl http://npmjs.org/install.sh | clean=yes sh - -If you get permission errors, you'll need to **run** the script as root. -(Note, just putting `sudo` in front of the `curl` will **fetch** the script -as root.) +There's a pretty robust install script at +<https://npmjs.org/install.sh>. You can download that and run it. ### Slightly Fancier You can set any npm configuration params with that script: - curl http://npmjs.org/install.sh | npm_config_prefix=/some/path sh +npm_config_prefix=/some/path sh install.sh Or, you can run it in uber-debuggery mode: - curl http://npmjs.org/install.sh | npm_debug=1 sh +npm_debug=1 sh install.sh ### Even Fancier @@ -83,21 +70,6 @@ git, and mess with it directly. No. -## Dev Install - -To install the latest **unstable** development version from git: - - git clone https://github.com/isaacs/npm.git - cd npm - sudo make install # (or: `node cli.js install -gf`) - -If you're sitting in the code folder reading this document in your -terminal, then you've already got the code. Just do: - - sudo make install - -and npm will install itself. - ## Permissions when Using npm to Install Other Stuff **tl;dr** @@ -163,6 +135,14 @@ you have chosen. If you would like to use npm programmatically, you can do that. It's not very well documented, but it *is* rather simple. +Most of the time, unless you actually want to do all the things that +npm does, you should try using one of npm's dependencies rather than +using npm itself, if possible. + +Eventually, npm will be just a thin cli wrapper around the modules +that it depends on, but for now, there are some things that you must +use npm itself to do. + var npm = require("npm") npm.load(myConfigObject, function (er) { if (er) return handlError(er) @@ -195,8 +175,7 @@ especially the [faq](http://npmjs.org/doc/faq.html). You can use the `npm help` command to read any of them. If you're a developer, and you want to use npm to publish your program, -you should -[read this](http://npmjs.org/doc/developers.html) +you should [read this](http://npmjs.org/doc/developers.html) ## Legal Stuff diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js index a71985b37b..ef8873542b 100755 --- a/deps/npm/bin/npm-cli.js +++ b/deps/npm/bin/npm-cli.js @@ -22,10 +22,10 @@ log.info("it worked if it ends with", "ok") var fs = require("graceful-fs") , path = require("path") , npm = require("../lib/npm.js") - , ini = require("../lib/utils/ini.js") + , npmconf = require("npmconf") , errorHandler = require("../lib/utils/error-handler.js") - , configDefs = require("../lib/utils/config-defs.js") + , configDefs = npmconf.defs , shorthands = configDefs.shorthands , types = configDefs.types , nopt = require("nopt") @@ -50,10 +50,9 @@ if (conf.version) { } if (conf.versions) { - var v = process.versions - v.npm = npm.version - console.log(v) - return + npm.command = "version" + conf.usage = false + npm.argv = [] } log.info("using", "npm@%s", npm.version) diff --git a/deps/npm/doc/cli/json.md b/deps/npm/doc/cli/json.md index b6bf89ca37..46df441895 100644 --- a/deps/npm/doc/cli/json.md +++ b/deps/npm/doc/cli/json.md @@ -23,6 +23,11 @@ npm will default some values based on package contents. If there is a `wscript` file in the root of your package, npm will default the `preinstall` command to compile using node-waf. +* `"scripts":{"preinstall": "node-gyp rebuild"}` + + If there is a `binding.gyp` file in the root of your package, npm will + default the `preinstall` command to compile using node-gyp. + * `"contributors": [...]` If there is an `AUTHORS` file in the root of your package, npm will diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 95d225ad71..d3650c2777 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -19,7 +19,7 @@ <p>This function should not be used programmatically. Instead, just refer to the <code>npm.bin</code> member.</p> </div> -<p id="footer">bin — npm@1.1.46</p> +<p id="footer">bin — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/bugs.html b/deps/npm/html/api/bugs.html index 272deb7ab3..41c5d2bfbe 100644 --- a/deps/npm/html/api/bugs.html +++ b/deps/npm/html/api/bugs.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This command tries to guess at the likely location of a package's +<p>This command tries to guess at the likely location of a package's bug tracker URL, and then tries to open it using the <code>--browser</code> config param.</p> @@ -25,7 +25,7 @@ optional version number.</p> <p>This command will launch a browser, so this command may not be the most friendly for programmatic use.</p> </div> -<p id="footer">bugs — npm@1.1.46</p> +<p id="footer">bugs — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/commands.html b/deps/npm/html/api/commands.html index b058ca06fe..2003aca946 100644 --- a/deps/npm/html/api/commands.html +++ b/deps/npm/html/api/commands.html @@ -28,7 +28,7 @@ usage, or <code>man 3 npm-<command></code> for programmatic usage.</p> <ul><li><a href="../doc/index.html">index(1)</a></li></ul> </div> -<p id="footer">commands — npm@1.1.46</p> +<p id="footer">commands — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/config.html b/deps/npm/html/api/config.html index d7e5300239..01e720390b 100644 --- a/deps/npm/html/api/config.html +++ b/deps/npm/html/api/config.html @@ -22,7 +22,7 @@ element in the array tells config what to do. Possible values are:</p> <ul><li><p><code>set</code></p><p>Sets a config parameter. The second element in <code>args</code> is interpreted as the key, and the third element is interpreted as the value.</p></li><li><p><code>get</code></p><p>Gets the value of a config parameter. The second element in <code>args</code> is the key to get the value of.</p></li><li><p><code>delete</code> (<code>rm</code> or <code>del</code>)</p><p>Deletes a parameter from the config. The second element in <code>args</code> is the -key to delete.</p></li><li><p><code>list</code> (<code>ls</code>)</p><p>Show all configs that aren't secret. No parameters necessary.</p></li><li><p><code>edit</code>:</p><p>Opens the config file in the default editor. This command isn't very useful +key to delete.</p></li><li><p><code>list</code> (<code>ls</code>)</p><p>Show all configs that aren't secret. No parameters necessary.</p></li><li><p><code>edit</code>:</p><p>Opens the config file in the default editor. This command isn't very useful programmatically, but it is made available.</p></li></ul> <p>To programmatically access npm configuration settings, or set them for @@ -33,7 +33,7 @@ functions instead.</p> <ul><li><a href="../api/npm.html">npm(3)</a></li></ul> </div> -<p id="footer">config — npm@1.1.46</p> +<p id="footer">config — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/deprecate.html b/deps/npm/html/api/deprecate.html index c9445b30f6..2ba085bd2a 100644 --- a/deps/npm/html/api/deprecate.html +++ b/deps/npm/html/api/deprecate.html @@ -17,7 +17,7 @@ <p>This command will update the npm registry entry for a package, providing a deprecation warning to all who attempt to install it.</p> -<p>The 'args' parameter must have exactly two elements:</p> +<p>The 'args' parameter must have exactly two elements:</p> <ul><li><p><code>package[@version]</code></p><p>The <code>version</code> portion is optional, and may be either a range, or a specific version, or a tag.</p></li><li><p><code>message</code></p><p>The warning message that will be printed whenever a user attempts to @@ -30,7 +30,7 @@ install the package.</p></li></ul> <ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul> </div> -<p id="footer">deprecate — npm@1.1.46</p> +<p id="footer">deprecate — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/docs.html b/deps/npm/html/api/docs.html index f16c063a64..79e6b98f39 100644 --- a/deps/npm/html/api/docs.html +++ b/deps/npm/html/api/docs.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This command tries to guess at the likely location of a package's +<p>This command tries to guess at the likely location of a package's documentation URL, and then tries to open it using the <code>--browser</code> config param.</p> @@ -25,7 +25,7 @@ optional version number.</p> <p>This command will launch a browser, so this command may not be the most friendly for programmatic use.</p> </div> -<p id="footer">docs — npm@1.1.46</p> +<p id="footer">docs — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/edit.html b/deps/npm/html/api/edit.html index e0abe85922..576a866c0e 100644 --- a/deps/npm/html/api/edit.html +++ b/deps/npm/html/api/edit.html @@ -14,14 +14,14 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>Opens the package folder in the default editor (or whatever you've +<p>Opens the package folder in the default editor (or whatever you've configured as the npm <code>editor</code> config -- see <code>npm help config</code>.)</p> <p>After it has been edited, the package is rebuilt so as to pick up any changes in compiled packages.</p> <p>For instance, you can do <code>npm install connect</code> to install connect -into your package, and then <code>npm.commands.edit(["connect"], callback)</code> +into your package, and then <code>npm.commands.edit(["connect"], callback)</code> to make a few changes to your locally installed copy.</p> <p>The first parameter is a string array with a single element, the package @@ -30,7 +30,7 @@ to open. The package can optionally have a version number attached.</p> <p>Since this command opens an editor in a new process, be careful about where and how this is used.</p> </div> -<p id="footer">edit — npm@1.1.46</p> +<p id="footer">edit — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/explore.html b/deps/npm/html/api/explore.html index 74ab5f65fd..92dcc7d8c7 100644 --- a/deps/npm/html/api/explore.html +++ b/deps/npm/html/api/explore.html @@ -22,9 +22,9 @@ immediately terminates.</p> <p>Note that the package is <em>not</em> automatically rebuilt afterwards, so be sure to use <code>npm rebuild <pkg></code> if you make any changes.</p> -<p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p> +<p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p> </div> -<p id="footer">explore — npm@1.1.46</p> +<p id="footer">explore — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/help-search.html b/deps/npm/html/api/help-search.html index ead170077d..5ca7c75681 100644 --- a/deps/npm/html/api/help-search.html +++ b/deps/npm/html/api/help-search.html @@ -24,7 +24,7 @@ are multiple results, the results are printed to the screen formatted and the array of results is returned. Each result is an object with these properties:</p> <ul><li>hits: -A map of args to number of hits on that arg. For example, {"npm": 3}</li><li>found: +A map of args to number of hits on that arg. For example, {"npm": 3}</li><li>found: Total number of unique args that matched.</li><li>totalHits: Total number of hits.</li><li>lines: An array of all matching lines (and some adjacent lines).</li><li>file: @@ -32,7 +32,7 @@ Name of the file that matched</li></ul> <p>The silent parameter is not neccessary not used, but it may in the future.</p> </div> -<p id="footer">help-search — npm@1.1.46</p> +<p id="footer">help-search — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/init.html b/deps/npm/html/api/init.html index e751091115..720ef2b463 100644 --- a/deps/npm/html/api/init.html +++ b/deps/npm/html/api/init.html @@ -17,25 +17,25 @@ <p>This will ask you a bunch of questions, and then write a package.json for you.</p> <p>It attempts to make reasonable guesses about what you want things to be set to, -and then writes a package.json file with the options you've selected.</p> +and then writes a package.json file with the options you've selected.</p> -<p>If you already have a package.json file, it'll read that first, and default to +<p>If you already have a package.json file, it'll read that first, and default to the options in there.</p> <p>It is strictly additive, so it does not delete options from your package.json without a really good reason to do so.</p> -<p>Since this function expects to be run on the command-line, it doesn't work very +<p>Since this function expects to be run on the command-line, it doesn't work very well as a programmatically. The best option is to roll your own, and since JavaScript makes it stupid simple to output formatted JSON, that is the -preferred method. If you're sure you want to handle command-line prompting, +preferred method. If you're sure you want to handle command-line prompting, then go ahead and use this programmatically.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <p><a href="../doc/json.html">json(1)</a></p> </div> -<p id="footer">init — npm@1.1.46</p> +<p id="footer">init — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/install.html b/deps/npm/html/api/install.html index 7d127ac008..6faf410bf9 100644 --- a/deps/npm/html/api/install.html +++ b/deps/npm/html/api/install.html @@ -16,16 +16,16 @@ <p>This acts much the same ways as installing on the command-line.</p> -<p>The 'where' parameter is optional and only used internally, and it specifies +<p>The 'where' parameter is optional and only used internally, and it specifies where the packages should be installed to.</p> -<p>The 'packages' parameter is an array of strings. Each element in the array is +<p>The 'packages' parameter is an array of strings. Each element in the array is the name of a package to be installed.</p> -<p>Finally, 'callback' is a function that will be called when all packages have been +<p>Finally, 'callback' is a function that will be called when all packages have been installed or when an error has been encountered.</p> </div> -<p id="footer">install — npm@1.1.46</p> +<p id="footer">install — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/link.html b/deps/npm/html/api/link.html index e4edfcab00..28334bc31b 100644 --- a/deps/npm/html/api/link.html +++ b/deps/npm/html/api/link.html @@ -24,7 +24,7 @@ symbolic link from <code>prefix/package-name</code> to the current folder.</p> folder to the global symlink.</p> <p>When creating tarballs for <code>npm publish</code>, the linked packages are -"snapshotted" to their current state by resolving the symbolic links.</p> +"snapshotted" to their current state by resolving the symbolic links.</p> <p>This is handy for installing your own stuff, so that you can work on it and test it @@ -34,12 +34,12 @@ iteratively without having to continually rebuild.</p> <pre><code>npm.commands.link(cb) # creates global link from the cwd # (say redis package) -npm.commands.link('redis', cb) # link-install the package</code></pre> +npm.commands.link('redis', cb) # link-install the package</code></pre> <p>Now, any changes to the redis package will be reflected in the package in the current working directory</p> </div> -<p id="footer">link — npm@1.1.46</p> +<p id="footer">link — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/load.html b/deps/npm/html/api/load.html index 4e29bc078e..075e1aa43f 100644 --- a/deps/npm/html/api/load.html +++ b/deps/npm/html/api/load.html @@ -27,12 +27,12 @@ config object.</p> <p>For example, to emulate the --dev flag, pass an object that looks like this:</p> <pre><code>{ - "dev": true + "dev": true }</code></pre> <p>For a list of all the available command-line configs, see <code>npm help config</code></p> </div> -<p id="footer">load — npm@1.1.46</p> +<p id="footer">load — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/ls.html b/deps/npm/html/api/ls.html index 8f0bac74e6..8eeb35b406 100644 --- a/deps/npm/html/api/ls.html +++ b/deps/npm/html/api/ls.html @@ -30,7 +30,7 @@ but the data will still be returned.</p> <p>Callback is provided an error if one occurred, the full data about which packages are installed and which dependencies they will receive, and a -"lite" data object which just shows which versions are installed where. +"lite" data object which just shows which versions are installed where. Note that the full data object is a circular structure, so care must be taken if it is serialized to JSON.</p> @@ -55,11 +55,11 @@ taken if it is serialized to JSON.</p> <p>List packages in the global install prefix instead of in the current project.</p> -<p>Note, if parseable is set or long isn't set, then duplicates will be trimmed. +<p>Note, if parseable is set or long isn't set, then duplicates will be trimmed. This means that if a submodule a same dependency as a parent module, then the dependency will only be output once.</p> </div> -<p id="footer">ls — npm@1.1.46</p> +<p id="footer">ls — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/npm.html b/deps/npm/html/api/npm.html index 647410f258..e761aee1c5 100644 --- a/deps/npm/html/api/npm.html +++ b/deps/npm/html/api/npm.html @@ -10,21 +10,21 @@ <h2 id="SYNOPSIS">SYNOPSIS</h2> -<pre><code>var npm = require("npm") +<pre><code>var npm = require("npm") npm.load(configObject, function (er, npm) { - // use the npm object, now that it's loaded. + // use the npm object, now that it's loaded. npm.config.set(key, val) val = npm.config.get(key) - console.log("prefix = %s", npm.prefix) + console.log("prefix = %s", npm.prefix) - npm.commands.install(["package"], cb) + npm.commands.install(["package"], cb) })</code></pre> <h2 id="VERSION">VERSION</h2> -<p>1.1.46</p> +<p>1.1.49</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> @@ -32,7 +32,7 @@ npm.load(configObject, function (er, npm) { To find documentation of the command line client, see <code><a href="../doc/npm.html">npm(1)</a></code>.</p> -<p>Prior to using npm's commands, +<p>Prior to using npm's commands, <code>npm.load()</code> must be called with an object hash of top-level configs. In the npm command line client, this set of configs is parsed from the command line options. Additional @@ -57,9 +57,9 @@ command.</p> <ul><li><p><code>npm.load(configs, cb)</code></p><p>Load the configuration params, and call the <code>cb</code> function once the globalconfig and userconfig files have been loaded as well, or on -nextTick if they've already been loaded.</p></li><li><p><code>npm.config</code></p><p>An object for accessing npm configuration parameters.</p><ul><li><p><code>npm.config.get(key)</code></p></li><li><code>npm.config.set(key, val)</code></li><li><p><code>npm.config.del(key)</code></p></li></ul></li><li><p><code>npm.dir</code> or <code>npm.root</code></p><p>The <code>node_modules</code> directory where npm will operate.</p></li><li><p><code>npm.prefix</code></p><p>The prefix where npm is operating. (Most often the current working +nextTick if they've already been loaded.</p></li><li><p><code>npm.config</code></p><p>An object for accessing npm configuration parameters.</p><ul><li><p><code>npm.config.get(key)</code></p></li><li><code>npm.config.set(key, val)</code></li><li><p><code>npm.config.del(key)</code></p></li></ul></li><li><p><code>npm.dir</code> or <code>npm.root</code></p><p>The <code>node_modules</code> directory where npm will operate.</p></li><li><p><code>npm.prefix</code></p><p>The prefix where npm is operating. (Most often the current working directory.)</p></li><li><p><code>npm.cache</code></p><p>The place where npm keeps JSON and tarballs it fetches from the -registry (or uploads to the registry).</p></li><li><p><code>npm.tmp</code></p><p>npm's temporary working directory.</p></li><li><p><code>npm.deref</code></p><p>Get the "real" name for a command that has either an alias or +registry (or uploads to the registry).</p></li><li><p><code>npm.tmp</code></p><p>npm's temporary working directory.</p></li><li><p><code>npm.deref</code></p><p>Get the "real" name for a command that has either an alias or abbreviation.</p></li></ul> <h2 id="MAGIC">MAGIC</h2> @@ -74,11 +74,11 @@ the error or results.</p> <p>For example, this would work in a node repl:</p> -<pre><code>> npm = require("npm") +<pre><code>> npm = require("npm") > npm.load() // wait a sec... -> npm.install("dnode", "express")</code></pre> +> npm.install("dnode", "express")</code></pre> -<p>Note that that <em>won't</em> work in a node program, since the <code>install</code> +<p>Note that that <em>won't</em> work in a node program, since the <code>install</code> method will get called before the configuration load is completed.</p> <h2 id="ABBREVS">ABBREVS</h2> @@ -89,9 +89,9 @@ method names. Use the <code>npm.deref</code> method to find the real name.</p> <p>For example:</p> -<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre> +<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre> </div> -<p id="footer">npm — npm@1.1.46</p> +<p id="footer">npm — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/outdated.html b/deps/npm/html/api/outdated.html index 0d57e2e9d1..e867abf73b 100644 --- a/deps/npm/html/api/outdated.html +++ b/deps/npm/html/api/outdated.html @@ -17,9 +17,9 @@ <p>This command will check the registry to see if the specified packages are currently outdated.</p> -<p>If the 'packages' parameter is left out, npm will check all packages.</p> +<p>If the 'packages' parameter is left out, npm will check all packages.</p> </div> -<p id="footer">outdated — npm@1.1.46</p> +<p id="footer">outdated — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/owner.html b/deps/npm/html/api/owner.html index 084174cc26..df85a9dddb 100644 --- a/deps/npm/html/api/owner.html +++ b/deps/npm/html/api/owner.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>The first element of the 'args' parameter defines what to do, and the subsequent +<p>The first element of the 'args' parameter defines what to do, and the subsequent elements depend on the action. Possible values for the action are (order of parameters are given in parenthesis):</p> @@ -27,14 +27,14 @@ Remove a user from the package owner list. This immediately revokes their privileges.</li></ul> <p>Note that there is only one level of access. Either you can modify a package, -or you can't. Future versions may contain more fine-grained access levels, but +or you can't. Future versions may contain more fine-grained access levels, but that is not implemented at this time.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul> </div> -<p id="footer">owner — npm@1.1.46</p> +<p id="footer">owner — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/pack.html b/deps/npm/html/api/pack.html index 58e1730467..0409c5c949 100644 --- a/deps/npm/html/api/pack.html +++ b/deps/npm/html/api/pack.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>For anything that's installable (that is, a package folder, tarball, +<p>For anything that's installable (that is, a package folder, tarball, tarball url, name@tag, name@version, or name), this command will fetch it to the cache, and then copy the tarball to the current working directory as <code><name>-<version>.tgz</code>, and then write the filenames out to @@ -25,7 +25,7 @@ overwritten the second time.</p> <p>If no arguments are supplied, then npm packs the current package folder.</p> </div> -<p id="footer">pack — npm@1.1.46</p> +<p id="footer">pack — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/prefix.html b/deps/npm/html/api/prefix.html index a1606e7907..ecc978e720 100644 --- a/deps/npm/html/api/prefix.html +++ b/deps/npm/html/api/prefix.html @@ -16,12 +16,12 @@ <p>Print the prefix to standard out.</p> -<p>'args' is never used and callback is never called with data. -'args' must be present or things will break.</p> +<p>'args' is never used and callback is never called with data. +'args' must be present or things will break.</p> <p>This function is not useful programmatically</p> </div> -<p id="footer">prefix — npm@1.1.46</p> +<p id="footer">prefix — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/prune.html b/deps/npm/html/api/prune.html index b6acae2414..6b9c3a8892 100644 --- a/deps/npm/html/api/prune.html +++ b/deps/npm/html/api/prune.html @@ -14,16 +14,16 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This command removes "extraneous" packages.</p> +<p>This command removes "extraneous" packages.</p> <p>The first parameter is optional, and it specifies packages to be removed.</p> <p>No packages are specified, then all packages will be checked.</p> <p>Extraneous packages are packages that are not listed on the parent -package's dependencies list.</p> +package's dependencies list.</p> </div> -<p id="footer">prune — npm@1.1.46</p> +<p id="footer">prune — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/publish.html b/deps/npm/html/api/publish.html index 188e68f57c..48dce3f7a3 100644 --- a/deps/npm/html/api/publish.html +++ b/deps/npm/html/api/publish.html @@ -15,7 +15,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> <p>Publishes a package to the registry so that it can be installed by name. -Possible values in the 'packages' array are:</p> +Possible values in the 'packages' array are:</p> <ul><li><p><code><folder></code>: A folder containing a package.json file</p></li><li><p><code><tarball></code>: @@ -26,13 +26,13 @@ with a package.json file inside.</p></li></ul> current working directory.</p> <p>This command could fails if one of the packages specified already exists in -the registry. Overwrites when the "force" environment variable is set.</p> +the registry. Overwrites when the "force" environment variable is set.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul> </div> -<p id="footer">publish — npm@1.1.46</p> +<p id="footer">publish — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/rebuild.html b/deps/npm/html/api/rebuild.html index 543a1d37cb..dcde5ae6f7 100644 --- a/deps/npm/html/api/rebuild.html +++ b/deps/npm/html/api/rebuild.html @@ -16,13 +16,13 @@ <p>This command runs the <code>npm build</code> command on each of the matched packages. This is useful when you install a new version of node, and must recompile all your C++ addons with -the new binary. If no 'packages' parameter is specify, every package will be rebuilt.</p> +the new binary. If no 'packages' parameter is specify, every package will be rebuilt.</p> <h2 id="CONFIGURATION">CONFIGURATION</h2> <p>See <code>npm help build</code></p> </div> -<p id="footer">rebuild — npm@1.1.46</p> +<p id="footer">rebuild — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/restart.html b/deps/npm/html/api/restart.html index 6092be64f0..7edf903a10 100644 --- a/deps/npm/html/api/restart.html +++ b/deps/npm/html/api/restart.html @@ -14,11 +14,11 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs a package's "restart" script, if one was provided. -Otherwise it runs package's "stop" script, if one was provided, and then -the "start" script.</p> +<p>This runs a package's "restart" script, if one was provided. +Otherwise it runs package's "stop" script, if one was provided, and then +the "start" script.</p> -<p>If no version is specified, then it restarts the "active" version.</p> +<p>If no version is specified, then it restarts the "active" version.</p> <p>npm can run tests on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> @@ -27,7 +27,7 @@ in the <code>packages</code> parameter.</p> <ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul> </div> -<p id="footer">restart — npm@1.1.46</p> +<p id="footer">restart — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/root.html b/deps/npm/html/api/root.html index 7a931107ca..4237ca80e1 100644 --- a/deps/npm/html/api/root.html +++ b/deps/npm/html/api/root.html @@ -16,12 +16,12 @@ <p>Print the effective <code>node_modules</code> folder to standard out.</p> -<p>'args' is never used and callback is never called with data. -'args' must be present or things will break.</p> +<p>'args' is never used and callback is never called with data. +'args' must be present or things will break.</p> <p>This function is not useful programmatically.</p> </div> -<p id="footer">root — npm@1.1.46</p> +<p id="footer">root — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/run-script.html b/deps/npm/html/api/run-script.html index 48839c576c..3ee6d88895 100644 --- a/deps/npm/html/api/run-script.html +++ b/deps/npm/html/api/run-script.html @@ -14,12 +14,12 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs an arbitrary command from a package's "scripts" object.</p> +<p>This runs an arbitrary command from a package's "scripts" object.</p> <p>It is used by the test, start, restart, and stop commands, but can be called directly, as well.</p> -<p>The 'args' parameter is an array of strings. Behavior depends on the number +<p>The 'args' parameter is an array of strings. Behavior depends on the number of elements. If there is only one element, npm assumes that the element represents a command to be run on the local repository. If there is more than one element, then the first is assumed to be the package and the second is @@ -29,7 +29,7 @@ assumed to be the command to run. All other elements are ignored.</p> <ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul> </div> -<p id="footer">run-script — npm@1.1.46</p> +<p id="footer">run-script — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/search.html b/deps/npm/html/api/search.html index ea27de2796..4d9ce2b159 100644 --- a/deps/npm/html/api/search.html +++ b/deps/npm/html/api/search.html @@ -19,20 +19,20 @@ <ul><li>searchTerms: Array of search terms. These terms are case-insensitive.</li><li>silent: If true, npm will not log anything to the console.</li><li>staleness: -This is the threshold for stale packages. "Fresh" packages are not refreshed +This is the threshold for stale packages. "Fresh" packages are not refreshed from the registry. This value is measured in seconds.</li><li><p>callback: Returns an object where each key is the name of a package, and the value -is information about that package along with a 'words' property, which is +is information about that package along with a 'words' property, which is a space-delimited string of all of the interesting words in that package. The only properties included are those that are searched, which generally include:</p><ul><li>name</li><li>description</li><li>maintainers</li><li>url</li><li>keywords</li></ul></li></ul> <p>A search on the registry excludes any result that does not match all of the search terms. It also removes any items from the results that contain an -excluded term (the "searchexclude" config). The search is case insensitive -and doesn't try to read your mind (it doesn't do any verb tense matching or the +excluded term (the "searchexclude" config). The search is case insensitive +and doesn't try to read your mind (it doesn't do any verb tense matching or the like).</p> </div> -<p id="footer">search — npm@1.1.46</p> +<p id="footer">search — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/shrinkwrap.html b/deps/npm/html/api/shrinkwrap.html index ad3b59b94c..2667ac658b 100644 --- a/deps/npm/html/api/shrinkwrap.html +++ b/deps/npm/html/api/shrinkwrap.html @@ -16,17 +16,17 @@ <p>This acts much the same ways as shrinkwrapping on the command-line.</p> -<p>This command does not take any arguments, but 'args' must be defined. +<p>This command does not take any arguments, but 'args' must be defined. Beyond that, if any arguments are passed in, npm will politely warn that it does not take positional arguments.</p> -<p>If the 'silent' parameter is set to true, nothing will be output to the screen, +<p>If the 'silent' parameter is set to true, nothing will be output to the screen, but the shrinkwrap file will still be written.</p> -<p>Finally, 'callback' is a function that will be called when the shrinkwrap has +<p>Finally, 'callback' is a function that will be called when the shrinkwrap has been saved.</p> </div> -<p id="footer">shrinkwrap — npm@1.1.46</p> +<p id="footer">shrinkwrap — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/start.html b/deps/npm/html/api/start.html index 99d8a98c22..8f5c26fffd 100644 --- a/deps/npm/html/api/start.html +++ b/deps/npm/html/api/start.html @@ -14,12 +14,12 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs a package's "start" script, if one was provided.</p> +<p>This runs a package's "start" script, if one was provided.</p> <p>npm can run tests on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> </div> -<p id="footer">start — npm@1.1.46</p> +<p id="footer">start — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/stop.html b/deps/npm/html/api/stop.html index 10a77c235b..8888693a3f 100644 --- a/deps/npm/html/api/stop.html +++ b/deps/npm/html/api/stop.html @@ -14,12 +14,12 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs a package's "stop" script, if one was provided.</p> +<p>This runs a package's "stop" script, if one was provided.</p> <p>npm can run stop on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> </div> -<p id="footer">stop — npm@1.1.46</p> +<p id="footer">stop — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/submodule.html b/deps/npm/html/api/submodule.html index c221270094..c9a6fc4a74 100644 --- a/deps/npm/html/api/submodule.html +++ b/deps/npm/html/api/submodule.html @@ -18,7 +18,7 @@ in its package.json description then add it as a git submodule at <code>node_modules/<pkg name></code>.</p> -<p>This is a convenience only. From then on, it's up to you to manage +<p>This is a convenience only. From then on, it's up to you to manage updates by using the appropriate git commands. npm will stubbornly refuse to update, modify, or remove anything with a <code>.git</code> subfolder in it.</p> @@ -33,7 +33,7 @@ dependencies into the submodule folder.</p> <ul><li>npm help json</li><li>git help submodule</li></ul> </div> -<p id="footer">submodule — npm@1.1.46</p> +<p id="footer">submodule — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/tag.html b/deps/npm/html/api/tag.html index 08f5ed2d8b..dc8e9e416b 100644 --- a/deps/npm/html/api/tag.html +++ b/deps/npm/html/api/tag.html @@ -17,7 +17,7 @@ <p>Tags the specified version of the package with the specified tag, or the <code>--tag</code> config if not specified.</p> -<p>The 'package@version' is an array of strings, but only the first two elements are +<p>The 'package@version' is an array of strings, but only the first two elements are currently used.</p> <p>The first element must be in the form package@version, where package @@ -29,7 +29,7 @@ parameter is missing or falsey (empty), the default froom the config will be used. For more information about how to set this config, check <code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p> </div> -<p id="footer">tag — npm@1.1.46</p> +<p id="footer">tag — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/test.html b/deps/npm/html/api/test.html index f6fa9903b5..9de59596dc 100644 --- a/deps/npm/html/api/test.html +++ b/deps/npm/html/api/test.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs a package's "test" script, if one was provided.</p> +<p>This runs a package's "test" script, if one was provided.</p> <p>To run tests as a condition of installation, set the <code>npat</code> config to true.</p> @@ -22,7 +22,7 @@ true.</p> <p>npm can run tests on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> </div> -<p id="footer">test — npm@1.1.46</p> +<p id="footer">test — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/uninstall.html b/deps/npm/html/api/uninstall.html index cd8585ff73..dfdf1c6c94 100644 --- a/deps/npm/html/api/uninstall.html +++ b/deps/npm/html/api/uninstall.html @@ -16,13 +16,13 @@ <p>This acts much the same ways as uninstalling on the command-line.</p> -<p>The 'packages' parameter is an array of strings. Each element in the array is +<p>The 'packages' parameter is an array of strings. Each element in the array is the name of a package to be uninstalled.</p> -<p>Finally, 'callback' is a function that will be called when all packages have been +<p>Finally, 'callback' is a function that will be called when all packages have been uninstalled or when an error has been encountered.</p> </div> -<p id="footer">uninstall — npm@1.1.46</p> +<p id="footer">uninstall — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/unpublish.html b/deps/npm/html/api/unpublish.html index 03411bd01a..ca4dd634a5 100644 --- a/deps/npm/html/api/unpublish.html +++ b/deps/npm/html/api/unpublish.html @@ -26,7 +26,7 @@ is what is meant.</p> <p>If no version is specified, or if all versions are removed then the root package entry is removed from the registry entirely.</p> </div> -<p id="footer">unpublish — npm@1.1.46</p> +<p id="footer">unpublish — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/update.html b/deps/npm/html/api/update.html index edf5272705..5149b3555d 100644 --- a/deps/npm/html/api/update.html +++ b/deps/npm/html/api/update.html @@ -16,9 +16,9 @@ <p>Updates a package, upgrading it to the latest version. It also installs any missing packages.</p> -<p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p> +<p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p> </div> -<p id="footer">update — npm@1.1.46</p> +<p id="footer">update — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/version.html b/deps/npm/html/api/version.html index a3224d007f..a4104a84de 100644 --- a/deps/npm/html/api/version.html +++ b/deps/npm/html/api/version.html @@ -24,7 +24,7 @@ fail if the repo is not clean.</p> parameter. The difference, however, is this function will fail if it does not have exactly one element. The only element should be a version number.</p> </div> -<p id="footer">version — npm@1.1.46</p> +<p id="footer">version — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/view.html b/deps/npm/html/api/view.html index d6ba5e66a5..056b39b59b 100644 --- a/deps/npm/html/api/view.html +++ b/deps/npm/html/api/view.html @@ -17,10 +17,10 @@ <p>This command shows data about a package and prints it to the stream referenced by the <code>outfd</code> config, which defaults to stdout.</p> -<p>The "args" parameter is an ordered list that closely resembles the command-line +<p>The "args" parameter is an ordered list that closely resembles the command-line usage. The elements should be ordered such that the first element is the package and version (package@version). The version is optional. After that, -the rest of the parameters are fields with optional subfields ("field.subfield") +the rest of the parameters are fields with optional subfields ("field.subfield") which can be used to get only the information desired from the registry.</p> <p>The callback will be passed all of the data returned by the query.</p> @@ -28,51 +28,51 @@ which can be used to get only the information desired from the registry.</p> <p>For example, to get the package registry entry for the <code>connect</code> package, you can do this:</p> -<pre><code>npm.commands.view(["connect"], callback)</code></pre> +<pre><code>npm.commands.view(["connect"], callback)</code></pre> -<p>If no version is specified, "latest" is assumed.</p> +<p>If no version is specified, "latest" is assumed.</p> <p>Field names can be specified after the package descriptor. For example, to show the dependencies of the <code>ronn</code> package at version 0.3.5, you could do the following:</p> -<pre><code>npm.commands.view(["ronn@0.3.5", "dependencies"], callback)</code></pre> +<pre><code>npm.commands.view(["ronn@0.3.5", "dependencies"], callback)</code></pre> <p>You can view child field by separating them with a period. To view the git repository URL for the latest version of npm, you could do this:</p> -<pre><code>npm.commands.view(["npm", "repository.url"], callback)</code></pre> +<pre><code>npm.commands.view(["npm", "repository.url"], callback)</code></pre> <p>For fields that are arrays, requesting a non-numeric field will return all of the values from the objects in the list. For example, to get all -the contributor names for the "express" project, you can do this:</p> +the contributor names for the "express" project, you can do this:</p> -<pre><code>npm.commands.view(["express", "contributors.email"], callback)</code></pre> +<pre><code>npm.commands.view(["express", "contributors.email"], callback)</code></pre> <p>You may also use numeric indices in square braces to specifically select an item in an array field. To just get the email address of the first contributor in the list, you can do this:</p> -<pre><code>npm.commands.view(["express", "contributors[0].email"], callback)</code></pre> +<pre><code>npm.commands.view(["express", "contributors[0].email"], callback)</code></pre> <p>Multiple fields may be specified, and will be printed one after another. For exampls, to get all the contributor names and email addresses, you can do this:</p> -<pre><code>npm.commands.view(["express", "contributors.name", "contributors.email"], callback)</code></pre> +<pre><code>npm.commands.view(["express", "contributors.name", "contributors.email"], callback)</code></pre> -<p>"Person" fields are shown as a string if they would be shown as an +<p>"Person" fields are shown as a string if they would be shown as an object. So, for example, this will show the list of npm contributors in the shortened string format. (See <code>npm help json</code> for more on this.)</p> -<pre><code>npm.commands.view(["npm", "contributors"], callback)</code></pre> +<pre><code>npm.commands.view(["npm", "contributors"], callback)</code></pre> <p>If a version range is provided, then data will be printed for every matching version of the package. This will show which version of jsdom was required by each matching version of yui3:</p> -<pre><code>npm.commands.view(["yui3@'>0.5.4'", "dependencies.jsdom"], callback)</code></pre> +<pre><code>npm.commands.view(["yui3@'>0.5.4'", "dependencies.jsdom"], callback)</code></pre> <h2 id="OUTPUT">OUTPUT</h2> @@ -86,7 +86,7 @@ will be prefixed with the version it applies to.</p> <p>If multiple fields are requested, than each of them are prefixed with the field name.</p> -<p>Console output can be disabled by setting the 'silent' parameter to true.</p> +<p>Console output can be disabled by setting the 'silent' parameter to true.</p> <h2 id="RETURN-VALUE">RETURN VALUE</h2> @@ -99,7 +99,7 @@ the field name.</p> <p>corresponding to the list of fields selected.</p> </div> -<p id="footer">view — npm@1.1.46</p> +<p id="footer">view — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/whoami.html b/deps/npm/html/api/whoami.html index 99981f38a7..0c694baa89 100644 --- a/deps/npm/html/api/whoami.html +++ b/deps/npm/html/api/whoami.html @@ -16,12 +16,12 @@ <p>Print the <code>username</code> config to standard output.</p> -<p>'args' is never used and callback is never called with data. -'args' must be present or things will break.</p> +<p>'args' is never used and callback is never called with data. +'args' must be present or things will break.</p> <p>This function is not useful programmatically</p> </div> -<p id="footer">whoami — npm@1.1.46</p> +<p id="footer">whoami — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 9758d0424d..c97a90d146 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -12,7 +12,7 @@ <p>This is just enough info to get you up and running.</p> -<p>Much more info available via <code>npm help</code> once it's installed.</p> +<p>Much more info available via <code>npm help</code> once it's installed.</p> <h2 id="IMPORTANT">IMPORTANT</h2> @@ -42,38 +42,25 @@ paths, etc.) then read on.</p> <h2 id="Fancy-Install-Unix">Fancy Install (Unix)</h2> -<p>To install npm with one command, do this:</p> - -<pre><code>curl http://npmjs.org/install.sh | sh</code></pre> - -<p>To skip the npm 0.x cleanup, do this:</p> - -<pre><code>curl http://npmjs.org/install.sh | clean=no sh</code></pre> - -<p>To say "yes" to the 0.x cleanup, but skip the prompt:</p> - -<pre><code>curl http://npmjs.org/install.sh | clean=yes sh</code></pre> - -<p>If you get permission errors, you'll need to <strong>run</strong> the script as root. -(Note, just putting <code>sudo</code> in front of the <code>curl</code> will <strong>fetch</strong> the script -as root.)</p> +<p>There's a pretty robust install script at +<a href="https://npmjs.org/install.sh">https://npmjs.org/install.sh</a>. You can download that and run it.</p> <h3 id="Slightly-Fancier">Slightly Fancier</h3> <p>You can set any npm configuration params with that script:</p> -<pre><code>curl http://npmjs.org/install.sh | npm_config_prefix=/some/path sh</code></pre> +<p>npm<em>config</em>prefix=/some/path sh install.sh</p> <p>Or, you can run it in uber-debuggery mode:</p> -<pre><code>curl http://npmjs.org/install.sh | npm_debug=1 sh</code></pre> +<p>npm_debug=1 sh install.sh</p> <h3 id="Even-Fancier">Even Fancier</h3> <p>Get the code with git. Use <code>make</code> to build the docs and do other stuff. If you plan on hacking on npm, <code>make link</code> is your friend.</p> -<p>If you've got the npm source code, you can also semi-permanently set +<p>If you've got the npm source code, you can also semi-permanently set arbitrary config keys using the <code>./configure --key=val ...</code>, and then run npm commands by doing <code>node cli.js <cmd> <args></code>. (This is helpful for testing, or running stuff without actually installing npm itself.)</p> @@ -83,33 +70,18 @@ for testing, or running stuff without actually installing npm itself.)</p> <p>You can download a zip file from <a href="http://npmjs.org/dist/">http://npmjs.org/dist/</a>, and unpack it in the same folder where node.exe lives.</p> -<p>If that's not fancy enough for you, then you can fetch the code with +<p>If that's not fancy enough for you, then you can fetch the code with git, and mess with it directly.</p> <h2 id="Installing-on-Cygwin">Installing on Cygwin</h2> <p>No.</p> -<h2 id="Dev-Install">Dev Install</h2> - -<p>To install the latest <strong>unstable</strong> development version from git:</p> - -<pre><code>git clone https://github.com/isaacs/npm.git -cd npm -sudo make install # (or: `node cli.js install -gf`)</code></pre> - -<p>If you're sitting in the code folder reading this document in your -terminal, then you've already got the code. Just do:</p> - -<pre><code>sudo make install</code></pre> - -<p>and npm will install itself.</p> - <h2 id="Permissions-when-Using-npm-to-Install-Other-Stuff">Permissions when Using npm to Install Other Stuff</h2> <p><strong>tl;dr</strong></p> -<ul><li>Use <code>sudo</code> for greater safety. Or don't, if you prefer not to.</li><li>npm will downgrade permissions if it's root before running any build +<ul><li>Use <code>sudo</code> for greater safety. Or don't, if you prefer not to.</li><li>npm will downgrade permissions if it's root before running any build scripts that package authors specified.</li></ul> <h3 id="More-details">More details...</h3> @@ -122,7 +94,7 @@ to running any package build or test commands.</p> support uid switching, then npm will not attempt to change the userid.</p> <p>If you would like to ensure that npm <strong>always</strong> runs scripts as the -"nobody" user, and have it fail if it cannot downgrade permissions, then +"nobody" user, and have it fail if it cannot downgrade permissions, then set the following configuration param:</p> <pre><code>npm config set unsafe-perm false</code></pre> @@ -142,7 +114,7 @@ set the following configuration param:</p> <h2 id="More-Severe-Uninstalling">More Severe Uninstalling</h2> <p>Usually, the above instructions are sufficient. That will remove -npm, but leave behind anything you've installed.</p> +npm, but leave behind anything you've installed.</p> <p>If you would like to remove all the packages that you have installed, then you can use the <code>npm ls</code> command to find them, and then <code>npm rm</code> to @@ -167,16 +139,24 @@ you have chosen.</p> <h2 id="Using-npm-Programmatically">Using npm Programmatically</h2> <p>If you would like to use npm programmatically, you can do that. -It's not very well documented, but it <em>is</em> rather simple.</p> +It's not very well documented, but it <em>is</em> rather simple.</p> + +<p>Most of the time, unless you actually want to do all the things that +npm does, you should try using one of npm's dependencies rather than +using npm itself, if possible.</p> + +<p>Eventually, npm will be just a thin cli wrapper around the modules +that it depends on, but for now, there are some things that you must +use npm itself to do.</p> -<pre><code>var npm = require("npm") +<pre><code>var npm = require("npm") npm.load(myConfigObject, function (er) { if (er) return handlError(er) - npm.commands.install(["some", "args"], function (er, data) { + npm.commands.install(["some", "args"], function (er, data) { if (er) return commandFailed(er) // command succeeded, and data might have some info }) - npm.on("log", function (message) { .... }) + npm.on("log", function (message) { .... }) })</code></pre> <p>The <code>load</code> function takes an object hash of the command-line configs. @@ -200,17 +180,16 @@ especially the <a href="http://npmjs.org/doc/faq.html">faq</a>.</p> <p>You can use the <code>npm help</code> command to read any of them.</p> -<p>If you're a developer, and you want to use npm to publish your program, -you should -<a href="http://npmjs.org/doc/developers.html">read this</a></p> +<p>If you're a developer, and you want to use npm to publish your program, +you should <a href="http://npmjs.org/doc/developers.html">read this</a></p> <h2 id="Legal-Stuff">Legal Stuff</h2> -<p>"npm" and "the npm registry" are owned by Isaac Z. Schlueter. All +<p>"npm" and "the npm registry" are owned by Isaac Z. Schlueter. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.</p> -<p>"Node.js" and "node" are trademarks owned by Joyent, Inc. npm is not +<p>"Node.js" and "node" are trademarks owned by Joyent, Inc. npm is not officially part of the Node.js project, and is neither owned by nor officially affiliated with Joyent, Inc.</p> @@ -228,17 +207,17 @@ Isaac Z. Schlueter at <a href="mailto:i@izs.me">i@izs.me</a>.</p> <h3 id="In-plain-english">In plain english</h3> -<p>This is mine; not my employer's, not Node's, not Joyent's, not Ryan -Dahl's.</p> +<p>This is mine; not my employer's, not Node's, not Joyent's, not Ryan +Dahl's.</p> -<p>If you publish something, it's yours, and you are solely accountable +<p>If you publish something, it's yours, and you are solely accountable for it. Not me, not Node, not Joyent, not Ryan Dahl.</p> -<p>If other people publish something, it's theirs. Not mine, not Node's, -not Joyent's, not Ryan Dahl's.</p> +<p>If other people publish something, it's theirs. Not mine, not Node's, +not Joyent's, not Ryan Dahl's.</p> <p>Yes, you can publish something evil. It will be removed promptly if -reported, and we'll lose respect for you. But there is no vetting +reported, and we'll lose respect for you. But there is no vetting process for published modules.</p> <p>If this concerns you, inspect the source before using packages.</p> @@ -251,7 +230,7 @@ process for published modules.</p> <a href="http://github.com/isaacs/npm/issues">http://github.com/isaacs/npm/issues</a></li><li>email: <a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li></ul> -<p>Be sure to include <em>all</em> of the output from the npm command that didn't work +<p>Be sure to include <em>all</em> of the output from the npm command that didn't work as expected. The <code>npm-debug.log</code> file is also helpful to provide.</p> <p>You can also look for isaacs in #node.js on irc://irc.freenode.net. He @@ -261,7 +240,7 @@ will no doubt tell you to put the output in a gist or email.</p> <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul> </div> -<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.46</p> +<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/adduser.html b/deps/npm/html/doc/adduser.html index 440500bfdd..4eddcd1295 100644 --- a/deps/npm/html/doc/adduser.html +++ b/deps/npm/html/doc/adduser.html @@ -39,7 +39,7 @@ authorize on a new machine.</p> <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul> </div> -<p id="footer">adduser — npm@1.1.46</p> +<p id="footer">adduser — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/bin.html b/deps/npm/html/doc/bin.html index fc0e64a37e..211c2aab45 100644 --- a/deps/npm/html/doc/bin.html +++ b/deps/npm/html/doc/bin.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">bin — npm@1.1.46</p> +<p id="footer">bin — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/bugs.html b/deps/npm/html/doc/bugs.html index c0df8940b5..e933cace77 100644 --- a/deps/npm/html/doc/bugs.html +++ b/deps/npm/html/doc/bugs.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This command tries to guess at the likely location of a package's +<p>This command tries to guess at the likely location of a package's bug tracker URL, and then tries to open it using the <code>--browser</code> config param.</p> @@ -22,7 +22,7 @@ config param.</p> <h3 id="browser">browser</h3> -<ul><li>Default: OS X: <code>"open"</code>, others: <code>"google-chrome"</code></li><li>Type: String</li></ul> +<ul><li>Default: OS X: <code>"open"</code>, others: <code>"google-chrome"</code></li><li>Type: String</li></ul> <p>The browser that is called by the <code>npm bugs</code> command to open websites.</p> @@ -36,7 +36,7 @@ config param.</p> <ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul> </div> -<p id="footer">bugs — npm@1.1.46</p> +<p id="footer">bugs — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/build.html b/deps/npm/html/doc/build.html index 58da521edc..d15f2ea2f7 100644 --- a/deps/npm/html/doc/build.html +++ b/deps/npm/html/doc/build.html @@ -25,7 +25,7 @@ A folder containing a <code>package.json</code> file in its root.</li></ul> <ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul> </div> -<p id="footer">build — npm@1.1.46</p> +<p id="footer">build — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/bundle.html b/deps/npm/html/doc/bundle.html index 8c57508e73..40f049eb36 100644 --- a/deps/npm/html/doc/bundle.html +++ b/deps/npm/html/doc/bundle.html @@ -20,7 +20,7 @@ install packages into the local space.</p> <ul><li><a href="../doc/install.html">install(1)</a></li></ul> </div> -<p id="footer">bundle — npm@1.1.46</p> +<p id="footer">bundle — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cache.html b/deps/npm/html/doc/cache.html index 14b9a17e45..f4dfc77e82 100644 --- a/deps/npm/html/doc/cache.html +++ b/deps/npm/html/doc/cache.html @@ -66,7 +66,7 @@ they do not make an HTTP request to the registry.</p> <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul> </div> -<p id="footer">cache — npm@1.1.46</p> +<p id="footer">cache — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/changelog.html b/deps/npm/html/doc/changelog.html index e0e221e43e..87c98d4e80 100644 --- a/deps/npm/html/doc/changelog.html +++ b/deps/npm/html/doc/changelog.html @@ -12,15 +12,15 @@ <h3 id="1-1-3-1-1-4">1.1.3, 1.1.4</h3> -<ul><li>Update request to support HTTPS-over-HTTP proxy tunneling</li><li>Throw on undefined envs in config settings</li><li>Update which to 1.0.5</li><li>Fix windows UNC busyloop in findPrefix</li><li>Bundle nested bundleDependencies properly</li><li>Alias adduser to add-user</li><li>Doc updates (Christian Howe, Henrik Hodne, Andrew Lunny)</li><li>ignore logfd/outfd streams in makeEnv() (Rod Vagg)</li><li>shrinkwrap: Behave properly with url-installed deps</li><li>install: Support --save with url install targets</li><li>Support installing naked tars or single-file modules from urls etc.</li><li>init: Don't add engines section</li><li>Don't run make clean on rebuild</li><li>Added missing unicode replacement (atomizer)</li></ul> +<ul><li>Update request to support HTTPS-over-HTTP proxy tunneling</li><li>Throw on undefined envs in config settings</li><li>Update which to 1.0.5</li><li>Fix windows UNC busyloop in findPrefix</li><li>Bundle nested bundleDependencies properly</li><li>Alias adduser to add-user</li><li>Doc updates (Christian Howe, Henrik Hodne, Andrew Lunny)</li><li>ignore logfd/outfd streams in makeEnv() (Rod Vagg)</li><li>shrinkwrap: Behave properly with url-installed deps</li><li>install: Support --save with url install targets</li><li>Support installing naked tars or single-file modules from urls etc.</li><li>init: Don't add engines section</li><li>Don't run make clean on rebuild</li><li>Added missing unicode replacement (atomizer)</li></ul> <h3 id="1-1-2">1.1.2</h3> <p>Dave Pacheco (2): - add "npm shrinkwrap"</p> + add "npm shrinkwrap"</p> <p>Martin Cooper (1): - Fix #1753 Make a copy of the cached objects we'll modify.</p> + Fix #1753 Make a copy of the cached objects we'll modify.</p> <p>Tim Oxley (1): correctly remove readme from default npm view command.</p> @@ -32,7 +32,7 @@ update minimatch update request Experimental: single-file modules - Fix #2172 Don't remove global mans uninstalling local pkgs + Fix #2172 Don't remove global mans uninstalling local pkgs Add --versions flag to show the version of node as well Support --json flag for ls output update request to 2.9.151</p> @@ -47,11 +47,11 @@ <h3 id="0-3">0.3</h3> -<ul><li>More correct permission/uid handling when running as root </li><li>Require node 0.4.0 </li><li>Reduce featureset </li><li>Packages without "main" modules don't export modules</li><li>Remove support for invalid JSON (since node doesn't support it)</li></ul> +<ul><li>More correct permission/uid handling when running as root </li><li>Require node 0.4.0 </li><li>Reduce featureset </li><li>Packages without "main" modules don't export modules</li><li>Remove support for invalid JSON (since node doesn't support it)</li></ul> <h3 id="0-2">0.2</h3> -<ul><li>First allegedly "stable" release</li><li>Most functionality implemented </li><li>Used shim files and <code>name@version</code> symlinks</li><li>Feature explosion</li><li>Kind of a mess</li></ul> +<ul><li>First allegedly "stable" release</li><li>Most functionality implemented </li><li>Used shim files and <code>name@version</code> symlinks</li><li>Feature explosion</li><li>Kind of a mess</li></ul> <h3 id="0-1">0.1</h3> @@ -65,7 +65,7 @@ <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul> </div> -<p id="footer">changelog — npm@1.1.46</p> +<p id="footer">changelog — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/coding-style.html b/deps/npm/html/doc/coding-style.html index b4b5d7afa1..b13fee073d 100644 --- a/deps/npm/html/doc/coding-style.html +++ b/deps/npm/html/doc/coding-style.html @@ -6,27 +6,27 @@ <body> <div id="wrapper"> -<h1><a href="../doc/coding-style.html">coding-style</a></h1> <p>npm's "funny" coding style</p> +<h1><a href="../doc/coding-style.html">coding-style</a></h1> <p>npm's "funny" coding style</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>npm's coding style is a bit unconventional. It is not different for -difference's sake, but rather a carefully crafted style that is +<p>npm's coding style is a bit unconventional. It is not different for +difference's sake, but rather a carefully crafted style that is designed to reduce visual clutter and make bugs more apparent.</p> <p>If you want to contribute to npm (which is very encouraged), you should -make your code conform to npm's style.</p> +make your code conform to npm's style.</p> <h2 id="Line-Length">Line Length</h2> -<p>Keep lines shorter than 80 characters. It's better for lines to be +<p>Keep lines shorter than 80 characters. It's better for lines to be too short than to be too long. Break up long lists, objects, and other statements onto multiple lines.</p> <h2 id="Indentation">Indentation</h2> <p>Two-spaces. Tabs are better, but they look like hell in web browsers -(and on github), and node uses 2 spaces, so that's that.</p> +(and on github), and node uses 2 spaces, so that's that.</p> <p>Configure your editor appropriately.</p> @@ -43,8 +43,8 @@ statements onto multiple lines.</p> <pre><code>function () {</code></pre> -<p>If a block needs to wrap to the next line, use a curly brace. Don't -use it if it doesn't.</p> +<p>If a block needs to wrap to the next line, use a curly brace. Don't +use it if it doesn't.</p> <p>Bad:</p> @@ -61,10 +61,10 @@ while (foo) { <h2 id="Semicolons">Semicolons</h2> -<p>Don't use them except in four situations:</p> +<p>Don't use them except in four situations:</p> -<ul><li><code>for (;;)</code> loops. They're actually required.</li><li>null loops like: <code>while (something) ;</code> (But you'd better have a good -reason for doing that.)</li><li><code>case "foo": doSomething(); break</code></li><li>In front of a leading <code>(</code> or <code>[</code> at the start of the line. +<ul><li><code>for (;;)</code> loops. They're actually required.</li><li>null loops like: <code>while (something) ;</code> (But you'd better have a good +reason for doing that.)</li><li><code>case "foo": doSomething(); break</code></li><li>In front of a leading <code>(</code> or <code>[</code> at the start of the line. This prevents the expression from being interpreted as a function call or property access, respectively.</li></ul> @@ -74,9 +74,9 @@ as a function call or property access, respectively.</li></ul> ;[a, b, c].forEach(doSomething) for (var i = 0; i < 10; i ++) { switch (state) { - case "begin": start(); continue - case "end": finish(); break - default: throw new Error("unknown state") + case "begin": start(); continue + case "end": finish(); break + default: throw new Error("unknown state") } end() }</code></pre> @@ -91,15 +91,15 @@ across multiple lines, put the comma at the start of the next line, directly below the token that starts the list. Put the final token in the list on a line by itself. For example:</p> -<pre><code>var magicWords = [ "abracadabra" - , "gesundheit" - , "ventrilo" +<pre><code>var magicWords = [ "abracadabra" + , "gesundheit" + , "ventrilo" ] - , spells = { "fireball" : function () { setOnFire() } - , "water" : function () { putOut() } + , spells = { "fireball" : function () { setOnFire() } + , "water" : function () { putOut() } } , a = 1 - , b = "abc" + , b = "abc" , etc , somethingElse</code></pre> @@ -108,8 +108,8 @@ final token in the list on a line by itself. For example:</p> <p>Put a single space in front of ( for anything other than a function call. Also use a single space wherever it makes things more readable.</p> -<p>Don't leave trailing whitespace at the end of lines. Don't indent empty -lines. Don't use more spaces than are helpful.</p> +<p>Don't leave trailing whitespace at the end of lines. Don't indent empty +lines. Don't use more spaces than are helpful.</p> <h2 id="Functions">Functions</h2> @@ -125,12 +125,12 @@ methodology.</p> <p>The callback should always be the last argument in the list. Its first argument is the Error or null.</p> -<p>Be very careful never to ever ever throw anything. It's worse than useless. +<p>Be very careful never to ever ever throw anything. It's worse than useless. Just send the error message back as the first argument to the callback.</p> <h2 id="Errors">Errors</h2> -<p>Always create a new Error object with your message. Don't just return a +<p>Always create a new Error object with your message. Don't just return a string message to the callback. Stack traces are handy.</p> <h2 id="Logging">Logging</h2> @@ -140,18 +140,18 @@ utility.</p> <p>Please clean up logs when they are no longer helpful. In particular, logging the same object over and over again is not helpful. Logs should -report what's happening so that it's easier to track down where a fault +report what's happening so that it's easier to track down where a fault occurs.</p> <p>Use appropriate log levels. See <code><a href="../doc/config.html">config(1)</a></code> and search for -"loglevel".</p> +"loglevel".</p> <h2 id="Case-naming-etc">Case, naming, etc.</h2> <p>Use <code>lowerCamelCase</code> for multiword identifiers when they refer to objects, functions, methods, members, or anything not specified in this section.</p> -<p>Use <code>UpperCamelCase</code> for class names (things that you'd pass to "new").</p> +<p>Use <code>UpperCamelCase</code> for class names (things that you'd pass to "new").</p> <p>Use <code>all-lower-hyphen-css-case</code> for multiword filenames and config keys.</p> @@ -162,17 +162,17 @@ and are rarely used.</p> <p>Use a single uppercase letter for function names where the function would normally be anonymous, but needs to call itself recursively. It -makes it clear that it's a "throwaway" function.</p> +makes it clear that it's a "throwaway" function.</p> <h2 id="null-undefined-false-0">null, undefined, false, 0</h2> <p>Boolean variables and functions should always be either <code>true</code> or -<code>false</code>. Don't set it to 0 unless it's supposed to be a number.</p> +<code>false</code>. Don't set it to 0 unless it's supposed to be a number.</p> <p>When something is intentionally missing or removed, set it to <code>null</code>.</p> -<p>Don't set things to <code>undefined</code>. Reserve that value to mean "not yet -set to anything."</p> +<p>Don't set things to <code>undefined</code>. Reserve that value to mean "not yet +set to anything."</p> <p>Boolean objects are verboten.</p> @@ -180,7 +180,7 @@ set to anything."</p> <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">coding-style — npm@1.1.46</p> +<p id="footer">coding-style — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/completion.html b/deps/npm/html/doc/completion.html index 703df2ebbe..34084fa183 100644 --- a/deps/npm/html/doc/completion.html +++ b/deps/npm/html/doc/completion.html @@ -26,14 +26,14 @@ such as <code>/usr/local/etc/bash_completion.d/npm</code> if you have a system that will read that file for you.</p> <p>When <code>COMP_CWORD</code>, <code>COMP_LINE</code>, and <code>COMP_POINT</code> are defined in the -environment, <code>npm completion</code> acts in "plumbing mode", and outputs +environment, <code>npm completion</code> acts in "plumbing mode", and outputs completions based on the arguments.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">completion — npm@1.1.46</p> +<p id="footer">completion — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/config.html b/deps/npm/html/doc/config.html index 358899cc21..86dbd2b460 100644 --- a/deps/npm/html/doc/config.html +++ b/deps/npm/html/doc/config.html @@ -25,7 +25,7 @@ npm set <key> <value> [--global]</code></pre> <h3 id="Command-Line-Flags">Command Line Flags</h3> <p>Putting <code>--foo bar</code> on the command line sets the -<code>foo</code> configuration parameter to <code>"bar"</code>. A <code>--</code> argument tells the cli +<code>foo</code> configuration parameter to <code>"bar"</code>. A <code>--</code> argument tells the cli parser to stop reading flags. A <code>--flag</code> parameter that is at the <em>end</em> of the command will be given the value of <code>true</code>.</p> @@ -53,7 +53,7 @@ This file is an ini-file formatted list of <code>key = value</code> parameters</ <p><code>path/to/npm/itself/npmrc</code></p> -<p>This is an unchangeable "builtin" +<p>This is an unchangeable "builtin" configuration file that npm keeps consistent across updates. Set fields in here using the <code>./configure</code> script that comes with npm. This is primarily for distribution maintainers to override default @@ -74,7 +74,7 @@ defaults if nothing else is specified.</p> <p>Sets the config key to the value.</p> -<p>If value is omitted, then it sets it to "true".</p> +<p>If value is omitted, then it sets it to "true".</p> <h3 id="get">get</h3> @@ -127,13 +127,13 @@ npm ls --global --parseable --long --loglevel info</code></pre> <h2 id="Per-Package-Config-Settings">Per-Package Config Settings</h2> <p>When running scripts (see <code><a href="../doc/scripts.html">scripts(1)</a></code>) -the package.json "config" keys are overwritten in the environment if +the package.json "config" keys are overwritten in the environment if there is a config param of <code><name>[@<version>]:<key></code>. For example, if the package.json has this:</p> -<pre><code>{ "name" : "foo" -, "config" : { "port" : "8080" } -, "scripts" : { "start" : "node server.js" } }</code></pre> +<pre><code>{ "name" : "foo" +, "config" : { "port" : "8080" } +, "scripts" : { "start" : "node server.js" } }</code></pre> <p>and the server.js is this:</p> @@ -154,7 +154,7 @@ even for <code>GET</code> requests.</p> <h3 id="browser">browser</h3> -<ul><li>Default: OS X: <code>"open"</code>, others: <code>"google-chrome"</code></li><li>Type: String</li></ul> +<ul><li>Default: OS X: <code>"open"</code>, others: <code>"google-chrome"</code></li><li>Type: String</li></ul> <p>The browser that is called by the <code>npm docs</code> command to open websites.</p> @@ -165,7 +165,7 @@ even for <code>GET</code> requests.</p> <p>The Certificate Authority signing certificate that is trusted for SSL connections to the registry.</p> -<p>Set to <code>null</code> to only allow "known" registrars, or to a specific CA cert +<p>Set to <code>null</code> to only allow "known" registrars, or to a specific CA cert to trust only that specific signing authority.</p> <p>See also the <code>strict-ssl</code> config.</p> @@ -174,7 +174,7 @@ to trust only that specific signing authority.</p> <ul><li>Default: Windows: <code>%APPDATA%\npm-cache</code>, Posix: <code>~/.npm</code></li><li>Type: path</li></ul> -<p>The location of npm's cache directory. See <code><a href="../doc/cache.html">cache(1)</a></code></p> +<p>The location of npm's cache directory. See <code><a href="../doc/cache.html">cache(1)</a></code></p> <h3 id="cache-lock-stale">cache-lock-stale</h3> @@ -216,9 +216,9 @@ explicitly used, and that only GET requests use the cache.</p> <h3 id="color">color</h3> -<ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean or <code>"always"</code></li></ul> +<ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean or <code>"always"</code></li></ul> -<p>If false, never shows colors. If <code>"always"</code> then always shows colors. +<p>If false, never shows colors. If <code>"always"</code> then always shows colors. If true, then only prints color codes for tty file descriptors.</p> <h3 id="coverage">coverage</h3> @@ -252,8 +252,8 @@ set.</p> <h3 id="editor">editor</h3> -<ul><li>Default: <code>EDITOR</code> environment variable if set, or <code>"vi"</code> on Posix, -or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul> +<ul><li>Default: <code>EDITOR</code> environment variable if set, or <code>"vi"</code> on Posix, +or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul> <p>The command to run for <code>npm edit</code> or <code>npm config edit</code>.</p> @@ -277,33 +277,33 @@ the current Node.js version.</p> <ul><li>Default: 2</li><li>Type: Number</li></ul> -<p>The "retries" config for the <code>retry</code> module to use when fetching +<p>The "retries" config for the <code>retry</code> module to use when fetching packages from the registry.</p> <h3 id="fetch-retry-factor">fetch-retry-factor</h3> <ul><li>Default: 10</li><li>Type: Number</li></ul> -<p>The "factor" config for the <code>retry</code> module to use when fetching +<p>The "factor" config for the <code>retry</code> module to use when fetching packages.</p> <h3 id="fetch-retry-mintimeout">fetch-retry-mintimeout</h3> <ul><li>Default: 10000 (10 seconds)</li><li>Type: Number</li></ul> -<p>The "minTimeout" config for the <code>retry</code> module to use when fetching +<p>The "minTimeout" config for the <code>retry</code> module to use when fetching packages.</p> <h3 id="fetch-retry-maxtimeout">fetch-retry-maxtimeout</h3> <ul><li>Default: 60000 (1 minute)</li><li>Type: Number</li></ul> -<p>The "maxTimeout" config for the <code>retry</code> module to use when fetching +<p>The "maxTimeout" config for the <code>retry</code> module to use when fetching packages.</p> <h3 id="git">git</h3> -<ul><li>Default: <code>"git"</code></li><li>Type: String</li></ul> +<ul><li>Default: <code>"git"</code></li><li>Type: String</li></ul> <p>The command to use for git commands. If git is installed on the computer, but is not in the <code>PATH</code>, then set this to the full path to @@ -313,7 +313,7 @@ the git binary.</p> <ul><li>Default: false</li><li>Type: Boolean</li></ul> -<p>Operates in "global" mode, so that packages are installed into the +<p>Operates in "global" mode, so that packages are installed into the <code>prefix</code> folder instead of the current working directory. See <code><a href="../doc/folders.html">folders(1)</a></code> for more on the differences in behavior.</p> @@ -333,7 +333,7 @@ current working directory.</li><li>bin files are linked to <code>prefix/bin</cod <p>The config file to read for global ignore patterns to apply to all users and all projects.</p> -<p>If not found, but there is a "gitignore" file in the +<p>If not found, but there is a "gitignore" file in the same directory, then that will be used instead.</p> <h3 id="group">group</h3> @@ -358,7 +358,7 @@ user.</p> <h3 id="ignore">ignore</h3> -<ul><li>Default: ""</li><li>Type: string</li></ul> +<ul><li>Default: ""</li><li>Type: string</li></ul> <p>A white-space separated list of glob patterns of files to always exclude from packages when building tarballs.</p> @@ -374,27 +374,27 @@ for more information, or <a href="../doc/init.html">init(1)</a>.</p> <h3 id="init-version">init.version</h3> -<ul><li>Default: "0.0.0"</li><li>Type: semver</li></ul> +<ul><li>Default: "0.0.0"</li><li>Type: semver</li></ul> <p>The value <code>npm init</code> should use by default for the package version.</p> <h3 id="init-author-name">init.author.name</h3> -<ul><li>Default: ""</li><li>Type: String</li></ul> +<ul><li>Default: ""</li><li>Type: String</li></ul> -<p>The value <code>npm init</code> should use by default for the package author's name.</p> +<p>The value <code>npm init</code> should use by default for the package author's name.</p> <h3 id="init-author-email">init.author.email</h3> -<ul><li>Default: ""</li><li>Type: String</li></ul> +<ul><li>Default: ""</li><li>Type: String</li></ul> -<p>The value <code>npm init</code> should use by default for the package author's email.</p> +<p>The value <code>npm init</code> should use by default for the package author's email.</p> <h3 id="init-author-url">init.author.url</h3> -<ul><li>Default: ""</li><li>Type: String</li></ul> +<ul><li>Default: ""</li><li>Type: String</li></ul> -<p>The value <code>npm init</code> should use by default for the package author's homepage.</p> +<p>The value <code>npm init</code> should use by default for the package author's homepage.</p> <h3 id="json">json</h3> @@ -422,13 +422,13 @@ being installed locally.</li></ul> <h3 id="loglevel">loglevel</h3> -<ul><li>Default: "http"</li><li>Type: String</li><li>Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"</li></ul> +<ul><li>Default: "http"</li><li>Type: String</li><li>Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"</li></ul> <p>What level of logs to report. On failure, <em>all</em> logs are written to <code>npm-debug.log</code> in the current working directory.</p> <p>Any logs of a higher level than the setting are shown. -The default is "http", which shows http, warn, and error output.</p> +The default is "http", which shows http, warn, and error output.</p> <h3 id="logstream">logstream</h3> @@ -452,17 +452,17 @@ colored output if it is a TTY.</p> <h3 id="message">message</h3> -<ul><li>Default: "%s"</li><li>Type: String</li></ul> +<ul><li>Default: "%s"</li><li>Type: String</li></ul> <p>Commit message which is used by <code>npm version</code> when creating version commit.</p> -<p>Any "%s" in the message will be replaced with the version number.</p> +<p>Any "%s" in the message will be replaced with the version number.</p> <h3 id="node-version">node-version</h3> <ul><li>Default: process.version</li><li>Type: semver or false</li></ul> -<p>The node version to use when checking package's "engines" hash.</p> +<p>The node version to use when checking package's "engines" hash.</p> <h3 id="npat">npat</h3> @@ -493,7 +493,7 @@ standard output.</p> <h3 id="prefix">prefix</h3> -<ul><li>Default: node's process.installPrefix</li><li>Type: path</li></ul> +<ul><li>Default: node's process.installPrefix</li><li>Type: path</li></ul> <p>The location to install global items. If set on the command line, then it forces non-global commands to run in the specified folder.</p> @@ -502,10 +502,10 @@ it forces non-global commands to run in the specified folder.</p> <ul><li>Default: false</li><li>Type: Boolean</li></ul> -<p>Set to true to run in "production" mode.</p> +<p>Set to true to run in "production" mode.</p> <ol><li>devDependencies are not installed at the topmost level when running -local <code>npm install</code> without any arguments.</li><li>Set the NODE_ENV="production" for lifecycle scripts.</li></ol> +local <code>npm install</code> without any arguments.</li><li>Set the NODE_ENV="production" for lifecycle scripts.</li></ol> <h3 id="proprietary-attribs">proprietary-attribs</h3> @@ -588,27 +588,27 @@ hash.</p> <h3 id="searchopts">searchopts</h3> -<ul><li>Default: ""</li><li>Type: String</li></ul> +<ul><li>Default: ""</li><li>Type: String</li></ul> <p>Space-separated options that are always passed to search.</p> <h3 id="searchexclude">searchexclude</h3> -<ul><li>Default: ""</li><li>Type: String</li></ul> +<ul><li>Default: ""</li><li>Type: String</li></ul> <p>Space-separated options that limit the results from search.</p> <h3 id="searchsort">searchsort</h3> -<ul><li>Default: "name"</li><li>Type: String</li><li>Values: "name", "-name", "date", "-date", "description", -"-description", "keywords", "-keywords"</li></ul> +<ul><li>Default: "name"</li><li>Type: String</li><li>Values: "name", "-name", "date", "-date", "description", +"-description", "keywords", "-keywords"</li></ul> <p>Indication of which field to sort search results by. Prefix with a <code>-</code> character to indicate reverse sort.</p> <h3 id="shell">shell</h3> -<ul><li>Default: SHELL environment variable, or "bash" on Posix, or "cmd" on +<ul><li>Default: SHELL environment variable, or "bash" on Posix, or "cmd" on Windows</li><li>Type: path</li></ul> <p>The shell to run for the <code>npm explore</code> command.</p> @@ -636,7 +636,7 @@ registry via https.</p> <ul><li>Default: latest</li><li>Type: String</li></ul> -<p>If you ask npm to install a package and don't tell it a specific version, then +<p>If you ask npm to install a package and don't tell it a specific version, then it will install the specified tag.</p> <p>Also the tag that is added to the package@version specified by the <code>npm @@ -644,7 +644,7 @@ tag</code> command, if no explicit tag is given.</p> <h3 id="tmp">tmp</h3> -<ul><li>Default: TMPDIR environment variable, or "/tmp"</li><li>Type: path</li></ul> +<ul><li>Default: TMPDIR environment variable, or "/tmp"</li><li>Type: path</li></ul> <p>Where to store temporary files and folders. All temp files are deleted on success, but left behind on failure for forensic purposes.</p> @@ -673,7 +673,7 @@ instead of complete help when doing <code><a href="../doc/help.html">help(1)</a> <h3 id="user">user</h3> -<ul><li>Default: "nobody"</li><li>Type: String or Number</li></ul> +<ul><li>Default: "nobody"</li><li>Type: String or Number</li></ul> <p>The UID to set to when running package scripts as root.</p> @@ -702,7 +702,7 @@ that will be used instead.</p> <ul><li>Default: 022</li><li>Type: Octal numeric string</li></ul> -<p>The "umask" value to use when setting the file creation mode on files +<p>The "umask" value to use when setting the file creation mode on files and folders.</p> <p>Folders and executables are given a mode which is <code>0777</code> masked against @@ -721,18 +721,18 @@ this value. Thus, the defaults are <code>0755</code> and <code>0644</code> resp <ul><li>Default: false</li><li>Type: boolean</li></ul> -<p>If true, output the npm version as well as node's <code>process.versions</code> +<p>If true, output the npm version as well as node's <code>process.versions</code> hash, and exit successfully.</p> <p>Only relevant when specified explicitly on the command line.</p> <h3 id="viewer">viewer</h3> -<ul><li>Default: "man" on Posix, "browser" on Windows</li><li>Type: path</li></ul> +<ul><li>Default: "man" on Posix, "browser" on Windows</li><li>Type: path</li></ul> <p>The program to use to view help content.</p> -<p>Set to <code>"browser"</code> to view html help content in the default web browser.</p> +<p>Set to <code>"browser"</code> to view html help content in the default web browser.</p> <h3 id="yes">yes</h3> @@ -741,14 +741,14 @@ hash, and exit successfully.</p> <p>If set to <code>null</code>, then prompt the user for responses in some circumstances.</p> -<p>If set to <code>true</code>, then answer "yes" to any prompt. If set to <code>false</code> -then answer "no" to any prompt.</p> +<p>If set to <code>true</code>, then answer "yes" to any prompt. If set to <code>false</code> +then answer "no" to any prompt.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">config — npm@1.1.46</p> +<p id="footer">config — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/deprecate.html b/deps/npm/html/doc/deprecate.html index acf55452b1..68f7d3013e 100644 --- a/deps/npm/html/doc/deprecate.html +++ b/deps/npm/html/doc/deprecate.html @@ -20,7 +20,7 @@ a deprecation warning to all who attempt to install it.</p> <p>It works on version ranges as well as specific versions, so you can do something like this:</p> -<pre><code>npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"</code></pre> +<pre><code>npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"</code></pre> <p>Note that you must be the package owner to deprecate something. See the <code>owner</code> and <code>adduser</code> help topics.</p> @@ -29,7 +29,7 @@ something like this:</p> <ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul> </div> -<p id="footer">deprecate — npm@1.1.46</p> +<p id="footer">deprecate — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/developers.html b/deps/npm/html/doc/developers.html index 721ca2c13a..a6c30b0132 100644 --- a/deps/npm/html/doc/developers.html +++ b/deps/npm/html/doc/developers.html @@ -10,7 +10,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>So, you've decided to use npm to develop (and maybe publish/deploy) +<p>So, you've decided to use npm to develop (and maybe publish/deploy) your project.</p> <p>Fantastic!</p> @@ -24,11 +24,11 @@ that your users will do to install your program.</p> then do <code>man npm-thing</code> to get the documentation on a particular topic, or <code>npm help thing</code> to see the same information.</p> -<h2 id="What-is-a-package">What is a `package`</h2> +<h2 id="What-is-a-package">What is a <code>package</code></h2> <p>A package is:</p> -<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code><name>@<version></code> that is published on the registry with (c)</li><li>e) a <code><name>@<tag></code> that points to (d)</li><li>f) a <code><name></code> that has a "latest" tag satisfying (e)</li><li>g) a <code>git</code> url that, when cloned, results in (a).</li></ul> +<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code><name>@<version></code> that is published on the registry with (c)</li><li>e) a <code><name>@<tag></code> that points to (d)</li><li>f) a <code><name></code> that has a "latest" tag satisfying (e)</li><li>g) a <code>git</code> url that, when cloned, results in (a).</li></ul> <p>Even if you never publish your package, you can still get a lot of benefits of using npm if you just want to write a node program (a), and @@ -56,9 +56,9 @@ least, you need:</p> <ul><li><p>name: This should be a string that identifies your project. Please do not use the name to specify that it runs on node, or is in JavaScript. -You can use the "engines" field to explicitly state the versions of -node (or whatever else) that your program requires, and it's pretty -well assumed that it's javascript.</p><p>It does not necessarily need to match your github repository name.</p><p>So, <code>node-foo</code> and <code>bar-js</code> are bad names. <code>foo</code> or <code>bar</code> are better.</p></li><li><p>version: +You can use the "engines" field to explicitly state the versions of +node (or whatever else) that your program requires, and it's pretty +well assumed that it's javascript.</p><p>It does not necessarily need to match your github repository name.</p><p>So, <code>node-foo</code> and <code>bar-js</code> are bad names. <code>foo</code> or <code>bar</code> are better.</p></li><li><p>version: A semver-compatible version.</p></li><li><p>engines: Specify the versions of node (or whatever else) that your program runs on. The node API changes a lot, and there may be bugs or new @@ -66,22 +66,22 @@ functionality that you depend on. Be explicit.</p></li><li><p>author: Take some credit.</p></li><li><p>scripts: If you have a special compilation or installation script, then you should put it in the <code>scripts</code> hash. You should definitely have at -least a basic smoke-test command as the "scripts.test" field. +least a basic smoke-test command as the "scripts.test" field. See <a href="../doc/scripts.html">scripts(1)</a>.</p></li><li><p>main: If you have a single module that serves as the entry point to your -program (like what the "foo" package gives you at require("foo")), -then you need to specify that in the "main" field.</p></li><li><p>directories: -This is a hash of folders. The best ones to include are "lib" and -"doc", but if you specify a folder full of man pages in "man", then -they'll get installed just like these ones.</p></li></ul> +program (like what the "foo" package gives you at require("foo")), +then you need to specify that in the "main" field.</p></li><li><p>directories: +This is a hash of folders. The best ones to include are "lib" and +"doc", but if you specify a folder full of man pages in "man", then +they'll get installed just like these ones.</p></li></ul> <p>You can use <code>npm init</code> in the root of your package in order to get you started with a pretty basic package.json file. See <code><a href="../doc/init.html">init(1)</a></code> for more info.</p> -<h2 id="Keeping-files-out-of-your-package">Keeping files *out* of your package</h2> +<h2 id="Keeping-files-out-of-your-package">Keeping files <em>out</em> of your package</h2> -<p>Use a <code>.npmignore</code> file to keep stuff out of your package. If there's +<p>Use a <code>.npmignore</code> file to keep stuff out of your package. If there's no .npmignore file, but there <em>is</em> a .gitignore file, then npm will ignore the stuff matched by the .gitignore file. If you <em>want</em> to include something that is excluded by your .gitignore file, you can @@ -100,21 +100,21 @@ of course.)</p> <p><strong>This is important.</strong></p> -<p>If you can not install it locally, you'll have -problems trying to publish it. Or, worse yet, you'll be able to -publish it, but you'll be publishing a broken or pointless package. -So don't do that.</p> +<p>If you can not install it locally, you'll have +problems trying to publish it. Or, worse yet, you'll be able to +publish it, but you'll be publishing a broken or pointless package. +So don't do that.</p> <p>In the root of your package, do this:</p> <pre><code>npm install . -g</code></pre> -<p>That'll show you that it's working. If you'd rather just create a symlink +<p>That'll show you that it's working. If you'd rather just create a symlink package that points to your working directory, then do this:</p> <pre><code>npm link</code></pre> -<p>Use <code>npm ls -g</code> to see if it's there.</p> +<p>Use <code>npm ls -g</code> to see if it's there.</p> <p>To test a local install, go into some other folder, and then do:</p> @@ -123,8 +123,8 @@ npm install ../my-package</code></pre> <p>to install it locally into the node_modules folder in that other place.</p> -<p>Then go into the node-repl, and try using require("my-thing") to -bring in your module's main module.</p> +<p>Then go into the node-repl, and try using require("my-thing") to +bring in your module's main module.</p> <h2 id="Create-a-User-Account">Create a User Account</h2> @@ -138,7 +138,7 @@ bring in your module's main module.</p> <h2 id="Publish-your-package">Publish your package</h2> -<p>This part's easy. IN the root of your folder, do this:</p> +<p>This part's easy. IN the root of your folder, do this:</p> <pre><code>npm publish</code></pre> @@ -160,7 +160,7 @@ from a fresh checkout.</p> <ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul> </div> -<p id="footer">developers — npm@1.1.46</p> +<p id="footer">developers — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/disputes.html b/deps/npm/html/doc/disputes.html index c6f7390939..5cda8b1af1 100644 --- a/deps/npm/html/doc/disputes.html +++ b/deps/npm/html/doc/disputes.html @@ -10,7 +10,7 @@ <h2 id="SYNOPSIS">SYNOPSIS</h2> -<ol><li>Get the author email with <code>npm owner ls <pkgname></code></li><li>Email the author, CC <a href="mailto:i@izs.me">i@izs.me</a>.</li><li>After a few weeks, if there's no resolution, we'll sort it out.</li></ol> +<ol><li>Get the author email with <code>npm owner ls <pkgname></code></li><li>Email the author, CC <a href="mailto:i@izs.me">i@izs.me</a>.</li><li>After a few weeks, if there's no resolution, we'll sort it out.</li></ol> <h2 id="DESCRIPTION">DESCRIPTION</h2> @@ -19,14 +19,14 @@ later, some other user wants to use that name. Here are some common ways that happens (each of these is based on actual events.)</p> <ol><li>Bob writes a JavaScript module <code>foo</code>, which is not node-specific. -Bob doesn't use node at all. Joe wants to use <code>foo</code> in node, so he +Bob doesn't use node at all. Joe wants to use <code>foo</code> 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.</li><li>Bob writes an npm module <code>foo</code>, and publishes it. Perhaps much later, Joe finds a bug in <code>foo</code>, and fixes it. He sends a pull -request to Bob, but Bob doesn't have the time to deal with it, +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 <code>foo</code>, but can't, because the name is +would like to publish a new <code>foo</code>, but can't, because the name is taken.</li><li>Bob writes a 10-line flow-control library, and calls it <code>foo</code>, 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 @@ -35,10 +35,10 @@ toolkit framework. They publish it to npm as <code>foojs</code>, but people are routinely confused when <code>npm install foo</code> is some different thing.</li><li>Bob writes a parser for the widely-known <code>foo</code> 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 <code>foo</code> parser, -but can't publish, because Bob's <code>foo</code> is in the way.</li></ol> +but can't publish, because Bob's <code>foo</code> is in the way.</li></ol> -<p>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.</p> +<p>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.</p> <ol><li><code>npm owner ls foo</code>. This will tell Joe the email address of the owner (Bob).</li><li>Joe emails Bob, explaining the situation <strong>as respecfully as possible</strong>, @@ -46,15 +46,15 @@ and what he would like to do with the module name. He adds isaacs <a href="mailto:i@izs.me">i@izs.me</a> to the CC list of the email. Mention in the email that Bob can run <code>npm owner add joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li><li>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 -<a href="mailto:i@izs.me">i@izs.me</a> and we'll sort it out.</li></ol> +Bob and Joe can't come to any sort of resolution, email isaacs +<a href="mailto:i@izs.me">i@izs.me</a> and we'll sort it out.</li></ol> <h2 id="REASONING">REASONING</h2> <p>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.</p> +they're in your way.</p> <p>Module ecosystems are most vibrant and powerful when they are as self-directed as possible. If an admin one day deletes something you @@ -80,7 +80,7 @@ license statement)</li><li>Illegal content.</li></ol> <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul> </div> -<p id="footer">disputes — npm@1.1.46</p> +<p id="footer">disputes — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/docs.html b/deps/npm/html/doc/docs.html index 61606da38a..887cfddd81 100644 --- a/deps/npm/html/doc/docs.html +++ b/deps/npm/html/doc/docs.html @@ -15,7 +15,7 @@ npm home <pkgname></code></pre> <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This command tries to guess at the likely location of a package's +<p>This command tries to guess at the likely location of a package's documentation URL, and then tries to open it using the <code>--browser</code> config param.</p> @@ -23,7 +23,7 @@ config param.</p> <h3 id="browser">browser</h3> -<ul><li>Default: OS X: <code>"open"</code>, others: <code>"google-chrome"</code></li><li>Type: String</li></ul> +<ul><li>Default: OS X: <code>"open"</code>, others: <code>"google-chrome"</code></li><li>Type: String</li></ul> <p>The browser that is called by the <code>npm docs</code> command to open websites.</p> @@ -37,7 +37,7 @@ config param.</p> <ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul> </div> -<p id="footer">docs — npm@1.1.46</p> +<p id="footer">docs — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/edit.html b/deps/npm/html/doc/edit.html index 10e56b62a5..ab81081dcd 100644 --- a/deps/npm/html/doc/edit.html +++ b/deps/npm/html/doc/edit.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>Opens the package folder in the default editor (or whatever you've +<p>Opens the package folder in the default editor (or whatever you've configured as the npm <code>editor</code> config -- see <code><a href="../doc/config.html">config(1)</a></code>.)</p> <p>After it has been edited, the package is rebuilt so as to pick up any @@ -28,8 +28,8 @@ changes to your locally installed copy.</p> <h3 id="editor">editor</h3> -<ul><li>Default: <code>EDITOR</code> environment variable if set, or <code>"vi"</code> on Posix, -or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul> +<ul><li>Default: <code>EDITOR</code> environment variable if set, or <code>"vi"</code> on Posix, +or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul> <p>The command to run for <code>npm edit</code> or <code>npm config edit</code>.</p> @@ -37,7 +37,7 @@ or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul> <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">edit — npm@1.1.46</p> +<p id="footer">edit — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/explore.html b/deps/npm/html/doc/explore.html index e3b9a8c3f0..90d8d68c48 100644 --- a/deps/npm/html/doc/explore.html +++ b/deps/npm/html/doc/explore.html @@ -31,7 +31,7 @@ sure to use <code>npm rebuild <pkg></code> if you make any changes.</p> <h3 id="shell">shell</h3> -<ul><li>Default: SHELL environment variable, or "bash" on Posix, or "cmd" on +<ul><li>Default: SHELL environment variable, or "bash" on Posix, or "cmd" on Windows</li><li>Type: path</li></ul> <p>The shell to run for the <code>npm explore</code> command.</p> @@ -40,7 +40,7 @@ Windows</li><li>Type: path</li></ul> <ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul> </div> -<p id="footer">explore — npm@1.1.46</p> +<p id="footer">explore — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/faq.html b/deps/npm/html/doc/faq.html index 818496a546..f9337fc6be 100644 --- a/deps/npm/html/doc/faq.html +++ b/deps/npm/html/doc/faq.html @@ -16,15 +16,15 @@ <p>to open these documents in your default web browser rather than <code>man</code>.</p> -<h2 id="It-didn-t-work">It didn't work.</h2> +<h2 id="It-didn-t-work">It didn't work.</h2> -<p>That's not really a question.</p> +<p>That's not really a question.</p> -<h2 id="Why-didn-t-it-work">Why didn't it work?</h2> +<h2 id="Why-didn-t-it-work">Why didn't it work?</h2> -<p>I don't know yet.</p> +<p>I don't know yet.</p> -<p>Read the error output, and if you can't figure out what it means, +<p>Read the error output, and if you can't figure out what it means, do what it says and post a bug with all the information it asks for.</p> <h2 id="Where-does-npm-put-stuff">Where does npm put stuff?</h2> @@ -44,22 +44,22 @@ and its modules go in <code>npm root -g</code>.</li></ul> is especially important for command line utilities that need to add their bins to the global system <code>PATH</code>.)</p> -<h2 id="I-installed-something-globally-but-I-can-t-require-it">I installed something globally, but I can't `require()` it</h2> +<h2 id="I-installed-something-globally-but-I-can-t-require-it">I installed something globally, but I can't <code>require()</code> it</h2> <p>Install it locally.</p> <p>The global install location is a place for command-line utilities -to put their bins in the system <code>PATH</code>. It's not for use with <code>require()</code>.</p> +to put their bins in the system <code>PATH</code>. It's not for use with <code>require()</code>.</p> -<p>If you <code>require()</code> a module in your code, then that means it's a +<p>If you <code>require()</code> 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.</p> -<h2 id="Why-can-t-npm-just-put-everything-in-one-place-like-other-package-managers">Why can't npm just put everything in one place, like other package managers?</h2> +<h2 id="Why-can-t-npm-just-put-everything-in-one-place-like-other-package-managers">Why can't npm just put everything in one place, like other package managers?</h2> <p>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 +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.</p> <p>It is much harder to avoid dependency conflicts without nesting @@ -69,16 +69,16 @@ more details.</p> <p>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 <code>npm link</code> command. -That's what it's for. Install it globally, then link it into each +That's what it's for. Install it globally, then link it into each program that uses it.</p> -<h2 id="Whatever-I-really-want-the-old-style-everything-global-style">Whatever, I really want the old style 'everything global' style.</h2> +<h2 id="Whatever-I-really-want-the-old-style-everything-global-style">Whatever, I really want the old style 'everything global' style.</h2> -<p>Write your own package manager, then. It's not that hard.</p> +<p>Write your own package manager, then. It's not that hard.</p> <p>npm will not help you do something that is known to be a bad idea.</p> -<h2 id="Should-I-check-my-node_modules-folder-into-git">Should I check my `node_modules` folder into git?</h2> +<h2 id="Should-I-check-my-node_modules-folder-into-git">Should I check my <code>node_modules</code> folder into git?</h2> <p>Mikeal Rogers answered this question very well:</p> @@ -91,33 +91,33 @@ websites and apps.</li><li>Do not check <code>node_modules</code> into git for l intended to be reused.</li><li>Use npm to manage dependencies in your dev environment, but not in your deployment scripts.</li></ul> -<h2 id="Is-it-npm-or-NPM-or-Npm">Is it 'npm' or 'NPM' or 'Npm'?</h2> +<h2 id="Is-it-npm-or-NPM-or-Npm">Is it 'npm' or 'NPM' or 'Npm'?</h2> <p>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.)</p> -<h2 id="If-npm-is-an-acronym-why-is-it-never-capitalized">If 'npm' is an acronym, why is it never capitalized?</h2> +<h2 id="If-npm-is-an-acronym-why-is-it-never-capitalized">If 'npm' is an acronym, why is it never capitalized?</h2> -<p>Contrary to the belief of many, "npm" is not in fact an abbreviation for -"Node Package Manager". It is a recursive bacronymic abbreviation for -"npm is not an acronym". (If it was "ninaa", then it would be an +<p>Contrary to the belief of many, "npm" is not in fact an abbreviation for +"Node Package Manager". It is a recursive bacronymic abbreviation for +"npm is not an acronym". (If it was "ninaa", then it would be an acronym, and thus incorrectly named.)</p> -<p>"NPM", however, <em>is</em> an acronym (more precisely, a capitonym) for the +<p>"NPM", however, <em>is</em> an acronym (more precisely, a capitonym) for the National Association of Pastoral Musicians. You can learn more about them at <a href="http://npm.org/">http://npm.org/</a>.</p> -<p>In software, "NPM" is a Non-Parametric Mapping utility written by +<p>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 <a href="http://www.cabiatl.com/mricro/npm/">http://www.cabiatl.com/mricro/npm/</a>.</p> <p>The first seed that eventually grew into this flower was a bash utility -named "pm", which was a shortened descendent of "pkgmakeinst", a +named "pm", which was a shortened descendent of "pkgmakeinst", a bash function that was used to install various different things on different -platforms, most often using Yahoo's <code>yinst</code>. If <code>npm</code> was ever an +platforms, most often using Yahoo's <code>yinst</code>. If <code>npm</code> was ever an acronym for anything, it was <code>node pm</code> or maybe <code>new pm</code>.</p> -<p>So, in all seriousness, the "npm" project is named after its command-line +<p>So, in all seriousness, the "npm" project is named after its command-line utility, which was organically selected to be easily typed by a right-handed programmer using a US QWERTY keyboard layout, ending with the right-ring-finger in a postition to type the <code>-</code> key for flags and @@ -150,11 +150,11 @@ command.)</p> <pre><code>curl http://npmjs.org/install.sh | sh</code></pre> -<h2 id="What-is-a-package">What is a `package`?</h2> +<h2 id="What-is-a-package">What is a <code>package</code>?</h2> <p>A package is:</p> -<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code><name>@<version></code> that is published on the registry with (c)</li><li>e) a <code><name>@<tag></code> that points to (d)</li><li>f) a <code><name></code> that has a "latest" tag satisfying (e)</li><li>g) a <code>git</code> url that, when cloned, results in (a).</li></ul> +<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code><name>@<version></code> that is published on the registry with (c)</li><li>e) a <code><name>@<tag></code> that points to (d)</li><li>f) a <code><name></code> that has a "latest" tag satisfying (e)</li><li>g) a <code>git</code> url that, when cloned, results in (a).</li></ul> <p>Even if you never publish your package, you can still get a lot of benefits of using npm if you just want to write a node program (a), and @@ -173,7 +173,7 @@ an argument to <code>git checkout</code>. The default is <code>master</code>.</ <h2 id="How-do-I-install-node-with-npm">How do I install node with npm?</h2> -<p>You don't. Try one of these:</p> +<p>You don't. Try one of these:</p> <ul><li><a href="http://github.com/isaacs/nave">http://github.com/isaacs/nave</a></li><li><a href="http://github.com/visionmedia/n">http://github.com/visionmedia/n</a></li><li><a href="http://github.com/creationix/nvm">http://github.com/creationix/nvm</a></li></ul> @@ -181,7 +181,7 @@ an argument to <code>git checkout</code>. The default is <code>master</code>.</ <p>See <code><a href="../doc/developers.html">developers(1)</a></code> and <code><a href="../doc/json.html">json(1)</a></code>.</p> -<p>You'll most likely want to <code>npm link</code> your development folder. That's +<p>You'll most likely want to <code>npm link</code> your development folder. That's awesomely handy.</p> <p>To set up your own private registry, check out <code><a href="../doc/registry.html">registry(1)</a></code>.</p> @@ -190,9 +190,9 @@ awesomely handy.</p> <p>Yes. It should be a url to a gzipped tarball containing a single folder that has a package.json in its root, or a git url. -(See "what is a package?" above.)</p> +(See "what is a package?" above.)</p> -<h2 id="How-do-I-symlink-to-a-dev-folder-so-I-don-t-have-to-keep-re-installing">How do I symlink to a dev folder so I don't have to keep re-installing?</h2> +<h2 id="How-do-I-symlink-to-a-dev-folder-so-I-don-t-have-to-keep-re-installing">How do I symlink to a dev folder so I don't have to keep re-installing?</h2> <p>See <code><a href="../doc/link.html">link(1)</a></code></p> @@ -200,18 +200,18 @@ that has a package.json in its root, or a git url. <p>See <code><a href="../doc/registry.html">registry(1)</a></code>.</p> -<h2 id="What-s-up-with-the-insecure-channel-warnings">What's up with the insecure channel warnings?</h2> +<h2 id="What-s-up-with-the-insecure-channel-warnings">What's up with the insecure channel warnings?</h2> <p>Until node 0.4.10, there were problems sending big files over HTTPS. That means that publishes go over HTTP by default in those versions of node.</p> -<h2 id="I-forgot-my-password-and-can-t-publish-How-do-I-reset-it">I forgot my password, and can't publish. How do I reset it?</h2> +<h2 id="I-forgot-my-password-and-can-t-publish-How-do-I-reset-it">I forgot my password, and can't publish. How do I reset it?</h2> <p>Go to <a href="http://admin.npmjs.org/reset">http://admin.npmjs.org/reset</a>.</p> -<h2 id="I-get-ECONNREFUSED-a-lot-What-s-up">I get ECONNREFUSED a lot. What's up?</h2> +<h2 id="I-get-ECONNREFUSED-a-lot-What-s-up">I get ECONNREFUSED a lot. What's up?</h2> -<p>Either the registry is down, or node's DNS isn't able to reach out.</p> +<p>Either the registry is down, or node's DNS isn't able to reach out.</p> <p>To check if the registry is down, open up <a href="http://registry.npmjs.org/">http://registry.npmjs.org/</a> @@ -219,7 +219,7 @@ in a web browser. This will also tell you if you are just unable to access the internet for some reason.</p> <p>If the registry IS down, let me know by emailing or posting an issue. -We'll have someone kick it or something.</p> +We'll have someone kick it or something.</p> <h2 id="Who-does-npm">Who does npm?</h2> @@ -241,7 +241,7 @@ We'll have someone kick it or something.</p> <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul> </div> -<p id="footer">faq — npm@1.1.46</p> +<p id="footer">faq — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/folders.html b/deps/npm/html/doc/folders.html index 18013d993b..c5ab5d42b6 100644 --- a/deps/npm/html/doc/folders.html +++ b/deps/npm/html/doc/folders.html @@ -10,7 +10,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>npm puts various things on your computer. That's its job.</p> +<p>npm puts various things on your computer. That's its job.</p> <p>This document will tell you what it puts where.</p> @@ -18,16 +18,16 @@ <ul><li>Local install (default): puts stuff in <code>./node_modules</code> of the current package root.</li><li>Global install (with <code>-g</code>): puts stuff in /usr/local or wherever node -is installed.</li><li>Install it <strong>locally</strong> if you're going to <code>require()</code> it.</li><li>Install it <strong>globally</strong> if you're going to run it on the command line.</li><li>If you need both, then install it in both places, or use <code>npm link</code>.</li></ul> +is installed.</li><li>Install it <strong>locally</strong> if you're going to <code>require()</code> it.</li><li>Install it <strong>globally</strong> if you're going to run it on the command line.</li><li>If you need both, then install it in both places, or use <code>npm link</code>.</li></ul> <h3 id="prefix-Configuration">prefix Configuration</h3> <p>The <code>prefix</code> config defaults to the location where node is installed. On most systems, this is <code>/usr/local</code>, and most of the time is the same -as node's <code>process.installPrefix</code>.</p> +as node's <code>process.installPrefix</code>.</p> <p>On windows, this is the exact location of the node.exe binary. On Unix -systems, it's one level up, since node is typically installed at +systems, it's one level up, since node is typically installed at <code>{prefix}/bin/node</code> rather than <code>{prefix}/node.exe</code>.</p> <p>When the <code>global</code> flag is set, npm installs things into this prefix. @@ -38,8 +38,8 @@ current working directory if not in a package already.</p> <p>Packages are dropped into the <code>node_modules</code> folder under the <code>prefix</code>. When installing locally, this means that you can -<code>require("packagename")</code> to load its main module, or -<code>require("packagename/lib/path/to/sub/module")</code> to load other modules.</p> +<code>require("packagename")</code> to load its main module, or +<code>require("packagename/lib/path/to/sub/module")</code> to load other modules.</p> <p>Global installs on Unix systems go to <code>{prefix}/lib/node_modules</code>. Global installs on Windows go to <code>{prefix}/node_modules</code> (that is, no @@ -91,15 +91,15 @@ into some other folder.</p> <p>Starting at the $PWD, npm will walk up the folder tree checking for a folder that contains either a <code>package.json</code> file, or a <code>node_modules</code> folder. If such a thing is found, then that is treated as the effective -"current directory" for the purpose of running npm commands. (This -behavior is inspired by and similar to git's .git-folder seeking +"current directory" for the purpose of running npm commands. (This +behavior is inspired by and similar to git's .git-folder seeking logic when running git commands in a working dir.)</p> <p>If no package root is found, then the current folder is used.</p> <p>When you run <code>npm install foo@1.2.3</code>, then the package is loaded into the cache, and then unpacked into <code>./node_modules/foo</code>. Then, any of -foo's dependencies are similarly unpacked into +foo's dependencies are similarly unpacked into <code>./node_modules/foo/node_modules/...</code>.</p> <p>Any bin files are symlinked to <code>./node_modules/.bin/</code>, so that they may @@ -108,35 +108,35 @@ be found by npm scripts when necessary.</p> <h3 id="Global-Installation">Global Installation</h3> <p>If the <code>global</code> configuration is set to true, then npm will -install packages "globally".</p> +install packages "globally".</p> <p>For global installation, packages are installed roughly the same way, but using the folders described above.</p> <h3 id="Cycles-Conflicts-and-Folder-Parsimony">Cycles, Conflicts, and Folder Parsimony</h3> -<p>Cycles are handled using the property of node's module system that it +<p>Cycles are handled using the property of node's module system that it walks up the directories looking for <code>node_modules</code> folders. So, at every stage, if a package is already installed in an ancestor <code>node_modules</code> folder, then it is not installed at the current location.</p> <p>Consider the case above, where <code>foo -> bar -> baz</code>. Imagine if, in -addition to that, baz depended on bar, so you'd have: +addition to that, baz depended on bar, so you'd have: <code>foo -> bar -> baz -> bar -> baz ...</code>. However, since the folder -structure is: <code>foo/node_modules/bar/node_modules/baz</code>, there's no need to +structure is: <code>foo/node_modules/bar/node_modules/baz</code>, there's no need to put another copy of bar into <code>.../baz/node_modules</code>, since when it calls -require("bar"), it will get the copy that is installed in +require("bar"), it will get the copy that is installed in <code>foo/node_modules/bar</code>.</p> <p>This shortcut is only used if the exact same version would be installed in multiple nested <code>node_modules</code> folders. It is still possible to have <code>a/node_modules/b/node_modules/a</code> if the two -"a" packages are different versions. However, without repeating the +"a" packages are different versions. However, without repeating the exact same package multiple times, an infinite regress will always be prevented.</p> <p>Another optimization can be made by installing dependencies at the -highest level possible, below the localized "target" folder.</p> +highest level possible, below the localized "target" folder.</p> <h4 id="Example">Example</h4> @@ -170,23 +170,23 @@ highest level possible, below the localized "target" folder.</p> `-- quux (3.2.0) <---[E]</code></pre> <p>Since foo depends directly on bar@1.2.3 and baz@1.2.3, those are -installed in foo's <code>node_modules</code> folder.</p> +installed in foo's <code>node_modules</code> folder.</p> <p>Even though the latest copy of blerg is 1.3.7, foo has a specific dependency on version 1.2.5. So, that gets installed at [A]. Since the -parent installation of blerg satisfie's bar's dependency on blerg@1.x, +parent installation of blerg satisfie's bar's dependency on blerg@1.x, it does not install another copy under [B].</p> <p>Bar [B] also has dependencies on baz and asdf, so those are installed in -bar's <code>node_modules</code> folder. Because it depends on <code>baz@2.x</code>, it cannot +bar's <code>node_modules</code> folder. Because it depends on <code>baz@2.x</code>, it cannot re-use the <code>baz@1.2.3</code> installed in the parent <code>node_modules</code> folder [D], and must install its own copy [C].</p> <p>Underneath bar, the <code>baz->quux->bar</code> dependency creates a cycle. -However, because <code>bar</code> is already in <code>quux</code>'s ancestry [B], it does not +However, because <code>bar</code> is already in <code>quux</code>'s ancestry [B], it does not unpack another copy of bar into that folder.</p> -<p>Underneath <code>foo->baz</code> [D], quux's [E] folder tree is empty, because its +<p>Underneath <code>foo->baz</code> [D], quux's [E] folder tree is empty, because its dependency on bar is satisfied by the parent folder copy installed at [B].</p> <p>For a graphical breakdown of what is installed where, use <code>npm ls</code>.</p> @@ -205,7 +205,7 @@ cannot be found elsewhere. See <code><a href="../doc/json.html">json(1)</a></co <ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul> </div> -<p id="footer">folders — npm@1.1.46</p> +<p id="footer">folders — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/help-search.html b/deps/npm/html/doc/help-search.html index fa8d0ab5ea..c1780e75e8 100644 --- a/deps/npm/html/doc/help-search.html +++ b/deps/npm/html/doc/help-search.html @@ -29,7 +29,7 @@ command directly.</p> <ul><li>Type: Boolean</li><li>Default false</li></ul> -<p>If true, the "long" flag will cause help-search to output context around +<p>If true, the "long" flag will cause help-search to output context around where the terms were found in the documentation.</p> <p>If false, then help-search will just list out the help topics found.</p> @@ -38,7 +38,7 @@ where the terms were found in the documentation.</p> <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul> </div> -<p id="footer">help-search — npm@1.1.46</p> +<p id="footer">help-search — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/help.html b/deps/npm/html/doc/help.html index 952e378cbe..df582efbf7 100644 --- a/deps/npm/html/doc/help.html +++ b/deps/npm/html/doc/help.html @@ -26,17 +26,17 @@ matches are equivalent to specifying a topic name.</p> <h3 id="viewer">viewer</h3> -<ul><li>Default: "man" on Posix, "browser" on Windows</li><li>Type: path</li></ul> +<ul><li>Default: "man" on Posix, "browser" on Windows</li><li>Type: path</li></ul> <p>The program to use to view help content.</p> -<p>Set to <code>"browser"</code> to view html help content in the default web browser.</p> +<p>Set to <code>"browser"</code> to view html help content in the default web browser.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul> </div> -<p id="footer">help — npm@1.1.46</p> +<p id="footer">help — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 63d45feaa7..e430b5b4df 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -44,7 +44,7 @@ <h2 id="npm-coding-style-1"><a href="../doc/coding-style.html">coding-style(1)</a></h2> -<p> npm's "funny" coding style</p> +<p> npm's "funny" coding style</p> <h2 id="npm-completion-1"><a href="../doc/completion.html">completion(1)</a></h2> @@ -104,7 +104,7 @@ <h2 id="npm-json-1"><a href="../doc/json.html">json(1)</a></h2> -<p> Specifics of npm's package.json handling</p> +<p> Specifics of npm's package.json handling</p> <h2 id="npm-link-1"><a href="../doc/link.html">link(1)</a></h2> @@ -168,7 +168,7 @@ <h2 id="npm-scripts-1"><a href="../doc/scripts.html">scripts(1)</a></h2> -<p> How npm handles the "scripts" field</p> +<p> How npm handles the "scripts" field</p> <h2 id="npm-search-1"><a href="../doc/search.html">search(1)</a></h2> @@ -384,7 +384,7 @@ <p> Display npm username</p> </div> -<p id="footer">index — npm@1.1.46</p> +<p id="footer">index — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/init.html b/deps/npm/html/doc/init.html index ff24410bcc..5fed6472a0 100644 --- a/deps/npm/html/doc/init.html +++ b/deps/npm/html/doc/init.html @@ -17,9 +17,9 @@ <p>This will ask you a bunch of questions, and then write a package.json for you.</p> <p>It attempts to make reasonable guesses about what you want things to be set to, -and then writes a package.json file with the options you've selected.</p> +and then writes a package.json file with the options you've selected.</p> -<p>If you already have a package.json file, it'll read that first, and default to +<p>If you already have a package.json file, it'll read that first, and default to the options in there.</p> <p>It is strictly additive, so it does not delete options from your package.json @@ -29,7 +29,7 @@ without a really good reason to do so.</p> <ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul> </div> -<p id="footer">init — npm@1.1.46</p> +<p id="footer">init — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/install.html b/deps/npm/html/doc/install.html index 15d45667e9..257a45cc49 100644 --- a/deps/npm/html/doc/install.html +++ b/deps/npm/html/doc/install.html @@ -28,7 +28,7 @@ by that. See <a href="../doc/shrinkwrap.html">shrinkwrap(1)</a>.</p> <p>A <code>package</code> is:</p> -<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code><name>@<version></code> that is published on the registry with (c)</li><li>e) a <code><name>@<tag></code> that points to (d)</li><li>f) a <code><name></code> that has a "latest" tag satisfying (e)</li><li>g) a <code><git remote url></code> that resolves to (b)</li></ul> +<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code><name>@<version></code> that is published on the registry with (c)</li><li>e) a <code><name>@<tag></code> that points to (d)</li><li>f) a <code><name></code> that has a "latest" tag satisfying (e)</li><li>g) a <code><git remote url></code> that resolves to (b)</li></ul> <p>Even if you never publish your package, you can still get a lot of benefits of using npm if you just want to write a node program (a), and @@ -40,7 +40,7 @@ it installs the current package context (ie, the current working directory) as a global package.</p></li><li><p><code>npm install <folder></code>:</p><p>Install a package that is sitting in a folder on the filesystem.</p></li><li><p><code>npm install <tarball file></code>:</p><p>Install a package that is sitting on the filesystem. Note: if you just want to link a dev directory into your npm root, you can do this more easily by using <code>npm link</code>.</p><p>Example:</p><pre><code> npm install ./package.tgz</code></pre></li><li><p><code>npm install <tarball url></code>:</p><p>Fetch the tarball url, and then install it. In order to distinguish between -this and other options, the argument must start with "http://" or "https://"</p><p>Example:</p><pre><code> npm install https://github.com/indexzero/forever/tarball/v0.5.6</code></pre></li><li><p><code>npm install <name> [--save|--save-dev|--save-optional]</code>:</p><p>Do a <code><name>@<tag></code> install, where <code><tag></code> is the "tag" config. (See +this and other options, the argument must start with "http://" or "https://"</p><p>Example:</p><pre><code> npm install https://github.com/indexzero/forever/tarball/v0.5.6</code></pre></li><li><p><code>npm install <name> [--save|--save-dev|--save-optional]</code>:</p><p>Do a <code><name>@<tag></code> install, where <code><tag></code> is the "tag" config. (See <code><a href="../doc/config.html">config(1)</a></code>.)</p><p>In most cases, this will install the latest version of the module published on npm.</p><p>Example:</p><p> npm install sax</p><p><code>npm install</code> takes 3 exclusive, optional flags which save or update the package version in your main package.json:</p><ul><li><p><code>--save</code>: Package will appear in your <code>dependencies</code>.</p></li><li><p><code>--save-dev</code>: Package will appear in your <code>devDependencies</code>.</p></li><li><p><code>--save-optional</code>: Package will appear in your <code>optionalDependencies</code>.</p><p>Examples:</p><p> npm install sax --save @@ -52,7 +52,7 @@ If the tag does not exist in the registry data for that package, then this will fail.</p><p>Example:</p><pre><code> npm install sax@latest</code></pre></li><li><p><code>npm install <name>@<version></code>:</p><p>Install the specified version of the package. This will fail if the version has not been published to the registry.</p><p>Example:</p><pre><code> npm install sax@0.1.1</code></pre></li><li><p><code>npm install <name>@<version range></code>:</p><p>Install a version of the package matching the specified version range. This will follow the same rules for resolving dependencies described in <code><a href="../doc/json.html">json(1)</a></code>.</p><p>Note that most version ranges must be put in quotes so that your shell will -treat it as a single argument.</p><p>Example:</p><p> npm install sax@">=0.1.0 <0.2.0"</p></li><li><p><code>npm install <git remote url></code>:</p><p>Install a package by cloning a git remote url. The format of the git +treat it as a single argument.</p><p>Example:</p><p> npm install sax@">=0.1.0 <0.2.0"</p></li><li><p><code>npm install <git remote url></code>:</p><p>Install a package by cloning a git remote url. The format of the git url is:</p><p> <protocol>://[<user>@]<hostname><separator><path>[#<commit-ish>]</p><p><code><protocol></code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or <code>git+https</code>. If no <code><commit-ish></code> is specified, then <code>master</code> is used.</p><p>Examples:</p><pre><code> git+ssh://git@github.com:isaacs/npm.git#v1.0.27 @@ -62,7 +62,7 @@ used.</p><p>Examples:</p><pre><code> git+ssh://git@github.com:isaacs/npm.git#v1 <p>You may combine multiple arguments, and even multiple types of arguments. For example:</p> -<pre><code>npm install sax@">=0.1.0 <0.2.0" bench supervisor</code></pre> +<pre><code>npm install sax@">=0.1.0 <0.2.0" bench supervisor</code></pre> <p>The <code>--tag</code> argument will apply to all of the specified install targets.</p> @@ -78,7 +78,7 @@ rather than locally. See <code><a href="../doc/folders.html">folders(1)</a></co local space in some cases.</p> <p>See <code><a href="../doc/config.html">config(1)</a></code>. Many of the configuration params have some -effect on installation, since that's most of what npm does.</p> +effect on installation, since that's most of what npm does.</p> <h2 id="ALGORITHM">ALGORITHM</h2> @@ -108,18 +108,18 @@ already caused C to be installed at a higher level.</p> <p>See <a href="../doc/folders.html">folders(1)</a> for a more detailed description of the specific folder structures that npm creates.</p> -<h3 id="Limitations-of-npm-s-Install-Algorithm">Limitations of npm's Install Algorithm</h3> +<h3 id="Limitations-of-npm-s-Install-Algorithm">Limitations of npm's Install Algorithm</h3> <p>There are some very rare and pathological edge-cases where a cycle can cause npm to try to install a never-ending tree of packages. Here is the simplest case:</p> -<pre><code>A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ...</code></pre> +<pre><code>A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ...</code></pre> -<p>where <code>A</code> is some version of a package, and <code>A'</code> is a different version +<p>where <code>A</code> is some version of a package, and <code>A'</code> is a different version of the same package. Because <code>B</code> depends on a different version of <code>A</code> than the one that is already in the tree, it must install a separate -copy. The same is true of <code>A'</code>, which must install <code>B'</code>. Because <code>B'</code> +copy. The same is true of <code>A'</code>, which must install <code>B'</code>. Because <code>B'</code> depends on the original version of <code>A</code>, which has been overridden, the cycle falls into infinite regress.</p> @@ -133,7 +133,7 @@ affects a real use-case, it will be investigated.</p> <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul> </div> -<p id="footer">install — npm@1.1.46</p> +<p id="footer">install — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/json.html b/deps/npm/html/doc/json.html index 84841e08ae..cdeeaa1fcd 100644 --- a/deps/npm/html/doc/json.html +++ b/deps/npm/html/doc/json.html @@ -6,11 +6,11 @@ <body> <div id="wrapper"> -<h1><a href="../doc/json.html">json</a></h1> <p>Specifics of npm's package.json handling</p> +<h1><a href="../doc/json.html">json</a></h1> <p>Specifics of npm's package.json handling</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This document is all you need to know about what's required in your package.json +<p>This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a JavaScript object literal.</p> <p>A lot of the behavior described in this document is affected by the config @@ -20,9 +20,10 @@ settings described in <code><a href="../doc/config.html">config(1)</a></code>.</ <p>npm will default some values based on package contents.</p> -<ul><li><p><code>"scripts": {"start": "node server.js"}</code></p><p>If there is a <code>server.js</code> file in the root of your package, then npm -will default the <code>start</code> command to <code>node server.js</code>.</p></li><li><p><code>"scripts":{"preinstall": "node-waf clean || true; node-waf configure build"}</code></p><p>If there is a <code>wscript</code> file in the root of your package, npm will -default the <code>preinstall</code> command to compile using node-waf.</p></li><li><p><code>"contributors": [...]</code></p><p>If there is an <code>AUTHORS</code> file in the root of your package, npm will +<ul><li><p><code>"scripts": {"start": "node server.js"}</code></p><p>If there is a <code>server.js</code> file in the root of your package, then npm +will default the <code>start</code> command to <code>node server.js</code>.</p></li><li><p><code>"scripts":{"preinstall": "node-waf clean || true; node-waf configure build"}</code></p><p>If there is a <code>wscript</code> file in the root of your package, npm will +default the <code>preinstall</code> command to compile using node-waf.</p></li><li><p><code>"scripts":{"preinstall": "node-gyp rebuild"}</code></p><p>If there is a <code>binding.gyp</code> file in the root of your package, npm will +default the <code>preinstall</code> command to compile using node-gyp.</p></li><li><p><code>"contributors": [...]</code></p><p>If there is an <code>AUTHORS</code> file in the root of your package, npm will treat each line as a <code>Name <email> (url)</code> format, where email and url are optional. Lines which start with a <code>#</code> or are blank, will be ignored.</p></li></ul> @@ -30,25 +31,25 @@ ignored.</p></li></ul> <h2 id="name">name</h2> <p>The <em>most</em> important things in your package.json are the name and version fields. -Those are actually required, and your package won't install without +Those are actually required, and your package won't install without them. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version.</p> <p>The name is what your thing is called. Some tips:</p> -<ul><li>Don't put "js" or "node" in the name. It's assumed that it's js, since you're -writing a package.json file, and you can specify the engine using the "engines" +<ul><li>Don't put "js" or "node" in the name. It's assumed that it's js, since you're +writing a package.json file, and you can specify the engine using the "engines" field. (See below.)</li><li>The name ends up being part of a URL, an argument on the command line, and a folder name. Any name with non-url-safe characters will be rejected. -Also, it can't start with a dot or an underscore.</li><li>The name will probably be passed as an argument to require(), so it should -be something short, but also reasonably descriptive.</li><li>You may want to check the npm registry to see if there's something by that name +Also, it can't start with a dot or an underscore.</li><li>The name will probably be passed as an argument to require(), so it should +be something short, but also reasonably descriptive.</li><li>You may want to check the npm registry to see if there's something by that name already, before you get too attached to it. http://registry.npmjs.org/</li></ul> <h2 id="version">version</h2> <p>The <em>most</em> important things in your package.json are the name and version fields. -Those are actually required, and your package won't install without +Those are actually required, and your package won't install without them. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version.</p> @@ -57,89 +58,89 @@ changes to the version.</p> <a href="https://github.com/isaacs/node-semver">node-semver</a>, which is bundled with npm as a dependency. (<code>npm install semver</code> to use it yourself.)</p> -<p>Here's how npm's semver implementation deviates from what's on semver.org:</p> +<p>Here's how npm's semver implementation deviates from what's on semver.org:</p> -<ul><li>Versions can start with "v"</li><li>A numeric item separated from the main three-number version by a hyphen -will be interpreted as a "build" number, and will <em>increase</em> the version. -But, if the tag is not a number separated by a hyphen, then it's treated +<ul><li>Versions can start with "v"</li><li>A numeric item separated from the main three-number version by a hyphen +will be interpreted as a "build" number, and will <em>increase</em> the version. +But, if the tag is not a number separated by a hyphen, then it's treated as a pre-release tag, and is <em>less than</em> the version without a tag. So, <code>0.1.2-7 > 0.1.2-7-beta > 0.1.2-6 > 0.1.2 > 0.1.2beta</code></li></ul> <p>This is a little bit confusing to explain, but matches what you see in practice -when people create tags in git like "v1.2.3" and then do "git describe" to generate +when people create tags in git like "v1.2.3" and then do "git describe" to generate a patch version.</p> <h2 id="description">description</h2> -<p>Put a description in it. It's a string. This helps people discover your -package, as it's listed in <code>npm search</code>.</p> +<p>Put a description in it. It's a string. This helps people discover your +package, as it's listed in <code>npm search</code>.</p> <h2 id="keywords">keywords</h2> -<p>Put keywords in it. It's an array of strings. This helps people -discover your package as it's listed in <code>npm search</code>.</p> +<p>Put keywords in it. It's an array of strings. This helps people +discover your package as it's listed in <code>npm search</code>.</p> <h2 id="homepage">homepage</h2> <p>The url to the project homepage.</p> -<p><strong>NOTE</strong>: This is <em>not</em> the same as "url". If you put a "url" field, -then the registry will think it's a redirection to your package that has +<p><strong>NOTE</strong>: This is <em>not</em> the same as "url". If you put a "url" field, +then the registry will think it's a redirection to your package that has been published somewhere else, and spit at you.</p> -<p>Literally. Spit. I'm so not kidding.</p> +<p>Literally. Spit. I'm so not kidding.</p> <h2 id="bugs">bugs</h2> -<p>The url to your project's issue tracker and / or the email address to which +<p>The url to your project's issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package.</p> <p>It should look like this:</p> -<pre><code>{ "url" : "http://github.com/owner/project/issues" -, "email" : "project@hostname.com" +<pre><code>{ "url" : "http://github.com/owner/project/issues" +, "email" : "project@hostname.com" }</code></pre> <p>You can specify either one or both values. If you want to provide only a url, -you can specify the value for "bugs" as a simple string instead of an object.</p> +you can specify the value for "bugs" as a simple string instead of an object.</p> <p>If a url is provided, it will be used by the <code>npm bugs</code> command.</p> <h2 id="people-fields-author-contributors">people fields: author, contributors</h2> -<p>The "author" is one person. "contributors" is an array of people. A "person" -is an object with a "name" field and optionally "url" and "email", like this:</p> +<p>The "author" is one person. "contributors" is an array of people. A "person" +is an object with a "name" field and optionally "url" and "email", like this:</p> -<pre><code>{ "name" : "Barney Rubble" -, "email" : "b@rubble.com" -, "url" : "http://barnyrubble.tumblr.com/" +<pre><code>{ "name" : "Barney Rubble" +, "email" : "b@rubble.com" +, "url" : "http://barnyrubble.tumblr.com/" }</code></pre> <p>Or you can shorten that all into a single string, and npm will parse it for you:</p> -<pre><code>"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)</code></pre> +<pre><code>"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)</code></pre> <p>Both email and url are optional either way.</p> -<p>npm also sets a top-level "maintainers" field with your npm user info.</p> +<p>npm also sets a top-level "maintainers" field with your npm user info.</p> <h2 id="files">files</h2> -<p>The "files" field is an array of files to include in your project. If +<p>The "files" field is an array of files to include in your project. If you name a folder in the array, then it will also include the files inside that folder. (Unless they would be ignored by another rule.)</p> -<p>You can also provide a ".npmignore" file in the root of your package, +<p>You can also provide a ".npmignore" file in the root of your package, which will keep files from being included, even if they would be picked -up by the files array. The ".npmignore" file works just like a -".gitignore".</p> +up by the files array. The ".npmignore" file works just like a +".gitignore".</p> <h2 id="main">main</h2> <p>The main field is a module ID that is the primary entry point to your program. That is, if your package is named <code>foo</code>, and a user installs it, and then does -<code>require("foo")</code>, then your main module's exports object will be returned.</p> +<code>require("foo")</code>, then your main module's exports object will be returned.</p> <p>This should be a module ID relative to the root of your package folder.</p> @@ -148,9 +149,9 @@ much else.</p> <h2 id="bin">bin</h2> -<p>A lot of packages have one or more executable files that they'd like to +<p>A lot of packages have one or more executable files that they'd like to install into the PATH. npm makes this pretty easy (in fact, it uses this -feature to install the "npm" executable.)</p> +feature to install the "npm" executable.)</p> <p>To use this, supply a <code>bin</code> field in your package.json which is a map of command name to local file name. On install, npm will symlink that file into @@ -159,49 +160,49 @@ installs.</p> <p>For example, npm has this:</p> -<pre><code>{ "bin" : { "npm" : "./cli.js" } }</code></pre> +<pre><code>{ "bin" : { "npm" : "./cli.js" } }</code></pre> -<p>So, when you install npm, it'll create a symlink from the <code>cli.js</code> script to +<p>So, when you install npm, it'll create a symlink from the <code>cli.js</code> script to <code>/usr/local/bin/npm</code>.</p> <p>If you have a single executable, and its name should be the name of the package, then you can just supply it as a string. For example:</p> -<pre><code>{ "name": "my-program" -, "version": "1.2.5" -, "bin": "./path/to/program" }</code></pre> +<pre><code>{ "name": "my-program" +, "version": "1.2.5" +, "bin": "./path/to/program" }</code></pre> <p>would be the same as this:</p> -<pre><code>{ "name": "my-program" -, "version": "1.2.5" -, "bin" : { "my-program" : "./path/to/program" } }</code></pre> +<pre><code>{ "name": "my-program" +, "version": "1.2.5" +, "bin" : { "my-program" : "./path/to/program" } }</code></pre> <h2 id="man">man</h2> <p>Specify either a single file or an array of filenames to put in place for the <code>man</code> program to find.</p> -<p>If only a single file is provided, then it's installed such that it is the +<p>If only a single file is provided, then it's installed such that it is the result from <code>man <pkgname></code>, regardless of its actual filename. For example:</p> -<pre><code>{ "name" : "foo" -, "version" : "1.2.3" -, "description" : "A packaged foo fooer for fooing foos" -, "main" : "foo.js" -, "man" : "./man/doc.1" +<pre><code>{ "name" : "foo" +, "version" : "1.2.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo.js" +, "man" : "./man/doc.1" }</code></pre> <p>would link the <code>./man/doc.1</code> file in such that it is the target for <code>man foo</code></p> -<p>If the filename doesn't start with the package name, then it's prefixed. +<p>If the filename doesn't start with the package name, then it's prefixed. So, this:</p> -<pre><code>{ "name" : "foo" -, "version" : "1.2.3" -, "description" : "A packaged foo fooer for fooing foos" -, "main" : "foo.js" -, "man" : [ "./man/foo.1", "./man/bar.1" ] +<pre><code>{ "name" : "foo" +, "version" : "1.2.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo.js" +, "man" : [ "./man/foo.1", "./man/bar.1" ] }</code></pre> <p>will create files to do <code>man foo</code> and <code>man foo-bar</code>.</p> @@ -209,11 +210,11 @@ So, this:</p> <p>Man files must end with a number, and optionally a <code>.gz</code> suffix if they are compressed. The number dictates which man section the file is installed into.</p> -<pre><code>{ "name" : "foo" -, "version" : "1.2.3" -, "description" : "A packaged foo fooer for fooing foos" -, "main" : "foo.js" -, "man" : [ "./man/foo.1", "./man/foo.2" ] +<pre><code>{ "name" : "foo" +, "version" : "1.2.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo.js" +, "man" : [ "./man/foo.1", "./man/foo.2" ] }</code></pre> <p>will create entries for <code>man foo</code> and <code>man 2 foo</code></p> @@ -222,26 +223,26 @@ compressed. The number dictates which man section the file is installed into.</ <p>The CommonJS <a href="http://wiki.commonjs.org/wiki/Packages/1.0">Packages</a> spec details a few ways that you can indicate the structure of your package using a <code>directories</code> -hash. If you look at <a href="http://registry.npmjs.org/npm/latest">npm's package.json</a>, -you'll see that it has directories for doc, lib, and man.</p> +hash. If you look at <a href="http://registry.npmjs.org/npm/latest">npm's package.json</a>, +you'll see that it has directories for doc, lib, and man.</p> <p>In the future, this information may be used in other creative ways.</p> <h3 id="directories-lib">directories.lib</h3> <p>Tell people where the bulk of your library is. Nothing special is done -with the lib folder in any way, but it's useful meta info.</p> +with the lib folder in any way, but it's useful meta info.</p> <h3 id="directories-bin">directories.bin</h3> -<p>If you specify a "bin" directory, then all the files in that folder will -be used as the "bin" hash.</p> +<p>If you specify a "bin" directory, then all the files in that folder will +be used as the "bin" hash.</p> -<p>If you have a "bin" hash already, then this has no effect.</p> +<p>If you have a "bin" hash already, then this has no effect.</p> <h3 id="directories-man">directories.man</h3> -<p>A folder that is full of man pages. Sugar to generate a "man" array by +<p>A folder that is full of man pages. Sugar to generate a "man" array by walking the folder.</p> <h3 id="directories-doc">directories.doc</h3> @@ -261,23 +262,23 @@ command will be able to find you.</p> <p>Do it like this:</p> -<pre><code>"repository" : - { "type" : "git" - , "url" : "http://github.com/isaacs/npm.git" +<pre><code>"repository" : + { "type" : "git" + , "url" : "http://github.com/isaacs/npm.git" } -"repository" : - { "type" : "svn" - , "url" : "http://v8.googlecode.com/svn/trunk/" +"repository" : + { "type" : "svn" + , "url" : "http://v8.googlecode.com/svn/trunk/" }</code></pre> <p>The URL should be a publicly available (perhaps read-only) url that can be handed directly to a VCS program without any modification. It should not be a url to an -html project page that you put in your browser. It's for computers.</p> +html project page that you put in your browser. It's for computers.</p> <h2 id="scripts">scripts</h2> -<p>The "scripts" member is an object hash of script commands that are run +<p>The "scripts" member is an object hash of script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point.</p> @@ -285,14 +286,14 @@ event, and the value is the command to run at that point.</p> <h2 id="config">config</h2> -<p>A "config" hash can be used to set configuration +<p>A "config" hash can be used to set configuration parameters used in package scripts that persist across upgrades. For instance, if a package had the following:</p> -<pre><code>{ "name" : "foo" -, "config" : { "port" : "8080" } }</code></pre> +<pre><code>{ "name" : "foo" +, "config" : { "port" : "8080" } }</code></pre> -<p>and then had a "start" command that then referenced the +<p>and then had a "start" command that then referenced the <code>npm_package_config_port</code> environment variable, then the user could override that by doing <code>npm config set foo:port 8001</code>.</p> @@ -303,29 +304,29 @@ configs.</p> <p>Dependencies are specified with a simple hash of package name to version range. The version range is EITHER a string which has one or more -space-separated descriptors, OR a range like "fromVersion - toVersion"</p> +space-separated descriptors, OR a range like "fromVersion - toVersion"</p> <p><strong>Please do not put test harnesses in your <code>dependencies</code> hash.</strong> See <code>devDependencies</code>, below.</p> -<p>Version range descriptors may be any of the following styles, where "version" +<p>Version range descriptors may be any of the following styles, where "version" is a semver compatible version identifier.</p> -<ul><li><code>version</code> Must match <code>version</code> exactly</li><li><code>=version</code> Same as just <code>version</code></li><li><code>>version</code> Must be greater than <code>version</code></li><li><code>>=version</code> etc</li><li><code><version</code></li><li><code><=version</code></li><li><code>~version</code> See 'Tilde Version Ranges' below</li><li><code>1.2.x</code> See 'X Version Ranges' below</li><li><code>http://...</code> See 'URLs as Dependencies' below</li><li><code>*</code> Matches any version</li><li><code>""</code> (just an empty string) Same as <code>*</code></li><li><code>version1 - version2</code> Same as <code>>=version1 <=version2</code>.</li><li><code>range1 || range2</code> Passes if either range1 or range2 are satisfied.</li><li><code>git...</code> See 'Git URLs as Dependencies' below</li></ul> +<ul><li><code>version</code> Must match <code>version</code> exactly</li><li><code>=version</code> Same as just <code>version</code></li><li><code>>version</code> Must be greater than <code>version</code></li><li><code>>=version</code> etc</li><li><code><version</code></li><li><code><=version</code></li><li><code>~version</code> See 'Tilde Version Ranges' below</li><li><code>1.2.x</code> See 'X Version Ranges' below</li><li><code>http://...</code> See 'URLs as Dependencies' below</li><li><code>*</code> Matches any version</li><li><code>""</code> (just an empty string) Same as <code>*</code></li><li><code>version1 - version2</code> Same as <code>>=version1 <=version2</code>.</li><li><code>range1 || range2</code> Passes if either range1 or range2 are satisfied.</li><li><code>git...</code> See 'Git URLs as Dependencies' below</li></ul> <p>For example, these are all valid:</p> -<pre><code>{ "dependencies" : - { "foo" : "1.0.0 - 2.9999.9999" - , "bar" : ">=1.0.2 <2.1.2" - , "baz" : ">1.0.2 <=2.3.4" - , "boo" : "2.0.1" - , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0" - , "asd" : "http://asdf.com/asdf.tar.gz" - , "til" : "~1.2" - , "elf" : "~1.2.3" - , "two" : "2.x" - , "thr" : "3.3.x" +<pre><code>{ "dependencies" : + { "foo" : "1.0.0 - 2.9999.9999" + , "bar" : ">=1.0.2 <2.1.2" + , "baz" : ">1.0.2 <=2.3.4" + , "boo" : "2.0.1" + , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0" + , "asd" : "http://asdf.com/asdf.tar.gz" + , "til" : "~1.2" + , "elf" : "~1.2.3" + , "two" : "2.x" + , "thr" : "3.3.x" } }</code></pre> @@ -338,19 +339,19 @@ a version in the following fashion.</p> <p>For example, the following are equivalent:</p> -<ul><li><code>"~1.2.3" = ">=1.2.3 <1.3.0"</code></li><li><code>"~1.2" = ">=1.2.0 <2.0.0"</code></li><li><code>"~1" = ">=1.0.0 <2.0.0"</code></li></ul> +<ul><li><code>"~1.2.3" = ">=1.2.3 <1.3.0"</code></li><li><code>"~1.2" = ">=1.2.0 <2.0.0"</code></li><li><code>"~1" = ">=1.0.0 <2.0.0"</code></li></ul> <h3 id="X-Version-Ranges">X Version Ranges</h3> -<p>An "x" in a version range specifies that the version number must start +<p>An "x" in a version range specifies that the version number must start with the supplied digits, but any digit may be used in place of the x.</p> <p>The following are equivalent:</p> -<ul><li><code>"1.2.x" = ">=1.2.0 <1.3.0"</code></li><li><code>"1.x.x" = ">=1.0.0 <2.0.0"</code></li><li><code>"1.2" = "1.2.x"</code></li><li><code>"1.x" = "1.x.x"</code></li><li><code>"1" = "1.x.x"</code></li></ul> +<ul><li><code>"1.2.x" = ">=1.2.0 <1.3.0"</code></li><li><code>"1.x.x" = ">=1.0.0 <2.0.0"</code></li><li><code>"1.2" = "1.2.x"</code></li><li><code>"1.x" = "1.x.x"</code></li><li><code>"1" = "1.x.x"</code></li></ul> <p>You may not supply a comparator with a version containing an x. Any -digits after the first "x" are ignored.</p> +digits after the first "x" are ignored.</p> <h3 id="URLs-as-Dependencies">URLs as Dependencies</h3> @@ -376,10 +377,10 @@ an argument to <code>git checkout</code>. The default is <code>master</code>.</ <h2 id="devDependencies">devDependencies</h2> <p>If someone is planning on downloading and using your module in their -program, then they probably don't want or need to download and build +program, then they probably don't want or need to download and build the external test or documentation framework that you use.</p> -<p>In this case, it's best to list these additional items in a +<p>In this case, it's best to list these additional items in a <code>devDependencies</code> hash.</p> <p>These things will be installed whenever the <code>--dev</code> configuration flag @@ -391,7 +392,7 @@ for more on the topic.</p> <p>Array of package names that will be bundled when publishing the package.</p> -<p>If this is spelled <code>"bundleDependencies"</code>, then that is also honorable.</p> +<p>If this is spelled <code>"bundleDependencies"</code>, then that is also honorable.</p> <h2 id="optionalDependencies">optionalDependencies</h2> @@ -401,12 +402,12 @@ cannot be found or fails to install, then you may put it in the or url, just like the <code>dependencies</code> hash. The difference is that failure is tolerated.</p> -<p>It is still your program's responsibility to handle the lack of the +<p>It is still your program's responsibility to handle the lack of the dependency. For example, something like this:</p> <pre><code>try { - var foo = require('foo') - var fooVersion = require('foo/package.json').version + var foo = require('foo') + var fooVersion = require('foo/package.json').version } catch (er) { foo = null } @@ -421,25 +422,25 @@ if (foo) { }</code></pre> <p>Entries in <code>optionalDependencies</code> will override entries of the same name in -<code>dependencies</code>, so it's usually best to only put in one place.</p> +<code>dependencies</code>, so it's usually best to only put in one place.</p> <h2 id="engines">engines</h2> <p>You can specify the version of node that your stuff works on:</p> -<pre><code>{ "engines" : { "node" : ">=0.1.27 <0.1.30" } }</code></pre> +<pre><code>{ "engines" : { "node" : ">=0.1.27 <0.1.30" } }</code></pre> -<p>And, like with dependencies, if you don't specify the version (or if you -specify "*" as the version), then any version of node will do.</p> +<p>And, like with dependencies, if you don't specify the version (or if you +specify "*" as the version), then any version of node will do.</p> -<p>If you specify an "engines" field, then npm will require that "node" be -somewhere on that list. If "engines" is omitted, then npm will just assume +<p>If you specify an "engines" field, then npm will require that "node" be +somewhere on that list. If "engines" is omitted, then npm will just assume that it works on node.</p> -<p>You can also use the "engines" field to specify which versions of npm +<p>You can also use the "engines" field to specify which versions of npm are capable of properly installing your program. For example:</p> -<pre><code>{ "engines" : { "npm" : "~1.0.20" } }</code></pre> +<pre><code>{ "engines" : { "npm" : "~1.0.20" } }</code></pre> <p>Note that, unless the user has set the <code>engine-strict</code> config flag, this field is advisory only.</p> @@ -448,8 +449,8 @@ field is advisory only.</p> <p>If you are sure that your module will <em>definitely not</em> run properly on versions of Node/npm other than those specified in the <code>engines</code> hash, -then you can set <code>"engineStrict": true</code> in your package.json file. -This will override the user's <code>engine-strict</code> config setting.</p> +then you can set <code>"engineStrict": true</code> in your package.json file. +This will override the user's <code>engine-strict</code> config setting.</p> <p>Please do not do this unless you are really very very sure. If your engines hash is something overly restrictive, you can quite easily and @@ -462,16 +463,16 @@ people abuse it, it will be removed in a future version of npm.</p> <p>You can specify which operating systems your module will run on:</p> -<pre><code>"os" : [ "darwin", "linux" ]</code></pre> +<pre><code>"os" : [ "darwin", "linux" ]</code></pre> <p>You can also blacklist instead of whitelist operating systems, -just prepend the blacklisted os with a '!':</p> +just prepend the blacklisted os with a '!':</p> -<pre><code>"os" : [ "!win32" ]</code></pre> +<pre><code>"os" : [ "!win32" ]</code></pre> <p>The host operating system is determined by <code>process.platform</code></p> -<p>It is allowed to both blacklist, and whitelist, although there isn't any +<p>It is allowed to both blacklist, and whitelist, although there isn't any good reason to do this.</p> <h2 id="cpu">cpu</h2> @@ -479,11 +480,11 @@ good reason to do this.</p> <p>If your code only runs on certain cpu architectures, you can specify which ones.</p> -<pre><code>"cpu" : [ "x64", "ia32" ]</code></pre> +<pre><code>"cpu" : [ "x64", "ia32" ]</code></pre> <p>Like the <code>os</code> option, you can also blacklist architectures:</p> -<pre><code>"cpu" : [ "!arm", "!mips" ]</code></pre> +<pre><code>"cpu" : [ "!arm", "!mips" ]</code></pre> <p>The host architecture is determined by <code>process.arch</code></p> @@ -493,12 +494,12 @@ you can specify which ones.</p> installed globally, then set this value to <code>true</code> to provide a warning if it is installed locally.</p> -<p>It doesn't actually prevent users from installing it locally, but it -does help prevent some confusion if it doesn't work as expected.</p> +<p>It doesn't actually prevent users from installing it locally, but it +does help prevent some confusion if it doesn't work as expected.</p> <h2 id="private">private</h2> -<p>If you set <code>"private": true</code> in your package.json, then npm will refuse +<p>If you set <code>"private": true</code> in your package.json, then npm will refuse to publish it.</p> <p>This is a way to prevent accidental publication of private repositories. @@ -509,13 +510,13 @@ to override the <code>registry</code> config param at publish-time.</p> <h2 id="publishConfig">publishConfig</h2> -<p>This is a set of config values that will be used at publish-time. It's +<p>This is a set of config values that will be used at publish-time. It's especially handy if you want to set the tag or registry, so that you can -ensure that a given package is not tagged with "latest" or published to +ensure that a given package is not tagged with "latest" or published to the global public registry by default.</p> -<p>Any config values can be overridden, but of course only "tag" and -"registry" probably matter for the purposes of publishing.</p> +<p>Any config values can be overridden, but of course only "tag" and +"registry" probably matter for the purposes of publishing.</p> <p>See <code><a href="../doc/config.html">config(1)</a></code> to see the list of config options that can be overridden.</p> @@ -524,7 +525,7 @@ overridden.</p> <ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul> </div> -<p id="footer">json — npm@1.1.46</p> +<p id="footer">json — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/link.html b/deps/npm/html/doc/link.html index 5ad8a8f581..fc953920e5 100644 --- a/deps/npm/html/doc/link.html +++ b/deps/npm/html/doc/link.html @@ -24,7 +24,7 @@ symbolic link from <code>prefix/package-name</code> to the current folder.</p> symlink from the local <code>node_modules</code> folder to the global symlink.</p> <p>When creating tarballs for <code>npm publish</code>, the linked packages are -"snapshotted" to their current state by resolving the symbolic links.</p> +"snapshotted" to their current state by resolving the symbolic links.</p> <p>This is handy for installing your own stuff, so that you can work on it and test it @@ -52,13 +52,13 @@ npm link ../node-redis # link the dir of your dependency</code></pre> npm link redis</code></pre> <p>That is, it first creates a global link, and then links the global -installation target into your project's <code>node_modules</code> folder.</p> +installation target into your project's <code>node_modules</code> folder.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">link — npm@1.1.46</p> +<p id="footer">link — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/list.html b/deps/npm/html/doc/list.html index da695fa14f..b17f6fc97f 100644 --- a/deps/npm/html/doc/list.html +++ b/deps/npm/html/doc/list.html @@ -23,9 +23,9 @@ installed, as well as their dependencies, in a tree-structure.</p> <p>Positional arguments are <code>name@version-range</code> identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will <em>also</em> show the paths to the specified packages. -For example, running <code>npm ls promzard</code> in npm's source tree will show:</p> +For example, running <code>npm ls promzard</code> in npm's source tree will show:</p> -<pre><code>npm@1.1.46 /path/to/npm +<pre><code>npm@1.1.49 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5</code></pre> @@ -64,7 +64,7 @@ project.</p> <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul> </div> -<p id="footer">list — npm@1.1.46</p> +<p id="footer">list — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/npm.html b/deps/npm/html/doc/npm.html index e549fce416..83324b92cd 100644 --- a/deps/npm/html/doc/npm.html +++ b/deps/npm/html/doc/npm.html @@ -14,7 +14,7 @@ <h2 id="VERSION">VERSION</h2> -<p>1.1.46</p> +<p>1.1.49</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> @@ -32,11 +32,11 @@ programs.</p> <p>You probably got npm because you want to install stuff.</p> -<p>Use <code>npm install blerg</code> to install the latest version of "blerg". Check out +<p>Use <code>npm install blerg</code> to install the latest version of "blerg". Check out <code><a href="../doc/install.html">install(1)</a></code> for more info. It can do a lot of stuff.</p> -<p>Use the <code>npm search</code> command to show everything that's available. -Use <code>npm ls</code> to show everything you've installed.</p> +<p>Use the <code>npm search</code> command to show everything that's available. +Use <code>npm ls</code> to show everything you've installed.</p> <h2 id="DIRECTORIES">DIRECTORIES</h2> @@ -54,15 +54,15 @@ operate in global mode instead.</p> <h2 id="DEVELOPER-USAGE">DEVELOPER USAGE</h2> -<p>If you're using npm to develop and publish your code, check out the +<p>If you're using npm to develop and publish your code, check out the following help topics:</p> <ul><li>json: Make a package.json file. See <code><a href="../doc/json.html">json(1)</a></code>.</li><li>link: -For linking your current working code into Node's path, so that you -don't have to reinstall every time you make a change. Use +For linking your current working code into Node's path, so that you +don't have to reinstall every time you make a change. Use <code>npm link</code> to do this.</li><li>install: -It's a good idea to install things if you don't need the symbolic link. +It's a good idea to install things if you don't need the symbolic link. Especially, installing other peoples code from the registry is done via <code>npm install</code></li><li>adduser: Create an account or log in. Credentials are stored in the @@ -75,7 +75,7 @@ Use the <code>npm publish</code> command to upload your code to the registry.</l 5 places.</p> <ul><li>Command line switches:<br />Set a config with <code>--key val</code>. All keys take a value, even if they -are booleans (the config parser doesn't know what the options are at +are booleans (the config parser doesn't know what the options are at the time of parsing.) If no value is provided, then the option is set to boolean <code>true</code>.</li><li>Environment Variables:<br />Set any config by prefixing the name in an environment variable with <code>npm_config_</code>. For example, <code>export npm_config_key=val</code>.</li><li>User Configs:<br />The file at $HOME/.npmrc is an ini-formatted list of configs. If @@ -83,7 +83,7 @@ present, it is parsed. If the <code>userconfig</code> option is set in the cli or env, then that will be used instead.</li><li>Global Configs:<br />The file found at ../etc/npmrc (from the node executable, by default this resolves to /usr/local/etc/npmrc) will be parsed if it is found. If the <code>globalconfig</code> option is set in the cli, env, or user config, -then that file is parsed instead.</li><li>Defaults:<br />npm's default configuration options are defined in +then that file is parsed instead.</li><li>Defaults:<br />npm's default configuration options are defined in lib/utils/config-defs.js. These must not be changed.</li></ul> <p>See <code><a href="../doc/config.html">config(1)</a></code> for much much more information.</p> @@ -94,14 +94,14 @@ lib/utils/config-defs.js. These must not be changed.</li></ul> <ul><li>code: Read through <code><a href="../doc/coding-style.html">coding-style(1)</a></code> if you plan to submit code. -You don't have to agree with it, but you do have to follow it.</li><li>docs: +You don't have to agree with it, but you do have to follow it.</li><li>docs: If you find an error in the documentation, edit the appropriate markdown -file in the "doc" folder. (Don't worry about generating the man page.)</li></ul> +file in the "doc" folder. (Don't worry about generating the man page.)</li></ul> -<p>Contributors are listed in npm's <code>package.json</code> file. You can view them +<p>Contributors are listed in npm's <code>package.json</code> file. You can view them easily by doing <code>npm view npm contributors</code>.</p> -<p>If you would like to contribute, but don't know what to work on, check +<p>If you would like to contribute, but don't know what to work on, check the issues list or ask on the mailing list.</p> <ul><li><a href="http://github.com/isaacs/npm/issues">http://github.com/isaacs/npm/issues</a></li><li><a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li></ul> @@ -114,7 +114,7 @@ the issues list or ask on the mailing list.</p> <a href="http://github.com/isaacs/npm/issues">http://github.com/isaacs/npm/issues</a></li><li>email: <a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li></ul> -<p>Be sure to include <em>all</em> of the output from the npm command that didn't work +<p>Be sure to include <em>all</em> of the output from the npm command that didn't work as expected. The <code>npm-debug.log</code> file is also helpful to provide.</p> <p>You can also look for isaacs in #node.js on irc://irc.freenode.net. He @@ -135,7 +135,7 @@ will no doubt tell you to put the output in a gist or email.</p> <ul><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul> </div> -<p id="footer">npm — npm@1.1.46</p> +<p id="footer">npm — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/outdated.html b/deps/npm/html/doc/outdated.html index 61d9f9b235..607bdd070c 100644 --- a/deps/npm/html/doc/outdated.html +++ b/deps/npm/html/doc/outdated.html @@ -21,7 +21,7 @@ packages are currently outdated.</p> <ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul> </div> -<p id="footer">outdated — npm@1.1.46</p> +<p id="footer">outdated — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/owner.html b/deps/npm/html/doc/owner.html index 8ddd2de0d8..c2991bac80 100644 --- a/deps/npm/html/doc/owner.html +++ b/deps/npm/html/doc/owner.html @@ -27,14 +27,14 @@ Remove a user from the package owner list. This immediately revokes their privileges.</li></ul> <p>Note that there is only one level of access. Either you can modify a package, -or you can't. Future versions may contain more fine-grained access levels, but +or you can't. Future versions may contain more fine-grained access levels, but that is not implemented at this time.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul> </div> -<p id="footer">owner — npm@1.1.46</p> +<p id="footer">owner — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/pack.html b/deps/npm/html/doc/pack.html index 3faac62b0f..f7223cee8d 100644 --- a/deps/npm/html/doc/pack.html +++ b/deps/npm/html/doc/pack.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>For anything that's installable (that is, a package folder, tarball, +<p>For anything that's installable (that is, a package folder, tarball, tarball url, name@tag, name@version, or name), this command will fetch it to the cache, and then copy the tarball to the current working directory as <code><name>-<version>.tgz</code>, and then write the filenames out to @@ -29,7 +29,7 @@ overwritten the second time.</p> <ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">pack — npm@1.1.46</p> +<p id="footer">pack — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/prefix.html b/deps/npm/html/doc/prefix.html index 4450948aa8..4c74d1f37d 100644 --- a/deps/npm/html/doc/prefix.html +++ b/deps/npm/html/doc/prefix.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">prefix — npm@1.1.46</p> +<p id="footer">prefix — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/prune.html b/deps/npm/html/doc/prune.html index f2f264a7b3..05bd29bcbd 100644 --- a/deps/npm/html/doc/prune.html +++ b/deps/npm/html/doc/prune.html @@ -14,18 +14,18 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This command removes "extraneous" packages. If a package name is +<p>This command removes "extraneous" packages. If a package name is provided, then only packages matching one of the supplied names are removed.</p> <p>Extraneous packages are packages that are not listed on the parent -package's dependencies list.</p> +package's dependencies list.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul> </div> -<p id="footer">prune — npm@1.1.46</p> +<p id="footer">prune — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/publish.html b/deps/npm/html/doc/publish.html index c70900206f..d028b84793 100644 --- a/deps/npm/html/doc/publish.html +++ b/deps/npm/html/doc/publish.html @@ -23,13 +23,13 @@ A url or file path to a gzipped tar archive containing a single folder with a package.json file inside.</p></li></ul> <p>Fails if the package name and version combination already exists in -the registry. Overwrites when the "--force" flag is set.</p> +the registry. Overwrites when the "--force" flag is set.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul> </div> -<p id="footer">publish — npm@1.1.46</p> +<p id="footer">publish — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/rebuild.html b/deps/npm/html/doc/rebuild.html index 35c876eebc..ca1ad33ba3 100644 --- a/deps/npm/html/doc/rebuild.html +++ b/deps/npm/html/doc/rebuild.html @@ -25,7 +25,7 @@ the new binary.</p> <ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul> </div> -<p id="footer">rebuild — npm@1.1.46</p> +<p id="footer">rebuild — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/registry.html b/deps/npm/html/doc/registry.html index 35a97e45f6..5ef97da141 100644 --- a/deps/npm/html/doc/registry.html +++ b/deps/npm/html/doc/registry.html @@ -14,7 +14,7 @@ that implements the CommonJS Package Registry specification for reading package info.</p> -<p>Additionally, npm's package registry implementation supports several +<p>Additionally, npm's package registry implementation supports several write APIs as well, to allow for publishing packages and managing user account information.</p> @@ -26,7 +26,7 @@ are CouchDB users, stored in the <a href="http://isaacs.iriscouch.com/_users">ht database.</p> <p>The registry URL is supplied by the <code>registry</code> config parameter. See -<code><a href="../doc/config.html">config(1)</a></code> for more on managing npm's configuration.</p> +<code><a href="../doc/config.html">config(1)</a></code> for more on managing npm's configuration.</p> <h2 id="Can-I-run-my-own-private-registry">Can I run my own private registry?</h2> @@ -36,17 +36,17 @@ database.</p> similar) design doc to implement the APIs.</p> <p>If you set up continuous replication from the official CouchDB, and then -set your internal CouchDB as the registry config, then you'll be able +set your internal CouchDB as the registry config, then you'll be able to read any published packages, in addition to your private ones, and by default will only publish internally. If you then want to publish a package for the whole world to see, you can simply override the <code>--registry</code> config for that command.</p> -<h2 id="I-don-t-want-my-package-published-in-the-official-registry-It-s-private">I don't want my package published in the official registry. It's private.</h2> +<h2 id="I-don-t-want-my-package-published-in-the-official-registry-It-s-private">I don't want my package published in the official registry. It's private.</h2> -<p>Set <code>"private": true</code> in your package.json to prevent it from being +<p>Set <code>"private": true</code> in your package.json to prevent it from being published at all, or -<code>"publishConfig":{"registry":"http://my-internal-registry.local"}</code> +<code>"publishConfig":{"registry":"http://my-internal-registry.local"}</code> to force it to be published only to your internal registry.</p> <p>See <code><a href="../doc/json.html">json(1)</a></code> for more info on what goes in the package.json file.</p> @@ -59,11 +59,11 @@ otherwise.</p> <h2 id="Do-I-have-to-use-couchdb-to-build-a-registry-that-npm-can-talk-to">Do I have to use couchdb to build a registry that npm can talk to?</h2> -<p>No, but it's way easier.</p> +<p>No, but it's way easier.</p> <h2 id="I-published-something-elsewhere-and-want-to-tell-the-npm-registry-about-it">I published something elsewhere, and want to tell the npm registry about it.</h2> -<p>That is supported, but not using the npm client. You'll have to get +<p>That is supported, but not using the npm client. You'll have to get your hands dirty and do some HTTP. The request looks something like this:</p> @@ -72,19 +72,19 @@ content-type:application/json accept:application/json authorization:Basic $base_64_encoded -{ "name":"my-foreign-package" -, "maintainers":["owner","usernames"] -, "description":"A package that is hosted elsewhere" -, "keywords":["nih","my cheese smells the best"] -, "url":"http://my-different-registry.com/blerg/my-local-package" +{ "name":"my-foreign-package" +, "maintainers":["owner","usernames"] +, "description":"A package that is hosted elsewhere" +, "keywords":["nih","my cheese smells the best"] +, "url":"http://my-different-registry.com/blerg/my-local-package" }</code></pre> <p>(Keywords and description are optional, but recommended. Name, maintainers, and url are required.)</p> -<p>Then, when a user tries to install "my-foreign-package", it'll redirect -to your registry. If that doesn't resolve to a valid package entry, -then it'll fail, so please make sure that you understand the spec, and +<p>Then, when a user tries to install "my-foreign-package", it'll redirect +to your registry. If that doesn't resolve to a valid package entry, +then it'll fail, so please make sure that you understand the spec, and ask for help on the <a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a> mailing list.</p> <h2 id="Is-there-a-website-or-something-to-see-package-docs-and-such">Is there a website or something to see package docs and such?</h2> @@ -97,7 +97,7 @@ ask for help on the <a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul> </div> -<p id="footer">registry — npm@1.1.46</p> +<p id="footer">registry — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/removing-npm.html b/deps/npm/html/doc/removing-npm.html index 9db71922ce..024122a2c5 100644 --- a/deps/npm/html/doc/removing-npm.html +++ b/deps/npm/html/doc/removing-npm.html @@ -21,14 +21,14 @@ <h2 id="More-Severe-Uninstalling">More Severe Uninstalling</h2> <p>Usually, the above instructions are sufficient. That will remove -npm, but leave behind anything you've installed.</p> +npm, but leave behind anything you've installed.</p> -<p>If that doesn't work, or if you require more drastic measures, +<p>If that doesn't work, or if you require more drastic measures, continue reading.</p> <p>Note that this is only necessary for globally-installed packages. Local -installs are completely contained within a project's <code>node_modules</code> -folder. Delete that folder, and everything is gone (unless a package's +installs are completely contained within a project's <code>node_modules</code> +folder. Delete that folder, and everything is gone (unless a package's install script is particularly ill-behaved).</p> <p>This assumes that you installed node and npm in the default place. If @@ -58,7 +58,7 @@ modules. To track those down, you can do the following:</p> <ul><li><a href="../doc/README.html">README</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul> </div> -<p id="footer">removing-npm — npm@1.1.46</p> +<p id="footer">removing-npm — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/restart.html b/deps/npm/html/doc/restart.html index a448f03776..251780cb63 100644 --- a/deps/npm/html/doc/restart.html +++ b/deps/npm/html/doc/restart.html @@ -14,17 +14,17 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs a package's "restart" script, if one was provided. -Otherwise it runs package's "stop" script, if one was provided, and then -the "start" script.</p> +<p>This runs a package's "restart" script, if one was provided. +Otherwise it runs package's "stop" script, if one was provided, and then +the "start" script.</p> -<p>If no version is specified, then it restarts the "active" version.</p> +<p>If no version is specified, then it restarts the "active" version.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul> </div> -<p id="footer">restart — npm@1.1.46</p> +<p id="footer">restart — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/root.html b/deps/npm/html/doc/root.html index 2a081ebda9..fc8ecad30b 100644 --- a/deps/npm/html/doc/root.html +++ b/deps/npm/html/doc/root.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">root — npm@1.1.46</p> +<p id="footer">root — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/run-script.html b/deps/npm/html/doc/run-script.html index 9e161aba95..d28e1b2db5 100644 --- a/deps/npm/html/doc/run-script.html +++ b/deps/npm/html/doc/run-script.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs an arbitrary command from a package's "scripts" object.</p> +<p>This runs an arbitrary command from a package's "scripts" object.</p> <p>It is used by the test, start, restart, and stop commands, but can be called directly, as well.</p> @@ -23,7 +23,7 @@ called directly, as well.</p> <ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul> </div> -<p id="footer">run-script — npm@1.1.46</p> +<p id="footer">run-script — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/scripts.html b/deps/npm/html/doc/scripts.html index e4dad8db95..e71d621cc5 100644 --- a/deps/npm/html/doc/scripts.html +++ b/deps/npm/html/doc/scripts.html @@ -6,11 +6,11 @@ <body> <div id="wrapper"> -<h1><a href="../doc/scripts.html">scripts</a></h1> <p>How npm handles the "scripts" field</p> +<h1><a href="../doc/scripts.html">scripts</a></h1> <p>How npm handles the "scripts" field</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>npm supports the "scripts" member of the package.json script, for the +<p>npm supports the "scripts" member of the package.json script, for the following scripts:</p> <ul><li>preinstall: @@ -35,8 +35,8 @@ stop and start scripts if no <code>restart</code> script is provided.</li></ul> <p>npm will default some script values based on package contents.</p> -<ul><li><p><code>"start": "node server.js"</code>:</p><p>If there is a <code>server.js</code> file in the root of your package, then npm -will default the <code>start</code> command to <code>node server.js</code>.</p></li><li><p><code>"preinstall": "node-waf clean || true; node-waf configure build"</code>:</p><p>If there is a <code>wscript</code> file in the root of your package, npm will +<ul><li><p><code>"start": "node server.js"</code>:</p><p>If there is a <code>server.js</code> file in the root of your package, then npm +will default the <code>start</code> command to <code>node server.js</code>.</p></li><li><p><code>"preinstall": "node-waf clean || true; node-waf configure build"</code>:</p><p>If there is a <code>wscript</code> file in the root of your package, npm will default the <code>preinstall</code> command to compile using node-waf.</p></li></ul> <h2 id="USER">USER</h2> @@ -58,9 +58,9 @@ process.</p> then those executables will be added to the <code>PATH</code> for executing the scripts. So, if your package.json has this:</p> -<pre><code>{ "name" : "foo" -, "dependencies" : { "bar" : "0.1.x" } -, "scripts": { "start" : "bar ./test" } }</code></pre> +<pre><code>{ "name" : "foo" +, "dependencies" : { "bar" : "0.1.x" } +, "scripts": { "start" : "bar ./test" } }</code></pre> <p>then you could run <code>npm start</code> to execute the <code>bar</code> script, which is exported into the <code>node_modules/.bin</code> directory on <code>npm install</code>.</p> @@ -68,9 +68,9 @@ into the <code>node_modules/.bin</code> directory on <code>npm install</code>.</ <h3 id="package-json-vars">package.json vars</h3> <p>The package.json fields are tacked onto the <code>npm_package_</code> prefix. So, for -instance, if you had <code>{"name":"foo", "version":"1.2.5"}</code> in your package.json +instance, if you had <code>{"name":"foo", "version":"1.2.5"}</code> in your package.json file, then your package scripts would have the <code>npm_package_name</code> environment -variable set to "foo", and the <code>npm_package_version</code> set to "1.2.5"</p> +variable set to "foo", and the <code>npm_package_version</code> set to "1.2.5"</p> <h3 id="configuration">configuration</h3> @@ -78,15 +78,15 @@ variable set to "foo", and the <code>npm_package_version</code> set to "1.2.5"</ prefix. For instance, you can view the effective <code>root</code> config by checking the <code>npm_config_root</code> environment variable.</p> -<h3 id="Special-package-json-config-hash">Special: package.json "config" hash</h3> +<h3 id="Special-package-json-config-hash">Special: package.json "config" hash</h3> -<p>The package.json "config" keys are overwritten in the environment if +<p>The package.json "config" keys are overwritten in the environment if there is a config param of <code><name>[@<version>]:<key></code>. For example, if the package.json has this:</p> -<pre><code>{ "name" : "foo" -, "config" : { "port" : "8080" } -, "scripts" : { "start" : "node server.js" } }</code></pre> +<pre><code>{ "name" : "foo" +, "config" : { "port" : "8080" } +, "scripts" : { "start" : "node server.js" } }</code></pre> <p>and the server.js is this:</p> @@ -100,23 +100,23 @@ the package.json has this:</p> <p>Lastly, the <code>npm_lifecycle_event</code> environment variable is set to whichever stage of the cycle is being executed. So, you could have a single script used -for different parts of the process which switches based on what's currently +for different parts of the process which switches based on what's currently happening.</p> <p>Objects are flattened following this format, so if you had -<code>{"scripts":{"install":"foo.js"}}</code> in your package.json, then you'd see this +<code>{"scripts":{"install":"foo.js"}}</code> in your package.json, then you'd see this in the script:</p> -<pre><code>process.env.npm_package_scripts_install === "foo.js"</code></pre> +<pre><code>process.env.npm_package_scripts_install === "foo.js"</code></pre> <h2 id="EXAMPLES">EXAMPLES</h2> <p>For example, if your package.json contains this:</p> -<pre><code>{ "scripts" : - { "install" : "scripts/install.js" - , "postinstall" : "scripts/install.js" - , "uninstall" : "scripts/uninstall.js" +<pre><code>{ "scripts" : + { "install" : "scripts/install.js" + , "postinstall" : "scripts/install.js" + , "uninstall" : "scripts/uninstall.js" } }</code></pre> @@ -128,10 +128,10 @@ for three different phases, it would be wise in this case to look at the <p>If you want to run a make command, you can do so. This works just fine:</p> -<pre><code>{ "scripts" : - { "preinstall" : "./configure" - , "install" : "make && make install" - , "test" : "make test" +<pre><code>{ "scripts" : + { "preinstall" : "./configure" + , "install" : "make && make install" + , "test" : "make test" } }</code></pre> @@ -142,7 +142,7 @@ for three different phases, it would be wise in this case to look at the <p>If the script exits with a code other than 0, then this will abort the process.</p> -<p>Note that these script files don't have to be nodejs or even javascript +<p>Note that these script files don't have to be nodejs or even javascript programs. They just have to be some kind of executable file.</p> <h2 id="HOOK-SCRIPTS">HOOK SCRIPTS</h2> @@ -150,7 +150,7 @@ programs. They just have to be some kind of executable file.</p> <p>If you want to run a specific script at a specific lifecycle event for ALL packages, then you can use a hook script.</p> -<p>Place an executable file at <code>node_modules/.hooks/{eventname}</code>, and it'll get +<p>Place an executable file at <code>node_modules/.hooks/{eventname}</code>, and it'll get run for all packages when they are going through that point in the package lifecycle for any packages installed in that root.</p> @@ -159,25 +159,25 @@ they are in a separate child process, with the env described above.</p> <h2 id="BEST-PRACTICES">BEST PRACTICES</h2> -<ul><li>Don't exit with a non-zero error code unless you <em>really</em> mean it. +<ul><li>Don't exit with a non-zero error code unless you <em>really</em> mean it. Except for uninstall scripts, this will cause the npm action to fail, and potentially be rolled back. If the failure is minor or -only will prevent some optional features, then it's better to just +only will prevent some optional features, then it's better to just print a warning and exit successfully.</li><li>Try not to use scripts to do what npm can do for you. Read through <code><a href="../doc/json.html">json(1)</a></code> to see all the things that you can specify and enable by simply describing your package appropriately. In general, this will lead to a more robust and consistent state.</li><li>Inspect the env to determine where to put things. For instance, if -the <code>npm_config_binroot</code> environ is set to <code>/home/user/bin</code>, then don't +the <code>npm_config_binroot</code> environ is set to <code>/home/user/bin</code>, then don't try to install executables into <code>/usr/local/bin</code>. The user probably -set it up that way for a reason.</li><li>Don't prefix your script commands with "sudo". If root permissions are -required for some reason, then it'll fail with that error, and the user +set it up that way for a reason.</li><li>Don't prefix your script commands with "sudo". If root permissions are +required for some reason, then it'll fail with that error, and the user will sudo the npm command in question.</li></ul> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul> </div> -<p id="footer">scripts — npm@1.1.46</p> +<p id="footer">scripts — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/search.html b/deps/npm/html/doc/search.html index 082467da8c..e002a40f2d 100644 --- a/deps/npm/html/doc/search.html +++ b/deps/npm/html/doc/search.html @@ -16,7 +16,7 @@ <p>Search the registry for packages matching the search terms.</p> -<p>If a term starts with <code>/</code>, then it's interpreted as a regular expression. +<p>If a term starts with <code>/</code>, then it's interpreted as a regular expression. A trailing <code>/</code> will be ignored in this case. (Note that many regular expression characters must be escaped or quoted in most shells.)</p> @@ -24,7 +24,7 @@ expression characters must be escaped or quoted in most shells.)</p> <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul> </div> -<p id="footer">search — npm@1.1.46</p> +<p id="footer">search — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/semver.html b/deps/npm/html/doc/semver.html index cd9ee97930..46bce35f05 100644 --- a/deps/npm/html/doc/semver.html +++ b/deps/npm/html/doc/semver.html @@ -18,12 +18,12 @@ <pre><code>$ npm install semver -semver.valid('1.2.3') // true -semver.valid('a.b.c') // false -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true</code></pre> +semver.valid('1.2.3') // true +semver.valid('a.b.c') // false +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true</code></pre> <p>As a command-line utility:</p> @@ -52,7 +52,7 @@ multiple versions to the utility will just sort them.</code></pre> <ul><li>a number (Major)</li><li>a period</li><li>a number (minor)</li><li>a period</li><li>a number (patch)</li><li>OPTIONAL: a hyphen, followed by a number (build)</li><li>OPTIONAL: a collection of pretty much any non-whitespace characters (tag)</li></ul> -<p>A leading <code>"="</code> or <code>"v"</code> character is stripped off and ignored.</p> +<p>A leading <code>"="</code> or <code>"v"</code> character is stripped off and ignored.</p> <h2 id="Comparisons">Comparisons</h2> @@ -67,7 +67,7 @@ build number. <code>2.3.4-0 > 2.3.4</code></li><li>If they both have build n different, then take the one with the bigger build number. <code>2.3.4-10 > 2.3.4-9</code></li><li>If only one of them has a tag, then take the one without the tag. <code>2.3.4 > 2.3.4-beta</code></li><li>If they both have tags, then take the one with the lexicographically -larger tag. <code>2.3.4-beta > 2.3.4-alpha</code></li><li>At this point, they're equal.</li></ul> +larger tag. <code>2.3.4-beta > 2.3.4-alpha</code></li><li>At this point, they're equal.</li></ul> <h2 id="Ranges">Ranges</h2> @@ -75,20 +75,20 @@ larger tag. <code>2.3.4-beta > 2.3.4-alpha</code></li><li>At this point, the <ul><li><code>>1.2.3</code> Greater than a specific version.</li><li><code><1.2.3</code> Less than</li><li><code>1.2.3 - 2.3.4</code> := <code>>=1.2.3 <=2.3.4</code></li><li><code>~1.2.3</code> := <code>>=1.2.3 <1.3.0</code></li><li><code>~1.2</code> := <code>>=1.2.0 <2.0.0</code></li><li><code>~1</code> := <code>>=1.0.0 <2.0.0</code></li><li><code>1.2.x</code> := <code>>=1.2.0 <1.3.0</code></li><li><code>1.x</code> := <code>>=1.0.0 <2.0.0</code></li></ul> -<p>Ranges can be joined with either a space (which implies "and") or a -<code>||</code> (which implies "or").</p> +<p>Ranges can be joined with either a space (which implies "and") or a +<code>||</code> (which implies "or").</p> <h2 id="Functions">Functions</h2> -<ul><li>valid(v): Return the parsed version, or null if it's not valid.</li><li>inc(v, release): Return the version incremented by the release type -(major, minor, patch, or build), or null if it's not valid.</li></ul> +<ul><li>valid(v): Return the parsed version, or null if it's not valid.</li><li>inc(v, release): Return the version incremented by the release type +(major, minor, patch, or build), or null if it's not valid.</li></ul> <h3 id="Comparison">Comparison</h3> -<ul><li>gt(v1, v2): <code>v1 > v2</code></li><li>gte(v1, v2): <code>v1 >= v2</code></li><li>lt(v1, v2): <code>v1 < v2</code></li><li>lte(v1, v2): <code>v1 <= v2</code></li><li>eq(v1, v2): <code>v1 == v2</code> This is true if they're logically equivalent, -even if they're not the exact same string. You already know how to -compare strings.</li><li>neq(v1, v2): <code>v1 != v2</code> The opposite of eq.</li><li>cmp(v1, comparator, v2): Pass in a comparison string, and it'll call -the corresponding function above. <code>"==="</code> and <code>"!=="</code> do simple +<ul><li>gt(v1, v2): <code>v1 > v2</code></li><li>gte(v1, v2): <code>v1 >= v2</code></li><li>lt(v1, v2): <code>v1 < v2</code></li><li>lte(v1, v2): <code>v1 <= v2</code></li><li>eq(v1, v2): <code>v1 == v2</code> This is true if they're logically equivalent, +even if they're not the exact same string. You already know how to +compare strings.</li><li>neq(v1, v2): <code>v1 != v2</code> The opposite of eq.</li><li>cmp(v1, comparator, v2): Pass in a comparison string, and it'll call +the corresponding function above. <code>"==="</code> and <code>"!=="</code> do simple string comparison, but are included for completeness. Throws if an invalid comparison string is provided.</li><li>compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort().</li><li>rcompare(v1, v2): The reverse of compare. Sorts an array of versions @@ -96,7 +96,7 @@ in descending order when passed to Array.sort().</li></ul> <h3 id="Ranges">Ranges</h3> -<ul><li>validRange(range): Return the valid range or null if it's not valid</li><li>satisfies(version, range): Return true if the version satisfies the +<ul><li>validRange(range): Return the valid range or null if it's not valid</li><li>satisfies(version, range): Return true if the version satisfies the range.</li><li>maxSatisfying(versions, range): Return the highest version in the list that satisfies the range, or null if none of them do.</li></ul> @@ -104,7 +104,7 @@ that satisfies the range, or null if none of them do.</li></ul> <ul><li><a href="../doc/json.html">json(1)</a></li></ul> </div> -<p id="footer">semver — npm@1.1.46</p> +<p id="footer">semver — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/shrinkwrap.html b/deps/npm/html/doc/shrinkwrap.html index b871db287f..de942cc051 100644 --- a/deps/npm/html/doc/shrinkwrap.html +++ b/deps/npm/html/doc/shrinkwrap.html @@ -14,140 +14,140 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This command locks down the versions of a package's dependencies so that you can +<p>This command locks down the versions of a package's dependencies so that you can control exactly which versions of each dependency will be used when your package is installed.</p> -<p>By default, "npm install" recursively installs the target's dependencies (as +<p>By default, "npm install" recursively installs the target's dependencies (as specified in package.json), choosing the latest available version that satisfies -the dependency's semver pattern. In some situations, particularly when shipping -software where each change is tightly managed, it's desirable to fully specify +the dependency's semver pattern. In some situations, particularly when shipping +software where each change is tightly managed, it's desirable to fully specify each version of each dependency recursively so that subsequent builds and deploys do not inadvertently pick up newer versions of a dependency that satisfy -the semver pattern. Specifying specific semver patterns in each dependency's -package.json would facilitate this, but that's not always possible or desirable, -as when another author owns the npm package. It's also possible to check +the semver pattern. Specifying specific semver patterns in each dependency's +package.json would facilitate this, but that's not always possible or desirable, +as when another author owns the npm package. It's also possible to check dependencies directly into source control, but that may be undesirable for other reasons.</p> <p>As an example, consider package A:</p> <pre><code>{ - "name": "A", - "version": "0.1.0", - "dependencies": { - "B": "<0.1.0" + "name": "A", + "version": "0.1.0", + "dependencies": { + "B": "<0.1.0" } }</code></pre> <p>package B:</p> <pre><code>{ - "name": "B", - "version": "0.0.1", - "dependencies": { - "C": "<0.1.0" + "name": "B", + "version": "0.0.1", + "dependencies": { + "C": "<0.1.0" } }</code></pre> <p>and package C:</p> <pre><code>{ - "name": "C, - "version": "0.0.1" + "name": "C, + "version": "0.0.1" }</code></pre> <p>If these are the only versions of A, B, and C available in the registry, then -a normal "npm install A" will install:</p> +a normal "npm install A" will install:</p> <pre><code>A@0.1.0 `-- B@0.0.1 `-- C@0.0.1</code></pre> -<p>However, if B@0.0.2 is published, then a fresh "npm install A" will install:</p> +<p>However, if B@0.0.2 is published, then a fresh "npm install A" will install:</p> <pre><code>A@0.1.0 `-- B@0.0.2 `-- C@0.0.1</code></pre> -<p>assuming the new version did not modify B's dependencies. Of course, the new +<p>assuming the new version did not modify B's dependencies. Of course, the new version of B could include a new version of C and any number of new dependencies. If such changes are undesirable, the author of A could specify a -dependency on B@0.0.1. However, if A's author and B's author are not the same -person, there's no way for A's author to say that he or she does not want to -pull in newly published versions of C when B hasn't changed at all.</p> +dependency on B@0.0.1. However, if A's author and B's author are not the same +person, there's no way for A's author to say that he or she does not want to +pull in newly published versions of C when B hasn't changed at all.</p> -<p>In this case, A's author can run</p> +<p>In this case, A's author can run</p> <pre><code>npm shrinkwrap</code></pre> <p>This generates npm-shrinkwrap.json, which will look something like this:</p> <pre><code>{ - "name": "A", - "version": "0.1.0", - "dependencies": { - "B": { - "version": "0.0.1", - "dependencies": { - "C": { - "version": "0.1.0" + "name": "A", + "version": "0.1.0", + "dependencies": { + "B": { + "version": "0.0.1", + "dependencies": { + "C": { + "version": "0.1.0" } } } } }</code></pre> -<p>The shrinkwrap command has locked down the dependencies based on what's -currently installed in node_modules. When "npm install" installs a package with +<p>The shrinkwrap command has locked down the dependencies based on what's +currently installed in node_modules. When "npm install" installs a package with a npm-shrinkwrap.json file in the package root, the shrinkwrap file (rather than package.json files) completely drives the installation of that package and all of its dependencies (recursively). So now the author publishes A@0.1.0, and subsequent installs of this package will use B@0.0.1 and C@0.1.0, regardless the -dependencies and versions listed in A's, B's, and C's package.json files.</p> +dependencies and versions listed in A's, B's, and C's package.json files.</p> <h3 id="Using-shrinkwrapped-packages">Using shrinkwrapped packages</h3> <p>Using a shrinkwrapped package is no different than using any other package: you -can "npm install" it by hand, or add a dependency to your package.json file and -"npm install" it.</p> +can "npm install" it by hand, or add a dependency to your package.json file and +"npm install" it.</p> <h3 id="Building-shrinkwrapped-packages">Building shrinkwrapped packages</h3> <p>To shrinkwrap an existing package:</p> -<ol><li>Run "npm install" in the package root to install the current versions of all -dependencies.</li><li>Validate that the package works as expected with these versions.</li><li>Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish your +<ol><li>Run "npm install" in the package root to install the current versions of all +dependencies.</li><li>Validate that the package works as expected with these versions.</li><li>Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish your package.</li></ol> <p>To add or update a dependency in a shrinkwrapped package:</p> -<ol><li>Run "npm install" in the package root to install the current versions of all -dependencies.</li><li>Add or update dependencies. "npm install" each new or updated package +<ol><li>Run "npm install" in the package root to install the current versions of all +dependencies.</li><li>Add or update dependencies. "npm install" each new or updated package individually and then update package.json. Note that they must be explicitly named in order to be installed: running <code>npm install</code> with -no arguments will merely reproduce the existing shrinkwrap.</li><li>Validate that the package works as expected with the new dependencies.</li><li>Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and publish your +no arguments will merely reproduce the existing shrinkwrap.</li><li>Validate that the package works as expected with the new dependencies.</li><li>Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and publish your package.</li></ol> <p>You can use <a href="../doc/outdated.html">outdated(1)</a> to view dependencies with newer versions available.</p> <h3 id="Other-Notes">Other Notes</h3> -<p>Since "npm shrinkwrap" uses the locally installed packages to construct the -shrinkwrap file, devDependencies will be included if and only if you've +<p>Since "npm shrinkwrap" uses the locally installed packages to construct the +shrinkwrap file, devDependencies will be included if and only if you've installed them already when you make the shrinkwrap.</p> -<p>A shrinkwrap file must be consistent with the package's package.json file. "npm -shrinkwrap" will fail if required dependencies are not already installed, since -that would result in a shrinkwrap that wouldn't actually work. Similarly, the +<p>A shrinkwrap file must be consistent with the package's package.json file. "npm +shrinkwrap" will fail if required dependencies are not already installed, since +that would result in a shrinkwrap that wouldn't actually work. Similarly, the command will fail if there are extraneous packages (not referenced by package.json), since that would indicate that package.json is not correct.</p> -<p>If shrinkwrapped package A depends on shrinkwrapped package B, B's shrinkwrap -will not be used as part of the installation of A. However, because A's +<p>If shrinkwrapped package A depends on shrinkwrapped package B, B's shrinkwrap +will not be used as part of the installation of A. However, because A's shrinkwrap is constructed from a valid installation of B and recursively -specifies all dependencies, the contents of B's shrinkwrap will implicitly be -included in A's shrinkwrap.</p> +specifies all dependencies, the contents of B's shrinkwrap will implicitly be +included in A's shrinkwrap.</p> <h3 id="Caveats">Caveats</h3> @@ -155,7 +155,7 @@ included in A's shrinkwrap.</p> While discouraged, a package author can republish an existing version of a package, causing shrinkwrapped packages using that version to pick up different code than they were before. If you want to avoid any risk that a byzantine -author replaces a package you're using with code that breaks your application, +author replaces a package you're using with code that breaks your application, you could modify the shrinkwrap file to use git URL references rather than version numbers so that npm always fetches all packages from git.</p> @@ -169,7 +169,7 @@ versions.</p> <ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul> </div> -<p id="footer">shrinkwrap — npm@1.1.46</p> +<p id="footer">shrinkwrap — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/star.html b/deps/npm/html/doc/star.html index fb688796ff..b06ce6afa2 100644 --- a/deps/npm/html/doc/star.html +++ b/deps/npm/html/doc/star.html @@ -15,18 +15,18 @@ npm unstar <pkgname> [<pkg>, ...]</code></pre> <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>"Starring" a package means that you have some interest in it. It's +<p>"Starring" a package means that you have some interest in it. It's a vaguely positive way to show that you care.</p> -<p>"Unstarring" is the same thing, but in reverse.</p> +<p>"Unstarring" is the same thing, but in reverse.</p> -<p>It's a boolean thing. Starring repeatedly has no additional effect.</p> +<p>It's a boolean thing. Starring repeatedly has no additional effect.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul> </div> -<p id="footer">star — npm@1.1.46</p> +<p id="footer">star — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/start.html b/deps/npm/html/doc/start.html index 7f7972b91d..792c5ef258 100644 --- a/deps/npm/html/doc/start.html +++ b/deps/npm/html/doc/start.html @@ -14,13 +14,13 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs a package's "start" script, if one was provided.</p> +<p>This runs a package's "start" script, if one was provided.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul> </div> -<p id="footer">start — npm@1.1.46</p> +<p id="footer">start — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/stop.html b/deps/npm/html/doc/stop.html index 40c160b870..a73dc1c7f5 100644 --- a/deps/npm/html/doc/stop.html +++ b/deps/npm/html/doc/stop.html @@ -14,13 +14,13 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs a package's "stop" script, if one was provided.</p> +<p>This runs a package's "stop" script, if one was provided.</p> <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul> </div> -<p id="footer">stop — npm@1.1.46</p> +<p id="footer">stop — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/submodule.html b/deps/npm/html/doc/submodule.html index 835abcb3f3..45660e8ba6 100644 --- a/deps/npm/html/doc/submodule.html +++ b/deps/npm/html/doc/submodule.html @@ -18,7 +18,7 @@ description, then this command will add it as a git submodule at <code>node_modules/<pkg name></code>.</p> -<p>This is a convenience only. From then on, it's up to you to manage +<p>This is a convenience only. From then on, it's up to you to manage updates by using the appropriate git commands. npm will stubbornly refuse to update, modify, or remove anything with a <code>.git</code> subfolder in it.</p> @@ -33,7 +33,7 @@ dependencies into the submodule folder.</p> <ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul> </div> -<p id="footer">submodule — npm@1.1.46</p> +<p id="footer">submodule — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/tag.html b/deps/npm/html/doc/tag.html index 082f47b04d..b42386d01b 100644 --- a/deps/npm/html/doc/tag.html +++ b/deps/npm/html/doc/tag.html @@ -21,7 +21,7 @@ <ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">tag — npm@1.1.46</p> +<p id="footer">tag — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/test.html b/deps/npm/html/doc/test.html index 4763de4b02..93a49d0d3d 100644 --- a/deps/npm/html/doc/test.html +++ b/deps/npm/html/doc/test.html @@ -14,7 +14,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2> -<p>This runs a package's "test" script, if one was provided.</p> +<p>This runs a package's "test" script, if one was provided.</p> <p>To run tests as a condition of installation, set the <code>npat</code> config to true.</p> @@ -23,7 +23,7 @@ true.</p> <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul> </div> -<p id="footer">test — npm@1.1.46</p> +<p id="footer">test — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/uninstall.html b/deps/npm/html/doc/uninstall.html index a830adadde..6b3c715f06 100644 --- a/deps/npm/html/doc/uninstall.html +++ b/deps/npm/html/doc/uninstall.html @@ -22,7 +22,7 @@ on its behalf.</p> <ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">uninstall — npm@1.1.46</p> +<p id="footer">uninstall — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/unpublish.html b/deps/npm/html/doc/unpublish.html index d340bb9442..e1a6560a05 100644 --- a/deps/npm/html/doc/unpublish.html +++ b/deps/npm/html/doc/unpublish.html @@ -34,7 +34,7 @@ the root package entry is removed from the registry entirely.</p> <ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul> </div> -<p id="footer">unpublish — npm@1.1.46</p> +<p id="footer">unpublish — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/update.html b/deps/npm/html/doc/update.html index 1287d3df17..64a0a820cf 100644 --- a/deps/npm/html/doc/update.html +++ b/deps/npm/html/doc/update.html @@ -23,7 +23,7 @@ <ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul> </div> -<p id="footer">update — npm@1.1.46</p> +<p id="footer">update — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/version.html b/deps/npm/html/doc/version.html index 6ec92771dc..b9a0acd3bc 100644 --- a/deps/npm/html/doc/version.html +++ b/deps/npm/html/doc/version.html @@ -18,8 +18,8 @@ data back to the package.json file.</p> <p>The <code>newversion</code> argument should be a valid semver string, <em>or</em> a valid -second argument to semver.inc (one of "build", "patch", "minor", or -"major"). In the second case, the existing version will be incremented +second argument to semver.inc (one of "build", "patch", "minor", or +"major"). In the second case, the existing version will be incremented by 1 in the specified field.</p> <p>If run in a git repo, it will also create a version commit and tag, and @@ -30,7 +30,7 @@ use it as a commit message when creating a version commit. If the <code>message</code> config contains <code>%s</code> then that will be replaced with the resulting version number. For example:</p> -<pre><code>npm version patch -m "Upgrade to %s for reasons"</code></pre> +<pre><code>npm version patch -m "Upgrade to %s for reasons"</code></pre> <p>If the <code>sign-git-tag</code> config is set, then the tag will be signed using the <code>-s</code> flag to git. Note that you must have a default GPG key set up @@ -40,7 +40,7 @@ in your git config for this to work properly.</p> <ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul> </div> -<p id="footer">version — npm@1.1.46</p> +<p id="footer">version — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/view.html b/deps/npm/html/doc/view.html index 6172ff875d..0742a1fb4a 100644 --- a/deps/npm/html/doc/view.html +++ b/deps/npm/html/doc/view.html @@ -22,7 +22,7 @@ this:</p> <pre><code>npm view connect</code></pre> -<p>The default version is "latest" if unspecified.</p> +<p>The default version is "latest" if unspecified.</p> <p>Field names can be specified after the package descriptor. For example, to show the dependencies of the <code>ronn</code> package at version @@ -44,7 +44,7 @@ opts that ronn depends on, you can do this:</p> <p>For fields that are arrays, requesting a non-numeric field will return all of the values from the objects in the list. For example, to get all -the contributor names for the "express" project, you can do this:</p> +the contributor names for the "express" project, you can do this:</p> <pre><code>npm view express contributors.email</code></pre> @@ -60,7 +60,7 @@ can do this:</p> <pre><code>npm view express contributors.name contributors.email</code></pre> -<p>"Person" fields are shown as a string if they would be shown as an +<p>"Person" fields are shown as a string if they would be shown as an object. So, for example, this will show the list of npm contributors in the shortened string format. (See <code><a href="../doc/json.html">json(1)</a></code> for more on this.)</p> @@ -70,7 +70,7 @@ the shortened string format. (See <code><a href="../doc/json.html">json(1)</a>< matching version of the package. This will show which version of jsdom was required by each matching version of yui3:</p> -<pre><code>npm view yui3@'>0.5.4' dependencies.jsdom</code></pre> +<pre><code>npm view yui3@'>0.5.4' dependencies.jsdom</code></pre> <h2 id="OUTPUT">OUTPUT</h2> @@ -88,7 +88,7 @@ the field name.</p> <ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul> </div> -<p id="footer">view — npm@1.1.46</p> +<p id="footer">view — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/whoami.html b/deps/npm/html/doc/whoami.html index bfc084370e..1d4ee84cfc 100644 --- a/deps/npm/html/doc/whoami.html +++ b/deps/npm/html/doc/whoami.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul> </div> -<p id="footer">whoami — npm@1.1.46</p> +<p id="footer">whoami — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js index 4a89f87c3c..2d6d6bcd0c 100644 --- a/deps/npm/lib/adduser.js +++ b/deps/npm/lib/adduser.js @@ -1,8 +1,7 @@ module.exports = adduser -var ini = require("./utils/ini.js") - , log = require("npmlog") +var log = require("npmlog") , npm = require("./npm.js") , registry = npm.registry , read = require("read") @@ -130,10 +129,10 @@ function save (c, u, cb) { registry.username = u.u registry.password = u.p registry.email = u.e - ini.set("username", u.u, "user") - ini.set("_password", u.p, "user") - ini.set("email", u.e, "user") + npm.config.set("username", u.u, "user") + npm.config.set("_password", u.p, "user") + npm.config.set("email", u.e, "user") log.info("adduser", "Authorized user %s", u.u) - ini.save("user", cb) + npm.config.save("user", cb) }) } diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js index fd55b9e9bd..815739c460 100644 --- a/deps/npm/lib/build.js +++ b/deps/npm/lib/build.js @@ -1,4 +1,3 @@ - // npm build command // everything about the installation after the creation of @@ -62,8 +61,11 @@ function build_ (global, didPre, didRB) { return function (folder, cb) { function writeBuiltinConf (folder, cb) { // the builtin config is "sticky". Any time npm installs itself, // it puts its builtin config file there, as well. - var ini = require("./utils/ini.js") - ini.saveConfig("builtin", path.resolve(folder, "npmrc"), cb) + if (!npm.config.usingBuiltin + || folder !== path.dirname(__dirname)) { + return cb() + } + npm.config.save("builtin", cb) } function linkStuff (pkg, folder, global, didRB, cb) { diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js index 2ca1215b9e..c06c4728d1 100644 --- a/deps/npm/lib/cache.js +++ b/deps/npm/lib/cache.js @@ -414,7 +414,7 @@ function gitEnv () { if (gitEnv_) return gitEnv_ gitEnv_ = {} for (var k in process.env) { - if (k.match(/^GIT/)) continue + if (!~['GIT_PROXY_COMMAND'].indexOf(k) && k.match(/^GIT/)) continue gitEnv_[k] = process.env[k] } return gitEnv_ diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js index 697f2d1668..87bb7a0cfe 100644 --- a/deps/npm/lib/completion.js +++ b/deps/npm/lib/completion.js @@ -5,7 +5,9 @@ completion.usage = "npm completion >> ~/.bashrc\n" + "npm completion >> ~/.zshrc\n" + "source <(npm completion)" -var configDefs = require("./utils/config-defs.js") +var npm = require("./npm.js") + , npmconf = require("npmconf") + , configDefs = npmconf.defs , configTypes = configDefs.types , shorthands = configDefs.shorthands , nopt = require("nopt") diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index 9c632c082a..27a5f3546b 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -9,13 +9,13 @@ config.usage = "npm config set <key> <value>" + "\nnpm set <key> <value>" + "\nnpm get [<key>]" -var ini = require("./utils/ini.js") - , log = require("npmlog") +var log = require("npmlog") , npm = require("./npm.js") , exec = require("./utils/exec.js") , fs = require("graceful-fs") - , dc - , types = require("./utils/config-defs.js").types + , npmconf = require("npmconf") + , types = npmconf.defs.types + , ini = require("ini") config.completion = function (opts, cb) { var argv = opts.conf.argv.remain @@ -59,18 +59,17 @@ function config (args, cb) { } function edit (cb) { - var e = ini.get("editor") - , which = ini.get("global") ? "global" : "user" - , f = ini.get(which + "config") + var e = npm.config.get("editor") + , which = npm.config.get("global") ? "global" : "user" + , f = npm.config.get(which + "config") , eol = process.platform === "win32" ? "\r\n" : "\n" if (!e) return cb(new Error("No EDITOR config or environ set.")) - ini.save(which, function (er) { + npm.config.save(which, function (er) { if (er) return cb(er) fs.readFile(f, "utf8", function (er, data) { if (er) data = "" - dc = dc || require("./utils/config-defs.js").defaults data = [ ";;;;" - , "; npm "+(ini.get("global") ? + , "; npm "+(npm.config.get("global") ? "globalconfig" : "userconfig")+" file" , "; this is a simple ini-formatted file" , "; lines that start with semi-colons are comments." @@ -83,8 +82,8 @@ function edit (cb) { , ";;;;" ] ) - .concat(Object.keys(dc).map(function (k) { - return "; " + k + " = " + ini.unParseField(dc[k],k) + .concat(Object.keys(npmconf.defaults).map(function (k) { + return "; " + k + " = " + npmconf.defaults[k] })) .concat([""]) .join(eol) @@ -94,13 +93,7 @@ function edit (cb) { , "utf8" , function (er) { if (er) return cb(er) - exec(e, [f], function (er) { - if (er) return cb(er) - ini.resolveConfigs(function (er) { - if (er) return cb(er) - ini.save(which, cb) - }) - }) + exec(e, [f], cb) } ) }) @@ -109,8 +102,9 @@ function edit (cb) { function del (key, cb) { if (!key) return cb(new Error("no key provided")) - ini.del(key) - ini.save(ini.get("global") ? "global" : "user", cb) + var where = npm.config.get("global") ? "global" : "user" + npm.config.del(key, where) + npm.config.save(where, cb) } function set (key, val, cb) { @@ -129,9 +123,9 @@ function set (key, val, cb) { key = key.trim() val = val.trim() log.info("config", "set %j %j", key, val) - var where = ini.get("global") ? "global" : "user" - ini.set(key, val, where) - ini.save(where, cb) + var where = npm.config.get("global") ? "global" : "user" + npm.config.set(key, val, where) + npm.config.save(where, cb) } function get (key, cb) { @@ -151,140 +145,127 @@ function reverse (a, b) { return a > b ? -1 : 1 } +function public (k) { + return !(k.charAt(0) === "_" || types[k] !== types[k]) +} + +function getKeys (data) { + return Object.keys(data).filter(public).sort(sort) +} + function list (cb) { var msg = "" , long = npm.config.get("long") - // cli configs. - // show any that aren't secret - var cli = ini.configList.list[ini.TRANS.cli] - , eol = process.platform === "win32" ? "\r\n" : "\n" - , cliKeys = Object.keys(cli).filter(function (k) { - return !(k.charAt(0) === "_" || types[k] !== types[k]) - }).sort(function (a, b) { - return a > b ? 1 : -1 - }) + var cli = npm.config.sources.cli.data + , cliKeys = getKeys(cli) if (cliKeys.length) { - msg += "; cli configs" + eol + msg += "; cli configs\n" cliKeys.forEach(function (k) { if (cli[k] && typeof cli[k] === "object") return if (k === "argv") return - msg += k + " = " + JSON.stringify(cli[k]) + eol + msg += k + " = " + JSON.stringify(cli[k]) + "\n" }) - msg += eol + msg += "\n" } // env configs - var env = ini.configList.list[ini.TRANS.env] - , envKeys = Object.keys(env).filter(function (k) { - return !(k.charAt(0) === "_" || types[k] !== types[k]) - }).sort(function (a, b) { - return a > b ? 1 : -1 - }) + var env = npm.config.sources.env.data + , envKeys = getKeys(env) if (envKeys.length) { - msg += "; environment configs" + eol + msg += "; environment configs\n" envKeys.forEach(function (k) { - if (env[k] !== ini.get(k)) { + if (env[k] !== npm.config.get(k)) { if (!long) return msg += "; " + k + " = " + JSON.stringify(env[k]) - + " (overridden)" + eol - } else msg += k + " = " + JSON.stringify(env[k]) + eol + + " (overridden)\n" + } else msg += k + " = " + JSON.stringify(env[k]) + "\n" }) - msg += eol + msg += "\n" } // user config file - var uconf = ini.configList.list[ini.TRANS.user] - , uconfKeys = Object.keys(uconf).filter(function (k) { - return types[k] === types[k] - }).sort(function (a, b) { - return a > b ? 1 : -1 - }) + var uconf = npm.config.sources.user.data + , uconfKeys = getKeys(uconf) if (uconfKeys.length) { - msg += "; userconfig " + ini.get("userconfig") + eol + msg += "; userconfig " + npm.config.get("userconfig") + "\n" uconfKeys.forEach(function (k) { var val = (k.charAt(0) === "_") ? "---sekretz---" : JSON.stringify(uconf[k]) - if (uconf[k] !== ini.get(k)) { + if (uconf[k] !== npm.config.get(k)) { if (!long) return msg += "; " + k + " = " + val - + " (overridden)" + eol - } else msg += k + " = " + val + eol + + " (overridden)\n" + } else msg += k + " = " + val + "\n" }) - msg += eol + msg += "\n" } // global config file - var gconf = ini.configList.list[ini.TRANS.global] - , gconfKeys = Object.keys(gconf).filter(function (k) { - return types[k] === types[k] - }).sort(function (a, b) { - return a > b ? 1 : -1 - }) + var gconf = npm.config.sources.global.data + , gconfKeys = getKeys(gconf) if (gconfKeys.length) { - msg += "; globalconfig " + ini.get("globalconfig") + eol + msg += "; globalconfig " + npm.config.get("globalconfig") + "\n" gconfKeys.forEach(function (k) { var val = (k.charAt(0) === "_") ? "---sekretz---" : JSON.stringify(gconf[k]) - if (gconf[k] !== ini.get(k)) { + if (gconf[k] !== npm.config.get(k)) { if (!long) return msg += "; " + k + " = " + val - + " (overridden)" + eol - } else msg += k + " = " + val + eol + + " (overridden)\n" + } else msg += k + " = " + val + "\n" }) - msg += eol + msg += "\n" } // builtin config file - var bconf = ini.configList.list[ini.TRANS.builtin] - , bconfKeys = Object.keys(bconf).filter(function (k) { - return types[k] === types[k] - }).sort(function (a, b) { - return a > b ? 1 : -1 + var builtin = npm.config.sources.builtin || {} + if (builtin && builtin.data) { + var bconf = builtin.data + , bpath = builtin.path + , bconfKeys = getKeys(bconf) + if (bconfKeys.length) { + var path = require("path") + msg += "; builtin config " + bpath + "\n" + bconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(bconf[k]) + if (bconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" }) - if (bconfKeys.length) { - var path = require("path") - msg += "; builtin config " + path.resolve(__dirname, "../npmrc") + eol - bconfKeys.forEach(function (k) { - var val = (k.charAt(0) === "_") - ? "---sekretz---" - : JSON.stringify(bconf[k]) - if (bconf[k] !== ini.get(k)) { - if (!long) return - msg += "; " + k + " = " + val - + " (overridden)" + eol - } else msg += k + " = " + val + eol - }) - msg += eol + msg += "\n" + } } // only show defaults if --long if (!long) { - msg += "; node install prefix = " + process.installPrefix + eol - + "; node bin location = " + process.execPath + eol - + "; cwd = " + process.cwd() + eol - + "; HOME = " + process.env.HOME + eol - + "; 'npm config ls -l' to show all defaults." + eol + msg += "; node bin location = " + process.execPath + "\n" + + "; cwd = " + process.cwd() + "\n" + + "; HOME = " + process.env.HOME + "\n" + + "; 'npm config ls -l' to show all defaults.\n" console.log(msg) return cb() } - var defaults = ini.defaultConfig - , defKeys = Object.keys(defaults) - msg += "; default values" + eol + var defaults = npmconf.defaults + , defKeys = getKeys(defaults) + msg += "; default values\n" defKeys.forEach(function (k) { if (defaults[k] && typeof defaults[k] === "object") return var val = JSON.stringify(defaults[k]) - if (defaults[k] !== ini.get(k)) { - if (!long) return + if (defaults[k] !== npm.config.get(k)) { msg += "; " + k + " = " + val - + " (overridden)" + eol - } else msg += k + " = " + val + eol + + " (overridden)\n" + } else msg += k + " = " + val + "\n" }) - msg += eol + msg += "\n" console.log(msg) return cb() diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 28a04ddd4d..c58d5a1e65 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -74,7 +74,7 @@ function install (args, cb_) { function cb (er, installed) { if (er) return cb_(er) - var tree = treeify(installed) + var tree = treeify(installed || []) , pretty = prettify(tree, installed).trim() if (pretty) console.log(pretty) diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index e5d4b24507..0a321b284a 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -17,7 +17,7 @@ require("path").SPLIT_CHAR = process.platform === "win32" ? "\\" : "/" var EventEmitter = require("events").EventEmitter , npm = module.exports = new EventEmitter , config = require("./config.js") - , ini = require("./utils/ini.js") + , npmconf = require("npmconf") , log = require("npmlog") , fs = require("graceful-fs") , path = require("path") @@ -31,6 +31,8 @@ var EventEmitter = require("events").EventEmitter , chain = slide.chain , RegClient = require("npm-registry-client") +npm.config = {loaded: false} + // /usr/local is often a read-only fs, which is not // well handled by node or mkdirp. Just double-check // in the case of errors when making the prefix dirs. @@ -223,11 +225,10 @@ function loadCb (er) { loadListeners.length = 0 } - -npm.load = function (conf, cb_) { - if (!cb_ && typeof conf === "function") cb_ = conf , conf = {} +npm.load = function (cli, cb_) { + if (!cb_ && typeof cli === "function") cb_ = cli , cli = {} if (!cb_) cb_ = function () {} - if (!conf) conf = {} + if (!cli) cli = {} loadListeners.push(cb_) if (loaded || loadErr) return cb(loadErr) if (loading) return @@ -236,6 +237,7 @@ npm.load = function (conf, cb_) { function cb (er) { if (loadErr) return + npm.config.loaded = true loaded = true loadCb(loadErr = er) if (onload = onload && npm.config.get("onload-script")) { @@ -246,11 +248,10 @@ npm.load = function (conf, cb_) { log.pause() - load(npm, conf, cb) + load(npm, cli, cb) } - -function load (npm, conf, cb) { +function load (npm, cli, cb) { which(process.argv[0], function (er, node) { if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) { log.verbose("node symlink", node) @@ -261,12 +262,16 @@ function load (npm, conf, cb) { // look up configs //console.error("about to look up configs") - ini.resolveConfigs(conf, function (er) { - var color = npm.config.get("color") + npmconf.load(cli, function (er, conf) { + if (er === conf) er = null + + npm.config = conf - log.level = npm.config.get("loglevel") + var color = conf.get("color") + + log.level = conf.get("loglevel") log.heading = "npm" - log.stream = npm.config.get("logstream") + log.stream = conf.get("logstream") switch (color) { case "always": log.enableColor(); break case false: log.disableColor(); break @@ -294,12 +299,12 @@ function load (npm, conf, cb) { // at this point the configs are all set. // go ahead and spin up the registry client. - var token = npm.config.get("_token") + var token = conf.get("_token") if (typeof token === "string") { try { token = JSON.parse(token) - npm.config.set("_token", token, "user") - ini.save("user", function () {}) + conf.set("_token", token, "user") + conf.save("user") } catch (e) { token = null } } @@ -329,20 +334,20 @@ function load (npm, conf, cb) { // save the token cookie in the config file if (npm.registry.couchLogin) { npm.registry.couchLogin.tokenSet = function (tok) { - ini.set("_token", tok, "user") + npm.config.set("_token", tok, "user") // ignore save error. best effort. - ini.save("user", function () {}) + npm.config.save("user") } } - var umask = parseInt(conf.umask, 8) + var umask = parseInt(cli.umask, 8) npm.modes = { exec: 0777 & (~umask) , file: 0666 & (~umask) , umask: umask } - chain([ [ loadPrefix, npm, conf ] - , [ setUser, ini.configList, ini.defaultConfig ] - , [ loadUid, npm, conf ] + chain([ [ loadPrefix, npm, cli ] + , [ setUser, conf, conf.root ] + , [ loadUid, npm ] ], cb) }) }) @@ -352,7 +357,7 @@ function loadPrefix (npm, conf, cb) { // try to guess at a good node_modules location. var p , gp - if (!conf.hasOwnProperty("prefix")) { + if (!Object.prototype.hasOwnProperty.call(conf, "prefix")) { p = process.cwd() } else { p = npm.config.get("prefix") @@ -393,7 +398,7 @@ function loadPrefix (npm, conf, cb) { } -function loadUid (npm, conf, cb) { +function loadUid (npm, cb) { // if we're not in unsafe-perm mode, then figure out who // to run stuff as. Do this first, to support `npm update npm -g` if (!npm.config.get("unsafe-perm")) { @@ -427,12 +432,6 @@ function setUser (cl, dc, cb) { } -npm.config = - { get : function (key) { return ini.get(key) } - , set : function (key, val, which) { return ini.set(key, val, which) } - , del : function (key, val, which) { return ini.del(key, val, which) } - } - Object.defineProperty(npm, "prefix", { get : function () { return npm.config.get("global") ? npm.globalPrefix : npm.localPrefix @@ -497,7 +496,7 @@ Object.defineProperty(npm, "tmp", // the better to repl you with Object.getOwnPropertyNames(npm.commands).forEach(function (n) { - if (npm.hasOwnProperty(n)) return + if (npm.hasOwnProperty(n) || n === "config") return Object.defineProperty(npm, n, { get: function () { return function () { diff --git a/deps/npm/lib/owner.js b/deps/npm/lib/owner.js index 16008b5386..fdf4559557 100644 --- a/deps/npm/lib/owner.js +++ b/deps/npm/lib/owner.js @@ -80,7 +80,12 @@ function owner (args, cb) { } function ls (pkg, cb) { - if (!pkg) return cb(owner.usage) + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(owner.usage) + ls(pkg, cb) + }) + registry.get(pkg, function (er, data) { var msg = "" if (er) { @@ -96,7 +101,8 @@ function ls (pkg, cb) { } function add (user, pkg, cb) { - if (!pkg) readLocalPkg(function (er, pkg) { + if (!user) return cb(owner.usage) + if (!pkg) return readLocalPkg(function (er, pkg) { if (er) return cb(er) if (!pkg) return cb(new Error(owner.usage)) add(user, pkg, cb) @@ -119,7 +125,7 @@ function add (user, pkg, cb) { } function rm (user, pkg, cb) { - if (!pkg) readLocalPkg(function (er, pkg) { + if (!pkg) return readLocalPkg(function (er, pkg) { if (er) return cb(er) if (!pkg) return cb(new Error(owner.usage)) rm(user, pkg, cb) diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js index fd22b8e606..51a9de767b 100644 --- a/deps/npm/lib/publish.js +++ b/deps/npm/lib/publish.js @@ -36,9 +36,6 @@ function publish (args, isRetry, cb) { // the prepublish script, since that gets run when adding a folder // to the cache. if (er) return cacheAddPublish(arg, false, isRetry, cb) - - data._npmUser = { name: npm.config.get("username") - , email: npm.config.get("email") } cacheAddPublish(arg, true, isRetry, cb) }) } @@ -71,6 +68,10 @@ function publish_ (arg, data, isRetry, cachedir, cb) { }) } + data._npmVersion = npm.version + data._npmUser = { name: npm.config.get("username") + , email: npm.config.get("email") } + delete data.modules if (data.private) return cb(new Error ("This package has been marked as private\n" @@ -80,25 +81,18 @@ function publish_ (arg, data, isRetry, cachedir, cb) { } function regPublish (data, isRetry, arg, cachedir, cb) { - // check to see if there's a README.md in there. - var readme = path.resolve(cachedir, "README.md") - , tarball = cachedir + ".tgz" - - fs.readFile(readme, function (er, readme) { - // ignore error. it's an optional feature - - registry.publish(data, tarball, readme, function (er) { - if (er && er.code === "EPUBLISHCONFLICT" - && npm.config.get("force") && !isRetry) { - log.warn("publish", "Forced publish over "+data._id) - return npm.commands.unpublish([data._id], function (er) { - // ignore errors. Use the force. Reach out with your feelings. - publish([arg], true, cb) - }) - } - if (er) return cb(er) - console.log("+ " + data._id) - cb() - }) + var tarball = cachedir + ".tgz" + registry.publish(data, tarball, function (er) { + if (er && er.code === "EPUBLISHCONFLICT" + && npm.config.get("force") && !isRetry) { + log.warn("publish", "Forced publish over "+data._id) + return npm.commands.unpublish([data._id], function (er) { + // ignore errors. Use the force. Reach out with your feelings. + publish([arg], true, cb) + }) + } + if (er) return cb(er) + console.log("+ " + data._id) + cb() }) } diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index 566bfa143e..68ede5f699 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -7,14 +7,13 @@ var cbCalled = false , rm = require("rimraf") , itWorked = false , path = require("path") - , ini = require("./ini.js") , wroteLogFile = false , exitCode = 0 process.on("exit", function (code) { // console.error("exit", code) - if (!ini.resolved) return + if (!npm.config.loaded) return if (code) itWorked = false if (itWorked) log.info("ok") else { @@ -71,7 +70,7 @@ function exit (code, noLog) { function errorHandler (er) { var printStack = false // console.error("errorHandler", er) - if (!ini.resolved) { + if (!npm.config.loaded) { // logging won't work unless we pretend that it's ready er = er || new Error("Exit prior to config file resolving.") console.error(er.stack || er.message) diff --git a/deps/npm/lib/utils/ini.js b/deps/npm/lib/utils/ini.js deleted file mode 100644 index 3bbffb09c6..0000000000 --- a/deps/npm/lib/utils/ini.js +++ /dev/null @@ -1,352 +0,0 @@ -// Create a chain of config objects, in this priority order: -// -// CLI - the --foo things in the command line. -// ENV - all the things starting with npm_config_ in the environment -// USER - $HOME/.npmrc -// GLOBAL - $PREFIX/etc/npmrc -// -// If the CLI or ENV specify a userconfig, then that file is used -// as the USER config. -// -// If the CLI or ENV specify a globalconfig, then that file is used -// as the GLOBAL config. -// -// export npm_config_userconfig=/some/other/file -// export npm_config_globalconfig=global -// -// For implementation reasons, "_" in env vars is turned into "-". So, -// export npm_config_node_version - -exports.resolveConfigs = resolveConfigs -exports.save = save -exports.saveConfig = saveConfig -exports.del = del -exports.get = get -exports.set = set -exports.unParseField = unParseField -exports.defaultConfig = null - -Object.defineProperty(exports, "keys", - { get : function () { return configList.keys }}) - -var fs = require("graceful-fs") - , fstream = require("fstream") - , rimraf = require("rimraf") - , path = require("path") - , nopt = require("nopt") - , ini = require("ini") - , ProtoList = require("proto-list") - , mkdir = require("mkdirp") - , npm = require("../npm.js") - - , log = require("npmlog") - , configDefs = require("./config-defs.js") - - , myUid = process.env.SUDO_UID !== undefined - ? process.env.SUDO_UID : (process.getuid && process.getuid()) - , myGid = process.env.SUDO_GID !== undefined - ? process.env.SUDO_GID : (process.getgid && process.getgid()) - - , eol = process.platform === "win32" ? "\r\n" : "\n" - , privateKey = null - , defaultConfig - , configList = new ProtoList() - , types = configDefs.types - - , TRANS = exports.TRANS = - { "default" : 5 - , "builtin": 4 - , "global" : 3 - , "user" : 2 - , "env" : 1 - , "cli" : 0 - } - -exports.configList = configList - -// just put this here for a moment, so that the logs -// in the config-loading phase don't cause it to blow up. - -function resolveConfigs (cli, cb_) { - defaultConfig = defaultConfig || configDefs.defaults - exports.defaultConfig = defaultConfig - configList.pop() - configList.push(defaultConfig) - var cl = configList - , dc = cl.pop() - if (!cb_) cb_ = cli, cli = {} - - function cb (er) { - //console.error("resolving configs") - exports.resolved = true - cb_(er) - } - - cl.list.length = 0 - Object.keys(cli).forEach(function (k) { - cli[k] = parseField(cli[k], k) - }) - cl.push(cli) - cl.push(parseEnv(process.env)) - - parseFile(cl.get("userconfig") || dc.userconfig, function (er, conf) { - if (er) return cb(er) - cl.push(conf) - - // globalconfig and globalignorefile defaults - // need to respond to the "prefix" setting up to this point. - // Eg, `npm config get globalconfig --prefix ~/local` should - // return `~/local/etc/npmrc` - if (cl.get("prefix")) { - dc.globalconfig = path.resolve(cl.get("prefix"), "etc", "npmrc") - dc.globalignorefile = path.resolve(cl.get("prefix"), "etc", "npmignore") - } - - parseFile( cl.get("globalconfig") || dc.globalconfig - , function (er, conf) { - if (er) return cb(er) - - if (conf.hasOwnProperty("prefix")) { - log.warn( "globalconfig" - , "Cannot set prefix in globalconfig file" - , cl.get("globalconfig")) - delete conf.prefix - } - - cl.push(conf) - // the builtin config file, for distros to use. - - parseFile(path.resolve(__dirname, "../../npmrc"), function (er, conf) { - if (er) conf = {} - cl.push(conf) - cl.push(dc) - validate(cl) - cb() - }) - }) - }) -} - -function validate (cl) { - // warn about invalid configs at every level. - cl.list.forEach(function (conf, level) { - // clean(data, types, typeDefs) - nopt.clean(conf, configDefs.types) - }) -} - - -function parseEnv (env) { - var conf = {} - Object.keys(env) - .filter(function (k) { return k.match(/^npm_config_[^_]/i) }) - .forEach(function (k) { - if (!env[k]) return - - conf[k.replace(/^npm_config_/i, "") - .toLowerCase() - .replace(/_/g, "-")] = parseField(env[k], k) - }) - return conf -} - -function unParseField (f, k) { - // type can be an array or single thing. - var isPath = -1 !== [].concat(types[k]).indexOf(path) - if (isPath) { - if (typeof process.env.HOME !== 'undefined') { - if (process.env.HOME.substr(-1) === "/") { - process.env.HOME = process.env.HOME.slice(0, process.env.HOME.length-1) - } - if (f.indexOf(process.env.HOME) === 0) { - f = "~"+f.substr(process.env.HOME.length) - } - } - } - return (!f || typeof f !== "object") ? ini.safe(f) : f - return ini.safe(f) -} - -function parseField (f, k, emptyIsFalse) { - if (typeof f !== "string" && !(f instanceof String)) return f - // type can be an array or single thing. - var isPath = -1 !== [].concat(types[k]).indexOf(path) - , isBool = -1 !== [].concat(types[k]).indexOf(Boolean) - , isString = -1 !== [].concat(types[k]).indexOf(String) - f = ini.unsafe((""+f).trim()) - if (isBool && !isString && f === "") return f = true - switch (f) { - case "true": return true - case "false": return false - case "null": return null - case "undefined": return undefined - } - - f = envReplace(f) - - if (isPath) { - var homePattern = process.platform === "win32" ? /^~(\/|\\)/ : /^~\// - if (f.match(homePattern) && process.env.HOME) { - f = path.resolve(process.env.HOME, f.substr(2)) - } - f = path.resolve(f) - } - - return f -} - -function parseFile (file, cb) { - if (!file) return cb(null, {}) - log.verbose("config file", file) - fs.readFile(file, function (er, data) { - // treat all errors as just an empty file - if (er) return cb(null, {}) - var d = ini.parse(""+data) - , f = {} - Object.keys(d).forEach(function (k) { - f[k] = parseField(d[k], k) - }) - cb(null, parseAuth(f)) - }) -} - -function encryptAuth (config, cb) { - if (config.username && config._password) { - var b = new Buffer(config.username+":"+config._password) - config._auth = b.toString("base64") - } - delete config.username - delete config._password - return cb(null, config) -} - -function parseAuth (config) { - if (!config._auth) return config - var b = new Buffer(config._auth, "base64") - , unpw = b.toString().split(":") - , un = unpw.shift() - , pw = unpw.join(":") - config.username = un = (config.username || un) - config._password = pw = (config._password || pw) - b = new Buffer(un + ":" + pw) - config._auth = b.toString("base64") - return config -} - -function save (which, cb) { - if (typeof which === "function") cb = which, which = null - if (!which) which = ["global", "user", "builtin"] - if (!Array.isArray(which)) which = [which] - var errState = null - , done = which.length - , failed = [] - which.forEach(function (c) { - saveConfig(c, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (-- done === 0) return cb() - }) - }) -} - -function saveConfig (which, file, cb) { - if (typeof file === "function") cb = file, file = null - if (!file) { - switch (which) { - case "builtin": - file = path.resolve(__dirname, "../../npmrc") - break - case "global": - file = configList.get("globalconfig") - break - default: - file = configList.get("userconfig") - which = "user" - } - } - - saveConfigfile - ( file - , configList.list[TRANS[which]] - , which - , cb ) -} - -function saveConfigfile (file, config, which, cb) { - encryptAuth(config, function () { // ignore errors - var data = {} - Object.keys(config).forEach(function (k) { - data[k] = unParseField(config[k], k) - }) - data = ini.stringify(data) - return (data.trim()) - ? writeConfigfile(file, data, which, cb) - : rimraf(file, cb) - }) -} - -function writeConfigfile (configfile, data, which, cb) { - data = data.split(/\r*\n/).join(eol) - var props = { type: "File", path: configfile } - if (which === "user") { - props.mode = 0600 - if (typeof myUid === "number") { - props.uid = +myUid - props.gid = +myGid - } - } else { - props.mode = 0644 - } - fstream.Writer(props) - .on("close", cb) - .on("error", cb) - .end(data) -} - -function snapshot (which) { - var x = (!which) ? configList.snapshot - : configList.list[TRANS[which]] ? configList.list[TRANS[which]] - : undefined - if (!x) return - Object.keys(x).forEach(function (k) { if (k.match(/^_/)) delete x[k] }) - return x -} -function get (key, which) { - return (!key) ? snapshot(which) - : (!which) ? configList.get(key) // resolved - : configList.list[TRANS[which]] - ? envReplace(configList.list[TRANS[which]][key]) - : undefined -} - -function envReplace (f) { - if (typeof f !== "string" || !f) return f - - // replace any ${ENV} values with the appropriate environ. - var envExpr = /(\\*)\$\{([^}]+)\}/g - return f.replace(envExpr, function (orig, esc, name, i, s) { - esc = esc.length && esc.length % 2 - if (esc) return orig - if (undefined === process.env[name]) { - throw new Error("Failed to replace env in config: "+orig) - } - return process.env[name] - }) -} - -function del (key, which) { - if (!which) configList.list.forEach(function (l) { - delete l[key] - }) - else if (configList.list[TRANS[which]]) { - delete configList.list[TRANS[which]] - } -} -function set (key, value, which) { - which = which || "cli" - if (configList.length === 1) { - return new Error("trying to set before loading") - } - configList.list[TRANS[which]][key] = value - return value -} diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index 7fc900884d..2ddf02df0f 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -78,6 +78,10 @@ function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) { // the bundled one will be used for installing things. pathArr.unshift(path.join(__dirname, "..", "..", "bin", "node-gyp-bin")) + // add the directory containing the `node` executable currently running, so + // that any lifecycle script that invoke "node" will execute this same one. + pathArr.unshift(path.dirname(process.execPath)) + if (env[PATH]) pathArr.push(env[PATH]) env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":") @@ -86,14 +90,6 @@ function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) { if (packageLifecycle) { // define this here so it's available to all scripts. env.npm_lifecycle_script = pkg.scripts[stage] - // if the command is "node-gyp <args>", then call ours instead. - try { - var ourGyp = require.resolve("node-gyp/bin/node-gyp.js") - } catch (er) { - return cb(new Error("No gyp installed with npm")) - } - var gyp = path.execPath + " " + JSON.stringify(ourGyp) - pkg.scripts[stage] = pkg.scripts[stage].replace(/^node-gyp( |$)/, gyp) } if (failOk) { @@ -246,8 +242,7 @@ function makeEnv (data, prefix, env) { prefix = "npm_config_" var pkgConfig = {} - , ini = require("./ini.js") - , keys = ini.keys + , keys = npm.config.keys , pkgVerConfig = {} , namePref = data.name + ":" , verPref = data.name + "@" + data.version + ":" @@ -256,7 +251,7 @@ function makeEnv (data, prefix, env) { if (i.charAt(0) === "_" && i.indexOf("_"+namePref) !== 0) { return } - var value = ini.get(i) + var value = npm.config.get(i) if (value instanceof Stream) return if (!value) value = "" else if (typeof value !== "string") value = JSON.stringify(value) diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js index a1edf85755..fb00e21d3c 100644 --- a/deps/npm/lib/version.js +++ b/deps/npm/lib/version.js @@ -20,8 +20,26 @@ version.usage = "npm version [<newversion> | major | minor | patch | build]\n" function version (args, silent, cb_) { if (typeof cb_ !== "function") cb_ = silent, silent = false - if (args.length !== 1) return cb_(version.usage) + if (args.length > 1) return cb_(version.usage) fs.readFile(path.join(process.cwd(), "package.json"), function (er, data) { + if (!args.length) { + var v = {} + Object.keys(process.versions).forEach(function (k) { + v[k] = process.versions[k] + }) + v.npm = npm.version + try { + data = JSON.parse(data.toString()) + } catch (er) { + data = null + } + if (data && data.name && data.version) { + v[data.name] = data.version + } + console.log(v) + return cb_() + } + if (er) { log.error("version", "No package.json found") return cb_(er) diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js index 9b34df3bf2..bdfd48165b 100644 --- a/deps/npm/lib/view.js +++ b/deps/npm/lib/view.js @@ -41,7 +41,6 @@ view.completion = function (opts, cb) { var npm = require("./npm.js") , registry = npm.registry - , ini = require("ini") , log = require("npmlog") , util = require("util") , semver = require("semver") diff --git a/deps/npm/man/man1/README.1 b/deps/npm/man/man1/README.1 index 8fb8449aaa..4fec26e57a 100644 --- a/deps/npm/man/man1/README.1 +++ b/deps/npm/man/man1/README.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM" "1" "August 2012" "" "" @@ -36,69 +36,19 @@ If you want a more fancy pants install (a different version, customized paths, etc\.) then read on\. . .SH "Fancy Install (Unix)" -To install npm with one command, do this: -. -.IP "" 4 -. -.nf -curl http://npmjs\.org/install\.sh | sh -. -.fi -. -.IP "" 0 -. -.P -To skip the npm 0\.x cleanup, do this: -. -.IP "" 4 -. -.nf -curl http://npmjs\.org/install\.sh | clean=no sh -. -.fi -. -.IP "" 0 -. -.P -To say "yes" to the 0\.x cleanup, but skip the prompt: -. -.IP "" 4 -. -.nf -curl http://npmjs\.org/install\.sh | clean=yes sh -. -.fi -. -.IP "" 0 -. -.P -If you get permission errors, you\'ll need to \fBrun\fR the script as root\. -(Note, just putting \fBsudo\fR in front of the \fBcurl\fR will \fBfetch\fR the script -as root\.) +There\'s a pretty robust install script at \fIhttps://npmjs\.org/install\.sh\fR\|\. You can download that and run it\. . .SS "Slightly Fancier" You can set any npm configuration params with that script: . -.IP "" 4 -. -.nf -curl http://npmjs\.org/install\.sh | npm_config_prefix=/some/path sh -. -.fi -. -.IP "" 0 +.P +npm\fIconfig\fRprefix=/some/path sh install\.sh . .P Or, you can run it in uber\-debuggery mode: . -.IP "" 4 -. -.nf -curl http://npmjs\.org/install\.sh | npm_debug=1 sh -. -.fi -. -.IP "" 0 +.P +npm_debug=1 sh install\.sh . .SS "Even Fancier" Get the code with git\. Use \fBmake\fR to build the docs and do other stuff\. @@ -121,36 +71,6 @@ git, and mess with it directly\. .SH "Installing on Cygwin" No\. . -.SH "Dev Install" -To install the latest \fBunstable\fR development version from git: -. -.IP "" 4 -. -.nf -git clone https://github\.com/isaacs/npm\.git -cd npm -sudo make install # (or: `node cli\.js install \-gf`) -. -.fi -. -.IP "" 0 -. -.P -If you\'re sitting in the code folder reading this document in your -terminal, then you\'ve already got the code\. Just do: -. -.IP "" 4 -. -.nf -sudo make install -. -.fi -. -.IP "" 0 -. -.P -and npm will install itself\. -. .SH "Permissions when Using npm to Install Other Stuff" \fBtl;dr\fR . @@ -258,6 +178,16 @@ you have chosen\. If you would like to use npm programmatically, you can do that\. It\'s not very well documented, but it \fIis\fR rather simple\. . +.P +Most of the time, unless you actually want to do all the things that +npm does, you should try using one of npm\'s dependencies rather than +using npm itself, if possible\. +. +.P +Eventually, npm will be just a thin cli wrapper around the modules +that it depends on, but for now, there are some things that you must +use npm itself to do\. +. .IP "" 4 . .nf diff --git a/deps/npm/man/man1/adduser.1 b/deps/npm/man/man1/adduser.1 index 196b1ec4e8..6e4b76f436 100644 --- a/deps/npm/man/man1/adduser.1 +++ b/deps/npm/man/man1/adduser.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-ADDUSER" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/bin.1 b/deps/npm/man/man1/bin.1 index c2b203f607..012d1ac07c 100644 --- a/deps/npm/man/man1/bin.1 +++ b/deps/npm/man/man1/bin.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-BIN" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/bugs.1 b/deps/npm/man/man1/bugs.1 index 8fd783b3aa..c9b45023ce 100644 --- a/deps/npm/man/man1/bugs.1 +++ b/deps/npm/man/man1/bugs.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-BUGS" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/build.1 b/deps/npm/man/man1/build.1 index c3111bbb0d..290804aeaf 100644 --- a/deps/npm/man/man1/build.1 +++ b/deps/npm/man/man1/build.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-BUILD" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/bundle.1 b/deps/npm/man/man1/bundle.1 index a4c4747ac5..272907754e 100644 --- a/deps/npm/man/man1/bundle.1 +++ b/deps/npm/man/man1/bundle.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-BUNDLE" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/cache.1 b/deps/npm/man/man1/cache.1 index b14c18bf8b..5d029f1f72 100644 --- a/deps/npm/man/man1/cache.1 +++ b/deps/npm/man/man1/cache.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-CACHE" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/changelog.1 b/deps/npm/man/man1/changelog.1 index 0fd7f53c57..0233707578 100644 --- a/deps/npm/man/man1/changelog.1 +++ b/deps/npm/man/man1/changelog.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-CHANGELOG" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/coding-style.1 b/deps/npm/man/man1/coding-style.1 index 0be920cde6..da006c54ed 100644 --- a/deps/npm/man/man1/coding-style.1 +++ b/deps/npm/man/man1/coding-style.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-CODING\-STYLE" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/completion.1 b/deps/npm/man/man1/completion.1 index 6ea8e4ebfa..a6ba28f35d 100644 --- a/deps/npm/man/man1/completion.1 +++ b/deps/npm/man/man1/completion.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-COMPLETION" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/config.1 b/deps/npm/man/man1/config.1 index a6b5011085..f1a4ee09c5 100644 --- a/deps/npm/man/man1/config.1 +++ b/deps/npm/man/man1/config.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-CONFIG" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/deprecate.1 b/deps/npm/man/man1/deprecate.1 index ade8450258..0cc3eee2a4 100644 --- a/deps/npm/man/man1/deprecate.1 +++ b/deps/npm/man/man1/deprecate.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-DEPRECATE" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/developers.1 b/deps/npm/man/man1/developers.1 index 5c53a1e3e3..a6ab1dd165 100644 --- a/deps/npm/man/man1/developers.1 +++ b/deps/npm/man/man1/developers.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-DEVELOPERS" "1" "August 2012" "" "" @@ -22,7 +22,7 @@ These are man pages\. If you install npm, you should be able to then do \fBman npm\-thing\fR to get the documentation on a particular topic, or \fBnpm help thing\fR to see the same information\. . -.SH "What is a `package`" +.SH "What is a " A package is: . .IP "\(bu" 4 @@ -135,7 +135,7 @@ You can use \fBnpm init\fR in the root of your package in order to get you started with a pretty basic package\.json file\. See \fBnpm help init\fR for more info\. . -.SH "Keeping files *out* of your package" +.SH "Keeping files " Use a \fB\|\.npmignore\fR file to keep stuff out of your package\. If there\'s no \.npmignore file, but there \fIis\fR a \.gitignore file, then npm will ignore the stuff matched by the \.gitignore file\. If you \fIwant\fR to diff --git a/deps/npm/man/man1/disputes.1 b/deps/npm/man/man1/disputes.1 index d69d47d8fe..a87a908069 100644 --- a/deps/npm/man/man1/disputes.1 +++ b/deps/npm/man/man1/disputes.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-DISPUTES" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/docs.1 b/deps/npm/man/man1/docs.1 index c31c0a53c5..7e7709c2c4 100644 --- a/deps/npm/man/man1/docs.1 +++ b/deps/npm/man/man1/docs.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-DOCS" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/edit.1 b/deps/npm/man/man1/edit.1 index fc7757d18c..8e6e25e7b3 100644 --- a/deps/npm/man/man1/edit.1 +++ b/deps/npm/man/man1/edit.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-EDIT" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/explore.1 b/deps/npm/man/man1/explore.1 index 305f06aa07..18623b3dd0 100644 --- a/deps/npm/man/man1/explore.1 +++ b/deps/npm/man/man1/explore.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-EXPLORE" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/faq.1 b/deps/npm/man/man1/faq.1 index 206a48d1d7..ee360bf4d0 100644 --- a/deps/npm/man/man1/faq.1 +++ b/deps/npm/man/man1/faq.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-FAQ" "1" "August 2012" "" "" @@ -21,10 +21,10 @@ npm config set viewer browser .P to open these documents in your default web browser rather than \fBman\fR\|\. . -.SH "It didn\'t work\." +.SH "It didn't work\." That\'s not really a question\. . -.SH "Why didn\'t it work?" +.SH "Why didn't it work?" I don\'t know yet\. . .P @@ -53,7 +53,7 @@ Install it globally by tacking \fB\-g\fR or \fB\-\-global\fR to the command\. ( is especially important for command line utilities that need to add their bins to the global system \fBPATH\fR\|\.) . -.SH "I installed something globally, but I can\'t `require()` it" +.SH "I installed something globally, but I can't " Install it locally\. . .P @@ -65,7 +65,7 @@ If you \fBrequire()\fR 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\. . -.SH "Why can\'t npm just put everything in one place, like other package managers?" +.SH "Why can't npm just put everything in one place, like other package managers?" 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 @@ -83,13 +83,13 @@ programs reference the same copy of it, then use the \fBnpm link\fR command\. That\'s what it\'s for\. Install it globally, then link it into each program that uses it\. . -.SH "Whatever, I really want the old style \'everything global\' style\." +.SH "Whatever, I really want the old style 'everything global' style\." Write your own package manager, then\. It\'s not that hard\. . .P npm will not help you do something that is known to be a bad idea\. . -.SH "Should I check my `node_modules` folder into git?" +.SH "Should I check my " Mikeal Rogers answered this question very well: . .P @@ -112,11 +112,11 @@ your deployment scripts\. . .IP "" 0 . -.SH "Is it \'npm\' or \'NPM\' or \'Npm\'?" +.SH "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\.) . -.SH "If \'npm\' is an acronym, why is it never capitalized?" +.SH "If 'npm' is an acronym, why is it never capitalized?" Contrary to the belief of many, "npm" is not in fact an abbreviation for "Node Package Manager"\. It is a recursive bacronymic abbreviation for "npm is not an acronym"\. (If it was "ninaa", then it would be an @@ -185,7 +185,7 @@ curl http://npmjs\.org/install\.sh | sh . .IP "" 0 . -.SH "What is a `package`?" +.SH "What is a " A package is: . .IP "\(bu" 4 @@ -265,20 +265,20 @@ Yes\. It should be a url to a gzipped tarball containing a single folder that has a package\.json in its root, or a git url\. (See "what is a package?" above\.) . -.SH "How do I symlink to a dev folder so I don\'t have to keep re\-installing?" +.SH "How do I symlink to a dev folder so I don't have to keep re\-installing?" See \fBnpm help link\fR . .SH "The package registry website\. What is that exactly?" See \fBnpm help registry\fR\|\. . -.SH "What\'s up with the insecure channel warnings?" +.SH "What's up with the insecure channel warnings?" Until node 0\.4\.10, there were problems sending big files over HTTPS\. That means that publishes go over HTTP by default in those versions of node\. . -.SH "I forgot my password, and can\'t publish\. How do I reset it?" +.SH "I forgot my password, and can't publish\. How do I reset it?" Go to \fIhttp://admin\.npmjs\.org/reset\fR\|\. . -.SH "I get ECONNREFUSED a lot\. What\'s up?" +.SH "I get ECONNREFUSED a lot\. What's up?" Either the registry is down, or node\'s DNS isn\'t able to reach out\. . .P diff --git a/deps/npm/man/man1/folders.1 b/deps/npm/man/man1/folders.1 index f32b4af68f..618cf3c5ce 100644 --- a/deps/npm/man/man1/folders.1 +++ b/deps/npm/man/man1/folders.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-FOLDERS" "1" "August 2012" "" "" @@ -148,9 +148,8 @@ prevented\. Another optimization can be made by installing dependencies at the highest level possible, below the localized "target" folder\. . -.TP -Example -.Consider this dependency graph: +.SS "\fIExample\fR" +Consider this dependency graph: . .IP "" 4 . diff --git a/deps/npm/man/man1/help-search.1 b/deps/npm/man/man1/help-search.1 index 03c4d016c8..9ba4b94cb6 100644 --- a/deps/npm/man/man1/help-search.1 +++ b/deps/npm/man/man1/help-search.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-HELP\-SEARCH" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/help.1 b/deps/npm/man/man1/help.1 index e1a2e60d9e..719af267ef 100644 --- a/deps/npm/man/man1/help.1 +++ b/deps/npm/man/man1/help.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-HELP" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/index.1 b/deps/npm/man/man1/index.1 index 0717dac3de..ec2d9a9f33 100644 --- a/deps/npm/man/man1/index.1 +++ b/deps/npm/man/man1/index.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-INDEX" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/init.1 b/deps/npm/man/man1/init.1 index 8d8555753d..77258c9e62 100644 --- a/deps/npm/man/man1/init.1 +++ b/deps/npm/man/man1/init.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-INIT" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/install.1 b/deps/npm/man/man1/install.1 index 396ad51e5c..4d74cbf443 100644 --- a/deps/npm/man/man1/install.1 +++ b/deps/npm/man/man1/install.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-INSTALL" "1" "August 2012" "" "" @@ -335,7 +335,7 @@ already caused C to be installed at a higher level\. See npm help folders for a more detailed description of the specific folder structures that npm creates\. . -.SS "Limitations of npm\'s Install Algorithm" +.SS "Limitations of npm's Install Algorithm" There are some very rare and pathological edge\-cases where a cycle can cause npm to try to install a never\-ending tree of packages\. Here is the simplest case: diff --git a/deps/npm/man/man1/json.1 b/deps/npm/man/man1/json.1 index a7ab18eace..cd1763c7e4 100644 --- a/deps/npm/man/man1/json.1 +++ b/deps/npm/man/man1/json.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-JSON" "1" "August 2012" "" "" @@ -32,6 +32,13 @@ If there is a \fBwscript\fR file in the root of your package, npm will default the \fBpreinstall\fR command to compile using node\-waf\. . .IP "\(bu" 4 +\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fR +. +.IP +If there is a \fBbinding\.gyp\fR file in the root of your package, npm will +default the \fBpreinstall\fR command to compile using node\-gyp\. +. +.IP "\(bu" 4 \fB"contributors": [\.\.\.]\fR . .IP diff --git a/deps/npm/man/man1/link.1 b/deps/npm/man/man1/link.1 index e6ee419da4..b93dbd0b7c 100644 --- a/deps/npm/man/man1/link.1 +++ b/deps/npm/man/man1/link.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-LINK" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/list.1 b/deps/npm/man/man1/list.1 index 4d4ade4470..65db45c02a 100644 --- a/deps/npm/man/man1/list.1 +++ b/deps/npm/man/man1/list.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-LS" "1" "August 2012" "" "" @@ -29,7 +29,7 @@ For example, running \fBnpm ls promzard\fR in npm\'s source tree will show: .IP "" 4 . .nf -npm@1.1.46 /path/to/npm +npm@1.1.49 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 . diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index f210022434..522d451aa2 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM" "1" "August 2012" "" "" @@ -14,7 +14,7 @@ npm <command> [args] .fi . .SH "VERSION" -1.1.46 +1.1.49 . .SH "DESCRIPTION" npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man1/outdated.1 b/deps/npm/man/man1/outdated.1 index ae93a77874..fffd7a485d 100644 --- a/deps/npm/man/man1/outdated.1 +++ b/deps/npm/man/man1/outdated.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-OUTDATED" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/owner.1 b/deps/npm/man/man1/owner.1 index 3792afbb0d..76d79b40c6 100644 --- a/deps/npm/man/man1/owner.1 +++ b/deps/npm/man/man1/owner.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-OWNER" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/pack.1 b/deps/npm/man/man1/pack.1 index 812fbb2723..456c9a295b 100644 --- a/deps/npm/man/man1/pack.1 +++ b/deps/npm/man/man1/pack.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-PACK" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/prefix.1 b/deps/npm/man/man1/prefix.1 index a7f253b3f7..79ec1bce75 100644 --- a/deps/npm/man/man1/prefix.1 +++ b/deps/npm/man/man1/prefix.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-PREFIX" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/prune.1 b/deps/npm/man/man1/prune.1 index a8d35c0ea0..5f10fc77a3 100644 --- a/deps/npm/man/man1/prune.1 +++ b/deps/npm/man/man1/prune.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-PRUNE" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/publish.1 b/deps/npm/man/man1/publish.1 index e73e5f7ce3..c35bcacae7 100644 --- a/deps/npm/man/man1/publish.1 +++ b/deps/npm/man/man1/publish.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-PUBLISH" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/rebuild.1 b/deps/npm/man/man1/rebuild.1 index 7e5b0a6644..4810847698 100644 --- a/deps/npm/man/man1/rebuild.1 +++ b/deps/npm/man/man1/rebuild.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-REBUILD" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/registry.1 b/deps/npm/man/man1/registry.1 index 3abf3f57fa..0565e8f2f9 100644 --- a/deps/npm/man/man1/registry.1 +++ b/deps/npm/man/man1/registry.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-REGISTRY" "1" "August 2012" "" "" @@ -40,7 +40,7 @@ to read any published packages, in addition to your private ones, and by default will only publish internally\. If you then want to publish a package for the whole world to see, you can simply override the \fB\-\-registry\fR config for that command\. . -.SH "I don\'t want my package published in the official registry\. It\'s private\." +.SH "I don't want my package published in the official registry\. It's private\." Set \fB"private": true\fR in your package\.json to prevent it from being published at all, or \fB"publishConfig":{"registry":"http://my\-internal\-registry\.local"}\fR to force it to be published only to your internal registry\. diff --git a/deps/npm/man/man1/removing-npm.1 b/deps/npm/man/man1/removing-npm.1 index 0ab98a3bf8..f65afb32af 100644 --- a/deps/npm/man/man1/removing-npm.1 +++ b/deps/npm/man/man1/removing-npm.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-REMOVAL" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/restart.1 b/deps/npm/man/man1/restart.1 index f083744056..527d98eea5 100644 --- a/deps/npm/man/man1/restart.1 +++ b/deps/npm/man/man1/restart.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-RESTART" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/root.1 b/deps/npm/man/man1/root.1 index 708bfbdb7d..2f23daec82 100644 --- a/deps/npm/man/man1/root.1 +++ b/deps/npm/man/man1/root.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-ROOT" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/run-script.1 b/deps/npm/man/man1/run-script.1 index 2f0faac84f..0c9c7a58de 100644 --- a/deps/npm/man/man1/run-script.1 +++ b/deps/npm/man/man1/run-script.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-RUN\-SCRIPT" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/scripts.1 b/deps/npm/man/man1/scripts.1 index 2626530381..519c6785f4 100644 --- a/deps/npm/man/man1/scripts.1 +++ b/deps/npm/man/man1/scripts.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-SCRIPTS" "1" "August 2012" "" "" @@ -124,7 +124,7 @@ variable set to "foo", and the \fBnpm_package_version\fR set to "1\.2\.5" Configuration parameters are put in the environment with the \fBnpm_config_\fR prefix\. For instance, you can view the effective \fBroot\fR config by checking the \fBnpm_config_root\fR environment variable\. . -.SS "Special: package\.json "config" hash" +.SS "Special: package\.json "config" hash" The package\.json "config" keys are overwritten in the environment if there is a config param of \fB<name>[@<version>]:<key>\fR\|\. For example, if the package\.json has this: diff --git a/deps/npm/man/man1/search.1 b/deps/npm/man/man1/search.1 index eb4906535c..6f12c7559e 100644 --- a/deps/npm/man/man1/search.1 +++ b/deps/npm/man/man1/search.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-SEARCH" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/semver.1 b/deps/npm/man/man1/semver.1 index a3eebb1cfc..61d82930a1 100644 --- a/deps/npm/man/man1/semver.1 +++ b/deps/npm/man/man1/semver.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-SEMVER" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/shrinkwrap.1 b/deps/npm/man/man1/shrinkwrap.1 index 09b1dade8e..0180b17546 100644 --- a/deps/npm/man/man1/shrinkwrap.1 +++ b/deps/npm/man/man1/shrinkwrap.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-SHRINKWRAP" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/star.1 b/deps/npm/man/man1/star.1 index 420ac59897..2d76c505ea 100644 --- a/deps/npm/man/man1/star.1 +++ b/deps/npm/man/man1/star.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-STAR" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/start.1 b/deps/npm/man/man1/start.1 index 9b0e85f67e..d2caf6ea97 100644 --- a/deps/npm/man/man1/start.1 +++ b/deps/npm/man/man1/start.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-START" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/stop.1 b/deps/npm/man/man1/stop.1 index c52c7b311f..5d8a7c5ba3 100644 --- a/deps/npm/man/man1/stop.1 +++ b/deps/npm/man/man1/stop.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-STOP" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/submodule.1 b/deps/npm/man/man1/submodule.1 index 518b7186d2..39610e73db 100644 --- a/deps/npm/man/man1/submodule.1 +++ b/deps/npm/man/man1/submodule.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-SUBMODULE" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/tag.1 b/deps/npm/man/man1/tag.1 index 93d89643b5..5ebc3cea89 100644 --- a/deps/npm/man/man1/tag.1 +++ b/deps/npm/man/man1/tag.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-TAG" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/test.1 b/deps/npm/man/man1/test.1 index efe07047ac..61cc2c486c 100644 --- a/deps/npm/man/man1/test.1 +++ b/deps/npm/man/man1/test.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-TEST" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/uninstall.1 b/deps/npm/man/man1/uninstall.1 index a1642a4f74..75397946a1 100644 --- a/deps/npm/man/man1/uninstall.1 +++ b/deps/npm/man/man1/uninstall.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-RM" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/unpublish.1 b/deps/npm/man/man1/unpublish.1 index be907d59b0..d22e7ff741 100644 --- a/deps/npm/man/man1/unpublish.1 +++ b/deps/npm/man/man1/unpublish.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-UNPUBLISH" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/update.1 b/deps/npm/man/man1/update.1 index 859baf8d56..df947c1ab4 100644 --- a/deps/npm/man/man1/update.1 +++ b/deps/npm/man/man1/update.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-UPDATE" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/version.1 b/deps/npm/man/man1/version.1 index 75014358b4..1460c32591 100644 --- a/deps/npm/man/man1/version.1 +++ b/deps/npm/man/man1/version.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-VERSION" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/view.1 b/deps/npm/man/man1/view.1 index fa7c14c4a3..163717536e 100644 --- a/deps/npm/man/man1/view.1 +++ b/deps/npm/man/man1/view.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-VIEW" "1" "August 2012" "" "" diff --git a/deps/npm/man/man1/whoami.1 b/deps/npm/man/man1/whoami.1 index 372c9f255f..63dab5f6cf 100644 --- a/deps/npm/man/man1/whoami.1 +++ b/deps/npm/man/man1/whoami.1 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-WHOAMI" "1" "August 2012" "" "" diff --git a/deps/npm/man/man3/bin.3 b/deps/npm/man/man3/bin.3 index f1ba921dec..eac7c2c3e0 100644 --- a/deps/npm/man/man3/bin.3 +++ b/deps/npm/man/man3/bin.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-BIN" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/bugs.3 b/deps/npm/man/man3/bugs.3 index fedf424a8e..1dad6a1be0 100644 --- a/deps/npm/man/man3/bugs.3 +++ b/deps/npm/man/man3/bugs.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-BUGS" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/commands.3 b/deps/npm/man/man3/commands.3 index eadf467e33..584855de24 100644 --- a/deps/npm/man/man3/commands.3 +++ b/deps/npm/man/man3/commands.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-COMMANDS" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/config.3 b/deps/npm/man/man3/config.3 index 3575ebd144..bdbea195cb 100644 --- a/deps/npm/man/man3/config.3 +++ b/deps/npm/man/man3/config.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-CONFIG" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/deprecate.3 b/deps/npm/man/man3/deprecate.3 index 43d88c2e6c..f26639f931 100644 --- a/deps/npm/man/man3/deprecate.3 +++ b/deps/npm/man/man3/deprecate.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-DEPRECATE" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/docs.3 b/deps/npm/man/man3/docs.3 index 4ba15ac5d8..75fbaeac55 100644 --- a/deps/npm/man/man3/docs.3 +++ b/deps/npm/man/man3/docs.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-DOCS" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/edit.3 b/deps/npm/man/man3/edit.3 index ba028bd973..9d1d0fa5c4 100644 --- a/deps/npm/man/man3/edit.3 +++ b/deps/npm/man/man3/edit.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-EDIT" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/explore.3 b/deps/npm/man/man3/explore.3 index 756fde937c..a220a2702a 100644 --- a/deps/npm/man/man3/explore.3 +++ b/deps/npm/man/man3/explore.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-EXPLORE" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/help-search.3 b/deps/npm/man/man3/help-search.3 index b7fe3c3211..068f44accb 100644 --- a/deps/npm/man/man3/help-search.3 +++ b/deps/npm/man/man3/help-search.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-HELP\-SEARCH" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/init.3 b/deps/npm/man/man3/init.3 index c136aa763c..203c6e744a 100644 --- a/deps/npm/man/man3/init.3 +++ b/deps/npm/man/man3/init.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "INIT" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/install.3 b/deps/npm/man/man3/install.3 index fa7ce0d7df..9169bc5d92 100644 --- a/deps/npm/man/man3/install.3 +++ b/deps/npm/man/man3/install.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-INSTALL" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/link.3 b/deps/npm/man/man3/link.3 index 38e202071d..42ada40432 100644 --- a/deps/npm/man/man3/link.3 +++ b/deps/npm/man/man3/link.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-LINK" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/load.3 b/deps/npm/man/man3/load.3 index 574dd2e41a..506b67af7d 100644 --- a/deps/npm/man/man3/load.3 +++ b/deps/npm/man/man3/load.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-LOAD" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/ls.3 b/deps/npm/man/man3/ls.3 index 6a9a08fdab..8b49137fde 100644 --- a/deps/npm/man/man3/ls.3 +++ b/deps/npm/man/man3/ls.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-LS" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index e77001e2d2..cdbccc90cd 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM" "3" "August 2012" "" "" @@ -21,7 +21,7 @@ npm\.load(configObject, function (er, npm) { .fi . .SH "VERSION" -1.1.46 +1.1.49 . .SH "DESCRIPTION" This is the API documentation for npm\. diff --git a/deps/npm/man/man3/outdated.3 b/deps/npm/man/man3/outdated.3 index 663e0828de..e4893c22aa 100644 --- a/deps/npm/man/man3/outdated.3 +++ b/deps/npm/man/man3/outdated.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-OUTDATED" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/owner.3 b/deps/npm/man/man3/owner.3 index 960cc1c618..a4d8f420f1 100644 --- a/deps/npm/man/man3/owner.3 +++ b/deps/npm/man/man3/owner.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-OWNER" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/pack.3 b/deps/npm/man/man3/pack.3 index be71effdd9..326308ee1f 100644 --- a/deps/npm/man/man3/pack.3 +++ b/deps/npm/man/man3/pack.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-PACK" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/prefix.3 b/deps/npm/man/man3/prefix.3 index 3345045a29..474937e414 100644 --- a/deps/npm/man/man3/prefix.3 +++ b/deps/npm/man/man3/prefix.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-PREFIX" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/prune.3 b/deps/npm/man/man3/prune.3 index bb656f4909..bf2cf649ce 100644 --- a/deps/npm/man/man3/prune.3 +++ b/deps/npm/man/man3/prune.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-PRUNE" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/publish.3 b/deps/npm/man/man3/publish.3 index 302b0b780d..873221a0e3 100644 --- a/deps/npm/man/man3/publish.3 +++ b/deps/npm/man/man3/publish.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-PUBLISH" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/rebuild.3 b/deps/npm/man/man3/rebuild.3 index 4cdefb0a24..070fd3d445 100644 --- a/deps/npm/man/man3/rebuild.3 +++ b/deps/npm/man/man3/rebuild.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-REBUILD" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/restart.3 b/deps/npm/man/man3/restart.3 index c6e43095a5..c459c2eeea 100644 --- a/deps/npm/man/man3/restart.3 +++ b/deps/npm/man/man3/restart.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-RESTART" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/root.3 b/deps/npm/man/man3/root.3 index f775441561..1095a31fa5 100644 --- a/deps/npm/man/man3/root.3 +++ b/deps/npm/man/man3/root.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-ROOT" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/run-script.3 b/deps/npm/man/man3/run-script.3 index 62d425c3aa..0a0c81d890 100644 --- a/deps/npm/man/man3/run-script.3 +++ b/deps/npm/man/man3/run-script.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-RUN\-SCRIPT" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/search.3 b/deps/npm/man/man3/search.3 index 18006a5d94..3cb5b74fcb 100644 --- a/deps/npm/man/man3/search.3 +++ b/deps/npm/man/man3/search.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-SEARCH" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/shrinkwrap.3 b/deps/npm/man/man3/shrinkwrap.3 index 018ebebf27..9c3de75a98 100644 --- a/deps/npm/man/man3/shrinkwrap.3 +++ b/deps/npm/man/man3/shrinkwrap.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-SHRINKWRAP" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/start.3 b/deps/npm/man/man3/start.3 index c5ac3a6a45..d3afc9b2de 100644 --- a/deps/npm/man/man3/start.3 +++ b/deps/npm/man/man3/start.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-START" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/stop.3 b/deps/npm/man/man3/stop.3 index dece11a68c..1109eec8d7 100644 --- a/deps/npm/man/man3/stop.3 +++ b/deps/npm/man/man3/stop.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-STOP" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/submodule.3 b/deps/npm/man/man3/submodule.3 index 4e5d0e9a21..460f2435b7 100644 --- a/deps/npm/man/man3/submodule.3 +++ b/deps/npm/man/man3/submodule.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-SUBMODULE" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/tag.3 b/deps/npm/man/man3/tag.3 index e62c03a1b8..93191e1d4e 100644 --- a/deps/npm/man/man3/tag.3 +++ b/deps/npm/man/man3/tag.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-TAG" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/test.3 b/deps/npm/man/man3/test.3 index 7342c5f066..1fee32dccf 100644 --- a/deps/npm/man/man3/test.3 +++ b/deps/npm/man/man3/test.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-TEST" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/uninstall.3 b/deps/npm/man/man3/uninstall.3 index cf0b15b5b4..82e5f1f36e 100644 --- a/deps/npm/man/man3/uninstall.3 +++ b/deps/npm/man/man3/uninstall.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-UNINSTALL" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/unpublish.3 b/deps/npm/man/man3/unpublish.3 index 55ebc7fdf6..47ae167a26 100644 --- a/deps/npm/man/man3/unpublish.3 +++ b/deps/npm/man/man3/unpublish.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-UNPUBLISH" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/update.3 b/deps/npm/man/man3/update.3 index 7ad6eb998f..0d0666797a 100644 --- a/deps/npm/man/man3/update.3 +++ b/deps/npm/man/man3/update.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-UPDATE" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/version.3 b/deps/npm/man/man3/version.3 index 12cd7dad97..c4242764d4 100644 --- a/deps/npm/man/man3/version.3 +++ b/deps/npm/man/man3/version.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-VERSION" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/view.3 b/deps/npm/man/man3/view.3 index 39503bdc44..eb66113afd 100644 --- a/deps/npm/man/man3/view.3 +++ b/deps/npm/man/man3/view.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-VIEW" "3" "August 2012" "" "" diff --git a/deps/npm/man/man3/whoami.3 b/deps/npm/man/man3/whoami.3 index b9dd96fa4d..560f94d983 100644 --- a/deps/npm/man/man3/whoami.3 +++ b/deps/npm/man/man3/whoami.3 @@ -1,4 +1,4 @@ -.\" Generated with Ronnjs/v0.1 +.\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . .TH "NPM\-WHOAMI" "3" "August 2012" "" "" diff --git a/deps/npm/node_modules/couch-login/couch-login.js b/deps/npm/node_modules/couch-login/couch-login.js index ac159cb69f..cd7b12c143 100644 --- a/deps/npm/node_modules/couch-login/couch-login.js +++ b/deps/npm/node_modules/couch-login/couch-login.js @@ -20,6 +20,7 @@ function CouchLogin (couch, tok) { if (tok === 'anonymous') tok = NaN this.token = tok this.couch = url.format(couch) + this.proxy = null this.maxAge = YEAR } @@ -99,6 +100,9 @@ function makeReq (meth, body, f) { return function madeReq (p, d, cb) { if (this.token) { h.cookie = 'AuthSession=' + this.token.AuthSession } + if (this.proxy) { + req.proxy = this.proxy + } request(req, function (er, res, data) { // update cookie. diff --git a/deps/npm/node_modules/couch-login/package.json b/deps/npm/node_modules/couch-login/package.json index 9ec49ed46d..a485486a8f 100644 --- a/deps/npm/node_modules/couch-login/package.json +++ b/deps/npm/node_modules/couch-login/package.json @@ -6,7 +6,7 @@ }, "name": "couch-login", "description": "A module for doing logged-in requests to a couchdb server", - "version": "0.1.8", + "version": "0.1.9", "repository": { "type": "git", "url": "git://github.com/isaacs/couch-login.git" @@ -22,6 +22,6 @@ "tap": "~0.2.4" }, "readme": "# couch-login\n\nThis module lets you log into couchdb to get a session token, then make\nrequests using that session. It is basically just a thin wrapper around\n[@mikeal's request module](https://github.com/mikeal/request).\n\nThis is handy if you want a user to take actions in a couchdb database\non behalf of a user, without having to store their couchdb username and\npassword anywhere. (You do need to store the AuthSession token\nsomewhere, though.)\n\n## Usage\n\n```javascript\nvar CouchLogin = require('couch-login')\n\n// Nothing about this module is http-server specific of course.\n// You could also use it to do authenticated requests against\n// a couchdb using sessions and storing the token somewhere else.\n\nhttp.createServer(function (req, res) {\n var couch = new CouchLogin('http://my-couch.iriscouch.com:5984/')\n\n // .. look up the token in the user's session or whatever ..\n // Look at couch.decorate(req, res) for more on doing that\n // automatically, below.\n\n if (sessionToken) {\n // this user already logged in.\n couch.token = sessionToken\n\n // now we can do things on their behalf, like:\n // 1. View their session info.\n // like doing request.get({ uri: couch + '/_session', ... })\n // but with the cookie and whatnot\n\n couch.get('/_session', function (er, resp, data) {\n // er = some kind of communication error.\n // resp = response object from the couchdb request.\n // data = parsed JSON response body.\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // now we have the session info, we know who this user is.\n // hitting couchdb for this on every request is kinda costly,\n // so maybe you should store the username wherever you're storing\n // the sessionToken. RedSess is a good util for this, if you're\n // into redis. And if you're not into redis, you're crazy,\n // because it is awesome.\n\n // now let's get the user record.\n // note that this will 404 for anyone other than the user,\n // unless they're a server admin.\n couch.get('/_users/org.couchdb.user:' + data.userCtx.name, etc)\n\n // PUTs and DELETEs will also use their session, of course, so\n // your validate_doc_update's will see their info in userCtx\n })\n\n } else {\n // don't have a sessionToken.\n // get a username and password from the post body or something.\n // maybe redirect to a /login page or something to ask for that.\n var login = { name: name, password: password }\n couch.login(login, function (er, resp, data) {\n // again, er is an error, resp is the response obj, data is the json\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // the data is something like\n // {\"ok\":true,\"name\":\"testuser\",\"roles\":[]}\n // and couch.token is the token you'll need to save somewhere.\n\n // at this point, you can start making authenticated requests to\n // couchdb, or save data in their session, or do whatever it is\n // that you need to do.\n\n res.statusCode = 200\n res.write(\"Who's got two thumbs and just logged you into couch?\\n\")\n setTimeout(function () {\n res.end(\"THIS GUY!\")\n }, 500)\n })\n }\n})\n```\n\n## Class: CouchLogin\n### new CouchLogin(couchdbUrl, token)\n\nCreate a new CouchLogin object bound to the couchdb url.\n\nIn addition to these, the `get`, `post`, `put`, and `del` methods all\nproxy to the associated method on [request](https://github.com/mikeal/request).\n\nHowever, as you'll note in the example above, only the pathname portion\nof the url is required. Urls will be appended to the couchdb url passed\ninto the constructor.\n\nIf you have to talk to more than one couchdb, then you'll need more than\none CouchLogin object, for somewhat obvious reasons.\n\nAll callbacks get called with the following arguments, which are exactly\nidentical to the arguments passed to a `request` callback.\n\n* `er` {Error | null} Set if a communication error happens.\n* `resp` {HTTP Response} The response from the request to couchdb\n* `data` {Object} The parsed JSON data from couch\n\nIf the token is the string \"anonymous\", then it will not attempt to log\nin before making requests. If the token is not \"anonymous\", then it\nmust be an object with the appropriate fields.\n\n### couch.token\n\n* {Object}\n\nAn object representing the couchdb session token. (Basically just a\ncookie and a timeout.)\n\nIf the token has already timed out, then setting it will have no effect.\n\n### couch.tokenSet\n\nIf set, this method is called whenever the token is saved.\n\nFor example, you could assign a function to this method to save the\ntoken into a redis session, a cookie, or in some other database.\n\nTakes a callback which should be called when the token is saved.\n\n### couch.tokenGet\n\nIf set, this method is called to look up the token on demand.\n\nThe inverse of couch.tokenSet. Takes a callback which is called with\nthe `cb(er || null, token)`.\n\n### couch.tokenDel\n\nIf set, this method is called to delete the token when it should be\ndiscarded.\n\nRelated to tokenGet and tokenSet. Takes a callback which should be\ncalled when the token is deleted.\n\n### couch.anonymous()\n\nReturn a new CouchLogin object that points at the same couchdb server,\nbut doesn't try to log in before making requests.\n\nThis is handy for situations where the user is not logged in at the\nmoment, but a request needs to be made anyway, and does not require\nauthorization.\n\n### couch.login(auth, callback)\n\n* `auth` {Object} The login details\n * `name` {String}\n * `password` {String}\n* `callback` {Function}\n\nWhen the callback is called, the `couch.token` will already have been\nset (assuming it worked!), so subsequent requests will be done as that\nuser.\n\n### couch.get(path, callback)\n\nGET the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.del(path, callback)\n\nDELETE the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.post(path, data, callback)\n\nPOST the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.put(path, data, callback)\n\nPUT the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.changePass(newAuth, callback)\n\nMust already be logged in. Updates the `_users` document with new salt\nand hash, and re-logs in with the new credentials. Callback is called\nwith the same arguments as login, or the first step of the process that\nfailed.\n\n### couch.signup(userData, callback)\n\nCreate a new user account. The userData must contain at least a `name`\nand `password` field. Any additional data will be copied to the user\nrecord. The `_id`, `name`, `roles`, `type`, `password_sha`, `salt`, and\n`date` fields are generated.\n\nAlso signs in as the newly created user, on successful account creation.\n\n### couch.deleteAccount(name, callback)\n\nDeletes a user account. If not logged in as the user, or a server\nadmin, then the request will fail.\n\nNote that this immediately invalidates any session tokens for the\ndeleted user account. If you are deleting the user's record, then you\nought to follow this with `couch.logout(callback)` so that it won't try\nto re-use the invalid session.\n\n### couch.logout(callback)\n\nDelete the session out of couchdb. This makes the token permanently\ninvalid, and deletes it.\n\n### couch.decorate(req, res)\n\nSet up `req.couch` and `res.couch` as references to this couch login\ninstance.\n\nAdditionall, if `req.session` or `res.session` is set, then it'll call\n`session.get('couch_token', cb)` as the tokenGet method,\n`session.set('couch_token', token, cb)` as the tokenSet method, and\n`session.del('couch_token', cb)` as the tokenDel method.\n\nThis works really nice with\n[RedSess](https://github.com/isaacs/redsess).\n", - "_id": "couch-login@0.1.8", - "_from": "couch-login@~0.1.6" + "_id": "couch-login@0.1.9", + "_from": "couch-login@latest" } diff --git a/deps/npm/node_modules/glob/glob.js b/deps/npm/node_modules/glob/glob.js index 6285962a91..f58c4bbb34 100644 --- a/deps/npm/node_modules/glob/glob.js +++ b/deps/npm/node_modules/glob/glob.js @@ -178,7 +178,7 @@ Glob.prototype._finish = function () { if (this.nonull) { var literal = this.minimatch.globSet[i] if (nou) all.push(literal) - else nou[literal] = true + else all[literal] = true } } else { // had matches diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index e7415c2dd1..d2ab0125f9 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -6,7 +6,7 @@ }, "name": "glob", "description": "a little globber", - "version": "3.1.11", + "version": "3.1.12", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -30,6 +30,6 @@ }, "license": "BSD", "readme": "# Glob\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options]\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the statCache object is reused between glob calls.\n\nUsers are thus advised not to use a glob result as a\nguarantee of filesystem state in the face of rapid changes.\nFor the vast majority of operations, this is never a problem.\n", - "_id": "glob@3.1.11", + "_id": "glob@3.1.12", "_from": "glob@~3.1.9" } diff --git a/deps/npm/node_modules/ini/ini.js b/deps/npm/node_modules/ini/ini.js index e8a949f944..7939f20e5c 100644 --- a/deps/npm/node_modules/ini/ini.js +++ b/deps/npm/node_modules/ini/ini.js @@ -5,6 +5,8 @@ exports.stringify = exports.encode = encode exports.safe = safe exports.unsafe = unsafe +var eol = process.platform === "win32" ? "\r\n" : "\n" + function encode (obj, section) { var children = [] , out = "" @@ -14,18 +16,19 @@ function encode (obj, section) { if (val && typeof val === "object") { children.push(k) } else { - out += safe(k) + " = " + safe(val) + "\n" + out += safe(k) + " = " + safe(val) + eol } }) if (section && out.length) { - out = "[" + safe(section) + "]" + "\n" + out + out = "[" + safe(section) + "]" + eol + out } children.forEach(function (k, _, __) { - var child = encode(obj[k], (section ? section + "." : "") + k) + var nk = dotSplit(k).join('\\.') + var child = encode(obj[k], (section ? section + "." : "") + nk) if (out.length && child.length) { - out += "\n" + out += eol } out += child }) @@ -33,6 +36,15 @@ function encode (obj, section) { return out } +function dotSplit (str) { + return str.replace(/\1/g, '\2LITERAL\\1LITERAL\2') + .replace(/\\\./g, '\1') + .split(/\./).map(function (part) { + return part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\1') + }) +} + function decode (str) { var out = {} , p = out @@ -57,6 +69,11 @@ function decode (str) { } var key = unsafe(match[2]) , value = match[3] ? unsafe((match[4] || "")) : true + switch (value) { + case 'true': + case 'false': + case 'null': value = JSON.parse(value) + } p[key] = value }) @@ -66,15 +83,16 @@ function decode (str) { if (!out[k] || typeof out[k] !== "object") return false // see if the parent section is also an object. // if so, add it to that, and mark this one for deletion - var parts = k.split(".") + var parts = dotSplit(k) , p = out , l = parts.pop() + , nl = l.replace(/\\\./g, '.') parts.forEach(function (part, _, __) { if (!p[part] || typeof p[part] !== "object") p[part] = {} p = p[part] }) - if (p === out) return false - p[l] = out[k] + if (p === out && nl === l) return false + p[nl] = out[k] return true }).forEach(function (del, _, __) { delete out[del] diff --git a/deps/npm/node_modules/ini/package.json b/deps/npm/node_modules/ini/package.json index a022b598ff..1ab1488972 100644 --- a/deps/npm/node_modules/ini/package.json +++ b/deps/npm/node_modules/ini/package.json @@ -1,15 +1,19 @@ { - "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, "name": "ini", "description": "An ini encoder/decoder for node", - "version": "1.0.2", + "version": "1.0.4", "repository": { "type": "git", "url": "git://github.com/isaacs/ini.git" }, "main": "ini.js", "scripts": { - "test": "node ini.js" + "test": "tap test/*.js" }, "engines": { "node": "*" @@ -18,7 +22,7 @@ "devDependencies": { "tap": "~0.0.9" }, - "scripts": { - "test": "tap test/*.js" - } + "readme": "An ini format parser and serializer for node.\n\nSections are treated as nested objects. Items before the first heading\nare saved on the object directly.\n\n## Usage\n\nConsider an ini-file `config.ini` that looks like this:\n\n ; this comment is being ignored\n scope = global\n\n [database]\n user = dbuser\n password = dbpassword\n database = use_this_database\n\n [paths.default]\n datadir = /var/lib/data\n\nYou can read, manipulate and write the ini-file like so:\n\n var fs = require('fs')\n , ini = require('ini')\n\n var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))\n\n config.scope = 'local'\n config.database.database = 'use_another_database'\n config.paths.default.tmpdir = '/tmp'\n delete config.paths.default.datadir\n\n fs.writeFileSync('./config_modified.ini', ini.stringify(config, 'section'))\n\nThis will result in a file called `config_modified.ini` being written to the filesystem with the following content:\n\n [section]\n scope = local\n [section.database]\n user = dbuser\n password = dbpassword\n database = use_another_database\n [section.paths.default]\n tmpdir = /tmp\n\n## API\n\n### decode(inistring)\nDecode the ini-style formatted `inistring` into a nested object.\n\n### parse(inistring)\nAlias for `decode(inistring)`\n\n### encode(object, [section])\nEncode the object `object` into an ini-style formatted string. If the optional parameter `section` is given, then all top-level properties of the object are put into this section and the `section`-string is prepended to all sub-sections, see the usage example above.\n\n### stringify(object, [section])\nAlias for `encode(object, [section])`\n\n### safe(val)\nEscapes the string `val` such that it is safe to be used as a key or value in an ini-file. Basically escapes quotes. For example\n\n ini.safe('\"unsafe string\"')\n\nwould result in\n\n \"\\\"unsafe string\\\"\"\n\n### unsafe(val)\nUnescapes the string `val`\n\n", + "_id": "ini@1.0.4", + "_from": "ini@latest" } diff --git a/deps/npm/node_modules/ini/test/bar.js b/deps/npm/node_modules/ini/test/bar.js new file mode 100644 index 0000000000..cb16176efa --- /dev/null +++ b/deps/npm/node_modules/ini/test/bar.js @@ -0,0 +1,23 @@ +//test that parse(stringify(obj) deepEqu + +var ini = require('../') +var test = require('tap').test + +var data = { + 'number': {count: 10}, + 'string': {drink: 'white russian'}, + 'boolean': {isTrue: true}, + 'nested boolean': {theDude: {abides: true, rugCount: 1}} +} + + +test('parse(stringify(x)) deepEqual x', function (t) { + + for (var k in data) { + var s = ini.stringify(data[k]) + console.log(s, data[k]) + t.deepEqual(ini.parse(s), data[k]) + } + + t.end() +}) diff --git a/deps/npm/node_modules/ini/test/fixtures/foo.ini b/deps/npm/node_modules/ini/test/fixtures/foo.ini new file mode 100644 index 0000000000..e5b186604e --- /dev/null +++ b/deps/npm/node_modules/ini/test/fixtures/foo.ini @@ -0,0 +1,29 @@ +o = p + + a with spaces = b c + +; wrap in quotes to JSON-decode and preserve spaces +" xa n p " = "\"\r\nyoyoyo\r\r\n" + +; wrap in quotes to get a key with a bracket, not a section. +"[disturbing]" = hey you never know + +; a section +[a] +av = a val +e = { o: p, a: { av: a val, b: { c: { e: "this [value]" } } } } +j = "{ o: "p", a: { av: "a val", b: { c: { e: "this [value]" } } } }" +"[]" = a square? + +; nested child without middle parent +; should create otherwise-empty a.b +[a.b.c] +e = 1 +j = 2 + +; dots in the section name should be literally interpreted +[x\.y\.z] +x.y.z = xyz + +[x\.y\.z.a\.b\.c] +a.b.c = abc diff --git a/deps/npm/node_modules/ini/test/foo.js b/deps/npm/node_modules/ini/test/foo.js new file mode 100644 index 0000000000..2b32bb62f6 --- /dev/null +++ b/deps/npm/node_modules/ini/test/foo.js @@ -0,0 +1,59 @@ +var i = require("../") + , tap = require("tap") + , test = tap.test + , fs = require("fs") + , path = require("path") + , fixture = path.resolve(__dirname, "./fixtures/foo.ini") + , data = fs.readFileSync(fixture, "utf8") + , d + , expectE = 'o = p\n' + + 'a with spaces = b c\n' + + '" xa n p " = "\\"\\r\\nyoyoyo\\r\\r\\n"\n' + + '"[disturbing]" = hey you never know\n' + + '\n' + + '[a]\n' + + 'av = a val\n' + + 'e = { o: p, a: ' + + '{ av: a val, b: { c: { e: "this [value]" ' + + '} } } }\nj = "\\"{ o: \\"p\\", a: { av:' + + ' \\"a val\\", b: { c: { e: \\"this [value]' + + '\\" } } } }\\""\n"[]" = a square?\n\n[a.b.c]\ne = 1\n' + + 'j = 2\n\n[x\\.y\\.z]\nx.y.z = xyz\n\n' + + '[x\\.y\\.z.a\\.b\\.c]\n' + + 'a.b.c = abc\n' + , expectD = + { o: 'p', + 'a with spaces': 'b c', + " xa n p ":'"\r\nyoyoyo\r\r\n', + '[disturbing]': 'hey you never know', + a: + { av: 'a val', + e: '{ o: p, a: { av: a val, b: { c: { e: "this [value]" } } } }', + j: '"{ o: "p", a: { av: "a val", b: { c: { e: "this [value]" } } } }"', + "[]": "a square?", + b: { c: { e: '1', j: '2' } } }, + 'x.y.z': { + 'x.y.z': 'xyz', + 'a.b.c': { + 'a.b.c': 'abc' + } + } + } + +test("decode from file", function (t) { + var d = i.decode(data) + t.deepEqual(d, expectD) + t.end() +}) + +test("encode from data", function (t) { + var e = i.encode(expectD) + t.deepEqual(e, expectE) + + var obj = {log: { type:'file', level: {label:'debug', value:10} } } + e = i.encode(obj) + t.notEqual(e.slice(0, 1), '\n', 'Never a blank first line') + t.notEqual(e.slice(-2), '\n\n', 'Never a blank final line') + + t.end() +}) diff --git a/deps/npm/node_modules/lru-cache/README.md b/deps/npm/node_modules/lru-cache/README.md index 7033fea892..8ea0dd963d 100644 --- a/deps/npm/node_modules/lru-cache/README.md +++ b/deps/npm/node_modules/lru-cache/README.md @@ -2,32 +2,45 @@ A cache object that deletes the least-recently-used items. -Usage: +## Usage: - var LRU = require("lru-cache") - , cache = LRU(10, // max length. default = Infinity +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n) { return n * 2 } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size - // calculate how "big" each item is - // - // defaults to function(){return 1}, ie, just limit - // the item count, without any knowledge as to their - // relative size. - function (item) { return item.length }, +cache.set("key", "value") +cache.get("key") // "value" - // maxAge in ms - // defaults to infinite - // items are not pre-emptively pruned, but they - // are deleted when fetched if they're too old. - 1000 * 60) - - cache.set("key", "value") - cache.get("key") // "value" - - cache.reset() // empty the cache +cache.reset() // empty the cache +``` If you put more stuff in it, then items will fall out. If you try to put an oversized thing in it, then it'll fall out right away. -RTFS for more info. +## Options + +* `max` The maximum number of items. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n){return n.length}`. The default is + `function(n){return 1}`, which is fine if you want to store `n` + like-sized things. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. diff --git a/deps/npm/node_modules/lru-cache/lib/lru-cache.js b/deps/npm/node_modules/lru-cache/lib/lru-cache.js index 407ee6857c..27a9a5e93b 100644 --- a/deps/npm/node_modules/lru-cache/lib/lru-cache.js +++ b/deps/npm/node_modules/lru-cache/lib/lru-cache.js @@ -13,18 +13,32 @@ function hOP (obj, key) { function naiveLength () { return 1 } -function LRUCache (maxLength, lengthCalculator, maxAge) { +function LRUCache (options) { if (!(this instanceof LRUCache)) { - return new LRUCache(maxLength, lengthCalculator) + return new LRUCache(options) } + var max + if (typeof options === 'number') { + max = options + options = {max: max} + } + max = options.max + + if (!options) options = {} + + var lengthCalculator = options.length || naiveLength + if (typeof lengthCalculator !== "function") { lengthCalculator = naiveLength } - if (!maxLength || !(typeof maxLength === "number") || maxLength <= 0 ) { - maxLength = Infinity + if (!max || !(typeof max === "number") || max <= 0 ) { + max = Infinity } + var maxAge = options.maxAge || null + + var dispose = options.dispose var cache = {} // hash of items by key , lruList = {} // list of items in order of use recency @@ -34,16 +48,16 @@ function LRUCache (maxLength, lengthCalculator, maxAge) { , itemCount = 0 - // resize the cache when the maxLength changes. - Object.defineProperty(this, "maxLength", + // resize the cache when the max changes. + Object.defineProperty(this, "max", { set : function (mL) { if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity - maxLength = mL - // if it gets above double maxLength, trim right away. + max = mL + // if it gets above double max, trim right away. // otherwise, do it whenever it's convenient. - if (length > maxLength) trim() + if (length > max) trim() } - , get : function () { return maxLength } + , get : function () { return max } , enumerable : true }) @@ -65,7 +79,7 @@ function LRUCache (maxLength, lengthCalculator, maxAge) { }) } - if (length > maxLength) trim() + if (length > max) trim() } , get : function () { return lengthCalculator } , enumerable : true @@ -83,6 +97,11 @@ function LRUCache (maxLength, lengthCalculator, maxAge) { }) this.reset = function () { + if (dispose) { + Object.keys(cache).forEach(function (k) { + dispose(k, cache[k].value) + }) + } cache = {} lruList = {} lru = 0 @@ -99,29 +118,37 @@ function LRUCache (maxLength, lengthCalculator, maxAge) { this.set = function (key, value) { if (hOP(cache, key)) { - this.get(key) + // dispose of the old one before overwriting + if (dispose) dispose(key, cache[key].value) + if (maxAge) cache[key].now = Date.now() cache[key].value = value + this.get(key) return true } - var hit = {key:key, value:value, lu:mru++, length:lengthCalculator(value)} - if (maxAge) hit.now = Date.now() + var hit = { + key:key, + value:value, + lu:mru++, + length:lengthCalculator(value), + now: (maxAge) ? Date.now() : 0 + } // oversized objects fall out of cache automatically. - if (hit.length > maxLength) return false + if (hit.length > max) return false length += hit.length lruList[hit.lu] = cache[key] = hit itemCount ++ - if (length > maxLength) trim() + if (length > max) trim() return true } this.get = function (key) { if (!hOP(cache, key)) return var hit = cache[key] - if (maxAge && Date.now() - hit.now > maxAge) { + if (maxAge && (Date.now() - hit.now > maxAge)) { this.del(key) return } @@ -135,6 +162,7 @@ function LRUCache (maxLength, lengthCalculator, maxAge) { this.del = function (key) { if (!hOP(cache, key)) return var hit = cache[key] + if (dispose) dispose(key, hit.value) delete cache[key] delete lruList[hit.lu] if (hit.lu === lru) lruWalk() @@ -148,11 +176,13 @@ function LRUCache (maxLength, lengthCalculator, maxAge) { } function trim () { - if (length <= maxLength) return + if (length <= max) return var prune = Object.keys(lruList) - for (var i = 0; i < prune.length && length > maxLength; i ++) { - length -= lruList[prune[i]].length - delete cache[ lruList[prune[i]].key ] + for (var i = 0; i < prune.length && length > max; i ++) { + var hit = lruList[prune[i]] + if (dispose) dispose(hit.key, hit.value) + length -= hit.length + delete cache[ hit.key ] delete lruList[prune[i]] } diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json index 73c011b72e..e2457f720c 100644 --- a/deps/npm/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/lru-cache/package.json @@ -1,7 +1,7 @@ { "name": "lru-cache", "description": "A cache object that deletes the least-recently-used items.", - "version": "1.1.1", + "version": "2.0.1", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" @@ -47,7 +47,10 @@ "email": "marco.rogers@gmail.com" } ], - "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\nUsage:\n\n var LRU = require(\"lru-cache\")\n , cache = LRU(10, // max length. default = Infinity\n\n // calculate how \"big\" each item is\n //\n // defaults to function(){return 1}, ie, just limit\n // the item count, without any knowledge as to their\n // relative size.\n function (item) { return item.length },\n\n // maxAge in ms\n // defaults to infinite\n // items are not pre-emptively pruned, but they\n // are deleted when fetched if they're too old.\n 1000 * 60)\n\n cache.set(\"key\", \"value\")\n cache.get(\"key\") // \"value\"\n\n cache.reset() // empty the cache\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\nRTFS for more info.\n", - "_id": "lru-cache@1.1.1", - "_from": "lru-cache@~1.1.0" + "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum number of items. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n", + "_id": "lru-cache@2.0.1", + "dist": { + "shasum": "8cbbcca2f72b07e18510cb1451073cd4afab0826" + }, + "_from": "lru-cache@2.0.1" } diff --git a/deps/npm/node_modules/lru-cache/test/basic.js b/deps/npm/node_modules/lru-cache/test/basic.js index c5b25de8b4..d04af0bbcb 100644 --- a/deps/npm/node_modules/lru-cache/test/basic.js +++ b/deps/npm/node_modules/lru-cache/test/basic.js @@ -2,12 +2,12 @@ var test = require("tap").test , LRU = require("../") test("basic", function (t) { - var cache = new LRU(10) + var cache = new LRU({max: 10}) cache.set("key", "value") t.equal(cache.get("key"), "value") t.equal(cache.get("nada"), undefined) t.equal(cache.length, 1) - t.equal(cache.maxLength, 10) + t.equal(cache.max, 10) t.end() }) @@ -42,17 +42,17 @@ test("del", function (t) { t.end() }) -test("maxLength", function (t) { +test("max", function (t) { var cache = new LRU(3) - // test changing the maxLength, verify that the LRU items get dropped. - cache.maxLength = 100 + // test changing the max, verify that the LRU items get dropped. + cache.max = 100 for (var i = 0; i < 100; i ++) cache.set(i, i) t.equal(cache.length, 100) for (var i = 0; i < 100; i ++) { t.equal(cache.get(i), i) } - cache.maxLength = 3 + cache.max = 3 t.equal(cache.length, 3) for (var i = 0; i < 97; i ++) { t.equal(cache.get(i), undefined) @@ -61,15 +61,15 @@ test("maxLength", function (t) { t.equal(cache.get(i), i) } - // now remove the maxLength restriction, and try again. - cache.maxLength = "hello" + // now remove the max restriction, and try again. + cache.max = "hello" for (var i = 0; i < 100; i ++) cache.set(i, i) t.equal(cache.length, 100) for (var i = 0; i < 100; i ++) { t.equal(cache.get(i), i) } // should trigger an immediate resize - cache.maxLength = 3 + cache.max = 3 t.equal(cache.length, 3) for (var i = 0; i < 97; i ++) { t.equal(cache.get(i), undefined) @@ -86,7 +86,7 @@ test("reset", function (t) { cache.set("b", "B") cache.reset() t.equal(cache.length, 0) - t.equal(cache.maxLength, 10) + t.equal(cache.max, 10) t.equal(cache.get("a"), undefined) t.equal(cache.get("b"), undefined) t.end() @@ -119,20 +119,26 @@ test("dump", function (t) { test("basic with weighed length", function (t) { - var cache = new LRU(100, function (item) { return item.size } ) + var cache = new LRU({ + max: 100, + length: function (item) { return item.size } + }) cache.set("key", {val: "value", size: 50}) t.equal(cache.get("key").val, "value") t.equal(cache.get("nada"), undefined) t.equal(cache.lengthCalculator(cache.get("key")), 50) t.equal(cache.length, 50) - t.equal(cache.maxLength, 100) + t.equal(cache.max, 100) t.end() }) test("weighed length item too large", function (t) { - var cache = new LRU(10, function (item) { return item.size } ) - t.equal(cache.maxLength, 10) + var cache = new LRU({ + max: 10, + length: function (item) { return item.size } + }) + t.equal(cache.max, 10) // should fall out immediately cache.set("key", {val: "value", size: 50}) @@ -143,7 +149,10 @@ test("weighed length item too large", function (t) { }) test("least recently set with weighed length", function (t) { - var cache = new LRU(8, function (item) { return item.length }) + var cache = new LRU({ + max:8, + length: function (item) { return item.length } + }) cache.set("a", "A") cache.set("b", "BB") cache.set("c", "CCC") @@ -156,7 +165,10 @@ test("least recently set with weighed length", function (t) { }) test("lru recently gotten with weighed length", function (t) { - var cache = new LRU(8, function (item) { return item.length }) + var cache = new LRU({ + max: 8, + length: function (item) { return item.length } + }) cache.set("a", "A") cache.set("b", "BB") cache.set("c", "CCC") @@ -171,10 +183,14 @@ test("lru recently gotten with weighed length", function (t) { }) test("set returns proper booleans", function(t) { - var cache = new LRU(5, function (item) { return item.length }) + var cache = new LRU({ + max: 5, + length: function (item) { return item.length } + }) + t.equal(cache.set("a", "A"), true) - // should return false for maxLength exceeded + // should return false for max exceeded t.equal(cache.set("b", "donuts"), false) t.equal(cache.set("b", "B"), true) @@ -183,7 +199,10 @@ test("set returns proper booleans", function(t) { }) test("drop the old items", function(t) { - var cache = new LRU(5, null, 50) + var cache = new LRU({ + max: 5, + maxAge: 50 + }) cache.set("a", "A") @@ -196,7 +215,7 @@ test("drop the old items", function(t) { cache.set("c", "C") // timed out t.notOk(cache.get("a")) - }, 51) + }, 60) setTimeout(function () { t.notOk(cache.get("b")) @@ -208,3 +227,22 @@ test("drop the old items", function(t) { t.end() }, 155) }) + +test("disposal function", function(t) { + var disposed = false + var cache = new LRU({ + max: 1, + dispose: function (k, n) { + disposed = n + } + }) + + cache.set(1, 1) + cache.set(2, 2) + t.equal(disposed, 1) + cache.set(3, 3) + t.equal(disposed, 2) + cache.reset() + t.equal(disposed, 3) + t.end() +}) diff --git a/deps/npm/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/minimatch/minimatch.js index 00873594b5..a2221ee10d 100644 --- a/deps/npm/node_modules/minimatch/minimatch.js +++ b/deps/npm/node_modules/minimatch/minimatch.js @@ -30,7 +30,7 @@ if (!require) { minimatch.Minimatch = Minimatch var LRU = require("lru-cache") - , cache = minimatch.cache = new LRU(100) + , cache = minimatch.cache = new LRU({max: 100}) , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var path = require("path") diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json index 2f24186031..6f182773d5 100644 --- a/deps/npm/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/minimatch/package.json @@ -6,7 +6,7 @@ }, "name": "minimatch", "description": "a glob matcher in javascript", - "version": "0.2.5", + "version": "0.2.6", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" @@ -19,26 +19,16 @@ "node": "*" }, "dependencies": { - "lru-cache": "~1" + "lru-cache": "~2.0.0" }, "devDependencies": { "tap": "" }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" - } - ], - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" + "license": { + "type": "MIT", + "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" }, - "_id": "minimatch@0.2.5", - "optionalDependencies": {}, - "_engineSupported": true, - "_npmVersion": "1.1.25", - "_nodeVersion": "v0.7.10-pre", - "_defaultsLoaded": true, + "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n", + "_id": "minimatch@0.2.6", "_from": "minimatch@~0.2" } diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi new file mode 100644 index 0000000000..89e71c0c50 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/addon.gypi @@ -0,0 +1,24 @@ +{ + 'target_defaults': { + 'type': 'loadable_module', + 'product_extension': 'node', + 'product_prefix': '', + 'include_dirs': [ + '<(node_root_dir)/src', + '<(node_root_dir)/deps/uv/include', + '<(node_root_dir)/deps/v8/include' + ], + + 'conditions': [ + [ 'OS=="mac"', { + 'libraries': [ '-undefined dynamic_lookup' ], + }], + [ 'OS=="win"', { + 'libraries': [ '-l<(node_root_dir)/$(Configuration)/node.lib' ], + }], + [ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux" and target_arch!="ia32")', { + 'cflags': [ '-fPIC' ], + }] + ] + } +} diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js index fcd8d7149f..2e1ac504e3 100644 --- a/deps/npm/node_modules/node-gyp/lib/configure.js +++ b/deps/npm/node_modules/node-gyp/lib/configure.js @@ -13,11 +13,10 @@ var fs = require('graceful-fs') , which = require('which') , semver = require('semver') , mkdirp = require('mkdirp') - , exec = require('child_process').exec - , spawn = require('child_process').spawn + , cp = require('child_process') + , exec = cp.exec + , spawn = cp.spawn , win = process.platform == 'win32' - , hasVCExpress = false - , hasWin71SDK = false exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module' @@ -25,6 +24,8 @@ function configure (gyp, argv, callback) { var python = process.env.PYTHON || gyp.opts.python || 'python' , buildDir = path.resolve('build') + , hasVCExpress = false + , hasWin71SDK = false , configPath , nodeDir @@ -38,28 +39,30 @@ function configure (gyp, argv, callback) { checkPython() } }) - } else + } else { checkPython() + } - // Make sure that Python is in the $PATH + // Check if Python is in the $PATH function checkPython () { log.verbose('check python', 'checking for Python executable "%s" in the PATH', python) which(python, function (err, execPath) { if (err) { + log.verbose('`which` failed for `%s`', python, err) if (win) { guessPython() } else { failNoPython() } - return + } else { + log.verbose('`which` succeeded for `%s`', python, execPath) + checkPythonVersion() } - log.verbose('`which` succeeded for `' + python + '`', execPath) - checkPythonVersion() }) } // Called on Windows when "python" isn't available in the current $PATH. - // We're gonna glob C:\python2* + // We're gonna check if "%SystemDrive%\python27\python.exe" exists. function guessPython () { log.verbose('could not find "' + python + '". guessing location') var rootDir = process.env.SystemDrive || 'C:\\' @@ -273,22 +276,19 @@ function configure (gyp, argv, callback) { var prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step' , json = JSON.stringify(config, boolsToString, 2) log.verbose(configFilename, 'writing out config file: %s', configPath) - fs.writeFile(configPath, [prefix, json, ''].join('\n'), runGypAddon) + fs.writeFile(configPath, [prefix, json, ''].join('\n'), runGyp) } - function runGypAddon (err) { + function runGyp (err) { if (err) return callback(err) - // location of the `gyp_addon` python script for the target nodedir - var gyp_addon = path.resolve(nodeDir, 'tools', 'gyp_addon') - if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) { if (win) { - log.verbose('gyp_addon', 'gyp format was not specified; forcing "msvs"') + log.verbose('gyp', 'gyp format was not specified; forcing "msvs"') // force the 'make' target for non-Windows argv.push('-f', 'msvs') } else { - log.verbose('gyp_addon', 'gyp format was not specified; forcing "make"') + log.verbose('gyp', 'gyp format was not specified; forcing "make"') // force the 'make' target for non-Windows argv.push('-f', 'make') } @@ -309,25 +309,49 @@ function configure (gyp, argv, callback) { } // include the "config.gypi" file that was generated - argv.unshift('-I' + configPath) + argv.push('-I', configPath) + + // this logic ported from the old `gyp_addon` python file + var gyp_script = path.resolve(nodeDir, 'tools', 'gyp', 'gyp') + var addon_gypi = path.resolve(__dirname, '..', 'addon.gypi') + var common_gypi = path.resolve(nodeDir, 'common.gypi') + var output_dir = 'build' + if (win) { + // Windows expects an absolute path + output_dir = buildDir + } + + argv.push('-I', addon_gypi) + argv.push('-I', common_gypi) + argv.push('-Dlibrary=shared_library') + argv.push('-Dvisibility=default') + argv.push('-Dnode_root_dir=' + nodeDir) + argv.push('-Dmodule_root_dir=' + process.cwd()) + argv.push('--depth=.'); + + // tell gyp to write the Makefile/Solution files into output_dir + argv.push('--generator-output', output_dir) + + // tell make to write its output into the same dir + argv.push('-Goutput_dir=.') // enforce use of the "binding.gyp" file argv.unshift('binding.gyp') - // execute `gyp_addon` from the current target nodedir - argv.unshift(gyp_addon) + // execute `gyp` from the current target nodedir + argv.unshift(gyp_script) var cp = gyp.spawn(python, argv) cp.on('exit', onCpExit) } /** - * Called when the `gyp_addon` child process exits. + * Called when the `gyp` child process exits. */ function onCpExit (code, signal) { if (code !== 0) { - callback(new Error('`gyp_addon` failed with exit code: ' + code)) + callback(new Error('`gyp` failed with exit code: ' + code)) } else { // we're done callback() diff --git a/deps/npm/node_modules/node-gyp/lib/install.js b/deps/npm/node_modules/node-gyp/lib/install.js index a23735f076..f90b0fd091 100644 --- a/deps/npm/node_modules/node-gyp/lib/install.js +++ b/deps/npm/node_modules/node-gyp/lib/install.js @@ -116,6 +116,7 @@ function install (gyp, argv, callback) { function download (url) { log.http('GET', url) + var req = null var requestOpts = { uri: url } @@ -126,13 +127,25 @@ function install (gyp, argv, callback) { || process.env.HTTP_PROXY || process.env.npm_config_proxy if (proxyUrl) { - log.verbose('proxy', proxyUrl) - requestOpts.proxy = proxyUrl + if (/^https?:\/\//i.test(proxyUrl)) { + log.verbose('download', 'using proxy url: "%s"', proxyUrl) + requestOpts.proxy = proxyUrl + } else { + log.warn('download', 'ignoring invalid "proxy" config setting: "%s"', proxyUrl) + } + } + try { + // The "request" constructor can throw sometimes apparently :( + // See: https://github.com/TooTallNate/node-gyp/issues/114 + req = request(requestOpts) + } catch (e) { + cb(e) + } + if (req) { + req.on('response', function (res) { + log.http(res.statusCode, url) + }) } - var req = request(requestOpts) - req.on('response', function (res) { - log.http(res.statusCode, url) - }) return req } @@ -201,6 +214,7 @@ function install (gyp, argv, callback) { // download the tarball, gunzip and extract! var req = download(tarballUrl) + if (!req) return // something went wrong downloading the tarball? req.on('error', function (err) { @@ -307,6 +321,7 @@ function install (gyp, argv, callback) { log.verbose('streaming 32-bit node.lib to:', nodeLibPath32) var req = download(nodeLibUrl32) + if (!req) return req.on('error', done) req.on('response', function (res) { if (res.statusCode !== 200) { @@ -327,6 +342,7 @@ function install (gyp, argv, callback) { log.verbose('streaming 64-bit node.lib to:', nodeLibPath64) var req = download(nodeLibUrl64) + if (!req) return req.on('error', done) req.on('response', function (res) { if (res.statusCode !== 200) { diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index c2db8f8e7a..7fa75a8985 100644 --- a/deps/npm/node_modules/node-gyp/package.json +++ b/deps/npm/node_modules/node-gyp/package.json @@ -10,7 +10,7 @@ "bindings", "gyp" ], - "version": "0.6.3", + "version": "0.6.5", "installVersion": 9, "author": { "name": "Nathan Rajlich", @@ -45,6 +45,6 @@ "node": ">= 0.6.0" }, "readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js, which takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.6`, `0.7`,..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n * On Unix:\n * `python`\n * `make`\n * A proper C/C++ compiler toolchain, like GCC\n * On Windows:\n * [Python][windows-python] ([`v2.7.2`][windows-python-v2.7.2] recommended, `v3.x.x` not yet supported)\n * Microsoft Visual C++ ([Express][msvc] version works well)\n * For 64-bit builds of node and native modules you will _also_ need the [Windows 7 64-bit SDK][win7sdk]\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` json\n{\n \"targets\": [\n {\n \"target_name\": \"binding\",\n \"sources\": [ \"src/binding.cc\" ]\n }\n ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n| **Command** | **Description**\n|:--------------|:---------------------------------------------------------------\n| `build` | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean` | Removes any the `build` dir if it exists\n| `configure` | Generates project build files for the current platform\n| `rebuild` | Runs \"clean\", \"configure\" and \"build\" all in a row\n| `install` | Installs node development header files for the given version\n| `list` | Lists the currently installed node development file versions\n| `remove` | Removes the node development header files for the given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.2]: http://www.python.org/download/releases/2.7.2#download\n[msvc]: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express\n[win7sdk]: http://www.microsoft.com/download/en/details.aspx?displayLang=en&id=8279\n", - "_id": "node-gyp@0.6.3", - "_from": "node-gyp@~0.6.1" + "_id": "node-gyp@0.6.5", + "_from": "node-gyp@~0.6.4" } diff --git a/deps/npm/node_modules/node-gyp/updateLegacy.sh b/deps/npm/node_modules/node-gyp/updateLegacy.sh deleted file mode 100755 index 941c699edd..0000000000 --- a/deps/npm/node_modules/node-gyp/updateLegacy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh - -cp -fpv ~/node/common.gypi legacy/ -cp -fpv ~/node/tools/addon.gypi legacy/tools/ -cp -fpv ~/node/tools/gyp_addon legacy/tools/ -cp -rfpv ~/node/tools/gyp legacy/tools/ - -# we don't care about gyp's test suite and it's rather big... -rm -rf legacy/tools/gyp/test diff --git a/deps/npm/node_modules/npm-registry-client/index.js b/deps/npm/node_modules/npm-registry-client/index.js index c7bc21efcb..377f787f4e 100644 --- a/deps/npm/node_modules/npm-registry-client/index.js +++ b/deps/npm/node_modules/npm-registry-client/index.js @@ -68,6 +68,7 @@ function RegClient (options) { // session, and use that. this.token = options.token this.couchLogin = new CouchLogin(this.registry, this.token) + this.couchLogin.proxy = this.proxy } this.email = options.email || null diff --git a/deps/npm/node_modules/npm-registry-client/lib/publish.js b/deps/npm/node_modules/npm-registry-client/lib/publish.js index a6de802105..11aa599e61 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/publish.js +++ b/deps/npm/node_modules/npm-registry-client/lib/publish.js @@ -4,8 +4,7 @@ module.exports = publish var path = require("path") , url = require("url") -function publish (data, tarball, readme, cb) { - if (typeof cb !== "function") cb = readme, readme = "" +function publish (data, tarball, cb) { if (!this.email || !this.auth || !this.username) { return cb(new Error("auth and email required for publishing")) @@ -18,15 +17,13 @@ function publish (data, tarball, readme, cb) { // PUT the data to {config.registry}/{data.name}/{data.version} var registry = this.registry - readme = readme ? "" + readme : "" - var fullData = { _id : data.name , name : data.name , description : data.description , "dist-tags" : {} , versions : {} - , readme: readme + , readme: data.readme || "" , maintainers : [ { name : this.username , email : this.email @@ -72,12 +69,6 @@ function publish (data, tarball, readme, cb) { var exists = fullData.versions && fullData.versions[data.version] if (exists) return cb(conflictError.call(this, data._id)) - // this way, it'll also get attached to packages that were previously - // published with a version of npm that lacked this feature. - if (!fullData.readme) { - data.readme = readme - } - this.request("PUT", dataURI, data, function (er) { if (er) { if (er.message.indexOf("conflict Document update conflict.") === 0) { diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index e2fe677dab..709027af4c 100644 --- a/deps/npm/node_modules/npm-registry-client/package.json +++ b/deps/npm/node_modules/npm-registry-client/package.json @@ -6,7 +6,7 @@ }, "name": "npm-registry-client", "description": "Client for the npm registry", - "version": "0.1.2", + "version": "0.1.4", "repository": { "url": "git://github.com/isaacs/npm-registry-client" }, @@ -35,6 +35,6 @@ }, "license": "BSD", "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(options)\n\nclient.get(\"npm\", \"latest\", 1000, function (er, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Options\n\n* `registry` **Required** {String} URL to the registry\n* `cache` **Required** {String} Path to the cache folder\n* `alwaysAuth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `strictSSL` {Boolean} Whether or not to be strict with SSL\n certificates. Default = `true`\n* `userAgent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `retries` {Number} Number of times to retry on GET failures.\n Default=2\n* `retryFactor` {Number} `factor` setting for `node-retry`. Default=10\n* `retryMinTimeout` {Number} `minTimeout` setting for `node-retry`.\n Default=10000 (10 seconds)\n* `retryMaxTimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default=60000 (60 seconds)\n\n# client.request(method, where, [what], [etag], [nofollow], cb)\n\n* `method` {String} HTTP method\n* `where` {String} Path to request on the server\n* `what` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON.\n* `etag` {String} The cached ETag\n* `nofollow` {Boolean} Prevent following 302/301 responses\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a request to the registry. All the other methods are wrappers\naround this. one.\n\n# client.adduser(username, password, email, cb)\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.get(url, [timeout], [nofollow], [staleOk], cb)\n\n* `url` {String} The url path to fetch\n* `timeout` {Number} Number of seconds old that a cached copy must be\n before a new request will be made.\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `staleOk` {Boolean} If there's cached data available, then return that\n to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in\nthe cache folder with the ETag.\n\n# client.publish(data, tarball, [readme], cb)\n\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `readme` {String} Contents of the README markdown file\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it\ncan accept a gzipped tar stream or a filename to a tarball.\n\n# client.star(package, starred, cb)\n\n* `package` {String} Name of the package to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or\nunstar a package, though other writes do require that the user be the\npackage owner.\n\n# client.tag(project, version, tag, cb)\n\n* `project` {String} Project name\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag`\nwill fetch the specified version.\n\n# client.unpublish(name, [ver], cb)\n\n* `name` {String} package name\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When\nthe last version us unpublished, the entire document is removed from the\ndatabase.\n\n# client.upload(where, file, [etag], [nofollow], cb)\n\n* `where` {String} URL path to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment. Mostly used by `client.publish()`.\n", - "_id": "npm-registry-client@0.1.2", - "_from": "npm-registry-client@0" + "_id": "npm-registry-client@0.1.4", + "_from": "npm-registry-client@latest" } diff --git a/deps/npm/node_modules/npmconf/.npmignore b/deps/npm/node_modules/npmconf/.npmignore new file mode 100644 index 0000000000..baa471ca80 --- /dev/null +++ b/deps/npm/node_modules/npmconf/.npmignore @@ -0,0 +1 @@ +/test/fixtures/userconfig-with-gc diff --git a/deps/npm/node_modules/npmconf/README.md b/deps/npm/node_modules/npmconf/README.md new file mode 100644 index 0000000000..afc995d1af --- /dev/null +++ b/deps/npm/node_modules/npmconf/README.md @@ -0,0 +1,33 @@ +# npmconf + +The config thing npm uses + +If you are interested in interacting with the config settings that npm +uses, then use this module. + +However, if you are writing a new Node.js program, and want +configuration functionality similar to what npm has, but for your +own thing, then I'd recommend using [rc](https://github.com/dominictarr/rc), +which is probably what you want. + +If I were to do it all over again, that's what I'd do for npm. But, +alas, there are many systems depending on many of the particulars of +npm's configuration setup, so it's not worth the cost of changing. + +## USAGE + +```javascript +var npmconf = require('npmconf') + +// pass in the cli options that you read from the cli +// or whatever top-level configs you want npm to use for now. +npmconf.load({some:'configs'}, function (er, conf) { + // do stuff with conf + conf.get('some', 'cli') // 'configs' + conf.get('username') // 'joebobwhatevers' + conf.set('foo', 'bar', 'user') + conf.save('user', function (er) { + // foo = bar is now saved to ~/.npmrc or wherever + }) +}) +``` diff --git a/deps/npm/lib/utils/config-defs.js b/deps/npm/node_modules/npmconf/config-defs.js index 763f5b7312..32c13d5209 100644 --- a/deps/npm/lib/utils/config-defs.js +++ b/deps/npm/node_modules/npmconf/config-defs.js @@ -7,10 +7,18 @@ var path = require("path") , semver = require("semver") , stableFamily = semver.parse(process.version) , nopt = require("nopt") - , log = require("npmlog") - , npm = require("../npm.js") , osenv = require("osenv") +try { + var log = require("npmlog") +} catch (er) { + var util = require('util') + var log = { warn: function (m) { + console.warn(m + util.format.apply(util, [].slice.call(arguments, 1))) + } } +} + +exports.Octal = Octal function Octal () {} function validateOctal (data, k, val) { // must be either an integer or an octal string. @@ -176,7 +184,7 @@ Object.defineProperty(exports, "defaults", {get: function () { , proxy : process.env.HTTP_PROXY || process.env.http_proxy || null , "https-proxy" : process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy || null - , "user-agent" : "npm/" + npm.version + " node/" + process.version + , "user-agent" : "node/" + process.version , "rebuild-bundle" : true , registry : "https://registry.npmjs.org/" , rollback : true diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore b/deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore new file mode 100644 index 0000000000..13abef4f58 --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE b/deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE new file mode 100644 index 0000000000..171dd97005 --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/index.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/index.js new file mode 100644 index 0000000000..59dabf216b --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/index.js @@ -0,0 +1,282 @@ + +var ProtoList = require('proto-list') + , path = require('path') + , fs = require('fs') + , ini = require('ini') + , EE = require('events').EventEmitter + , url = require('url') + , http = require('http') + +var exports = module.exports = function () { + var args = [].slice.call(arguments) + , conf = new ConfigChain() + + while(args.length) { + var a = args.shift() + if(a) conf.push + ( 'string' === typeof a + ? json(a) + : a ) + } + + return conf +} + +//recursively find a file... + +var find = exports.find = function () { + var rel = path.join.apply(null, [].slice.call(arguments)) + + function find(start, rel) { + var file = path.join(start, rel) + try { + fs.statSync(file) + return file + } catch (err) { + if(start != '/') + return find(path.dirname(start), rel) + } + } + return find(__dirname, rel) +} + +var parse = exports.parse = function (content, file, type) { + content = '' + content + // if we don't know what it is, try json and fall back to ini + // if we know what it is, then it must be that. + if (!type) { + try { return JSON.parse(content) } + catch (er) { return ini.parse(content) } + } if (type === 'json') { + if (this.emit) { + try { return JSON.parse(content) } + catch (er) { this.emit('error', er) } + } else { + return JSON.parse(content) + } + } else { + return ini.parse(content) + } +} + +var json = exports.json = function () { + var file = path.join.apply(null, [].slice.call(arguments)) + var content + try { + content = fs.readFileSync(file,'utf-8') + } catch (err) { + return + } + return parse(content, file, 'json') +} + +var env = exports.env = function (prefix, env) { + env = env || process.env + var obj = {} + var l = prefix.length + for(var k in env) { + if((i =k.indexOf(prefix)) === 0) + obj[k.substring(l)] = env[k] + } + + return obj +} + +exports.ConfigChain = ConfigChain +function ConfigChain () { + EE.apply(this) + ProtoList.apply(this, arguments) + this._awaiting = 0 + this._saving = 0 + this.sources = {} +} + +// multi-inheritance-ish +var extras = { + constructor: { value: ConfigChain } +} +Object.keys(EE.prototype).forEach(function (k) { + extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k) +}) +ConfigChain.prototype = Object.create(ProtoList.prototype, extras) + +ConfigChain.prototype.del = function (key, where) { + // if not specified where, then delete from the whole chain, scorched + // earth style + if (where) { + var target = this.sources[where] + target = target && target.data + if (!target) { + return this.emit('error', new Error('not found '+where)) + } + delete target[key] + } else { + for (var i = 0, l = this.list.length; i < l; i ++) { + delete this.list[i][key] + } + } + return this +} + +ConfigChain.prototype.set = function (key, value, where) { + var target + + if (where) { + target = this.sources[where] + target = target && target.data + if (!target) { + return this.emit('error', new Error('not found '+where)) + } + } else { + target = this.list[0] + if (!target) { + return this.emit('error', new Error('cannot set, no confs!')) + } + } + target[key] = value + return this +} + +ConfigChain.prototype.get = function (key, where) { + if (where) { + where = this.sources[where] + if (where) where = where.data + if (where && where.hasOwnProperty(key)) return where[key] + return undefined + } + return this.list[0][key] +} + +ConfigChain.prototype.save = function (where, type, cb) { + if (typeof type === 'function') cb = type, type = null + var target = this.sources[where] + if (!target || !(target.path || target.source) || !target.data) { + // TODO: maybe save() to a url target could be a PUT or something? + // would be easy to swap out with a reddis type thing, too + return this.emit('error', new Error('bad save target: '+where)) + } + + if (target.source) { + var pref = target.prefix || '' + Object.keys(target.data).forEach(function (k) { + target.source[pref + k] = target.data[k] + }) + return this + } + + var type = type || target.type + var data = target.data + if (target.type === 'json') { + data = JSON.stringify(data) + } else { + data = ini.stringify(data) + } + + this._saving ++ + fs.writeFile(target.path, data, 'utf8', function (er) { + this._saving -- + if (er) { + if (cb) return cb(er) + else return this.emit('error', er) + } + if (this._saving === 0) { + if (cb) cb() + this.emit('save') + } + }.bind(this)) + return this +} + +ConfigChain.prototype.addFile = function (file, type, name) { + name = name || file + var marker = {__source__:name} + this.sources[name] = { path: file, type: type } + this.push(marker) + this._await() + fs.readFile(file, 'utf8', function (er, data) { + if (er) this.emit('error', er) + this.addString(data, file, type, marker) + }.bind(this)) + return this +} + +ConfigChain.prototype.addEnv = function (prefix, env, name) { + name = name || 'env' + var data = exports.env(prefix, env) + this.sources[name] = { data: data, source: env, prefix: prefix } + return this.add(data, name) +} + +ConfigChain.prototype.addUrl = function (req, type, name) { + this._await() + var href = url.format(req) + name = name || href + var marker = {__source__:name} + this.sources[name] = { href: href, type: type } + this.push(marker) + http.request(req, function (res) { + var c = [] + var ct = res.headers['content-type'] + if (!type) { + type = ct.indexOf('json') !== -1 ? 'json' + : ct.indexOf('ini') !== -1 ? 'ini' + : href.match(/\.json$/) ? 'json' + : href.match(/\.ini$/) ? 'ini' + : null + marker.type = type + } + + res.on('data', c.push.bind(c)) + .on('end', function () { + this.addString(Buffer.concat(c), href, type, marker) + }.bind(this)) + .on('error', this.emit.bind(this, 'error')) + + }.bind(this)) + .on('error', this.emit.bind(this, 'error')) + .end() + + return this +} + +ConfigChain.prototype.addString = function (data, file, type, marker) { + data = this.parse(data, file, type) + this.add(data, marker) + return this +} + +ConfigChain.prototype.add = function (data, marker) { + if (marker && typeof marker === 'object') { + var i = this.list.indexOf(marker) + if (i === -1) { + return this.emit('error', new Error('bad marker')) + } + this.splice(i, 1, data) + marker = marker.__source__ + this.sources[marker] = this.sources[marker] || {} + this.sources[marker].data = data + // we were waiting for this. maybe emit 'load' + this._resolve() + } else { + if (typeof marker === 'string') { + this.sources[marker] = this.sources[marker] || {} + this.sources[marker].data = data + } + // trigger the load event if nothing was already going to do so. + this._await() + this.push(data) + process.nextTick(this._resolve.bind(this)) + } + return this +} + +ConfigChain.prototype.parse = exports.parse + +ConfigChain.prototype._await = function () { + this._awaiting++ +} + +ConfigChain.prototype._resolve = function () { + this._awaiting-- + if (this._awaiting === 0) this.emit('load', this) +} diff --git a/deps/npm/node_modules/proto-list/LICENSE b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE index 05a4010949..05a4010949 100644 --- a/deps/npm/node_modules/proto-list/LICENSE +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE diff --git a/deps/npm/node_modules/proto-list/README.md b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md index 43cfa35893..43cfa35893 100644 --- a/deps/npm/node_modules/proto-list/README.md +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json new file mode 100644 index 0000000000..98ff78d202 --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json @@ -0,0 +1,28 @@ +{ + "name": "proto-list", + "version": "1.2.2", + "description": "A utility for managing a prototype chain", + "main": "./proto-list.js", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/isaacs/proto-list" + }, + "license": { + "type": "MIT", + "url": "https://github.com/isaacs/proto-list/blob/master/LICENSE" + }, + "devDependencies": { + "tap": "0" + }, + "readme": "A list of objects, bound by their prototype chain.\n\nUsed in npm's config stuff.\n", + "_id": "proto-list@1.2.2", + "_from": "proto-list@~1.2.1" +} diff --git a/deps/npm/node_modules/proto-list/proto-list.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js index 759d827382..67d250387c 100644 --- a/deps/npm/node_modules/proto-list/proto-list.js +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js @@ -1,7 +1,22 @@ module.exports = ProtoList -function ProtoList () { this.list = [] } +function ProtoList () { + this.list = [] + var root = null + Object.defineProperty(this, 'root', { + get: function () { return root }, + set: function (r) { + root = r + if (this.list.length) { + this.list[this.list.length - 1].__proto__ = r + } + }, + enumerable: true, + configurable: true + }) +} + ProtoList.prototype = { get length () { return this.list.length } , get keys () { @@ -14,27 +29,30 @@ ProtoList.prototype = this.keys.forEach(function (k) { o[k] = this.get(k) }, this) return o } + , get store () { + return this.list[0] + } , push : function (obj) { if (typeof obj !== "object") obj = {valueOf:obj} if (this.list.length >= 1) { this.list[this.list.length - 1].__proto__ = obj } - obj.__proto__ = Object.prototype + obj.__proto__ = this.root return this.list.push(obj) } , pop : function () { if (this.list.length >= 2) { - this.list[this.list.length - 2].__proto__ = Object.prototype + this.list[this.list.length - 2].__proto__ = this.root } return this.list.pop() } , unshift : function (obj) { - obj.__proto__ = this.list[0] || Object.prototype + obj.__proto__ = this.list[0] || this.root return this.list.unshift(obj) } , shift : function () { - if (this.list.length >= 1) { - this.list[0].__proto__ = Object.prototype + if (this.list.length === 1) { + this.list[0].__proto__ = this.root } return this.list.shift() } @@ -53,42 +71,11 @@ ProtoList.prototype = return this.list.slice.apply(this.list, arguments) } , splice : function () { - return this.list.splice.apply(this.list, arguments) + // handle injections + var ret = this.list.splice.apply(this.list, arguments) + for (var i = 0, l = this.list.length; i < l; i++) { + this.list[i].__proto__ = this.list[i + 1] || this.root + } + return ret } } - -if (module === require.main) { - -var tap = require("tap") - , test = tap.test - -tap.plan(1) - -tap.test("protoList tests", function (t) { - var p = new ProtoList - p.push({foo:"bar"}) - p.push({}) - p.set("foo", "baz") - t.equal(p.get("foo"), "baz") - - var p = new ProtoList - p.push({foo:"bar"}) - p.set("foo", "baz") - t.equal(p.get("foo"), "baz") - t.equal(p.length, 1) - p.pop() - t.equal(p.length, 0) - p.set("foo", "asdf") - t.equal(p.length, 1) - t.equal(p.get("foo"), "asdf") - p.push({bar:"baz"}) - t.equal(p.length, 2) - t.equal(p.get("foo"), "asdf") - p.shift() - t.equal(p.length, 1) - t.equal(p.get("foo"), undefined) - t.end() -}) - - -} diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js new file mode 100644 index 0000000000..5cd66bef15 --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js @@ -0,0 +1,61 @@ +var tap = require("tap") + , test = tap.test + , ProtoList = require("../proto-list.js") + +tap.plan(1) + +tap.test("protoList tests", function (t) { + var p = new ProtoList + p.push({foo:"bar"}) + p.push({}) + p.set("foo", "baz") + t.equal(p.get("foo"), "baz") + + var p = new ProtoList + p.push({foo:"bar"}) + p.set("foo", "baz") + t.equal(p.get("foo"), "baz") + t.equal(p.length, 1) + p.pop() + t.equal(p.length, 0) + p.set("foo", "asdf") + t.equal(p.length, 1) + t.equal(p.get("foo"), "asdf") + p.push({bar:"baz"}) + t.equal(p.length, 2) + t.equal(p.get("foo"), "asdf") + p.shift() + t.equal(p.length, 1) + t.equal(p.get("foo"), undefined) + + + p.unshift({foo:"blo", bar:"rab"}) + p.unshift({foo:"boo"}) + t.equal(p.length, 3) + t.equal(p.get("foo"), "boo") + t.equal(p.get("bar"), "rab") + + var ret = p.splice(1, 1, {bar:"bar"}) + t.same(ret, [{foo:"blo", bar:"rab"}]) + t.equal(p.get("bar"), "bar") + + // should not inherit default object properties + t.equal(p.get('hasOwnProperty'), undefined) + + // unless we give it those. + p.root = {} + t.equal(p.get('hasOwnProperty'), {}.hasOwnProperty) + + p.root = {default:'monkey'} + t.equal(p.get('default'), 'monkey') + + p.push({red:'blue'}) + p.push({red:'blue'}) + p.push({red:'blue'}) + while (p.length) { + t.equal(p.get('default'), 'monkey') + p.shift() + } + + t.end() +}) diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/package.json b/deps/npm/node_modules/npmconf/node_modules/config-chain/package.json new file mode 100644 index 0000000000..379c3d68ca --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/package.json @@ -0,0 +1,28 @@ +{ + "name": "config-chain", + "version": "1.1.1", + "description": "HANDLE CONFIGURATION ONCE AND FOR ALL", + "homepage": "http://github.com/dominictarr/config-chain", + "repository": { + "type": "git", + "url": "https://github.com/dominictarr/config-chain.git" + }, + "dependencies": { + "proto-list": "~1.2.1", + "ini": "~1.0.2" + }, + "devDependencies": { + "tap": "0.3.0" + }, + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://dominictarr.com" + }, + "scripts": { + "test": "tap test/" + }, + "readme": "#config-chain\n\nUSE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS\n\n``` js\n\n //npm install config-chain\n\n var cc = require('config-chain')\n , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS.\n , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS.\n\n // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN\n // EARLIER ITEMS OVERIDE LATER ITEMS\n // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST!\n\n //strings are interpereted as filenames.\n //will be loaded synchronously\n\n var conf =\n cc(\n //OVERRIDE SETTINGS WITH COMMAND LINE OPTS\n opts,\n\n //ENV VARS IF PREFIXED WITH 'myApp_'\n\n cc.env('myApp_'), //myApp_foo = 'like this'\n\n //FILE NAMED BY ENV\n path.join(__dirname, 'config.' + env + '.json'),\n\n //IF `env` is PRODUCTION\n env === 'prod'\n ? path.join(__dirname, 'special.json') //load a special file\n : null //NULL IS IGNORED!\n\n //SUBDIR FOR ENV CONFIG\n path.join(__dirname, 'config', env, 'config.json'),\n\n //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE\n cc.find('config.json'),\n\n //PUT DEFAULTS LAST\n {\n host: 'localhost'\n port: 8000\n })\n\n var host = conf.get('host')\n\n // or\n\n var host = conf.store.host\n\n```\n\nFINALLY, EASY FLEXIBLE CONFIGURATIONS!\n\n##see also: [proto-list](https://github.com/isaacs/proto-list/)\n\nWHATS THAT YOU SAY?\n\nYOU WANT A \"CLASS\" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS?\n\nEXTEND WITH YOUR OWN FUNCTIONALTY!?\n\n## CONFIGCHAIN LIVES TO SERVE ONLY YOU!\n\n```javascript\nvar cc = require('config-chain')\n\n// all the stuff you did before\nvar config = cc({\n some: 'object'\n },\n cc.find('config.json'),\n cc.env('myApp_')\n )\n // CONFIGS AS A SERVICE, aka \"CaaS\", aka EVERY DEVOPS DREAM OMG!\n .addUrl('http://configurator:1234/my-configs')\n // ASYNC FTW!\n .addFile('/path/to/file.json')\n\n // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT\n // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST\n // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE\n .add({ another: 'object' })\n\n // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!!\n .on('error', function (er) {\n // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW\n // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\\\n throw er\n })\n\n // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!!\n .on('load', function (config) {\n console.awesome('HOLY SHIT!')\n })\n```\n\n# BORING API DOCS\n\n## cc(...args)\n\nMAKE A CHAIN AND ADD ALL THE ARGS.\n\nIf the arg is a STRING, then it shall be a JSON FILENAME.\n\nSYNC I/O!\n\nRETURN THE CHAIN!\n\n## cc.json(...args)\n\nJoin the args INTO A JSON FILENAME!\n\nSYNC I/O!\n\n## cc.find(relativePath)\n\nSEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES.\n\nRETURN THE FOUND PATH!\n\nSYNC I/O!\n\n## cc.parse(content, file, type)\n\nParse the content string, and guess the type from either the\nspecified type or the filename.\n\nRETURN THE RESULTING OBJECT!\n\nNO I/O!\n\n## cc.env(prefix, env=process.env)\n\nGet all the keys on the provided env object (or process.env) which are\nprefixed by the specified prefix, and put the values on a new object.\n\nRETURN THE RESULTING OBJECT!\n\nNO I/O!\n\n## cc.ConfigChain()\n\nThe ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING!\n\nOne of these is returned by the main exported function, as well.\n\nIt inherits (prototypically) from\n[ProtoList](https://github.com/isaacs/proto-list/), and also inherits\n(parasitically) from\n[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)\n\nIt has all the methods from both, and except where noted, they are\nunchanged.\n\n### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain.\n\n## chain.sources\n\nA list of all the places where it got stuff. The keys are the names\npassed to addFile or addUrl etc, and the value is an object with some\ninfo about the data source.\n\n## chain.addFile(filename, type, [name=filename])\n\nFilename is the name of the file. Name is an arbitrary string to be\nused later if you desire. Type is either 'ini' or 'json', and will\ntry to guess intelligently if omitted.\n\nLoaded files can be saved later.\n\n## chain.addUrl(url, type, [name=url])\n\nSame as the filename thing, but with a url.\n\nCan't be saved later.\n\n## chain.addEnv(prefix, env, [name='env'])\n\nAdd all the keys from the env object that start with the prefix.\n\n## chain.addString(data, file, type, [name])\n\nParse the string and add it to the set. (Mainly used internally.)\n\n## chain.add(object, [name])\n\nAdd the object to the set.\n\n## chain.root {Object}\n\nThe root from which all the other config objects in the set descend\nprototypically.\n\nPut your defaults here.\n\n## chain.set(key, value, name)\n\nSet the key to the value on the named config object. If name is\nunset, then set it on the first config object in the set. (That is,\nthe one with the highest priority, which was added first.)\n\n## chain.get(key, [name])\n\nGet the key from the named config object explicitly, or from the\nresolved configs if not specified.\n\n## chain.save(name, type)\n\nWrite the named config object back to its origin.\n\nCurrently only supported for env and file config types.\n\nFor files, encode the data according to the type.\n\n## chain.on('save', function () {})\n\nWhen one or more files are saved, emits `save` event when they're all\nsaved.\n\n## chain.on('load', function (chain) {})\n\nWhen the config chain has loaded all the specified files and urls and\nsuch, the 'load' event fires.\n", + "_id": "config-chain@1.1.1", + "_from": "config-chain@~1.1.1" +} diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown b/deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown new file mode 100644 index 0000000000..c83a43067b --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown @@ -0,0 +1,228 @@ +#config-chain + +USE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS + +``` js + + //npm install config-chain + + var cc = require('config-chain') + , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS. + , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS. + + // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN + // EARLIER ITEMS OVERIDE LATER ITEMS + // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST! + + //strings are interpereted as filenames. + //will be loaded synchronously + + var conf = + cc( + //OVERRIDE SETTINGS WITH COMMAND LINE OPTS + opts, + + //ENV VARS IF PREFIXED WITH 'myApp_' + + cc.env('myApp_'), //myApp_foo = 'like this' + + //FILE NAMED BY ENV + path.join(__dirname, 'config.' + env + '.json'), + + //IF `env` is PRODUCTION + env === 'prod' + ? path.join(__dirname, 'special.json') //load a special file + : null //NULL IS IGNORED! + + //SUBDIR FOR ENV CONFIG + path.join(__dirname, 'config', env, 'config.json'), + + //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE + cc.find('config.json'), + + //PUT DEFAULTS LAST + { + host: 'localhost' + port: 8000 + }) + + var host = conf.get('host') + + // or + + var host = conf.store.host + +``` + +FINALLY, EASY FLEXIBLE CONFIGURATIONS! + +##see also: [proto-list](https://github.com/isaacs/proto-list/) + +WHATS THAT YOU SAY? + +YOU WANT A "CLASS" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS? + +EXTEND WITH YOUR OWN FUNCTIONALTY!? + +## CONFIGCHAIN LIVES TO SERVE ONLY YOU! + +```javascript +var cc = require('config-chain') + +// all the stuff you did before +var config = cc({ + some: 'object' + }, + cc.find('config.json'), + cc.env('myApp_') + ) + // CONFIGS AS A SERVICE, aka "CaaS", aka EVERY DEVOPS DREAM OMG! + .addUrl('http://configurator:1234/my-configs') + // ASYNC FTW! + .addFile('/path/to/file.json') + + // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT + // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST + // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE + .add({ another: 'object' }) + + // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!! + .on('error', function (er) { + // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW + // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\ + throw er + }) + + // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!! + .on('load', function (config) { + console.awesome('HOLY SHIT!') + }) +``` + +# BORING API DOCS + +## cc(...args) + +MAKE A CHAIN AND ADD ALL THE ARGS. + +If the arg is a STRING, then it shall be a JSON FILENAME. + +SYNC I/O! + +RETURN THE CHAIN! + +## cc.json(...args) + +Join the args INTO A JSON FILENAME! + +SYNC I/O! + +## cc.find(relativePath) + +SEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES. + +RETURN THE FOUND PATH! + +SYNC I/O! + +## cc.parse(content, file, type) + +Parse the content string, and guess the type from either the +specified type or the filename. + +RETURN THE RESULTING OBJECT! + +NO I/O! + +## cc.env(prefix, env=process.env) + +Get all the keys on the provided env object (or process.env) which are +prefixed by the specified prefix, and put the values on a new object. + +RETURN THE RESULTING OBJECT! + +NO I/O! + +## cc.ConfigChain() + +The ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING! + +One of these is returned by the main exported function, as well. + +It inherits (prototypically) from +[ProtoList](https://github.com/isaacs/proto-list/), and also inherits +(parasitically) from +[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter) + +It has all the methods from both, and except where noted, they are +unchanged. + +### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain. + +## chain.sources + +A list of all the places where it got stuff. The keys are the names +passed to addFile or addUrl etc, and the value is an object with some +info about the data source. + +## chain.addFile(filename, type, [name=filename]) + +Filename is the name of the file. Name is an arbitrary string to be +used later if you desire. Type is either 'ini' or 'json', and will +try to guess intelligently if omitted. + +Loaded files can be saved later. + +## chain.addUrl(url, type, [name=url]) + +Same as the filename thing, but with a url. + +Can't be saved later. + +## chain.addEnv(prefix, env, [name='env']) + +Add all the keys from the env object that start with the prefix. + +## chain.addString(data, file, type, [name]) + +Parse the string and add it to the set. (Mainly used internally.) + +## chain.add(object, [name]) + +Add the object to the set. + +## chain.root {Object} + +The root from which all the other config objects in the set descend +prototypically. + +Put your defaults here. + +## chain.set(key, value, name) + +Set the key to the value on the named config object. If name is +unset, then set it on the first config object in the set. (That is, +the one with the highest priority, which was added first.) + +## chain.get(key, [name]) + +Get the key from the named config object explicitly, or from the +resolved configs if not specified. + +## chain.save(name, type) + +Write the named config object back to its origin. + +Currently only supported for env and file config types. + +For files, encode the data according to the type. + +## chain.on('save', function () {}) + +When one or more files are saved, emits `save` event when they're all +saved. + +## chain.on('load', function (chain) {}) + +When the config chain has loaded all the specified files and urls and +such, the 'load' event fires. diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js new file mode 100644 index 0000000000..101a3e4f5c --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js @@ -0,0 +1,10 @@ + + +var cc = require('..') +var assert = require('assert') + + +//throw on invalid json +assert.throws(function () { + cc(__dirname + '/broken.json') +}) diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json new file mode 100644 index 0000000000..2107ac18d9 --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json @@ -0,0 +1,21 @@ +{ + "name": "config-chain", + "version": "0.3.0", + "description": "HANDLE CONFIGURATION ONCE AND FOR ALL", + "homepage": "http://github.com/dominictarr/config-chain", + "repository": { + "type": "git", + "url": "https://github.com/dominictarr/config-chain.git" + } + //missing , and then this comment. this json is intensionally invalid + "dependencies": { + "proto-list": "1", + "ini": "~1.0.2" + }, + "bundleDependencies": ["ini"], + "REM": "REMEMBER TO REMOVE BUNDLING WHEN/IF ISAACS MERGES ini#7", + "author": "Dominic Tarr <dominic.tarr@gmail.com> (http://dominictarr.com)", + "scripts": { + "test": "node test/find-file.js && node test/ini.js && node test/env.js" + } +} diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js new file mode 100644 index 0000000000..bbc0d4cb2d --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js @@ -0,0 +1,100 @@ +var test = require('tap').test +var CC = require('../index.js').ConfigChain + +var env = { foo_blaz : 'blzaa', foo_env : 'myenv' } +var jsonObj = { blaz: 'json', json: true } +var iniObj = { 'x.y.z': 'xyz', blaz: 'ini' } + +var fs = require('fs') +var ini = require('ini') + +fs.writeFileSync('/tmp/config-chain-class.json', JSON.stringify(jsonObj)) +fs.writeFileSync('/tmp/config-chain-class.ini', ini.stringify(iniObj)) + +var http = require('http') +var reqs = 0 +http.createServer(function (q, s) { + if (++reqs === 2) this.close() + if (q.url === '/json') { + // make sure that the requests come back from the server + // out of order. they should still be ordered properly + // in the resulting config object set. + setTimeout(function () { + s.setHeader('content-type', 'application/json') + s.end(JSON.stringify({ + blaz: 'http', + http: true, + json: true + })) + }, 200) + } else { + s.setHeader('content-type', 'application/ini') + s.end(ini.stringify({ + blaz: 'http', + http: true, + ini: true, + json: false + })) + } +}).listen(1337) + +test('basic class test', function (t) { + var cc = new CC() + var expectlist = + [ { blaz: 'json', json: true }, + { 'x.y.z': 'xyz', blaz: 'ini' }, + { blaz: 'blzaa', env: 'myenv' }, + { blaz: 'http', http: true, json: true }, + { blaz: 'http', http: true, ini: true, json: false } ] + + cc.addFile('/tmp/config-chain-class.json') + .addFile('/tmp/config-chain-class.ini') + .addEnv('foo_', env) + .addUrl('http://localhost:1337/json') + .addUrl('http://localhost:1337/ini') + .on('load', function () { + t.same(cc.list, expectlist) + t.same(cc.snapshot, { blaz: 'json', + json: true, + 'x.y.z': 'xyz', + env: 'myenv', + http: true, + ini: true }) + + cc.del('blaz', '/tmp/config-chain-class.json') + t.same(cc.snapshot, { blaz: 'ini', + json: true, + 'x.y.z': 'xyz', + env: 'myenv', + http: true, + ini: true }) + cc.del('blaz') + t.same(cc.snapshot, { json: true, + 'x.y.z': 'xyz', + env: 'myenv', + http: true, + ini: true }) + cc.shift() + t.same(cc.snapshot, { 'x.y.z': 'xyz', + env: 'myenv', + http: true, + json: true, + ini: true }) + cc.shift() + t.same(cc.snapshot, { env: 'myenv', + http: true, + json: true, + ini: true }) + cc.shift() + t.same(cc.snapshot, { http: true, + json: true, + ini: true }) + cc.shift() + t.same(cc.snapshot, { http: true, + ini: true, + json: false }) + cc.shift() + t.same(cc.snapshot, {}) + t.end() + }) +}) diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js new file mode 100644 index 0000000000..fb718f32b7 --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js @@ -0,0 +1,10 @@ +var cc = require('..') +var assert = require('assert') + +assert.deepEqual({ + hello: true +}, cc.env('test_', { + 'test_hello': true, + 'ignore_this': 4, + 'ignore_test_this_too': [] +})) diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js new file mode 100644 index 0000000000..23cde52ea9 --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js @@ -0,0 +1,13 @@ + +var fs = require('fs') + , assert = require('assert') + , objx = { + rand: Math.random() + } + +fs.writeFileSync('/tmp/random-test-config.json', JSON.stringify(objx)) + +var cc = require('../') +var path = cc.find('tmp/random-test-config.json') + +assert.equal(path, '/tmp/random-test-config.json')
\ No newline at end of file diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js new file mode 100644 index 0000000000..d742b82ba7 --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js @@ -0,0 +1,5 @@ + +var cc = require('..') + +//should not throw +cc(__dirname, 'non_existing_file') diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js new file mode 100644 index 0000000000..5572a6ed6f --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js @@ -0,0 +1,18 @@ + + +var cc =require('..') +var INI = require('ini') +var assert = require('assert') + +function test(obj) { + + var _json, _ini + var json = cc.parse (_json = JSON.stringify(obj)) + var ini = cc.parse (_ini = INI.stringify(obj)) +console.log(_ini, _json) + assert.deepEqual(json, ini) +} + + +test({hello: true}) + diff --git a/deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js new file mode 100644 index 0000000000..783461317c --- /dev/null +++ b/deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js @@ -0,0 +1,59 @@ +var CC = require('../index.js').ConfigChain +var test = require('tap').test + +var f1 = '/tmp/f1.ini' +var f2 = '/tmp/f2.json' + +var ini = require('ini') + +var f1data = {foo: {bar: 'baz'}, bloo: 'jaus'} +var f2data = {oof: {rab: 'zab'}, oolb: 'suaj'} + +var fs = require('fs') + +fs.writeFileSync(f1, ini.stringify(f1data), 'utf8') +fs.writeFileSync(f2, JSON.stringify(f2data), 'utf8') + +test('test saving and loading ini files', function (t) { + new CC() + .add({grelb:'blerg'}, 'opt') + .addFile(f1, 'ini', 'inifile') + .addFile(f2, 'json', 'jsonfile') + .on('load', function (cc) { + + t.same(cc.snapshot, { grelb: 'blerg', + bloo: 'jaus', + foo: { bar: 'baz' }, + oof: { rab: 'zab' }, + oolb: 'suaj' }) + + t.same(cc.list, [ { grelb: 'blerg' }, + { bloo: 'jaus', foo: { bar: 'baz' } }, + { oof: { rab: 'zab' }, oolb: 'suaj' } ]) + + cc.set('grelb', 'brelg', 'opt') + .set('foo', 'zoo', 'inifile') + .set('oof', 'ooz', 'jsonfile') + .save('inifile') + .save('jsonfile') + .on('save', function () { + t.equal(fs.readFileSync(f1, 'utf8'), + "bloo = jaus\nfoo = zoo\n") + t.equal(fs.readFileSync(f2, 'utf8'), + "{\"oof\":\"ooz\",\"oolb\":\"suaj\"}") + + t.same(cc.snapshot, { grelb: 'brelg', + bloo: 'jaus', + foo: 'zoo', + oof: 'ooz', + oolb: 'suaj' }) + + t.same(cc.list, [ { grelb: 'brelg' }, + { bloo: 'jaus', foo: 'zoo' }, + { oof: 'ooz', oolb: 'suaj' } ]) + + t.pass('ok') + t.end() + }) + }) +}) diff --git a/deps/npm/node_modules/npmconf/npmconf.js b/deps/npm/node_modules/npmconf/npmconf.js new file mode 100644 index 0000000000..da4b422907 --- /dev/null +++ b/deps/npm/node_modules/npmconf/npmconf.js @@ -0,0 +1,324 @@ + +var CC = require('config-chain').ConfigChain +var inherits = require('inherits') +var configDefs = require('./config-defs.js') +var types = configDefs.types +var once = require('once') +var fs = require('fs') +var path = require('path') +var nopt = require('nopt') +var ini = require('ini') +var Octal = configDefs.Octal + +exports.load = load +exports.Conf = Conf +exports.loaded = false +exports.rootConf = null +exports.usingBuiltin = false +exports.defs = configDefs +Object.defineProperty(exports, 'defaults', { get: function () { + return configDefs.defaults +}, enumerable: true }) +Object.defineProperty(exports, 'types', { get: function () { + return configDefs.types +}, enumerable: true }) + +exports.validate = validate + +var myUid = process.env.SUDO_UID !== undefined + ? process.env.SUDO_UID : (process.getuid && process.getuid()) +var myGid = process.env.SUDO_GID !== undefined + ? process.env.SUDO_GID : (process.getgid && process.getgid()) + + +var loading = false +var loadCbs = [] +function load (cli_, builtin_, cb_) { + var cli, builtin, cb + for (var i = 0; i < arguments.length; i++) + switch (typeof arguments[i]) { + case 'string': builtin = arguments[i]; break + case 'object': cli = arguments[i]; break + case 'function': cb = arguments[i]; break + } + + if (!cb) + cb = function () {} + + if (exports.loaded) { + var ret = exports.loaded + if (cli) { + ret = new Conf(ret) + ret.unshift(cli) + } + return process.nextTick(cb.bind(null, null, ret)) + } + + // either a fresh object, or a clone of the passed in obj + if (!cli) + cli = {} + else + cli = Object.keys(cli).reduce(function (c, k) { + c[k] = cli[k] + return c + }, {}) + + loadCbs.push(cb) + if (loading) + return + loading = true + + cb = once(function (er, conf) { + if (!er) + exports.loaded = conf + loadCbs.forEach(function (fn) { + fn(er, conf) + }) + loadCbs.length = 0 + }) + + // check for a builtin if provided. + exports.usingBuiltin = !!builtin + var rc = exports.rootConf = new Conf() + var defaults = configDefs.defaults + if (builtin) + rc.addFile(builtin, 'builtin') + else + rc.add({}, 'builtin') + + rc.on('load', function () { + var conf = new Conf(rc) + conf.usingBuiltin = !!builtin + conf.add(cli, 'cli') + conf.addEnv() + conf.addFile(conf.get('userconfig'), 'user') + conf.once('error', cb) + conf.once('load', function () { + // globalconfig and globalignorefile defaults + // need to respond to the "prefix" setting up to this point. + // Eg, `npm config get globalconfig --prefix ~/local` should + // return `~/local/etc/npmrc` + // annoying humans and their expectations! + if (conf.get('prefix')) { + var etc = path.resolve(conf.get("prefix"), "etc") + defaults.globalconfig = path.resolve(etc, "npmrc") + defaults.globalignorefile = path.resolve(etc, "npmignore") + } + conf.addFile(conf.get('globalconfig'), 'global') + + // move the builtin into the conf stack now. + conf.root = defaults + conf.add(rc.shift(), 'builtin') + conf.once('load', function () { + // warn about invalid bits. + validate(conf) + exports.loaded = conf + cb(null, conf) + }) + }) + }) +} + + +// Basically the same as CC, but: +// 1. Always ini +// 2. Parses environment variable names in field values +// 3. Field values that start with ~/ are replaced with process.env.HOME +// 4. Can inherit from another Conf object, using it as the base. +inherits(Conf, CC) +function Conf (base) { + if (!(this instanceof Conf)) + return new Conf(base) + + CC.apply(this) + + if (base) + if (base instanceof Conf) + this.root = base.list[0] || base.root + else + this.root = base + else + this.root = configDefs.defaults +} + +Conf.prototype.save = function (where, cb) { + var target = this.sources[where] + if (!target || !(target.path || target.source) || !target.data) + return this.emit('error', new Error('bad save target: '+where)) + + if (target.source) { + var pref = target.prefix || '' + Object.keys(target.data).forEach(function (k) { + target.source[pref + k] = target.data[k] + }) + return this + } + + var data = target.data + + if (typeof data._password === 'string' && + typeof data.username === 'string') { + var auth = data.username + ':' + data._password + data = Object.keys(data).reduce(function (c, k) { + if (k === 'username' || k === '_password') + return c + c[k] = data[k] + return c + }, { _auth: new Buffer(auth, 'utf8').toString('base64') }) + delete data.username + delete data._password + } + + data = ini.stringify(data) + + then = then.bind(this) + done = done.bind(this) + this._saving ++ + var mode = where === 'user' ? 0600 : 0666 + if (!data.trim()) + fs.unlink(target.path, done) + else { + fs.writeFile(target.path, data, 'utf8', function (er) { + if (er) + return then(er) + if (where === 'user' && myUid && myGid) + fs.chown(target.path, +myUid, +myGid, then) + else + then() + }.bind(this)) + } + + function then (er) { + if (er) + return done(er) + fs.chmod(target.path, mode, done) + } + + function done (er) { + if (er) { + if (cb) return cb(er) + else return this.emit('error', er) + } + this._saving -- + if (this._saving === 0) { + if (cb) cb() + this.emit('save') + } + } + + return this +} + +Conf.prototype.addFile = function (file, name) { + name = name || file + var marker = {__source__:name} + this.sources[name] = { path: file, type: 'ini' } + this.push(marker) + this._await() + fs.readFile(file, 'utf8', function (er, data) { + if (er) // just ignore missing files. + return this.add({}, marker) + this.addString(data, file, 'ini', marker) + }.bind(this)) + return this +} + +// always ini files. +Conf.prototype.parse = function (content, file) { + return CC.prototype.parse.call(this, content, file, 'ini') +} + +Conf.prototype.add = function (data, marker) { + Object.keys(data).forEach(function (k) { + data[k] = parseField(data[k], k) + }) + if (Object.prototype.hasOwnProperty.call(data, '_auth')) { + var auth = new Buffer(data._auth, 'base64').toString('utf8').split(':') + var username = auth.shift() + var password = auth.join(':') + data.username = username + data._password = password + } + return CC.prototype.add.call(this, data, marker) +} + +Conf.prototype.addEnv = function (env) { + env = env || process.env + var conf = {} + Object.keys(env) + .filter(function (k) { return k.match(/^npm_config_[^_]/i) }) + .forEach(function (k) { + if (!env[k]) + return + + conf[k.replace(/^npm_config_/i, '') + .toLowerCase() + .replace(/_/g, '-')] = env[k] + }) + return CC.prototype.addEnv.call(this, '', conf, 'env') +} + +function parseField (f, k, emptyIsFalse) { + if (typeof f !== 'string' && !(f instanceof String)) + return f + + // type can be an array or single thing. + var typeList = [].concat(types[k]) + var isPath = -1 !== typeList.indexOf(path) + var isBool = -1 !== typeList.indexOf(Boolean) + var isString = -1 !== typeList.indexOf(String) + var isNumber = -1 !== typeList.indexOf(Number) || + -1 !== typeList.indexOf(Octal) + + f = (''+f).trim() + + if (f.match(/^".*"$/)) + f = JSON.parse(f) + + if (isBool && !isString && f === '') + return true + + switch (f) { + case 'true': return true + case 'false': return false + case 'null': return null + case 'undefined': return undefined + } + + f = envReplace(f) + + if (isPath) { + var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\// + if (f.match(homePattern) && process.env.HOME) { + f = path.resolve(process.env.HOME, f.substr(2)) + } + f = path.resolve(f) + } + + if (isNumber && !isNaN(f)) + f = +f + + return f +} + +function envReplace (f) { + if (typeof f !== "string" || !f) return f + + // replace any ${ENV} values with the appropriate environ. + var envExpr = /(\\*)\$\{([^}]+)\}/g + return f.replace(envExpr, function (orig, esc, name, i, s) { + esc = esc.length && esc.length % 2 + if (esc) + return orig + if (undefined === process.env[name]) + throw new Error("Failed to replace env in config: "+orig) + return process.env[name] + }) +} + +function validate (cl) { + // warn about invalid configs at every level. + cl.list.forEach(function (conf, level) { + nopt.clean(conf, configDefs.types) + }) +} diff --git a/deps/npm/node_modules/npmconf/package.json b/deps/npm/node_modules/npmconf/package.json new file mode 100644 index 0000000000..3a50fe9a4d --- /dev/null +++ b/deps/npm/node_modules/npmconf/package.json @@ -0,0 +1,42 @@ +{ + "name": "npmconf", + "version": "0.0.6", + "description": "The config thing npm uses", + "main": "npmconf.js", + "directories": { + "test": "test" + }, + "dependencies": { + "config-chain": "~1.1.1", + "inherits": "~1.0.0", + "once": "~1.1.1", + "nopt": "~2.0.0" + }, + "devDependencies": {}, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/npmconf" + }, + "keywords": [ + "npm", + "config", + "config-chain", + "conf", + "ini" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "license": "BSD", + "optionalDependencies": { + "nopt": "~2.0.0" + }, + "readme": "# npmconf\n\nThe config thing npm uses\n\nIf you are interested in interacting with the config settings that npm\nuses, then use this module.\n\nHowever, if you are writing a new Node.js program, and want\nconfiguration functionality similar to what npm has, but for your\nown thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),\nwhich is probably what you want.\n\nIf I were to do it all over again, that's what I'd do for npm. But,\nalas, there are many systems depending on many of the particulars of\nnpm's configuration setup, so it's not worth the cost of changing.\n\n## USAGE\n\n```javascript\nvar npmconf = require('npmconf')\n\n// pass in the cli options that you read from the cli\n// or whatever top-level configs you want npm to use for now.\nnpmconf.load({some:'configs'}, function (er, conf) {\n // do stuff with conf\n conf.get('some', 'cli') // 'configs'\n conf.get('username') // 'joebobwhatevers'\n conf.set('foo', 'bar', 'user')\n conf.save('user', function (er) {\n // foo = bar is now saved to ~/.npmrc or wherever\n })\n})\n```\n", + "_id": "npmconf@0.0.6", + "_from": "npmconf@latest" +} diff --git a/deps/npm/node_modules/npmconf/test/00-setup.js b/deps/npm/node_modules/npmconf/test/00-setup.js new file mode 100644 index 0000000000..79cbbb127f --- /dev/null +++ b/deps/npm/node_modules/npmconf/test/00-setup.js @@ -0,0 +1,27 @@ +var path = require('path') +var userconfigSrc = path.resolve(__dirname, 'fixtures', 'userconfig') +exports.userconfig = userconfigSrc + '-with-gc' +exports.globalconfig = path.resolve(__dirname, 'fixtures', 'globalconfig') +exports.builtin = path.resolve(__dirname, 'fixtures', 'builtin') + +// set the userconfig in the env +// unset anything else that npm might be trying to foist on us +Object.keys(process.env).forEach(function (k) { + if (k.match(/^npm_config_/i)) { + delete process.env[k] + } +}) +process.env.npm_config_userconfig = exports.userconfig +process.env.npm_config_other_env_thing = 1000 +process.env.random_env_var = 'asdf' + +if (module === require.main) { + // set the globalconfig in the userconfig + var fs = require('fs') + var uc = fs.readFileSync(userconfigSrc) + var gcini = 'globalconfig = ' + exports.globalconfig + '\n' + fs.writeFileSync(exports.userconfig, gcini + uc) + + console.log('0..1') + console.log('ok 1 setup done') +} diff --git a/deps/npm/node_modules/npmconf/test/basic.js b/deps/npm/node_modules/npmconf/test/basic.js new file mode 100644 index 0000000000..9825c8457b --- /dev/null +++ b/deps/npm/node_modules/npmconf/test/basic.js @@ -0,0 +1,72 @@ +var test = require('tap').test +var npmconf = require('../npmconf.js') +var common = require('./00-setup.js') + +var ucData = + { globalconfig: common.globalconfig, + email: 'i@izs.me', + 'env-thing': 'asdf', + 'init.author.name': 'Isaac Z. Schlueter', + 'init.author.email': 'i@izs.me', + 'init.author.url': 'http://blog.izs.me/', + 'proprietary-attribs': false, + 'npm:publishtest': true, + '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry', + _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=', + 'npm-www:nocache': '1', + nodedir: '/Users/isaacs/dev/js/node-v0.8', + 'sign-git-tag': true, + message: 'v%s', + 'strict-ssl': false, + 'tmp': process.env.HOME + '/.tmp', + username : "username", + _password : "password", + _token: + { AuthSession: 'yabba-dabba-doodle', + version: '1', + expires: '1345001053415', + path: '/', + httponly: true } } + +var envData = { userconfig: common.userconfig, 'other-env-thing': '1000' } + +var gcData = { 'package-config:foo': 'boo' } + +var biData = {} + +var cli = { foo: 'bar' } + +var expectList = +[ cli, + envData, + ucData, + gcData, + biData ] + +var expectSources = +{ cli: { data: cli }, + env: + { data: envData, + source: envData, + prefix: '' }, + user: + { path: common.userconfig, + type: 'ini', + data: ucData }, + global: + { path: common.globalconfig, + type: 'ini', + data: gcData }, + builtin: { data: biData } } + +test('no builtin', function (t) { + npmconf.load(cli, function (er, conf) { + if (er) throw er + t.same(conf.list, expectList) + t.same(conf.sources, expectSources) + t.same(npmconf.rootConf.list, []) + t.equal(npmconf.rootConf.root, npmconf.defs.defaults) + t.equal(conf.root, npmconf.defs.defaults) + t.end() + }) +}) diff --git a/deps/npm/node_modules/npmconf/test/builtin.js b/deps/npm/node_modules/npmconf/test/builtin.js new file mode 100644 index 0000000000..814259493c --- /dev/null +++ b/deps/npm/node_modules/npmconf/test/builtin.js @@ -0,0 +1,72 @@ +var test = require('tap').test +var npmconf = require('../npmconf.js') +var common = require('./00-setup.js') + +var ucData = + { globalconfig: common.globalconfig, + email: 'i@izs.me', + 'env-thing': 'asdf', + 'init.author.name': 'Isaac Z. Schlueter', + 'init.author.email': 'i@izs.me', + 'init.author.url': 'http://blog.izs.me/', + 'proprietary-attribs': false, + 'npm:publishtest': true, + '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry', + _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=', + 'npm-www:nocache': '1', + nodedir: '/Users/isaacs/dev/js/node-v0.8', + 'sign-git-tag': true, + message: 'v%s', + 'strict-ssl': false, + 'tmp': process.env.HOME + '/.tmp', + username : "username", + _password : "password", + _token: + { AuthSession: 'yabba-dabba-doodle', + version: '1', + expires: '1345001053415', + path: '/', + httponly: true } } + +var envData = { userconfig: common.userconfig, 'other-env-thing': '1000' } + +var gcData = { 'package-config:foo': 'boo' } + +var biData = { 'builtin-config': true } + +var cli = { foo: 'bar' } + +var expectList = +[ cli, + envData, + ucData, + gcData, + biData ] + +var expectSources = +{ cli: { data: cli }, + env: + { data: envData, + source: envData, + prefix: '' }, + user: + { path: common.userconfig, + type: 'ini', + data: ucData }, + global: + { path: common.globalconfig, + type: 'ini', + data: gcData }, + builtin: { data: biData } } + +test('with builtin', function (t) { + npmconf.load(cli, common.builtin, function (er, conf) { + if (er) throw er + t.same(conf.list, expectList) + t.same(conf.sources, expectSources) + t.same(npmconf.rootConf.list, []) + t.equal(npmconf.rootConf.root, npmconf.defs.defaults) + t.equal(conf.root, npmconf.defs.defaults) + t.end() + }) +}) diff --git a/deps/npm/node_modules/npmconf/test/fixtures/builtin b/deps/npm/node_modules/npmconf/test/fixtures/builtin new file mode 100644 index 0000000000..dcd542c0ce --- /dev/null +++ b/deps/npm/node_modules/npmconf/test/fixtures/builtin @@ -0,0 +1 @@ +builtin-config = true diff --git a/deps/npm/node_modules/npmconf/test/fixtures/globalconfig b/deps/npm/node_modules/npmconf/test/fixtures/globalconfig new file mode 100644 index 0000000000..41c0b70c80 --- /dev/null +++ b/deps/npm/node_modules/npmconf/test/fixtures/globalconfig @@ -0,0 +1 @@ +package-config:foo = boo diff --git a/deps/npm/node_modules/npmconf/test/fixtures/userconfig b/deps/npm/node_modules/npmconf/test/fixtures/userconfig new file mode 100644 index 0000000000..bda1eb82ae --- /dev/null +++ b/deps/npm/node_modules/npmconf/test/fixtures/userconfig @@ -0,0 +1,22 @@ +email = i@izs.me +env-thing = ${random_env_var} +init.author.name = Isaac Z. Schlueter +init.author.email = i@izs.me +init.author.url = http://blog.izs.me/ +proprietary-attribs = false +npm:publishtest = true +_npmjs.org:couch = https://admin:password@localhost:5984/registry +_auth = dXNlcm5hbWU6cGFzc3dvcmQ= +npm-www:nocache = 1 +nodedir = /Users/isaacs/dev/js/node-v0.8 +sign-git-tag = true +message = v%s +strict-ssl = false +tmp = ~/.tmp + +[_token] +AuthSession = yabba-dabba-doodle +version = 1 +expires = 1345001053415 +path = / +httponly = true diff --git a/deps/npm/node_modules/npmconf/test/save.js b/deps/npm/node_modules/npmconf/test/save.js new file mode 100644 index 0000000000..05230cd0a6 --- /dev/null +++ b/deps/npm/node_modules/npmconf/test/save.js @@ -0,0 +1,74 @@ +var test = require('tap').test +var npmconf = require('../npmconf.js') +var common = require('./00-setup.js') +var fs = require('fs') +var ini = require('ini') +var expectConf = + [ 'globalconfig = ' + common.globalconfig, + 'email = i@izs.me', + 'env-thing = asdf', + 'init.author.name = Isaac Z. Schlueter', + 'init.author.email = i@izs.me', + 'init.author.url = http://blog.izs.me/', + 'proprietary-attribs = false', + 'npm:publishtest = true', + '_npmjs.org:couch = https://admin:password@localhost:5984/registry', + '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=', + 'npm-www:nocache = 1', + 'sign-git-tag = false', + 'message = v%s', + 'strict-ssl = false', + 'username = username', + '_password = password', + '', + '[_token]', + 'AuthSession = yabba-dabba-doodle', + 'version = 1', + 'expires = 1345001053415', + 'path = /', + 'httponly = true', + '' ].join('\n') +var expectFile = + [ 'globalconfig = ' + common.globalconfig, + 'email = i@izs.me', + 'env-thing = asdf', + 'init.author.name = Isaac Z. Schlueter', + 'init.author.email = i@izs.me', + 'init.author.url = http://blog.izs.me/', + 'proprietary-attribs = false', + 'npm:publishtest = true', + '_npmjs.org:couch = https://admin:password@localhost:5984/registry', + '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=', + 'npm-www:nocache = 1', + 'sign-git-tag = false', + 'message = v%s', + 'strict-ssl = false', + '', + '[_token]', + 'AuthSession = yabba-dabba-doodle', + 'version = 1', + 'expires = 1345001053415', + 'path = /', + 'httponly = true', + '' ].join('\n') + +test('saving configs', function (t) { + npmconf.load(function (er, conf) { + if (er) + throw er + conf.set('sign-git-tag', false, 'user') + conf.del('nodedir') + conf.del('tmp') + var foundConf = ini.stringify(conf.sources.user.data) + t.same(ini.parse(foundConf), ini.parse(expectConf)) + fs.unlinkSync(common.userconfig) + conf.save('user', function (er) { + if (er) + throw er + var uc = fs.readFileSync(conf.get('userconfig'), 'utf8') + t.same(ini.parse(uc), ini.parse(expectFile)) + t.end() + }) + }) +}) + diff --git a/deps/npm/node_modules/once/LICENSE b/deps/npm/node_modules/once/LICENSE new file mode 100644 index 0000000000..0c44ae716d --- /dev/null +++ b/deps/npm/node_modules/once/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/once/README.md b/deps/npm/node_modules/once/README.md new file mode 100644 index 0000000000..e833b83d22 --- /dev/null +++ b/deps/npm/node_modules/once/README.md @@ -0,0 +1,33 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. diff --git a/deps/npm/node_modules/once/once.js b/deps/npm/node_modules/once/once.js new file mode 100644 index 0000000000..effc50a475 --- /dev/null +++ b/deps/npm/node_modules/once/once.js @@ -0,0 +1,19 @@ +module.exports = once + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) +}) + +function once (fn) { + var called = false + return function () { + if (called) return + called = true + return fn.apply(this, arguments) + } +} diff --git a/deps/npm/node_modules/once/package.json b/deps/npm/node_modules/once/package.json new file mode 100644 index 0000000000..22671632ef --- /dev/null +++ b/deps/npm/node_modules/once/package.json @@ -0,0 +1,35 @@ +{ + "name": "once", + "version": "1.1.1", + "description": "Run a function exactly one time", + "main": "once.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.3.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once" + }, + "keywords": [ + "once", + "function", + "one", + "single" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "BSD", + "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n", + "_id": "once@1.1.1", + "_from": "once" +} diff --git a/deps/npm/node_modules/once/test/once.js b/deps/npm/node_modules/once/test/once.js new file mode 100644 index 0000000000..f0291a44f0 --- /dev/null +++ b/deps/npm/node_modules/once/test/once.js @@ -0,0 +1,18 @@ +var test = require('tap').test +var once = require('../once.js') + +test('once', function (t) { + var f = 0 + var foo = once(function (g) { + t.equal(f, 0) + f ++ + return f + g + this + }) + for (var i = 0; i < 1E3; i++) { + t.same(f, i === 0 ? 0 : 1) + var g = foo.call(1, 1) + t.same(g, i === 0 ? 3 : undefined) + t.same(f, 1) + } + t.end() +}) diff --git a/deps/npm/node_modules/proto-list/package.json b/deps/npm/node_modules/proto-list/package.json deleted file mode 100644 index 5cab34befe..0000000000 --- a/deps/npm/node_modules/proto-list/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ "name" : "proto-list" -, "version" : "1.0.0" -, "description" : "A utility for managing a prototype chain" -, "main" : "./proto-list.js" -, "author" : "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)" -, "scripts" : { "test" : "node proto-list.js" } -, "repository": { "type": "git", "url": "https://github.com/isaacs/proto-list" } -, "license": { "type": "MIT", "url": "https://github.com/isaacs/proto-list/blob/master/LICENSE" } -, "devDependencies" : { "tap" : "0" } } diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json index e585627ec8..42d0611272 100644 --- a/deps/npm/node_modules/read-package-json/package.json +++ b/deps/npm/node_modules/read-package-json/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json", - "version": "0.1.2", + "version": "0.1.3", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -17,7 +17,7 @@ }, "dependencies": { "glob": "~3.1.9", - "lru-cache": "~1.1.0", + "lru-cache": "~2.0.0", "semver": "~1.0.14", "slide": "~1.1.3", "npmlog": "0", @@ -31,6 +31,6 @@ "graceful-fs": "~1.1.8" }, "readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\nreadJson('/path/to/package.json', function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n}\n```\n\n## readJson(file, cb)\n\n* `file` {String} The path to the package.json file\n* `cb` {Function}\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n", - "_id": "read-package-json@0.1.2", + "_id": "read-package-json@0.1.3", "_from": "read-package-json@~0.1.1" } diff --git a/deps/npm/node_modules/read-package-json/read-json.js b/deps/npm/node_modules/read-package-json/read-json.js index 385fc3304e..837c6b7c4a 100644 --- a/deps/npm/node_modules/read-package-json/read-json.js +++ b/deps/npm/node_modules/read-package-json/read-json.js @@ -21,7 +21,7 @@ try { module.exports = readJson var LRU = require("lru-cache") -readJson.cache = new LRU(1000) +readJson.cache = new LRU({max: 1000}) var path = require("path") var glob = require("glob") var slide = require("slide") diff --git a/deps/npm/node_modules/read/lib/read.js b/deps/npm/node_modules/read/lib/read.js index 363e7e85fe..4b0e303f6c 100644 --- a/deps/npm/node_modules/read/lib/read.js +++ b/deps/npm/node_modules/read/lib/read.js @@ -9,10 +9,16 @@ function read (opts, cb) { throw new Error('read() no longer accepts a char number limit') } + if (typeof opts.default !== 'undefined' && + typeof opts.default !== 'string' && + typeof opts.default !== 'number') { + throw new Error('default value must be string or number') + } + var input = opts.input || process.stdin var output = opts.output || process.stdout var m = new Mute({ replace: opts.replace }) - m.pipe(output) + m.pipe(output, {end: false}) output = m var def = opts.default || '' var terminal = !!(opts.terminal || output.isTTY) @@ -65,6 +71,7 @@ function read (opts, cb) { rl.close() clearTimeout(timer) output.mute() + output.end() } function onError (er) { diff --git a/deps/npm/node_modules/read/package.json b/deps/npm/node_modules/read/package.json index 698cf40d9d..79e5b7ce2c 100644 --- a/deps/npm/node_modules/read/package.json +++ b/deps/npm/node_modules/read/package.json @@ -1,6 +1,6 @@ { "name": "read", - "version": "1.0.2", + "version": "1.0.3", "main": "lib/read.js", "dependencies": { "mute-stream": "~0.0.2" @@ -26,6 +26,6 @@ "test": "tap test/*.js" }, "readme": "## read\n\nFor reading user input from stdin.\n\nSimilar to the `readline` builtin's `question()` method, but with a\nfew more features.\n\n## USAGE\n\n```javascript\nvar read = require(\"read\")\nread(options, callback)\n```\n\nThe callback gets called with either the user input, or the default\nspecified, or an error, as `callback(error, result, isDefault)`\nnode style.\n\n## OPTIONS\n\nEvery option is optional.\n\n* `prompt` What to write to stdout before reading input.\n* `silent` Don't echo the output as the user types it.\n* `replace` Replace silenced characters with the supplied character value.\n* `timeout` Number of ms to wait for user input before giving up.\n* `default` The default value if the user enters nothing.\n* `edit` Allow the user to edit the default value.\n* `terminal` Treat the output as a TTY, whether it is or not.\n* `stdin` Readable stream to get input data from. (default `process.stdin`)\n* `stdout` Writeable stream to write prompts to. (default: `process.stdout`)\n\nIf silent is true, and the input is a TTY, then read will set raw\nmode, and read character by character.\n\n## CONTRIBUTING\n\nPatches welcome.\n", - "_id": "read@1.0.2", + "_id": "read@1.0.3", "_from": "read@~1" } diff --git a/deps/npm/node_modules/read/test/many.js b/deps/npm/node_modules/read/test/many.js new file mode 100644 index 0000000000..0d32dae8af --- /dev/null +++ b/deps/npm/node_modules/read/test/many.js @@ -0,0 +1,76 @@ +var tap = require('tap') +var read = require('../lib/read.js') + +if (process.argv[2] === 'child') { + return child() +} + +var spawn = require('child_process').spawn +function child () { + read({prompt:'1'}, function (er, r1) {if (er) throw er + read({prompt:'2'}, function (er, r2) {if (er) throw er + read({prompt:'3'}, function (er, r3) {if (er) throw er + read({prompt:'4'}, function (er, r4) {if (er) throw er + read({prompt:'5'}, function (er, r5) {if (er) throw er + read({prompt:'6'}, function (er, r6) {if (er) throw er + read({prompt:'7'}, function (er, r7) {if (er) throw er + read({prompt:'8'}, function (er, r8) {if (er) throw er + read({prompt:'9'}, function (er, r9) {if (er) throw er + read({prompt:'10'}, function (er, r10) {if (er) throw er + read({prompt:'11'}, function (er, r11) {if (er) throw er + read({prompt:'12'}, function (er, r12) {if (er) throw er + read({prompt:'13'}, function (er, r13) {if (er) throw er + read({prompt:'14'}, function (er, r14) {if (er) throw er + read({prompt:'15'}, function (er, r15) {if (er) throw er + read({prompt:'16'}, function (er, r16) {if (er) throw er + read({prompt:'17'}, function (er, r17) {if (er) throw er + read({prompt:'18'}, function (er, r18) {if (er) throw er + console.log(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, + r11, r12, r13, r14, r15, r16, r17, r18) + })})})})})})})})})})})})})})})})})}) +} + +tap.test('many reads', function (t) { + var child = spawn(process.execPath, [__filename, 'child']) + var n = 0 + var output = '' + var expect = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ' + + '16 17 18 1 2 3 4 5 6 7 8 9 10 11 12 ' + + '13 14 15 16 17 18\n' + var write = child.stdin.write.bind(child.stdin) + var answers = + [ '1\n', + '2\n', + '3\n', + '4\n', + '5\n', + '6\n', + '7\n', + '8\n', + '9\n', + '10\n', + '11\n', + '12\n', + '13\n', + '14\n', + '15\n', + '16\n', + '17\n', + '18\n' ] + child.stdout.on('data', function (c) { + n++; + output += c + if (answers.length) { + write(answers.shift()) + } + }) + child.stderr.on('data', function (c) { + output += c + console.error('' + c) + }) + child.on('close', function (c) { + t.equal(output, expect) + t.equal(n, 19) + t.end() + }) +}) diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json index 1f093f4493..6796f5dff6 100644 --- a/deps/npm/node_modules/request/package.json +++ b/deps/npm/node_modules/request/package.json @@ -28,5 +28,8 @@ }, "readme": "# Request -- Simplified HTTP request method\n\n## Install\n\n<pre>\n npm install request\n</pre>\n\nOr from source:\n\n<pre>\n git clone git://github.com/mikeal/request.git \n cd request\n npm link\n</pre>\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types, in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let's get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n } \n }\n})\n```\n\nYou can also pipe() from a http.ServerRequest instance and to a http.ServerResponse instance. The HTTP method and headers will be sent as well as the entity-body data. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since pipe() returns the destination stream in node 0.5.x you can do one line proxying :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Assume by some stretch of magic you aquired the verifier\n var access_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: VERIFIER\n , token_secret: access_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1/users/show.json?'\n , params = \n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n\n\n### request(options, callback)\n\nThe first argument can be either a url or an options object. The only required option is uri, all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from url.parse()\n* `qs` - object containing querystring values to be appended to the uri\n* `method` - http method, defaults to GET\n* `headers` - http headers, defaults to {}\n* `body` - entity body for POST and PUT requests. Must be buffer or string.\n* `form` - sets `body` but to querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false.\n* `maxRedirects` - the maximum number of redirects to follow, defaults to 10.\n* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.\n* `pool` - A hash object containing the agents for these requests. If omitted this request will use the global pool which is set to node's default maxSockets.\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\t\n* `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri.\n* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above.\n* `strictSSL` - Set to `true` to require that SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that ca as an option.\n* `jar` - Set to `false` if you don't want cookies to be remembered for future use or define your custom cookie jar (see examples section)\n\n\nThe callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second in an http.ClientResponse object. The third is the response body String or Buffer.\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options) \n \nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as request() but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.post\n\nSame as request() but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as request() but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nAlias to normal request method for uniformity.\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart: \n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ] \n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\nCookies are enabled by default (so they can be used in subsequent requests). To disable cookies set jar to false (either in defaults or in the options sent).\n\n```javascript\nvar request = request.defaults({jar: false})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nIf you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option:\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.add(cookie)\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", "_id": "request@2.9.203", + "dist": { + "shasum": "f4c8f35b61b4d6621cb287bb1a1be6002b0bbe4a" + }, "_from": "request@~2.9" } diff --git a/deps/npm/package.json b/deps/npm/package.json index ff01b54174..d0b4d7be7c 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "1.1.46", + "version": "1.1.49", "name": "npm", "publishConfig": { "proprietary-attribs": false @@ -39,10 +39,9 @@ "slide": "1", "abbrev": "1", "graceful-fs": "~1.1.1", - "minimatch": "~0.2", + "minimatch": "~0.2.6", "nopt": "~2.0", "node-uuid": "~1.3", - "proto-list": "1", "rimraf": "2", "request": "~2.9", "which": "1", @@ -51,24 +50,26 @@ "block-stream": "*", "inherits": "1", "mkdirp": "~0.3.3", - "read": "~1", - "lru-cache": "~1.1.0", - "node-gyp": "~0.6.1", + "read": "~1.0.3", + "lru-cache": "~2.0.0", + "node-gyp": "~0.6.4", "fstream-npm": "0.1", "uid-number": "0", "archy": "0", "chownr": "0", "npmlog": "0", "ansi": "~0.1.2", - "npm-registry-client": "0", - "read-package-json": "~0.1.1", + "npm-registry-client": "~0.1.4", + "read-package-json": "~0.1.3", "read-installed": "0", - "glob": "~3.1.9", + "glob": "~3.1.12", "init-package-json": "0", "osenv": "0", "lockfile": ">=0.2", "retry": "~0.6.0", - "couch-login": "~0.1.6" + "couch-login": "~0.1.9", + "once": "~1.1.1", + "npmconf": "~0.0.6" }, "bundleDependencies": [ "semver", @@ -79,7 +80,6 @@ "minimatch", "nopt", "node-uuid", - "proto-list", "rimraf", "request", "which", @@ -105,20 +105,23 @@ "osenv", "lockfile", "retry", - "couch-login" + "couch-login", + "once", + "npmconf" ], "devDependencies": { - "ronn": "https://github.com/isaacs/ronnjs/tarball/master", + "ronn": "~0.3.6", "tap": "~0.2.5" }, "engines": { - "node": ">0.6", + "node": ">=0.8", "npm": "1" }, "scripts": { "test": "node ./test/run.js && tap test/tap/*.js", "prepublish": "npm prune ; make -j4 doc", - "dumpconf": "env | grep npm | sort | uniq" + "dumpconf": "env | grep npm | sort | uniq", + "echo": "node bin/npm-cli.js" }, "licenses": [ { diff --git a/deps/openssl/openssl/crypto/asn1/a_strex.c b/deps/openssl/openssl/crypto/asn1/a_strex.c index 264ebf2393..8a467abd75 100644 --- a/deps/openssl/openssl/crypto/asn1/a_strex.c +++ b/deps/openssl/openssl/crypto/asn1/a_strex.c @@ -566,6 +566,7 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in) mbflag = tag2nbyte[type]; if(mbflag == -1) return -1; mbflag |= MBSTRING_FLAG; + memset(&stmp, 0, sizeof(stmp)); stmp.data = NULL; ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING); if(ret < 0) return ret; diff --git a/deps/uv/build/gcc_version.py b/deps/uv/build/gcc_version.py deleted file mode 100644 index da019e8661..0000000000 --- a/deps/uv/build/gcc_version.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python - -import os -import re -import subprocess -import sys - - -def DoMain(*args): - cc = os.environ.get('CC', 'gcc') - stdin, stderr = os.pipe() - subprocess.call([cc, '-v'], stderr=stderr) - output = os.read(stdin, 4096) - match = re.search("\ngcc version (\d+\.\d+\.\d+)", output) - if match: - print(match.group(1)) - - -if __name__ == '__main__': - DoMain(*sys.argv) diff --git a/deps/uv/common.gypi b/deps/uv/common.gypi index 79306a7554..0ffb45e8d4 100644 --- a/deps/uv/common.gypi +++ b/deps/uv/common.gypi @@ -6,6 +6,8 @@ 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds 'component%': 'static_library', # NB. these names match with what V8 expects 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way + 'gcc_version%': 'unknown', + 'clang%': 0, }, 'target_defaults': { @@ -117,9 +119,6 @@ ], }], [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { - 'variables': { - 'gcc_version%': '<!(python build/gcc_version.py)>)', - }, 'cflags': [ '-Wall' ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], 'conditions': [ @@ -137,7 +136,7 @@ 'cflags': [ '-pthread' ], 'ldflags': [ '-pthread' ], }], - [ 'visibility=="hidden" and gcc_version >= "4.0.0"', { + [ 'visibility=="hidden" and (clang==1 or gcc_version >= 40)', { 'cflags': [ '-fvisibility=hidden' ], }], ], diff --git a/deps/uv/gyp_uv b/deps/uv/gyp_uv index 14a3cae764..00da3aedd1 100755 --- a/deps/uv/gyp_uv +++ b/deps/uv/gyp_uv @@ -1,11 +1,14 @@ #!/usr/bin/env python + import glob import os -import shlex +import subprocess import sys +CC = os.environ.get('CC', 'cc') script_dir = os.path.dirname(__file__) uv_root = os.path.normpath(script_dir) +output_dir = os.path.join(os.path.abspath(uv_root), 'out') sys.path.insert(0, os.path.join(uv_root, 'build', 'gyp', 'pylib')) try: @@ -14,9 +17,14 @@ except ImportError: print('You need to install gyp in build/gyp first. See the README.') sys.exit(42) -# Directory within which we want all generated files (including Makefiles) -# to be written. -output_dir = os.path.join(os.path.abspath(uv_root), 'out') + +def compiler_version(): + proc = subprocess.Popen(CC.split() + ['--version'], stdout=subprocess.PIPE) + is_clang = 'clang' in proc.communicate()[0].split('\n')[0] + proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE) + version = tuple(map(int, proc.communicate()[0].split('.'))) + return (version, is_clang) + def run_gyp(args): rc = gyp.main(args) @@ -24,6 +32,7 @@ def run_gyp(args): print 'Error running GYP' sys.exit(rc) + if __name__ == '__main__': args = sys.argv[1:] @@ -49,12 +58,12 @@ if __name__ == '__main__': # There's a bug with windows which doesn't allow this feature. if sys.platform != 'win32': - # Tell gyp to write the Makefiles into output_dir args.extend(['--generator-output', output_dir]) - # Tell make to write its output into the same dir args.extend(['-Goutput_dir=' + output_dir]) - # Create Makefiles, not XCode projects args.extend('-f make'.split()) + (major, minor), is_clang = compiler_version() + args.append('-Dgcc_version=%d' % (10 * major + minor)) + args.append('-Dclang=%d' % int(is_clang)) args.append('-Dtarget_arch=ia32') args.append('-Dcomponent=static_library') diff --git a/deps/uv/src/win/process-stdio.c b/deps/uv/src/win/process-stdio.c index 2fe2b23254..ad845a061d 100644 --- a/deps/uv/src/win/process-stdio.c +++ b/deps/uv/src/win/process-stdio.c @@ -181,6 +181,20 @@ static int uv__create_stdio_pipe_pair(uv_loop_t* loop, uv_pipe_t* server_pipe, static int uv__duplicate_handle(uv_loop_t* loop, HANDLE handle, HANDLE* dup) { HANDLE current_process; + + /* _get_osfhandle will sometimes return -2 in case of an error. This seems */ + /* to happen when fd <= 2 and the process' corresponding stdio handle is */ + /* set to NULL. Unfortunately DuplicateHandle will happily duplicate /* + /* (HANDLE) -2, so this situation goes unnoticed until someone tries to */ + /* use the duplicate. Therefore we filter out known-invalid handles here. */ + if (handle == INVALID_HANDLE_VALUE || + handle == NULL || + handle == (HANDLE) -2) { + *dup = INVALID_HANDLE_VALUE; + uv__set_artificial_error(loop, UV_EBADF); + return -1; + } + current_process = GetCurrentProcess(); if (!DuplicateHandle(current_process, @@ -208,7 +222,7 @@ static int uv__duplicate_fd(uv_loop_t* loop, int fd, HANDLE* dup) { return -1; } - handle = (HANDLE)_get_osfhandle(fd); + handle = (HANDLE) _get_osfhandle(fd); return uv__duplicate_handle(loop, handle, dup); } @@ -355,7 +369,7 @@ int uv__stdio_create(uv_loop_t* loop, uv_process_options_t* options, break; case FILE_TYPE_UNKNOWN: - if (GetLastError != 0) { + if (GetLastError() != 0) { uv__set_sys_error(loop, GetLastError()); CloseHandle(child_handle); goto error; diff --git a/deps/v8/src/hydrogen-instructions.cc b/deps/v8/src/hydrogen-instructions.cc index 4bb25096f7..db3c3f3f78 100644 --- a/deps/v8/src/hydrogen-instructions.cc +++ b/deps/v8/src/hydrogen-instructions.cc @@ -1631,6 +1631,7 @@ static bool PrototypeChainCanNeverResolve( if (current->IsJSGlobalProxy() || current->IsGlobalObject() || !current->IsJSObject() || + JSObject::cast(current)->map()->has_named_interceptor() || JSObject::cast(current)->IsAccessCheckNeeded() || !JSObject::cast(current)->HasFastProperties()) { return false; @@ -1685,7 +1686,8 @@ HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* context, types_.Add(types->at(i), zone); break; case MAP_TRANSITION: - if (PrototypeChainCanNeverResolve(map, name)) { + if (!map->has_named_interceptor() && + PrototypeChainCanNeverResolve(map, name)) { negative_lookups.Add(types->at(i), zone); } break; @@ -1693,7 +1695,8 @@ HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* context, break; } } else if (lookup.IsCacheable()) { - if (PrototypeChainCanNeverResolve(map, name)) { + if (!map->has_named_interceptor() && + PrototypeChainCanNeverResolve(map, name)) { negative_lookups.Add(types->at(i), zone); } } diff --git a/deps/v8/src/version.cc b/deps/v8/src/version.cc index 75abe57148..f6afc47cca 100644 --- a/deps/v8/src/version.cc +++ b/deps/v8/src/version.cc @@ -35,7 +35,7 @@ #define MAJOR_VERSION 3 #define MINOR_VERSION 11 #define BUILD_NUMBER 10 -#define PATCH_LEVEL 17 +#define PATCH_LEVEL 18 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) #define IS_CANDIDATE_VERSION 0 diff --git a/doc/about/index.html b/doc/about/index.html index a94aa99b69..07e95bb054 100644 --- a/doc/about/index.html +++ b/doc/about/index.html @@ -28,7 +28,7 @@ <div id="column2" class="interior"> <ul> <li><a href="/" class="home">Home</a></li> - <li><a href="/#download" class="download">Download</a></li> + <li><a href="/download/" class="download">Download</a></li> <li><a href="/about/" class="about current">About</a></li> <li><a href="http://search.npmjs.org/" class="npm">npm Registry</a></li> <li><a href="http://nodejs.org/api/" class="docs">Docs</a></li> diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 3bd79f2130..092cb31e29 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -181,7 +181,7 @@ Here is an example of sending a server: child.send('server', server); }); -And the child would the recive the server object as: +And the child would the receive the server object as: process.on('message', function(m, server) { if (m === 'server') { @@ -196,7 +196,7 @@ that some connections will be handled by the parent and some by the child. **send socket object** -Here is an example of sending a socket. It will spawn two childs and handle +Here is an example of sending a socket. It will spawn two children and handle connections with the remote address `74.125.127.100` as VIP by sending the socket to a "special" child process. Other sockets will go to a "normal" process. @@ -228,7 +228,7 @@ The `child.js` could look like this: Note that once a single socket has been sent to a child the parent can no longer keep track of when the socket is destroyed. To indicate this condition the `.connections` property becomes `null`. -It is also recomended not to use `.maxConnections` in this condition. +It is also recommended not to use `.maxConnections` in this condition. ### child.disconnect() @@ -266,8 +266,7 @@ Use `env` to specify environment variables that will be visible to the new proce Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the exit code: - var util = require('util'), - spawn = require('child_process').spawn, + var spawn = require('child_process').spawn, ls = spawn('ls', ['-lh', '/usr']); ls.stdout.on('data', function (data) { @@ -285,8 +284,7 @@ Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the exit cod Example: A very elaborate way to run 'ps ax | grep ssh' - var util = require('util'), - spawn = require('child_process').spawn, + var spawn = require('child_process').spawn, ps = spawn('ps', ['ax']), grep = spawn('grep', ['ssh']); diff --git a/doc/blog.html b/doc/blog.html index 6d55b8fe9c..153e3ba9ae 100644 --- a/doc/blog.html +++ b/doc/blog.html @@ -81,7 +81,7 @@ <ul> <li><a href="http://nodejs.org/" class="home">Home</a></li> - <li><a href="http://nodejs.org/#download" class= + <li><a href="http://nodejs.org/download/" class= "download">Download</a></li> <li><a href="http://nodejs.org/about/" class="about">About</a></li> diff --git a/doc/blog/release/0.6.21.md b/doc/blog/release/0.6.21.md new file mode 100644 index 0000000000..6257b680c5 --- /dev/null +++ b/doc/blog/release/0.6.21.md @@ -0,0 +1,43 @@ +version: 0.6.21 +title: Version 0.6.21 (maintenance) +category: release +slug: node-v0-6-21-maintenance +date: Fri Aug 03 2012 14:44:02 GMT-0700 (PDT) + +2012.08.03 Version 0.6.21 (maintenance) + +* sunos: work around OS bug to prevent fs.watch() from spinning (Bryan Cantrill) + +* net: make pause/resume work with connecting sockets (Bert Belder) + + +Source Code: http://nodejs.org/dist/v0.6.21/node-v0.6.21.tar.gz + +Windows Installer: http://nodejs.org/dist/v0.6.21/node-v0.6.21.msi + +Windows x64 Files: http://nodejs.org/dist/v0.6.21/x64/ + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.6.21/node-v0.6.21.pkg + +Other release files: http://nodejs.org/dist/v0.6.21/ + +Website: http://nodejs.org/docs/v0.6.21/ + +Documentation: http://nodejs.org/docs/v0.6.21/api/ + +Shasums: + +``` +04f58b0da23c3db291d84ac55a924332ad83c427 node-v0.6.21.pkg +31f564bf34c64b07cae3b9a88a87b4a08bab4dc5 node-v0.6.21.tar.gz +1e3184fe2cfe7140a88b5dcc9c2ec7d32f1f5af5 node.exe +b8887a056152622c08ee10f5867bd27910260477 node.exp +c6468ffe2e145e7db1bb3e2d66adb9f5d50271ad node.lib +2a896bcb7c83f2fa710650116580daf4ac5e6c4c node.msi +207441e8c3dc184c478367b775dc7ece1ee36501 node.pdb +715ad9946db5f97c54a53bdea6bbe9ba69f2f299 x64/node.exe +2fa2c2d82fedeec1ed8be5d908b790f473d4a7c2 x64/node.exp +b403cb71d4cf21e97a78d446403cedc9795bcf69 x64/node.lib +ef47520dbc6a1a68ec37d290c421031cfd670048 x64/node.msi +fb15e3991c420f3ae67ade92b11b07bb9112124a x64/node.pdb +``` diff --git a/doc/blog/release/v0.8.6.md b/doc/blog/release/v0.8.6.md new file mode 100644 index 0000000000..76cc072c81 --- /dev/null +++ b/doc/blog/release/v0.8.6.md @@ -0,0 +1,85 @@ +version: 0.8.6 +title: Version 0.8.6 (stable) +category: release +slug: node-v0-8-6-stable +date: 2012-08-07T19:03:55.905Z + +2012.08.07, Version 0.8.6 (Stable) + +This is the first release to include binary distributions for all +supported Unix operating systems (Linux, Darwin, and SunOS). To use +the binary distribution tarballs, you can unpack them directly into a +destination directory: + + cd ~/node/ # or /usr/local if you're feeling brave + tar xzvf /path/to/binary.tar.gz --strip=1 + +This is an experimental feature. Please use it and provide feedback. + +* npm: Upgrade to v1.1.48 + +* Add 'make binary' to build binary tarballs for all Unixes (Nathan Rajlich) + +* zlib: Emit 'close' on destroy(). (Dominic Tarr) + +* child_process: Fix stdout=null when stdio=['pipe'] (Tyler Neylon) + +* installer: prevent ETXTBSY errors (Ben Noordhuis) + +* installer: honor --without-npm, default install path (Ben Noordhuis) + +* net: make pause work with connecting sockets (Bert Belder) + +* installer: fix cross-compile installs (Ben Noordhuis) + +* net: fix .listen({fd:0}) (Ben Noordhuis) + +* windows: map WSANO_DATA to UV_ENOENT (Bert Belder) + + +Source Code: http://nodejs.org/dist/v0.8.6/node-v0.8.6.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.8.6/node-v0.8.6.pkg + +Windows Installer: http://nodejs.org/dist/v0.8.6/node-v0.8.6-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.8.6/x64/node-v0.8.6-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.8.6/x64/ + +Linux 32-bit Binary Package: http://nodejs.org/dist/v0.8.6/node-v0.8.6-linux-x86.tar.gz + +Linux 64-bit Binary Package: http://nodejs.org/dist/v0.8.6/node-v0.8.6-linux-x64.tar.gz + +Solaris 32-bit Binary Package: http://nodejs.org/dist/v0.8.6/node-v0.8.6-sunos-x86.tar.gz + +Solaris 64-bit Binary Package: http://nodejs.org/dist/v0.8.6/node-v0.8.6-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.8.6/ + +Website: http://nodejs.org/docs/v0.8.6/ + +Documentation: http://nodejs.org/docs/v0.8.6/api/ + +Shasums: + +``` +c23a57601150b3ec59aeeb0eef607d9e430e17c2 node-v0.8.6-darwin-x64.tar.gz +8f7e4e837f61991eff4605678ab27c82e854bc38 node-v0.8.6-darwin-x86.tar.gz +32ce9d28d6a294878ce9ee8f23b6fa7ecb3130e7 node-v0.8.6-linux-x64.tar.gz +6f71518f044705ff1a7d9400a573906a99c5834c node-v0.8.6-linux-x86.tar.gz +ec9c02e9713a81d8f4848924cc38e5ed28a06fc4 node-v0.8.6-sunos-x64.tar.gz +ac96cc4ce3eee4dc54ef7936ad4fd8eb04fbe359 node-v0.8.6-sunos-x86.tar.gz +0a2aca229c9cb2ec4a4a82ff88de7ea0868d1890 node-v0.8.6-x86.msi +84127d73a968f5951a9682b592a79779d1396c9e node-v0.8.6.pkg +34c7ad2bb5450653748c65840155852d67742258 node-v0.8.6.tar.gz +42f3b792326efdfc9b0d95eebd7f9f716cadb1c0 node.exe +fc56e816081ebef450ce7ed92bfd543d53191ac3 node.exp +e91f1648e4e8f7586790443248326222101c286c node.lib +8106b33d1cdae69103ca07b16c7f5d690308d751 node.pdb +6226474859e1cf2f1314d92b6207183bb36c6007 x64/node-v0.8.6-x64.msi +3c1ac597956ea9f1e7eab62f85a23e3e436cd0e8 x64/node.exe +599df091faecff536f52d17463c70e07cf9ed54f x64/node.exp +70bac4dcb9f845c8c8cb9443ff09f839fc86aac7 x64/node.lib +eb59a0ed841c9e93c406b4c636b2048973cbfae4 x64/node.pdb +``` diff --git a/doc/blog/release/v0.8.7.md b/doc/blog/release/v0.8.7.md new file mode 100644 index 0000000000..35031cd0b7 --- /dev/null +++ b/doc/blog/release/v0.8.7.md @@ -0,0 +1,75 @@ +version: 0.8.7 +title: Version 0.8.7 (stable) +category: release +slug: node-v0-8-7-stable +date: 2012-08-15T23:23:16.131Z + +2012.08.15, Version 0.8.7 (Stable) + +* npm: Upgrade to 1.1.49 + +* website: download page (Golo Roden) + +* crypto: fix uninitialized memory access in openssl (Ben Noordhuis) + +* buffer, crypto: fix buffer decoding (Ben Noordhuis) + +* build: compile with -fno-tree-vrp when gcc >= 4.0 (Ben Noordhuis) + +* tls: handle multiple CN fields when verifying cert (Ben Noordhuis) + +* doc: remove unused util from child_process (Kyle Robinson Young) + +* build: rework -fvisibility=hidden detection (Ben Noordhuis) + +* windows: don't duplicate invalid stdio handles (Bert Belder) + +* windows: fix typos in process-stdio.c (Bert Belder) + + +Source Code: http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.8.7/node-v0.8.7.pkg + +Windows Installer: http://nodejs.org/dist/v0.8.7/node-v0.8.7-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.8.7/x64/node-v0.8.7-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.8.7/x64/ + +Linux 32-bit Binary: http://nodejs.org/dist/v0.8.7/node-v0.8.7-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/v0.8.7/node-v0.8.7-linux-x64.tar.gz + +Solaris 32-bit Binary: http://nodejs.org/dist/v0.8.7/node-v0.8.7-sunos-x86.tar.gz + +Solaris 64-bit Binary: http://nodejs.org/dist/v0.8.7/node-v0.8.7-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.8.7/ + +Website: http://nodejs.org/docs/v0.8.7/ + +Documentation: http://nodejs.org/docs/v0.8.7/api/ + +Shasums: + +``` +3ff82e65a845a2d5f27ea57e8a1e29e6d10f5128 node-v0.8.7-darwin-x64.tar.gz +d72ac02727aaefa094f8d06a0a124078da007df0 node-v0.8.7-darwin-x86.tar.gz +0882e19157e98c3e2214e772e3ae714125863ae6 node-v0.8.7-linux-x64.tar.gz +3e388d47f6e79acccfab117cceaeed19ceb1b14c node-v0.8.7-linux-x86.tar.gz +ffb81708df10d3c225d8f2ce57965a40db6ca556 node-v0.8.7-sunos-x64.tar.gz +19df6ae999e4a5c1dada83b72516b3941eeb701e node-v0.8.7-sunos-x86.tar.gz +19f90a0cfa41c7eaf683393d46d06aecc2f99f84 node-v0.8.7-x86.msi +0c2dcf2d5491be7b429681193a13c18de1ba488a node-v0.8.7.pkg +58ffb5884304e2f8415d8cee7921c42f66fc8d7b node-v0.8.7.tar.gz +ecaee480f0337e92870ca83aed1b49863b3f659d node.exe +ea2e25daad114692357383bfc8b4ac910fe02d99 node.exp +70c8f054a5c42f6d4e3ca5154ca1a360f549d66f node.lib +180bcc036cd5deaef49bf12fddeeafc2e78152e3 node.pdb +12ad712ff9e28eb1bdf7e508ce3a2b872ec37d4d x64/node-v0.8.7-x64.msi +c30607099ad4699b11e3ca37f94a9da196a36dc6 x64/node.exe +f864ed339952604c2205e25927fb4851da5b79b6 x64/node.exp +ce711929befe756f942a039213aeece2ef3edcc1 x64/node.lib +11bb755b054bc6ee2e441758f7d42d131cf6d557 x64/node.pdb +``` diff --git a/doc/changelog-foot.html b/doc/changelog-foot.html index 1bb70dfd20..aca89c27a0 100644 --- a/doc/changelog-foot.html +++ b/doc/changelog-foot.html @@ -4,7 +4,7 @@ <div id="footer"> <ul class="clearfix"> <li><a href="/">Node.js</a></li> - <li><a href="/#download">Download</a></li> + <li><a href="/download/">Download</a></li> <li><a href="/about/">About</a></li> <li><a href="http://search.npmjs.org/">npm Registry</a></li> <li><a href="http://nodejs.org/api/">Docs</a></li> diff --git a/doc/changelog-head.html b/doc/changelog-head.html index 7e78c61c60..fdab340267 100644 --- a/doc/changelog-head.html +++ b/doc/changelog-head.html @@ -17,7 +17,7 @@ <div id="column2" class="interior"> <ul> <li><a href="/" class="home">Home</a></li> - <li><a href="/#download" class="download">Download</a></li> + <li><a href="/download/" class="download">Download</a></li> <li><a href="/about/" class="about">About</a></li> <li><a href="http://search.npmjs.org/" class="npm">npm Registry</a></li> <li><a href="http://nodejs.org/api/" class="docs current">Docs</a></li> diff --git a/doc/community/index.html b/doc/community/index.html index bb4e17baa4..1ce9679778 100644 --- a/doc/community/index.html +++ b/doc/community/index.html @@ -30,7 +30,7 @@ <div id="column2" class="interior"> <ul> <li><a href="/" class="home">Home</a></li> - <li><a href="/#download" class="download">Download</a></li> + <li><a href="/download/" class="download">Download</a></li> <li><a href="/about/" class="about">About</a></li> <li><a href="http://search.npmjs.org/" class="npm">npm Registry</a></li> <li><a href="http://nodejs.org/api/" class="docs">Docs</a></li> @@ -179,7 +179,7 @@ <div id="footer"> <ul class="clearfix"> <li><a href="/">Node.js</a></li> - <li><a href="/#download">Download</a></li> + <li><a href="/download/">Download</a></li> <li><a href="/about/">About</a></li> <li><a href="http://search.npmjs.org/">npm Registry</a></li> <li><a href="http://nodejs.org/api/">Docs</a></li> diff --git a/doc/download/index.html b/doc/download/index.html new file mode 100644 index 0000000000..bb753fd450 --- /dev/null +++ b/doc/download/index.html @@ -0,0 +1,164 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <style> + ul { + padding: 0; + margin: 0; + } + </style> + <link type="image/x-icon" rel="icon" href="../favicon.ico"> + <link type="image/x-icon" rel="shortcut icon" href="../favicon.ico"> + <link rel="stylesheet" href="../pipe.css"> + <link rel="stylesheet" href="../sh_vim-dark.css"> + <link rel="alternate" + type="application/rss+xml" + title="node blog" + href="http://feeds.feedburner.com/nodejs/123123123"> + <title>node.js</title> + </head> + <body class="int" id="download-page"> + <div id="intro" class="interior"> + <a href="/" title="Go back to the home page"> + <img id="logo" src="http://nodejs.org/images/logo.png" alt="node.js"> + </a> + </div> + <div id="content" class="clearfix"> + <div id="column2" class="interior"> + <ul> + <li><a href="/" class="home">Home</a></li> + <li><a href="/download/" class="download current">Download</a></li> + <li><a href="/about/" class="about">About</a></li> + <li><a href="http://search.npmjs.org/" class="npm">npm Registry</a></li> + <li><a href="http://nodejs.org/api/" class="docs">Docs</a></li> + <li><a href="http://blog.nodejs.org" class="blog">Blog</a></li> + <li><a href="/community/" class="community">Community</a></li> + <li><a href="/logos/" class="logos">Logos</a></li> + <li><a href="http://jobs.nodejs.org/" class="jobs">Jobs</a></li> + </ul> + <p class="twitter"><a href="http://twitter.com/nodejs">@nodejs</a></p> + </div> + <div id="column1" class="interior row"> + <div class="interior row"> + <p> + Download the Node.js source code or a pre-built installer for your platform, and start developing today. + </p> + <p>Current version: <b>__VERSION__</b></p> + </div> + + <div class="interior row"> + <div id="installers"> + <ul> + <li> + <a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-x86.msi"> + <img src="http://nodejs.org/images/platform-icon-win.png" + height=50 width=45 alt=""> + Windows Installer + <small>node-__VERSION__-x86.msi</small> + </a> + </li> + <li> + <a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__.pkg"> + <img src="http://nodejs.org/images/platform-icon-osx.png" + height=50 width=45 alt=""> + Macintosh Installer + <small>node-__VERSION__.pkg</small> + </a> + </li> + <li id="source"> + <a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__.tar.gz"> + <img src="http://nodejs.org/images/platform-icon-generic.png" + height=50 width=45 alt=""> + Source Code + <small>node-__VERSION__.tar.gz</small> + </a> + </li> + </ul> + </div> + + <table style="font-size:14px"> + <tr> + <th>Windows Installer (.msi)</th> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-x86.msi">32-bit</a></td> + <td><a href="http://nodejs.org/dist/__VERSION__/x64/node-__VERSION__-x64.msi">64-bit</a></td> + </tr> + + <tr> + <th>Windows Binary (.exe)</th> + <td><a href="http://nodejs.org/dist/__VERSION__/node.exe">32-bit</a></td> + <td><a href="http://nodejs.org/dist/__VERSION__/x64/node.exe">64-bit</a></td> + </tr> + + <tr> + <th>Mac OS X Installer (.pkg)</th> + <td colspan=2><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__.pkg">Universal</a></td> + </tr> + + <tr> + <th>Mac OS X Binaries (.tar.gz)</strong></th> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-darwin-x86.tar.gz">32-bit</a></td> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-darwin-x64.tar.gz">64-bit</a></td> + </tr> + + <!-- TODO Uncomment when we have these + <tr> + <th>Linux Installer (.deb)</th> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-linux-x86.deb">32-bit</a></td> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-linux-x64.deb">64-bit</a></td> + </tr> + + <tr> + <th>Linux Installer (.rpm)</th> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-linux-x86.rpm">32-bit</a></td> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-linux-x64.rpm">64-bit</a></td> + </tr> + --> + + <tr> + <th>Linux Binaries (.tar.gz)</th> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-linux-x86.tar.gz">32-bit</a></td> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-linux-x64.tar.gz">64-bit</a></td> + </tr> + + <tr> + <th>SunOS Binaries (.tar.gz)</th> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-sunos-x86.tar.gz">32-bit</a></td> + <td><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-sunos-x64.tar.gz">64-bit</a</td> + </tr> + + <tr> + <th>Source Code</th> + <td colspan=2> + <a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__.tar.gz">node-__VERSION__.tar.gz</a> + </td> + </tr> + </table> + + <h2 style="margin-top:1em" id=other-info>Other Info</h2> + <ul> + <li><a href="http://nodejs.org/dist/__VERSION__/SHASUMS.txt">Shasums</a></li> + <li><a href="https://raw.github.com/joyent/node/__VERSION__/ChangeLog">Change Log</a></li> + + <li><a href="http://nodejs.org/docs/__VERSION__/api/">Documentation</a></li> + + <li><a href="https://github.com/joyent/node">Git Repository</a></li> + <li><a href="https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager">Installing from package managers</a> + + <li><a href="http://nodejs.org/dist/__VERSION__">Other release files</a></li> + <li><a href="http://nodejs.org/dist/">Other releases</a></li> + </ul> + </div> + + <div class="interior row"> + <h2 id="license">License</h2> + <p> + Node.js is released under the MIT + license, and bundles other liberally licensed OSS components. + <a + href="https://raw.github.com/joyent/node/__VERSION__/LICENSE">Download the license</a></p> + </div> + </div> + </div> + </body> +</html> diff --git a/doc/images/platform-icon-generic.png b/doc/images/platform-icon-generic.png Binary files differnew file mode 100644 index 0000000000..90fc36a08c --- /dev/null +++ b/doc/images/platform-icon-generic.png diff --git a/doc/images/platform-icon-osx.png b/doc/images/platform-icon-osx.png Binary files differnew file mode 100644 index 0000000000..0bd6582c4c --- /dev/null +++ b/doc/images/platform-icon-osx.png diff --git a/doc/images/platform-icon-win.png b/doc/images/platform-icon-win.png Binary files differnew file mode 100644 index 0000000000..8282598613 --- /dev/null +++ b/doc/images/platform-icon-win.png diff --git a/doc/index.html b/doc/index.html index 6c1c82dcd8..fc26d9b8a7 100644 --- a/doc/index.html +++ b/doc/index.html @@ -29,12 +29,51 @@ lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.</p> - <a href="#download" class="button" id="downloadbutton">Download</a> - <a href="api/" class="button" id="docsbutton">Docs</a> - <p class="version">__VERSION__</p> + <div class=buttons> + <a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__.tar.gz" class="button downloadbutton" id="downloadbutton">INSTALL</a> + + <a href="download/" class=button id="all-dl-options">Downloads</a + ><a href="api/" class="button" id="docsbutton">API Docs</a> + </div> <a href="http://github.com/joyent/node"><img class="forkme" src="images/forkme.png" alt="Fork me on GitHub"></a> </div> + + <script>;(function(d,n){ + var os = n.platform.match(/(Win|Mac|Linux)/); + var x = n.userAgent.match(/x86_64|Win64|WOW64/) || n.cpuClass === 'x64' ? + 'x64' : 'x86'; + var base = 'http://nodejs.org/dist/__VERSION__/'; + var href = 'node-__VERSION__.tar.gz'; + var db = d.getElementById('downloadbutton'); + var d2; + switch (os && os[1]) { + case 'Mac': + href = 'node-__VERSION__.pkg'; + break; + case 'Win': + href = 'node-__VERSION__-x' + x + '.msi'; + break; + + // TODO uncomment when we have these + // case 'Linux': + // // two buttons: .deb and .rpm + // href = 'node-__VERSION__-' + x + '.rpm'; + // var d2 = document.createElement('a'); + // d2.href = base + 'node-__VERSION__-' + x + '.deb'; + // d2.className = 'button downloadbutton'; + // d2.innerHTML = 'INSTALL .deb'; + // db.innerHTML = 'INSTALL .rpm'; + // db.parentNode.insertBefore(d2, db); + // break; + } + + db.href = base + href; + // if there's one download option, then download it at #download + if (location.hash === '#download' && !d2) + location.replace(b.href); + })(document,navigator);</script> + <div id="quotes" class="clearfix"> <h2>Node.js in the Industry</h2> <ul> @@ -77,81 +116,6 @@ </ul> </div> - <div id="download"> - <a href="#" id="download-close">X</a> - <img id="download-logo" src="http://nodejs.org/images/download-logo.png" alt="node.js"> - <ul id="installers" class="clearfix"> - <li><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__-x86.msi">Windows Installer</a><br>node-__VERSION__-x86.msi</li> - <li><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__.pkg">Macintosh Installer</a><br>node-__VERSION__.pkg</li> - <li id="source"><a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__.tar.gz">Source Code</a><br>node-__VERSION__.tar.gz</li> - </ul> - <ul id="documentation"> - <li><a href="https://raw.github.com/joyent/node/__VERSION__/ChangeLog">Change Log</a></li> - <li><a href="http://nodejs.org/docs/__VERSION__/api/">Documentation</a></li> - <li><a href="http://nodejs.org/dist/__VERSION__">Other release files</a></li> - <li><a href="http://nodejs.org/dist/__VERSION__/x64/node-__VERSION__-x64.msi">Windows x64 Installer</a></li> - <li><a href="https://raw.github.com/joyent/node/__VERSION__/LICENSE">License</a></li> - <li><a href="https://github.com/joyent/node">Git Repository</a></li> - <li><a href="https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager">Installing - with a Package Manager</a> - </ul> - </div> - - <script>;(function() { - // attach as soon as the required elements are in the DOM. - // don't need to wait for entire document to be ready, since we're - // not adding any *new* nodes to the <body>, so there's no threat - // of 'Invalid operation' errors in old MSIE 6. - document.getElementById('downloadbutton').onclick = function(e) { - e = e || window.event; - e.stopPropagation && e.stopPropagation(); - e.cancelBubble = true; - // need to give the hash a tick to update - setTimeout(downloadDialogUpdate, 0); - }; - - document.getElementById('download-close').onclick = - document.documentElement.onclick = function(e) { - e = e || window.event; - if (location.hash === '#download') location.hash = ''; - downloadDialogUpdate(); - }; - - document.getElementById('download').onclick = function(e) { - e = e || window.event; - e.stopPropagation && e.stopPropagation(); - e.cancelBubble = true; - }; - - // I keep expecting <Esc> to close the dialog... - document.documentElement.onkeydown = function(e) { - e = e || window.event; - var k = e.which || e.keyCode || e.keyIdentifier; - if (typeof k === 'string') k = k.charCodeAt(0); - if (k === 27) document.documentElement.onclick(e); - }; - - // hacky workaround for old ie browsers that don't support :target css. - function downloadDialogUpdate () { - var div = document.getElementById('download'); - if (!div) return; - var expect = location.hash === '#download' ? 'block' : 'none'; - var actual = div.currentStyle ? div.currentStyle.display - : window.getComputedStyle - ? document.defaultView.getComputedStyle(div, null).getPropertyValue('display') - : null; - - // it looks like a string, but it might not actually be a string. - // explicitly cast for MSIE 6 and 7. - actual = '' + actual; - expect = '' + expect; - if (actual !== expect) { - div.style.display = expect; - } - } - downloadDialogUpdate(); - })();</script> - <div id="content" class="clearfix"> <div id="column1"> <h2>An example: Webserver</h2> @@ -204,7 +168,7 @@ server.listen(1337, '127.0.0.1');</pre> <div id="footer"> <ul class="clearfix"> <li><a href="/">Node.js</a></li> - <li><a href="/#download">Download</a></li> + <li><a href="/download/">Download</a></li> <li><a href="/about/">About</a></li> <li><a href="http://search.npmjs.org/">npm Registry</a></li> <li><a href="http://nodejs.org/api/">Docs</a></li> diff --git a/doc/pipe.css b/doc/pipe.css index 286c1a6fca..e17251bbab 100644 --- a/doc/pipe.css +++ b/doc/pipe.css @@ -65,18 +65,13 @@ h1 a, h2 a, h3 a, h4 a margin: 0 auto; text-align: center; color: #d2d8ba; - - /* preload platform-icons.png */ - background-image: url(http://nodejs.org/images/platform-icons.png); - background-repeat: no-repeat; - background-position: -999em -999em; } #intro p { width: 680px; line-height: 180%; padding-top: 30px; - margin: 0 auto 30px auto; + margin: 0 auto; font-size: 14px; } @@ -89,17 +84,27 @@ h1 a, h2 a, h3 a, h4 a font-size: 12px; } +#intro .buttons { + height:auto; + overflow:hidden; + _zoom:1; + width:300px; + margin:0 auto; +} + #intro .button { font-weight: bold; - font-size: 14px; - text-transform: uppercase; - padding: 6px 12px; + font-size: 12px; + padding: 6px 0; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - margin: 0 1px; + margin: 30px 4px 0; + + display:inline-block; color: #46483e; background-color: #9a9f8b; + width:96px; } #intro .forkme { @@ -114,11 +119,17 @@ h1 a, h2 a, h3 a, h4 a background-color: #aab293; } -#intro #downloadbutton { +#intro #docsbutton { + clear:left; +} + +#intro .downloadbutton { background-color: #8BC84B; + width:200px; + font-size:14px; } -#intro #downloadbutton:hover { +#intro .downloadbutton:hover { background-color: #73a53e; } @@ -179,10 +190,93 @@ h1 a, h2 a, h3 a, h4 a float: left; } -#content p { +#content p, +#content ul { font-size: 14px; line-height:24px; } + +#content ul { + margin-top:1em; +} + +#content table { + font-size:14px; + line-height:24px; + width:100%; +} + +#download-page #installers { + width:600px; + display:table; + margin-bottom:1em; +} + +#download-page #installers ul { + width: auto; + text-align: center; + margin: 0 auto; + display:table-row; + width:600px; +} + +#download-page #installers ul img { + display:block; + margin:0 auto; +} + +#download-page #installers ul a { + display:block; + width:100%; + text-decoration:none; + font-size: 16px; + padding-top:1em; +} + +#download-page #installers ul a:hover, +#download-page #installers ul a:active { + background:#666; + color: #8cc84b; +} + + +#download-page #installers ul li { + width:33%; + display:table-cell; +} +#download-page #installers a small { + font-size: 10px; + display:block; + color:#eee; +} + +#download-page #content th { + text-align:left; + width:33%; +} + +#download-page #content table { + table-collapse:separate; +} + +#download-page #content td, +#download-page #content th { + border:1px solid #666; +} + +#download-page #content td a { + display:block; + height:100%; + width:100%; + text-align:center; +} + +#download-page #content td a:hover, +#download-page #content td a:active { + background:#666; + color: #8cc84b; +} + #front #content p { font-size:12px; } @@ -308,6 +402,7 @@ h1 a, h2 a, h3 a, h4 a .row h2.conferences { background-position: left -522px; } .row h2.localized { background-position: left -414px; } .row h2.irc { background-position: left -626px; } +.row h2.installers { background-position: left -522px; } .block { width: 280px; @@ -329,6 +424,7 @@ h1 a, h2 a, h3 a, h4 a } #explore li { + font-size:12px; list-style-type: none; color: #d2d8ba; line-height: 14px; @@ -447,111 +543,18 @@ h1 a, h2 a, h3 a, h4 a } - -div#download { - position: absolute; - width: 580px; - text-align: center; - top: 0; - left: 50%; - margin-left: -290px; - -webkit-border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomright: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; - padding-top: 40px; - -webkit-box-shadow: 0 0 32px #000; - -moz-box-shadow: 0 0 32px #000; - box-shadow: 0 0 32px #000; - background:white; - display: none; -} - -div#download:target { - display: block; -} - -#download-close { - background: url(http://nodejs.org/images/close-downloads.png) no-repeat top right; - width: 64px; - height: 64px; - position: absolute; - display: block; - top:0; - right:0; - text-indent:-999em; -} - -div#download ul#installers { - width: 550px; - text-align: center; - margin: 0 auto; - background: url(http://nodejs.org/images/platform-icons.png) no-repeat top center; - padding-top: 65px; - padding-bottom: 50px; -} - -div#download ul#installers li { - list-style-type: none; - width: 165px; - padding-left: 18px; - float: left; - display: block; - color: #33342d; - font-size: 10px; -} - -div#download ul#installers li#source { - padding-left: 0; -} - -div#download ul#installers li a { - font-size: 16px; - padding-top: 50px; - margin-top: -50px; -} - -div#download ul#documentation { - background-color: #d4d7c3; - padding: 20px 0 20px 40px; - -webkit-border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomright: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} - -div#download ul#documentation li { - margin-left: 40px; - text-align: left; - color: #33342d; - font-size: 14px; - font-weight: bold; - padding-bottom: 5px; -} - -div#download ul#documentation li a { - color: #76a83f; -} - -#download-logo { - margin-bottom: 37px; -} - - pre, tt, code { - color: #d2d8ba; +pre, tt, code { + color: #d2d8ba; font-size: 14px; line-height: 22px; font-family: Monaco, Consolas, "Lucida Console", monospace; margin: 0; padding: 0; - } - #front pre, #front tt, #front code { +} + +#front pre, #front tt, #front code { font-size:12px; line-height:22px; - } +} pre { padding-left: 1em; diff --git a/doc/template.html b/doc/template.html index d6aa074a9a..65abc9ceb1 100644 --- a/doc/template.html +++ b/doc/template.html @@ -17,7 +17,7 @@ <div id="column2" class="interior"> <ul> <li><a href="/" class="home">Home</a></li> - <li><a href="/#download" class="download">Download</a></li> + <li><a href="/download/" class="download">Download</a></li> <li><a href="/about/" class="about">About</a></li> <li><a href="http://search.npmjs.org/" class="npm">npm Registry</a></li> <li><a href="http://nodejs.org/api/" class="docs current">Docs</a></li> @@ -55,7 +55,7 @@ <div id="footer"> <ul class="clearfix"> <li><a href="/">Node.js</a></li> - <li><a href="/#download">Download</a></li> + <li><a href="/download/">Download</a></li> <li><a href="/about/">About</a></li> <li><a href="http://search.npmjs.org/">npm Registry</a></li> <li><a href="http://nodejs.org/api/">Docs</a></li> diff --git a/lib/child_process.js b/lib/child_process.js index 972f68ce27..ecd7559abb 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -709,9 +709,10 @@ ChildProcess.prototype.spawn = function(options) { } // At least 3 stdio will be created - if (stdio.length < 3) { - stdio = stdio.concat(new Array(3 - stdio.length)); - } + // Don't concat() a new Array() because it would be sparse, and + // stdio.reduce() would skip the sparse elements of stdio. + // See http://stackoverflow.com/a/5501711/3561 + while (stdio.length < 3) stdio.push(undefined); // Translate stdio into C++-readable form // (i.e. PipeWraps or fds) @@ -597,7 +597,7 @@ fs.symlink = function(destination, path, type_, callback) { var type = (typeof type_ === 'string' ? type_ : null); var callback = makeCallback(arguments[arguments.length - 1]); - binding.symlink(preprocessSymlinkDestination(destination), + binding.symlink(preprocessSymlinkDestination(destination, type), pathModule._makeLong(path), type, callback); @@ -606,7 +606,7 @@ fs.symlink = function(destination, path, type_, callback) { fs.symlinkSync = function(destination, path, type) { type = (typeof type === 'string' ? type : null); - return binding.symlink(preprocessSymlinkDestination(destination), + return binding.symlink(preprocessSymlinkDestination(destination, type), pathModule._makeLong(path), type); }; diff --git a/lib/net.js b/lib/net.js index 3ec1687de5..5201977ed0 100644 --- a/lib/net.js +++ b/lib/net.js @@ -901,8 +901,9 @@ Server.prototype._listen2 = function(address, port, addressType, backlog, fd) { if (!self._handle) { self._handle = createServerHandle(address, port, addressType, fd); if (!self._handle) { + var error = errnoException(errno, 'listen'); process.nextTick(function() { - self.emit('error', errnoException(errno, 'listen')); + self.emit('error', error); }); return; } diff --git a/lib/tls.js b/lib/tls.js index 0edd9d200f..f444fd0e9d 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -154,7 +154,14 @@ function checkServerIdentity(host, cert) { // And only after check if hostname matches CN // (because CN is deprecated, but should be used for compatiblity anyway) - dnsNames.push(regexpify(cert.subject.CN, false)); + var commonNames = cert.subject.CN; + if (Array.isArray(commonNames)) { + for (var i = 0, k = commonNames.length; i < k; ++i) { + dnsNames.push(regexpify(commonNames[i], false)); + } + } else { + dnsNames.push(regexpify(commonNames, false)); + } valid = dnsNames.some(function(re) { return re.test(host); diff --git a/lib/zlib.js b/lib/zlib.js index f05f6d1399..7837f3f7bc 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -455,6 +455,7 @@ Zlib.prototype.destroy = function() { this.readable = false; this.writable = false; this._ended = true; + this.emit('close'); }; util.inherits(Deflate, Zlib); diff --git a/src/node.cc b/src/node.cc index 81c125513e..44a77f8eb6 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1158,7 +1158,25 @@ ssize_t DecodeWrite(char *buf, return -1; } - Local<String> str = val->ToString(); + bool is_buffer = Buffer::HasInstance(val); + + if (is_buffer && encoding == BINARY) { // fast path, copy buffer data + const char* data = Buffer::Data(val.As<Object>()); + size_t size = Buffer::Length(val.As<Object>()); + size_t len = size < buflen ? size : buflen; + memcpy(buf, data, len); + return len; + } + + Local<String> str; + + if (is_buffer) { // slow path, convert to binary string + Local<Value> arg = String::New("binary"); + str = MakeCallback(val.As<Object>(), "toString", 1, &arg)->ToString(); + } + else { + str = val->ToString(); + } if (encoding == UTF8) { str->WriteUtf8(buf, buflen, NULL, String::HINT_MANY_WRITES_EXPECTED); diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 35ddde531b..e80611f877 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -206,7 +206,8 @@ void Buffer::Replace(char *data, size_t length, callback_(data_, callback_hint_); } else if (length_) { delete [] data_; - V8::AdjustAmountOfExternalAllocatedMemory(-(sizeof(Buffer) + length_)); + V8::AdjustAmountOfExternalAllocatedMemory( + -static_cast<intptr_t>(sizeof(Buffer) + length_)); } length_ = length; diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h index 311f3f0f42..62ea244485 100644 --- a/src/node_object_wrap.h +++ b/src/node_object_wrap.h @@ -26,6 +26,12 @@ #include "v8.h" #include <assert.h> +// Explicitly instantiate some template classes, so we're sure they will be +// present in the binary / shared object. There isn't much doubt that they will +// be, but MSVC tends to complain about these things. +template class NODE_EXTERN v8::Persistent<v8::Object>; +template class NODE_EXTERN v8::Persistent<v8::FunctionTemplate>; + namespace node { class NODE_EXTERN ObjectWrap { diff --git a/test/simple/test-child-process-stdio.js b/test/simple/test-child-process-stdio.js new file mode 100644 index 0000000000..32da15f5f5 --- /dev/null +++ b/test/simple/test-child-process-stdio.js @@ -0,0 +1,36 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('../common'); +var assert = require('assert'); +var spawn = require('child_process').spawn; + +var options = {stdio: ['pipe']}; +var child = common.spawnPwd(options); + +assert.notEqual(child.stdout, null); +assert.notEqual(child.stderr, null); + +options = {stdio: 'ignore'}; +child = common.spawnPwd(options); + +assert.equal(child.stdout, null); +assert.equal(child.stderr, null); diff --git a/test/simple/test-tls-check-server-identity.js b/test/simple/test-tls-check-server-identity.js index 99835f8f5e..39093a7161 100644 --- a/test/simple/test-tls-check-server-identity.js +++ b/test/simple/test-tls-check-server-identity.js @@ -34,6 +34,14 @@ var tests = [ // No wildcards in CN { host: 'b.a.com', cert: { subject: { CN: '*.a.com' } }, result: false }, + // Multiple CN fields + { + host: 'foo.com', cert: { + subject: { CN: ['foo.com', 'bar.com'] } // CN=foo.com; CN=bar.com; + }, + result: true + }, + // DNS names and CN { host: 'a.com', cert: { diff --git a/test/simple/test-zlib-destroy.js b/test/simple/test-zlib-destroy.js new file mode 100644 index 0000000000..7a1120e284 --- /dev/null +++ b/test/simple/test-zlib-destroy.js @@ -0,0 +1,36 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('../common'); +var assert = require('assert'); +var zlib = require('zlib'); + +['Deflate', 'Inflate', 'Gzip', 'Gunzip', 'DeflateRaw', 'InflateRaw', 'Unzip'] + .forEach(function (name) { + var a = false; + var zStream = new zlib[name](); + zStream.on('close', function () { + a = true; + }); + zStream.destroy(); + + assert.equal(a, true, name+'#destroy() must emit \'close\''); + }); diff --git a/tools/email-footer.md b/tools/email-footer.md index e6115c9dd5..3eb22d9ff0 100644 --- a/tools/email-footer.md +++ b/tools/email-footer.md @@ -8,6 +8,14 @@ Windows x64 Installer: http://nodejs.org/dist/__VERSION__/x64/node-__VERSION__-x Windows x64 Files: http://nodejs.org/dist/__VERSION__/x64/ +Linux 32-bit Binary: http://nodejs.org/dist/__VERSION__/node-__VERSION__-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/__VERSION__/node-__VERSION__-linux-x64.tar.gz + +Solaris 32-bit Binary: http://nodejs.org/dist/__VERSION__/node-__VERSION__-sunos-x86.tar.gz + +Solaris 64-bit Binary: http://nodejs.org/dist/__VERSION__/node-__VERSION__-sunos-x64.tar.gz + Other release files: http://nodejs.org/dist/__VERSION__/ Website: http://nodejs.org/docs/__VERSION__/ diff --git a/tools/getnodeisrelease.py b/tools/getnodeisrelease.py new file mode 100644 index 0000000000..a23ad2cf24 --- /dev/null +++ b/tools/getnodeisrelease.py @@ -0,0 +1,11 @@ +import sys,os,re + +node_version_h = os.path.join(os.path.dirname(__file__), '..', 'src', + 'node_version.h') + +f = open(node_version_h) + +for line in f: + if re.match('#define NODE_VERSION_IS_RELEASE', line): + release = int(line.split()[2]) + print release diff --git a/tools/install.py b/tools/install.py index 7f48232a80..ca72a55864 100755 --- a/tools/install.py +++ b/tools/install.py @@ -62,6 +62,7 @@ def try_copy(path, dst): source_path, target_path = mkpaths(path, dst) print 'installing %s' % target_path try_mkdir_r(os.path.dirname(target_path)) + try_unlink(target_path) # prevent ETXTBSY errors return shutil.copy2(source_path, target_path) def try_remove(path, dst): @@ -74,7 +75,7 @@ def install(paths, dst): map(lambda path: try_copy(path, dst), paths) def uninstall(paths, dst): map(lambda path: try_remove(path, dst), paths) def update_shebang(path, shebang): - print 'updating shebang of %s' % path + print 'updating shebang of %s to %s' % (path, shebang) s = open(path, 'r').read() s = re.sub(r'#!.*\n', '#!' + shebang + '\n', s) open(path, 'w').write(s) @@ -99,7 +100,16 @@ def npm_files(action): action([link_path], 'bin/npm') elif action == install: try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path) - update_shebang(link_path, node_prefix + '/bin/node') + if os.environ.get('PORTABLE'): + # This crazy hack is necessary to make the shebang execute the copy + # of node relative to the same directory as the npm script. The precompiled + # binary tarballs use a prefix of "/" which gets translated to "/bin/node" + # in the regular shebang modifying logic, which is incorrect since the + # precompiled bundle should be able to be extracted anywhere and "just work" + shebang = '/bin/sh\n// 2>/dev/null; exec "`dirname "$0"`/node" "$0" "$@"' + else: + shebang = os.path.join(node_prefix, 'bin/node') + update_shebang(link_path, shebang) else: assert(0) # unhandled action type @@ -146,7 +156,7 @@ def run(args): target_defaults = conf['target_defaults'] # argv[2] is a custom install prefix for packagers (think DESTDIR) - dst_dir = node_prefix = variables.get('node_prefix', '/usr/local') + dst_dir = node_prefix = variables.get('node_prefix') or '/usr/local' if len(args) > 2: dst_dir = abspath(args[2] + '/' + dst_dir) cmd = args[1] if len(args) > 1 else 'install' |