diff -Nru nodejs-0.11.14/AUTHORS nodejs-0.11.15/AUTHORS --- nodejs-0.11.14/AUTHORS 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/AUTHORS 2015-01-20 21:22:17.000000000 +0000 @@ -568,3 +568,15 @@ Jackson Tian Tristan Berger Mathias Schreck +Steven R. Loomis +Matthew Fitzsimmons +Swaagie +Emmanuel Odeke +Eric Mill +Brendan Ashworth +Alejandro Oviedo +pkcs +Saúl Ibarra Corretgé +silverwind +Steven R. Loomis +James M Snell diff -Nru nodejs-0.11.14/benchmark/misc/module-loader.js nodejs-0.11.15/benchmark/misc/module-loader.js --- nodejs-0.11.14/benchmark/misc/module-loader.js 1970-01-01 00:00:00.000000000 +0000 +++ nodejs-0.11.15/benchmark/misc/module-loader.js 2015-01-20 21:22:17.000000000 +0000 @@ -0,0 +1,72 @@ +// 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 fs = require('fs'); +var path = require('path'); +var common = require('../common.js'); +var packageJson = '{"main": "index.js"}'; + +var tmpDirectory = path.join(__dirname, '..', 'tmp'); +var benchmarkDirectory = path.join(tmpDirectory, 'nodejs-benchmark-module'); + +var bench = common.createBenchmark(main, { + thousands: [50] +}); + +function main(conf) { + rmrf(tmpDirectory); + try { fs.mkdirSync(tmpDirectory); } catch (e) {} + try { fs.mkdirSync(benchmarkDirectory); } catch (e) {} + + var n = +conf.thousands * 1e3; + for (var i = 0; i <= n; i++) { + fs.mkdirSync(benchmarkDirectory + i); + fs.writeFileSync(benchmarkDirectory + i + '/package.json', '{"main": "index.js"}'); + fs.writeFileSync(benchmarkDirectory + i + '/index.js', 'module.exports = "";'); + } + + measure(n); +} + +function measure(n) { + bench.start(); + for (var i = 0; i <= n; i++) { + require(benchmarkDirectory + i); + } + bench.end(n / 1e3); +} + +function rmrf(location) { + if (fs.existsSync(location)) { + var things = fs.readdirSync(location); + things.forEach(function(thing) { + var cur = path.join(location, thing), + isDirectory = fs.statSync(cur).isDirectory(); + if (isDirectory) { + rmrf(cur); + return; + } + fs.unlinkSync(cur); + }); + fs.rmdirSync(location); + } +} diff -Nru nodejs-0.11.14/ChangeLog nodejs-0.11.15/ChangeLog --- nodejs-0.11.14/ChangeLog 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/ChangeLog 2015-01-20 21:22:17.000000000 +0000 @@ -1,4 +1,143 @@ -2014.09.24, Version 0.11.14 (Unstable) +2015.01.20, Version 0.11.15 (Unstable) + +* v8: Upgrade to 3.28.73 + +* uv: Upgrade to 1.0.2 + +* npm: Upgrade to v2.1.6 + +* uv: float patch to revert tty breakage (Trevor Norris) + +* v8: re-implement debugger-agent (Fedor Indutny) + +* v8: apply floating irhydra patch (Fedor Indutny) + +* v8: fix postmortem-metadata generator (Refael Ackermann) + +* debugger: fix unhandled error in setBreakpoint (Miroslav Bajtoš) + +* async-wrap: add event hooks (Trevor Norris) + +* async-wrap: expose async-wrap as binding (Trevor Norris) + +* buffer, doc: misc. fix and cleanup (Trevor Norris) + +* buffer: add generic functions for (u)int ops (Yazhong Liu) + +* buffer: fix and cleanup fill() (Trevor Norris) + +* buffer: mv floating point read/write checks to JS (Trevor Norris) + +* build, i18n: improve Intl build, add "--with-intl" (Steven R. Loomis) + +* build: add small-icu support for binary packages (Julien Gilli) + +* build: do not generate support for libuv's probes (Julien Gilli) + +* build: i18n: add icu config options (Steven R. Loomis) + +* build: i18n: support little-endian machines (Steven Loomis) + +* build: vcbuild fix "The input line is too long." (Alexis Campailla) + +* child_process: improve spawn() argument handling (cjihrig) + +* cluster: avoid race enabling debugger in worker (Timothy J Fontaine) + +* cluster: cluster.disconnect() should check status (Sam Roberts) + +* cluster: do not signal children in debug mode (Fedor Indutny) + +* cluster: don't assert if worker has no handles (Sam Roberts) + +* core: fix usage of uv_cwd (Saúl Ibarra Corretgé) + +* core: replace uv_fs_readdir with uv_fs_scandir (Saúl Ibarra Corretgé) + +* crypto: createDiffieHellman throw for bad args (Trevor Norris) + +* crypto: lower RSS usage for TLSCallbacks (Fedor Indutny) + +* crypto: store thread id as pointer-sized (Alexis Campailla) + +* dns: propagate domain for c-ares methods (Chris Dickinson) + +* fs: fix symlink error message (Vladimir Kurchatkin) + +* http: Improve _addHeaderLines method (Jackson Tian) + +* http: cleanup setHeader() (Trevor Norris) + +* http: rename flush to flushHeaders (Timothy J Fontaine) + +* lib,src: fix spawnSync ignoring its 'env' option (Juanjo) + +* modules: adding load linked modules feature (Thorsten Lorenz) + +* net: Make server.connections un-enumerable (Patrick Mooney) + +* net: add pauseOnConnect option to createServer() (cjihrig) + +* net: make connect() input validation synchronous (cjihrig) + +* node: avoid automatic microtask runs (Vladimir Kurchatkin) + +* node: fix throws before timer module is loaded (Trevor Norris) + +* openssl: fix keypress requirement in apps on win32 (Fedor Indutny) + +* path: added parse() and format() functions (Rory Bradford) + +* path: allow calling platform specific methods (Timothy J Fontaine) + +* path: don't lower-cases drive letters (Bert Belder) + +* path: refactor normalizeArray() (Nathan Woltman) + +* process: pid can be a string in process.kill() (Sam Roberts) + +* readline: fix performance issue when large line (Jicheng Li) + +* readline: should not require an output stream. (Julien Gilli) + +* smalloc: check if obj has external data (Vladimir Kurchatkin) + +* smalloc: don't allow to dispose typed arrays (Vladimir Kurchatkin) + +* smalloc: fix bad assert for zero length data (Trevor Norris) + +* smalloc: fix copyOnto optimization (Vladimir Kurchatkin) + +* src: all wrap's now use actual FunctionTemplate (Trevor Norris) + +* src: fix VC++ warning C4244 (Rasmus Christian Pedersen) + +* src: remove Async Listener (Trevor Norris) + +* stream: switch _writableState.buffer to queue (Chris Dickinson) + +* streams: make setDefaultEncoding() throw (Brian White) + +* streams: set default encoding for writable streams (Johnny Ray) + +* tls: remove tls.createSecurePair code deprecation (Jackson Tian) + +* tls_wrap: ignore ZERO_RETURN after close_notify (Fedor Indutny) + +* url: change hostname regex to negate invalid chars (Jonathan Johnson) + +* url: fixed encoding for slash switching emulation. (Evan Rutledge Borden) + +* url: improve parsing speed (CGavrila) + +* url: make query() consistent (Gabriel Wicke) + +* url: support `path` for url.format (Yazhong Liu) + +* util: add es6 Symbol support for `util.inspect` (gyson) + + +2014.09.24, Version 0.11.14 (Unstable), 902090af5375e497dded310575f19de5328a9bbc * uv: Upgrade to v1.0.0-rc1 @@ -787,7 +926,60 @@ * console: `console.dir()` bypasses inspect() methods (Nathan Rajlich) -2014.09.16, Version 0.10.32 (Stable) +2014.12.22, Version 0.10.35 (Stable) + +* tls: re-add 1024-bit SSL certs removed by f9456a2 (Chris Dickinson) + +* timers: don't close interval timers when unrefd (Julien Gilli) + +* timers: don't mutate unref list while iterating it (Julien Gilli) + + +2014.12.17, Version 0.10.34 (Stable), 52795f8fcc2de77cf997e671ea58614e5e425dfe + +* uv: update to v0.10.30 + +* zlib: upgrade to v1.2.8 + +* child_process: check execFile args is an array (Sam Roberts) + +* child_process: check fork args is an array (Sam Roberts) + +* crypto: update root certificates (Ben Noordhuis) + +* domains: fix issues with abort on uncaught (Julien Gilli) + +* timers: Avoid linear scan in _unrefActive. (Julien Gilli) + +* timers: fix unref() memory leak (Trevor Norris) + +* v8: add api for aborting on uncaught exception (Julien Gilli) + +* debugger: fix when using "use strict" (Julien Gilli) + + +2014.10.20, Version 0.10.33 (Stable), 8d045a30e95602b443eb259a5021d33feb4df079 + +* openssl: Update to 1.0.1j (Addressing multiple CVEs) + +* uv: Update to v0.10.29 + +* child_process: properly support optional args (cjihrig) + +* crypto: Disable autonegotiation for SSLv2/3 by default (Fedor Indutny, + Timothy J Fontaine, Alexis Campailla) + + This is a behavior change, by default we will not allow the negotiation to + SSLv2 or SSLv3. If you want this behavior, run Node.js with either + `--enable-ssl2` or `--enable-ssl3` respectively. + + This does not change the behavior for users specifically requesting + `SSLv2_method` or `SSLv3_method`. While this behavior is not advised, it is + assumed you know what you're doing since you're specifically asking to use + these methods. + + +2014.09.16, Version 0.10.32 (Stable), 0fe0d121551593c23a565db8397f85f17bb0f00e * npm: Update to 1.4.28 @@ -839,7 +1031,7 @@ * deps: backport 4ed5fde4f from v8 upstream (Fedor Indutny) -* deps: cherry-pick eca441b2 from OpenSSL (Fedor Indutny) +* * lib: remove and restructure calls to isNaN() (cjihrig) diff -Nru nodejs-0.11.14/common.gypi nodejs-0.11.15/common.gypi --- nodejs-0.11.14/common.gypi 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/common.gypi 2015-01-20 21:22:17.000000000 +0000 @@ -26,10 +26,10 @@ }], ['GENERATOR == "ninja" or OS== "mac"', { 'OBJ_DIR': '<(PRODUCT_DIR)/obj', - 'V8_BASE': '<(PRODUCT_DIR)/libv8_base.<(target_arch).a', + 'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a', }, { 'OBJ_DIR': '<(PRODUCT_DIR)/obj.target', - 'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.<(target_arch).a', + 'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a', }], ], }, diff -Nru nodejs-0.11.14/configure nodejs-0.11.15/configure --- nodejs-0.11.14/configure 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/configure 2015-01-20 21:22:17.000000000 +0000 @@ -6,6 +6,8 @@ import shlex import subprocess import sys +import shutil +import string CC = os.environ.get('CC', 'cc') @@ -13,6 +15,10 @@ sys.path.insert(0, os.path.join(root_dir, 'tools', 'gyp', 'pylib')) from gyp.common import GetFlavor +# imports in tools/configure.d +sys.path.insert(0, os.path.join(root_dir, 'tools', 'configure.d')) +import nodedownload + # parse our options parser = optparse.OptionParser() @@ -236,21 +242,36 @@ dest='with_etw', help='build with ETW (default is true on Windows)') +parser.add_option('--download', + action='store', + dest='download_list', + help=nodedownload.help()) + parser.add_option('--with-icu-path', action='store', dest='with_icu_path', help='Path to icu.gyp (ICU i18n, Chromium version only.)') +parser.add_option('--with-icu-locales', + action='store', + dest='with_icu_locales', + help='Comma-separated list of locales for "small-icu". Default: "root,en". "root" is assumed.') + +parser.add_option('--with-intl', + action='store', + dest='with_intl', + help='Intl mode: none, full-icu, small-icu (default is none)') + +parser.add_option('--with-icu-source', + action='store', + dest='with_icu_source', + help='Intl mode: optional local path to icu/ dir, or path/URL of icu source archive.') + parser.add_option('--with-perfctr', action='store_true', dest='with_perfctr', help='build with performance counters (default is true on Windows)') -parser.add_option('--with-sslv2', - action='store_true', - dest='with_sslv2', - help='enable SSL v2') - parser.add_option('--without-dtrace', action='store_true', dest='without_dtrace', @@ -282,6 +303,16 @@ dest='without_ssl', help='build without SSL') +parser.add_option('--without-ssl2', + action='store_true', + dest='ssl2', + help='Disable SSL v2') + +parser.add_option('--without-ssl3', + action='store_true', + dest='ssl3', + help='Disable SSL v3') + parser.add_option('--xcode', action='store_true', dest='use_xcode', @@ -289,6 +320,8 @@ (options, args) = parser.parse_args() +# set up auto-download list +auto_downloads = nodedownload.parse(options.download_list) def b(value): """Returns the string 'true' if value is truthy, 'false' otherwise.""" @@ -640,11 +673,12 @@ if options.without_ssl: return - # OpenSSL uses `#ifndef OPENSSL_NO_SSL2` checks so only define the - # macro when we want to _disable_ SSL2. - if not options.with_sslv2: + if options.ssl2: o['defines'] += ['OPENSSL_NO_SSL2=1'] + if options.ssl3: + o['defines'] += ['OPENSSL_NO_SSL3=1'] + if options.shared_openssl: (libs, cflags) = pkg_config('openssl') or ('-lssl -lcrypto', '') @@ -686,13 +720,259 @@ print('ctrpp not found in WinSDK path--using pre-gen files ' 'from tools/msvs/genfiles.') +def write(filename, data): + filename = os.path.join(root_dir, filename) + print 'creating ', filename + f = open(filename, 'w+') + f.write(data) + +do_not_edit = '# Do not edit. Generated by the configure script.\n' + +def glob_to_var(dir_base, dir_sub): + list = [] + dir_all = os.path.join(dir_base, dir_sub) + files = os.walk(dir_all) + for ent in files: + (path, dirs, files) = ent + for file in files: + if file.endswith('.cpp') or file.endswith('.c') or file.endswith('.h'): + list.append('%s/%s' % (dir_sub, file)) + break + return list + +def configure_intl(o): + icus = [ + { + 'url': 'http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.zip', + # from https://ssl.icu-project.org/files/icu4c/54.1/icu4c-src-54_1.md5: + 'md5': '6b89d60e2f0e140898ae4d7f72323bca', + }, + ] + def icu_download(path): + # download ICU, if needed + for icu in icus: + url = icu['url'] + md5 = icu['md5'] + local = url.split('/')[-1] + targetfile = os.path.join(root_dir, 'deps', local) + if not os.path.isfile(targetfile): + if nodedownload.candownload(auto_downloads, "icu"): + nodedownload.retrievefile(url, targetfile) + else: + print ' Re-using existing %s' % targetfile + if os.path.isfile(targetfile): + sys.stdout.write(' Checking file integrity with MD5:\r') + gotmd5 = nodedownload.md5sum(targetfile) + print ' MD5: %s %s' % (gotmd5, targetfile) + if (md5 == gotmd5): + return targetfile + else: + print ' Expected: %s *MISMATCH*' % md5 + print '\n ** Corrupted ZIP? Delete %s to retry download.\n' % targetfile + return None + icu_config = { + 'variables': {} + } + icu_config_name = 'icu_config.gypi' + def write_config(data, name): + return + + # write an empty file to start with + write(icu_config_name, do_not_edit + + pprint.pformat(icu_config, indent=2) + '\n') + + # always set icu_small, node.gyp depends on it being defined. + o['variables']['icu_small'] = b(False) -def configure_icu(o): + with_intl = options.with_intl + with_icu_source = options.with_icu_source have_icu_path = bool(options.with_icu_path) - o['variables']['v8_enable_i18n_support'] = int(have_icu_path) - if have_icu_path: + if have_icu_path and with_intl: + print 'Error: Cannot specify both --with-icu-path and --with-intl' + sys.exit(1) + elif have_icu_path: + # Chromium .gyp mode: --with-icu-path + o['variables']['v8_enable_i18n_support'] = 1 + # use the .gyp given o['variables']['icu_gyp_path'] = options.with_icu_path - + return + # --with-intl= + # set the default + if with_intl is None: + with_intl = 'none' # The default mode of Intl + # sanity check localelist + if options.with_icu_locales and (with_intl != 'small-icu'): + print 'Error: --with-icu-locales only makes sense with --with-intl=small-icu' + sys.exit(1) + if with_intl == 'none' or with_intl is None: + o['variables']['v8_enable_i18n_support'] = 0 + return # no Intl + elif with_intl == 'small-icu': + # small ICU (English only) + o['variables']['v8_enable_i18n_support'] = 1 + o['variables']['icu_small'] = b(True) + with_icu_locales = options.with_icu_locales + if not with_icu_locales: + with_icu_locales = 'root,en' + locs = set(with_icu_locales.split(',')) + locs.add('root') # must have root + o['variables']['icu_locales'] = string.join(locs,',') + elif with_intl == 'full-icu': + # full ICU + o['variables']['v8_enable_i18n_support'] = 1 + elif with_intl == 'system-icu': + # ICU from pkg-config. + o['variables']['v8_enable_i18n_support'] = 1 + pkgicu = pkg_config('icu-i18n') + if not pkgicu: + print 'Error: could not load pkg-config data for "icu-i18n".' + print 'See above errors or the README.md.' + sys.exit(1) + (libs, cflags) = pkgicu + o['libraries'] += libs.split() + o['cflags'] += cflags.split() + # use the "system" .gyp + o['variables']['icu_gyp_path'] = 'tools/icu/icu-system.gyp' + return + else: + print 'Error: unknown value --with-intl=%s' % with_intl + sys.exit(1) + # Note: non-ICU implementations could use other 'with_intl' + # values. + + # this is just the 'deps' dir. Used for unpacking. + icu_parent_path = os.path.join(root_dir, 'deps') + + # The full path to the ICU source directory. + icu_full_path = os.path.join(icu_parent_path, 'icu') + + # icu-tmp is used to download and unpack the ICU tarball. + icu_tmp_path = os.path.join(icu_parent_path, 'icu-tmp') + + # --with-icu-source processing + # first, check that they didn't pass --with-icu-source=deps/icu + if with_icu_source and os.path.abspath(icu_full_path) == os.path.abspath(with_icu_source): + print 'Ignoring redundant --with-icu-source=%s' % (with_icu_source) + with_icu_source = None + # if with_icu_source is still set, try to use it. + if with_icu_source: + if os.path.isdir(icu_full_path): + print 'Deleting old ICU source: %s' % (icu_full_path) + shutil.rmtree(icu_full_path) + # now, what path was given? + if os.path.isdir(with_icu_source): + # it's a path. Copy it. + print '%s -> %s' % (with_icu_source, icu_full_path) + shutil.copytree(with_icu_source, icu_full_path) + else: + # could be file or URL. + # Set up temporary area + if os.path.isdir(icu_tmp_path): + shutil.rmtree(icu_tmp_path) + os.mkdir(icu_tmp_path) + icu_tarball = None + if os.path.isfile(with_icu_source): + # it's a file. Try to unpack it. + icu_tarball = with_icu_source + else: + # Can we download it? + local = os.path.join(icu_tmp_path, with_icu_source.split('/')[-1]) # local part + icu_tarball = nodedownload.retrievefile(with_icu_source, local) + # continue with "icu_tarball" + nodedownload.unpack(icu_tarball, icu_tmp_path) + # Did it unpack correctly? Should contain 'icu' + tmp_icu = os.path.join(icu_tmp_path, 'icu') + if os.path.isdir(tmp_icu): + os.rename(tmp_icu, icu_full_path) + shutil.rmtree(icu_tmp_path) + else: + print ' Error: --with-icu-source=%s did not result in an "icu" dir.' % with_icu_source + shutil.rmtree(icu_tmp_path) + sys.exit(1) + + # ICU mode. (icu-generic.gyp) + byteorder = sys.byteorder + o['variables']['icu_gyp_path'] = 'tools/icu/icu-generic.gyp' + # ICU source dir relative to root + o['variables']['icu_path'] = icu_full_path + if not os.path.isdir(icu_full_path): + print '* ECMA-402 (Intl) support didn\'t find ICU in %s..' % (icu_full_path) + # can we download (or find) a zipfile? + localzip = icu_download(icu_full_path) + if localzip: + nodedownload.unpack(localzip, icu_parent_path) + if not os.path.isdir(icu_full_path): + print ' Cannot build Intl without ICU in %s.' % (icu_full_path) + print ' (Fix, or disable with "--with-intl=none" )' + sys.exit(1) + else: + print '* Using ICU in %s' % (icu_full_path) + # Now, what version of ICU is it? We just need the "major", such as 54. + # uvernum.h contains it as a #define. + uvernum_h = os.path.join(icu_full_path, 'source/common/unicode/uvernum.h') + if not os.path.isfile(uvernum_h): + print ' Error: could not load %s - is ICU installed?' % uvernum_h + sys.exit(1) + icu_ver_major = None + matchVerExp = r'^\s*#define\s+U_ICU_VERSION_SHORT\s+"([^"]*)".*' + match_version = re.compile(matchVerExp) + for line in open(uvernum_h).readlines(): + m = match_version.match(line) + if m: + icu_ver_major = m.group(1) + if not icu_ver_major: + print ' Could not read U_ICU_VERSION_SHORT version from %s' % uvernum_h + sys.exit(1) + icu_endianness = sys.byteorder[0]; # TODO(srl295): EBCDIC should be 'e' + o['variables']['icu_ver_major'] = icu_ver_major + o['variables']['icu_endianness'] = icu_endianness + icu_data_file_l = 'icudt%s%s.dat' % (icu_ver_major, 'l') + icu_data_file = 'icudt%s%s.dat' % (icu_ver_major, icu_endianness) + # relative to configure + icu_data_path = os.path.join(icu_full_path, + 'source/data/in', + icu_data_file_l) + # relative to dep.. + icu_data_in = os.path.join('../../deps/icu/source/data/in', icu_data_file_l) + if not os.path.isfile(icu_data_path) and icu_endianness != 'l': + # use host endianness + icu_data_path = os.path.join(icu_full_path, + 'source/data/in', + icu_data_file) + # relative to dep.. + icu_data_in = os.path.join('icu/source/data/in', + icu_data_file) + # this is the input '.dat' file to use .. icudt*.dat + # may be little-endian if from a icu-project.org tarball + o['variables']['icu_data_in'] = icu_data_in + # this is the icudt*.dat file which node will be using (platform endianness) + o['variables']['icu_data_file'] = icu_data_file + if not os.path.isfile(icu_data_path): + print ' Error: ICU prebuilt data file %s does not exist.' % icu_data_path + print ' See the README.md.' + # .. and we're not about to build it from .gyp! + sys.exit(1) + # map from variable name to subdirs + icu_src = { + 'stubdata': 'stubdata', + 'common': 'common', + 'i18n': 'i18n', + 'io': 'io', + 'tools': 'tools/toolutil', + 'genccode': 'tools/genccode', + 'genrb': 'tools/genrb', + 'icupkg': 'tools/icupkg', + } + # this creates a variable icu_src_XXX for each of the subdirs + # with a list of the src files to use + for i in icu_src: + var = 'icu_src_%s' % i + path = '../../deps/icu/source/%s' % icu_src[i] + icu_config['variables'][var] = glob_to_var('tools/icu', path) + # write updated icu_config.gypi with a bunch of paths + write(icu_config_name, do_not_edit + + pprint.pformat(icu_config, indent=2) + '\n') + return # end of configure_intl # determine the "flavor" (operating system) we're building for, # leveraging gyp's GetFlavor function @@ -717,7 +997,7 @@ configure_v8(output) configure_openssl(output) configure_winsdk(output) -configure_icu(output) +configure_intl(output) configure_fullystatic(output) # variables should be a root level element, @@ -730,13 +1010,7 @@ } pprint.pprint(output, indent=2) -def write(filename, data): - filename = os.path.join(root_dir, filename) - print 'creating ', filename - f = open(filename, 'w+') - f.write(data) - -write('config.gypi', '# Do not edit. Generated by the configure script.\n' + +write('config.gypi', do_not_edit + pprint.pformat(output, indent=2) + '\n') config = { @@ -767,4 +1041,4 @@ gyp_args += args -subprocess.call(gyp_args) +sys.exit(subprocess.call(gyp_args)) diff -Nru nodejs-0.11.14/debian/changelog nodejs-0.11.15/debian/changelog --- nodejs-0.11.14/debian/changelog 2014-10-23 20:27:54.000000000 +0000 +++ nodejs-0.11.15/debian/changelog 2015-01-21 18:54:27.000000000 +0000 @@ -1,3 +1,9 @@ +nodejs (0.11.15-1chl1~precise1) precise; urgency=low + + * 0.11.15 (devel) release. + + -- Chris Lea Wed, 21 Jan 2015 10:52:28 -0800 + nodejs (0.11.14-1chl1~precise1) precise; urgency=low * 0.11.14 (devel) release. diff -Nru nodejs-0.11.14/deps/debugger-agent/debugger-agent.gyp nodejs-0.11.15/deps/debugger-agent/debugger-agent.gyp --- nodejs-0.11.14/deps/debugger-agent/debugger-agent.gyp 1970-01-01 00:00:00.000000000 +0000 +++ nodejs-0.11.15/deps/debugger-agent/debugger-agent.gyp 2015-01-20 21:22:17.000000000 +0000 @@ -0,0 +1,24 @@ +{ + "targets": [{ + "target_name": "debugger-agent", + "type": "<(library)", + "include_dirs": [ + "src", + "include", + "../v8/include", + "../uv/include", + + # Private node.js folder and stuff needed to include from it + "../../src", + "../cares/include", + ], + "direct_dependent_settings": { + "include_dirs": [ + "include", + ], + }, + "sources": [ + "src/agent.cc", + ], + }], +} diff -Nru nodejs-0.11.14/deps/debugger-agent/include/debugger-agent.h nodejs-0.11.15/deps/debugger-agent/include/debugger-agent.h --- nodejs-0.11.14/deps/debugger-agent/include/debugger-agent.h 1970-01-01 00:00:00.000000000 +0000 +++ nodejs-0.11.15/deps/debugger-agent/include/debugger-agent.h 2015-01-20 21:22:17.000000000 +0000 @@ -0,0 +1,109 @@ +// Copyright Fedor Indutny 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. + +#ifndef DEPS_DEBUGGER_AGENT_INCLUDE_DEBUGGER_AGENT_H_ +#define DEPS_DEBUGGER_AGENT_INCLUDE_DEBUGGER_AGENT_H_ + +#include "uv.h" +#include "v8.h" +#include "v8-debug.h" + +namespace node { + +// Forward declaration +class Environment; + +namespace debugger { + +// Forward declaration +class AgentMessage; + +class Agent { + public: + explicit Agent(node::Environment* env); + ~Agent(); + + typedef void (*DispatchHandler)(node::Environment* env); + + // Start the debugger agent thread + bool Start(int port, bool wait); + // Listen for debug events + void Enable(); + // Stop the debugger agent + void Stop(); + + inline void set_dispatch_handler(DispatchHandler handler) { + dispatch_handler_ = handler; + } + + inline node::Environment* parent_env() const { return parent_env_; } + inline node::Environment* child_env() const { return child_env_; } + + protected: + void InitAdaptor(Environment* env); + + // Worker body + void WorkerRun(); + + static void ThreadCb(Agent* agent); + static void ParentSignalCb(uv_async_t* signal); + static void ChildSignalCb(uv_async_t* signal); + static void MessageHandler(const v8::Debug::Message& message); + + // V8 API + static Agent* Unwrap(const v8::FunctionCallbackInfo& args); + static void NotifyListen(const v8::FunctionCallbackInfo& args); + static void NotifyWait(const v8::FunctionCallbackInfo& args); + static void SendCommand(const v8::FunctionCallbackInfo& args); + + void EnqueueMessage(AgentMessage* message); + + enum State { + kNone, + kRunning + }; + + // TODO(indutny): Verify that there are no races + State state_; + + int port_; + bool wait_; + + uv_sem_t start_sem_; + uv_mutex_t message_mutex_; + uv_async_t child_signal_; + + uv_thread_t thread_; + node::Environment* parent_env_; + node::Environment* child_env_; + uv_loop_t child_loop_; + v8::Persistent api_; + + // QUEUE + void* messages_[2]; + + DispatchHandler dispatch_handler_; +}; + +} // namespace debugger +} // namespace node + +#endif // DEPS_DEBUGGER_AGENT_INCLUDE_DEBUGGER_AGENT_H_ diff -Nru nodejs-0.11.14/deps/debugger-agent/lib/_debugger_agent.js nodejs-0.11.15/deps/debugger-agent/lib/_debugger_agent.js --- nodejs-0.11.14/deps/debugger-agent/lib/_debugger_agent.js 1970-01-01 00:00:00.000000000 +0000 +++ nodejs-0.11.15/deps/debugger-agent/lib/_debugger_agent.js 2015-01-20 21:22:17.000000000 +0000 @@ -0,0 +1,191 @@ +var assert = require('assert'); +var net = require('net'); +var util = require('util'); +var Buffer = require('buffer').Buffer; + +var Transform = require('stream').Transform; + +exports.start = function start() { + var agent = new Agent(); + + // Do not let `agent.listen()` request listening from cluster master + var cluster = require('cluster'); + cluster.isWorker = false; + cluster.isMaster = true; + + agent.on('error', function(err) { + process._rawDebug(err.stack || err); + }); + + agent.listen(process._debugAPI.port, function() { + var addr = this.address(); + process._rawDebug('Debugger listening on port %d', addr.port); + process._debugAPI.notifyListen(); + }); + + // Just to spin-off events + // TODO(indutny): Figure out why node.cc isn't doing this + setImmediate(function() { + }); + + process._debugAPI.onclose = function() { + // We don't care about it, but it prevents loop from cleaning up gently + // NOTE: removeAllListeners won't work, as it doesn't call `removeListener` + process.listeners('SIGWINCH').forEach(function(fn) { + process.removeListener('SIGWINCH', fn); + }); + + agent.close(); + }; + + // Not used now, but anyway + return agent; +}; + +function Agent() { + net.Server.call(this, this.onConnection); + + this.first = true; + this.binding = process._debugAPI; + + var self = this; + this.binding.onmessage = function(msg) { + self.clients.forEach(function(client) { + client.send({}, msg); + }); + }; + + this.clients = []; + assert(this.binding, 'Debugger agent running without bindings!'); +} +util.inherits(Agent, net.Server); + +Agent.prototype.onConnection = function onConnection(socket) { + var c = new Client(this, socket); + + c.start(); + this.clients.push(c); + + var self = this; + c.once('close', function() { + var index = self.clients.indexOf(c); + assert(index !== -1); + self.clients.splice(index, 1); + }); +}; + +Agent.prototype.notifyWait = function notifyWait() { + if (this.first) + this.binding.notifyWait(); + this.first = false; +}; + +function Client(agent, socket) { + Transform.call(this); + this._readableState.objectMode = true; + + this.agent = agent; + this.binding = this.agent.binding; + this.socket = socket; + + // Parse incoming data + this.state = 'headers'; + this.headers = {}; + this.buffer = ''; + socket.pipe(this); + + this.on('data', this.onCommand); + + var self = this; + this.socket.on('close', function() { + self.destroy(); + }); +} +util.inherits(Client, Transform); + +Client.prototype.destroy = function destroy(msg) { + this.socket.destroy(); + + this.emit('close'); +}; + +Client.prototype._transform = function _transform(data, enc, cb) { + cb(); + + this.buffer += data; + + while (true) { + if (this.state === 'headers') { + // Not enough data + if (!/\r\n/.test(this.buffer)) + break; + + if (/^\r\n/.test(this.buffer)) { + this.buffer = this.buffer.slice(2); + this.state = 'body'; + continue; + } + + // Match: + // Header-name: header-value\r\n + var match = this.buffer.match(/^([^:\s\r\n]+)\s*:\s*([^\s\r\n]+)\r\n/); + if (!match) + return this.destroy('Expected header, but failed to parse it'); + + this.headers[match[1].toLowerCase()] = match[2]; + + this.buffer = this.buffer.slice(match[0].length); + } else { + var len = this.headers['content-length']; + if (len === undefined) + return this.destroy('Expected content-length'); + + len = len | 0; + if (Buffer.byteLength(this.buffer) < len) + break; + + this.push(new Command(this.headers, this.buffer.slice(0, len))); + this.state = 'headers'; + this.buffer = this.buffer.slice(len); + this.headers = {}; + } + } +}; + +Client.prototype.send = function send(headers, data) { + if (!data) + data = ''; + + var out = []; + Object.keys(headers).forEach(function(key) { + out.push(key + ': ' + headers[key]); + }); + out.push('Content-Length: ' + Buffer.byteLength(data), ''); + + this.socket.cork(); + this.socket.write(out.join('\r\n') + '\r\n'); + + if (data.length > 0) + this.socket.write(data); + this.socket.uncork(); +}; + +Client.prototype.start = function start() { + this.send({ + Type: 'connect', + 'V8-Version': process.versions.v8, + 'Protocol-Version': 1, + 'Embedding-Host': 'node ' + process.version + }); +}; + +Client.prototype.onCommand = function onCommand(cmd) { + this.binding.sendCommand(cmd.body); + + this.agent.notifyWait(); +}; + +function Command(headers, body) { + this.headers = headers; + this.body = body; +} diff -Nru nodejs-0.11.14/deps/debugger-agent/src/agent.cc nodejs-0.11.15/deps/debugger-agent/src/agent.cc --- nodejs-0.11.14/deps/debugger-agent/src/agent.cc 1970-01-01 00:00:00.000000000 +0000 +++ nodejs-0.11.15/deps/debugger-agent/src/agent.cc 2015-01-20 21:22:17.000000000 +0000 @@ -0,0 +1,347 @@ +// Copyright Fedor Indutny 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. + +#include "agent.h" +#include "debugger-agent.h" + +#include "node.h" +#include "node_internals.h" // ARRAY_SIZE +#include "env.h" +#include "env-inl.h" +#include "v8.h" +#include "v8-debug.h" +#include "util.h" +#include "util-inl.h" +#include "queue.h" + +#include + +namespace node { +namespace debugger { + +using v8::Context; +using v8::Function; +using v8::FunctionCallbackInfo; +using v8::FunctionTemplate; +using v8::Handle; +using v8::HandleScope; +using v8::Integer; +using v8::Isolate; +using v8::Local; +using v8::Locker; +using v8::Object; +using v8::String; +using v8::Value; + + +Agent::Agent(Environment* env) : state_(kNone), + port_(5858), + wait_(false), + parent_env_(env), + child_env_(NULL), + dispatch_handler_(NULL) { + int err; + + err = uv_sem_init(&start_sem_, 0); + CHECK_EQ(err, 0); + + err = uv_mutex_init(&message_mutex_); + CHECK_EQ(err, 0); + + QUEUE_INIT(&messages_); +} + + +Agent::~Agent() { + Stop(); + + uv_sem_destroy(&start_sem_); + uv_mutex_destroy(&message_mutex_); + + // Clean-up messages + while (!QUEUE_EMPTY(&messages_)) { + QUEUE* q = QUEUE_HEAD(&messages_); + QUEUE_REMOVE(q); + AgentMessage* msg = ContainerOf(&AgentMessage::member, q); + delete msg; + } +} + + +bool Agent::Start(int port, bool wait) { + int err; + + if (state_ == kRunning) + return false; + + err = uv_loop_init(&child_loop_); + if (err != 0) + goto loop_init_failed; + + // Interruption signal handler + err = uv_async_init(&child_loop_, &child_signal_, ChildSignalCb); + if (err != 0) + goto async_init_failed; + uv_unref(reinterpret_cast(&child_signal_)); + + port_ = port; + wait_ = wait; + + err = uv_thread_create(&thread_, + reinterpret_cast(ThreadCb), + this); + if (err != 0) + goto thread_create_failed; + + uv_sem_wait(&start_sem_); + + state_ = kRunning; + + return true; + + thread_create_failed: + uv_close(reinterpret_cast(&child_signal_), NULL); + + async_init_failed: + err = uv_loop_close(&child_loop_); + CHECK_EQ(err, 0); + + loop_init_failed: + return false; +} + + +void Agent::Enable() { + v8::Debug::SetMessageHandler(MessageHandler); + + // Assign environment to the debugger's context + // NOTE: The debugger context is created after `SetMessageHandler()` call + parent_env()->AssignToContext(v8::Debug::GetDebugContext()); +} + + +void Agent::Stop() { + int err; + + if (state_ != kRunning) { + return; + } + + v8::Debug::SetMessageHandler(NULL); + + // Send empty message to terminate things + EnqueueMessage(new AgentMessage(NULL, 0)); + + // Signal worker thread to make it stop + err = uv_async_send(&child_signal_); + CHECK_EQ(err, 0); + + err = uv_thread_join(&thread_); + CHECK_EQ(err, 0); + + uv_close(reinterpret_cast(&child_signal_), NULL); + uv_run(&child_loop_, UV_RUN_NOWAIT); + + err = uv_loop_close(&child_loop_); + CHECK_EQ(err, 0); + + state_ = kNone; +} + + +void Agent::WorkerRun() { + static const char* argv[] = { "node", "--debug-agent" }; + Isolate* isolate = Isolate::New(); + { + Locker locker(isolate); + Isolate::Scope isolate_scope(isolate); + + HandleScope handle_scope(isolate); + Local context = Context::New(isolate); + + Context::Scope context_scope(context); + Environment* env = CreateEnvironment( + isolate, + &child_loop_, + context, + ARRAY_SIZE(argv), + argv, + ARRAY_SIZE(argv), + argv); + + child_env_ = env; + + // Expose API + InitAdaptor(env); + LoadEnvironment(env); + + CHECK_EQ(&child_loop_, env->event_loop()); + uv_run(&child_loop_, UV_RUN_DEFAULT); + + // Clean-up peristent + api_.Reset(); + + // Clean-up all running handles + env->CleanupHandles(); + + env->Dispose(); + env = NULL; + } + isolate->Dispose(); +} + + +void Agent::InitAdaptor(Environment* env) { + Isolate* isolate = env->isolate(); + HandleScope scope(isolate); + + // Create API adaptor + Local t = FunctionTemplate::New(isolate); + t->InstanceTemplate()->SetInternalFieldCount(1); + t->SetClassName(String::NewFromUtf8(isolate, "DebugAPI")); + + NODE_SET_PROTOTYPE_METHOD(t, "notifyListen", NotifyListen); + NODE_SET_PROTOTYPE_METHOD(t, "notifyWait", NotifyWait); + NODE_SET_PROTOTYPE_METHOD(t, "sendCommand", SendCommand); + + Local api = t->GetFunction()->NewInstance(); + api->SetAlignedPointerInInternalField(0, this); + + api->Set(String::NewFromUtf8(isolate, "port"), Integer::New(isolate, port_)); + + env->process_object()->Set(String::NewFromUtf8(isolate, "_debugAPI"), api); + api_.Reset(env->isolate(), api); +} + + +Agent* Agent::Unwrap(const v8::FunctionCallbackInfo& args) { + void* ptr = args.Holder()->GetAlignedPointerFromInternalField(0); + return reinterpret_cast(ptr); +} + + +void Agent::NotifyListen(const FunctionCallbackInfo& args) { + Agent* a = Unwrap(args); + + // Notify other thread that we are ready to process events + uv_sem_post(&a->start_sem_); +} + + +void Agent::NotifyWait(const FunctionCallbackInfo& args) { + Agent* a = Unwrap(args); + + a->wait_ = false; + + int err = uv_async_send(&a->child_signal_); + CHECK_EQ(err, 0); +} + + +void Agent::SendCommand(const FunctionCallbackInfo& args) { + Agent* a = Unwrap(args); + Environment* env = a->child_env(); + HandleScope scope(env->isolate()); + + String::Value v(args[0]); + + v8::Debug::SendCommand(a->parent_env()->isolate(), *v, v.length()); + if (a->dispatch_handler_ != NULL) + a->dispatch_handler_(a->parent_env()); +} + + +void Agent::ThreadCb(Agent* agent) { + agent->WorkerRun(); +} + + +void Agent::ChildSignalCb(uv_async_t* signal) { + Agent* a = ContainerOf(&Agent::child_signal_, signal); + Isolate* isolate = a->child_env()->isolate(); + + HandleScope scope(isolate); + Local api = PersistentToLocal(isolate, a->api_); + + uv_mutex_lock(&a->message_mutex_); + while (!QUEUE_EMPTY(&a->messages_)) { + QUEUE* q = QUEUE_HEAD(&a->messages_); + AgentMessage* msg = ContainerOf(&AgentMessage::member, q); + + // Time to close everything + if (msg->data() == NULL) { + QUEUE_REMOVE(q); + delete msg; + + MakeCallback(isolate, api, "onclose", 0, NULL); + break; + } + + // Waiting for client, do not send anything just yet + // TODO(indutny): move this to js-land + if (a->wait_) + break; + + QUEUE_REMOVE(q); + Local argv[] = { + String::NewFromTwoByte(isolate, + msg->data(), + String::kNormalString, + msg->length()) + }; + + // Emit message + MakeCallback(isolate, + api, + "onmessage", + ARRAY_SIZE(argv), + argv); + delete msg; + } + uv_mutex_unlock(&a->message_mutex_); +} + + +void Agent::EnqueueMessage(AgentMessage* message) { + uv_mutex_lock(&message_mutex_); + QUEUE_INSERT_TAIL(&messages_, &message->member); + uv_mutex_unlock(&message_mutex_); + uv_async_send(&child_signal_); +} + + +void Agent::MessageHandler(const v8::Debug::Message& message) { + Isolate* isolate = message.GetIsolate(); + Environment* env = Environment::GetCurrent(isolate); + Agent* a = env->debugger_agent(); + CHECK_NE(a, NULL); + CHECK_EQ(isolate, a->parent_env()->isolate()); + + HandleScope scope(isolate); + Local json = message.GetJSON(); + String::Value v(json); + + AgentMessage* msg = new AgentMessage(*v, v.length()); + a->EnqueueMessage(msg); +} + +} // namespace debugger +} // namespace node diff -Nru nodejs-0.11.14/deps/debugger-agent/src/agent.h nodejs-0.11.15/deps/debugger-agent/src/agent.h --- nodejs-0.11.14/deps/debugger-agent/src/agent.h 1970-01-01 00:00:00.000000000 +0000 +++ nodejs-0.11.15/deps/debugger-agent/src/agent.h 2015-01-20 21:22:17.000000000 +0000 @@ -0,0 +1,64 @@ +// Copyright Fedor Indutny 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. + +#ifndef DEPS_DEBUGGER_AGENT_SRC_AGENT_H_ +#define DEPS_DEBUGGER_AGENT_SRC_AGENT_H_ + +#include "v8.h" +#include "v8-debug.h" +#include "queue.h" + +#include +#include + +namespace node { +namespace debugger { + +class AgentMessage { + public: + AgentMessage(uint16_t* val, int length) : length_(length) { + if (val == NULL) { + data_ = val; + } else { + data_ = new uint16_t[length]; + memcpy(data_, val, length * sizeof(*data_)); + } + } + + ~AgentMessage() { + delete[] data_; + data_ = NULL; + } + + inline const uint16_t* data() const { return data_; } + inline int length() const { return length_; } + + QUEUE member; + + private: + uint16_t* data_; + int length_; +}; + +} // namespace debugger +} // namespace node + +#endif // DEPS_DEBUGGER_AGENT_SRC_AGENT_H_ diff -Nru nodejs-0.11.14/deps/npm/bin/npm-cli.js nodejs-0.11.15/deps/npm/bin/npm-cli.js --- nodejs-0.11.14/deps/npm/bin/npm-cli.js 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/bin/npm-cli.js 2015-01-20 21:22:17.000000000 +0000 @@ -21,7 +21,7 @@ var path = require("path") , npm = require("../lib/npm.js") - , npmconf = require("npmconf") + , npmconf = require("../lib/config/core.js") , errorHandler = require("../lib/utils/error-handler.js") , configDefs = npmconf.defs diff -Nru nodejs-0.11.14/deps/npm/CHANGELOG.md nodejs-0.11.15/deps/npm/CHANGELOG.md --- nodejs-0.11.14/deps/npm/CHANGELOG.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/CHANGELOG.md 2015-01-20 21:22:17.000000000 +0000 @@ -1,3 +1,318 @@ +### v2.1.6 (2014-10-23): + +* [`681b398`](https://github.com/npm/npm/commit/681b3987a18e7aba0aaf78c91a23c7cc0ab82ce8) + [#6523](https://github.com/npm/npm/issues/6523) fix default `logelevel` doc + ([@KenanY](https://github.com/KenanY)) +* [`80b368f`](https://github.com/npm/npm/commit/80b368ffd786d4d008734b56c4a6fe12d2cb2926) + [#6528](https://github.com/npm/npm/issues/6528) `npm version` should work in + a git directory without git ([@terinjokes](https://github.com/terinjokes)) +* [`5f5f9e4`](https://github.com/npm/npm/commit/5f5f9e4ddf544c2da6adf3f8c885238b0e745076) + [#6483](https://github.com/npm/npm/issues/6483) `init-package-json@1.1.1`: + Properly pick up default values from environment variables. + ([@othiym23](https://github.com/othiym23)) +* [`a114870`](https://github.com/npm/npm/commit/a1148702f53f82d49606b2e4dac7581261fff442) + perl 5.18.x doesn't like -pi without filenames + ([@othiym23](https://github.com/othiym23)) +* [`de5ba00`](https://github.com/npm/npm/commit/de5ba007a48db876eb5bfb6156435f3512d58977) + `request@2.46.0`: Tests and cleanup. + ([@othiym23](https://github.com/othiym23)) +* [`76933f1`](https://github.com/npm/npm/commit/76933f169f17b5273b32e924a7b392d5729931a7) + `fstream-npm@1.0.1`: Always include `LICENSE[.*]`, `LICENCE[.*]`, + `CHANGES[.*]`, `CHANGELOG[.*]`, and `HISTORY[.*]`. + ([@jonathanong](https://github.com/jonathanong)) + +### v2.1.5 (2014-10-16): + +* [`6a14b23`](https://github.com/npm/npm/commit/6a14b232a0e34158bd95bb25c607167be995c204) + [#6397](https://github.com/npm/npm/issues/6397) Defactor npmconf back into + npm. ([@othiym23](https://github.com/othiym23)) +* [`4000e33`](https://github.com/npm/npm/commit/4000e3333a76ca4844681efa8737cfac24b7c2c8) + [#6323](https://github.com/npm/npm/issues/6323) Install `peerDependencies` + from top. ([@othiym23](https://github.com/othiym23)) +* [`5d119ae`](https://github.com/npm/npm/commit/5d119ae246f27353b14ff063559d1ba8c616bb89) + [#6498](https://github.com/npm/npm/issues/6498) Better error messages on + malformed `.npmrc` properties. ([@nicks](https://github.com/nicks)) +* [`ae18efb`](https://github.com/npm/npm/commit/ae18efb65fed427b1ef18e4862885bf60b87b92e) + [#6093](https://github.com/npm/npm/issues/6093) Replace instances of 'hash' + with 'object' in documentation. ([@zeke](https://github.com/zeke)) +* [`53108b2`](https://github.com/npm/npm/commit/53108b276fec5f97a38250933a2768d58b6928da) + [#1558](https://github.com/npm/npm/issues/1558) Clarify how local paths + should be used. ([@KenanY](https://github.com/KenanY)) +* [`344fa1a`](https://github.com/npm/npm/commit/344fa1a219ac8867022df3dc58a47636dde8a242) + [#6488](https://github.com/npm/npm/issues/6488) Work around bug in marked. + ([@othiym23](https://github.com/othiym23)) + +OUTDATED DEPENDENCY CLEANUP JAMBOREE + +* [`60c2942`](https://github.com/npm/npm/commit/60c2942e13655d9ecdf6e0f1f97f10cb71a75255) + `realize-package-specifier@1.2.0`: Handle names and rawSpecs more + consistently. ([@iarna](https://github.com/iarna)) +* [`1b5c95f`](https://github.com/npm/npm/commit/1b5c95fbda77b87342bd48c5ecac5b1fd571ccfe) + `sha@1.3.0`: Change line endings? + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`d7dee3f`](https://github.com/npm/npm/commit/d7dee3f3f7d9e7c2061a4ecb4dd93e3e4bfe4f2e) + `request@2.45.0`: Dependency updates, better proxy support, better compressed + response handling, lots of 'use strict'. + ([@mikeal](https://github.com/mikeal)) +* [`3d75180`](https://github.com/npm/npm/commit/3d75180c2cc79fa3adfa0e4cb783a27192189a65) + `opener@1.4.0`: Added gratuitous return. + ([@Domenic](https://github.com/Domenic)) +* [`8e2703f`](https://github.com/npm/npm/commit/8e2703f78d280d1edeb749e257dda1f288bad6e3) + `retry@0.6.1` / `npm-registry-client@3.2.4`: Change of ownership. + ([@tim-kos](https://github.com/tim-kos)) +* [`c87b00f`](https://github.com/npm/npm/commit/c87b00f82f92434ee77831915012c77a6c244c39) + `once@1.3.1`: Wrap once with wrappy. ([@isaacs](https://github.com/isaacs)) +* [`01ec790`](https://github.com/npm/npm/commit/01ec790fd47def56eda6abb3b8d809093e8f493f) + `npm-user-validate@0.1.1`: Correct repository URL. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`389e52c`](https://github.com/npm/npm/commit/389e52c2d94c818ca8935ccdcf392994fec564a2) + `glob@4.0.6`: Now absolutely requires `graceful-fs`. + ([@isaacs](https://github.com/isaacs)) +* [`e15ab15`](https://github.com/npm/npm/commit/e15ab15a27a8f14cf0d9dc6f11dee452080378a0) + `ini@1.3.0`: Tighten up whitespace handling. + ([@isaacs](https://github.com/isaacs)) +* [`7610f3e`](https://github.com/npm/npm/commit/7610f3e62e699292ece081bfd33084d436e3246d) + `archy@1.0.0` ([@substack](https://github.com/substack)) +* [`9c13149`](https://github.com/npm/npm/commit/9c1314985e513e20ffa3ea0ca333ba2ab78299c9) + `semver@4.1.0`: Add support for prerelease identifiers. + ([@bromanko](https://github.com/bromanko)) +* [`f096c25`](https://github.com/npm/npm/commit/f096c250441b031d758f03afbe8d2321f94c7703) + `graceful-fs@3.0.4`: Add a bunch of additional tests, skip the unfortunate + complications of `graceful-fs@3.0.3`. ([@isaacs](https://github.com/isaacs)) + +### v2.1.4 (2014-10-09): + +* [`3aeb440`](https://github.com/npm/npm/commit/3aeb4401444fad83cc7a8d11bf2507658afa5248) + [#6442](https://github.com/npm/npm/issues/6442) proxying git needs `GIT_SSL_CAINFO` + ([@wmertens](https://github.com/wmertens)) +* [`a8da8d6`](https://github.com/npm/npm/commit/a8da8d6e0cd56d97728c0b76b51604ee06ef6264) + [#6413](https://github.com/npm/npm/issues/6413) write builtin config on any + global npm install ([@isaacs](https://github.com/isaacs)) +* [`9e4d632`](https://github.com/npm/npm/commit/9e4d632c0142ba55df07d624667738b8727336fc) + [#6343](https://github.com/npm/npm/issues/6343) don't pass run arguments to + pre & post scripts ([@TheLudd](https://github.com/TheLudd)) +* [`d831b1f`](https://github.com/npm/npm/commit/d831b1f7ca1a9921ea5b394e39b7130ecbc6d7b4) + [#6399](https://github.com/npm/npm/issues/6399) race condition: inflight + installs, prevent `peerDependency` problems + ([@othiym23](https://github.com/othiym23)) +* [`82b775d`](https://github.com/npm/npm/commit/82b775d6ff34c4beb6c70b2344d491a9f2026577) + [#6384](https://github.com/npm/npm/issues/6384) race condition: inflight + caching by URL rather than semver range + ([@othiym23](https://github.com/othiym23)) +* [`7bee042`](https://github.com/npm/npm/commit/7bee0429066fedcc9e6e962c043eb740b3792809) + `inflight@1.0.4`: callback can take arbitrary number of parameters + ([@othiym23](https://github.com/othiym23)) +* [`3bff494`](https://github.com/npm/npm/commit/3bff494f4abf17d6d7e0e4a3a76cf7421ecec35a) + [#5195](https://github.com/npm/npm/issues/5195) fixed regex color regression + for `npm search` ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`33ba2d5`](https://github.com/npm/npm/commit/33ba2d585160a0a2a322cb76c4cd989acadcc984) + [#6387](https://github.com/npm/npm/issues/6387) allow `npm view global` if + package is specified ([@evanlucas](https://github.com/evanlucas)) +* [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + [#6388](https://github.com/npm/npm/issues/6388) npm-publish → + npm-developers(7) ([@kennydude](https://github.com/kennydude)) + +TEST CLEANUP EXTRAVAGANZA: + +* [`8d6bfcb`](https://github.com/npm/npm/commit/8d6bfcb88408f5885a2a67409854c43e5c3a23f6) + tap tests run with no system-wide side effects + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`7a1472f`](https://github.com/npm/npm/commit/7a1472fbdbe99956ad19f629e7eb1cc07ba026ef) + added npm cache cleanup script + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`0ce6a37`](https://github.com/npm/npm/commit/0ce6a3752fa9119298df15671254db6bc1d8e64c) + stripped out dead test code (othiym23) +* replace spawn with common.npm (@chrismeyersfsu): + * [`0dcd614`](https://github.com/npm/npm/commit/0dcd61446335eaf541bf5f2d5186ec1419f86a42) + test/tap/cache-shasum-fork.js + * [`97f861c`](https://github.com/npm/npm/commit/97f861c967606a7e51e3d5047cf805d9d1adea5a) + test/tap/false_name.js + * [`d01b3de`](https://github.com/npm/npm/commit/d01b3de6ce03f25bbf3db97bfcd3cc85830d6801) + test/tap/git-cache-locking.js + * [`7b63016`](https://github.com/npm/npm/commit/7b63016778124c6728d6bd89a045c841ae3900b6) + test/tap/pack-scoped.js + * [`c877553`](https://github.com/npm/npm/commit/c877553265c39673e03f0a97972f692af81a595d) + test/tap/scripts-whitespace-windows.js + * [`df98525`](https://github.com/npm/npm/commit/df98525331e964131299d457173c697cfb3d95b9) + test/tap/prepublish.js + * [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + test/tap/prune.js + +### v2.1.3 (2014-10-02): + +BREAKING CHANGE FOR THE SQRT(i) PEOPLE ACTUALLY USING `npm submodule`: + +* [`1e64473`](https://github.com/npm/npm/commit/1e6447360207f45ad6188e5780fdf4517de6e23d) + `rm -rf npm submodule` command, which has been broken since the Carter + Administration ([@isaacs](https://github.com/isaacs)) + +BREAKING CHANGE IF YOU ARE FOR SOME REASON STILL USING NODE 0.6 AND YOU SHOULD +NOT BE DOING THAT CAN YOU NOT: + +* [`3e431f9`](https://github.com/npm/npm/commit/3e431f9d6884acb4cde8bcb8a0b122a76b33ee1d) + [joyent/node#8492](https://github.com/joyent/node/issues/8492) bye bye + customFds, hello stdio ([@othiym23](https://github.com/othiym23)) + +Other changes: + +* [`ea607a8`](https://github.com/npm/npm/commit/ea607a8a20e891ad38eed11b5ce2c3c0a65484b9) + [#6372](https://github.com/npm/npm/issues/6372) noisily error (without + aborting) on multi-{install,build} ([@othiym23](https://github.com/othiym23)) +* [`3ee2799`](https://github.com/npm/npm/commit/3ee2799b629fd079d2db21d7e8f25fa7fa1660d0) + [#6372](https://github.com/npm/npm/issues/6372) only make cache creation + requests in flight ([@othiym23](https://github.com/othiym23)) +* [`1a90ec2`](https://github.com/npm/npm/commit/1a90ec2f2cfbefc8becc6ef0c480e5edacc8a4cb) + [#6372](https://github.com/npm/npm/issues/6372) wait to put Git URLs in + flight until normalized ([@othiym23](https://github.com/othiym23)) +* [`664795b`](https://github.com/npm/npm/commit/664795bb7d8da7142417b3f4ef5986db3a394071) + [#6372](https://github.com/npm/npm/issues/6372) log what is and isn't in + flight ([@othiym23](https://github.com/othiym23)) +* [`00ef580`](https://github.com/npm/npm/commit/00ef58025a1f52dfabf2c4dc3898621d16a6e062) + `inflight@1.0.3`: fix largely theoretical race condition, because we really + really hate race conditions ([@isaacs](https://github.com/isaacs)) +* [`1cde465`](https://github.com/npm/npm/commit/1cde4658d897ae0f93ff1d65b258e1571b391182) + [#6363](https://github.com/npm/npm/issues/6363) + `realize-package-specifier@1.1.0`: handle local dependencies better + ([@iarna](https://github.com/iarna)) +* [`86f084c`](https://github.com/npm/npm/commit/86f084c6c6d7935cd85d72d9d94b8784c914d51e) + `realize-package-specifier@1.0.2`: dependency realization! in its own module! + ([@iarna](https://github.com/iarna)) +* [`553d830`](https://github.com/npm/npm/commit/553d830334552b83606b6bebefd821c9ea71e964) + `npm-package-arg@2.1.3`: simplified semver, better tests + ([@iarna](https://github.com/iarna)) +* [`bec9b61`](https://github.com/npm/npm/commit/bec9b61a316c19f5240657594f0905a92a474352) + `readable-stream@1.0.32`: for some reason + ([@rvagg](https://github.com/rvagg)) +* [`ff08ec5`](https://github.com/npm/npm/commit/ff08ec5f6d717bdbd559de0b2ede769306a9a763) + `dezalgo@1.0.1`: use wrappy for instrumentability + ([@isaacs](https://github.com/isaacs)) + +### v2.1.2 (2014-09-29): + +* [`a1aa20e`](https://github.com/npm/npm/commit/a1aa20e44bb8285c6be1e7fa63b9da920e3a70ed) + [#6282](https://github.com/npm/npm/issues/6282) + `normalize-package-data@1.0.3`: don't prune bundledDependencies + ([@isaacs](https://github.com/isaacs)) +* [`a1f5fe1`](https://github.com/npm/npm/commit/a1f5fe1005043ce20a06e8b17a3e201aa3215357) + move locks back into cache, now path-aware + ([@othiym23](https://github.com/othiym23)) +* [`a432c4b`](https://github.com/npm/npm/commit/a432c4b48c881294d6d79b5f41c2e1c16ad15a8a) + convert lib/utils/tar.js to use atomic streams + ([@othiym23](https://github.com/othiym23)) +* [`b8c3c74`](https://github.com/npm/npm/commit/b8c3c74a3c963564233204161cc263e0912c930b) + `fs-write-stream-atomic@1.0.2`: Now works with streams1 fs.WriteStreams. + ([@isaacs](https://github.com/isaacs)) +* [`c7ab76f`](https://github.com/npm/npm/commit/c7ab76f44cce5f42add5e3ba879bd10e7e00c3e6) + logging cleanup ([@othiym23](https://github.com/othiym23)) +* [`4b2d95d`](https://github.com/npm/npm/commit/4b2d95d0641435b09d047ae5cb2226f292bf38f0) + [#6329](https://github.com/npm/npm/issues/6329) efficiently validate tmp + tarballs safely ([@othiym23](https://github.com/othiym23)) + +### v2.1.1 (2014-09-26): + +* [`563225d`](https://github.com/npm/npm/commit/563225d813ea4c12f46d4f7821ac7f76ba8ee2d6) + [#6318](https://github.com/npm/npm/issues/6318) clean up locking; prefix + lockfile with "." ([@othiym23](https://github.com/othiym23)) +* [`c7f30e4`](https://github.com/npm/npm/commit/c7f30e4550fea882d31fcd4a55b681cd30713c44) + [#6318](https://github.com/npm/npm/issues/6318) remove locking code around + tarball packing and unpacking ([@othiym23](https://github.com/othiym23)) + +### v2.1.0 (2014-09-25): + +NEW FEATURE: + +* [`3635601`](https://github.com/npm/npm/commit/36356011b6f2e6a5a81490e85a0a44eb27199dd7) + [#5520](https://github.com/npm/npm/issues/5520) Add `'npm view .'`. + ([@evanlucas](https://github.com/evanlucas)) + +Other changes: + +* [`f24b552`](https://github.com/npm/npm/commit/f24b552b596d0627549cdd7c2d68fcf9006ea50a) + [#6294](https://github.com/npm/npm/issues/6294) Lock cache → lock cache + target. ([@othiym23](https://github.com/othiym23)) +* [`ad54450`](https://github.com/npm/npm/commit/ad54450104f94c82c501138b4eee488ce3a4555e) + [#6296](https://github.com/npm/npm/issues/6296) Ensure that npm-debug.log + file is created when rollbacks are done. + ([@isaacs](https://github.com/isaacs)) +* [`6810071`](https://github.com/npm/npm/commit/681007155a40ac9d165293bd6ec5d8a1423ccfca) + docs: Default loglevel "http" → "warn". + ([@othiym23](https://github.com/othiym23)) +* [`35ac89a`](https://github.com/npm/npm/commit/35ac89a940f23db875e882ce2888208395130336) + Skip installation of installed scoped packages. + ([@timoxley](https://github.com/timoxley)) +* [`e468527`](https://github.com/npm/npm/commit/e468527256ec599892b9b88d61205e061d1ab735) + Ensure cleanup executes for scripts-whitespace-windows test. + ([@timoxley](https://github.com/timoxley)) +* [`ef9101b`](https://github.com/npm/npm/commit/ef9101b7f346797749415086956a0394528a12c4) + Ensure cleanup executes for packed-scope test. + ([@timoxley](https://github.com/timoxley)) +* [`69b4d18`](https://github.com/npm/npm/commit/69b4d18cdbc2ae04c9afaffbd273b436a394f398) + `fs-write-stream-atomic@1.0.1`: Fix a race condition in our race-condition + fixer. ([@isaacs](https://github.com/isaacs)) +* [`26b17ff`](https://github.com/npm/npm/commit/26b17ff2e3b21ee26c6fdbecc8273520cff45718) + [#6272](https://github.com/npm/npm/issues/6272) `npmconf` decides what the + default prefix is. ([@othiym23](https://github.com/othiym23)) +* [`846faca`](https://github.com/npm/npm/commit/846facacc6427dafcf5756dcd36d9036539938de) + Fix development dependency is preferred over dependency. + ([@andersjanmyr](https://github.com/andersjanmyr)) +* [`9d1a9db`](https://github.com/npm/npm/commit/9d1a9db3af5adc48a7158a5a053eeb89ee41a0e7) + [#3265](https://github.com/npm/npm/issues/3265) Re-apply a71615a. Fixes + [#3265](https://github.com/npm/npm/issues/3265) again, with a test! + ([@glasser](https://github.com/glasser)) +* [`1d41db0`](https://github.com/npm/npm/commit/1d41db0b2744a7bd50971c35cc060ea0600fb4bf) + `marked-man@0.1.4`: Fixes formatting of synopsis blocks in man docs. + ([@kapouer](https://github.com/kapouer)) +* [`a623da0`](https://github.com/npm/npm/commit/a623da01bea1b2d3f3a18b9117cfd2d8e3cbdd77) + [#5867](https://github.com/npm/npm/issues/5867) Specify dummy git template + dir when cloning to prevent copying hooks. + ([@boneskull](https://github.com/boneskull)) + +### v2.0.2 (2014-09-19): + +* [`42c872b`](https://github.com/npm/npm/commit/42c872b32cadc0e555638fc78eab3a38a04401d8) + [#5920](https://github.com/npm/npm/issues/5920) + `fs-write-stream-atomic@1.0.0` ([@isaacs](https://github.com/isaacs)) +* [`6784767`](https://github.com/npm/npm/commit/6784767fe15e28b44c81a1d4bb1738c642a65d78) + [#5920](https://github.com/npm/npm/issues/5920) make all write streams atomic + ([@isaacs](https://github.com/isaacs)) +* [`f6fac00`](https://github.com/npm/npm/commit/f6fac000dd98ebdd5ea1d5921175735d463d328b) + [#5920](https://github.com/npm/npm/issues/5920) barf on 0-length cached + tarballs ([@isaacs](https://github.com/isaacs)) +* [`3b37592`](https://github.com/npm/npm/commit/3b37592a92ea98336505189ae8ca29248b0589f4) + `write-file-atomic@1.1.0`: use graceful-fs + ([@iarna](https://github.com/iarna)) + +### v2.0.1 (2014-09-18): + +* [`74c5ab0`](https://github.com/npm/npm/commit/74c5ab0a676793c6dc19a3fd5fe149f85fecb261) + [#6201](https://github.com/npm/npm/issues/6201) `npmconf@2.1.0`: scope + always-auth to registry URI ([@othiym23](https://github.com/othiym23)) +* [`774b127`](https://github.com/npm/npm/commit/774b127da1dd6fefe2f1299e73505d9146f00294) + [#6201](https://github.com/npm/npm/issues/6201) `npm-registry-client@3.2.2`: + use scoped always-auth settings ([@othiym23](https://github.com/othiym23)) +* [`f2d2190`](https://github.com/npm/npm/commit/f2d2190aa365d22378d03afab0da13f95614a583) + [#6201](https://github.com/npm/npm/issues/6201) support saving + `--always-auth` when logging in ([@othiym23](https://github.com/othiym23)) +* [`17c941a`](https://github.com/npm/npm/commit/17c941a2d583210fe97ed47e2968d94ce9f774ba) + [#6163](https://github.com/npm/npm/issues/6163) use `write-file-atomic` + instead of `fs.writeFile()` ([@fiws](https://github.com/fiws)) +* [`fb5724f`](https://github.com/npm/npm/commit/fb5724fd98e1509c939693568df83d11417ea337) + [#5925](https://github.com/npm/npm/issues/5925) `npm init -f`: allow `npm + init` to run without prompting + ([@michaelnisi](https://github.com/michaelnisi)) +* [`b706d63`](https://github.com/npm/npm/commit/b706d637d5965dbf8f7ce07dc5c4bc80887f30d8) + [#3059](https://github.com/npm/npm/issues/3059) disable prepublish when + running `npm install --production` + ([@jussi](https://github.com/jussi)-kalliokoski) +* [`119f068`](https://github.com/npm/npm/commit/119f068eae2a36fa8b9c9ca557c70377792243a4) + attach the node version used when publishing a package to its registry + metadata ([@othiym23](https://github.com/othiym23)) +* [`8fe0081`](https://github.com/npm/npm/commit/8fe008181665519c2ac201ee432a3ece9798c31f) + seriously, don't use `npm -g update npm` + ([@thomblake](https://github.com/thomblake)) +* [`ea5b3d4`](https://github.com/npm/npm/commit/ea5b3d446b86dcabb0dbc6dba374d3039342ecb3) + `request@2.44.0` ([@othiym23](https://github.com/othiym23)) + ### v2.0.0 (2014-09-12): BREAKING CHANGES: diff -Nru nodejs-0.11.14/deps/npm/doc/api/npm-bin.md nodejs-0.11.15/deps/npm/doc/api/npm-bin.md --- nodejs-0.11.14/deps/npm/doc/api/npm-bin.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/api/npm-bin.md 2015-01-20 21:22:17.000000000 +0000 @@ -10,4 +10,4 @@ Print the folder where npm will install executables. This function should not be used programmatically. Instead, just refer -to the `npm.bin` member. +to the `npm.bin` property. diff -Nru nodejs-0.11.14/deps/npm/doc/api/npm-help-search.md nodejs-0.11.15/deps/npm/doc/api/npm-help-search.md --- nodejs-0.11.14/deps/npm/doc/api/npm-help-search.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/api/npm-help-search.md 2015-01-20 21:22:17.000000000 +0000 @@ -27,4 +27,4 @@ * file: Name of the file that matched -The silent parameter is not neccessary not used, but it may in the future. +The silent parameter is not necessary not used, but it may in the future. diff -Nru nodejs-0.11.14/deps/npm/doc/api/npm-load.md nodejs-0.11.15/deps/npm/doc/api/npm-load.md --- nodejs-0.11.14/deps/npm/doc/api/npm-load.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/api/npm-load.md 2015-01-20 21:22:17.000000000 +0000 @@ -10,9 +10,9 @@ npm.load() must be called before any other function call. Both parameters are optional, but the second is recommended. -The first parameter is an object hash of command-line config params, and the -second parameter is a callback that will be called when npm is loaded and -ready to serve. +The first parameter is an object containing command-line config params, and the +second parameter is a callback that will be called when npm is loaded and ready +to serve. The first parameter should follow a similar structure as the package.json config object. diff -Nru nodejs-0.11.14/deps/npm/doc/api/npm.md nodejs-0.11.15/deps/npm/doc/api/npm.md --- nodejs-0.11.14/deps/npm/doc/api/npm.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/api/npm.md 2015-01-20 21:22:17.000000000 +0000 @@ -25,13 +25,12 @@ To find documentation of the command line client, see `npm(1)`. -Prior to using npm's commands, `npm.load()` must be called. -If you provide `configObject` as an object hash of top-level -configs, they override the values stored in the various config -locations. In the npm command line client, this set of configs -is parsed from the command line options. Additional configuration -params are loaded from two configuration files. See `npm-config(1)`, -`npm-config(7)`, and `npmrc(5)` for more information. +Prior to using npm's commands, `npm.load()` must be called. If you provide +`configObject` as an object map of top-level configs, they override the values +stored in the various config locations. In the npm command line client, this +set of configs is parsed from the command line options. Additional +configuration params are loaded from two configuration files. See +`npm-config(1)`, `npm-config(7)`, and `npmrc(5)` for more information. After that, each of the functions are accessible in the commands object: `npm.commands.`. See `npm-index(7)` for a list of @@ -88,9 +87,9 @@ ## MAGIC -For each of the methods in the `npm.commands` hash, a method is added to -the npm object, which takes a set of positional string arguments rather -than an array and a callback. +For each of the methods in the `npm.commands` object, a method is added to the +npm object, which takes a set of positional string arguments rather than an +array and a callback. If the last argument is a callback, then it will use the supplied callback. However, if no callback is provided, then it will print out diff -Nru nodejs-0.11.14/deps/npm/doc/api/npm-submodule.md nodejs-0.11.15/deps/npm/doc/api/npm-submodule.md --- nodejs-0.11.14/deps/npm/doc/api/npm-submodule.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/api/npm-submodule.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -npm-submodule(3) -- Add a package as a git submodule -==================================================== - -## SYNOPSIS - - npm.commands.submodule(packages, callback) - -## DESCRIPTION - -For each package specified, npm will check if it has a git repository url -in its package.json description then add it as a git submodule at -`node_modules/`. - -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 `.git` subfolder -in it. - -This command also does not install missing dependencies, if the package -does not include them in its git repository. If `npm ls` reports that -things are missing, you can either install, link, or submodule them yourself, -or you can do `npm explore -- npm install` to install the -dependencies into the submodule folder. - -## SEE ALSO - -* npm help json -* git help submodule diff -Nru nodejs-0.11.14/deps/npm/doc/cli/npm-adduser.md nodejs-0.11.15/deps/npm/doc/cli/npm-adduser.md --- nodejs-0.11.14/deps/npm/doc/cli/npm-adduser.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/cli/npm-adduser.md 2015-01-20 21:22:17.000000000 +0000 @@ -3,7 +3,7 @@ ## SYNOPSIS - npm adduser [--registry=url] [--scope=@orgname] + npm adduser [--registry=url] [--scope=@orgname] [--always-auth] ## DESCRIPTION @@ -45,6 +45,21 @@ This will set a registry for the given scope and login or create a user for that registry at the same time. +### always-auth + +Default: false + +If specified, save configuration indicating that all requests to the given +registry should include authorization information. Useful for private +registries. Can be used with `--registry` and / or `--scope`, e.g. + + npm adduser --registry=http://private-registry.example.com --always-auth + +This will ensure that all requests to that registry (including for tarballs) +include an authorization header. See `always-auth` in `npm-config(7)` for more +details on always-auth. Registry-specific configuaration of `always-auth` takes +precedence over any global configuration. + ## SEE ALSO * npm-registry(7) diff -Nru nodejs-0.11.14/deps/npm/doc/cli/npm-explore.md nodejs-0.11.15/deps/npm/doc/cli/npm-explore.md --- nodejs-0.11.14/deps/npm/doc/cli/npm-explore.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/cli/npm-explore.md 2015-01-20 21:22:17.000000000 +0000 @@ -32,7 +32,6 @@ ## SEE ALSO -* npm-submodule(1) * npm-folders(5) * npm-edit(1) * npm-rebuild(1) diff -Nru nodejs-0.11.14/deps/npm/doc/cli/npm-init.md nodejs-0.11.15/deps/npm/doc/cli/npm-init.md --- nodejs-0.11.14/deps/npm/doc/cli/npm-init.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/cli/npm-init.md 2015-01-20 21:22:17.000000000 +0000 @@ -3,7 +3,7 @@ ## SYNOPSIS - npm init + npm init [-f|--force|-y|--yes] ## DESCRIPTION @@ -18,6 +18,9 @@ It is strictly additive, so it does not delete options from your package.json without a really good reason to do so. +If you invoke it with `-f`, `--force`, `-y`, or `--yes`, it will use only +defaults and not prompt you for any options. + ## SEE ALSO * diff -Nru nodejs-0.11.14/deps/npm/doc/cli/npm-publish.md nodejs-0.11.15/deps/npm/doc/cli/npm-publish.md --- nodejs-0.11.14/deps/npm/doc/cli/npm-publish.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/cli/npm-publish.md 2015-01-20 21:22:17.000000000 +0000 @@ -9,7 +9,9 @@ ## DESCRIPTION -Publishes a package to the registry so that it can be installed by name. +Publishes a package to the registry so that it can be installed by name. See +`npm-developers(7)` for details on what's included in the published package, as +well as details on how the package is built. By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a `npm-scope(7)` in the name diff -Nru nodejs-0.11.14/deps/npm/doc/cli/npm-restart.md nodejs-0.11.15/deps/npm/doc/cli/npm-restart.md --- nodejs-0.11.14/deps/npm/doc/cli/npm-restart.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/cli/npm-restart.md 2015-01-20 21:22:17.000000000 +0000 @@ -7,11 +7,8 @@ ## DESCRIPTION -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. - -If no version is specified, then it restarts the "active" version. +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. ## SEE ALSO diff -Nru nodejs-0.11.14/deps/npm/doc/cli/npm-run-script.md nodejs-0.11.15/deps/npm/doc/cli/npm-run-script.md --- nodejs-0.11.14/deps/npm/doc/cli/npm-run-script.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/cli/npm-run-script.md 2015-01-20 21:22:17.000000000 +0000 @@ -16,6 +16,16 @@ It is used by the test, start, restart, and stop commands, but can be called directly, as well. +As of [`npm@2.0.0`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can +use custom arguments when executing scripts. The special option `--` is used by +[getopt](http://goo.gl/KxMmtG) to delimit the end of the options. npm will pass +all the arguments after the `--` directly to your script: + + npm run test -- --grep="pattern" + +The arguments will only be passed to the script specified after ```npm run``` +and not to any pre or post script. + ## SEE ALSO * npm-scripts(7) diff -Nru nodejs-0.11.14/deps/npm/doc/cli/npm-submodule.md nodejs-0.11.15/deps/npm/doc/cli/npm-submodule.md --- nodejs-0.11.14/deps/npm/doc/cli/npm-submodule.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/cli/npm-submodule.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -npm-submodule(1) -- Add a package as a git submodule -==================================================== - -## SYNOPSIS - - npm submodule - -## DESCRIPTION - -If the specified package has a git repository url in its package.json -description, then this command will add it as a git submodule at -`node_modules/`. - -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 `.git` subfolder -in it. - -This command also does not install missing dependencies, if the package -does not include them in its git repository. If `npm ls` reports that -things are missing, you can either install, link, or submodule them yourself, -or you can do `npm explore -- npm install` to install the -dependencies into the submodule folder. - -## SEE ALSO - -* package.json(5) -* git help submodule diff -Nru nodejs-0.11.14/deps/npm/doc/files/package.json.md nodejs-0.11.15/deps/npm/doc/files/package.json.md --- nodejs-0.11.14/deps/npm/doc/files/package.json.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/files/package.json.md 2015-01-20 21:22:17.000000000 +0000 @@ -219,7 +219,7 @@ The CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec details a few ways that you can indicate the structure of your package using a `directories` -hash. If you look at [npm's package.json](http://registry.npmjs.org/npm/latest), +object. If you look at [npm's package.json](http://registry.npmjs.org/npm/latest), you'll see that it has directories for doc, lib, and man. In the future, this information may be used in other creative ways. @@ -231,10 +231,10 @@ ### directories.bin -If you specify a "bin" directory, then all the files in that folder will -be used as the "bin" hash. +If you specify a `bin` directory, then all the files in that folder will +be added as children of the `bin` path. -If you have a "bin" hash already, then this has no effect. +If you have a `bin` path already, then this has no effect. ### directories.man @@ -274,7 +274,7 @@ ## scripts -The "scripts" member is an object hash of script commands that are run +The "scripts" property is a dictionary containing 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. @@ -282,9 +282,9 @@ ## config -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: +A "config" object can be used to set configuration parameters used in package +scripts that persist across upgrades. For instance, if a package had the +following: { "name" : "foo" , "config" : { "port" : "8080" } } @@ -298,13 +298,13 @@ ## dependencies -Dependencies are specified with a simple hash of package name to +Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more -space-separated descriptors. Dependencies can also be identified with -a tarball or git URL. +space-separated descriptors. Dependencies can also be identified with a +tarball or git URL. **Please do not put test harnesses or transpilers in your -`dependencies` hash.** See `devDependencies`, below. +`dependencies` object.** See `devDependencies`, below. See semver(7) for more details about specifying version ranges. @@ -340,7 +340,7 @@ , "two" : "2.x" , "thr" : "3.3.x" , "lat" : "latest" - , "dyl" : "~/projects/dyl" + , "dyl" : "file:../dyl" } } @@ -378,14 +378,25 @@ ## Local Paths -As of version 2.0.0 you can provide a path to a local directory that -contains a package. Local paths can be in the form: +As of version 2.0.0 you can provide a path to a local directory that contains a +package. Local paths can be saved using `npm install --save`, using any of +these forms: ../foo/bar ~/foo/bar ./foo/bar /foo/bar +in which case they will be normalized to a relative path and added to your +`package.json`. For example: + + { + "name": "baz", + "dependencies": { + "bar": "file:../foo/bar" + } + } + This feature is helpful for local offline development and creating tests that require npm installing where you don't want to hit an external server, but should not be used when publishing packages @@ -397,8 +408,8 @@ program, then they probably don't want or need to download and build the external test or documentation framework that you use. -In this case, it's best to list these additional items in a -`devDependencies` hash. +In this case, it's best to map these additional items in a `devDependencies` +object. These things will be installed when doing `npm link` or `npm install` from the root of a package, and can be managed like any other npm @@ -469,11 +480,11 @@ ## optionalDependencies -If a dependency can be used, but you would like npm to proceed if it -cannot be found or fails to install, then you may put it in the -`optionalDependencies` hash. This is a map of package name to version -or url, just like the `dependencies` hash. The difference is that -failure is tolerated. +If a dependency can be used, but you would like npm to proceed if it cannot be +found or fails to install, then you may put it in the `optionalDependencies` +object. This is a map of package name to version or url, just like the +`dependencies` object. The difference is that build failures do not cause +installation to fail. It is still your program's responsibility to handle the lack of the dependency. For example, something like this: @@ -521,12 +532,12 @@ ## engineStrict If you are sure that your module will *definitely not* run properly on -versions of Node/npm other than those specified in the `engines` hash, +versions of Node/npm other than those specified in the `engines` object, then you can set `"engineStrict": true` in your package.json file. This will override the user's `engine-strict` config setting. 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 +engines object is something overly restrictive, you can quite easily and inadvertently lock yourself into obscurity and prevent your users from updating to new versions of Node. Consider this choice carefully. If people abuse it, it will be removed in a future version of npm. @@ -575,11 +586,11 @@ If you set `"private": true` in your package.json, then npm will refuse to publish it. -This is a way to prevent accidental publication of private repositories. -If you would like to ensure that a given package is only ever published -to a specific registry (for example, an internal registry), -then use the `publishConfig` hash described below -to override the `registry` config param at publish-time. +This is a way to prevent accidental publication of private repositories. If +you would like to ensure that a given package is only ever published to a +specific registry (for example, an internal registry), then use the +`publishConfig` dictionary described below to override the `registry` config +param at publish-time. ## publishConfig diff -Nru nodejs-0.11.14/deps/npm/doc/misc/npm-coding-style.md nodejs-0.11.15/deps/npm/doc/misc/npm-coding-style.md --- nodejs-0.11.14/deps/npm/doc/misc/npm-coding-style.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/misc/npm-coding-style.md 2015-01-20 21:22:17.000000000 +0000 @@ -147,7 +147,7 @@ ## Case, naming, etc. Use `lowerCamelCase` for multiword identifiers when they refer to objects, -functions, methods, members, or anything not specified in this section. +functions, methods, properties, or anything not specified in this section. Use `UpperCamelCase` for class names (things that you'd pass to "new"). diff -Nru nodejs-0.11.14/deps/npm/doc/misc/npm-config.md nodejs-0.11.15/deps/npm/doc/misc/npm-config.md --- nodejs-0.11.14/deps/npm/doc/misc/npm-config.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/misc/npm-config.md 2015-01-20 21:22:17.000000000 +0000 @@ -384,35 +384,35 @@ [init-package-json](https://github.com/isaacs/init-package-json) module for more information, or npm-init(1). -### init.author.name +### init-author-name * Default: "" * Type: String The value `npm init` should use by default for the package author's name. -### init.author.email +### init-author-email * Default: "" * Type: String The value `npm init` should use by default for the package author's email. -### init.author.url +### init-author-url * Default: "" * Type: String The value `npm init` should use by default for the package author's homepage. -### init.license +### init-license * Default: "ISC" * Type: String The value `npm init` should use by default for the package license. -### init.version +### init-version * Default: "0.0.0" * Type: semver @@ -464,7 +464,7 @@ ### loglevel -* Default: "http" +* Default: "warn" * Type: String * Values: "silent", "error", "warn", "http", "info", "verbose", "silly" @@ -472,7 +472,7 @@ `npm-debug.log` in the current working directory. Any logs of a higher level than the setting are shown. -The default is "http", which shows http, warn, and error output. +The default is "warn", which shows warn and error output. ### logstream @@ -510,7 +510,7 @@ * Default: process.version * Type: semver or false -The node version to use when checking package's "engines" hash. +The node version to use when checking a package's `engines` map. ### npat @@ -532,7 +532,7 @@ * Default: true * Type: Boolean -Attempt to install packages in the `optionalDependencies` hash. Note +Attempt to install packages in the `optionalDependencies` object. Note that if these packages fail to install, the overall installation process is not aborted. @@ -610,8 +610,8 @@ Save installed packages to a package.json file as dependencies. -When used with the `npm rm` command, it removes it from the dependencies -hash. +When used with the `npm rm` command, it removes it from the `dependencies` +object. Only works if there is already a package.json file present. @@ -632,10 +632,10 @@ * Default: false * Type: Boolean -Save installed packages to a package.json file as devDependencies. +Save installed packages to a package.json file as `devDependencies`. When used with the `npm rm` command, it removes it from the -devDependencies hash. +`devDependencies` object. Only works if there is already a package.json file present. @@ -657,7 +657,7 @@ optionalDependencies. When used with the `npm rm` command, it removes it from the -devDependencies hash. +`devDependencies` object. Only works if there is already a package.json file present. @@ -848,8 +848,8 @@ * Default: false * Type: boolean -If true, output the npm version as well as node's `process.versions` -hash, and exit successfully. +If true, output the npm version as well as node's `process.versions` map, and +exit successfully. Only relevant when specified explicitly on the command line. diff -Nru nodejs-0.11.14/deps/npm/doc/misc/npm-developers.md nodejs-0.11.15/deps/npm/doc/misc/npm-developers.md --- nodejs-0.11.14/deps/npm/doc/misc/npm-developers.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/misc/npm-developers.md 2015-01-20 21:22:17.000000000 +0000 @@ -76,7 +76,7 @@ * scripts: If you have a special compilation or installation script, then you - should put it in the `scripts` hash. You should definitely have at + should put it in the `scripts` object. You should definitely have at least a basic smoke-test command as the "scripts.test" field. See npm-scripts(7). @@ -86,8 +86,8 @@ then you need to specify that in the "main" field. * 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 + This is an object mapping names to folders. The best ones to include are + "lib" and "doc", but if you use "man" to specify a folder full of man pages, they'll get installed just like these ones. You can use `npm init` in the root of your package in order to get you diff -Nru nodejs-0.11.14/deps/npm/doc/misc/npm-faq.md nodejs-0.11.15/deps/npm/doc/misc/npm-faq.md --- nodejs-0.11.14/deps/npm/doc/misc/npm-faq.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/misc/npm-faq.md 2015-01-20 21:22:17.000000000 +0000 @@ -135,7 +135,7 @@ ## How do I update npm? - npm update npm -g + npm install npm -g You can also update all outdated local packages by doing `npm update` without any arguments, or global packages by doing `npm update -g`. diff -Nru nodejs-0.11.14/deps/npm/doc/misc/npm-index.md nodejs-0.11.15/deps/npm/doc/misc/npm-index.md --- nodejs-0.11.14/deps/npm/doc/misc/npm-index.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/misc/npm-index.md 2015-01-20 21:22:17.000000000 +0000 @@ -161,10 +161,6 @@ Stop a package -### npm-submodule(1) - -Add a package as a git submodule - ### npm-tag(1) Tag a published version @@ -325,10 +321,6 @@ Stop a package -### npm-submodule(3) - -Add a package as a git submodule - ### npm-tag(3) Tag a published version diff -Nru nodejs-0.11.14/deps/npm/doc/misc/npm-scope.md nodejs-0.11.15/deps/npm/doc/misc/npm-scope.md --- nodejs-0.11.14/deps/npm/doc/misc/npm-scope.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/misc/npm-scope.md 2015-01-20 21:22:17.000000000 +0000 @@ -25,8 +25,8 @@ (`@myorg`) is simply the name of the scope preceded by an @-symbol, and can contain any number of scoped packages. -A scoped package is install by referencing it by name, preceded by an @-symbol, -in `npm install`: +A scoped package is installed by referencing it by name, preceded by an +@-symbol, in `npm install`: npm install @myorg/mypackage diff -Nru nodejs-0.11.14/deps/npm/doc/misc/npm-scripts.md nodejs-0.11.15/deps/npm/doc/misc/npm-scripts.md --- nodejs-0.11.14/deps/npm/doc/misc/npm-scripts.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/misc/npm-scripts.md 2015-01-20 21:22:17.000000000 +0000 @@ -3,7 +3,7 @@ ## DESCRIPTION -npm supports the "scripts" member of the package.json script, for the +npm supports the "scripts" property of the package.json script, for the following scripts: * prepublish: @@ -33,9 +33,10 @@ Run by the `npm restart` command. Note: `npm restart` will run the stop and start scripts if no `restart` script is provided. -Additionally, arbitrary scripts can be executed by running `npm run-script - `. *Pre* and *post* commands with matching names will be run for -those as well (e.g. `premyscript`, `myscript`, `postmyscript`). +Additionally, arbitrary scripts can be executed by running `npm +run-script `. *Pre* and *post* commands with matching +names will be run for those as well (e.g. `premyscript`, `myscript`, +`postmyscript`). ## NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN @@ -136,7 +137,7 @@ `npm_config_` prefix. For instance, you can view the effective `root` config by checking the `npm_config_root` environment variable. -### Special: package.json "config" hash +### Special: package.json "config" object The package.json "config" keys are overwritten in the environment if there is a config param of `[@]:`. For example, diff -Nru nodejs-0.11.14/deps/npm/doc/misc/semver.md nodejs-0.11.15/deps/npm/doc/misc/semver.md --- nodejs-0.11.14/deps/npm/doc/misc/semver.md 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/doc/misc/semver.md 2015-01-20 21:22:17.000000000 +0000 @@ -140,7 +140,7 @@ A partial version range is treated as an X-Range, so the special character is in fact optional. -* `` (empty string) := `*` := `>=0.0.0` +* `""` (empty string) := `*` := `>=0.0.0` * `1` := `1.x.x` := `>=1.0.0 <2.0.0` * `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` diff -Nru nodejs-0.11.14/deps/npm/.eslintrc nodejs-0.11.15/deps/npm/.eslintrc --- nodejs-0.11.14/deps/npm/.eslintrc 1970-01-01 00:00:00.000000000 +0000 +++ nodejs-0.11.15/deps/npm/.eslintrc 2015-01-20 21:22:17.000000000 +0000 @@ -0,0 +1,17 @@ +{ + "env" : { + "node" : true + }, + "rules" : { + "semi": [2, "never"], + "strict": 0, + "quotes": [1, "double", "avoid-escape"], + "no-use-before-define": 0, + "curly": 0, + "no-underscore-dangle": 0, + "no-lonely-if": 1, + "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}], + "no-mixed-requires": 0, + "space-infix-ops": 0 + } +} diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-bin.html nodejs-0.11.15/deps/npm/html/doc/api/npm-bin.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-bin.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-bin.html 2015-01-20 21:22:17.000000000 +0000 @@ -15,7 +15,7 @@

DESCRIPTION

Print the folder where npm will install executables.

This function should not be used programmatically. Instead, just refer -to the npm.bin member.

+to the npm.bin property.

@@ -28,5 +28,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-bugs.html nodejs-0.11.15/deps/npm/html/doc/api/npm-bugs.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-bugs.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-bugs.html 2015-01-20 21:22:17.000000000 +0000 @@ -33,5 +33,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-cache.html nodejs-0.11.15/deps/npm/html/doc/api/npm-cache.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-cache.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-cache.html 2015-01-20 21:22:17.000000000 +0000 @@ -18,7 +18,7 @@ npm.commands.cache.add([args], callback) npm.commands.cache.read(name, version, forceBypass, callback)

DESCRIPTION

-

This acts much the same ways as the npm-cache(1) command line +

This acts much the same ways as the npm-cache(1) command line functionality.

The callback is called with the package.json data of the thing that is eventually added to or read from the cache.

@@ -42,5 +42,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-commands.html nodejs-0.11.15/deps/npm/html/doc/api/npm-commands.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-commands.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-commands.html 2015-01-20 21:22:17.000000000 +0000 @@ -22,7 +22,7 @@ usage, or man 3 npm-<command> for programmatic usage.

SEE ALSO

@@ -36,5 +36,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-config.html nodejs-0.11.15/deps/npm/html/doc/api/npm-config.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-config.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-config.html 2015-01-20 21:22:17.000000000 +0000 @@ -43,7 +43,7 @@ functions instead.

SEE ALSO

@@ -57,5 +57,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-deprecate.html nodejs-0.11.15/deps/npm/html/doc/api/npm-deprecate.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-deprecate.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-deprecate.html 2015-01-20 21:22:17.000000000 +0000 @@ -31,9 +31,9 @@

To un-deprecate a package, specify an empty string ("") for the message argument.

SEE ALSO

@@ -47,5 +47,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-docs.html nodejs-0.11.15/deps/npm/html/doc/api/npm-docs.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-docs.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-docs.html 2015-01-20 21:22:17.000000000 +0000 @@ -33,5 +33,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-edit.html nodejs-0.11.15/deps/npm/html/doc/api/npm-edit.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-edit.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-edit.html 2015-01-20 21:22:17.000000000 +0000 @@ -36,5 +36,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-explore.html nodejs-0.11.15/deps/npm/html/doc/api/npm-explore.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-explore.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-explore.html 2015-01-20 21:22:17.000000000 +0000 @@ -31,5 +31,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-help-search.html nodejs-0.11.15/deps/npm/html/doc/api/npm-help-search.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-help-search.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-help-search.html 2015-01-20 21:22:17.000000000 +0000 @@ -31,7 +31,7 @@
  • file: Name of the file that matched
  • -

    The silent parameter is not neccessary not used, but it may in the future.

    +

    The silent parameter is not necessary not used, but it may in the future.

    @@ -44,5 +44,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm.html nodejs-0.11.15/deps/npm/html/doc/api/npm.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm.html 2015-01-20 21:22:17.000000000 +0000 @@ -23,20 +23,19 @@ npm.commands.install(["package"], cb) })

    VERSION

    -

    2.0.0

    +

    2.1.6

    DESCRIPTION

    This is the API documentation for npm. To find documentation of the command line -client, see npm(1).

    -

    Prior to using npm's commands, npm.load() must be called. -If you provide configObject as an object hash of top-level -configs, they override the values stored in the various config -locations. In the npm command line client, this set of configs -is parsed from the command line options. Additional configuration -params are loaded from two configuration files. See npm-config(1), -npm-config(7), and npmrc(5) for more information.

    +client, see npm(1).

    +

    Prior to using npm's commands, npm.load() must be called. If you provide +configObject as an object map of top-level configs, they override the values +stored in the various config locations. In the npm command line client, this +set of configs is parsed from the command line options. Additional +configuration params are loaded from two configuration files. See +npm-config(1), npm-config(7), and npmrc(5) for more information.

    After that, each of the functions are accessible in the -commands object: npm.commands.<cmd>. See npm-index(7) for a list of +commands object: npm.commands.<cmd>. See npm-index(7) for a list of all possible commands.

    All commands on the command object take an array of positional argument strings. The last argument to any function is a callback. Some @@ -80,9 +79,9 @@

    MAGIC

    -

    For each of the methods in the npm.commands hash, a method is added to -the npm object, which takes a set of positional string arguments rather -than an array and a callback.

    +

    For each of the methods in the npm.commands object, a method is added to the +npm object, which takes a set of positional string arguments rather than an +array and a callback.

    If the last argument is a callback, then it will use the supplied callback. However, if no callback is provided, then it will print out the error or results.

    @@ -110,5 +109,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-init.html nodejs-0.11.15/deps/npm/html/doc/api/npm-init.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-init.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-init.html 2015-01-20 21:22:17.000000000 +0000 @@ -26,7 +26,7 @@ preferred method. If you're sure you want to handle command-line prompting, then go ahead and use this programmatically.

    SEE ALSO

    -

    package.json(5)

    +

    package.json(5)

    @@ -39,5 +39,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-install.html nodejs-0.11.15/deps/npm/html/doc/api/npm-install.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-install.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-install.html 2015-01-20 21:22:17.000000000 +0000 @@ -32,5 +32,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-link.html nodejs-0.11.15/deps/npm/html/doc/api/npm-link.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-link.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-link.html 2015-01-20 21:22:17.000000000 +0000 @@ -42,5 +42,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-load.html nodejs-0.11.15/deps/npm/html/doc/api/npm-load.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-load.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-load.html 2015-01-20 21:22:17.000000000 +0000 @@ -15,9 +15,9 @@

    DESCRIPTION

    npm.load() must be called before any other function call. Both parameters are optional, but the second is recommended.

    -

    The first parameter is an object hash of command-line config params, and the -second parameter is a callback that will be called when npm is loaded and -ready to serve.

    +

    The first parameter is an object containing command-line config params, and the +second parameter is a callback that will be called when npm is loaded and ready +to serve.

    The first parameter should follow a similar structure as the package.json config object.

    For example, to emulate the --dev flag, pass an object that looks like this:

    @@ -37,5 +37,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-ls.html nodejs-0.11.15/deps/npm/html/doc/api/npm-ls.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-ls.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-ls.html 2015-01-20 21:22:17.000000000 +0000 @@ -63,5 +63,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-outdated.html nodejs-0.11.15/deps/npm/html/doc/api/npm-outdated.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-outdated.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-outdated.html 2015-01-20 21:22:17.000000000 +0000 @@ -28,5 +28,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-owner.html nodejs-0.11.15/deps/npm/html/doc/api/npm-owner.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-owner.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-owner.html 2015-01-20 21:22:17.000000000 +0000 @@ -32,8 +32,8 @@ that is not implemented at this time.

    SEE ALSO

    @@ -47,5 +47,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-pack.html nodejs-0.11.15/deps/npm/html/doc/api/npm-pack.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-pack.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-pack.html 2015-01-20 21:22:17.000000000 +0000 @@ -33,5 +33,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-prefix.html nodejs-0.11.15/deps/npm/html/doc/api/npm-prefix.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-prefix.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-prefix.html 2015-01-20 21:22:17.000000000 +0000 @@ -29,5 +29,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-prune.html nodejs-0.11.15/deps/npm/html/doc/api/npm-prune.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-prune.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-prune.html 2015-01-20 21:22:17.000000000 +0000 @@ -30,5 +30,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-publish.html nodejs-0.11.15/deps/npm/html/doc/api/npm-publish.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-publish.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-publish.html 2015-01-20 21:22:17.000000000 +0000 @@ -30,9 +30,9 @@ the registry. Overwrites when the "force" environment variable is set.

    SEE ALSO

    @@ -46,5 +46,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-rebuild.html nodejs-0.11.15/deps/npm/html/doc/api/npm-rebuild.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-rebuild.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-rebuild.html 2015-01-20 21:22:17.000000000 +0000 @@ -30,5 +30,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-repo.html nodejs-0.11.15/deps/npm/html/doc/api/npm-repo.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-repo.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-repo.html 2015-01-20 21:22:17.000000000 +0000 @@ -33,5 +33,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-restart.html nodejs-0.11.15/deps/npm/html/doc/api/npm-restart.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-restart.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-restart.html 2015-01-20 21:22:17.000000000 +0000 @@ -21,8 +21,8 @@ in the packages parameter.

    SEE ALSO

    @@ -36,5 +36,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-root.html nodejs-0.11.15/deps/npm/html/doc/api/npm-root.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-root.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-root.html 2015-01-20 21:22:17.000000000 +0000 @@ -29,5 +29,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-run-script.html nodejs-0.11.15/deps/npm/html/doc/api/npm-run-script.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-run-script.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-run-script.html 2015-01-20 21:22:17.000000000 +0000 @@ -23,11 +23,11 @@ assumed to be the command to run. All other elements are ignored.

    SEE ALSO

    @@ -41,5 +41,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-search.html nodejs-0.11.15/deps/npm/html/doc/api/npm-search.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-search.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-search.html 2015-01-20 21:22:17.000000000 +0000 @@ -53,5 +53,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-shrinkwrap.html nodejs-0.11.15/deps/npm/html/doc/api/npm-shrinkwrap.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-shrinkwrap.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-shrinkwrap.html 2015-01-20 21:22:17.000000000 +0000 @@ -33,5 +33,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-start.html nodejs-0.11.15/deps/npm/html/doc/api/npm-start.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-start.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-start.html 2015-01-20 21:22:17.000000000 +0000 @@ -28,5 +28,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-stop.html nodejs-0.11.15/deps/npm/html/doc/api/npm-stop.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-stop.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-stop.html 2015-01-20 21:22:17.000000000 +0000 @@ -28,5 +28,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-submodule.html nodejs-0.11.15/deps/npm/html/doc/api/npm-submodule.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-submodule.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-submodule.html 2015-01-20 21:22:17.000000000 +0000 @@ -42,5 +42,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-tag.html nodejs-0.11.15/deps/npm/html/doc/api/npm-tag.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-tag.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-tag.html 2015-01-20 21:22:17.000000000 +0000 @@ -36,5 +36,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-test.html nodejs-0.11.15/deps/npm/html/doc/api/npm-test.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-test.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-test.html 2015-01-20 21:22:17.000000000 +0000 @@ -30,5 +30,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-uninstall.html nodejs-0.11.15/deps/npm/html/doc/api/npm-uninstall.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-uninstall.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-uninstall.html 2015-01-20 21:22:17.000000000 +0000 @@ -30,5 +30,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-unpublish.html nodejs-0.11.15/deps/npm/html/doc/api/npm-unpublish.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-unpublish.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-unpublish.html 2015-01-20 21:22:17.000000000 +0000 @@ -33,5 +33,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-update.html nodejs-0.11.15/deps/npm/html/doc/api/npm-update.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-update.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-update.html 2015-01-20 21:22:17.000000000 +0000 @@ -27,5 +27,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-version.html nodejs-0.11.15/deps/npm/html/doc/api/npm-version.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-version.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-version.html 2015-01-20 21:22:17.000000000 +0000 @@ -32,5 +32,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-view.html nodejs-0.11.15/deps/npm/html/doc/api/npm-view.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-view.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-view.html 2015-01-20 21:22:17.000000000 +0000 @@ -81,5 +81,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/api/npm-whoami.html nodejs-0.11.15/deps/npm/html/doc/api/npm-whoami.html --- nodejs-0.11.14/deps/npm/html/doc/api/npm-whoami.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/api/npm-whoami.html 2015-01-20 21:22:17.000000000 +0000 @@ -29,5 +29,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-adduser.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-adduser.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-adduser.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-adduser.html 2015-01-20 21:22:17.000000000 +0000 @@ -11,11 +11,11 @@

    npm-adduser

    Add a registry user account

    SYNOPSIS

    -
    npm adduser [--registry=url] [--scope=@orgname]
    +
    npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
     

    DESCRIPTION

    Create or verify a user named <username> in the specified registry, and save the credentials to the .npmrc file. If no registry is specified, -the default registry will be used (see npm-config(7)).

    +the default registry will be used (see npm-config(7)).

    The username, password, and email are read in from prompts.

    You may use this command to change your email address, but not username or password.

    @@ -27,23 +27,33 @@

    registry

    Default: http://registry.npmjs.org/

    The base URL of the npm package registry. If scope is also specified, -this registry will only be used for packages with that scope. See npm-scope(7).

    +this registry will only be used for packages with that scope. See npm-scope(7).

    scope

    Default: none

    If specified, the user and login credentials given will be associated -with the specified scope. See npm-scope(7). You can use both at the same time, +with the specified scope. See npm-scope(7). You can use both at the same time, e.g.

    npm adduser --registry=http://myregistry.example.com --scope=@myco
     

    This will set a registry for the given scope and login or create a user for that registry at the same time.

    +

    always-auth

    +

    Default: false

    +

    If specified, save configuration indicating that all requests to the given +registry should include authorization information. Useful for private +registries. Can be used with --registry and / or --scope, e.g.

    +
    npm adduser --registry=http://private-registry.example.com --always-auth
    +

    This will ensure that all requests to that registry (including for tarballs) +include an authorization header. See always-auth in npm-config(7) for more +details on always-auth. Registry-specific configuaration of always-auth takes +precedence over any global configuration.

    SEE ALSO

    @@ -57,5 +67,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-bin.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-bin.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-bin.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-bin.html 2015-01-20 21:22:17.000000000 +0000 @@ -16,12 +16,12 @@

    Print the folder where npm will install executables.

    SEE ALSO

    @@ -35,5 +35,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-bugs.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-bugs.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-bugs.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-bugs.html 2015-01-20 21:22:17.000000000 +0000 @@ -33,14 +33,14 @@

    The base URL of the npm package registry.

    SEE ALSO

    @@ -54,5 +54,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-build.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-build.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-build.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-build.html 2015-01-20 21:22:17.000000000 +0000 @@ -21,10 +21,10 @@

    It should generally not be called directly.

    SEE ALSO

    @@ -38,5 +38,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-bundle.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-bundle.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-bundle.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-bundle.html 2015-01-20 21:22:17.000000000 +0000 @@ -17,7 +17,7 @@

    Just use npm install now to do what npm bundle used to do.

    SEE ALSO

    @@ -31,5 +31,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-cache.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-cache.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-cache.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-cache.html 2015-01-20 21:22:17.000000000 +0000 @@ -61,13 +61,13 @@

    The root cache folder.

    SEE ALSO

    @@ -81,5 +81,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-completion.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-completion.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-completion.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-completion.html 2015-01-20 21:22:17.000000000 +0000 @@ -26,9 +26,9 @@ completions based on the arguments.

    SEE ALSO

    @@ -42,5 +42,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-config.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-config.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-config.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-config.html 2015-01-20 21:22:17.000000000 +0000 @@ -22,8 +22,8 @@

    DESCRIPTION

    npm gets its config settings from the command line, environment variables, npmrc files, and in some cases, the package.json file.

    -

    See npmrc(5) for more information about the npmrc files.

    -

    See npm-config(7) for a more thorough discussion of the mechanisms +

    See npmrc(5) for more information about the npmrc files.

    +

    See npm-config(7) for a more thorough discussion of the mechanisms involved.

    The npm config command can be used to update and edit the contents of the user and global npmrc files.

    @@ -48,11 +48,11 @@ global config.

    SEE ALSO

    @@ -66,5 +66,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-dedupe.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-dedupe.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-dedupe.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-dedupe.html 2015-01-20 21:22:17.000000000 +0000 @@ -23,7 +23,7 @@ | `-- c@1.0.3 `-- d <-- depends on c@~1.0.9 `-- c@1.0.10 -

    In this case, npm-dedupe(1) will transform the tree to:

    +

    In this case, npm-dedupe(1) will transform the tree to:

    a
     +-- b
     +-- d
    @@ -47,9 +47,9 @@
     versions.

    SEE ALSO

    @@ -63,5 +63,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-deprecate.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-deprecate.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-deprecate.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-deprecate.html 2015-01-20 21:22:17.000000000 +0000 @@ -23,8 +23,8 @@

    To un-deprecate a package, specify an empty string ("") for the message argument.

    SEE ALSO

    @@ -38,5 +38,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-docs.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-docs.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-docs.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-docs.html 2015-01-20 21:22:17.000000000 +0000 @@ -36,13 +36,13 @@

    The base URL of the npm package registry.

    SEE ALSO

    @@ -56,5 +56,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-edit.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-edit.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-edit.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-edit.html 2015-01-20 21:22:17.000000000 +0000 @@ -14,7 +14,7 @@
    npm edit <name>[@<version>]
     

    DESCRIPTION

    Opens the package folder in the default editor (or whatever you've -configured as the npm editor config -- see npm-config(7).)

    +configured as the npm editor config -- see npm-config(7).)

    After it has been edited, the package is rebuilt so as to pick up any changes in compiled packages.

    For instance, you can do npm install connect to install connect @@ -30,12 +30,12 @@

    The command to run for npm edit or npm config edit.

    SEE ALSO

    @@ -49,5 +49,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-explore.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-explore.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-explore.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-explore.html 2015-01-20 21:22:17.000000000 +0000 @@ -31,12 +31,11 @@

    The shell to run for the npm explore command.

    SEE ALSO

    @@ -50,5 +49,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-help.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-help.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-help.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-help.html 2015-01-20 21:22:17.000000000 +0000 @@ -29,16 +29,16 @@

    Set to "browser" to view html help content in the default web browser.

    SEE ALSO

    @@ -52,5 +52,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-help-search.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-help-search.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-help-search.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-help-search.html 2015-01-20 21:22:17.000000000 +0000 @@ -30,9 +30,9 @@

    If false, then help-search will just list out the help topics found.

    SEE ALSO

    @@ -46,5 +46,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm.html nodejs-0.11.15/deps/npm/html/doc/cli/npm.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm.html 2015-01-20 21:22:17.000000000 +0000 @@ -13,7 +13,7 @@

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    2.0.0

    +

    2.1.6

    DESCRIPTION

    npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -25,7 +25,7 @@

    INTRODUCTION

    You probably got npm because you want to install stuff.

    Use npm install blerg to install the latest version of "blerg". Check out -npm-install(1) for more info. It can do a lot of stuff.

    +npm-install(1) for more info. It can do a lot of stuff.

    Use the npm search command to show everything that's available. Use npm ls to show everything you've installed.

    DEPENDENCIES

    @@ -42,7 +42,7 @@ the node-gyp repository and the node-gyp Wiki.

    DIRECTORIES

    -

    See npm-folders(5) to learn about where npm puts stuff.

    +

    See npm-folders(5) to learn about where npm puts stuff.

    In particular, npm has two modes of operation:

    • global mode:
      npm installs packages into the install prefix at @@ -58,7 +58,7 @@ following help topics:

      • json: -Make a package.json file. See package.json(5).
      • +Make a package.json file. See package.json(5).
      • 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 @@ -93,12 +93,12 @@
      • Defaults:
        npm's default configuration options are defined in lib/utils/config-defs.js. These must not be changed.
      -

      See npm-config(7) for much much more information.

      +

      See npm-config(7) for much much more information.

      CONTRIBUTIONS

      Patches welcome!

      Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

      @@ -128,19 +128,19 @@

      Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

      +i@izs.me

      SEE ALSO

      @@ -154,5 +154,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-init.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-init.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-init.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-init.html 2015-01-20 21:22:17.000000000 +0000 @@ -11,7 +11,7 @@

      npm-init

      Interactively create a package.json file

      SYNOPSIS

      -
      npm init
      +
      npm init [-f|--force|-y|--yes]
       

      DESCRIPTION

      This will ask you a bunch of questions, and then write a package.json for you.

      It attempts to make reasonable guesses about what you want things to be set to, @@ -20,11 +20,13 @@ the options in there.

      It is strictly additive, so it does not delete options from your package.json without a really good reason to do so.

      +

      If you invoke it with -f, --force, -y, or --yes, it will use only +defaults and not prompt you for any options.

      SEE ALSO

      @@ -38,5 +40,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-install.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-install.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-install.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-install.html 2015-01-20 21:22:17.000000000 +0000 @@ -23,13 +23,13 @@

      DESCRIPTION

      This command installs a package, and any packages that it depends on. If the package has a shrinkwrap file, the installation of dependencies will be driven -by that. See npm-shrinkwrap(1).

      +by that. See npm-shrinkwrap(1).

      A package is:

      • a) a folder containing a program described by a package.json file
      • b) a gzipped tarball containing (a)
      • c) a url that resolves to (b)
      • -
      • d) a <name>@<version> that is published on the registry (see npm-registry(7)) with (c)
      • +
      • d) a <name>@<version> that is published on the registry (see npm-registry(7)) with (c)
      • e) a <name>@<tag> that points to (d)
      • f) a <name> that has a "latest" tag satisfying (e)
      • g) a <git remote url> that resolves to (b)
      • @@ -66,7 +66,7 @@
  • npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]:

    Do a <name>@<tag> install, where <tag> is the "tag" config. (See - npm-config(7).)

    + npm-config(7).)

    In most cases, this will install the latest version of the module published on npm.

    Example:

    @@ -87,7 +87,7 @@ operator.

    <scope> is optional. The package will be downloaded from the registry associated with the specified scope. If no registry is associated with -the given scope the default registry is assumed. See npm-scope(7).

    +the given scope the default registry is assumed. See npm-scope(7).

    Note: if you do not include the @-symbol on your scope name, npm will interpret this as a GitHub repository instead, see below. Scopes names must also be followed by a slash.

    @@ -123,7 +123,7 @@
  • npm install [@<scope>/]<name>@<version range>:

    Install a version of the package matching the specified version range. This - will follow the same rules for resolving dependencies described in package.json(5).

    + will follow the same rules for resolving dependencies described in package.json(5).

    Note that most version ranges must be put in quotes so that your shell will treat it as a single argument.

    Example:

    @@ -161,7 +161,7 @@ local copy exists on disk.

    npm install sax --force
     

    The --global argument will cause npm to install the package globally -rather than locally. See npm-folders(5).

    +rather than locally. See npm-folders(5).

    The --link argument will cause npm to link global installs into the local space in some cases.

    The --no-bin-links argument will prevent npm from creating symlinks for @@ -172,7 +172,7 @@ shrinkwrap file and use the package.json instead.

    The --nodedir=/path/to/node/source argument will allow npm to find the node source code so that npm can compile native modules.

    -

    See npm-config(7). Many of the configuration params have some +

    See npm-config(7). Many of the configuration params have some effect on installation, since that's most of what npm does.

    ALGORITHM

    To install a package, npm uses the following algorithm:

    @@ -193,7 +193,7 @@ `-- D

    That is, the dependency from B to C is satisfied by the fact that A already caused C to be installed at a higher level.

    -

    See npm-folders(5) for a more detailed description of the specific +

    See npm-folders(5) for a more detailed description of the specific folder structures that npm creates.

    Limitations of npm's Install Algorithm

    There are some very rare and pathological edge-cases where a cycle can @@ -213,19 +213,19 @@ affects a real use-case, it will be investigated.

    SEE ALSO

    @@ -239,5 +239,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-link.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-link.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-link.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-link.html 2015-01-20 21:22:17.000000000 +0000 @@ -18,12 +18,12 @@

    Package linking is a two-step process.

    First, npm link in a package folder will create a globally-installed symbolic link from prefix/package-name to the current folder (see -npm-config(7) for the value of prefix).

    +npm-config(7) for the value of prefix).

    Next, in some other location, npm link package-name will create a symlink from the local node_modules folder to the global symlink.

    Note that package-name is taken from package.json, not from directory name.

    -

    The package name can be optionally prefixed with a scope. See npm-scope(7). +

    The package name can be optionally prefixed with a scope. See npm-scope(7). The scope must by preceded by an @-symbol and followed by a slash.

    When creating tarballs for npm publish, the linked packages are "snapshotted" to their current state by resolving the symbolic links.

    @@ -45,19 +45,19 @@ npm link redis

    That is, it first creates a global link, and then links the global installation target into your project's node_modules folder.

    -

    If your linked package is scoped (see npm-scope(7)) your link command must +

    If your linked package is scoped (see npm-scope(7)) your link command must include that scope, e.g.

    npm link @myorg/privatepackage
     

    SEE ALSO

    @@ -71,5 +71,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-ls.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-ls.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-ls.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-ls.html 2015-01-20 21:22:17.000000000 +0000 @@ -22,7 +22,7 @@ limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

    -
    npm@2.0.0 /path/to/npm
    +
    npm@2.1.6 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     

    It will print out extraneous, missing, and invalid packages.

    @@ -63,15 +63,15 @@

    Max display depth of the dependency tree.

    SEE ALSO

    @@ -85,5 +85,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-outdated.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-outdated.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-outdated.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-outdated.html 2015-01-20 21:22:17.000000000 +0000 @@ -51,9 +51,9 @@

    Max depth for checking dependency tree.

    SEE ALSO

    @@ -67,5 +67,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-owner.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-owner.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-owner.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-owner.html 2015-01-20 21:22:17.000000000 +0000 @@ -32,10 +32,10 @@ that is not implemented at this time.

    SEE ALSO

    @@ -49,5 +49,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-pack.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-pack.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-pack.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-pack.html 2015-01-20 21:22:17.000000000 +0000 @@ -23,11 +23,11 @@

    If no arguments are supplied, then npm packs the current package folder.

    SEE ALSO

    @@ -41,5 +41,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-prefix.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-prefix.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-prefix.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-prefix.html 2015-01-20 21:22:17.000000000 +0000 @@ -16,15 +16,15 @@

    Print the local prefix to standard out. This is the closest parent directory to contain a package.json file unless -g is also specified.

    If -g is specified, this will be the value of the global prefix. See -npm-config(7) for more detail.

    +npm-config(7) for more detail.

    SEE ALSO

    @@ -38,5 +38,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-prune.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-prune.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-prune.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-prune.html 2015-01-20 21:22:17.000000000 +0000 @@ -23,9 +23,9 @@ packages specified in your devDependencies.

    SEE ALSO

    @@ -39,5 +39,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-publish.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-publish.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-publish.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-publish.html 2015-01-20 21:22:17.000000000 +0000 @@ -14,10 +14,12 @@
    npm publish <tarball> [--tag <tag>]
     npm publish <folder> [--tag <tag>]
     

    DESCRIPTION

    -

    Publishes a package to the registry so that it can be installed by name.

    +

    Publishes a package to the registry so that it can be installed by name. See +npm-developers(7) for details on what's included in the published package, as +well as details on how the package is built.

    By default npm will publish to the public registry. This can be overridden by -specifying a different default registry or using a npm-scope(7) in the name -(see package.json(5)).

    +specifying a different default registry or using a npm-scope(7) in the name +(see package.json(5)).

    • <folder>: A folder containing a package.json file

      @@ -36,14 +38,14 @@ the specified registry.

      Once a package is published with a given name and version, that specific name and version combination can never be used again, even if -it is removed with npm-unpublish(1).

      +it is removed with npm-unpublish(1).

      SEE ALSO

      @@ -57,5 +59,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-rebuild.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-rebuild.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-rebuild.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-rebuild.html 2015-01-20 21:22:17.000000000 +0000 @@ -23,8 +23,8 @@ the new binary.

      SEE ALSO

      @@ -38,5 +38,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-repo.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-repo.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-repo.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-repo.html 2015-01-20 21:22:17.000000000 +0000 @@ -27,8 +27,8 @@

      The browser that is called by the npm repo command to open websites.

      SEE ALSO

      @@ -42,5 +42,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-restart.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-restart.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-restart.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-restart.html 2015-01-20 21:22:17.000000000 +0000 @@ -13,17 +13,15 @@

      SYNOPSIS

      npm restart [-- <args>]
       

      DESCRIPTION

      -

      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.

      -

      If no version is specified, then it restarts the "active" version.

      +

      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.

      SEE ALSO

      @@ -37,5 +35,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-rm.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-rm.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-rm.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-rm.html 2015-01-20 21:22:17.000000000 +0000 @@ -20,12 +20,12 @@ on its behalf.

      SEE ALSO

      @@ -39,5 +39,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-root.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-root.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-root.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-root.html 2015-01-20 21:22:17.000000000 +0000 @@ -16,12 +16,12 @@

      Print the effective node_modules folder to standard out.

      SEE ALSO

      @@ -35,5 +35,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-run-script.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-run-script.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-run-script.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-run-script.html 2015-01-20 21:22:17.000000000 +0000 @@ -20,13 +20,20 @@ is provided, it will list the available top level scripts.

      It is used by the test, start, restart, and stop commands, but can be called directly, as well.

      +

      As of npm@2.0.0, you can +use custom arguments when executing scripts. The special option -- is used by +getopt to delimit the end of the options. npm will pass +all the arguments after the -- directly to your script:

      +
      npm run test -- --grep="pattern"
      +

      The arguments will only be passed to the script specified after npm run +and not to any pre or post script.

      SEE ALSO

      @@ -40,5 +47,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-search.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-search.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-search.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-search.html 2015-01-20 21:22:17.000000000 +0000 @@ -31,11 +31,11 @@ fall on multiple lines.

      SEE ALSO

      @@ -49,5 +49,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-shrinkwrap.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-shrinkwrap.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-shrinkwrap.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-shrinkwrap.html 2015-01-20 21:22:17.000000000 +0000 @@ -120,7 +120,7 @@
    • Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and publish your package.
    • -

      You can use npm-outdated(1) to view dependencies with newer versions +

      You can use npm-outdated(1) to view dependencies with newer versions available.

      Other Notes

      A shrinkwrap file must be consistent with the package's package.json @@ -148,9 +148,9 @@ contents rather than versions.

      SEE ALSO

      @@ -164,5 +164,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-star.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-star.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-star.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-star.html 2015-01-20 21:22:17.000000000 +0000 @@ -20,9 +20,9 @@

      It's a boolean thing. Starring repeatedly has no additional effect.

      SEE ALSO

      @@ -36,5 +36,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-stars.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-stars.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-stars.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-stars.html 2015-01-20 21:22:17.000000000 +0000 @@ -20,10 +20,10 @@ you will most certainly enjoy this command.

      SEE ALSO

      @@ -37,5 +37,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-start.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-start.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-start.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-start.html 2015-01-20 21:22:17.000000000 +0000 @@ -16,11 +16,11 @@

      This runs a package's "start" script, if one was provided.

      SEE ALSO

      @@ -34,5 +34,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-stop.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-stop.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-stop.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-stop.html 2015-01-20 21:22:17.000000000 +0000 @@ -16,11 +16,11 @@

      This runs a package's "stop" script, if one was provided.

      SEE ALSO

      @@ -34,5 +34,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-submodule.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-submodule.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-submodule.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-submodule.html 2015-01-20 21:22:17.000000000 +0000 @@ -27,7 +27,7 @@ dependencies into the submodule folder.

      SEE ALSO

      @@ -42,5 +42,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-tag.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-tag.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-tag.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-tag.html 2015-01-20 21:22:17.000000000 +0000 @@ -24,13 +24,13 @@

      Publishing a package always sets the "latest" tag to the published version.

      SEE ALSO

      @@ -44,5 +44,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-test.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-test.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-test.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-test.html 2015-01-20 21:22:17.000000000 +0000 @@ -19,11 +19,11 @@ true.

      SEE ALSO

      @@ -37,5 +37,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-uninstall.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-uninstall.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-uninstall.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-uninstall.html 2015-01-20 21:22:17.000000000 +0000 @@ -30,7 +30,7 @@
    • --save-optional: Package will be removed from your optionalDependencies.

    -

    Scope is optional and follows the usual rules for npm-scope(7).

    +

    Scope is optional and follows the usual rules for npm-scope(7).

    Examples:

    npm uninstall sax --save
     npm uninstall @myorg/privatepackage --save
    @@ -38,12 +38,12 @@
     npm uninstall dtrace-provider --save-optional
     

    SEE ALSO

    @@ -57,5 +57,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-unpublish.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-unpublish.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-unpublish.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-unpublish.html 2015-01-20 21:22:17.000000000 +0000 @@ -26,14 +26,14 @@

    Even if a package version is unpublished, that specific name and version combination can never be reused. In order to publish the package again, a new version number must be used.

    -

    The scope is optional and follows the usual rules for npm-scope(7).

    +

    The scope is optional and follows the usual rules for npm-scope(7).

    SEE ALSO

    @@ -47,5 +47,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-update.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-update.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-update.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-update.html 2015-01-20 21:22:17.000000000 +0000 @@ -22,11 +22,11 @@ or local) will be updated.

    SEE ALSO

    @@ -40,5 +40,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-version.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-version.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-version.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-version.html 2015-01-20 21:22:17.000000000 +0000 @@ -39,9 +39,9 @@ Enter passphrase:

    SEE ALSO

    @@ -55,5 +55,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-view.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-view.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-view.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-view.html 2015-01-20 21:22:17.000000000 +0000 @@ -46,7 +46,7 @@
    npm view express contributors.name contributors.email
     

    "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 package.json(5) for more on this.)

    +the shortened string format. (See package.json(5) for more on this.)

    npm view npm contributors
     

    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 @@ -63,12 +63,12 @@ the field name.

    SEE ALSO

    @@ -82,5 +82,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/cli/npm-whoami.html nodejs-0.11.15/deps/npm/html/doc/cli/npm-whoami.html --- nodejs-0.11.14/deps/npm/html/doc/cli/npm-whoami.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/cli/npm-whoami.html 2015-01-20 21:22:17.000000000 +0000 @@ -16,10 +16,10 @@

    Print the username config to standard output.

    SEE ALSO

    @@ -33,5 +33,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/files/npm-folders.html nodejs-0.11.15/deps/npm/html/doc/files/npm-folders.html --- nodejs-0.11.14/deps/npm/html/doc/files/npm-folders.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/files/npm-folders.html 2015-01-20 21:22:17.000000000 +0000 @@ -44,7 +44,7 @@

    Scoped packages are installed the same way, except they are grouped together in a sub-folder of the relevant node_modules folder with the name of that scope prefix by the @ symbol, e.g. npm install @myorg/package would place -the package in {prefix}/node_modules/@myorg/package. See scopes(7) for +the package in {prefix}/node_modules/@myorg/package. See scopes(7) for more details.

    If you wish to require() a package, then install it locally.

    Executables

    @@ -59,7 +59,7 @@

    When in local mode, man pages are not installed.

    Man pages are not installed on Windows systems.

    Cache

    -

    See npm-cache(1). Cache files are stored in ~/.npm on Posix, or +

    See npm-cache(1). Cache files are stored in ~/.npm on Posix, or ~/npm-cache on Windows.

    This is controlled by the cache configuration param.

    Temp Files

    @@ -159,18 +159,18 @@ not be included in the package tarball.

    This allows a package maintainer to install all of their dependencies (and dev dependencies) locally, but only re-publish those items that -cannot be found elsewhere. See package.json(5) for more information.

    +cannot be found elsewhere. See package.json(5) for more information.

    SEE ALSO

    @@ -184,5 +184,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/files/npm-global.html nodejs-0.11.15/deps/npm/html/doc/files/npm-global.html --- nodejs-0.11.14/deps/npm/html/doc/files/npm-global.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/files/npm-global.html 2015-01-20 21:22:17.000000000 +0000 @@ -1,9 +1,9 @@ - npm-folders + npm-global - + @@ -44,7 +44,7 @@

    Scoped packages are installed the same way, except they are grouped together in a sub-folder of the relevant node_modules folder with the name of that scope prefix by the @ symbol, e.g. npm install @myorg/package would place -the package in {prefix}/node_modules/@myorg/package. See scopes(7) for +the package in {prefix}/node_modules/@myorg/package. See scopes(7) for more details.

    If you wish to require() a package, then install it locally.

    Executables

    @@ -59,7 +59,7 @@

    When in local mode, man pages are not installed.

    Man pages are not installed on Windows systems.

    Cache

    -

    See npm-cache(1). Cache files are stored in ~/.npm on Posix, or +

    See npm-cache(1). Cache files are stored in ~/.npm on Posix, or ~/npm-cache on Windows.

    This is controlled by the cache configuration param.

    Temp Files

    @@ -159,18 +159,18 @@ not be included in the package tarball.

    This allows a package maintainer to install all of their dependencies (and dev dependencies) locally, but only re-publish those items that -cannot be found elsewhere. See package.json(5) for more information.

    +cannot be found elsewhere. See package.json(5) for more information.

    SEE ALSO

    @@ -184,5 +184,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/files/npm-json.html nodejs-0.11.15/deps/npm/html/doc/files/npm-json.html --- nodejs-0.11.14/deps/npm/html/doc/files/npm-json.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/files/npm-json.html 2015-01-20 21:22:17.000000000 +0000 @@ -1,9 +1,9 @@ - package.json + npm-json - + @@ -14,7 +14,7 @@

    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.

    A lot of the behavior described in this document is affected by the config -settings described in npm-config(7).

    +settings described in npm-config(7).

    name

    The most important things in your package.json are the name and version fields. Those are actually required, and your package won't install without @@ -35,7 +35,7 @@ already, before you get too attached to it. http://registry.npmjs.org/

  • A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See -npm-scope(7) for more detail.

    +npm-scope(7) for more detail.

    version

    The most important things in your package.json are the name and version fields. Those are actually required, and your package won't install without @@ -45,7 +45,7 @@

    Version must be parseable by node-semver, which is bundled with npm as a dependency. (npm install semver to use it yourself.)

    -

    More on version numbers and ranges at semver(7).

    +

    More on version numbers and ranges at semver(7).

    description

    Put a description in it. It's a string. This helps people discover your package, as it's listed in npm search.

    @@ -161,16 +161,16 @@

    directories

    The CommonJS Packages spec details a few ways that you can indicate the structure of your package using a directories -hash. If you look at npm's package.json, +object. If you look at npm's package.json, you'll see that it has directories for doc, lib, and man.

    In the future, this information may be used in other creative ways.

    directories.lib

    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.

    directories.bin

    -

    If you specify a "bin" directory, then all the files in that folder will -be used as the "bin" hash.

    -

    If you have a "bin" hash already, then this has no effect.

    +

    If you specify a bin directory, then all the files in that folder will +be added as children of the bin path.

    +

    If you have a bin path already, then this has no effect.

    directories.man

    A folder that is full of man pages. Sugar to generate a "man" array by walking the folder.

    @@ -197,37 +197,37 @@ 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.

    scripts

    -

    The "scripts" member is an object hash of script commands that are run +

    The "scripts" property is a dictionary containing 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.

    -

    See npm-scripts(7) to find out more about writing package scripts.

    +

    See npm-scripts(7) to find out more about writing package scripts.

    config

    -

    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:

    +

    A "config" object can be used to set configuration parameters used in package +scripts that persist across upgrades. For instance, if a package had the +following:

    { "name" : "foo"
     , "config" : { "port" : "8080" } }
     

    and then had a "start" command that then referenced the npm_package_config_port environment variable, then the user could override that by doing npm config set foo:port 8001.

    -

    See npm-config(7) and npm-scripts(7) for more on package +

    See npm-config(7) and npm-scripts(7) for more on package configs.

    dependencies

    -

    Dependencies are specified with a simple hash of package name to +

    Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more -space-separated descriptors. Dependencies can also be identified with -a tarball or git URL.

    +space-separated descriptors. Dependencies can also be identified with a +tarball or git URL.

    Please do not put test harnesses or transpilers in your -dependencies hash. See devDependencies, below.

    -

    See semver(7) for more details about specifying version ranges.

    +dependencies object. See devDependencies, below.

    +

    See semver(7) for more details about specifying version ranges.

    • version Must match version exactly
    • >version Must be greater than version
    • >=version etc
    • <version
    • <=version
    • -
    • ~version "Approximately equivalent to version" See semver(7)
    • -
    • ^version "Compatible with version" See semver(7)
    • +
    • ~version "Approximately equivalent to version" See semver(7)
    • +
    • ^version "Compatible with version" See semver(7)
    • 1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0
    • http://... See 'URLs as Dependencies' below
    • * Matches any version
    • @@ -236,7 +236,7 @@
    • range1 || range2 Passes if either range1 or range2 are satisfied.
    • git... See 'Git URLs as Dependencies' below
    • user/repo See 'GitHub URLs' below
    • -
    • tag A specific version tagged and published as tag See npm-tag(1)
    • +
    • tag A specific version tagged and published as tag See npm-tag(1)
    • path/path/path See Local Paths below

    For example, these are all valid:

    @@ -252,7 +252,7 @@ , "two" : "2.x" , "thr" : "3.3.x" , "lat" : "latest" - , "dyl" : "~/projects/dyl" + , "dyl" : "file:../dyl" } }

    URLs as Dependencies

    @@ -278,12 +278,21 @@ } }

    Local Paths

    -

    As of version 2.0.0 you can provide a path to a local directory that -contains a package. Local paths can be in the form:

    +

    As of version 2.0.0 you can provide a path to a local directory that contains a +package. Local paths can be saved using npm install --save, using any of +these forms:

    ../foo/bar
     ~/foo/bar
     ./foo/bar
     /foo/bar
    +

    in which case they will be normalized to a relative path and added to your +package.json. For example:

    +
    {
    +  "name": "baz",
    +  "dependencies": {
    +    "bar": "file:../foo/bar"
    +  }
    +}
     

    This feature is helpful for local offline development and creating tests that require npm installing where you don't want to hit an external server, but should not be used when publishing packages @@ -292,11 +301,11 @@

    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 the external test or documentation framework that you use.

    -

    In this case, it's best to list these additional items in a -devDependencies hash.

    +

    In this case, it's best to map these additional items in a devDependencies +object.

    These things will be installed when doing npm link or npm install from the root of a package, and can be managed like any other npm -configuration param. See npm-config(7) for more on the topic.

    +configuration param. See npm-config(7) for more on the topic.

    For build steps that are not platform-specific, such as compiling CoffeeScript or other languages to JavaScript, use the prepublish script to do this, and make the required package a devDependency.

    @@ -346,11 +355,11 @@

    Array of package names that will be bundled when publishing the package.

    If this is spelled "bundleDependencies", then that is also honorable.

    optionalDependencies

    -

    If a dependency can be used, but you would like npm to proceed if it -cannot be found or fails to install, then you may put it in the -optionalDependencies hash. This is a map of package name to version -or url, just like the dependencies hash. The difference is that -failure is tolerated.

    +

    If a dependency can be used, but you would like npm to proceed if it cannot be +found or fails to install, then you may put it in the optionalDependencies +object. This is a map of package name to version or url, just like the +dependencies object. The difference is that build failures do not cause +installation to fail.

    It is still your program's responsibility to handle the lack of the dependency. For example, something like this:

    try {
    @@ -385,11 +394,11 @@
     field is advisory only.

    engineStrict

    If you are sure that your module will definitely not run properly on -versions of Node/npm other than those specified in the engines hash, +versions of Node/npm other than those specified in the engines object, then you can set "engineStrict": true in your package.json file. This will override the user's engine-strict config setting.

    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 +engines object is something overly restrictive, you can quite easily and inadvertently lock yourself into obscurity and prevent your users from updating to new versions of Node. Consider this choice carefully. If people abuse it, it will be removed in a future version of npm.

    @@ -419,11 +428,11 @@

    private

    If you set "private": true in your package.json, then npm will refuse to publish it.

    -

    This is a way to prevent accidental publication of private repositories. -If you would like to ensure that a given package is only ever published -to a specific registry (for example, an internal registry), -then use the publishConfig hash described below -to override the registry config param at publish-time.

    +

    This is a way to prevent accidental publication of private repositories. If +you would like to ensure that a given package is only ever published to a +specific registry (for example, an internal registry), then use the +publishConfig dictionary described below to override the registry config +param at publish-time.

    publishConfig

    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 @@ -431,7 +440,7 @@ the global public registry by default.

    Any config values can be overridden, but of course only "tag" and "registry" probably matter for the purposes of publishing.

    -

    See npm-config(7) to see the list of config options that can be +

    See npm-config(7) to see the list of config options that can be overridden.

    DEFAULT VALUES

    npm will default some values based on package contents.

    @@ -453,16 +462,16 @@

    SEE ALSO

    @@ -476,5 +485,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/files/npmrc.html nodejs-0.11.15/deps/npm/html/doc/files/npmrc.html --- nodejs-0.11.14/deps/npm/html/doc/files/npmrc.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/files/npmrc.html 2015-01-20 21:22:17.000000000 +0000 @@ -15,7 +15,7 @@ variables, and npmrc files.

    The npm config command can be used to update and edit the contents of the user and global npmrc files.

    -

    For a list of available configuration options, see npm-config(7).

    +

    For a list of available configuration options, see npm-config(7).

    FILES

    The four relevant files are:

      @@ -55,11 +55,11 @@ manner.

      SEE ALSO

      @@ -73,5 +73,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/files/package.json.html nodejs-0.11.15/deps/npm/html/doc/files/package.json.html --- nodejs-0.11.14/deps/npm/html/doc/files/package.json.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/files/package.json.html 2015-01-20 21:22:17.000000000 +0000 @@ -14,7 +14,7 @@

      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.

      A lot of the behavior described in this document is affected by the config -settings described in npm-config(7).

      +settings described in npm-config(7).

      name

      The most important things in your package.json are the name and version fields. Those are actually required, and your package won't install without @@ -35,7 +35,7 @@ already, before you get too attached to it. http://registry.npmjs.org/

    A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See -npm-scope(7) for more detail.

    +npm-scope(7) for more detail.

    version

    The most important things in your package.json are the name and version fields. Those are actually required, and your package won't install without @@ -45,7 +45,7 @@

    Version must be parseable by node-semver, which is bundled with npm as a dependency. (npm install semver to use it yourself.)

    -

    More on version numbers and ranges at semver(7).

    +

    More on version numbers and ranges at semver(7).

    description

    Put a description in it. It's a string. This helps people discover your package, as it's listed in npm search.

    @@ -161,16 +161,16 @@

    directories

    The CommonJS Packages spec details a few ways that you can indicate the structure of your package using a directories -hash. If you look at npm's package.json, +object. If you look at npm's package.json, you'll see that it has directories for doc, lib, and man.

    In the future, this information may be used in other creative ways.

    directories.lib

    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.

    directories.bin

    -

    If you specify a "bin" directory, then all the files in that folder will -be used as the "bin" hash.

    -

    If you have a "bin" hash already, then this has no effect.

    +

    If you specify a bin directory, then all the files in that folder will +be added as children of the bin path.

    +

    If you have a bin path already, then this has no effect.

    directories.man

    A folder that is full of man pages. Sugar to generate a "man" array by walking the folder.

    @@ -197,37 +197,37 @@ 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.

    scripts

    -

    The "scripts" member is an object hash of script commands that are run +

    The "scripts" property is a dictionary containing 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.

    -

    See npm-scripts(7) to find out more about writing package scripts.

    +

    See npm-scripts(7) to find out more about writing package scripts.

    config

    -

    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:

    +

    A "config" object can be used to set configuration parameters used in package +scripts that persist across upgrades. For instance, if a package had the +following:

    { "name" : "foo"
     , "config" : { "port" : "8080" } }
     

    and then had a "start" command that then referenced the npm_package_config_port environment variable, then the user could override that by doing npm config set foo:port 8001.

    -

    See npm-config(7) and npm-scripts(7) for more on package +

    See npm-config(7) and npm-scripts(7) for more on package configs.

    dependencies

    -

    Dependencies are specified with a simple hash of package name to +

    Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more -space-separated descriptors. Dependencies can also be identified with -a tarball or git URL.

    +space-separated descriptors. Dependencies can also be identified with a +tarball or git URL.

    Please do not put test harnesses or transpilers in your -dependencies hash. See devDependencies, below.

    -

    See semver(7) for more details about specifying version ranges.

    +dependencies object. See devDependencies, below.

    +

    See semver(7) for more details about specifying version ranges.

    • version Must match version exactly
    • >version Must be greater than version
    • >=version etc
    • <version
    • <=version
    • -
    • ~version "Approximately equivalent to version" See semver(7)
    • -
    • ^version "Compatible with version" See semver(7)
    • +
    • ~version "Approximately equivalent to version" See semver(7)
    • +
    • ^version "Compatible with version" See semver(7)
    • 1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0
    • http://... See 'URLs as Dependencies' below
    • * Matches any version
    • @@ -236,7 +236,7 @@
    • range1 || range2 Passes if either range1 or range2 are satisfied.
    • git... See 'Git URLs as Dependencies' below
    • user/repo See 'GitHub URLs' below
    • -
    • tag A specific version tagged and published as tag See npm-tag(1)
    • +
    • tag A specific version tagged and published as tag See npm-tag(1)
    • path/path/path See Local Paths below

    For example, these are all valid:

    @@ -252,7 +252,7 @@ , "two" : "2.x" , "thr" : "3.3.x" , "lat" : "latest" - , "dyl" : "~/projects/dyl" + , "dyl" : "file:../dyl" } }

    URLs as Dependencies

    @@ -278,12 +278,21 @@ } }

    Local Paths

    -

    As of version 2.0.0 you can provide a path to a local directory that -contains a package. Local paths can be in the form:

    +

    As of version 2.0.0 you can provide a path to a local directory that contains a +package. Local paths can be saved using npm install --save, using any of +these forms:

    ../foo/bar
     ~/foo/bar
     ./foo/bar
     /foo/bar
    +

    in which case they will be normalized to a relative path and added to your +package.json. For example:

    +
    {
    +  "name": "baz",
    +  "dependencies": {
    +    "bar": "file:../foo/bar"
    +  }
    +}
     

    This feature is helpful for local offline development and creating tests that require npm installing where you don't want to hit an external server, but should not be used when publishing packages @@ -292,11 +301,11 @@

    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 the external test or documentation framework that you use.

    -

    In this case, it's best to list these additional items in a -devDependencies hash.

    +

    In this case, it's best to map these additional items in a devDependencies +object.

    These things will be installed when doing npm link or npm install from the root of a package, and can be managed like any other npm -configuration param. See npm-config(7) for more on the topic.

    +configuration param. See npm-config(7) for more on the topic.

    For build steps that are not platform-specific, such as compiling CoffeeScript or other languages to JavaScript, use the prepublish script to do this, and make the required package a devDependency.

    @@ -346,11 +355,11 @@

    Array of package names that will be bundled when publishing the package.

    If this is spelled "bundleDependencies", then that is also honorable.

    optionalDependencies

    -

    If a dependency can be used, but you would like npm to proceed if it -cannot be found or fails to install, then you may put it in the -optionalDependencies hash. This is a map of package name to version -or url, just like the dependencies hash. The difference is that -failure is tolerated.

    +

    If a dependency can be used, but you would like npm to proceed if it cannot be +found or fails to install, then you may put it in the optionalDependencies +object. This is a map of package name to version or url, just like the +dependencies object. The difference is that build failures do not cause +installation to fail.

    It is still your program's responsibility to handle the lack of the dependency. For example, something like this:

    try {
    @@ -385,11 +394,11 @@
     field is advisory only.

    engineStrict

    If you are sure that your module will definitely not run properly on -versions of Node/npm other than those specified in the engines hash, +versions of Node/npm other than those specified in the engines object, then you can set "engineStrict": true in your package.json file. This will override the user's engine-strict config setting.

    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 +engines object is something overly restrictive, you can quite easily and inadvertently lock yourself into obscurity and prevent your users from updating to new versions of Node. Consider this choice carefully. If people abuse it, it will be removed in a future version of npm.

    @@ -419,11 +428,11 @@

    private

    If you set "private": true in your package.json, then npm will refuse to publish it.

    -

    This is a way to prevent accidental publication of private repositories. -If you would like to ensure that a given package is only ever published -to a specific registry (for example, an internal registry), -then use the publishConfig hash described below -to override the registry config param at publish-time.

    +

    This is a way to prevent accidental publication of private repositories. If +you would like to ensure that a given package is only ever published to a +specific registry (for example, an internal registry), then use the +publishConfig dictionary described below to override the registry config +param at publish-time.

    publishConfig

    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 @@ -431,7 +440,7 @@ the global public registry by default.

    Any config values can be overridden, but of course only "tag" and "registry" probably matter for the purposes of publishing.

    -

    See npm-config(7) to see the list of config options that can be +

    See npm-config(7) to see the list of config options that can be overridden.

    DEFAULT VALUES

    npm will default some values based on package contents.

    @@ -453,16 +462,16 @@

    SEE ALSO

    @@ -476,5 +485,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/index.html nodejs-0.11.15/deps/npm/html/doc/index.html --- nodejs-0.11.14/deps/npm/html/doc/index.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/index.html 2015-01-20 21:22:17.000000000 +0000 @@ -1,6 +1,6 @@ - npm-index + index @@ -10,217 +10,213 @@

    npm-index

    Index of all npm documentation

    -

    README

    +

    README

    node package manager

    Command Line Documentation

    Using npm on the command line

    -

    npm(1)

    +

    npm(1)

    node package manager

    -

    npm-adduser(1)

    +

    npm-adduser(1)

    Add a registry user account

    -

    npm-bin(1)

    +

    npm-bin(1)

    Display npm bin folder

    -

    npm-bugs(1)

    +

    npm-bugs(1)

    Bugs for a package in a web browser maybe

    -

    npm-build(1)

    +

    npm-build(1)

    Build a package

    -

    npm-bundle(1)

    +

    npm-bundle(1)

    REMOVED

    -

    npm-cache(1)

    +

    npm-cache(1)

    Manipulates packages cache

    -

    npm-completion(1)

    +

    npm-completion(1)

    Tab Completion for npm

    -

    npm-config(1)

    +

    npm-config(1)

    Manage the npm configuration files

    -

    npm-dedupe(1)

    +

    npm-dedupe(1)

    Reduce duplication

    -

    npm-deprecate(1)

    +

    npm-deprecate(1)

    Deprecate a version of a package

    -

    npm-docs(1)

    +

    npm-docs(1)

    Docs for a package in a web browser maybe

    -

    npm-edit(1)

    +

    npm-edit(1)

    Edit an installed package

    -

    npm-explore(1)

    +

    npm-explore(1)

    Browse an installed package

    -

    npm-help-search(1)

    +

    npm-help-search(1)

    Search npm help documentation

    -

    npm-help(1)

    +

    npm-help(1)

    Get help on npm

    -

    npm-init(1)

    +

    npm-init(1)

    Interactively create a package.json file

    -

    npm-install(1)

    +

    npm-install(1)

    Install a package

    - +

    Symlink a package folder

    -

    npm-ls(1)

    +

    npm-ls(1)

    List installed packages

    -

    npm-outdated(1)

    +

    npm-outdated(1)

    Check for outdated packages

    -

    npm-owner(1)

    +

    npm-owner(1)

    Manage package owners

    -

    npm-pack(1)

    +

    npm-pack(1)

    Create a tarball from a package

    -

    npm-prefix(1)

    +

    npm-prefix(1)

    Display prefix

    -

    npm-prune(1)

    +

    npm-prune(1)

    Remove extraneous packages

    -

    npm-publish(1)

    +

    npm-publish(1)

    Publish a package

    -

    npm-rebuild(1)

    +

    npm-rebuild(1)

    Rebuild a package

    -

    npm-repo(1)

    +

    npm-repo(1)

    Open package repository page in the browser

    -

    npm-restart(1)

    +

    npm-restart(1)

    Start a package

    -

    npm-rm(1)

    +

    npm-rm(1)

    Remove a package

    -

    npm-root(1)

    +

    npm-root(1)

    Display npm root

    -

    npm-run-script(1)

    +

    npm-run-script(1)

    Run arbitrary package scripts

    -

    npm-search(1)

    +

    npm-search(1)

    Search for packages

    -

    npm-shrinkwrap(1)

    +

    npm-shrinkwrap(1)

    Lock down dependency versions

    -

    npm-star(1)

    +

    npm-star(1)

    Mark your favorite packages

    -

    npm-stars(1)

    +

    npm-stars(1)

    View packages marked as favorites

    -

    npm-start(1)

    +

    npm-start(1)

    Start a package

    -

    npm-stop(1)

    +

    npm-stop(1)

    Stop a package

    -

    npm-submodule(1)

    -

    Add a package as a git submodule

    -

    npm-tag(1)

    +

    npm-tag(1)

    Tag a published version

    -

    npm-test(1)

    +

    npm-test(1)

    Test a package

    -

    npm-uninstall(1)

    +

    npm-uninstall(1)

    Remove a package

    -

    npm-unpublish(1)

    +

    npm-unpublish(1)

    Remove a package from the registry

    -

    npm-update(1)

    +

    npm-update(1)

    Update a package

    -

    npm-version(1)

    +

    npm-version(1)

    Bump a package version

    -

    npm-view(1)

    +

    npm-view(1)

    View registry info

    -

    npm-whoami(1)

    +

    npm-whoami(1)

    Display npm username

    API Documentation

    Using npm in your Node programs

    -

    npm(3)

    +

    npm(3)

    node package manager

    -

    npm-bin(3)

    +

    npm-bin(3)

    Display npm bin folder

    -

    npm-bugs(3)

    +

    npm-bugs(3)

    Bugs for a package in a web browser maybe

    -

    npm-cache(3)

    +

    npm-cache(3)

    manage the npm cache programmatically

    -

    npm-commands(3)

    +

    npm-commands(3)

    npm commands

    -

    npm-config(3)

    +

    npm-config(3)

    Manage the npm configuration files

    -

    npm-deprecate(3)

    +

    npm-deprecate(3)

    Deprecate a version of a package

    -

    npm-docs(3)

    +

    npm-docs(3)

    Docs for a package in a web browser maybe

    -

    npm-edit(3)

    +

    npm-edit(3)

    Edit an installed package

    -

    npm-explore(3)

    +

    npm-explore(3)

    Browse an installed package

    -

    npm-help-search(3)

    +

    npm-help-search(3)

    Search the help pages

    -

    npm-init(3)

    +

    npm-init(3)

    Interactively create a package.json file

    -

    npm-install(3)

    +

    npm-install(3)

    install a package programmatically

    - +

    Symlink a package folder

    -

    npm-load(3)

    +

    npm-load(3)

    Load config settings

    -

    npm-ls(3)

    +

    npm-ls(3)

    List installed packages

    -

    npm-outdated(3)

    +

    npm-outdated(3)

    Check for outdated packages

    -

    npm-owner(3)

    +

    npm-owner(3)

    Manage package owners

    -

    npm-pack(3)

    +

    npm-pack(3)

    Create a tarball from a package

    -

    npm-prefix(3)

    +

    npm-prefix(3)

    Display prefix

    -

    npm-prune(3)

    +

    npm-prune(3)

    Remove extraneous packages

    -

    npm-publish(3)

    +

    npm-publish(3)

    Publish a package

    -

    npm-rebuild(3)

    +

    npm-rebuild(3)

    Rebuild a package

    -

    npm-repo(3)

    +

    npm-repo(3)

    Open package repository page in the browser

    -

    npm-restart(3)

    +

    npm-restart(3)

    Start a package

    -

    npm-root(3)

    +

    npm-root(3)

    Display npm root

    -

    npm-run-script(3)

    +

    npm-run-script(3)

    Run arbitrary package scripts

    -

    npm-search(3)

    +

    npm-search(3)

    Search for packages

    -

    npm-shrinkwrap(3)

    +

    npm-shrinkwrap(3)

    programmatically generate package shrinkwrap file

    -

    npm-start(3)

    +

    npm-start(3)

    Start a package

    -

    npm-stop(3)

    +

    npm-stop(3)

    Stop a package

    -

    npm-submodule(3)

    -

    Add a package as a git submodule

    -

    npm-tag(3)

    +

    npm-tag(3)

    Tag a published version

    -

    npm-test(3)

    +

    npm-test(3)

    Test a package

    -

    npm-uninstall(3)

    +

    npm-uninstall(3)

    uninstall a package programmatically

    -

    npm-unpublish(3)

    +

    npm-unpublish(3)

    Remove a package from the registry

    -

    npm-update(3)

    +

    npm-update(3)

    Update a package

    -

    npm-version(3)

    +

    npm-version(3)

    Bump a package version

    -

    npm-view(3)

    +

    npm-view(3)

    View registry info

    -

    npm-whoami(3)

    +

    npm-whoami(3)

    Display npm username

    Files

    File system structures npm uses

    -

    npm-folders(5)

    +

    npm-folders(5)

    Folder Structures Used by npm

    -

    npmrc(5)

    +

    npmrc(5)

    The npm config files

    -

    package.json(5)

    +

    package.json(5)

    Specifics of npm's package.json handling

    Misc

    Various other bits and bobs

    -

    npm-coding-style(7)

    +

    npm-coding-style(7)

    npm's "funny" coding style

    -

    npm-config(7)

    +

    npm-config(7)

    More than you probably want to know about npm configuration

    -

    npm-developers(7)

    +

    npm-developers(7)

    Developer Guide

    -

    npm-disputes(7)

    +

    npm-disputes(7)

    Handling Module Name Disputes

    -

    npm-faq(7)

    +

    npm-faq(7)

    Frequently Asked Questions

    -

    npm-index(7)

    +

    npm-index(7)

    Index of all npm documentation

    -

    npm-registry(7)

    +

    npm-registry(7)

    The JavaScript Package Registry

    -

    npm-scope(7)

    +

    npm-scope(7)

    Scoped packages

    -

    npm-scripts(7)

    +

    npm-scripts(7)

    How npm handles the "scripts" field

    -

    removing-npm(7)

    +

    removing-npm(7)

    Cleaning the Slate

    -

    semver(7)

    +

    semver(7)

    The semantic versioner for npm

    @@ -234,5 +230,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/misc/npm-coding-style.html nodejs-0.11.15/deps/npm/html/doc/misc/npm-coding-style.html --- nodejs-0.11.14/deps/npm/html/doc/misc/npm-coding-style.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/misc/npm-coding-style.html 2015-01-20 21:22:17.000000000 +0000 @@ -109,11 +109,11 @@ 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 occurs.

    -

    Use appropriate log levels. See npm-config(7) and search for +

    Use appropriate log levels. See npm-config(7) and search for "loglevel".

    Case, naming, etc.

    Use lowerCamelCase for multiword identifiers when they refer to objects, -functions, methods, members, or anything not specified in this section.

    +functions, methods, properties, or anything not specified in this section.

    Use UpperCamelCase for class names (things that you'd pass to "new").

    Use all-lower-hyphen-css-case for multiword filenames and config keys.

    Use named functions. They make stack traces easier to follow.

    @@ -131,9 +131,9 @@

    Boolean objects are verboten.

    SEE ALSO

    @@ -147,5 +147,5 @@        - + diff -Nru nodejs-0.11.14/deps/npm/html/doc/misc/npm-config.html nodejs-0.11.15/deps/npm/html/doc/misc/npm-config.html --- nodejs-0.11.14/deps/npm/html/doc/misc/npm-config.html 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/deps/npm/html/doc/misc/npm-config.html 2015-01-20 21:22:17.000000000 +0000 @@ -33,7 +33,7 @@
  • global config file ($PREFIX/npmrc)
  • npm builtin config file (/path/to/npm/npmrc)
  • -

    See npmrc(5) for more details.

    +

    See npmrc(5) for more details.

    Default Configs

    A set of configuration parameters that are internal to npm, and are defaults if nothing else is specified.

    @@ -79,7 +79,7 @@ # same as: npm ls --global --parseable --long --loglevel info

    Per-Package Config Settings

    -

    When running scripts (see npm-scripts(7)) the package.json "config" +

    When running scripts (see npm-scripts(7)) the package.json "config" keys are overwritten in the environment if there is a config param of <name>[@<version>]:<key>. For example, if the package.json has this:

    @@ -90,7 +90,7 @@
    http.createServer(...).listen(process.env.npm_package_config_port)
     

    then the user could change the behavior by doing:

    npm config set foo:port 80
    -

    See package.json(5) for more information.

    +

    See package.json(5) for more information.

    Config Settings

    always-auth

      @@ -138,7 +138,7 @@
    • Default: Windows: %AppData%\npm-cache, Posix: ~/.npm
    • Type: path
    -

    The location of npm's cache directory. See npm-cache(1)

    +

    The location of npm's cache directory. See npm-cache(1)

    cache-lock-stale

    • Default: 60000 (1 minute)
    • @@ -285,7 +285,7 @@

    Operates in "global" mode, so that packages are installed into the prefix folder instead of the current working directory. See -npm-folders(5) for more on the differences in behavior.

    +npm-folders(5) for more on the differences in behavior.

  • console
  • Timers
  • @@ -166,7 +171,7 @@
  • process.version
  • process.versions
  • process.config
  • -
  • process.kill(pid, [signal])
  • +
  • process.kill(pid[, signal])
  • process.pid
  • process.title
  • process.arch
  • @@ -181,9 +186,9 @@
  • util
    • util.debuglog(section)
    • -
    • util.format(format, [...])
    • +
    • util.format(format[, ...])
    • util.log(string)
    • -
    • util.inspect(object, [options])
    • Events
    • Class: stream.Writable
    • Class: stream.Writable
        @@ -375,13 +390,13 @@
    • Crypto
        -
      • crypto.setEngine(engine, [flags])
      • +
      • crypto.setEngine(engine[, flags])
      • crypto.getCiphers()
      • crypto.getHashes()
      • crypto.createCredentials(details)
      • crypto.createHash(algorithm)
      • Class: Hash
      • @@ -394,7 +409,7 @@
      • crypto.createCipher(algorithm, password)
      • crypto.createCipheriv(algorithm, key, iv)
      • Class: Cipher
          -
        • cipher.update(data, [input_encoding], [output_encoding])
        • +
        • cipher.update(data[, input_encoding][, output_encoding])
        • cipher.final([output_encoding])
        • cipher.setAutoPadding(auto_padding=true)
        • cipher.getAuthTag()
        • @@ -404,7 +419,7 @@
        • crypto.createDecipher(algorithm, password)
        • crypto.createDecipheriv(algorithm, key, iv)
        • Class: Decipher
            -
          • decipher.update(data, [input_encoding], [output_encoding])
          • +
          • decipher.update(data[, input_encoding][, output_encoding])
          • decipher.final([output_encoding])
          • decipher.setAutoPadding(auto_padding=true)
          • decipher.setAuthTag(buffer)
          • @@ -414,44 +429,44 @@
          • crypto.createSign(algorithm)
          • Class: Sign
          • crypto.createVerify(algorithm)
          • Class: Verify
          • -
          • crypto.createDiffieHellman(prime_length, [generator])
          • -
          • crypto.createDiffieHellman(prime, [prime_encoding], [generator], [generator_encoding])
          • +
          • crypto.createDiffieHellman(prime_length[, generator])
          • +
          • crypto.createDiffieHellman(prime[, prime_encoding][, generator][, generator_encoding])
          • Class: DiffieHellman
          • crypto.getDiffieHellman(group_name)
          • crypto.createECDH(curve_name)
          • Class: ECDH
          • -
          • crypto.pbkdf2(password, salt, iterations, keylen, [digest], callback)
          • -
          • crypto.pbkdf2Sync(password, salt, iterations, keylen, [digest])
          • -
          • crypto.randomBytes(size, [callback])
          • -
          • crypto.pseudoRandomBytes(size, [callback])
          • +
          • crypto.pbkdf2(password, salt, iterations, keylen[, digest], callback)
          • +
          • crypto.pbkdf2Sync(password, salt, iterations, keylen[, digest])
          • +
          • crypto.randomBytes(size[, callback])
          • +
          • crypto.pseudoRandomBytes(size[, callback])
          • Class: Certificate
          • TLS (SSL)
              +
            • Protocol support
            • Client-initiated renegotiation attack mitigation
            • NPN and SNI
            • Perfect Forward Secrecy
            • tls.getCiphers()
            • -
            • tls.createServer(options, [secureConnectionListener])
            • -
            • tls.connect(options, [callback])
            • -
            • tls.connect(port, [host], [options], [callback])
            • +
            • tls.createServer(options[, secureConnectionListener])
            • +
            • tls.connect(options[, callback])
            • +
            • tls.connect(port[, host][, options][, callback])
            • Class: tls.TLSSocket
            • new tls.TLSSocket(socket, options)
            • tls.createSecureContext(details)
            • -
            • tls.createSecurePair([context], [isServer], [requestCert], [rejectUnauthorized])
            • +
            • tls.createSecurePair([context][, isServer][, requestCert][, rejectUnauthorized])
            • Class: SecurePair @@ -486,7 +502,7 @@
            • Event: 'newSession'
            • Event: 'resumeSession'
            • Event: 'OCSPRequest'
            • -
            • server.listen(port, [host], [callback])
            • +
            • server.listen(port[, host][, callback])
            • server.close()
            • server.address()
            • server.addContext(hostname, context)
            • @@ -555,24 +571,24 @@
            • fs.fstatSync(fd)
            • fs.link(srcpath, dstpath, callback)
            • fs.linkSync(srcpath, dstpath)
            • -
            • fs.symlink(srcpath, dstpath, [type], callback)
            • -
            • fs.symlinkSync(srcpath, dstpath, [type])
            • +
            • fs.symlink(srcpath, dstpath[, type], callback)
            • +
            • fs.symlinkSync(srcpath, dstpath[, type])
            • fs.readlink(path, callback)
            • fs.readlinkSync(path)
            • -
            • fs.realpath(path, [cache], callback)
            • -
            • fs.realpathSync(path, [cache])
            • +
            • fs.realpath(path[, cache], callback)
            • +
            • fs.realpathSync(path[, cache])
            • fs.unlink(path, callback)
            • fs.unlinkSync(path)
            • fs.rmdir(path, callback)
            • fs.rmdirSync(path)
            • -
            • fs.mkdir(path, [mode], callback)
            • -
            • fs.mkdirSync(path, [mode])
            • +
            • fs.mkdir(path[, mode], callback)
            • +
            • fs.mkdirSync(path[, mode])
            • fs.readdir(path, callback)
            • fs.readdirSync(path)
            • fs.close(fd, callback)
            • fs.closeSync(fd)
            • -
            • fs.open(path, flags, [mode], callback)
            • -
            • fs.openSync(path, flags, [mode])
            • +
            • fs.open(path, flags[, mode], callback)
            • +
            • fs.openSync(path, flags[, mode])
            • fs.utimes(path, atime, mtime, callback)
            • fs.utimesSync(path, atime, mtime)
            • fs.futimes(fd, atime, mtime, callback)
            • @@ -585,15 +601,15 @@
            • fs.writeSync(fd, data[, position[, encoding]])
            • fs.read(fd, buffer, offset, length, position, callback)
            • fs.readSync(fd, buffer, offset, length, position)
            • -
            • fs.readFile(filename, [options], callback)
            • -
            • fs.readFileSync(filename, [options])
            • -
            • fs.writeFile(filename, data, [options], callback)
            • -
            • fs.writeFileSync(filename, data, [options])
            • -
            • fs.appendFile(filename, data, [options], callback)
            • -
            • fs.appendFileSync(filename, data, [options])
            • -
            • fs.watchFile(filename, [options], listener)
            • -
            • fs.unwatchFile(filename, [listener])
            • -
            • fs.watch(filename, [options], [listener])
                +
              • fs.readFile(filename[, options], callback)
              • +
              • fs.readFileSync(filename[, options])
              • +
              • fs.writeFile(filename, data[, options], callback)
              • +
              • fs.writeFileSync(filename, data[, options])
              • +
              • fs.appendFile(filename, data[, options], callback)
              • +
              • fs.appendFileSync(filename, data[, options])
              • +
              • fs.watchFile(filename[, options], listener)
              • +
              • fs.unwatchFile(filename[, listener])
              • +
              • fs.watch(filename[, options][, listener]) +

                Copies the passed buffer data onto a new Buffer instance. + +

                +

                new Buffer(str[, encoding])#

                • str String - string to encode.
                • encoding String - encoding to use, Optional.
                • @@ -4589,7 +4633,7 @@

                  Tests if obj is a Buffer.

                  -

                  Class Method: Buffer.byteLength(string, [encoding])#

                  +

                  Class Method: Buffer.byteLength(string[, encoding])#

                  • string String
                  • encoding String, Optional, Default: 'utf8'
                  • @@ -4609,7 +4653,7 @@ Buffer.byteLength(str, 'utf8') + " bytes"); // ½ + ¼ = ¾: 9 characters, 12 bytes
                    -

                    Class Method: Buffer.concat(list, [totalLength])#

                    +

                    Class Method: Buffer.concat(list[, totalLength])#

                    • list Array List of Buffer objects to concat
                    • totalLength Number Total length of the buffers when concatenated
                    • @@ -4662,7 +4706,18 @@ // 1234 // 1234 -

                      buf.write(string, [offset], [length], [encoding])#

                      +

                      While the length property is not immutable, changing the value of length +can result in undefined and inconsistent behavior. Applications that wish to +modify the length of a buffer should therefore treat length as read-only and +use buf.slice to create a new buffer. + +

                      +
                      buf = new Buffer(10);
                      +buf.write("abcdefghj", 0, "ascii");
                      +console.log(buf.length); // 10
                      +buf = buf.slice(0,5);
                      +console.log(buf.length); // 5
                      +

                      buf.write(string[, offset][, length][, encoding])#

                      • string String - data to be written to buffer
                      • offset Number, Optional, Default: 0
                      • @@ -4680,17 +4735,71 @@
                        buf = new Buffer(256);
                         len = buf.write('\u00bd + \u00bc = \u00be', 0);
                         console.log(len + " bytes: " + buf.toString('utf8', 0, len));
                        -

                        buf.toString([encoding], [start], [end])#

                        +

                        buf.writeUIntLE(value, offset, byteLength[, noAssert])#

                        +

                        buf.writeUIntBE(value, offset, byteLength[, noAssert])#

                        +

                        buf.writeIntLE(value, offset, byteLength[, noAssert])#

                        +

                        buf.writeIntBE(value, offset, byteLength[, noAssert])#

                        +
                          +
                        • value {Number} Bytes to be written to buffer
                        • +
                        • offset {Number} 0 <= offset <= buf.length
                        • +
                        • byteLength {Number} 0 < byteLength <= 6
                        • +
                        • noAssert {Boolean} Default: false
                        • +
                        • Return: {Number}
                        • +
                        +

                        Writes value to the buffer at the specified offset and byteLength. +Supports up to 48 bits of accuracy. For example: + +

                        +
                        var b = new Buffer(6);
                        +b.writeUIntBE(0x1234567890ab, 0, 6);
                        +// <Buffer 12 34 56 78 90 ab>
                        +

                        Set noAssert to true to skip validation of value and offset. Defaults +to false. + +

                        +

                        buf.readUIntLE(offset, byteLength[, noAssert])#

                        +

                        buf.readUIntBE(offset, byteLength[, noAssert])#

                        +

                        buf.readIntLE(offset, byteLength[, noAssert])#

                        +

                        buf.readIntBE(offset, byteLength[, noAssert])#

                        +
                          +
                        • offset {Number} 0 <= offset <= buf.length
                        • +
                        • byteLength {Number} 0 < byteLength <= 6
                        • +
                        • noAssert {Boolean} Default: false
                        • +
                        • Return: {Number}
                        • +
                        +

                        A generalized version of all numeric read methods. Supports up to 48 bits of +accuracy. For example: + +

                        +
                        var b = new Buffer(6);
                        +b.writeUint16LE(0x90ab, 0);
                        +b.writeUInt32LE(0x12345678, 2);
                        +b.readUIntLE(0, 6).toString(16);  // Specify 6 bytes (48 bits)
                        +// output: '1234567890ab'
                        +

                        Set noAssert to true to skip validation of offset. This means that offset +may be beyond the end of the buffer. Defaults to false. + +

                        +

                        buf.toString([encoding][, start][, end])#

                        • encoding String, Optional, Default: 'utf8'
                        • start Number, Optional, Default: 0
                        • end Number, Optional, Default: buffer.length
                      -

                      Decodes and returns a string from buffer data encoded with encoding -(defaults to 'utf8') beginning at start (defaults to 0) and ending at -end (defaults to buffer.length). +

                      Decodes and returns a string from buffer data encoded using the specified +character set encoding. If encoding is undefined or null, then encoding +defaults to 'utf8'. The start and end parameters default to 0 and +buffer.length when undefined`.

                      +
                      buf = new Buffer(26);
                      +for (var i = 0 ; i < 26 ; i++) {
                      +  buf[i] = i + 97; // 97 is ASCII a
                      +}
                      +buf.toString('ascii'); // outputs: abcdefghijklmnopqrstuvwxyz
                      +buf.toString('ascii',0,5); // outputs: abcde
                      +buf.toString('utf8',0,5); // outputs: abcde
                      +buf.toString(undefined,0,5); // encoding defaults to 'utf8', outputs abcde

                      See buffer.write() example, above. @@ -4753,22 +4862,18 @@

                      Returns a number indicating whether this comes before or after or is the same as the otherBuffer in sort order. -

                      -

                      buf.copy(targetBuffer, [targetStart], [sourceStart], [sourceEnd])#

                      +

                      buf.copy(targetBuffer[, targetStart][, sourceStart][, sourceEnd])#

                      • targetBuffer Buffer object - Buffer to copy into
                      • targetStart Number, Optional, Default: 0
                      • sourceStart Number, Optional, Default: 0
                      • sourceEnd Number, Optional, Default: buffer.length
                    -

                    Does copy between buffers. The source and target regions can be overlapped. -targetStart and sourceStart default to 0. -sourceEnd defaults to buffer.length. - -

                    -

                    All values passed that are undefined/NaN or are out of bounds are set equal -to their respective defaults. +

                    Copies data from a region of this buffer to a region in the target buffer even +if the target memory region overlaps with the source. If undefined the +targetStart and sourceStart parameters default to 0 while sourceEnd +defaults to buffer.length.

                    Example: build two Buffers, then copy buf1 from byte 16 through byte 19 @@ -4787,7 +4892,21 @@ console.log(buf2.toString('ascii', 0, 25)); // !!!!!!!!qrst!!!!!!!!!!!!! -

                    buf.slice([start], [end])#

                    +

                    Example: Build a single buffer, then copy data from one region to an overlapping +region in the same buffer + +

                    +
                    buf = new Buffer(26);
                    +
                    +for (var i = 0 ; i < 26 ; i++) {
                    +  buf[i] = i + 97; // 97 is ASCII a
                    +}
                    +
                    +buf.copy(buf, 0, 4, 10);
                    +console.log(buf.toString());
                    +
                    +// efghijghijklmnopqrstuvwxyz
                    +

                    buf.slice([start][, end])#

                    • start Number, Optional, Default: 0
                    • end Number, Optional, Default: buffer.length
                    • @@ -4817,7 +4936,7 @@ // abc // !bc -

                      buf.readUInt8(offset, [noAssert])#

                      +

                      buf.readUInt8(offset[, noAssert])#

                      • offset Number
                      • noAssert Boolean, Optional, Default: false
                      • @@ -4848,8 +4967,8 @@ // 0x4 // 0x23 // 0x42 -

                        buf.readUInt16LE(offset, [noAssert])#

                        -

                        buf.readUInt16BE(offset, [noAssert])#

                        +

                        buf.readUInt16LE(offset[, noAssert])#

                        +

                        buf.readUInt16BE(offset[, noAssert])#

                        • offset Number
                        • noAssert Boolean, Optional, Default: false
                        • @@ -4886,8 +5005,8 @@ // 0x2304 // 0x2342 // 0x4223 -

                          buf.readUInt32LE(offset, [noAssert])#

                          -

                          buf.readUInt32BE(offset, [noAssert])#

                          +

                          buf.readUInt32LE(offset[, noAssert])#

                          +

                          buf.readUInt32BE(offset[, noAssert])#

                          • offset Number
                          • noAssert Boolean, Optional, Default: false
                          • @@ -4916,7 +5035,7 @@ // 0x03042342 // 0x42230403 -

                            buf.readInt8(offset, [noAssert])#

                            +

                            buf.readInt8(offset[, noAssert])#

                            • offset Number
                            • noAssert Boolean, Optional, Default: false
                            • @@ -4933,8 +5052,8 @@ complement signed values.

                              -

                              buf.readInt16LE(offset, [noAssert])#

                              -

                              buf.readInt16BE(offset, [noAssert])#

                              +

                              buf.readInt16LE(offset[, noAssert])#

                              +

                              buf.readInt16BE(offset[, noAssert])#

                              • offset Number
                              • noAssert Boolean, Optional, Default: false
                              • @@ -4952,8 +5071,8 @@ complement signed values.

                                -

                                buf.readInt32LE(offset, [noAssert])#

                                -

                                buf.readInt32BE(offset, [noAssert])#

                                +

                                buf.readInt32LE(offset[, noAssert])#

                                +

                                buf.readInt32BE(offset[, noAssert])#

                                • offset Number
                                • noAssert Boolean, Optional, Default: false
                                • @@ -4971,8 +5090,8 @@ complement signed values.

                                  -

                                  buf.readFloatLE(offset, [noAssert])#

                                  -

                                  buf.readFloatBE(offset, [noAssert])#

                                  +

                                  buf.readFloatLE(offset[, noAssert])#

                                  +

                                  buf.readFloatBE(offset[, noAssert])#

                                  • offset Number
                                  • noAssert Boolean, Optional, Default: false
                                  • @@ -4999,8 +5118,8 @@ console.log(buf.readFloatLE(0)); // 0x01 -

                                    buf.readDoubleLE(offset, [noAssert])#

                                    -

                                    buf.readDoubleBE(offset, [noAssert])#

                                    +

                                    buf.readDoubleLE(offset[, noAssert])#

                                    +

                                    buf.readDoubleBE(offset[, noAssert])#

                                    • offset Number
                                    • noAssert Boolean, Optional, Default: false
                                    • @@ -5031,7 +5150,7 @@ console.log(buf.readDoubleLE(0)); // 0.3333333333333333 -

                                      buf.writeUInt8(value, offset, [noAssert])#

                                      +

                                      buf.writeUInt8(value, offset[, noAssert])#

                                      • value Number
                                      • offset Number
                                      • @@ -5059,8 +5178,8 @@ console.log(buf); // <Buffer 03 04 23 42> -

                                        buf.writeUInt16LE(value, offset, [noAssert])#

                                        -

                                        buf.writeUInt16BE(value, offset, [noAssert])#

                                        +

                                        buf.writeUInt16LE(value, offset[, noAssert])#

                                        +

                                        buf.writeUInt16BE(value, offset[, noAssert])#

                                        • value Number
                                        • offset Number
                                        • @@ -5092,8 +5211,8 @@ // <Buffer de ad be ef> // <Buffer ad de ef be> -

                                          buf.writeUInt32LE(value, offset, [noAssert])#

                                          -

                                          buf.writeUInt32BE(value, offset, [noAssert])#

                                          +

                                          buf.writeUInt32LE(value, offset[, noAssert])#

                                          +

                                          buf.writeUInt32BE(value, offset[, noAssert])#

                                          • value Number
                                          • offset Number
                                          • @@ -5123,7 +5242,7 @@ // <Buffer fe ed fa ce> // <Buffer ce fa ed fe> -

                                            buf.writeInt8(value, offset, [noAssert])#

                                            +

                                            buf.writeInt8(value, offset[, noAssert])#

                                            • value Number
                                            • offset Number
                                            • @@ -5143,8 +5262,8 @@ signed integer into buffer.

                                              -

                                              buf.writeInt16LE(value, offset, [noAssert])#

                                              -

                                              buf.writeInt16BE(value, offset, [noAssert])#

                                              +

                                              buf.writeInt16LE(value, offset[, noAssert])#

                                              +

                                              buf.writeInt16BE(value, offset[, noAssert])#

                                              • value Number
                                              • offset Number
                                              • @@ -5164,8 +5283,8 @@ complement signed integer into buffer.

                                                -

                                                buf.writeInt32LE(value, offset, [noAssert])#

                                                -

                                                buf.writeInt32BE(value, offset, [noAssert])#

                                                +

                                                buf.writeInt32LE(value, offset[, noAssert])#

                                                +

                                                buf.writeInt32BE(value, offset[, noAssert])#

                                                • value Number
                                                • offset Number
                                                • @@ -5185,8 +5304,8 @@ complement signed integer into buffer.

                                                  -

                                                  buf.writeFloatLE(value, offset, [noAssert])#

                                                  -

                                                  buf.writeFloatBE(value, offset, [noAssert])#

                                                  +

                                                  buf.writeFloatLE(value, offset[, noAssert])#

                                                  +

                                                  buf.writeFloatBE(value, offset[, noAssert])#

                                                  • value Number
                                                  • offset Number
                                                  • @@ -5216,8 +5335,8 @@ // <Buffer 4f 4a fe bb> // <Buffer bb fe 4a 4f> -

                                                    buf.writeDoubleLE(value, offset, [noAssert])#

                                                    -

                                                    buf.writeDoubleBE(value, offset, [noAssert])#

                                                    +

                                                    buf.writeDoubleLE(value, offset[, noAssert])#

                                                    +

                                                    buf.writeDoubleBE(value, offset[, noAssert])#

                                                    • value Number
                                                    • offset Number
                                                    • @@ -5247,7 +5366,7 @@ // <Buffer 43 eb d5 b7 dd f9 5f d7> // <Buffer d7 5f f9 dd b7 d5 eb 43> -

                                                      buf.fill(value, [offset], [end])#

                                                      +

                                                      buf.fill(value[, offset][, end])#

                                                      • value
                                                      • offset Number, Optional
                                                      • @@ -5374,7 +5493,7 @@ // Readable streams emit 'data' events once a listener is added req.on('data', function (chunk) { body += chunk; - }) + }); // the end event tells you that you have entire body req.on('end', function () { @@ -5389,8 +5508,8 @@ // write back something interesting to the user: res.write(typeof data); res.end(); - }) -}) + }); +}); server.listen(1337); @@ -5475,7 +5594,7 @@
                                                        var readable = getReadableStreamSomehow();
                                                         readable.on('readable', function() {
                                                           // there is some data to read now
                                                        -})
                                                        +});

                                                        Once the internal buffer is drained, a readable event will fire again when more data is available. @@ -5496,7 +5615,7 @@

                                                        var readable = getReadableStreamSomehow();
                                                         readable.on('data', function(chunk) {
                                                           console.log('got %d bytes of data', chunk.length);
                                                        -})
                                                        +});

                                                        Event: 'end'#

                                                        This event fires when there will be no more data to read. @@ -5509,7 +5628,7 @@

                                                        var readable = getReadableStreamSomehow();
                                                         readable.on('data', function(chunk) {
                                                           console.log('got %d bytes of data', chunk.length);
                                                        -})
                                                        +});
                                                         readable.on('end', function() {
                                                           console.log('there will be no more data.');
                                                         });
                                                        @@ -5583,7 +5702,7 @@ readable.on('data', function(chunk) { assert.equal(typeof chunk, 'string'); console.log('got %d characters of string data', chunk.length); -}) +});

                                                        readable.resume()#

                                                        • Return: this
                                                        • @@ -5602,7 +5721,7 @@ readable.resume(); readable.on('end', function(chunk) { console.log('got to the end, but did not read anything'); -}) +});

                                                          readable.pause()#

                                                          • Return: this
                                                          • @@ -5621,7 +5740,7 @@ console.log('now data will start flowing again'); readable.resume(); }, 1000); -}) +});

                                                            readable.isPaused()#

                                                            • Return: Boolean
                                                            • @@ -5638,7 +5757,7 @@ readable.isPaused() // === true readable.resume() readable.isPaused() // === false -

                                                              readable.pipe(destination, [options])#

                                                              +

                                                              readable.pipe(destination[, options])#

                                                              • destination Writable Stream The destination for writing data
                                                              • options Object Pipe options -

                                                                writable.write(chunk, [encoding], [callback])#

                                                                +

                                                                writable.write(chunk[, encoding][, callback])#

                                                                • chunk String | Buffer The data to write
                                                                • encoding String The encoding, if chunk is a String
                                                                • @@ -5873,7 +5992,16 @@

                                                                  Flush all data, buffered since .cork() call.

                                                                  -

                                                                  writable.end([chunk], [encoding], [callback])#

                                                                  +

                                                                  writable.setDefaultEncoding(encoding)#

                                                                  +
                                                                    +
                                                                  • encoding String The new default encoding
                                                                  • +
                                                                  • Return: Boolean
                                                                  • +
                                                                +

                                                                Sets the default encoding for a writable stream. Returns true if the encoding +is valid and is set. Otherwise returns false. + +

                                                                +

                                                                writable.end([chunk][, encoding][, callback])#

                                                                • chunk String | Buffer Optional data to write
                                                                • encoding String The encoding, if chunk is a String
                                                                • @@ -5887,11 +6015,10 @@

                                                                  // write 'hello, ' and then end with 'world!'
                                                                  -http.createServer(function (req, res) {
                                                                  -  res.write('hello, ');
                                                                  -  res.end('world!');
                                                                  -  // writing more now is not allowed!
                                                                  -});
                                                                  +var file = fs.createWriteStream('example.txt'); +file.write('hello, '); +file.end('world!'); +// writing more now is not allowed!

                                                                  Event: 'finish'#

                                                                  When the end() method has been called, and all data has been flushed to the underlying system, this event is emitted. @@ -6254,7 +6381,7 @@ size bytes are available before calling stream.push(chunk).

                                                                  -

                                                                  readable.push(chunk, [encoding])#

                                                                  +

                                                                  readable.push(chunk[, encoding])#

                                                                  • chunk Buffer | null | String Chunk of data to push into the read queue
                                                                  • encoding String Encoding of String chunks. Must be a valid @@ -6479,7 +6606,7 @@
                                                                  • encoding String If the chunk is a string, then this is the encoding type. (Ignore if decodeStrings chunk is a buffer.)
                                                                  • callback Function Call this function (optionally with an error -argument) when you are done processing the supplied chunk.
                                                                  • +argument and data) when you are done processing the supplied chunk.

                                                                Note: This function MUST NOT be called directly. It should be implemented by child classes, and called by the internal Transform @@ -6503,9 +6630,19 @@

                                                                Call the callback function only when the current chunk is completely consumed. Note that there may or may not be output as a result of any -particular input chunk. +particular input chunk. If you supply as the second argument to the +it will be passed to push method, in other words the following are +equivalent:

                                                                +
                                                                transform.prototype._transform = function (data, encoding, callback) {
                                                                +  this.push(data);
                                                                +  callback();
                                                                +}
                                                                +
                                                                +transform.prototype._transform = function (data, encoding, callback) {
                                                                +  callback(null, data);
                                                                +}

                                                                This method is prefixed with an underscore because it is internal to the class that defines it, and should not be called directly by user programs. However, you are expected to override this method in @@ -6880,7 +7017,7 @@

                                                                -

                                                                crypto.setEngine(engine, [flags])#

                                                                +

                                                                crypto.setEngine(engine[, flags])#

                                                                Load and set engine for some/all OpenSSL functions (selected by flags).

                                                                @@ -6925,10 +7062,7 @@
                                                                var hashes = crypto.getHashes();
                                                                 console.log(hashes); // ['sha', 'sha1', 'sha1WithRSAEncryption', ...]

                                                                crypto.createCredentials(details)#

                                                                -

                                                                Stability: 0 - Deprecated. Use tls.createSecureContext instead. - -

                                                                -

                                                                Creates a credentials object, with the optional details being a +

                                                                Stability: 0 - Deprecated. Use tls.createSecureContext instead.

                                                                Creates a credentials object, with the optional details being a dictionary with keys:

                                                                @@ -6997,7 +7131,7 @@

                                                                Returned by crypto.createHash.

                                                                -

                                                                hash.update(data, [input_encoding])#

                                                                +

                                                                hash.update(data[, input_encoding])#

                                                                Updates the hash content with the given data, the encoding of which is given in input_encoding and can be 'utf8', 'ascii' or 'binary'. If no encoding is provided and the input is a string an @@ -7074,6 +7208,18 @@ contents. The legacy update and final methods are also supported.

                                                                +

                                                                Note: createCipher derives keys with the OpenSSL function EVP_BytesToKey +with the digest algorithm set to MD5, one iteration, and no salt. The lack of +salt allows dictionary attacks as the same password always creates the same key. +The low iteration count and non-cryptographically secure hash algorithm allow +passwords to be tested very rapidly. + +

                                                                +

                                                                In line with OpenSSL's recommendation to use pbkdf2 instead of EVP_BytesToKey it +is recommended you derive a key and iv yourself with crypto.pbkdf2 and to +then use createCipheriv() to create the cipher stream. + +

                                                                crypto.createCipheriv(algorithm, key, iv)#

                                                                Creates and returns a cipher object, with the given algorithm, key and iv. @@ -7101,7 +7247,7 @@ methods are also supported.

                                                                -

                                                                cipher.update(data, [input_encoding], [output_encoding])#

                                                                +

                                                                cipher.update(data[, input_encoding][, output_encoding])#

                                                                Updates the cipher with data, the encoding of which is given in input_encoding and can be 'utf8', 'ascii' or 'binary'. If no encoding is provided, then a buffer is expected. @@ -7172,7 +7318,7 @@ final methods are also supported.

                                                                -

                                                                decipher.update(data, [input_encoding], [output_encoding])#

                                                                +

                                                                decipher.update(data[, input_encoding][, output_encoding])#

                                                                Updates the decipher with data, which is encoded in 'binary', 'base64' or 'hex'. If no encoding is provided, then a buffer is expected. @@ -7241,7 +7387,7 @@ with new data as it is streamed.

                                                                -

                                                                sign.sign(private_key, [output_format])#

                                                                +

                                                                sign.sign(private_key[, output_format])#

                                                                Calculates the signature on all the updated data passed through the sign. @@ -7290,7 +7436,7 @@ with new data as it is streamed.

                                                                -

                                                                verifier.verify(object, signature, [signature_format])#

                                                                +

                                                                verifier.verify(object, signature[, signature_format])#

                                                                Verifies the signed data by using the object and signature. object is a string containing a PEM encoded object, which can be one of RSA public key, DSA public key, or X.509 certificate. @@ -7307,13 +7453,13 @@ called.

                                                                -

                                                                crypto.createDiffieHellman(prime_length, [generator])#

                                                                +

                                                                crypto.createDiffieHellman(prime_length[, generator])#

                                                                Creates a Diffie-Hellman key exchange object and generates a prime of prime_length bits and using an optional specific numeric generator. If no generator is specified, then 2 is used.

                                                                -

                                                                crypto.createDiffieHellman(prime, [prime_encoding], [generator], [generator_encoding])#

                                                                +

                                                                crypto.createDiffieHellman(prime[, prime_encoding][, generator][, generator_encoding])#

                                                                Creates a Diffie-Hellman key exchange object using the supplied prime and an optional specific generator. generator can be a number, string, or Buffer. @@ -7349,7 +7495,7 @@ or 'base64'. If no encoding is provided, then a buffer is returned.

                                                                -

                                                                diffieHellman.computeSecret(other_public_key, [input_encoding], [output_encoding])#

                                                                +

                                                                diffieHellman.computeSecret(other_public_key[, input_encoding][, output_encoding])#

                                                                Computes the shared secret using other_public_key as the other party's public key and returns the computed shared secret. Supplied key is interpreted using specified input_encoding, and secret is @@ -7385,13 +7531,13 @@ provided, then a buffer is returned.

                                                                -

                                                                diffieHellman.setPublicKey(public_key, [encoding])#

                                                                +

                                                                diffieHellman.setPublicKey(public_key[, encoding])#

                                                                Sets the Diffie-Hellman public key. Key encoding can be 'binary', 'hex' or 'base64'. If no encoding is provided, then a buffer is expected.

                                                                -

                                                                diffieHellman.setPrivateKey(private_key, [encoding])#

                                                                +

                                                                diffieHellman.setPrivateKey(private_key[, encoding])#

                                                                Sets the Diffie-Hellman private key. Key encoding can be 'binary', 'hex' or 'base64'. If no encoding is provided, then a buffer is expected. @@ -7452,7 +7598,7 @@ then a buffer is returned.

                                                                -

                                                                ECDH.computeSecret(other_public_key, [input_encoding], [output_encoding])#

                                                                +

                                                                ECDH.computeSecret(other_public_key[, input_encoding][, output_encoding])#

                                                                Computes the shared secret using other_public_key as the other party's public key and returns the computed shared secret. Supplied key is interpreted using specified input_encoding, and secret is @@ -7483,13 +7629,13 @@ provided, then a buffer is returned.

                                                                -

                                                                ECDH.setPublicKey(public_key, [encoding])#

                                                                +

                                                                ECDH.setPublicKey(public_key[, encoding])#

                                                                Sets the EC Diffie-Hellman public key. Key encoding can be 'binary', 'hex' or 'base64'. If no encoding is provided, then a buffer is expected.

                                                                -

                                                                ECDH.setPrivateKey(private_key, [encoding])#

                                                                +

                                                                ECDH.setPrivateKey(private_key[, encoding])#

                                                                Sets the EC Diffie-Hellman private key. Key encoding can be 'binary', 'hex' or 'base64'. If no encoding is provided, then a buffer is expected. @@ -7510,7 +7656,7 @@ /* alice_secret and bob_secret should be the same */ console.log(alice_secret == bob_secret); -

                                                                crypto.pbkdf2(password, salt, iterations, keylen, [digest], callback)#

                                                                +

                                                                crypto.pbkdf2(password, salt, iterations, keylen[, digest], callback)#

                                                                Asynchronous PBKDF2 function. Applies the selected HMAC digest function (default: SHA1) to derive a key of the requested length from the password, salt and number of iterations. The callback gets two arguments: @@ -7529,11 +7675,11 @@ crypto.getHashes().

                                                                -

                                                                crypto.pbkdf2Sync(password, salt, iterations, keylen, [digest])#

                                                                +

                                                                crypto.pbkdf2Sync(password, salt, iterations, keylen[, digest])#

                                                                Synchronous PBKDF2 function. Returns derivedKey or throws error.

                                                                -

                                                                crypto.randomBytes(size, [callback])#

                                                                +

                                                                crypto.randomBytes(size[, callback])#

                                                                Generates cryptographically strong pseudo-random data. Usage:

                                                                @@ -7557,7 +7703,7 @@ are drained.

                                                                -

                                                                crypto.pseudoRandomBytes(size, [callback])#

                                                                +

                                                                crypto.pseudoRandomBytes(size[, callback])#

                                                                Generates non-cryptographically strong pseudo-random data. The data returned will be unique if it is sufficiently long, but is not necessarily unpredictable. For this reason, the output of this @@ -7695,14 +7841,14 @@ server must have a private key. A private key is created like this:

                                                                -
                                                                openssl genrsa -out ryans-key.pem 1024
                                                                +
                                                                openssl genrsa -out ryans-key.pem 2048

                                                                All servers and some clients need to have a certificate. Certificates are public keys signed by a Certificate Authority or self-signed. The first step to getting a certificate is to create a "Certificate Signing Request" (CSR) file. This is done with:

                                                                -
                                                                openssl req -new -key ryans-key.pem -out ryans-csr.pem
                                                                +
                                                                openssl req -new -sha256 -key ryans-key.pem -out ryans-csr.pem

                                                                To create a self-signed certificate with the CSR, do this:

                                                                @@ -7725,6 +7871,46 @@
                                                              • certfile: all CA certs concatenated in one file like cat ca1-cert.pem ca2-cert.pem > ca-cert.pem
                                                              +

                                                              Protocol support#

                                                              +

                                                              Node.js is compiled with SSLv2 and SSLv3 protocol support by default, but these +protocols are disabled. They are considered insecure and could be easily +compromised as was shown by CVE-2014-3566. However, in some situations, it +may cause problems with legacy clients/servers (such as Internet Explorer 6). +If you wish to enable SSLv2 or SSLv3, run node with the --enable-ssl2 or +--enable-ssl3 flag respectively. In future versions of Node.js SSLv2 and +SSLv3 will not be compiled in by default. + +

                                                              +

                                                              There is a way to force node into using SSLv3 or SSLv2 only mode by explicitly +specifying secureProtocol to 'SSLv3_method' or 'SSLv2_method'. + +

                                                              +

                                                              The default protocol method Node.js uses is SSLv23_method which would be more +accurately named AutoNegotiate_method. This method will try and negotiate +from the highest level down to whatever the client supports. To provide a +secure default, Node.js (since v0.10.33) explicitly disables the use of SSLv3 +and SSLv2 by setting the secureOptions to be +SSL_OP_NO_SSLv3|SSL_OP_NO_SSLv2 (again, unless you have passed +--enable-ssl3, or --enable-ssl2, or SSLv3_method as secureProtocol). + +

                                                              +

                                                              If you have set secureOptions to anything, we will not override your +options. + +

                                                              +

                                                              The ramifications of this behavior change: + +

                                                              +
                                                                +
                                                              • If your application is behaving as a secure server, clients who are SSLv3 +only will now not be able to appropriately negotiate a connection and will be +refused. In this case your server will emit a clientError event. The error +message will include 'wrong version number'.
                                                              • +
                                                              • If your application is behaving as a secure client and communicating with a +server that doesn't support methods more secure than SSLv3 then your connection +won't be able to negotiate and will fail. In this case your client will emit a +an error event. The error message will include 'wrong version number'.
                                                              • +

                                                              Client-initiated renegotiation attack mitigation#

                                                              @@ -7805,7 +7991,7 @@

                                                              var ciphers = tls.getCiphers();
                                                               console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]
                                                              -

                                                              tls.createServer(options, [secureConnectionListener])#

                                                              +

                                                              tls.createServer(options[, secureConnectionListener])#

                                                              Creates a new tls.Server. The connectionListener argument is automatically set as a listener for the secureConnection event. The options object has these possibilities: @@ -7906,7 +8092,7 @@ tickets on multiple instances of tls server.

                                                              NOTE: Automatically shared between cluster module workers.

                                                              -
                                                            • sessionIdContext: A string containing a opaque identifier for session +

                                                            • sessionIdContext: A string containing an opaque identifier for session resumption. If requestCert is true, the default is MD5 hash value generated from command-line. Otherwise, the default is not provided.

                                                            • @@ -7914,6 +8100,10 @@ SSL version 3. The possible values depend on your installation of OpenSSL and are defined in the constant SSL_METHODS.

                                                              +
                                                            • secureOptions: Set server options. For example, to disable the SSLv3 +protocol set the SSL_OP_NO_SSLv3 flag. See SSL_CTX_set_options +for all available options.

                                                              +

                                                            Here is a simple example echo server: @@ -7971,8 +8161,8 @@

                                                            openssl s_client -connect 127.0.0.1:8000
                                                            -

                                                            tls.connect(options, [callback])#

                                                            -

                                                            tls.connect(port, [host], [options], [callback])#

                                                            +

                                                            tls.connect(options[, callback])#

                                                            +

                                                            tls.connect(port[, host][, options][, callback])#

                                                            Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.) options should be an object which specifies: @@ -8120,9 +8310,6 @@

                                                          tls.createSecureContext(details)#

                                                          -

                                                          Stability: 0 - Deprecated. Use tls.createSecureContext instead. - -

                                                          Creates a credentials object, with the optional details being a dictionary with keys: @@ -8152,8 +8339,8 @@

                                                          -

                                                          tls.createSecurePair([context], [isServer], [requestCert], [rejectUnauthorized])#

                                                          -
                                                          Stability: 0 - Deprecated. Use tls.TLSSocket instead.

                                                          Creates a new secure pair object with two streams, one of which reads/writes +

                                                          tls.createSecurePair([context][, isServer][, requestCert][, rejectUnauthorized])#

                                                          +

                                                          Creates a new secure pair object with two streams, one of which reads/writes encrypted data, and one reads/writes cleartext data. Generally the encrypted one is piped to/from an incoming encrypted data stream, and the cleartext one is used as a replacement for the initial encrypted stream. @@ -8205,7 +8392,7 @@

                                                          This event is emitted after a new connection has been successfully -handshaked. The argument is a instance of tls.TLSSocket. It has all the +handshaked. The argument is an instance of tls.TLSSocket. It has all the common stream methods and events.

                                                          @@ -8310,7 +8497,7 @@

                                                          -

                                                          server.listen(port, [host], [callback])#

                                                          +

                                                          server.listen(port[, host][, callback])#

                                                          Begin accepting connections on the specified port and host. If the host is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY). @@ -8764,7 +8951,7 @@

                                                          Synchronous link(2).

                                                          -

                                                          fs.symlink(srcpath, dstpath, [type], callback)#

                                                          +

                                                          fs.symlink(srcpath, dstpath[, type], callback)#

                                                          Asynchronous symlink(2). No arguments other than a possible exception are given to the completion callback. The type argument can be set to 'dir', 'file', or 'junction' (default @@ -8773,7 +8960,7 @@ 'junction', the destination argument will automatically be normalized to absolute path.

                                                          -

                                                          fs.symlinkSync(srcpath, dstpath, [type])#

                                                          +

                                                          fs.symlinkSync(srcpath, dstpath[, type])#

                                                          Synchronous symlink(2).

                                                          @@ -8786,7 +8973,7 @@

                                                          Synchronous readlink(2). Returns the symbolic link's string value.

                                                          -

                                                          fs.realpath(path, [cache], callback)#

                                                          +

                                                          fs.realpath(path[, cache], callback)#

                                                          Asynchronous realpath(2). The callback gets two arguments (err, resolvedPath). May use process.cwd to resolve relative paths. cache is an object literal of mapped paths that can be used to force a specific path @@ -8801,7 +8988,7 @@ if (err) throw err; console.log(resolvedPath); }); -

                                                          fs.realpathSync(path, [cache])#

                                                          +

                                                          fs.realpathSync(path[, cache])#

                                                          Synchronous realpath(2). Returns the resolved path.

                                                          @@ -8823,12 +9010,12 @@

                                                          Synchronous rmdir(2).

                                                          -

                                                          fs.mkdir(path, [mode], callback)#

                                                          +

                                                          fs.mkdir(path[, mode], callback)#

                                                          Asynchronous mkdir(2). No arguments other than a possible exception are given to the completion callback. mode defaults to 0777.

                                                          -

                                                          fs.mkdirSync(path, [mode])#

                                                          +

                                                          fs.mkdirSync(path[, mode])#

                                                          Synchronous mkdir(2).

                                                          @@ -8852,7 +9039,7 @@

                                                          Synchronous close(2).

                                                          -

                                                          fs.open(path, flags, [mode], callback)#

                                                          +

                                                          fs.open(path, flags[, mode], callback)#

                                                          Asynchronous file open. See open(2). flags can be:

                                                          @@ -8913,7 +9100,7 @@ the end of the file.

                                                          -

                                                          fs.openSync(path, flags, [mode])#

                                                          +

                                                          fs.openSync(path, flags[, mode])#

                                                          Synchronous version of fs.open().

                                                          @@ -9026,7 +9213,7 @@

                                                          Synchronous version of fs.read. Returns the number of bytesRead.

                                                          -

                                                          fs.readFile(filename, [options], callback)#

                                                          +

                                                          fs.readFile(filename[, options], callback)#

                                                          • filename String
                                                          • options Object
                                                              @@ -9051,7 +9238,7 @@

                                                              -

                                                              fs.readFileSync(filename, [options])#

                                                              +

                                                              fs.readFileSync(filename[, options])#

                                                              Synchronous version of fs.readFile. Returns the contents of the filename.

                                                              @@ -9060,7 +9247,7 @@

                                                              -

                                                              fs.writeFile(filename, data, [options], callback)#

                                                              +

                                                              fs.writeFile(filename, data[, options], callback)#

                                                              • filename String
                                                              • data String | Buffer
                                                              • @@ -9087,11 +9274,11 @@ if (err) throw err; console.log('It\'s saved!'); }); -

                                                                fs.writeFileSync(filename, data, [options])#

                                                                +

                                                                fs.writeFileSync(filename, data[, options])#

                                                                The synchronous version of fs.writeFile.

                                                                -

                                                                fs.appendFile(filename, data, [options], callback)#

                                                                +

                                                                fs.appendFile(filename, data[, options], callback)#

                                                                • filename String
                                                                • data String | Buffer
                                                                • @@ -9114,11 +9301,11 @@ if (err) throw err; console.log('The "data to append" was appended to file!'); }); -

                                                                  fs.appendFileSync(filename, data, [options])#

                                                                  +

                                                                  fs.appendFileSync(filename, data[, options])#

                                                                  The synchronous version of fs.appendFile.

                                                                  -

                                                                  fs.watchFile(filename, [options], listener)#

                                                                  +

                                                                  fs.watchFile(filename[, options], listener)#

                                                                  Stability: 2 - Unstable.  Use fs.watch instead, if possible.

                                                                  Watch for changes on filename. The callback listener will be called each time the file is accessed. @@ -9145,7 +9332,7 @@ you need to compare curr.mtime and prev.mtime.

                                                                  -

                                                                  fs.unwatchFile(filename, [listener])#

                                                                  +

                                                                  fs.unwatchFile(filename[, listener])#

                                                                  Stability: 2 - Unstable.  Use fs.watch instead, if possible.

                                                                  Stop watching for changes on filename. If listener is specified, only that particular listener is removed. Otherwise, all listeners are removed and you have effectively stopped watching filename. @@ -9155,7 +9342,7 @@ no-op, not an error.

                                                                  -

                                                                  fs.watch(filename, [options], [listener])#

                                                                  +

                                                                  fs.watch(filename[, options][, listener])#

                                                                  Stability: 2 - Unstable.

                                                                  Watch for changes on filename, where filename is either a file or a directory. The returned object is a fs.FSWatcher. @@ -9248,10 +9435,46 @@ and handle the error when it's not there.

                                                                  +

                                                                  fs.exists() will be deprecated. + +

                                                                  fs.existsSync(path)#

                                                                  Synchronous version of fs.exists.

                                                                  +

                                                                  fs.existsSync() will be deprecated. + +

                                                                  +

                                                                  fs.access(path[, mode], callback)#

                                                                  +

                                                                  Tests a user's permissions for the file specified by path. mode is an +optional integer that specifies the accessibility checks to be performed. The +following constants define the possible values of mode. It is possible to +create a mask consisting of the bitwise OR of two or more values. + +

                                                                  +
                                                                    +
                                                                  • fs.F_OK - File is visible to the calling process. This is useful for +determining if a file exists, but says nothing about rwx permissions. +Default if no mode is specified.
                                                                  • +
                                                                  • fs.R_OK - File can be read by the calling process.
                                                                  • +
                                                                  • fs.W_OK - File can be written by the calling process.
                                                                  • +
                                                                  • fs.X_OK - File can be executed by the calling process. This has no effect +on Windows (will behave like fs.F_OK).
                                                                  • +
                                                                  +

                                                                  The final argument, callback, is a callback function that is invoked with +a possible error argument. If any of the accessibility checks fail, the error +argument will be populated. The following example checks if the file +/etc/passwd can be read and written by the current process. + +

                                                                  +
                                                                  fs.access('/etc/passwd', fs.R_OK | fs.W_OK, function(err) {
                                                                  +  util.debug(err ? 'no access!' : 'can read/write');
                                                                  +});
                                                                  +

                                                                  fs.accessSync(path[, mode])#

                                                                  +

                                                                  Synchronous version of fs.access. This throws if any accessibility checks +fail, and does nothing otherwise. + +

                                                                  Class: fs.Stats#

                                                                  Objects returned from fs.stat(), fs.lstat() and fs.fstat() and their synchronous counterparts are of this type. @@ -9321,7 +9544,7 @@ on Unix systems, it never was.

                                                                  -

                                                                  fs.createReadStream(path, [options])#

                                                                  +

                                                                  fs.createReadStream(path[, options])#

                                                                  Returns a new ReadStream object (See Readable Stream).

                                                                  @@ -9339,6 +9562,10 @@ start at 0. The encoding can be 'utf8', 'ascii', or 'base64'.

                                                                  +

                                                                  If fd is specified, ReadStream will ignore the path argument and will use +the specified file descriptor. This means that no open event will be emitted. + +

                                                                  If autoClose is false, then the file descriptor won't be closed, even if there's an error. It is your responsibility to close it and make sure there's no file descriptor leak. If autoClose is set to true (default @@ -9362,7 +9589,7 @@

                                                                  -

                                                                  fs.createWriteStream(path, [options])#

                                                                  +

                                                                  fs.createWriteStream(path[, options])#

                                                                  Returns a new WriteStream object (See Writable Stream).

                                                                  @@ -9371,6 +9598,7 @@

                                                                  { flags: 'w',
                                                                     encoding: null,
                                                                  +  fd: null,
                                                                     mode: 0666 }

                                                                  options may also include a start option to allow writing data at some position past the beginning of the file. Modifying a file rather @@ -9378,6 +9606,12 @@ default mode w.

                                                                  +

                                                                  Like ReadStream above, if fd is specified, WriteStream will ignore the +path argument and will use the specified file descriptor. This means that no +open event will be emitted. + + +

                                                                  Class: fs.WriteStream#

                                                                  WriteStream is a Writable Stream. @@ -9442,7 +9676,7 @@

                                                                  path.normalize('/foo/bar//baz/asdf/quux/..')
                                                                   // returns
                                                                   '/foo/bar/baz/asdf'
                                                                  -

                                                                  path.join([path1], [path2], [...])#

                                                                  +

                                                                  path.join([path1][, path2][, ...])#

                                                                  Join all arguments together and normalize the resulting path.

                                                                  @@ -9550,7 +9784,7 @@
                                                                  path.dirname('/foo/bar/baz/asdf/quux')
                                                                   // returns
                                                                   '/foo/bar/baz/asdf'
                                                                  -

                                                                  path.basename(p, [ext])#

                                                                  +

                                                                  path.basename(p[, ext])#

                                                                  Return the last portion of a path. Similar to the Unix basename command.

                                                                  @@ -9624,13 +9858,64 @@ process.env.PATH.split(path.delimiter) // returns ['C:\Windows\system32', 'C:\Windows', 'C:\Program Files\nodejs\'] +

                                                                  path.parse(pathString)#

                                                                  +

                                                                  Returns an object from a path string. + +

                                                                  +

                                                                  An example on *nix: + +

                                                                  +
                                                                  path.parse('/home/user/dir/file.txt')
                                                                  +// returns
                                                                  +{
                                                                  +    root : "/",
                                                                  +    dir : "/home/user/dir",
                                                                  +    base : "file.txt",
                                                                  +    ext : ".txt",
                                                                  +    name : "file"
                                                                  +}
                                                                  +

                                                                  An example on Windows: + +

                                                                  +
                                                                  path.parse('C:\\path\\dir\\index.html')
                                                                  +// returns
                                                                  +{
                                                                  +    root : "C:\",
                                                                  +    dir : "C:\path\dir",
                                                                  +    base : "index.html",
                                                                  +    ext : ".html",
                                                                  +    name : "index"
                                                                  +}
                                                                  +

                                                                  path.format(pathObject)#

                                                                  +

                                                                  Returns a path string from an object, the opposite of path.parse above. + +

                                                                  +
                                                                  path.format({
                                                                  +    root : "/",
                                                                  +    dir : "/home/user/dir",
                                                                  +    base : "file.txt",
                                                                  +    ext : ".txt",
                                                                  +    name : "file"
                                                                  +})
                                                                  +// returns
                                                                  +'/home/user/dir/file.txt'
                                                                  +

                                                                  path.posix#

                                                                  +

                                                                  Provide access to aforementioned path methods but always interact in a posix +compatible way. + +

                                                                  +

                                                                  path.win32#

                                                                  +

                                                                  Provide access to aforementioned path methods but always interact in a win32 +compatible way. + +

                                                                  net#

                                                                  Stability: 3 - Stable

                                                                  The net module provides you with an asynchronous network wrapper. It contains methods for creating both servers and clients (called streams). You can include this module with require('net');

                                                                  -

                                                                  net.createServer([options], [connectionListener])#

                                                                  +

                                                                  net.createServer([options][, connectionListener])#

                                                                  Creates a new TCP server. The connectionListener argument is automatically set as a listener for the 'connection' event. @@ -9638,7 +9923,9 @@

                                                                  options is an object with the following defaults:

                                                                  -
                                                                  { allowHalfOpen: false
                                                                  +
                                                                  {
                                                                  +  allowHalfOpen: false,
                                                                  +  pauseOnConnect: false
                                                                   }

                                                                  If allowHalfOpen is true, then the socket won't automatically send a FIN packet when the other end of the socket sends a FIN packet. The socket becomes @@ -9646,15 +9933,21 @@ See 'end' event for more information.

                                                                  +

                                                                  If pauseOnConnect is true, then the socket associated with each incoming +connection will be paused, and no data will be read from its handle. This allows +connections to be passed between processes without any data being read by the +original process. To begin reading data from a paused socket, call resume(). + +

                                                                  Here is an example of an echo server which listens for connections on port 8124:

                                                                  var net = require('net');
                                                                   var server = net.createServer(function(c) { //'connection' listener
                                                                  -  console.log('server connected');
                                                                  +  console.log('client connected');
                                                                     c.on('end', function() {
                                                                  -    console.log('server disconnected');
                                                                  +    console.log('client disconnected');
                                                                     });
                                                                     c.write('hello\r\n');
                                                                     c.pipe(c);
                                                                  @@ -9675,8 +9968,8 @@
                                                                   
                                                                   

                                                                  nc -U /tmp/echo.sock
                                                                  -

                                                                  net.connect(options, [connectionListener])#

                                                                  -

                                                                  net.createConnection(options, [connectionListener])#

                                                                  +

                                                                  net.connect(options[, connectionListener])#

                                                                  +

                                                                  net.createConnection(options[, connectionListener])#

                                                                  A factory method, which returns a new 'net.Socket' and connects to the supplied address and port. @@ -9727,7 +10020,7 @@

                                                                  var net = require('net');
                                                                   var client = net.connect({port: 8124},
                                                                       function() { //'connect' listener
                                                                  -  console.log('client connected');
                                                                  +  console.log('connected to server!');
                                                                     client.write('world!\r\n');
                                                                   });
                                                                   client.on('data', function(data) {
                                                                  @@ -9735,15 +10028,15 @@
                                                                     client.end();
                                                                   });
                                                                   client.on('end', function() {
                                                                  -  console.log('client disconnected');
                                                                  +  console.log('disconnected from server');
                                                                   });

                                                                  To connect on the socket /tmp/echo.sock the second line would just be changed to

                                                                  var client = net.connect({path: '/tmp/echo.sock'});
                                                                  -

                                                                  net.connect(port, [host], [connectListener])#

                                                                  -

                                                                  net.createConnection(port, [host], [connectListener])#

                                                                  +

                                                                  net.connect(port[, host][, connectListener])#

                                                                  +

                                                                  net.createConnection(port[, host][, connectListener])#

                                                                  Creates a TCP connection to port on host. If host is omitted, 'localhost' will be assumed. The connectListener parameter will be added as an listener for the @@ -9753,8 +10046,8 @@

                                                                  Is a factory method which returns a new 'net.Socket'.

                                                                  -

                                                                  net.connect(path, [connectListener])#

                                                                  -

                                                                  net.createConnection(path, [connectListener])#

                                                                  +

                                                                  net.connect(path[, connectListener])#

                                                                  +

                                                                  net.createConnection(path[, connectListener])#

                                                                  Creates unix socket connection to path. The connectListener parameter will be added as an listener for the 'connect' event. @@ -9767,7 +10060,7 @@

                                                                  This class is used to create a TCP or local server.

                                                                  -

                                                                  server.listen(port, [host], [backlog], [callback])#

                                                                  +

                                                                  server.listen(port[, host][, backlog][, callback])#

                                                                  Begin accepting connections on the specified port and host. If the host is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY). A port value of zero will assign a random port. @@ -9802,7 +10095,7 @@

                                                                  -

                                                                  server.listen(path, [callback])#

                                                                  +

                                                                  server.listen(path[, callback])#

                                                                  • path String
                                                                  • callback Function
                                                                  • @@ -9832,7 +10125,7 @@

                                                                    net.createServer().listen(
                                                                         path.join('\\\\?\\pipe', process.cwd(), 'myctl'))
                                                                    -

                                                                    server.listen(handle, [callback])#

                                                                    +

                                                                    server.listen(handle[, callback])#

                                                                    • handle Object
                                                                    • callback Function
                                                                    • @@ -9855,7 +10148,7 @@ 'listening' event.

                                                                      -

                                                                      server.listen(options, [callback])#

                                                                      +

                                                                      server.listen(options[, callback])#

                                                                      • options Object - Required. Supports the following properties:
                                                                        • port Number - Optional.
                                                                        • @@ -10010,8 +10303,8 @@ About allowHalfOpen, refer to createServer() and 'end' event.

                                                                          -

                                                                          socket.connect(port, [host], [connectListener])#

                                                                          -

                                                                          socket.connect(path, [connectListener])#

                                                                          +

                                                                          socket.connect(port[, host][, connectListener])#

                                                                          +

                                                                          socket.connect(path[, connectListener])#

                                                                          Opens the connection for a given socket. If port and host are given, then the socket will be opened as a TCP socket, if host is omitted, localhost will be assumed. If a path is given, the socket will be @@ -10058,7 +10351,7 @@ stream.setEncoding() for more information.

                                                                          -

                                                                          socket.write(data, [encoding], [callback])#

                                                                          +

                                                                          socket.write(data[, encoding][, callback])#

                                                                          Sends data on the socket. The second parameter specifies the encoding in the case of a string--it defaults to UTF8 encoding. @@ -10072,7 +10365,7 @@ written out - this may not be immediately.

                                                                          -

                                                                          socket.end([data], [encoding])#

                                                                          +

                                                                          socket.end([data][, encoding])#

                                                                          Half-closes the socket. i.e., it sends a FIN packet. It is possible the server will still send some data. @@ -10095,7 +10388,7 @@

                                                                          Resumes reading after a call to pause().

                                                                          -

                                                                          socket.setTimeout(timeout, [callback])#

                                                                          +

                                                                          socket.setTimeout(timeout[, callback])#

                                                                          Sets the socket to timeout after timeout milliseconds of inactivity on the socket. By default net.Socket do not have a timeout. @@ -10119,7 +10412,7 @@ noDelay defaults to true.

                                                                          -

                                                                          socket.setKeepAlive([enable], [initialDelay])#

                                                                          +

                                                                          socket.setKeepAlive([enable][, initialDelay])#

                                                                          Enable/disable keep-alive functionality, and optionally set the initial delay before the first keepalive probe is sent on an idle socket. enable defaults to false. @@ -10193,9 +10486,9 @@

                                                                            -
                                                                          • err {Error | Null} The error object. See [dns.lookup()][].
                                                                          • +
                                                                          • err {Error | Null} The error object. See dns.lookup().
                                                                          • address {String} The IP address.
                                                                          • -
                                                                          • family {String | Null} The address type. See [dns.lookup()][].
                                                                          • +
                                                                          • family {String | Null} The address type. See dns.lookup().

                                                                          Event: 'connect'#

                                                                          Emitted when a socket connection is successfully established. @@ -10294,18 +10587,13 @@ s.bind(1234, function() { s.addMembership('224.0.0.114'); });

                                                                  -

                                                                  dgram.createSocket(type, [callback])#

                                                                  -

                                                                  dgram.createSocket(options, [callback])#

                                                                  -
                                                                    +

                                                                    dgram.createSocket(type[, callback])#

                                                                    +
                                                                    • type String. Either 'udp4' or 'udp6'
                                                                    • -
                                                                    • options Object. Should contain a type property and could contain -reuseAddr property. false by default. -When reuseAddr is true - socket.bind() will reuse address, even if the -other process has already bound a socket on it.
                                                                    • callback Function. Attached as a listener to message events. Optional
                                                                    • Returns: Socket object
                                                                    • -
                                                                    +

                                                                  Creates a datagram Socket of the specified types. Valid types are udp4 and udp6. @@ -10313,9 +10601,33 @@

                                                                  Takes an optional callback which is added as a listener for message events.

                                                                  -

                                                                  Call socket.bind if you want to receive datagrams. socket.bind() will bind -to the "all interfaces" address on a random port (it does the right thing for -both udp4 and udp6 sockets). You can then retrieve the address and port +

                                                                  Call socket.bind() if you want to receive datagrams. socket.bind() will +bind to the "all interfaces" address on a random port (it does the right thing +for both udp4 and udp6 sockets). You can then retrieve the address and port +with socket.address().address and socket.address().port. + +

                                                                  +

                                                                  dgram.createSocket(options[, callback])#

                                                                  +
                                                                    +
                                                                  • options Object
                                                                  • +
                                                                  • callback Function. Attached as a listener to message events.
                                                                  • +
                                                                  • Returns: Socket object
                                                                  • +
                                                                +

                                                                The options object should contain a type field of either udp4 or udp6 +and an optional boolean reuseAddr field. + +

                                                                +

                                                                When reuseAddr is true socket.bind() will reuse the address, even if +another process has already bound a socket on it. reuseAddr defaults to +false. + +

                                                                +

                                                                Takes an optional callback which is added as a listener for message events. + +

                                                                +

                                                                Call socket.bind() if you want to receive datagrams. socket.bind() will +bind to the "all interfaces" address on a random port (it does the right thing +for both udp4 and udp6 sockets). You can then retrieve the address and port with socket.address().address and socket.address().port.

                                                                @@ -10354,7 +10666,7 @@

                                                                Emitted when an error occurs.

                                                                -

                                                                socket.send(buf, offset, length, port, address, [callback])#

                                                                +

                                                                socket.send(buf, offset, length, port, address[, callback])#

                                                                • buf Buffer object or string. Message to be sent
                                                                • offset Integer. Offset in the buffer where the message starts.
                                                                • @@ -10428,7 +10740,7 @@ informing the source that the data did not reach its intended recipient).

                                                                  -

                                                                  socket.bind(port, [address], [callback])#

                                                                  +

                                                                  socket.bind(port[, address][, callback])#

                                                                  • port Integer
                                                                  • address String, Optional
                                                                  • @@ -10476,7 +10788,7 @@ server.bind(41234); // server listening 0.0.0.0:41234
                                                                    -

                                                                    socket.bind(options, [callback])#

                                                                    +

                                                                    socket.bind(options[, callback])#

                                                                    • options Object - Required. Supports the following properties:
                                                                      • port Number - Required.
                                                                      • @@ -10558,7 +10870,7 @@ packets will also be received on the local interface.

                                                                        -

                                                                        socket.addMembership(multicastAddress, [multicastInterface])#

                                                                        +

                                                                        socket.addMembership(multicastAddress[, multicastInterface])#

                                                                        • multicastAddress String
                                                                        • multicastInterface String, Optional
                                                                        • @@ -10570,7 +10882,7 @@ interfaces.

                                                                          -

                                                                          socket.dropMembership(multicastAddress, [multicastInterface])#

                                                                          +

                                                                          socket.dropMembership(multicastAddress[, multicastInterface])#

                                                                          • multicastAddress String
                                                                          • multicastInterface String, Optional
                                                                          • @@ -10598,13 +10910,35 @@

                                                                            DNS#

                                                                            -
                                                                            Stability: 3 - Stable

                                                                            Use require('dns') to access this module. All methods in the dns module -use C-Ares except for dns.lookup which uses getaddrinfo(3) in a thread -pool. C-Ares is much faster than getaddrinfo but the system resolver is -more consistent with how other programs operate. When a user does -net.connect(80, 'google.com') or http.get({ host: 'google.com' }) the -dns.lookup method is used. Users who need to do a large number of lookups -quickly should use the methods that go through C-Ares. +

                                                                            Stability: 3 - Stable

                                                                            Use require('dns') to access this module. + +

                                                                            +

                                                                            This module contains functions that belong to two different categories: + +

                                                                            +

                                                                            1) Functions that use the underlying operating system facilities to perform +name resolution, and that do not necessarily do any network communication. +This category contains only one function: dns.lookup. Developers looking +to perform name resolution in the same way that other applications on the same +operating system behave should use dns.lookup. + +

                                                                            +

                                                                            Here is an example that does a lookup of www.google.com. + +

                                                                            +
                                                                            var dns = require('dns');
                                                                            +
                                                                            +dns.lookup('www.google.com', function onLookup(err, addresses, family) {
                                                                            +  console.log('addresses:', addresses);
                                                                            +});
                                                                            +

                                                                            2) Functions that connect to an actual DNS server to perform name resolution, +and that always use the network to perform DNS queries. This category +contains all functions in the dns module but dns.lookup. These functions +do not use the same set of configuration files than what dns.lookup uses. +For instance, they do not use the configuration from /etc/hosts. These +functions should be used by developers who do not want to use the underlying +operating system's facilities for name resolution, and instead want to +always perform DNS queries.

                                                                            Here is an example which resolves 'www.google.com' then reverse @@ -10628,7 +10962,12 @@ }); }); }); -

                                                                            dns.lookup(hostname, [options], callback)#

                                                                            +

                                                                            There are subtle consequences in choosing one or another, please consult the +Implementation considerations section +for more information. + +

                                                                            +

                                                                            dns.lookup(hostname[, options], callback)#

                                                                            Resolves a hostname (e.g. 'google.com') into the first found A (IPv4) or AAAA (IPv6) record. options can be an object or integer. If options is not provided, then IP v4 and v6 addresses are both valid. If options is @@ -10664,6 +11003,15 @@ the hostname does not exist but also when the lookup fails in other ways such as no available file descriptors. +

                                                                            +

                                                                            dns.lookup doesn't necessarily have anything to do with the DNS protocol. +It's only an operating system facility that can associate name with addresses, +and vice versa. + +

                                                                            +

                                                                            Its implementation can have subtle but important consequences on the behavior +of any Node.js program. Please take some time to consult the Implementation +considerations section before using it.

                                                                            dns.lookupService(address, port, callback)#

                                                                            @@ -10679,7 +11027,7 @@

                                                                            -

                                                                            dns.resolve(hostname, [rrtype], callback)#

                                                                            +

                                                                            dns.resolve(hostname[, rrtype], callback)#

                                                                            Resolves a hostname (e.g. 'google.com') into an array of the record types specified by rrtype. @@ -10841,6 +11189,51 @@

                                                                          • dns.V4MAPPED: If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses.
                                                                          +

                                                                          Implementation considerations#

                                                                          +

                                                                          Although dns.lookup and dns.resolve*/dns.reverse functions have the same +goal of associating a network name with a network address (or vice versa), +their behavior is quite different. These differences can have subtle but +significant consequences on the behavior of Node.js programs. + +

                                                                          +

                                                                          dns.lookup#

                                                                          +

                                                                          Under the hood, dns.lookup uses the same operating system facilities as most +other programs. For instance, dns.lookup will almost always resolve a given +name the same way as the ping command. On most POSIX-like operating systems, +the behavior of the dns.lookup function can be tweaked by changing settings +in nsswitch.conf(5) and/or resolv.conf(5), but be careful that changing +these files will change the behavior of all other programs running on the same +operating system. + +

                                                                          +

                                                                          Though the call will be asynchronous from JavaScript's perspective, it is +implemented as a synchronous call to getaddrinfo(3) that runs on libuv's +threadpool. Because libuv's threadpool has a fixed size, it means that if for +whatever reason the call to getaddrinfo(3) takes a long time, other +operations that could run on libuv's threadpool (such as filesystem +operations) will experience degraded performance. In order to mitigate this +issue, one potential solution is to increase the size of libuv's threadpool by +setting the 'UV_THREADPOOL_SIZE' environment variable to a value greater than +4 (its current default value). For more information on libuv's threadpool, see +the official libuv +documentation. + +

                                                                          +

                                                                          dns.resolve, functions starting with dns.resolve and dns.reverse#

                                                                          +

                                                                          These functions are implemented quite differently than dns.lookup. They do +not use getaddrinfo(3) and they always perform a DNS query on the network. +This network communication is always done asynchronously, and does not use +libuv's threadpool. + +

                                                                          +

                                                                          As a result, these functions cannot have the same negative impact on other +processing that happens on libuv's threadpool that dns.lookup can have. + +

                                                                          +

                                                                          They do not use the same set of configuration files than what dns.lookup +uses. For instance, they do not use the configuration from /etc/hosts. + +

                                                                          HTTP#

                                                                          Stability: 3 - Stable

                                                                          To use the HTTP server and client one must require('http'). @@ -10905,14 +11298,14 @@

                                                                          http.createServer([requestListener])#

                                                                          -

                                                                          Returns a new web server object. +

                                                                          Returns a new instance of http.Server.

                                                                          The requestListener is a function which is automatically added to the 'request' event.

                                                                          -

                                                                          http.createClient([port], [host])#

                                                                          +

                                                                          http.createClient([port][, host])#

                                                                          This function is deprecated; please use http.request() instead. Constructs a new HTTP client. port and host refer to the server to be connected to. @@ -11015,14 +11408,14 @@

                                                                          function (exception, socket) { }

                                                                          -

                                                                          If a client connection emits an 'error' event - it will forwarded here. +

                                                                          If a client connection emits an 'error' event, it will be forwarded here.

                                                                          socket is the net.Socket object that the error originated from.

                                                                          -

                                                                          server.listen(port, [hostname], [backlog], [callback])#

                                                                          +

                                                                          server.listen(port[, hostname][, backlog][, callback])#

                                                                          Begin accepting connections on the specified port and hostname. If the hostname is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY). @@ -11042,7 +11435,7 @@

                                                                          -

                                                                          server.listen(path, [callback])#

                                                                          +

                                                                          server.listen(path[, callback])#

                                                                          Start a UNIX socket server listening for connections on the given path.

                                                                          @@ -11051,7 +11444,7 @@

                                                                          -

                                                                          server.listen(handle, [callback])#

                                                                          +

                                                                          server.listen(handle[, callback])#

                                                                          • handle Object
                                                                          • callback Function
                                                                          • @@ -11155,7 +11548,7 @@ the request body should be sent. See the 'checkContinue' event on Server.

                                                                            -

                                                                            response.writeHead(statusCode, [statusMessage], [headers])#

                                                                            +

                                                                            response.writeHead(statusCode[, statusMessage][, headers])#

                                                                            Sends a response header to the request. The status code is a 3-digit HTTP status code, like 404. The last argument, headers, are the response headers. Optionally one can give a human-readable statusMessage as the second @@ -11177,7 +11570,7 @@ implicit/mutable headers will be calculated and call this function for you.

                                                                            -

                                                                            Note: that Content-Length is given in bytes not characters. The above example +

                                                                            Note that Content-Length is given in bytes not characters. The above example works because the string 'hello world' contains only single byte characters. If the body contains higher coded characters then Buffer.byteLength() should be used to determine the number of bytes in a given encoding. @@ -11276,7 +11669,7 @@

                                                                            response.removeHeader("Content-Encoding");
                                                                            -

                                                                            response.write(chunk, [encoding])#

                                                                            +

                                                                            response.write(chunk[, encoding][, callback])#

                                                                            If this method is called and response.writeHead() has not been called, it will switch to implicit header mode and flush the implicit headers. @@ -11287,7 +11680,8 @@

                                                                            chunk can be a string or a buffer. If chunk is a string, the second parameter specifies how to encode it into a byte stream. -By default the encoding is 'utf8'. +By default the encoding is 'utf8'. The last parameter callback +will be called when this chunk of data is flushed.

                                                                            Note: This is the raw HTTP body and has nothing to do with @@ -11303,7 +11697,7 @@

                                                                            Returns true if the entire data was flushed successfully to the kernel buffer. Returns false if all or part of the data was queued in user memory. -'drain' will be emitted when the buffer is again free. +'drain' will be emitted when the buffer is free again.

                                                                            response.addTrailers(headers)#

                                                                            @@ -11325,19 +11719,22 @@ response.write(fileData); response.addTrailers({'Content-MD5': "7895bf4b8828b55ceaf47747b4bca667"}); response.end();
                                                                            -

                                                                            response.end([data], [encoding])#

                                                                            +

                                                                            response.end([data][, encoding][, callback])#

                                                                            This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.

                                                                            -

                                                                            If data is specified, it is equivalent to calling response.write(data, encoding) -followed by response.end(). +

                                                                            If data is specified, it is equivalent to calling +response.write(data, encoding) followed by response.end(callback). +

                                                                            +

                                                                            If callback is specified, it will be called when the response stream +is finished.

                                                                            -

                                                                            http.request(options, [callback])#

                                                                            +

                                                                            http.request(options[, callback])#

                                                                            Node maintains several connections per server to make HTTP requests. This function allows one to transparently issue requests. @@ -11449,7 +11846,7 @@ to compute basic authentication.

                                                                          -

                                                                          http.get(options, [callback])#

                                                                          +

                                                                          http.get(options[, callback])#

                                                                          Since most requests are GET requests without bodies, Node provides this convenience method. The only difference between this method and http.request() is that it sets the method to GET and calls req.end() automatically. @@ -11772,7 +12169,7 @@ the client should send the request body.

                                                                          -

                                                                          request.flush()#

                                                                          +

                                                                          request.flushHeaders()#

                                                                          Flush the request headers.

                                                                          @@ -11786,7 +12183,7 @@ the optimization and kickstart the request.

                                                                          -

                                                                          request.write(chunk, [encoding])#

                                                                          +

                                                                          request.write(chunk[, encoding][, callback])#

                                                                          Sends a chunk of the body. By calling this method many times, the user can stream a request body to a server--in that case it is suggested to use the @@ -11800,23 +12197,30 @@

                                                                          The encoding argument is optional and only applies when chunk is a string. Defaults to 'utf8'. +

                                                                          +

                                                                          The callback argument is optional and will be called when this chunk of data +is flushed.

                                                                          -

                                                                          request.end([data], [encoding])#

                                                                          +

                                                                          request.end([data][, encoding][, callback])#

                                                                          Finishes sending the request. If any parts of the body are unsent, it will flush them to the stream. If the request is chunked, this will send the terminating '0\r\n\r\n'.

                                                                          If data is specified, it is equivalent to calling -request.write(data, encoding) followed by request.end(). +request.write(data, encoding) followed by request.end(callback). + +

                                                                          +

                                                                          If callback is specified, it will be called when the request stream +is finished.

                                                                          request.abort()#

                                                                          Aborts a request. (New since v0.3.8.)

                                                                          -

                                                                          request.setTimeout(timeout, [callback])#

                                                                          +

                                                                          request.setTimeout(timeout[, callback])#

                                                                          Once a socket is assigned to this request and is connected socket.setTimeout() will be called. @@ -11826,7 +12230,7 @@ socket.setNoDelay() will be called.

                                                                          -

                                                                          request.setSocketKeepAlive([enable], [initialDelay])#

                                                                          +

                                                                          request.setSocketKeepAlive([enable][, initialDelay])#

                                                                          Once a socket is assigned to this request and is connected socket.setKeepAlive() will be called. @@ -11847,7 +12251,7 @@

                                                                          function () { }

                                                                          -

                                                                          Indicates that the underlaying connection was closed. +

                                                                          Indicates that the underlying connection was closed. Just like 'end', this event occurs only once per response.

                                                                          @@ -11999,7 +12403,7 @@

                                                                          See http.Server#timeout.

                                                                          -

                                                                          https.createServer(options, [requestListener])#

                                                                          +

                                                                          https.createServer(options[, requestListener])#

                                                                          Returns a new HTTPS web server object. The options is similar to tls.createServer(). The requestListener is a function which is automatically added to the 'request' event. @@ -12035,9 +12439,9 @@ res.writeHead(200); res.end("hello world\n"); }).listen(8000); -

                                                                          server.listen(port, [host], [backlog], [callback])#

                                                                          -

                                                                          server.listen(path, [callback])#

                                                                          -

                                                                          server.listen(handle, [callback])#

                                                                          +

                                                                          server.listen(port[, host][, backlog][, callback])#

                                                                          +

                                                                          server.listen(path[, callback])#

                                                                          +

                                                                          server.listen(handle[, callback])#

                                                                          See http.listen() for details.

                                                                          @@ -12122,8 +12526,8 @@ the list of supplied CAs. An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent. Default true. -
                                                                        • secureProtocol: The SSL method to use, e.g. SSLv3_method to force -SSL version 3. The possible values depend on your installation of +
                                                                        • secureProtocol: The SSL method to use, e.g. TLSv1_method to force +TLS version 1. The possible values depend on your installation of OpenSSL and are defined in the constant SSL_METHODS.

                                                                        In order to specify these options, use a custom Agent. @@ -12256,13 +12660,14 @@

                                                                        The following methods are provided by the URL module:

                                                                        -

                                                                        url.parse(urlStr, [parseQueryString], [slashesDenoteHost])#

                                                                        +

                                                                        url.parse(urlStr[, parseQueryString][, slashesDenoteHost])#

                                                                        Take a URL string, and return an object.

                                                                        -

                                                                        Pass true as the second argument to also parse -the query string using the querystring module. -Defaults to false. +

                                                                        Pass true as the second argument to also parse the query string using the +querystring module. If true then the query property will always be +assigned an object, and the search property will always be a (possibly +empty) string. Defaults to false.

                                                                        Pass true as the third argument to treat //foo/bar as @@ -12274,6 +12679,9 @@

                                                                        Take a parsed URL object, and return a formatted URL string.

                                                                        +

                                                                        Here's how the formatting process works: + +

                                                                        • href will be ignored.
                                                                        • protocol is treated the same with or without the trailing : (colon).
                                                                            @@ -12292,11 +12700,14 @@
                                                                          • hostname will only be used if host is absent.
                                                                          • port will only be used if host is absent.
                                                                          • host will be used in place of hostname and port
                                                                          • -
                                                                          • pathname is treated the same with or without the leading / (slash)
                                                                          • -
                                                                          • search will be used in place of query
                                                                          • +
                                                                          • pathname is treated the same with or without the leading / (slash).
                                                                          • +
                                                                          • path is treated the same with pathname but able to contain query as well.
                                                                          • +
                                                                          • search will be used in place of query.
                                                                              +
                                                                            • It is treated the same with or without the leading ? (question mark)
                                                                            • +
                                                                            +
                                                                          • query (object; see querystring) will only be used if search is absent.
                                                                          • -
                                                                          • search is treated the same with or without the leading ? (question mark)
                                                                          • -
                                                                          • hash is treated the same with or without the leading # (pound sign, anchor)
                                                                          • +
                                                                          • hash is treated the same with or without the leading # (pound sign, anchor).

                                                                          url.resolve(from, to)#

                                                                          Take a base URL, and a href URL, and resolve them as a browser would for @@ -12313,7 +12724,7 @@ It provides the following methods:

                                                                          -

                                                                          querystring.stringify(obj, [sep], [eq], [options])#

                                                                          +

                                                                          querystring.stringify(obj[, sep][, eq][, options])#

                                                                          Serialize an object to a query string. Optionally override the default separator ('&') and assignment ('=') characters. @@ -12340,7 +12751,7 @@ { encodeURIComponent: gbkEncodeURIComponent }) // returns 'w=%D6%D0%CE%C4&foo=bar' -

                                                                          querystring.parse(str, [sep], [eq], [options])#

                                                                          +

                                                                          querystring.parse(str[, sep][, eq][, options])#

                                                                          Deserialize a query string to an object. Optionally override the default separator ('&') and assignment ('=') characters. @@ -12468,7 +12879,7 @@

                                                                          • input - the readable stream to listen to (Required).

                                                                          • -
                                                                          • output - the writable stream to write readline data to (Required).

                                                                            +
                                                                          • output - the writable stream to write readline data to (Optional).

                                                                          • completer - an optional function that is used for Tab autocompletion. See below for an example of using this.

                                                                            @@ -12546,6 +12957,10 @@ been paused.

                                                                            +

                                                                            If output is set to null or undefined when calling createInterface, the +prompt is not written. + +

                                                                            rl.question(query, callback)#

                                                                            Prepends the prompt with query and invokes callback with the user's response. Displays the query to the user, and then invokes callback @@ -12556,6 +12971,10 @@ it has been paused.

                                                                            +

                                                                            If output is set to null or undefined when calling createInterface, +nothing is displayed. + +

                                                                            Example usage:

                                                                            @@ -12566,6 +12985,9 @@

                                                                            Pauses the readline input stream, allowing it to be resumed later if needed.

                                                                            +

                                                                            Note that this doesn't immediately pause the stream of events. Several events may be emitted after calling pause, including line. + +

                                                                            rl.resume()#

                                                                            Resumes the readline input stream. @@ -12575,9 +12997,10 @@ output streams. The "close" event will also be emitted.

                                                                            -

                                                                            rl.write(data, [key])#

                                                                            -

                                                                            Writes data to output stream. key is an object literal to represent a key -sequence; available if the terminal is a TTY. +

                                                                            rl.write(data[, key])#

                                                                            +

                                                                            Writes data to output stream, unless output is set to null or +undefined when calling createInterface. key is an object literal to +represent a key sequence; available if the terminal is a TTY.

                                                                            This will also resume the input stream if it has been paused. @@ -12998,7 +13421,7 @@ later.

                                                                            -

                                                                            vm.runInThisContext(code, [options])#

                                                                            +

                                                                            vm.runInThisContext(code[, options])#

                                                                            vm.runInThisContext() compiles code, runs it and returns the result. Running code does not have access to local scope, but does have access to the current global object. @@ -13062,7 +13485,7 @@

                                                                            -

                                                                            vm.runInContext(code, contextifiedSandbox, [options])#

                                                                            +

                                                                            vm.runInContext(code, contextifiedSandbox[, options])#

                                                                            vm.runInContext compiles code, then runs it in contextifiedSandbox and returns the result. Running code does not have access to local scope. The contextifiedSandbox object must have been previously contextified via @@ -13093,7 +13516,7 @@

                                                                            -

                                                                            vm.runInNewContext(code, [sandbox], [options])#

                                                                            +

                                                                            vm.runInNewContext(code[, sandbox][, options])#

                                                                            vm.runInNewContext compiles code, contextifies sandbox if passed or creates a new contextified sandbox if it's omitted, and then runs the code with the sandbox as the global object and returns the result. @@ -13197,7 +13620,7 @@

                                                                          • timeout: a number of milliseconds to execute the script before terminating execution. If execution is terminated, an Error will be thrown.
                                                                          -

                                                                          script.runInContext(contextifiedSandbox, [options])#

                                                                          +

                                                                          script.runInContext(contextifiedSandbox[, options])#

                                                                          Similar to vm.runInContext but a method of a precompiled Script object. script.runInContext runs script's compiled code in contextifiedSandbox and returns the result. Running code does not have access to local scope. @@ -13233,7 +13656,7 @@

                                                                          -

                                                                          script.runInNewContext([sandbox], [options])#

                                                                          +

                                                                          script.runInNewContext([sandbox][, options])#

                                                                          Similar to vm.runInNewContext but a method of a precompiled Script object. script.runInNewContext contextifies sandbox if passed or creates a new contextified sandbox if it's omitted, and then runs script's compiled code @@ -13378,13 +13801,18 @@

                                                                        • Stream object

                                                                      A Writable Stream that represents the child process's stdin. -Closing this stream via end() often causes the child process to terminate. +If the child is waiting to read all its input, it will not continue until this +stream has been closed via end().

                                                                      -

                                                                      If the child stdio streams are shared with the parent, then this will +

                                                                      If the child was not spawned with stdio[0] set to 'pipe', then this will not be set.

                                                                      +

                                                                      child.stdin is shorthand for child.stdio[0]. Both properties will refer +to the same object, or null. + +

                                                                      child.stdout#

                                                                      • Stream object
                                                                      • @@ -13392,10 +13820,14 @@

                                                                        A Readable Stream that represents the child process's stdout.

                                                                        -

                                                                        If the child stdio streams are shared with the parent, then this will +

                                                                        If the child was not spawned with stdio[1] set to 'pipe', then this will not be set.

                                                                        +

                                                                        child.stdout is shorthand for child.stdio[1]. Both properties will refer +to the same object, or null. + +

                                                                        child.stderr#

                                                                        • Stream object
                                                                        • @@ -13403,10 +13835,47 @@

                                                                          A Readable Stream that represents the child process's stderr.

                                                                          -

                                                                          If the child stdio streams are shared with the parent, then this will +

                                                                          If the child was not spawned with stdio[2] set to 'pipe', then this will not be set.

                                                                          +

                                                                          child.stderr is shorthand for child.stdio[2]. Both properties will refer +to the same object, or null. + +

                                                                          +

                                                                          child.stdio#

                                                                          +
                                                                            +
                                                                          • Array
                                                                          • +
                                                                        +

                                                                        A sparse array of pipes to the child process, corresponding with positions in +the stdio option to +spawn that have been +set to 'pipe'. +Note that streams 0-2 are also available as ChildProcess.stdin, +ChildProcess.stdout, and ChildProcess.stderr, respectively. + +

                                                                        +

                                                                        In the following example, only the child's fd 1 is setup as a pipe, so only +the parent's child.stdio[1] is a stream, all other values in the array are +null. + +

                                                                        +
                                                                        child = child_process.spawn("ls", {
                                                                        +    stdio: [
                                                                        +      0, // use parents stdin for child
                                                                        +      'pipe', // pipe child's stdout to parent
                                                                        +      fs.openSync("err.out", "w") // direct child's stderr to a file
                                                                        +    ]
                                                                        +});
                                                                        +
                                                                        +assert.equal(child.stdio[0], null);
                                                                        +assert.equal(child.stdio[0], child.stdin);
                                                                        +
                                                                        +assert(child.stdout);
                                                                        +assert.equal(child.stdio[1], child.stdout);
                                                                        +
                                                                        +assert.equal(child.stdio[2], null);
                                                                        +assert.equal(child.stdio[2], child.stderr);

                                                                        child.pid#

                                                                        • Integer
                                                                        • @@ -13461,7 +13930,7 @@

                                                                          See kill(2)

                                                                          -

                                                                          child.send(message, [sendHandle])#

                                                                          +

                                                                          child.send(message[, sendHandle])#

                                                                          • message Object
                                                                          • sendHandle Handle object
                                                                          • @@ -13606,15 +14075,19 @@ callback or returning an EventEmitter).

                                                                            -

                                                                            child_process.spawn(command, [args], [options])#

                                                                            +

                                                                            child_process.spawn(command[, args][, options])#

                                                                            • command String The command to run
                                                                            • args Array List of string arguments
                                                                            • options Object
                                                                              • cwd String Current working directory of the child process
                                                                              • -
                                                                              • stdio Array|String Child's stdio configuration. (See below)
                                                                              • env Object Environment key-value pairs
                                                                              • -
                                                                              • detached Boolean The child will be a process group leader. (See below)
                                                                              • +
                                                                              • stdio Array|String Child's stdio configuration. (See +below)
                                                                              • +
                                                                              • customFds Array Deprecated File descriptors for the child to use +for stdio. (See below)
                                                                              • +
                                                                              • detached Boolean The child will be a process group leader. (See +below)
                                                                              • uid Number Sets the user identity of the process. (See setuid(2).)
                                                                              • gid Number Sets the group identity of the process. (See setgid(2).)
                                                                              @@ -13631,8 +14104,12 @@
                                                                              { cwd: undefined,
                                                                                 env: process.env
                                                                               }
                                                                              -

                                                                              cwd allows you to specify the working directory from which the process is spawned. -Use env to specify environment variables that will be visible to the new process. +

                                                                              Use cwd to specify the working directory from which the process is spawned. +If not given, the default is to inherit the current working directory. + +

                                                                              +

                                                                              Use env to specify environment variables that will be visible to the new +process, the default is process.env.

                                                                              Example of running ls -lh /usr, capturing stdout, stderr, and the exit code: @@ -13687,16 +14164,17 @@ console.log('grep process exited with code ' + code); } }); -

                                                                              Example of checking for failed exec: +

                                                                              options.stdio#

                                                                              +

                                                                              As a shorthand, the stdio argument may also be one of the following +strings:

                                                                              -
                                                                              var spawn = require('child_process').spawn,
                                                                              -    child = spawn('bad_command');
                                                                              -
                                                                              -child.on('error', function (err) {
                                                                              -  console.log('Failed to start child process.');
                                                                              -});
                                                                              -

                                                                              The 'stdio' option to child_process.spawn() is an array where each +

                                                                                +
                                                                              • 'pipe' - ['pipe', 'pipe', 'pipe'], this is the default value
                                                                              • +
                                                                              • 'ignore' - ['ignore', 'ignore', 'ignore']
                                                                              • +
                                                                              • 'inherit' - [process.stdin, process.stdout, process.stderr] or [0,1,2]
                                                                              • +
                                                                              +

                                                                              Otherwise, the 'stdio' option to child_process.spawn() is an array where each index corresponds to a fd in the child. The value is one of the following:

                                                                              @@ -13729,15 +14207,6 @@ words, stdin, stdout, and stderr) a pipe is created. For fd 3 and up, the default is 'ignore'.
                                                                            • -

                                                                              As a shorthand, the stdio argument may also be one of the following -strings, rather than an array: - -

                                                                              -
                                                                                -
                                                                              • ignore - ['ignore', 'ignore', 'ignore']
                                                                              • -
                                                                              • pipe - ['pipe', 'pipe', 'pipe']
                                                                              • -
                                                                              • inherit - [process.stdin, process.stdout, process.stderr] or [0,1,2]
                                                                              • -

                                                                              Example:

                                                                              @@ -13752,6 +14221,7 @@ // Open an extra fd=4, to interact with programs present a // startd-style interface. spawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] }); +

                                                                              options.detached#

                                                                              If the detached option is set, the child process will be made the leader of a new process group. This makes it possible for the child to continue running after the parent exits. @@ -13783,10 +14253,19 @@ inherited, the child will remain attached to the controlling terminal.

                                                                              +

                                                                              options.customFds#

                                                                              +

                                                                              There is a deprecated option called customFds which allows one to specify +specific file descriptors for the stdio of the child process. This API was +not portable to all platforms and therefore removed. +With customFds it was possible to hook up the new process' [stdin, stdout, +stderr] to existing streams; -1 meant that a new stream should be created. +Use at your own risk. + +

                                                                              See also: child_process.exec() and child_process.fork()

                                                                              -

                                                                              child_process.exec(command, [options], callback)#

                                                                              +

                                                                              child_process.exec(command[, options], callback)#

                                                                              • command String The command to run, with space-separated arguments
                                                                              • options Object
                                                                                  @@ -13850,7 +14329,7 @@

                                                                                  -

                                                                                  child_process.execFile(file, [args], [options], [callback])#

                                                                                  +

                                                                                  child_process.execFile(file[, args][, options][, callback])#

                                                                                  • file String The filename of the program to run
                                                                                  • args Array List of string arguments
                                                                                  • @@ -13879,14 +14358,13 @@

                                                                                    -

                                                                                    child_process.fork(modulePath, [args], [options])#

                                                                                    +

                                                                                    child_process.fork(modulePath[, args][, options])#

                                                                                    • modulePath String The module to run in the child
                                                                                    • args Array List of string arguments
                                                                                    • options Object
                                                                                      • cwd String Current working directory of the child process
                                                                                      • env Object Environment key-value pairs
                                                                                      • -
                                                                                      • encoding String (Default: 'utf8')
                                                                                      • execPath String Executable used to create the child process
                                                                                      • execArgv Array List of string arguments passed to the executable (Default: process.execArgv)
                                                                                      • @@ -13928,7 +14406,7 @@ configuration at startup.

                                                                                        -

                                                                                        child_process.spawnSync(command, [args], [options])#

                                                                                        +

                                                                                        child_process.spawnSync(command[, args][, options])#

                                                                                        • command String The command to run
                                                                                        • args Array List of string arguments
                                                                                        • @@ -13966,7 +14444,7 @@ process has exited.

                                                                                          -

                                                                                          child_process.execFileSync(command, [args], [options])#

                                                                                          +

                                                                                          child_process.execFileSync(command[, args][, options])#

                                                                                          • command String The command to run
                                                                                          • args Array List of string arguments
                                                                                          • @@ -14005,7 +14483,7 @@

                                                                                            -

                                                                                            child_process.execSync(command, [options])#

                                                                                            +

                                                                                            child_process.execSync(command[, options])#

                                                                                            • command String The command to run
                                                                                            • options Object
                                                                                                @@ -14051,35 +14529,35 @@

                                                                                                Throws an exception that displays the values for actual and expected separated by the provided operator.

                                                                                                -

                                                                                                assert(value, message), assert.ok(value, [message])#

                                                                                                +

                                                                                                assert(value[, message]), assert.ok(value[, message])#

                                                                                                Tests if value is truthy, it is equivalent to assert.equal(true, !!value, message);

                                                                                                -

                                                                                                assert.equal(actual, expected, [message])#

                                                                                                +

                                                                                                assert.equal(actual, expected[, message])#

                                                                                                Tests shallow, coercive equality with the equal comparison operator ( == ).

                                                                                                -

                                                                                                assert.notEqual(actual, expected, [message])#

                                                                                                +

                                                                                                assert.notEqual(actual, expected[, message])#

                                                                                                Tests shallow, coercive non-equality with the not equal comparison operator ( != ).

                                                                                                -

                                                                                                assert.deepEqual(actual, expected, [message])#

                                                                                                +

                                                                                                assert.deepEqual(actual, expected[, message])#

                                                                                                Tests for deep equality.

                                                                                                -

                                                                                                assert.notDeepEqual(actual, expected, [message])#

                                                                                                +

                                                                                                assert.notDeepEqual(actual, expected[, message])#

                                                                                                Tests for any deep inequality.

                                                                                                -

                                                                                                assert.strictEqual(actual, expected, [message])#

                                                                                                +

                                                                                                assert.strictEqual(actual, expected[, message])#

                                                                                                Tests strict equality, as determined by the strict equality operator ( === )

                                                                                                -

                                                                                                assert.notStrictEqual(actual, expected, [message])#

                                                                                                +

                                                                                                assert.notStrictEqual(actual, expected[, message])#

                                                                                                Tests strict non-equality, as determined by the strict not equal operator ( !== )

                                                                                                -

                                                                                                assert.throws(block, [error], [message])#

                                                                                                +

                                                                                                assert.throws(block[, error][, message])#

                                                                                                Expects block to throw an error. error can be constructor, RegExp or validation function. @@ -14116,7 +14594,7 @@ }, "unexpected error" ); -

                                                                                                assert.doesNotThrow(block, [message])#

                                                                                                +

                                                                                                assert.doesNotThrow(block[, message])#

                                                                                                Expects block not to throw an error, see assert.throws for details.

                                                                                                @@ -14401,38 +14879,38 @@ without a callback.

                                                                                                -

                                                                                                zlib.deflate(buf, [options], callback)#

                                                                                                -

                                                                                                zlib.deflateSync(buf, [options])#

                                                                                                +

                                                                                                zlib.deflate(buf[, options], callback)#

                                                                                                +

                                                                                                zlib.deflateSync(buf[, options])#

                                                                                                Compress a string with Deflate.

                                                                                                -

                                                                                                zlib.deflateRaw(buf, [options], callback)#

                                                                                                -

                                                                                                zlib.deflateRawSync(buf, [options])#

                                                                                                +

                                                                                                zlib.deflateRaw(buf[, options], callback)#

                                                                                                +

                                                                                                zlib.deflateRawSync(buf[, options])#

                                                                                                Compress a string with DeflateRaw.

                                                                                                -

                                                                                                zlib.gzip(buf, [options], callback)#

                                                                                                -

                                                                                                zlib.gzipSync(buf, [options])#

                                                                                                +

                                                                                                zlib.gzip(buf[, options], callback)#

                                                                                                +

                                                                                                zlib.gzipSync(buf[, options])#

                                                                                                Compress a string with Gzip.

                                                                                                -

                                                                                                zlib.gunzip(buf, [options], callback)#

                                                                                                -

                                                                                                zlib.gunzipSync(buf, [options])#

                                                                                                +

                                                                                                zlib.gunzip(buf[, options], callback)#

                                                                                                +

                                                                                                zlib.gunzipSync(buf[, options])#

                                                                                                Decompress a raw Buffer with Gunzip.

                                                                                                -

                                                                                                zlib.inflate(buf, [options], callback)#

                                                                                                -

                                                                                                zlib.inflateSync(buf, [options])#

                                                                                                +

                                                                                                zlib.inflate(buf[, options], callback)#

                                                                                                +

                                                                                                zlib.inflateSync(buf[, options])#

                                                                                                Decompress a raw Buffer with Inflate.

                                                                                                -

                                                                                                zlib.inflateRaw(buf, [options], callback)#

                                                                                                -

                                                                                                zlib.inflateRawSync(buf, [options])#

                                                                                                +

                                                                                                zlib.inflateRaw(buf[, options], callback)#

                                                                                                +

                                                                                                zlib.inflateRawSync(buf[, options])#

                                                                                                Decompress a raw Buffer with InflateRaw.

                                                                                                -

                                                                                                zlib.unzip(buf, [options], callback)#

                                                                                                -

                                                                                                zlib.unzipSync(buf, [options])#

                                                                                                +

                                                                                                zlib.unzip(buf[, options], callback)#

                                                                                                +

                                                                                                zlib.unzipSync(buf[, options])#

                                                                                                Decompress a raw Buffer with Unzip.

                                                                                                @@ -15383,7 +15861,7 @@ // kill worker worker.kill(); -

                                                                                                worker.send(message, [sendHandle])#

                                                                                                +

                                                                                                worker.send(message[, sendHandle])#

                                                                                                • message Object
                                                                                                • sendHandle Handle object
                                                                                                • @@ -15613,20 +16091,21 @@

                                                                                                  Smalloc#

                                                                                                  -
                                                                                                  Stability: 1 - Experimental

                                                                                                  smalloc.alloc(length[, receiver][, type])#

                                                                                                  -
                                                                                                    -
                                                                                                  • length {Number} <= smalloc.kMaxLength
                                                                                                  • -
                                                                                                  • receiver {Object}, Optional, Default: new Object
                                                                                                  • -
                                                                                                  • type {Enum}, Optional, Default: Uint8
                                                                                                  • -
                                                                                                  -

                                                                                                  Returns receiver with allocated external array data. If no receiver is -passed then a new Object will be created and returned. - -

                                                                                                  +
                                                                                                  Stability: 1 - Experimental

                                                                                                  Class: smalloc#

                                                                                                  Buffers are backed by a simple allocator that only handles the assignation of external raw memory. Smalloc exposes that functionality.

                                                                                                  +

                                                                                                  smalloc.alloc(length[, receiver][, type])#

                                                                                                  +
                                                                                                    +
                                                                                                  • length Number <= smalloc.kMaxLength
                                                                                                  • +
                                                                                                  • receiver Object Default: new Object
                                                                                                  • +
                                                                                                  • type Enum Default: Uint8
                                                                                                  • +
                                                                                                +

                                                                                                Returns receiver with allocated external array data. If no receiver is +passed then a new Object will be created and returned. + +

                                                                                                This can be used to create your own Buffer-like classes. No other properties are set, so the user will need to keep track of other necessary information (e.g. length of the allocation). @@ -15660,13 +16139,18 @@ doubleArr = i / 10; // { '0': 0, '1': 0.1, '2': 0.2 } -

                                                                                                smalloc.copyOnto(source, sourceStart, dest, destStart, copyLength);#

                                                                                                -
                                                                                                  -
                                                                                                • source Object with external array allocation
                                                                                                • -
                                                                                                • sourceStart Position to begin copying from
                                                                                                • -
                                                                                                • dest Object with external array allocation
                                                                                                • -
                                                                                                • destStart Position to begin copying onto
                                                                                                • -
                                                                                                • copyLength Length of copy
                                                                                                • +

                                                                                                  It is not possible to freeze, seal and prevent extensions of objects with +external data using Object.freeze, Object.seal and +Object.preventExtensions respectively. + +

                                                                                                  +

                                                                                                  smalloc.copyOnto(source, sourceStart, dest, destStart, copyLength);#

                                                                                                  +
                                                                                                    +
                                                                                                  • source Object with external array allocation
                                                                                                  • +
                                                                                                  • sourceStart Number Position to begin copying from
                                                                                                  • +
                                                                                                  • dest Object with external array allocation
                                                                                                  • +
                                                                                                  • destStart Number Position to begin copying onto
                                                                                                  • +
                                                                                                  • copyLength Number Length of copy

                                                                                                Copy memory from one external array allocation to another. No arguments are optional, and any violation will throw. @@ -15690,7 +16174,7 @@ need to set any additional properties for this to work.

                                                                                                -

                                                                                                smalloc.dispose(obj)#

                                                                                                +

                                                                                                smalloc.dispose(obj)#

                                                                                                • obj Object
                                                                                              @@ -15719,22 +16203,24 @@ smalloc.copyOnto(b, 2, a, 0, 2); // now results in: -// Error: source has no external array data -

                                                                                              dispose() does not support Buffers, and will throw if passed. +// RangeError: copy_length > source_length +

                                                                                              After dispose() is called object still behaves as one with external data, for +example smalloc.hasExternalData() returns true. +dispose() does not support Buffers, and will throw if passed.

                                                                                              -

                                                                                              smalloc.hasExternalData(obj)#

                                                                                              +

                                                                                              smalloc.hasExternalData(obj)#

                                                                                              • obj Object

                                                                                            Returns true if the obj has externally allocated memory.

                                                                                            -

                                                                                            smalloc.kMaxLength#

                                                                                            +

                                                                                            smalloc.kMaxLength#

                                                                                            Size of maximum allocation. This is also applicable to Buffer creation.

                                                                                            -

                                                                                            smalloc.Types#

                                                                                            +

                                                                                            smalloc.Types#

                                                                                            Enum of possible external array types. Contains:

                                                                                            @@ -15749,306 +16235,52 @@
                                                                                          • Double
                                                                                          • Uint8Clamped
                                                                                          -

                                                                                          Tracing#

                                                                                          -
                                                                                          Stability: 1 - Experimental

                                                                                          The tracing module is designed for instrumenting your Node application. It is -not meant for general purpose use. - -

                                                                                          -

                                                                                          Be very careful with callbacks used in conjunction with this module - -

                                                                                          -

                                                                                          Many of these callbacks interact directly with asynchronous subsystems in a -synchronous fashion. That is to say, you may be in a callback where a call to -console.log() could result in an infinite recursive loop. Also of note, many -of these callbacks are in hot execution code paths. That is to say your -callbacks are executed quite often in the normal operation of Node, so be wary -of doing CPU bound or synchronous workloads in these functions. Consider a ring -buffer and a timer to defer processing. - -

                                                                                          -

                                                                                          require('tracing') to use this module. - -

                                                                                          -

                                                                                          v8#

                                                                                          -

                                                                                          The v8 property is an EventEmitter, it exposes events and interfaces -specific to the version of v8 built with node. These interfaces are subject -to change by upstream and are therefore not covered under the stability index. - -

                                                                                          -

                                                                                          Event: 'gc'#

                                                                                          -

                                                                                          function (before, after) { } - -

                                                                                          -

                                                                                          Emitted each time a GC run is completed. - -

                                                                                          -

                                                                                          before and after are objects with the following properties: - -

                                                                                          -
                                                                                          {
                                                                                          -  type: 'mark-sweep-compact',
                                                                                          -  flags: 0,
                                                                                          -  timestamp: 905535650119053,
                                                                                          -  total_heap_size: 6295040,
                                                                                          -  total_heap_size_executable: 4194304,
                                                                                          -  total_physical_size: 6295040,
                                                                                          -  used_heap_size: 2855416,
                                                                                          -  heap_size_limit: 1535115264
                                                                                          -}
                                                                                          -

                                                                                          getHeapStatistics()#

                                                                                          -

                                                                                          Returns an object with the following properties - -

                                                                                          -
                                                                                          {
                                                                                          -  total_heap_size: 7326976,
                                                                                          -  total_heap_size_executable: 4194304,
                                                                                          -  total_physical_size: 7326976,
                                                                                          -  used_heap_size: 3476208,
                                                                                          -  heap_size_limit: 1535115264
                                                                                          -}
                                                                                          -

                                                                                          Async Listeners#

                                                                                          -

                                                                                          The AsyncListener API is the JavaScript interface for the AsyncWrap -class which allows developers to be notified about key events in the -lifetime of an asynchronous event. Node performs a lot of asynchronous -events internally, and significant use of this API may have a -significant performance impact on your application. - - -

                                                                                          -

                                                                                          tracing.createAsyncListener(callbacksObj[, userData])#

                                                                                          -
                                                                                            -
                                                                                          • callbacksObj Object Contains optional callbacks that will fire at -specific times in the life cycle of the asynchronous event.
                                                                                          • -
                                                                                          • userData Value a value that will be passed to all callbacks.
                                                                                          • -
                                                                                        -

                                                                                        Returns a constructed AsyncListener object. - -

                                                                                        -

                                                                                        To begin capturing asynchronous events pass either the callbacksObj or -pass an existing AsyncListener instance to tracing.addAsyncListener(). -The same AsyncListener instance can only be added once to the active -queue, and subsequent attempts to add the instance will be ignored. - -

                                                                                        -

                                                                                        To stop capturing pass the AsyncListener instance to -tracing.removeAsyncListener(). This does not mean the -AsyncListener previously added will stop triggering callbacks. Once -attached to an asynchronous event it will persist with the lifetime of the -asynchronous call stack. - -

                                                                                        -

                                                                                        Explanation of function parameters: - - -

                                                                                        -

                                                                                        callbacksObj: An Object which may contain several optional fields: - -

                                                                                        -
                                                                                          -
                                                                                        • create(userData): A Function called when an asynchronous -event is instantiated. If a Value is returned then it will be attached -to the event and overwrite any value that had been passed to -tracing.createAsyncListener()'s userData argument. If an initial -userData was passed when created, then create() will -receive that as a function argument.

                                                                                          -
                                                                                        • -
                                                                                        • before(context, userData): A Function that is called immediately -before the asynchronous callback is about to run. It will be passed both -the context (i.e. this) of the calling function and the userData -either returned from create() or passed during construction (if -either occurred).

                                                                                          -
                                                                                        • -
                                                                                        • after(context, userData): A Function called immediately after -the asynchronous event's callback has run. Note this will not be called -if the callback throws and the error is not handled.

                                                                                          -
                                                                                        • -
                                                                                        • error(userData, error): A Function called if the event's -callback threw. If this registered callback returns true then Node will -assume the error has been properly handled and resume execution normally. -When multiple error() callbacks have been registered only one of -those callbacks needs to return true for AsyncListener to accept that -the error has been handled, but all error() callbacks will always be run.

                                                                                          -
                                                                                        • -
                                                                                        -

                                                                                        userData: A Value (i.e. anything) that will be, by default, -attached to all new event instances. This will be overwritten if a Value -is returned by create(). - -

                                                                                        -

                                                                                        Here is an example of overwriting the userData: - -

                                                                                        -
                                                                                        tracing.createAsyncListener({
                                                                                        -  create: function listener(value) {
                                                                                        -    // value === true
                                                                                        -    return false;
                                                                                        -}, {
                                                                                        -  before: function before(context, value) {
                                                                                        -    // value === false
                                                                                        -  }
                                                                                        -}, true);
                                                                                        -

                                                                                        Note: The EventEmitter, while used to emit status of an asynchronous -event, is not itself asynchronous. So create() will not fire when -an event is added, and before()/after() will not fire when emitted -callbacks are called. - - -

                                                                                        -

                                                                                        tracing.addAsyncListener(callbacksObj[, userData])#

                                                                                        -

                                                                                        tracing.addAsyncListener(asyncListener)#

                                                                                        -

                                                                                        Returns a constructed AsyncListener object and immediately adds it to -the listening queue to begin capturing asynchronous events. - -

                                                                                        -

                                                                                        Function parameters can either be the same as -tracing.createAsyncListener(), or a constructed AsyncListener -object. - -

                                                                                        -

                                                                                        Example usage for capturing errors: - -

                                                                                        -
                                                                                        var fs = require('fs');
                                                                                        -
                                                                                        -var cntr = 0;
                                                                                        -var key = tracing.addAsyncListener({
                                                                                        -  create: function onCreate() {
                                                                                        -    return { uid: cntr++ };
                                                                                        -  },
                                                                                        -  before: function onBefore(context, storage) {
                                                                                        -    // Write directly to stdout or we'll enter a recursive loop
                                                                                        -    fs.writeSync(1, 'uid: ' + storage.uid + ' is about to run\n');
                                                                                        -  },
                                                                                        -  after: function onAfter(context, storage) {
                                                                                        -    fs.writeSync(1, 'uid: ' + storage.uid + ' ran\n');
                                                                                        -  },
                                                                                        -  error: function onError(storage, err) {
                                                                                        -    // Handle known errors
                                                                                        -    if (err.message === 'everything is fine') {
                                                                                        -      // Writing to stderr this time.
                                                                                        -      fs.writeSync(2, 'handled error just threw:\n');
                                                                                        -      fs.writeSync(2, err.stack + '\n');
                                                                                        -      return true;
                                                                                        -    }
                                                                                        -  }
                                                                                        -});
                                                                                        -
                                                                                        -process.nextTick(function() {
                                                                                        -  throw new Error('everything is fine');
                                                                                        -});
                                                                                        -
                                                                                        -// Output:
                                                                                        -// uid: 0 is about to run
                                                                                        -// handled error just threw:
                                                                                        -// Error: really, it's ok
                                                                                        -//     at /tmp/test2.js:27:9
                                                                                        -//     at process._tickCallback (node.js:583:11)
                                                                                        -//     at Function.Module.runMain (module.js:492:11)
                                                                                        -//     at startup (node.js:123:16)
                                                                                        -//     at node.js:1012:3
                                                                                        -

                                                                                        tracing.removeAsyncListener(asyncListener)#

                                                                                        -

                                                                                        Removes the AsyncListener from the listening queue. - -

                                                                                        -

                                                                                        Removing the AsyncListener from the active queue does not mean the -asyncListener callbacks will cease to fire on the events they've been -registered. Subsequently, any asynchronous events fired during the -execution of a callback will also have the same asyncListener callbacks -attached for future execution. For example: - -

                                                                                        -
                                                                                        var fs = require('fs');
                                                                                        -
                                                                                        -var key = tracing.createAsyncListener({
                                                                                        -  create: function asyncListener() {
                                                                                        -    // Write directly to stdout or we'll enter a recursive loop
                                                                                        -    fs.writeSync(1, 'You summoned me?\n');
                                                                                        -  }
                                                                                        -});
                                                                                        -
                                                                                        -// We want to begin capturing async events some time in the future.
                                                                                        -setTimeout(function() {
                                                                                        -  tracing.addAsyncListener(key);
                                                                                        -
                                                                                        -  // Perform a few additional async events.
                                                                                        -  setTimeout(function() {
                                                                                        -    setImmediate(function() {
                                                                                        -      process.nextTick(function() { });
                                                                                        -    });
                                                                                        -  });
                                                                                        -
                                                                                        -  // Removing the listener doesn't mean to stop capturing events that
                                                                                        -  // have already been added.
                                                                                        -  tracing.removeAsyncListener(key);
                                                                                        -}, 100);
                                                                                        -
                                                                                        -// Output:
                                                                                        -// You summoned me?
                                                                                        -// You summoned me?
                                                                                        -// You summoned me?
                                                                                        -// You summoned me?
                                                                                        -

                                                                                        The fact that we logged 4 asynchronous events is an implementation detail -of Node's Timers. - -

                                                                                        -

                                                                                        To stop capturing from a specific asynchronous event stack -tracing.removeAsyncListener() must be called from within the call -stack itself. For example: - -

                                                                                        -
                                                                                        var fs = require('fs');
                                                                                        -
                                                                                        -var key = tracing.createAsyncListener({
                                                                                        -  create: function asyncListener() {
                                                                                        -    // Write directly to stdout or we'll enter a recursive loop
                                                                                        -    fs.writeSync(1, 'You summoned me?\n');
                                                                                        -  }
                                                                                        -});
                                                                                        -
                                                                                        -// We want to begin capturing async events some time in the future.
                                                                                        -setTimeout(function() {
                                                                                        -  tracing.addAsyncListener(key);
                                                                                        -
                                                                                        -  // Perform a few additional async events.
                                                                                        -  setImmediate(function() {
                                                                                        -    // Stop capturing from this call stack.
                                                                                        -    tracing.removeAsyncListener(key);
                                                                                        -
                                                                                        -    process.nextTick(function() { });
                                                                                        -  });
                                                                                        -}, 100);
                                                                                        -
                                                                                        -// Output:
                                                                                        -// You summoned me?
                                                                                        -

                                                                                        The user must be explicit and always pass the AsyncListener they wish -to remove. It is not possible to simply remove all listeners at once. - - -

                                                                                  +
                                                                              + +
                                                                          - - + + + - -
                                                                          - - - + + +
                                                                          - - +
                                                                          -

                                                                          Node.js v0.11.14 Manual & Documentation

                                                                          +

                                                                          Node.js v0.11.15 Manual & Documentation

                                                                          Index | @@ -47,15 +52,15 @@

                                                                          +
                                                                          + +
                                                                        - - + + + - -
                                                                        - - - + + +
                                                                        - - +
                                                                        -

                                                                        Node.js v0.11.14 Manual & Documentation

                                                                        +

                                                                        Node.js v0.11.15 Manual & Documentation

                                                                        Index | @@ -49,50 +54,59 @@

                                                                      • Class: Buffer
                                                                      • buffer.INSPECT_MAX_BYTES
                                                                      • @@ -188,7 +202,14 @@

                                                                        Allocates a new buffer using an array of octets.

                                                                        -

                                                                        new Buffer(str, [encoding])#

                                                                        +

                                                                        new Buffer(buffer)#

                                                                        +
                                                                          +
                                                                        • buffer Buffer
                                                                        • +
                                                                      +

                                                                      Copies the passed buffer data onto a new Buffer instance. + +

                                                                      +

                                                                      new Buffer(str[, encoding])#

                                                                      • str String - string to encode.
                                                                      • encoding String - encoding to use, Optional.
                                                                      • @@ -213,7 +234,7 @@

                                                                        Tests if obj is a Buffer.

                                                                        -

                                                                        Class Method: Buffer.byteLength(string, [encoding])#

                                                                        +

                                                                        Class Method: Buffer.byteLength(string[, encoding])#

                                                                        • string String
                                                                        • encoding String, Optional, Default: 'utf8'
                                                                        • @@ -233,7 +254,7 @@ Buffer.byteLength(str, 'utf8') + " bytes"); // ½ + ¼ = ¾: 9 characters, 12 bytes -

                                                                          Class Method: Buffer.concat(list, [totalLength])#

                                                                          +

                                                                          Class Method: Buffer.concat(list[, totalLength])#

                                                                          • list Array List of Buffer objects to concat
                                                                          • totalLength Number Total length of the buffers when concatenated
                                                                          • @@ -286,7 +307,18 @@ // 1234 // 1234 -

                                                                            buf.write(string, [offset], [length], [encoding])#

                                                                            +

                                                                            While the length property is not immutable, changing the value of length +can result in undefined and inconsistent behavior. Applications that wish to +modify the length of a buffer should therefore treat length as read-only and +use buf.slice to create a new buffer. + +

                                                                            +
                                                                            buf = new Buffer(10);
                                                                            +buf.write("abcdefghj", 0, "ascii");
                                                                            +console.log(buf.length); // 10
                                                                            +buf = buf.slice(0,5);
                                                                            +console.log(buf.length); // 5
                                                                            +

                                                                            buf.write(string[, offset][, length][, encoding])#

                                                                            • string String - data to be written to buffer
                                                                            • offset Number, Optional, Default: 0
                                                                            • @@ -304,17 +336,71 @@
                                                                              buf = new Buffer(256);
                                                                               len = buf.write('\u00bd + \u00bc = \u00be', 0);
                                                                               console.log(len + " bytes: " + buf.toString('utf8', 0, len));
                                                                              -

                                                                              buf.toString([encoding], [start], [end])#

                                                                              +

                                                                              buf.writeUIntLE(value, offset, byteLength[, noAssert])#

                                                                              +

                                                                              buf.writeUIntBE(value, offset, byteLength[, noAssert])#

                                                                              +

                                                                              buf.writeIntLE(value, offset, byteLength[, noAssert])#

                                                                              +

                                                                              buf.writeIntBE(value, offset, byteLength[, noAssert])#

                                                                              +
                                                                                +
                                                                              • value {Number} Bytes to be written to buffer
                                                                              • +
                                                                              • offset {Number} 0 <= offset <= buf.length
                                                                              • +
                                                                              • byteLength {Number} 0 < byteLength <= 6
                                                                              • +
                                                                              • noAssert {Boolean} Default: false
                                                                              • +
                                                                              • Return: {Number}
                                                                              • +
                                                                              +

                                                                              Writes value to the buffer at the specified offset and byteLength. +Supports up to 48 bits of accuracy. For example: + +

                                                                              +
                                                                              var b = new Buffer(6);
                                                                              +b.writeUIntBE(0x1234567890ab, 0, 6);
                                                                              +// <Buffer 12 34 56 78 90 ab>
                                                                              +

                                                                              Set noAssert to true to skip validation of value and offset. Defaults +to false. + +

                                                                              +

                                                                              buf.readUIntLE(offset, byteLength[, noAssert])#

                                                                              +

                                                                              buf.readUIntBE(offset, byteLength[, noAssert])#

                                                                              +

                                                                              buf.readIntLE(offset, byteLength[, noAssert])#

                                                                              +

                                                                              buf.readIntBE(offset, byteLength[, noAssert])#

                                                                              +
                                                                                +
                                                                              • offset {Number} 0 <= offset <= buf.length
                                                                              • +
                                                                              • byteLength {Number} 0 < byteLength <= 6
                                                                              • +
                                                                              • noAssert {Boolean} Default: false
                                                                              • +
                                                                              • Return: {Number}
                                                                              • +
                                                                              +

                                                                              A generalized version of all numeric read methods. Supports up to 48 bits of +accuracy. For example: + +

                                                                              +
                                                                              var b = new Buffer(6);
                                                                              +b.writeUint16LE(0x90ab, 0);
                                                                              +b.writeUInt32LE(0x12345678, 2);
                                                                              +b.readUIntLE(0, 6).toString(16);  // Specify 6 bytes (48 bits)
                                                                              +// output: '1234567890ab'
                                                                              +

                                                                              Set noAssert to true to skip validation of offset. This means that offset +may be beyond the end of the buffer. Defaults to false. + +

                                                                              +

                                                                              buf.toString([encoding][, start][, end])#

                                                                              • encoding String, Optional, Default: 'utf8'
                                                                              • start Number, Optional, Default: 0
                                                                              • end Number, Optional, Default: buffer.length
                                                                            -

                                                                            Decodes and returns a string from buffer data encoded with encoding -(defaults to 'utf8') beginning at start (defaults to 0) and ending at -end (defaults to buffer.length). +

                                                                            Decodes and returns a string from buffer data encoded using the specified +character set encoding. If encoding is undefined or null, then encoding +defaults to 'utf8'. The start and end parameters default to 0 and +buffer.length when undefined`.

                                                                            +
                                                                            buf = new Buffer(26);
                                                                            +for (var i = 0 ; i < 26 ; i++) {
                                                                            +  buf[i] = i + 97; // 97 is ASCII a
                                                                            +}
                                                                            +buf.toString('ascii'); // outputs: abcdefghijklmnopqrstuvwxyz
                                                                            +buf.toString('ascii',0,5); // outputs: abcde
                                                                            +buf.toString('utf8',0,5); // outputs: abcde
                                                                            +buf.toString(undefined,0,5); // encoding defaults to 'utf8', outputs abcde

                                                                            See buffer.write() example, above. @@ -377,22 +463,18 @@

                                                                            Returns a number indicating whether this comes before or after or is the same as the otherBuffer in sort order. -

                                                                            -

                                                                            buf.copy(targetBuffer, [targetStart], [sourceStart], [sourceEnd])#

                                                                            +

                                                                            buf.copy(targetBuffer[, targetStart][, sourceStart][, sourceEnd])#

                                                                            • targetBuffer Buffer object - Buffer to copy into
                                                                            • targetStart Number, Optional, Default: 0
                                                                            • sourceStart Number, Optional, Default: 0
                                                                            • sourceEnd Number, Optional, Default: buffer.length
                                                                          -

                                                                          Does copy between buffers. The source and target regions can be overlapped. -targetStart and sourceStart default to 0. -sourceEnd defaults to buffer.length. - -

                                                                          -

                                                                          All values passed that are undefined/NaN or are out of bounds are set equal -to their respective defaults. +

                                                                          Copies data from a region of this buffer to a region in the target buffer even +if the target memory region overlaps with the source. If undefined the +targetStart and sourceStart parameters default to 0 while sourceEnd +defaults to buffer.length.

                                                                          Example: build two Buffers, then copy buf1 from byte 16 through byte 19 @@ -411,7 +493,21 @@ console.log(buf2.toString('ascii', 0, 25)); // !!!!!!!!qrst!!!!!!!!!!!!! -

                                                                          buf.slice([start], [end])#

                                                                          +

                                                                          Example: Build a single buffer, then copy data from one region to an overlapping +region in the same buffer + +

                                                                          +
                                                                          buf = new Buffer(26);
                                                                          +
                                                                          +for (var i = 0 ; i < 26 ; i++) {
                                                                          +  buf[i] = i + 97; // 97 is ASCII a
                                                                          +}
                                                                          +
                                                                          +buf.copy(buf, 0, 4, 10);
                                                                          +console.log(buf.toString());
                                                                          +
                                                                          +// efghijghijklmnopqrstuvwxyz
                                                                          +

                                                                          buf.slice([start][, end])#

                                                                          • start Number, Optional, Default: 0
                                                                          • end Number, Optional, Default: buffer.length
                                                                          • @@ -441,7 +537,7 @@ // abc // !bc -

                                                                            buf.readUInt8(offset, [noAssert])#

                                                                            +

                                                                            buf.readUInt8(offset[, noAssert])#

                                                                            • offset Number
                                                                            • noAssert Boolean, Optional, Default: false
                                                                            • @@ -472,8 +568,8 @@ // 0x4 // 0x23 // 0x42 -

                                                                              buf.readUInt16LE(offset, [noAssert])#

                                                                              -

                                                                              buf.readUInt16BE(offset, [noAssert])#

                                                                              +

                                                                              buf.readUInt16LE(offset[, noAssert])#

                                                                              +

                                                                              buf.readUInt16BE(offset[, noAssert])#

                                                                              • offset Number
                                                                              • noAssert Boolean, Optional, Default: false
                                                                              • @@ -510,8 +606,8 @@ // 0x2304 // 0x2342 // 0x4223 -

                                                                                buf.readUInt32LE(offset, [noAssert])#

                                                                                -

                                                                                buf.readUInt32BE(offset, [noAssert])#

                                                                                +

                                                                                buf.readUInt32LE(offset[, noAssert])#

                                                                                +

                                                                                buf.readUInt32BE(offset[, noAssert])#

                                                                                • offset Number
                                                                                • noAssert Boolean, Optional, Default: false
                                                                                • @@ -540,7 +636,7 @@ // 0x03042342 // 0x42230403 -

                                                                                  buf.readInt8(offset, [noAssert])#

                                                                                  +

                                                                                  buf.readInt8(offset[, noAssert])#

                                                                                  • offset Number
                                                                                  • noAssert Boolean, Optional, Default: false
                                                                                  • @@ -557,8 +653,8 @@ complement signed values.

                                                                                    -

                                                                                    buf.readInt16LE(offset, [noAssert])#

                                                                                    -

                                                                                    buf.readInt16BE(offset, [noAssert])#

                                                                                    +

                                                                                    buf.readInt16LE(offset[, noAssert])#

                                                                                    +

                                                                                    buf.readInt16BE(offset[, noAssert])#

                                                                                    • offset Number
                                                                                    • noAssert Boolean, Optional, Default: false
                                                                                    • @@ -576,8 +672,8 @@ complement signed values.

                                                                                      -

                                                                                      buf.readInt32LE(offset, [noAssert])#

                                                                                      -

                                                                                      buf.readInt32BE(offset, [noAssert])#

                                                                                      +

                                                                                      buf.readInt32LE(offset[, noAssert])#

                                                                                      +

                                                                                      buf.readInt32BE(offset[, noAssert])#

                                                                                      • offset Number
                                                                                      • noAssert Boolean, Optional, Default: false
                                                                                      • @@ -595,8 +691,8 @@ complement signed values.

                                                                                        -

                                                                                        buf.readFloatLE(offset, [noAssert])#

                                                                                        -

                                                                                        buf.readFloatBE(offset, [noAssert])#

                                                                                        +

                                                                                        buf.readFloatLE(offset[, noAssert])#

                                                                                        +

                                                                                        buf.readFloatBE(offset[, noAssert])#

                                                                                        • offset Number
                                                                                        • noAssert Boolean, Optional, Default: false
                                                                                        • @@ -623,8 +719,8 @@ console.log(buf.readFloatLE(0)); // 0x01 -

                                                                                          buf.readDoubleLE(offset, [noAssert])#

                                                                                          -

                                                                                          buf.readDoubleBE(offset, [noAssert])#

                                                                                          +

                                                                                          buf.readDoubleLE(offset[, noAssert])#

                                                                                          +

                                                                                          buf.readDoubleBE(offset[, noAssert])#

                                                                                          • offset Number
                                                                                          • noAssert Boolean, Optional, Default: false
                                                                                          • @@ -655,7 +751,7 @@ console.log(buf.readDoubleLE(0)); // 0.3333333333333333 -

                                                                                            buf.writeUInt8(value, offset, [noAssert])#

                                                                                            +

                                                                                            buf.writeUInt8(value, offset[, noAssert])#

                                                                                            • value Number
                                                                                            • offset Number
                                                                                            • @@ -683,8 +779,8 @@ console.log(buf); // <Buffer 03 04 23 42> -

                                                                                              buf.writeUInt16LE(value, offset, [noAssert])#

                                                                                              -

                                                                                              buf.writeUInt16BE(value, offset, [noAssert])#

                                                                                              +

                                                                                              buf.writeUInt16LE(value, offset[, noAssert])#

                                                                                              +

                                                                                              buf.writeUInt16BE(value, offset[, noAssert])#

                                                                                              • value Number
                                                                                              • offset Number
                                                                                              • @@ -716,8 +812,8 @@ // <Buffer de ad be ef> // <Buffer ad de ef be> -

                                                                                                buf.writeUInt32LE(value, offset, [noAssert])#

                                                                                                -

                                                                                                buf.writeUInt32BE(value, offset, [noAssert])#

                                                                                                +

                                                                                                buf.writeUInt32LE(value, offset[, noAssert])#

                                                                                                +

                                                                                                buf.writeUInt32BE(value, offset[, noAssert])#

                                                                                                • value Number
                                                                                                • offset Number
                                                                                                • @@ -747,7 +843,7 @@ // <Buffer fe ed fa ce> // <Buffer ce fa ed fe> -

                                                                                                  buf.writeInt8(value, offset, [noAssert])#

                                                                                                  +

                                                                                                  buf.writeInt8(value, offset[, noAssert])#

                                                                                                  • value Number
                                                                                                  • offset Number
                                                                                                  • @@ -767,8 +863,8 @@ signed integer into buffer.

                                                                                                    -

                                                                                                    buf.writeInt16LE(value, offset, [noAssert])#

                                                                                                    -

                                                                                                    buf.writeInt16BE(value, offset, [noAssert])#

                                                                                                    +

                                                                                                    buf.writeInt16LE(value, offset[, noAssert])#

                                                                                                    +

                                                                                                    buf.writeInt16BE(value, offset[, noAssert])#

                                                                                                    • value Number
                                                                                                    • offset Number
                                                                                                    • @@ -788,8 +884,8 @@ complement signed integer into buffer.

                                                                                                      -

                                                                                                      buf.writeInt32LE(value, offset, [noAssert])#

                                                                                                      -

                                                                                                      buf.writeInt32BE(value, offset, [noAssert])#

                                                                                                      +

                                                                                                      buf.writeInt32LE(value, offset[, noAssert])#

                                                                                                      +

                                                                                                      buf.writeInt32BE(value, offset[, noAssert])#

                                                                                                      • value Number
                                                                                                      • offset Number
                                                                                                      • @@ -809,8 +905,8 @@ complement signed integer into buffer.

                                                                                                        -

                                                                                                        buf.writeFloatLE(value, offset, [noAssert])#

                                                                                                        -

                                                                                                        buf.writeFloatBE(value, offset, [noAssert])#

                                                                                                        +

                                                                                                        buf.writeFloatLE(value, offset[, noAssert])#

                                                                                                        +

                                                                                                        buf.writeFloatBE(value, offset[, noAssert])#

                                                                                                        • value Number
                                                                                                        • offset Number
                                                                                                        • @@ -840,8 +936,8 @@ // <Buffer 4f 4a fe bb> // <Buffer bb fe 4a 4f> -

                                                                                                          buf.writeDoubleLE(value, offset, [noAssert])#

                                                                                                          -

                                                                                                          buf.writeDoubleBE(value, offset, [noAssert])#

                                                                                                          +

                                                                                                          buf.writeDoubleLE(value, offset[, noAssert])#

                                                                                                          +

                                                                                                          buf.writeDoubleBE(value, offset[, noAssert])#

                                                                                                          • value Number
                                                                                                          • offset Number
                                                                                                          • @@ -871,7 +967,7 @@ // <Buffer 43 eb d5 b7 dd f9 5f d7> // <Buffer d7 5f f9 dd b7 d5 eb 43> -

                                                                                                            buf.fill(value, [offset], [end])#

                                                                                                            +

                                                                                                            buf.fill(value[, offset][, end])#

                                                                                                            • value
                                                                                                            • offset Number, Optional
                                                                                                            • @@ -929,26 +1025,48 @@
                                                                                            +
                                                                                  + +
                                                                          - - + + + - -
                                                                        @@ -196,13 +205,18 @@
                                                                      • Stream object

                                                                      A Writable Stream that represents the child process's stdin. -Closing this stream via end() often causes the child process to terminate. +If the child is waiting to read all its input, it will not continue until this +stream has been closed via end().

                                                                      -

                                                                      If the child stdio streams are shared with the parent, then this will +

                                                                      If the child was not spawned with stdio[0] set to 'pipe', then this will not be set.

                                                                      +

                                                                      child.stdin is shorthand for child.stdio[0]. Both properties will refer +to the same object, or null. + +

                                                                      child.stdout#

                                                                      • Stream object
                                                                      • @@ -210,10 +224,14 @@

                                                                        A Readable Stream that represents the child process's stdout.

                                                                        -

                                                                        If the child stdio streams are shared with the parent, then this will +

                                                                        If the child was not spawned with stdio[1] set to 'pipe', then this will not be set.

                                                                        +

                                                                        child.stdout is shorthand for child.stdio[1]. Both properties will refer +to the same object, or null. + +

                                                                        child.stderr#

                                                                        • Stream object
                                                                        • @@ -221,10 +239,47 @@

                                                                          A Readable Stream that represents the child process's stderr.

                                                                          -

                                                                          If the child stdio streams are shared with the parent, then this will +

                                                                          If the child was not spawned with stdio[2] set to 'pipe', then this will not be set.

                                                                          +

                                                                          child.stderr is shorthand for child.stdio[2]. Both properties will refer +to the same object, or null. + +

                                                                          +

                                                                          child.stdio#

                                                                          +
                                                                            +
                                                                          • Array
                                                                          • +
                                                                        +

                                                                        A sparse array of pipes to the child process, corresponding with positions in +the stdio option to +spawn that have been +set to 'pipe'. +Note that streams 0-2 are also available as ChildProcess.stdin, +ChildProcess.stdout, and ChildProcess.stderr, respectively. + +

                                                                        +

                                                                        In the following example, only the child's fd 1 is setup as a pipe, so only +the parent's child.stdio[1] is a stream, all other values in the array are +null. + +

                                                                        +
                                                                        child = child_process.spawn("ls", {
                                                                        +    stdio: [
                                                                        +      0, // use parents stdin for child
                                                                        +      'pipe', // pipe child's stdout to parent
                                                                        +      fs.openSync("err.out", "w") // direct child's stderr to a file
                                                                        +    ]
                                                                        +});
                                                                        +
                                                                        +assert.equal(child.stdio[0], null);
                                                                        +assert.equal(child.stdio[0], child.stdin);
                                                                        +
                                                                        +assert(child.stdout);
                                                                        +assert.equal(child.stdio[1], child.stdout);
                                                                        +
                                                                        +assert.equal(child.stdio[2], null);
                                                                        +assert.equal(child.stdio[2], child.stderr);

                                                                        child.pid#

                                                                        • Integer
                                                                        • @@ -279,7 +334,7 @@

                                                                          See kill(2)

                                                                          -

                                                                          child.send(message, [sendHandle])#

                                                                          +

                                                                          child.send(message[, sendHandle])#

                                                                          • message Object
                                                                          • sendHandle Handle object
                                                                          • @@ -424,15 +479,19 @@ callback or returning an EventEmitter).

                                                                            -

                                                                            child_process.spawn(command, [args], [options])#

                                                                            +

                                                                            child_process.spawn(command[, args][, options])#

                                                                            • command String The command to run
                                                                            • args Array List of string arguments
                                                                            • options Object
                                                                              • cwd String Current working directory of the child process
                                                                              • -
                                                                              • stdio Array|String Child's stdio configuration. (See below)
                                                                              • env Object Environment key-value pairs
                                                                              • -
                                                                              • detached Boolean The child will be a process group leader. (See below)
                                                                              • +
                                                                              • stdio Array|String Child's stdio configuration. (See +below)
                                                                              • +
                                                                              • customFds Array Deprecated File descriptors for the child to use +for stdio. (See below)
                                                                              • +
                                                                              • detached Boolean The child will be a process group leader. (See +below)
                                                                              • uid Number Sets the user identity of the process. (See setuid(2).)
                                                                              • gid Number Sets the group identity of the process. (See setgid(2).)
                                                                              @@ -449,8 +508,12 @@
                                                                              { cwd: undefined,
                                                                                 env: process.env
                                                                               }
                                                                              -

                                                                              cwd allows you to specify the working directory from which the process is spawned. -Use env to specify environment variables that will be visible to the new process. +

                                                                              Use cwd to specify the working directory from which the process is spawned. +If not given, the default is to inherit the current working directory. + +

                                                                              +

                                                                              Use env to specify environment variables that will be visible to the new +process, the default is process.env.

                                                                              Example of running ls -lh /usr, capturing stdout, stderr, and the exit code: @@ -505,16 +568,17 @@ console.log('grep process exited with code ' + code); } }); -

                                                                              Example of checking for failed exec: +

                                                                              options.stdio#

                                                                              +

                                                                              As a shorthand, the stdio argument may also be one of the following +strings:

                                                                              -
                                                                              var spawn = require('child_process').spawn,
                                                                              -    child = spawn('bad_command');
                                                                              -
                                                                              -child.on('error', function (err) {
                                                                              -  console.log('Failed to start child process.');
                                                                              -});
                                                                              -

                                                                              The 'stdio' option to child_process.spawn() is an array where each +

                                                                                +
                                                                              • 'pipe' - ['pipe', 'pipe', 'pipe'], this is the default value
                                                                              • +
                                                                              • 'ignore' - ['ignore', 'ignore', 'ignore']
                                                                              • +
                                                                              • 'inherit' - [process.stdin, process.stdout, process.stderr] or [0,1,2]
                                                                              • +
                                                                              +

                                                                              Otherwise, the 'stdio' option to child_process.spawn() is an array where each index corresponds to a fd in the child. The value is one of the following:

                                                                              @@ -547,15 +611,6 @@ words, stdin, stdout, and stderr) a pipe is created. For fd 3 and up, the default is 'ignore'.
                                                                            • -

                                                                              As a shorthand, the stdio argument may also be one of the following -strings, rather than an array: - -

                                                                              -
                                                                                -
                                                                              • ignore - ['ignore', 'ignore', 'ignore']
                                                                              • -
                                                                              • pipe - ['pipe', 'pipe', 'pipe']
                                                                              • -
                                                                              • inherit - [process.stdin, process.stdout, process.stderr] or [0,1,2]
                                                                              • -

                                                                              Example:

                                                                              @@ -570,6 +625,7 @@ // Open an extra fd=4, to interact with programs present a // startd-style interface. spawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] }); +

                                                                              options.detached#

                                                                              If the detached option is set, the child process will be made the leader of a new process group. This makes it possible for the child to continue running after the parent exits. @@ -601,10 +657,19 @@ inherited, the child will remain attached to the controlling terminal.

                                                                              +

                                                                              options.customFds#

                                                                              +

                                                                              There is a deprecated option called customFds which allows one to specify +specific file descriptors for the stdio of the child process. This API was +not portable to all platforms and therefore removed. +With customFds it was possible to hook up the new process' [stdin, stdout, +stderr] to existing streams; -1 meant that a new stream should be created. +Use at your own risk. + +

                                                                              See also: child_process.exec() and child_process.fork()

                                                                              -

                                                                              child_process.exec(command, [options], callback)#

                                                                              +

                                                                              child_process.exec(command[, options], callback)#

                                                                              • command String The command to run, with space-separated arguments
                                                                              • options Object
                                                                                  @@ -668,7 +733,7 @@

                                                                                  -

                                                                                  child_process.execFile(file, [args], [options], [callback])#

                                                                                  +

                                                                                  child_process.execFile(file[, args][, options][, callback])#

                                                                              - - + + + - -
                                                                              - - - + + +
                                                                              - - +
                                                                              -

                                                                              Node.js v0.11.14 Manual & Documentation

                                                                              +

                                                                              Node.js v0.11.15 Manual & Documentation

                                                                              Index | @@ -66,7 +71,7 @@

                                                                            • worker.id
                                                                            • worker.process
                                                                            • worker.suicide
                                                                            • -
                                                                            • worker.send(message, [sendHandle])
                                                                            • +
                                                                            • worker.send(message[, sendHandle])
                                                                            • worker.kill([signal='SIGTERM'])
                                                                            • worker.disconnect()
                                                                            • worker.isDead()
                                                                            • @@ -547,7 +552,7 @@ // kill worker worker.kill(); -

                                                                              worker.send(message, [sendHandle])#

                                                                              +

                                                                              worker.send(message[, sendHandle])#

                                                                              • message Object
                                                                              • sendHandle Handle object
                                                                              • @@ -779,26 +784,48 @@
                                                                              +
                                                                              + +
                                                                              - - + + + - -
                                                                              - - - + + +
                                                                              - - +
                                                                              -

                                                                              Node.js v0.11.14 Manual & Documentation

                                                                              +

                                                                              Node.js v0.11.15 Manual & Documentation

                                                                              Index | @@ -46,15 +51,15 @@

                                                                              Table of Contents

                                                                              @@ -87,7 +92,7 @@

                                                                              -

                                                                              console.log([data], [...])#

                                                                              +

                                                                              console.log([data][, ...])#

                                                                              Prints to stdout with newline. This function can take multiple arguments in a printf()-like way. Example: @@ -99,19 +104,19 @@ is used on each argument. See util.format() for more information.

                                                                              -

                                                                              console.info([data], [...])#

                                                                              +

                                                                              console.info([data][, ...])#

                                                                              Same as console.log.

                                                                              -

                                                                              console.error([data], [...])#

                                                                              +

                                                                              console.error([data][, ...])#

                                                                              Same as console.log but prints to stderr.

                                                                              -

                                                                              console.warn([data], [...])#

                                                                              +

                                                                              console.warn([data][, ...])#

                                                                              Same as console.error.

                                                                              -

                                                                              console.dir(obj, [options])#

                                                                              +

                                                                              console.dir(obj[, options])#

                                                                              Uses util.inspect on obj and prints resulting string to stdout. This function bypasses any custom inspect() function on obj. An optional options object may be passed that alters certain aspects of the formatted string: @@ -143,12 +148,12 @@ } console.timeEnd('100-elements'); // prints 100-elements: 262ms -

                                                                              console.trace(message, [...])#

                                                                              +

                                                                              console.trace(message[, ...])#

                                                                              Print to stderr 'Trace :', followed by the formatted message and stack trace to the current position.

                                                                              -

                                                                              console.assert(value, [message], [...])#

                                                                              +

                                                                              console.assert(value[, message][, ...])#

                                                                              Similar to assert.ok(), but the error message is formatted as util.format(message...). @@ -157,26 +162,48 @@

                                                                              +
                                                                              + +
                                                                            - - + + + - -
                                                                            - - - + + +
                                                                            - - +
                                                                            -

                                                                            Node.js v0.11.14 Manual & Documentation

                                                                            +

                                                                            Node.js v0.11.15 Manual & Documentation

                                                                            Index | @@ -46,13 +51,13 @@

                                                                            Table of Contents

                                                                            +
                                                                            + +
                                                                          - - + + + - -
                                                                          - - - + + +
                                                                          - - +
                                                                          -

                                                                          Node.js v0.11.14 Manual & Documentation

                                                                          +

                                                                          Node.js v0.11.15 Manual & Documentation

                                                                          Index | @@ -237,26 +242,48 @@

                                                                          +
                                                                          + +
                                                                        - - + + + - -
                                                                        - - - + + +
                                                                        - - +
                                                                        -

                                                                        Node.js v0.11.14 Manual & Documentation

                                                                        +

                                                                        Node.js v0.11.15 Manual & Documentation

                                                                        Index | @@ -46,24 +51,24 @@

                                                                        Table of Contents

                                                                        - - + + + - -
                                                                        - - - + + +
                                                                        - - +
                                                                        -

                                                                        Node.js v0.11.14 Manual & Documentation

                                                                        +

                                                                        Node.js v0.11.15 Manual & Documentation

                                                                        Index | @@ -46,11 +51,11 @@

                                                                        Table of Contents

                                                                        @@ -72,13 +82,35 @@

                                                                        DNS#

                                                                        -
                                                                        Stability: 3 - Stable

                                                                        Use require('dns') to access this module. All methods in the dns module -use C-Ares except for dns.lookup which uses getaddrinfo(3) in a thread -pool. C-Ares is much faster than getaddrinfo but the system resolver is -more consistent with how other programs operate. When a user does -net.connect(80, 'google.com') or http.get({ host: 'google.com' }) the -dns.lookup method is used. Users who need to do a large number of lookups -quickly should use the methods that go through C-Ares. +

                                                                        Stability: 3 - Stable

                                                                        Use require('dns') to access this module. + +

                                                                        +

                                                                        This module contains functions that belong to two different categories: + +

                                                                        +

                                                                        1) Functions that use the underlying operating system facilities to perform +name resolution, and that do not necessarily do any network communication. +This category contains only one function: dns.lookup. Developers looking +to perform name resolution in the same way that other applications on the same +operating system behave should use dns.lookup. + +

                                                                        +

                                                                        Here is an example that does a lookup of www.google.com. + +

                                                                        +
                                                                        var dns = require('dns');
                                                                        +
                                                                        +dns.lookup('www.google.com', function onLookup(err, addresses, family) {
                                                                        +  console.log('addresses:', addresses);
                                                                        +});
                                                                        +

                                                                        2) Functions that connect to an actual DNS server to perform name resolution, +and that always use the network to perform DNS queries. This category +contains all functions in the dns module but dns.lookup. These functions +do not use the same set of configuration files than what dns.lookup uses. +For instance, they do not use the configuration from /etc/hosts. These +functions should be used by developers who do not want to use the underlying +operating system's facilities for name resolution, and instead want to +always perform DNS queries.

                                                                        Here is an example which resolves 'www.google.com' then reverse @@ -102,7 +134,12 @@ }); }); }); -

                                                                        dns.lookup(hostname, [options], callback)#

                                                                        +

                                                                        There are subtle consequences in choosing one or another, please consult the +Implementation considerations section +for more information. + +

                                                                        +

                                                                        dns.lookup(hostname[, options], callback)#

                                                                        Resolves a hostname (e.g. 'google.com') into the first found A (IPv4) or AAAA (IPv6) record. options can be an object or integer. If options is not provided, then IP v4 and v6 addresses are both valid. If options is @@ -138,6 +175,15 @@ the hostname does not exist but also when the lookup fails in other ways such as no available file descriptors. +

                                                                        +

                                                                        dns.lookup doesn't necessarily have anything to do with the DNS protocol. +It's only an operating system facility that can associate name with addresses, +and vice versa. + +

                                                                        +

                                                                        Its implementation can have subtle but important consequences on the behavior +of any Node.js program. Please take some time to consult the Implementation +considerations section before using it.

                                                                        dns.lookupService(address, port, callback)#

                                                                        @@ -153,7 +199,7 @@

                                                                        -

                                                                        dns.resolve(hostname, [rrtype], callback)#

                                                                        +

                                                                        dns.resolve(hostname[, rrtype], callback)#

                                                                        Resolves a hostname (e.g. 'google.com') into an array of the record types specified by rrtype. @@ -315,30 +361,96 @@

                                                                      • dns.V4MAPPED: If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses.
                                                                      +

                                                                      Implementation considerations#

                                                                      +

                                                                      Although dns.lookup and dns.resolve*/dns.reverse functions have the same +goal of associating a network name with a network address (or vice versa), +their behavior is quite different. These differences can have subtle but +significant consequences on the behavior of Node.js programs. + +

                                                                      +

                                                                      dns.lookup#

                                                                      +

                                                                      Under the hood, dns.lookup uses the same operating system facilities as most +other programs. For instance, dns.lookup will almost always resolve a given +name the same way as the ping command. On most POSIX-like operating systems, +the behavior of the dns.lookup function can be tweaked by changing settings +in nsswitch.conf(5) and/or resolv.conf(5), but be careful that changing +these files will change the behavior of all other programs running on the same +operating system. + +

                                                                      +

                                                                      Though the call will be asynchronous from JavaScript's perspective, it is +implemented as a synchronous call to getaddrinfo(3) that runs on libuv's +threadpool. Because libuv's threadpool has a fixed size, it means that if for +whatever reason the call to getaddrinfo(3) takes a long time, other +operations that could run on libuv's threadpool (such as filesystem +operations) will experience degraded performance. In order to mitigate this +issue, one potential solution is to increase the size of libuv's threadpool by +setting the 'UV_THREADPOOL_SIZE' environment variable to a value greater than +4 (its current default value). For more information on libuv's threadpool, see +the official libuv +documentation. + +

                                                                      +

                                                                      dns.resolve, functions starting with dns.resolve and dns.reverse#

                                                                      +

                                                                      These functions are implemented quite differently than dns.lookup. They do +not use getaddrinfo(3) and they always perform a DNS query on the network. +This network communication is always done asynchronously, and does not use +libuv's threadpool. + +

                                                                      +

                                                                      As a result, these functions cannot have the same negative impact on other +processing that happens on libuv's threadpool that dns.lookup can have. + +

                                                                      +

                                                                      They do not use the same set of configuration files than what dns.lookup +uses. For instance, they do not use the configuration from /etc/hosts. +

                                                                      +
                                                                    + +
                                                                - - + + + - -
                                                                - - - + + +
                                                                - - +
                                                                -

                                                                Node.js v0.11.14 Manual & Documentation

                                                                +

                                                                Node.js v0.11.15 Manual & Documentation

                                                                Index | @@ -120,26 +125,48 @@

                                                                +
                                                                + +
                                                                - - + + + - -
                                                                - - - + + +
                                                                - - +
                                                                -

                                                                Node.js v0.11.14 Manual & Documentation

                                                                +

                                                                Node.js v0.11.15 Manual & Documentation

                                                                Index | @@ -522,26 +527,48 @@

                                                                +
                                                                + +
                                                              - - + + + - -
                                                              - - - + + +
                                                              - - +
                                                              -

                                                              Node.js v0.11.14 Manual & Documentation

                                                              +

                                                              Node.js v0.11.15 Manual & Documentation

                                                              Index | @@ -55,7 +60,7 @@

                                                            • emitter.setMaxListeners(n)
                                                            • EventEmitter.defaultMaxListeners
                                                            • emitter.listeners(event)
                                                            • -
                                                            • emitter.emit(event, [arg1], [arg2], [...])
                                                            • +
                                                            • emitter.emit(event[, arg1][, arg2][, ...])
                                                            • Class Method: EventEmitter.listenerCount(emitter, event)
                                                            • Event: 'newListener'
                                                            • Event: 'removeListener'
                                                            • @@ -104,7 +109,10 @@

                                                              emitter.addListener(event, listener)#

                                                              emitter.on(event, listener)#

                                                              -

                                                              Adds a listener to the end of the listeners array for the specified event. +

                                                              Adds a listener to the end of the listeners array for the specified event. +No checks are made to see if the listener has already been added. Multiple +calls passing the same combination of event and listener will result in the +listener being added multiple times.

                                                              server.on('connection', function (stream) {
                                                              @@ -136,6 +144,12 @@
                                                               server.on('connection', callback);
                                                               // ...
                                                               server.removeListener('connection', callback);
                                                              +

                                                              removeListener will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified event, then removeListener must be called +multiple times to remove each instance. + +

                                                              Returns emitter, so calls can be chained.

                                                              @@ -177,7 +191,7 @@ console.log('someone connected!'); }); console.log(util.inspect(server.listeners('connection'))); // [ [Function] ] -

                                                              emitter.emit(event, [arg1], [arg2], [...])#

                                                              +

                                                              emitter.emit(event[, arg1][, arg2][, ...])#

                                                              Execute each of the listeners in order with the supplied arguments.

                                                              @@ -195,8 +209,8 @@
                                                            • event String The event name
                                                            • listener Function The event handler function
                                                            -

                                                            This event is emitted any time someone adds a new listener. It is unspecified -if listener is in the list returned by emitter.listeners(event). +

                                                            This event is emitted any time a listener is added. When this event is triggered, +the listener may not yet have been added to the array of listeners for the event.

                                                            @@ -205,33 +219,55 @@
                                                          • event String The event name
                                                          • listener Function The event handler function
                                                        -

                                                        This event is emitted any time someone removes a listener. It is unspecified -if listener is in the list returned by emitter.listeners(event). +

                                                        This event is emitted any time someone removes a listener. When this event is triggered, +the listener may not yet have been removed from the array of listeners for the event.

                                            +
                                      + +
                      - - + + + - -
                      - - - + + +
                      - - +
                      -

                      Node.js v0.11.14 Manual & Documentation

                      +

                      Node.js v0.11.15 Manual & Documentation

                      Index | @@ -72,24 +77,24 @@

                    • fs.fstatSync(fd)
                    • fs.link(srcpath, dstpath, callback)
                    • fs.linkSync(srcpath, dstpath)
                    • -
                    • fs.symlink(srcpath, dstpath, [type], callback)
                    • -
                    • fs.symlinkSync(srcpath, dstpath, [type])
                    • +
                    • fs.symlink(srcpath, dstpath[, type], callback)
                    • +
                    • fs.symlinkSync(srcpath, dstpath[, type])
                    • fs.readlink(path, callback)
                    • fs.readlinkSync(path)
                    • -
                    • fs.realpath(path, [cache], callback)
                    • -
                    • fs.realpathSync(path, [cache])
                    • +
                    • fs.realpath(path[, cache], callback)
                    • +
                    • fs.realpathSync(path[, cache])
                    • fs.unlink(path, callback)
                    • fs.unlinkSync(path)
                    • fs.rmdir(path, callback)
                    • fs.rmdirSync(path)
                    • -
                    • fs.mkdir(path, [mode], callback)
                    • -
                    • fs.mkdirSync(path, [mode])
                    • +
                    • fs.mkdir(path[, mode], callback)
                    • +
                    • fs.mkdirSync(path[, mode])
                    • fs.readdir(path, callback)
                    • fs.readdirSync(path)
                    • fs.close(fd, callback)
                    • fs.closeSync(fd)
                    • -
                    • fs.open(path, flags, [mode], callback)
                    • -
                    • fs.openSync(path, flags, [mode])
                    • +
                    • fs.open(path, flags[, mode], callback)
                    • +
                    • fs.openSync(path, flags[, mode])
                    • fs.utimes(path, atime, mtime, callback)
                    • fs.utimesSync(path, atime, mtime)
                    • fs.futimes(fd, atime, mtime, callback)
                    • @@ -102,15 +107,15 @@
                    • fs.writeSync(fd, data[, position[, encoding]])
                    • fs.read(fd, buffer, offset, length, position, callback)
                    • fs.readSync(fd, buffer, offset, length, position)
                    • -
                    • fs.readFile(filename, [options], callback)
                    • -
                    • fs.readFileSync(filename, [options])
                    • -
                    • fs.writeFile(filename, data, [options], callback)
                    • -
                    • fs.writeFileSync(filename, data, [options])
                    • -
                    • fs.appendFile(filename, data, [options], callback)
                    • -
                    • fs.appendFileSync(filename, data, [options])
                    • -
                    • fs.watchFile(filename, [options], listener)
                    • -
                    • fs.unwatchFile(filename, [listener])
                    • -
                    • fs.watch(filename, [options], [listener])
                        +
                      • fs.readFile(filename[, options], callback)
                      • +
                      • fs.readFileSync(filename[, options])
                      • +
                      • fs.writeFile(filename, data[, options], callback)
                      • +
                      • fs.writeFileSync(filename, data[, options])
                      • +
                      • fs.appendFile(filename, data[, options], callback)
                      • +
                      • fs.appendFileSync(filename, data[, options])
                      • +
                      • fs.watchFile(filename[, options], listener)
                      • +
                      • fs.unwatchFile(filename[, listener])
                      • +
                      • fs.watch(filename[, options][, listener])
                        • Caveats
                          • Availability
                          • Filename Argument
                          • @@ -120,16 +125,18 @@
                          • fs.exists(path, callback)
                          • fs.existsSync(path)
                          • +
                          • fs.access(path[, mode], callback)
                          • +
                          • fs.accessSync(path[, mode])
                          • Class: fs.Stats
                          • -
                          • fs.createReadStream(path, [options])
                          • +
                          • fs.createReadStream(path[, options])
                          • Class: fs.ReadStream
                          • -
                          • fs.createWriteStream(path, [options])
                          • +
                          • fs.createWriteStream(path[, options])
                          • Class: fs.WriteStream
                            • Event: 'open'
                            • file.bytesWritten
                            • @@ -360,7 +367,7 @@

                              Synchronous link(2).

                              -

                              fs.symlink(srcpath, dstpath, [type], callback)#

                              +

                              fs.symlink(srcpath, dstpath[, type], callback)#

                              Asynchronous symlink(2). No arguments other than a possible exception are given to the completion callback. The type argument can be set to 'dir', 'file', or 'junction' (default @@ -369,7 +376,7 @@ 'junction', the destination argument will automatically be normalized to absolute path.

                              -

                              fs.symlinkSync(srcpath, dstpath, [type])#

                              +

                              fs.symlinkSync(srcpath, dstpath[, type])#

                              Synchronous symlink(2).

                              @@ -382,7 +389,7 @@

                              Synchronous readlink(2). Returns the symbolic link's string value.

                              -

                              fs.realpath(path, [cache], callback)#

                              +

                              fs.realpath(path[, cache], callback)#

                              Asynchronous realpath(2). The callback gets two arguments (err, resolvedPath). May use process.cwd to resolve relative paths. cache is an object literal of mapped paths that can be used to force a specific path @@ -397,7 +404,7 @@ if (err) throw err; console.log(resolvedPath); }); -

                              fs.realpathSync(path, [cache])#

                              +

                              fs.realpathSync(path[, cache])#

                              Synchronous realpath(2). Returns the resolved path.

                              @@ -419,12 +426,12 @@

                              Synchronous rmdir(2).

                              -

                              fs.mkdir(path, [mode], callback)#

                              +

                              fs.mkdir(path[, mode], callback)#

                              Asynchronous mkdir(2). No arguments other than a possible exception are given to the completion callback. mode defaults to 0777.

                              -

                              fs.mkdirSync(path, [mode])#

                              +

                              fs.mkdirSync(path[, mode])#

                              Synchronous mkdir(2).

                              @@ -448,7 +455,7 @@

                              Synchronous close(2).

                              -

                              fs.open(path, flags, [mode], callback)#

                              +

                              fs.open(path, flags[, mode], callback)#

                              Asynchronous file open. See open(2). flags can be:

                              @@ -509,7 +516,7 @@ the end of the file.

                              -

                              fs.openSync(path, flags, [mode])#

                              +

                              fs.openSync(path, flags[, mode])#

                              Synchronous version of fs.open().

                              @@ -622,7 +629,7 @@

                              Synchronous version of fs.read. Returns the number of bytesRead.

                              -

                              fs.readFile(filename, [options], callback)#

                              +

                              fs.readFile(filename[, options], callback)#

                              • filename String
                              • options Object
                                  @@ -647,7 +654,7 @@

                                  -

                                  fs.readFileSync(filename, [options])#

                                  +

                                  fs.readFileSync(filename[, options])#

                                  Synchronous version of fs.readFile. Returns the contents of the filename.

                                  @@ -656,7 +663,7 @@

                                  -

                                  fs.writeFile(filename, data, [options], callback)#

                                  +

                                  fs.writeFile(filename, data[, options], callback)#

                                  • filename String
                                  • data String | Buffer
                                  • @@ -683,11 +690,11 @@ if (err) throw err; console.log('It\'s saved!'); }); -

                                    fs.writeFileSync(filename, data, [options])#

                                    +

                                    fs.writeFileSync(filename, data[, options])#

                                    The synchronous version of fs.writeFile.

                                    -

                                    fs.appendFile(filename, data, [options], callback)#

                                    +

                                    fs.appendFile(filename, data[, options], callback)#

                                    • filename String
                                    • data String | Buffer
                                    • @@ -710,11 +717,11 @@ if (err) throw err; console.log('The "data to append" was appended to file!'); }); -

                                      fs.appendFileSync(filename, data, [options])#

                                      +

                                      fs.appendFileSync(filename, data[, options])#

                                      The synchronous version of fs.appendFile.

                                      -

                                      fs.watchFile(filename, [options], listener)#

                                      +

                                      fs.watchFile(filename[, options], listener)#

                                      Stability: 2 - Unstable.  Use fs.watch instead, if possible.

                                      Watch for changes on filename. The callback listener will be called each time the file is accessed. @@ -741,7 +748,7 @@ you need to compare curr.mtime and prev.mtime.

                                      -

                                      fs.unwatchFile(filename, [listener])#

                                      +

                                      fs.unwatchFile(filename[, listener])#

                                      Stability: 2 - Unstable.  Use fs.watch instead, if possible.

                                      Stop watching for changes on filename. If listener is specified, only that particular listener is removed. Otherwise, all listeners are removed and you have effectively stopped watching filename. @@ -751,7 +758,7 @@ no-op, not an error.

                                      -

                                      fs.watch(filename, [options], [listener])#

                                      +

                                      fs.watch(filename[, options][, listener])#

                                      Stability: 2 - Unstable.

                                      Watch for changes on filename, where filename is either a file or a directory. The returned object is a fs.FSWatcher. @@ -844,10 +851,46 @@ and handle the error when it's not there.

                                      +

                                      fs.exists() will be deprecated. + +

                                      fs.existsSync(path)#

                                      Synchronous version of fs.exists.

                                      +

                                      fs.existsSync() will be deprecated. + +

                                      +

                                      fs.access(path[, mode], callback)#

                                      +

                                      Tests a user's permissions for the file specified by path. mode is an +optional integer that specifies the accessibility checks to be performed. The +following constants define the possible values of mode. It is possible to +create a mask consisting of the bitwise OR of two or more values. + +

                                      +
                                        +
                                      • fs.F_OK - File is visible to the calling process. This is useful for +determining if a file exists, but says nothing about rwx permissions. +Default if no mode is specified.
                                      • +
                                      • fs.R_OK - File can be read by the calling process.
                                      • +
                                      • fs.W_OK - File can be written by the calling process.
                                      • +
                                      • fs.X_OK - File can be executed by the calling process. This has no effect +on Windows (will behave like fs.F_OK).
                                      • +
                                      +

                                      The final argument, callback, is a callback function that is invoked with +a possible error argument. If any of the accessibility checks fail, the error +argument will be populated. The following example checks if the file +/etc/passwd can be read and written by the current process. + +

                                      +
                                      fs.access('/etc/passwd', fs.R_OK | fs.W_OK, function(err) {
                                      +  util.debug(err ? 'no access!' : 'can read/write');
                                      +});
                                      +

                                      fs.accessSync(path[, mode])#

                                      +

                                      Synchronous version of fs.access. This throws if any accessibility checks +fail, and does nothing otherwise. + +

                                      Class: fs.Stats#

                                      Objects returned from fs.stat(), fs.lstat() and fs.fstat() and their synchronous counterparts are of this type. @@ -917,7 +960,7 @@ on Unix systems, it never was.

                                      -

                                      fs.createReadStream(path, [options])#

                                      +

                                      fs.createReadStream(path[, options])#

                                      Returns a new ReadStream object (See Readable Stream).

                                      @@ -935,6 +978,10 @@ start at 0. The encoding can be 'utf8', 'ascii', or 'base64'.

                                      +

                                      If fd is specified, ReadStream will ignore the path argument and will use +the specified file descriptor. This means that no open event will be emitted. + +

                                      If autoClose is false, then the file descriptor won't be closed, even if there's an error. It is your responsibility to close it and make sure there's no file descriptor leak. If autoClose is set to true (default @@ -958,7 +1005,7 @@

                                      -

                                      fs.createWriteStream(path, [options])#

                                      +

                                      fs.createWriteStream(path[, options])#

                                      Returns a new WriteStream object (See Writable Stream).

                                      @@ -967,6 +1014,7 @@

                                      { flags: 'w',
                                         encoding: null,
                                      +  fd: null,
                                         mode: 0666 }

                                      options may also include a start option to allow writing data at some position past the beginning of the file. Modifying a file rather @@ -974,6 +1022,12 @@ default mode w.

                                      +

                                      Like ReadStream above, if fd is specified, WriteStream will ignore the +path argument and will use the specified file descriptor. This means that no +open event will be emitted. + + +

                                      Class: fs.WriteStream#

                                      WriteStream is a Writable Stream. @@ -1017,26 +1071,48 @@

                              +
                    • + +
                      - - + + + - -
                      - - - + + +
                      - - +
                      -

                      Node.js v0.11.14 Manual & Documentation

                      +

                      Node.js v0.11.15 Manual & Documentation

                      Index | @@ -281,26 +286,48 @@

                      +
                      + +
                      - - + + + - -
                      - - - + + +
                      - - +
                      -

                      Node.js v0.11.14 Manual & Documentation

                      +

                      Node.js v0.11.15 Manual & Documentation

                      Index | @@ -49,7 +54,7 @@

                    • http.METHODS
                    • http.STATUS_CODES
                    • http.createServer([requestListener])
                    • -
                    • http.createClient([port], [host])
                    • +
                    • http.createClient([port][, host])
                    • Class: http.Server
                    • -
                    • http.request(options, [callback])
                    • -
                    • http.get(options, [callback])
                    • +
                    • http.request(options[, callback])
                    • +
                    • http.get(options[, callback])
                    • Class: http.Agent
                    • http.IncomingMessage
                        @@ -200,14 +205,14 @@

                        http.createServer([requestListener])#

                        -

                        Returns a new web server object. +

                        Returns a new instance of http.Server.

                        The requestListener is a function which is automatically added to the 'request' event.

                        -

                        http.createClient([port], [host])#

                        +

                        http.createClient([port][, host])#

                        This function is deprecated; please use http.request() instead. Constructs a new HTTP client. port and host refer to the server to be connected to. @@ -310,14 +315,14 @@

                        function (exception, socket) { }

                        -

                        If a client connection emits an 'error' event - it will forwarded here. +

                        If a client connection emits an 'error' event, it will be forwarded here.

                        socket is the net.Socket object that the error originated from.

                        -

                        server.listen(port, [hostname], [backlog], [callback])#

                        +

                        server.listen(port[, hostname][, backlog][, callback])#

                        Begin accepting connections on the specified port and hostname. If the hostname is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY). @@ -337,7 +342,7 @@

                        -

                        server.listen(path, [callback])#

                        +

                        server.listen(path[, callback])#

                        Start a UNIX socket server listening for connections on the given path.

                        @@ -346,7 +351,7 @@

                        -

                        server.listen(handle, [callback])#

                        +

                        server.listen(handle[, callback])#

                        • handle Object
                        • callback Function
                        • @@ -450,7 +455,7 @@ the request body should be sent. See the 'checkContinue' event on Server.

                          -

                          response.writeHead(statusCode, [statusMessage], [headers])#

                          +

                          response.writeHead(statusCode[, statusMessage][, headers])#

                          Sends a response header to the request. The status code is a 3-digit HTTP status code, like 404. The last argument, headers, are the response headers. Optionally one can give a human-readable statusMessage as the second @@ -472,7 +477,7 @@ implicit/mutable headers will be calculated and call this function for you.

                          -

                          Note: that Content-Length is given in bytes not characters. The above example +

                          Note that Content-Length is given in bytes not characters. The above example works because the string 'hello world' contains only single byte characters. If the body contains higher coded characters then Buffer.byteLength() should be used to determine the number of bytes in a given encoding. @@ -571,7 +576,7 @@

                          response.removeHeader("Content-Encoding");
                          -

                          response.write(chunk, [encoding])#

                          +

                          response.write(chunk[, encoding][, callback])#

                          If this method is called and response.writeHead() has not been called, it will switch to implicit header mode and flush the implicit headers. @@ -582,7 +587,8 @@

                          chunk can be a string or a buffer. If chunk is a string, the second parameter specifies how to encode it into a byte stream. -By default the encoding is 'utf8'. +By default the encoding is 'utf8'. The last parameter callback +will be called when this chunk of data is flushed.

                          Note: This is the raw HTTP body and has nothing to do with @@ -598,7 +604,7 @@

                          Returns true if the entire data was flushed successfully to the kernel buffer. Returns false if all or part of the data was queued in user memory. -'drain' will be emitted when the buffer is again free. +'drain' will be emitted when the buffer is free again.

                          response.addTrailers(headers)#

                          @@ -620,19 +626,22 @@ response.write(fileData); response.addTrailers({'Content-MD5': "7895bf4b8828b55ceaf47747b4bca667"}); response.end(); -

                          response.end([data], [encoding])#

                          +

                          response.end([data][, encoding][, callback])#

                          This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.

                          -

                          If data is specified, it is equivalent to calling response.write(data, encoding) -followed by response.end(). +

                          If data is specified, it is equivalent to calling +response.write(data, encoding) followed by response.end(callback). +

                          +

                          If callback is specified, it will be called when the response stream +is finished.

                          -

                          http.request(options, [callback])#

                          +

                          http.request(options[, callback])#

                          Node maintains several connections per server to make HTTP requests. This function allows one to transparently issue requests. @@ -744,7 +753,7 @@ to compute basic authentication.

                        -

                        http.get(options, [callback])#

                        +

                        http.get(options[, callback])#

                        Since most requests are GET requests without bodies, Node provides this convenience method. The only difference between this method and http.request() is that it sets the method to GET and calls req.end() automatically. @@ -1067,7 +1076,7 @@ the client should send the request body.

                        -

                        request.flush()#

                        +

                        request.flushHeaders()#

                        Flush the request headers.

                        @@ -1081,7 +1090,7 @@ the optimization and kickstart the request.

                        -

                        request.write(chunk, [encoding])#

                        +

                        request.write(chunk[, encoding][, callback])#

                        Sends a chunk of the body. By calling this method many times, the user can stream a request body to a server--in that case it is suggested to use the @@ -1095,23 +1104,30 @@

                        The encoding argument is optional and only applies when chunk is a string. Defaults to 'utf8'. +

                        +

                        The callback argument is optional and will be called when this chunk of data +is flushed.

                        -

                        request.end([data], [encoding])#

                        +

                        request.end([data][, encoding][, callback])#

                        Finishes sending the request. If any parts of the body are unsent, it will flush them to the stream. If the request is chunked, this will send the terminating '0\r\n\r\n'.

                        If data is specified, it is equivalent to calling -request.write(data, encoding) followed by request.end(). +request.write(data, encoding) followed by request.end(callback). + +

                        +

                        If callback is specified, it will be called when the request stream +is finished.

                        request.abort()#

                        Aborts a request. (New since v0.3.8.)

                        -

                        request.setTimeout(timeout, [callback])#

                        +

                        request.setTimeout(timeout[, callback])#

                        Once a socket is assigned to this request and is connected socket.setTimeout() will be called. @@ -1121,7 +1137,7 @@ socket.setNoDelay() will be called.

                        -

                        request.setSocketKeepAlive([enable], [initialDelay])#

                        +

                        request.setSocketKeepAlive([enable][, initialDelay])#

                        Once a socket is assigned to this request and is connected socket.setKeepAlive() will be called. @@ -1142,7 +1158,7 @@

                        function () { }

                        -

                        Indicates that the underlaying connection was closed. +

                        Indicates that the underlying connection was closed. Just like 'end', this event occurs only once per response.

                        @@ -1280,26 +1296,48 @@
                    • +
                      + +
                      - - + + + - -
                      - - - + + +
                      - - +
                      -

                      Node.js v0.11.14 Manual & Documentation

                      +

                      Node.js v0.11.15 Manual & Documentation

                      Index | @@ -51,10 +56,10 @@

                    • server.timeout
                    -
                  • https.createServer(options, [requestListener])

                    In order to specify these options, use a custom Agent. @@ -290,26 +295,48 @@

                  +
                + + - - + + + - -
                - - - + + +
                - - +
                -

                Node.js v0.11.14 Manual & Documentation

                +

                Node.js v0.11.15 Manual & Documentation

                Index | @@ -92,26 +97,48 @@

                +
                + +
                - - + + + - -
                - - - + + +
                - - +
                -

                Node.js v0.11.14 Manual & Documentation

                +

                Node.js v0.11.15 Manual & Documentation

                Index | @@ -143,8 +148,8 @@

                Cycles#

                -

                When there are circular require() calls, a module might not be -done being executed when it is returned. +

                When there are circular require() calls, a module might not have finished +executing when it is returned.

                Consider this situation: @@ -177,7 +182,7 @@ console.log('in main, a.done=%j, b.done=%j', a.done, b.done);

                When main.js loads a.js, then a.js in turn loads b.js. At that point, b.js tries to load a.js. In order to prevent an infinite -loop an unfinished copy of the a.js exports object is returned to the +loop, an unfinished copy of the a.js exports object is returned to the b.js module. b.js then finishes loading, and its exports object is provided to the a.js module. @@ -272,6 +277,13 @@ clash.

                +

                You can require specific files or sub modules distributed with a module by +including a path suffix after the module name. For instance +require('example-module/path/to/file') would resolve path/to/file +relative to where example-module is located. The suffixed path follows the +same module resolution semantics. + +

                Folders as Modules#

                @@ -352,7 +364,7 @@
              • Object

              The module.exports object is created by the Module system. Sometimes this is not -acceptable; many want their module to be an instance of some class. To do this +acceptable; many want their module to be an instance of some class. To do this, assign the desired export object to module.exports. Note that assigning the desired object to exports will simply rebind the local exports variable, which is probably not what you want to do. @@ -637,26 +649,48 @@ +

              + + - - + + + - -
              - - - + + +
              - - +
              -

              Node.js v0.11.14 Manual & Documentation

              +

              Node.js v0.11.15 Manual & Documentation

              Index | @@ -46,18 +51,18 @@

              Table of Contents

              +
              + +
              - - + + + - -
              - - - + + +
              - - +
              -

              Node.js v0.11.14 Manual & Documentation

              +

              Node.js v0.11.15 Manual & Documentation

              Index | @@ -235,26 +240,48 @@

              +
              + +
              - - + + + - -
              - - - + + +
              - - +
              -

              Node.js v0.11.14 Manual & Documentation

              +

              Node.js v0.11.15 Manual & Documentation

              Index | @@ -47,15 +52,19 @@

              @@ -87,7 +96,7 @@
              path.normalize('/foo/bar//baz/asdf/quux/..')
               // returns
               '/foo/bar/baz/asdf'
              -

              path.join([path1], [path2], [...])#

              +

              path.join([path1][, path2][, ...])#

              Join all arguments together and normalize the resulting path.

              @@ -195,7 +204,7 @@
              path.dirname('/foo/bar/baz/asdf/quux')
               // returns
               '/foo/bar/baz/asdf'
              -

              path.basename(p, [ext])#

              +

              path.basename(p[, ext])#

              Return the last portion of a path. Similar to the Unix basename command.

              @@ -269,30 +278,102 @@ process.env.PATH.split(path.delimiter) // returns ['C:\Windows\system32', 'C:\Windows', 'C:\Program Files\nodejs\']
              +

              path.parse(pathString)#

              +

              Returns an object from a path string. + +

              +

              An example on *nix: + +

              +
              path.parse('/home/user/dir/file.txt')
              +// returns
              +{
              +    root : "/",
              +    dir : "/home/user/dir",
              +    base : "file.txt",
              +    ext : ".txt",
              +    name : "file"
              +}
              +

              An example on Windows: + +

              +
              path.parse('C:\\path\\dir\\index.html')
              +// returns
              +{
              +    root : "C:\",
              +    dir : "C:\path\dir",
              +    base : "index.html",
              +    ext : ".html",
              +    name : "index"
              +}
              +

              path.format(pathObject)#

              +

              Returns a path string from an object, the opposite of path.parse above. + +

              +
              path.format({
              +    root : "/",
              +    dir : "/home/user/dir",
              +    base : "file.txt",
              +    ext : ".txt",
              +    name : "file"
              +})
              +// returns
              +'/home/user/dir/file.txt'
              +

              path.posix#

              +

              Provide access to aforementioned path methods but always interact in a posix +compatible way. + +

              +

              path.win32#

              +

              Provide access to aforementioned path methods but always interact in a win32 +compatible way. +

              +
              + +
              - - + + + - -
              - - - + + +
              - - +
              -

              Node.js v0.11.14 Manual & Documentation

              +

              Node.js v0.11.15 Manual & Documentation

              Index | @@ -73,7 +78,7 @@

            • process.version
            • process.versions
            • process.config
            • -
            • process.kill(pid, [signal])
            • +
            • process.kill(pid[, signal])
            • process.pid
            • process.title
            • process.arch
            • @@ -274,7 +279,7 @@

              process.stdout#

              -

              A Writable Stream to stdout. +

              A Writable Stream to stdout (on fd 1).

              Example: the definition of console.log @@ -284,7 +289,8 @@ process.stdout.write(d + '\n'); };

              process.stderr and process.stdout are unlike other streams in Node in -that writes to them are usually blocking. +that they cannot be closed (end() will throw), they never emit the finish +event and that writes are usually blocking.

                @@ -313,11 +319,12 @@

                process.stderr#

                -

                A writable stream to stderr. +

                A writable stream to stderr (on fd 2).

                process.stderr and process.stdout are unlike other streams in Node in -that writes to them are usually blocking. +that they cannot be closed (end() will throw), they never emit the finish +event and that writes are usually blocking.

                  @@ -330,7 +337,7 @@

                process.stdin#

                -

                A Readable Stream for stdin. +

                A Readable Stream for stdin (on fd 0).

                Example of opening standard input and listening for both events: @@ -643,7 +650,7 @@ strict_aliasing: 'true', target_arch: 'x64', v8_use_snapshot: 'true' } } -

                process.kill(pid, [signal])#

                +

                process.kill(pid[, signal])#

                Send a signal to a process. pid is the process id and signal is the string describing the signal to send. Signal names are strings like 'SIGINT' or 'SIGHUP'. If omitted, the signal will be 'SIGTERM'. @@ -813,7 +820,7 @@ given, otherwise returns the current mask.

                -
                var oldmask, newmask = 0644;
                +
                var oldmask, newmask = 0022;
                 
                 oldmask = process.umask(newmask);
                 console.log('Changed umask from: ' + oldmask.toString(8) +
                @@ -860,26 +867,48 @@
                           
              +
              + +
              - - + + + - -
              - - - + + +
              - - +
              -

              Node.js v0.11.14 Manual & Documentation

              +

              Node.js v0.11.15 Manual & Documentation

              Index | @@ -126,26 +131,48 @@

              +
              + +
              - - + + + - -
              - - - + + +
              - - +
              -

              Node.js v0.11.14 Manual & Documentation

              +

              Node.js v0.11.15 Manual & Documentation

              Index | @@ -46,8 +51,8 @@

              Table of Contents

              +
              + +
              - - + + + - -
              - - - + + +
              - - +
              -

              Node.js v0.11.14 Manual & Documentation

              +

              Node.js v0.11.15 Manual & Documentation

          • Events
              @@ -110,7 +115,7 @@
              • input - the readable stream to listen to (Required).

              • -
              • output - the writable stream to write readline data to (Required).

                +
              • output - the writable stream to write readline data to (Optional).

              • completer - an optional function that is used for Tab autocompletion. See below for an example of using this.

                @@ -188,6 +193,10 @@ been paused.

                +

                If output is set to null or undefined when calling createInterface, the +prompt is not written. + +

                rl.question(query, callback)#

                Prepends the prompt with query and invokes callback with the user's response. Displays the query to the user, and then invokes callback @@ -198,6 +207,10 @@ it has been paused.

                +

                If output is set to null or undefined when calling createInterface, +nothing is displayed. + +

                Example usage:

                @@ -208,6 +221,9 @@

                Pauses the readline input stream, allowing it to be resumed later if needed.

                +

                Note that this doesn't immediately pause the stream of events. Several events may be emitted after calling pause, including line. + +

                rl.resume()#

                Resumes the readline input stream. @@ -217,9 +233,10 @@ output streams. The "close" event will also be emitted.

                -

                rl.write(data, [key])#

                -

                Writes data to output stream. key is an object literal to represent a key -sequence; available if the terminal is a TTY. +

                rl.write(data[, key])#

                +

                Writes data to output stream, unless output is set to null or +undefined when calling createInterface. key is an object literal to +represent a key sequence; available if the terminal is a TTY.

                This will also resume the input stream if it has been paused. @@ -407,26 +424,48 @@ +

                + + - - + + + - -
                - - - + + +
                - - +
                -

                Node.js v0.11.14 Manual & Documentation

                +

                Node.js v0.11.15 Manual & Documentation

                Index | @@ -288,26 +293,48 @@

                +
                + +
                - - + + + - -
                - - - + + +
                - - +
                -

                Node.js v0.11.14 Manual & Documentation

                +

                Node.js v0.11.15 Manual & Documentation

                Smalloc#

                -
                Stability: 1 - Experimental

                smalloc.alloc(length[, receiver][, type])#

                -
                  -
                • length {Number} <= smalloc.kMaxLength
                • -
                • receiver {Object}, Optional, Default: new Object
                • -
                • type {Enum}, Optional, Default: Uint8
                • -
                -

                Returns receiver with allocated external array data. If no receiver is -passed then a new Object will be created and returned. - -

                +
                Stability: 1 - Experimental

                Class: smalloc#

                Buffers are backed by a simple allocator that only handles the assignation of external raw memory. Smalloc exposes that functionality.

                +

                smalloc.alloc(length[, receiver][, type])#

                +
                  +
                • length Number <= smalloc.kMaxLength
                • +
                • receiver Object Default: new Object
                • +
                • type Enum Default: Uint8
                • +
              +

              Returns receiver with allocated external array data. If no receiver is +passed then a new Object will be created and returned. + +

              This can be used to create your own Buffer-like classes. No other properties are set, so the user will need to keep track of other necessary information (e.g. length of the allocation). @@ -107,13 +116,18 @@ doubleArr = i / 10; // { '0': 0, '1': 0.1, '2': 0.2 } -

              smalloc.copyOnto(source, sourceStart, dest, destStart, copyLength);#

              +

              It is not possible to freeze, seal and prevent extensions of objects with +external data using Object.freeze, Object.seal and +Object.preventExtensions respectively. + +

              +

              smalloc.copyOnto(source, sourceStart, dest, destStart, copyLength);#

                -
              • source Object with external array allocation
              • -
              • sourceStart Position to begin copying from
              • -
              • dest Object with external array allocation
              • -
              • destStart Position to begin copying onto
              • -
              • copyLength Length of copy
              • +
              • source Object with external array allocation
              • +
              • sourceStart Number Position to begin copying from
              • +
              • dest Object with external array allocation
              • +
              • destStart Number Position to begin copying onto
              • +
              • copyLength Number Length of copy

            Copy memory from one external array allocation to another. No arguments are optional, and any violation will throw. @@ -137,7 +151,7 @@ need to set any additional properties for this to work.

            -

            smalloc.dispose(obj)#

            +

            smalloc.dispose(obj)#

            • obj Object
          @@ -166,22 +180,24 @@ smalloc.copyOnto(b, 2, a, 0, 2); // now results in: -// Error: source has no external array data -

          dispose() does not support Buffers, and will throw if passed. +// RangeError: copy_length > source_length +

          After dispose() is called object still behaves as one with external data, for +example smalloc.hasExternalData() returns true. +dispose() does not support Buffers, and will throw if passed.

          -

          smalloc.hasExternalData(obj)#

          +

          smalloc.hasExternalData(obj)#

          • obj Object

        Returns true if the obj has externally allocated memory.

        -

        smalloc.kMaxLength#

        +

        smalloc.kMaxLength#

        Size of maximum allocation. This is also applicable to Buffer creation.

        -

        smalloc.Types#

        +

        smalloc.Types#

        Enum of possible external array types. Contains:

        @@ -200,26 +216,48 @@ + + + - - + + + - -
    • Class: stream.Writable
    • Class: stream.Writable
        @@ -197,7 +203,7 @@ // Readable streams emit 'data' events once a listener is added req.on('data', function (chunk) { body += chunk; - }) + }); // the end event tells you that you have entire body req.on('end', function () { @@ -212,8 +218,8 @@ // write back something interesting to the user: res.write(typeof data); res.end(); - }) -}) + }); +}); server.listen(1337); @@ -298,7 +304,7 @@
        var readable = getReadableStreamSomehow();
         readable.on('readable', function() {
           // there is some data to read now
        -})
        +});

        Once the internal buffer is drained, a readable event will fire again when more data is available. @@ -319,7 +325,7 @@

        var readable = getReadableStreamSomehow();
         readable.on('data', function(chunk) {
           console.log('got %d bytes of data', chunk.length);
        -})
        +});

        Event: 'end'#

        This event fires when there will be no more data to read. @@ -332,7 +338,7 @@

        var readable = getReadableStreamSomehow();
         readable.on('data', function(chunk) {
           console.log('got %d bytes of data', chunk.length);
        -})
        +});
         readable.on('end', function() {
           console.log('there will be no more data.');
         });
        @@ -406,7 +412,7 @@ readable.on('data', function(chunk) { assert.equal(typeof chunk, 'string'); console.log('got %d characters of string data', chunk.length); -}) +});

        readable.resume()#

        • Return: this
        • @@ -425,7 +431,7 @@ readable.resume(); readable.on('end', function(chunk) { console.log('got to the end, but did not read anything'); -}) +});

          readable.pause()#

          • Return: this
          • @@ -444,7 +450,7 @@ console.log('now data will start flowing again'); readable.resume(); }, 1000); -}) +});

            readable.isPaused()#

            • Return: Boolean
            • @@ -461,7 +467,7 @@ readable.isPaused() // === true readable.resume() readable.isPaused() // === false -

              readable.pipe(destination, [options])#

              +

              readable.pipe(destination[, options])#

              • destination Writable Stream The destination for writing data
              • options Object Pipe options -

                writable.write(chunk, [encoding], [callback])#

                +

                writable.write(chunk[, encoding][, callback])#

                • chunk String | Buffer The data to write
                • encoding String The encoding, if chunk is a String
                • @@ -696,7 +702,16 @@

                  Flush all data, buffered since .cork() call.

                  -

                  writable.end([chunk], [encoding], [callback])#

                  +

                  writable.setDefaultEncoding(encoding)#

                  +
                    +
                  • encoding String The new default encoding
                  • +
                  • Return: Boolean
                  • +
                +

                Sets the default encoding for a writable stream. Returns true if the encoding +is valid and is set. Otherwise returns false. + +

                +

                writable.end([chunk][, encoding][, callback])#

                • chunk String | Buffer Optional data to write
                • encoding String The encoding, if chunk is a String
                • @@ -710,11 +725,10 @@

                  // write 'hello, ' and then end with 'world!'
                  -http.createServer(function (req, res) {
                  -  res.write('hello, ');
                  -  res.end('world!');
                  -  // writing more now is not allowed!
                  -});
                  +var file = fs.createWriteStream('example.txt'); +file.write('hello, '); +file.end('world!'); +// writing more now is not allowed!

                  Event: 'finish'#

                  When the end() method has been called, and all data has been flushed to the underlying system, this event is emitted. @@ -1077,7 +1091,7 @@ size bytes are available before calling stream.push(chunk).

                  -

                  readable.push(chunk, [encoding])#

                  +

                  readable.push(chunk[, encoding])#

                  • chunk Buffer | null | String Chunk of data to push into the read queue
                  • encoding String Encoding of String chunks. Must be a valid @@ -1302,7 +1316,7 @@
                  • encoding String If the chunk is a string, then this is the encoding type. (Ignore if decodeStrings chunk is a buffer.)
                  • callback Function Call this function (optionally with an error -argument) when you are done processing the supplied chunk.
                  • +argument and data) when you are done processing the supplied chunk.

                Note: This function MUST NOT be called directly. It should be implemented by child classes, and called by the internal Transform @@ -1326,9 +1340,19 @@

                Call the callback function only when the current chunk is completely consumed. Note that there may or may not be output as a result of any -particular input chunk. +particular input chunk. If you supply as the second argument to the +it will be passed to push method, in other words the following are +equivalent:

                +
                transform.prototype._transform = function (data, encoding, callback) {
                +  this.push(data);
                +  callback();
                +}
                +
                +transform.prototype._transform = function (data, encoding, callback) {
                +  callback(null, data);
                +}

                This method is prefixed with an underscore because it is internal to the class that defines it, and should not be called directly by user programs. However, you are expected to override this method in @@ -1693,26 +1717,48 @@

              +
            + +
        - - + + + - -
        - - - + + +
        - - +
        -

        Node.js v0.11.14 Manual & Documentation

        +

        Node.js v0.11.15 Manual & Documentation

        Index | @@ -87,26 +92,48 @@

        +
        + +
        - - + + + - -
        - - - + + +
        - - +
        -

        Node.js v0.11.14 Manual & Documentation

        +

        Node.js v0.11.15 Manual & Documentation

        Index | @@ -78,26 +83,48 @@

        +
        + +
        - - + + + - -
        - - - + + +
        - - +
        -

        Node.js v0.11.14 Manual & Documentation

        +

        Node.js v0.11.15 Manual & Documentation

        Index | @@ -46,13 +51,13 @@

        Table of Contents

        • Timers
        • @@ -66,7 +71,7 @@ this module in order to use them.

          -

          setTimeout(callback, delay, [arg], [...])#

          +

          setTimeout(callback, delay[, arg][, ...])#

          To schedule execution of a one-time callback after delay milliseconds. Returns a timeoutObject for possible use with clearTimeout(). Optionally you can also pass arguments to the callback. @@ -82,14 +87,14 @@

          Prevents a timeout from triggering.

          -

          setInterval(callback, delay, [arg], [...])#

          +

          setInterval(callback, delay[, arg][, ...])#

          To schedule the repeated execution of callback every delay milliseconds. Returns a intervalObject for possible use with clearInterval(). Optionally you can also pass arguments to the callback.

          clearInterval(intervalObject)#

          -

          Stops a interval from triggering. +

          Stops an interval from triggering.

          unref()#

          @@ -110,7 +115,7 @@ ref again will have no effect.

          -

          setImmediate(callback, [arg], [...])#

          +

          setImmediate(callback[, arg][, ...])#

          To schedule the "immediate" execution of callback after I/O events callbacks and before setTimeout and setInterval . Returns an immediateObject for possible use with clearImmediate(). Optionally you @@ -119,7 +124,7 @@

          Callbacks for immediates are queued in the order in which they were created. The entire callback queue is processed every event loop iteration. If you queue -an immediate from a inside an executing callback that immediate won't fire +an immediate from inside an executing callback, that immediate won't fire until the next event loop iteration.

          @@ -130,26 +135,48 @@
        +
        + +
        - - + + + - -
        - - - + + +
        - - +
        -

        Node.js v0.11.14 Manual & Documentation

        +

        Node.js v0.11.15 Manual & Documentation

        Index | @@ -46,17 +51,18 @@

        Table of Contents

        Here is a simple example echo server: @@ -394,8 +444,8 @@

        openssl s_client -connect 127.0.0.1:8000
        -

        tls.connect(options, [callback])#

        -

        tls.connect(port, [host], [options], [callback])#

        +

        tls.connect(options[, callback])#

        +

        tls.connect(port[, host][, options][, callback])#

        Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.) options should be an object which specifies: @@ -543,9 +593,6 @@

      tls.createSecureContext(details)#

      -

      Stability: 0 - Deprecated. Use tls.createSecureContext instead. - -

      Creates a credentials object, with the optional details being a dictionary with keys: @@ -575,8 +622,8 @@

      -

      tls.createSecurePair([context], [isServer], [requestCert], [rejectUnauthorized])#

      -
      Stability: 0 - Deprecated. Use tls.TLSSocket instead.

      Creates a new secure pair object with two streams, one of which reads/writes +

      tls.createSecurePair([context][, isServer][, requestCert][, rejectUnauthorized])#

      +

      Creates a new secure pair object with two streams, one of which reads/writes encrypted data, and one reads/writes cleartext data. Generally the encrypted one is piped to/from an incoming encrypted data stream, and the cleartext one is used as a replacement for the initial encrypted stream. @@ -628,7 +675,7 @@

      This event is emitted after a new connection has been successfully -handshaked. The argument is a instance of tls.TLSSocket. It has all the +handshaked. The argument is an instance of tls.TLSSocket. It has all the common stream methods and events.

      @@ -733,7 +780,7 @@

      -

      server.listen(port, [host], [callback])#

      +

      server.listen(port[, host][, callback])#

      Begin accepting connections on the specified port and host. If the host is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY). @@ -953,26 +1000,48 @@ +

      + + - - + + + - -
      - - - + + +
      - - +
      -

      Node.js v0.11.14 Manual & Documentation

      +

      Node.js v0.11.15 Manual & Documentation

      Index | @@ -92,26 +97,48 @@

      +
      + +
      - - + + - - - - - - diff -Nru nodejs-0.11.14/doc/api/tracing.json nodejs-0.11.15/doc/api/tracing.json --- nodejs-0.11.14/doc/api/tracing.json 2014-09-24 21:54:32.000000000 +0000 +++ nodejs-0.11.15/doc/api/tracing.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -{ - "source": "doc/api/tracing.markdown", - "modules": [ - { - "textRaw": "Tracing", - "name": "tracing", - "stability": 1, - "stabilityText": "Experimental", - "desc": "

      The tracing module is designed for instrumenting your Node application. It is\nnot meant for general purpose use.\n\n

      \n

      Be very careful with callbacks used in conjunction with this module\n\n

      \n

      Many of these callbacks interact directly with asynchronous subsystems in a\nsynchronous fashion. That is to say, you may be in a callback where a call to\nconsole.log() could result in an infinite recursive loop. Also of note, many\nof these callbacks are in hot execution code paths. That is to say your\ncallbacks are executed quite often in the normal operation of Node, so be wary\nof doing CPU bound or synchronous workloads in these functions. Consider a ring\nbuffer and a timer to defer processing.\n\n

      \n

      require('tracing') to use this module.\n\n

      \n", - "modules": [ - { - "textRaw": "v8", - "name": "v8", - "desc": "

      The v8 property is an [EventEmitter][], it exposes events and interfaces\nspecific to the version of v8 built with node. These interfaces are subject\nto change by upstream and are therefore not covered under the stability index.\n\n

      \n", - "events": [ - { - "textRaw": "Event: 'gc'", - "type": "event", - "name": "gc", - "desc": "

      function (before, after) { }\n\n

      \n

      Emitted each time a GC run is completed.\n\n

      \n

      before and after are objects with the following properties:\n\n

      \n
      {\n  type: 'mark-sweep-compact',\n  flags: 0,\n  timestamp: 905535650119053,\n  total_heap_size: 6295040,\n  total_heap_size_executable: 4194304,\n  total_physical_size: 6295040,\n  used_heap_size: 2855416,\n  heap_size_limit: 1535115264\n}
      \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "getHeapStatistics()", - "type": "method", - "name": "getHeapStatistics", - "desc": "

      Returns an object with the following properties\n\n

      \n
      {\n  total_heap_size: 7326976,\n  total_heap_size_executable: 4194304,\n  total_physical_size: 7326976,\n  used_heap_size: 3476208,\n  heap_size_limit: 1535115264\n}
      \n", - "signatures": [ - { - "params": [] - } - ] - } - ], - "type": "module", - "displayName": "v8" - } - ], - "type": "module", - "displayName": "Tracing" - }, - { - "textRaw": "Async Listeners", - "name": "async_listeners", - "desc": "

      The AsyncListener API is the JavaScript interface for the AsyncWrap\nclass which allows developers to be notified about key events in the\nlifetime of an asynchronous event. Node performs a lot of asynchronous\nevents internally, and significant use of this API may have a\nsignificant performance impact on your application.\n\n\n

      \n", - "methods": [ - { - "textRaw": "tracing.createAsyncListener(callbacksObj[, userData])", - "type": "method", - "name": "createAsyncListener", - "signatures": [ - { - "params": [ - { - "textRaw": "`callbacksObj` {Object} Contains optional callbacks that will fire at specific times in the life cycle of the asynchronous event. ", - "name": "callbacksObj", - "type": "Object", - "desc": "Contains optional callbacks that will fire at specific times in the life cycle of the asynchronous event." - }, - { - "textRaw": "`userData` {Value} a value that will be passed to all callbacks. ", - "name": "userData", - "type": "Value", - "desc": "a value that will be passed to all callbacks." - } - ] - }, - { - "params": [ - { - "name": "callbacksObj[" - }, - { - "name": "userData" - } - ] - } - ], - "desc": "

      Returns a constructed AsyncListener object.\n\n

      \n

      To begin capturing asynchronous events pass either the callbacksObj or\npass an existing AsyncListener instance to [tracing.addAsyncListener()][].\nThe same AsyncListener instance can only be added once to the active\nqueue, and subsequent attempts to add the instance will be ignored.\n\n

      \n

      To stop capturing pass the AsyncListener instance to\n[tracing.removeAsyncListener()][]. This does not mean the\nAsyncListener previously added will stop triggering callbacks. Once\nattached to an asynchronous event it will persist with the lifetime of the\nasynchronous call stack.\n\n

      \n

      Explanation of function parameters:\n\n\n

      \n

      callbacksObj: An Object which may contain several optional fields:\n\n

      \n
        \n
      • create(userData): A Function called when an asynchronous\nevent is instantiated. If a Value is returned then it will be attached\nto the event and overwrite any value that had been passed to\ntracing.createAsyncListener()'s userData argument. If an initial\nuserData was passed when created, then create() will\nreceive that as a function argument.

        \n
      • \n
      • before(context, userData): A Function that is called immediately\nbefore the asynchronous callback is about to run. It will be passed both\nthe context (i.e. this) of the calling function and the userData\neither returned from create() or passed during construction (if\neither occurred).

        \n
      • \n
      • after(context, userData): A Function called immediately after\nthe asynchronous event's callback has run. Note this will not be called\nif the callback throws and the error is not handled.

        \n
      • \n
      • error(userData, error): A Function called if the event's\ncallback threw. If this registered callback returns true then Node will\nassume the error has been properly handled and resume execution normally.\nWhen multiple error() callbacks have been registered only one of\nthose callbacks needs to return true for AsyncListener to accept that\nthe error has been handled, but all error() callbacks will always be run.

        \n
      • \n
      \n

      userData: A Value (i.e. anything) that will be, by default,\nattached to all new event instances. This will be overwritten if a Value\nis returned by create().\n\n

      \n

      Here is an example of overwriting the userData:\n\n

      \n
      tracing.createAsyncListener({\n  create: function listener(value) {\n    // value === true\n    return false;\n}, {\n  before: function before(context, value) {\n    // value === false\n  }\n}, true);
      \n

      Note: The [EventEmitter][], while used to emit status of an asynchronous\nevent, is not itself asynchronous. So create() will not fire when\nan event is added, and before()/after() will not fire when emitted\ncallbacks are called.\n\n\n

      \n" - }, - { - "textRaw": "tracing.addAsyncListener(callbacksObj[, userData])", - "type": "method", - "name": "addAsyncListener", - "desc": "

      Returns a constructed AsyncListener object and immediately adds it to\nthe listening queue to begin capturing asynchronous events.\n\n

      \n

      Function parameters can either be the same as\n[tracing.createAsyncListener()][], or a constructed AsyncListener\nobject.\n\n

      \n

      Example usage for capturing errors:\n\n

      \n
      var fs = require('fs');\n\nvar cntr = 0;\nvar key = tracing.addAsyncListener({\n  create: function onCreate() {\n    return { uid: cntr++ };\n  },\n  before: function onBefore(context, storage) {\n    // Write directly to stdout or we'll enter a recursive loop\n    fs.writeSync(1, 'uid: ' + storage.uid + ' is about to run\\n');\n  },\n  after: function onAfter(context, storage) {\n    fs.writeSync(1, 'uid: ' + storage.uid + ' ran\\n');\n  },\n  error: function onError(storage, err) {\n    // Handle known errors\n    if (err.message === 'everything is fine') {\n      // Writing to stderr this time.\n      fs.writeSync(2, 'handled error just threw:\\n');\n      fs.writeSync(2, err.stack + '\\n');\n      return true;\n    }\n  }\n});\n\nprocess.nextTick(function() {\n  throw new Error('everything is fine');\n});\n\n// Output:\n// uid: 0 is about to run\n// handled error just threw:\n// Error: really, it's ok\n//     at /tmp/test2.js:27:9\n//     at process._tickCallback (node.js:583:11)\n//     at Function.Module.runMain (module.js:492:11)\n//     at startup (node.js:123:16)\n//     at node.js:1012:3
      \n", - "signatures": [ - { - "params": [ - { - "name": "asyncListener" - } - ] - }, - { - "params": [ - { - "name": "callbacksObj[" - }, - { - "name": "userData" - } - ] - } - ] - }, - { - "textRaw": "tracing.addAsyncListener(asyncListener)", - "type": "method", - "name": "addAsyncListener", - "desc": "

      Returns a constructed AsyncListener object and immediately adds it to\nthe listening queue to begin capturing asynchronous events.\n\n

      \n

      Function parameters can either be the same as\n[tracing.createAsyncListener()][], or a constructed AsyncListener\nobject.\n\n

      \n

      Example usage for capturing errors:\n\n

      \n
      var fs = require('fs');\n\nvar cntr = 0;\nvar key = tracing.addAsyncListener({\n  create: function onCreate() {\n    return { uid: cntr++ };\n  },\n  before: function onBefore(context, storage) {\n    // Write directly to stdout or we'll enter a recursive loop\n    fs.writeSync(1, 'uid: ' + storage.uid + ' is about to run\\n');\n  },\n  after: function onAfter(context, storage) {\n    fs.writeSync(1, 'uid: ' + storage.uid + ' ran\\n');\n  },\n  error: function onError(storage, err) {\n    // Handle known errors\n    if (err.message === 'everything is fine') {\n      // Writing to stderr this time.\n      fs.writeSync(2, 'handled error just threw:\\n');\n      fs.writeSync(2, err.stack + '\\n');\n      return true;\n    }\n  }\n});\n\nprocess.nextTick(function() {\n  throw new Error('everything is fine');\n});\n\n// Output:\n// uid: 0 is about to run\n// handled error just threw:\n// Error: really, it's ok\n//     at /tmp/test2.js:27:9\n//     at process._tickCallback (node.js:583:11)\n//     at Function.Module.runMain (module.js:492:11)\n//     at startup (node.js:123:16)\n//     at node.js:1012:3
      \n", - "signatures": [ - { - "params": [ - { - "name": "asyncListener" - } - ] - } - ] - }, - { - "textRaw": "tracing.removeAsyncListener(asyncListener)", - "type": "method", - "name": "removeAsyncListener", - "desc": "

      Removes the AsyncListener from the listening queue.\n\n

      \n

      Removing the AsyncListener from the active queue does not mean the\nasyncListener callbacks will cease to fire on the events they've been\nregistered. Subsequently, any asynchronous events fired during the\nexecution of a callback will also have the same asyncListener callbacks\nattached for future execution. For example:\n\n

      \n
      var fs = require('fs');\n\nvar key = tracing.createAsyncListener({\n  create: function asyncListener() {\n    // Write directly to stdout or we'll enter a recursive loop\n    fs.writeSync(1, 'You summoned me?\\n');\n  }\n});\n\n// We want to begin capturing async events some time in the future.\nsetTimeout(function() {\n  tracing.addAsyncListener(key);\n\n  // Perform a few additional async events.\n  setTimeout(function() {\n    setImmediate(function() {\n      process.nextTick(function() { });\n    });\n  });\n\n  // Removing the listener doesn't mean to stop capturing events that\n  // have already been added.\n  tracing.removeAsyncListener(key);\n}, 100);\n\n// Output:\n// You summoned me?\n// You summoned me?\n// You summoned me?\n// You summoned me?
      \n

      The fact that we logged 4 asynchronous events is an implementation detail\nof Node's [Timers][].\n\n

      \n

      To stop capturing from a specific asynchronous event stack\ntracing.removeAsyncListener() must be called from within the call\nstack itself. For example:\n\n

      \n
      var fs = require('fs');\n\nvar key = tracing.createAsyncListener({\n  create: function asyncListener() {\n    // Write directly to stdout or we'll enter a recursive loop\n    fs.writeSync(1, 'You summoned me?\\n');\n  }\n});\n\n// We want to begin capturing async events some time in the future.\nsetTimeout(function() {\n  tracing.addAsyncListener(key);\n\n  // Perform a few additional async events.\n  setImmediate(function() {\n    // Stop capturing from this call stack.\n    tracing.removeAsyncListener(key);\n\n    process.nextTick(function() { });\n  });\n}, 100);\n\n// Output:\n// You summoned me?
      \n

      The user must be explicit and always pass the AsyncListener they wish\nto remove. It is not possible to simply remove all listeners at once.\n\n\n

      \n", - "signatures": [ - { - "params": [ - { - "name": "asyncListener" - } - ] - } - ] - } - ], - "type": "module", - "displayName": "Async Listeners" - } - ] -} diff -Nru nodejs-0.11.14/doc/api/tracing.markdown nodejs-0.11.15/doc/api/tracing.markdown --- nodejs-0.11.14/doc/api/tracing.markdown 2014-09-24 21:46:41.000000000 +0000 +++ nodejs-0.11.15/doc/api/tracing.markdown 1970-01-01 00:00:00.000000000 +0000 @@ -1,273 +0,0 @@ -# Tracing - - Stability: 1 - Experimental - -The tracing module is designed for instrumenting your Node application. It is -not meant for general purpose use. - -***Be very careful with callbacks used in conjunction with this module*** - -Many of these callbacks interact directly with asynchronous subsystems in a -synchronous fashion. That is to say, you may be in a callback where a call to -`console.log()` could result in an infinite recursive loop. Also of note, many -of these callbacks are in hot execution code paths. That is to say your -callbacks are executed quite often in the normal operation of Node, so be wary -of doing CPU bound or synchronous workloads in these functions. Consider a ring -buffer and a timer to defer processing. - -`require('tracing')` to use this module. - -## v8 - -The `v8` property is an [EventEmitter][], it exposes events and interfaces -specific to the version of `v8` built with node. These interfaces are subject -to change by upstream and are therefore not covered under the stability index. - -### Event: 'gc' - -`function (before, after) { }` - -Emitted each time a GC run is completed. - -`before` and `after` are objects with the following properties: - -``` -{ - type: 'mark-sweep-compact', - flags: 0, - timestamp: 905535650119053, - total_heap_size: 6295040, - total_heap_size_executable: 4194304, - total_physical_size: 6295040, - used_heap_size: 2855416, - heap_size_limit: 1535115264 -} -``` - -### getHeapStatistics() - -Returns an object with the following properties - -``` -{ - total_heap_size: 7326976, - total_heap_size_executable: 4194304, - total_physical_size: 7326976, - used_heap_size: 3476208, - heap_size_limit: 1535115264 -} -``` - - -# Async Listeners - -The `AsyncListener` API is the JavaScript interface for the `AsyncWrap` -class which allows developers to be notified about key events in the -lifetime of an asynchronous event. Node performs a lot of asynchronous -events internally, and significant use of this API may have a -**significant performance impact** on your application. - - -## tracing.createAsyncListener(callbacksObj[, userData]) - -* `callbacksObj` {Object} Contains optional callbacks that will fire at -specific times in the life cycle of the asynchronous event. -* `userData` {Value} a value that will be passed to all callbacks. - -Returns a constructed `AsyncListener` object. - -To begin capturing asynchronous events pass either the `callbacksObj` or -pass an existing `AsyncListener` instance to [`tracing.addAsyncListener()`][]. -The same `AsyncListener` instance can only be added once to the active -queue, and subsequent attempts to add the instance will be ignored. - -To stop capturing pass the `AsyncListener` instance to -[`tracing.removeAsyncListener()`][]. This does _not_ mean the -`AsyncListener` previously added will stop triggering callbacks. Once -attached to an asynchronous event it will persist with the lifetime of the -asynchronous call stack. - -Explanation of function parameters: - - -`callbacksObj`: An `Object` which may contain several optional fields: - -* `create(userData)`: A `Function` called when an asynchronous -event is instantiated. If a `Value` is returned then it will be attached -to the event and overwrite any value that had been passed to -`tracing.createAsyncListener()`'s `userData` argument. If an initial -`userData` was passed when created, then `create()` will -receive that as a function argument. - -* `before(context, userData)`: A `Function` that is called immediately -before the asynchronous callback is about to run. It will be passed both -the `context` (i.e. `this`) of the calling function and the `userData` -either returned from `create()` or passed during construction (if -either occurred). - -* `after(context, userData)`: A `Function` called immediately after -the asynchronous event's callback has run. Note this will not be called -if the callback throws and the error is not handled. - -* `error(userData, error)`: A `Function` called if the event's -callback threw. If this registered callback returns `true` then Node will -assume the error has been properly handled and resume execution normally. -When multiple `error()` callbacks have been registered only **one** of -those callbacks needs to return `true` for `AsyncListener` to accept that -the error has been handled, but all `error()` callbacks will always be run. - -`userData`: A `Value` (i.e. anything) that will be, by default, -attached to all new event instances. This will be overwritten if a `Value` -is returned by `create()`. - -Here is an example of overwriting the `userData`: - - tracing.createAsyncListener({ - create: function listener(value) { - // value === true - return false; - }, { - before: function before(context, value) { - // value === false - } - }, true); - -**Note:** The [EventEmitter][], while used to emit status of an asynchronous -event, is not itself asynchronous. So `create()` will not fire when -an event is added, and `before()`/`after()` will not fire when emitted -callbacks are called. - - -## tracing.addAsyncListener(callbacksObj[, userData]) -## tracing.addAsyncListener(asyncListener) - -Returns a constructed `AsyncListener` object and immediately adds it to -the listening queue to begin capturing asynchronous events. - -Function parameters can either be the same as -[`tracing.createAsyncListener()`][], or a constructed `AsyncListener` -object. - -Example usage for capturing errors: - - var fs = require('fs'); - - var cntr = 0; - var key = tracing.addAsyncListener({ - create: function onCreate() { - return { uid: cntr++ }; - }, - before: function onBefore(context, storage) { - // Write directly to stdout or we'll enter a recursive loop - fs.writeSync(1, 'uid: ' + storage.uid + ' is about to run\n'); - }, - after: function onAfter(context, storage) { - fs.writeSync(1, 'uid: ' + storage.uid + ' ran\n'); - }, - error: function onError(storage, err) { - // Handle known errors - if (err.message === 'everything is fine') { - // Writing to stderr this time. - fs.writeSync(2, 'handled error just threw:\n'); - fs.writeSync(2, err.stack + '\n'); - return true; - } - } - }); - - process.nextTick(function() { - throw new Error('everything is fine'); - }); - - // Output: - // uid: 0 is about to run - // handled error just threw: - // Error: really, it's ok - // at /tmp/test2.js:27:9 - // at process._tickCallback (node.js:583:11) - // at Function.Module.runMain (module.js:492:11) - // at startup (node.js:123:16) - // at node.js:1012:3 - -## tracing.removeAsyncListener(asyncListener) - -Removes the `AsyncListener` from the listening queue. - -Removing the `AsyncListener` from the active queue does _not_ mean the -`asyncListener` callbacks will cease to fire on the events they've been -registered. Subsequently, any asynchronous events fired during the -execution of a callback will also have the same `asyncListener` callbacks -attached for future execution. For example: - - var fs = require('fs'); - - var key = tracing.createAsyncListener({ - create: function asyncListener() { - // Write directly to stdout or we'll enter a recursive loop - fs.writeSync(1, 'You summoned me?\n'); - } - }); - - // We want to begin capturing async events some time in the future. - setTimeout(function() { - tracing.addAsyncListener(key); - - // Perform a few additional async events. - setTimeout(function() { - setImmediate(function() { - process.nextTick(function() { }); - }); - }); - - // Removing the listener doesn't mean to stop capturing events that - // have already been added. - tracing.removeAsyncListener(key); - }, 100); - - // Output: - // You summoned me? - // You summoned me? - // You summoned me? - // You summoned me? - -The fact that we logged 4 asynchronous events is an implementation detail -of Node's [Timers][]. - -To stop capturing from a specific asynchronous event stack -`tracing.removeAsyncListener()` must be called from within the call -stack itself. For example: - - var fs = require('fs'); - - var key = tracing.createAsyncListener({ - create: function asyncListener() { - // Write directly to stdout or we'll enter a recursive loop - fs.writeSync(1, 'You summoned me?\n'); - } - }); - - // We want to begin capturing async events some time in the future. - setTimeout(function() { - tracing.addAsyncListener(key); - - // Perform a few additional async events. - setImmediate(function() { - // Stop capturing from this call stack. - tracing.removeAsyncListener(key); - - process.nextTick(function() { }); - }); - }, 100); - - // Output: - // You summoned me? - -The user must be explicit and always pass the `AsyncListener` they wish -to remove. It is not possible to simply remove all listeners at once. - - -[EventEmitter]: events.html#events_class_events_eventemitter -[Timers]: timers.html -[`tracing.createAsyncListener()`]: #tracing_tracing_createasynclistener_asynclistener_callbacksobj_storagevalue -[`tracing.addAsyncListener()`]: #tracing_tracing_addasynclistener_asynclistener -[`tracing.removeAsyncListener()`]: #tracing_tracing_removeasynclistener_asynclistener diff -Nru nodejs-0.11.14/doc/api/tty.html nodejs-0.11.15/doc/api/tty.html --- nodejs-0.11.14/doc/api/tty.html 2014-09-24 21:54:32.000000000 +0000 +++ nodejs-0.11.15/doc/api/tty.html 2015-01-20 22:11:38.000000000 +0000 @@ -2,36 +2,41 @@ - TTY Node.js v0.11.14 Manual & Documentation + TTY Node.js v0.11.15 Manual & Documentation + + - -
      - - - + + +
      - - +
      -

      Node.js v0.11.14 Manual & Documentation

      +

      Node.js v0.11.15 Manual & Documentation

      Index | @@ -143,26 +148,48 @@

      +
      + +
      - - + + + - -
      - - - + + +
      - - +
      -

      Node.js v0.11.14 Manual & Documentation

      +

      Node.js v0.11.15 Manual & Documentation

      Index | @@ -46,7 +51,7 @@

      Table of Contents

      • URL @@ -114,13 +119,14 @@

        The following methods are provided by the URL module:

        -

        url.parse(urlStr, [parseQueryString], [slashesDenoteHost])#

        +

        url.parse(urlStr[, parseQueryString][, slashesDenoteHost])#

        Take a URL string, and return an object.

        -

        Pass true as the second argument to also parse -the query string using the querystring module. -Defaults to false. +

        Pass true as the second argument to also parse the query string using the +querystring module. If true then the query property will always be +assigned an object, and the search property will always be a (possibly +empty) string. Defaults to false.

        Pass true as the third argument to treat //foo/bar as @@ -132,6 +138,9 @@

        Take a parsed URL object, and return a formatted URL string.

        +

        Here's how the formatting process works: + +

        • href will be ignored.
        • protocol is treated the same with or without the trailing : (colon).
            @@ -150,11 +159,14 @@
          • hostname will only be used if host is absent.
          • port will only be used if host is absent.
          • host will be used in place of hostname and port
          • -
          • pathname is treated the same with or without the leading / (slash)
          • -
          • search will be used in place of query
          • +
          • pathname is treated the same with or without the leading / (slash).
          • +
          • path is treated the same with pathname but able to contain query as well.
          • +
          • search will be used in place of query.
              +
            • It is treated the same with or without the leading ? (question mark)
            • +
            +
          • query (object; see querystring) will only be used if search is absent.
          • -
          • search is treated the same with or without the leading ? (question mark)
          • -
          • hash is treated the same with or without the leading # (pound sign, anchor)
          • +
          • hash is treated the same with or without the leading # (pound sign, anchor).

          url.resolve(from, to)#

          Take a base URL, and a href URL, and resolve them as a browser would for @@ -168,26 +180,48 @@

      +
      + +
      - - + + + - -
      - - - + + +
      - - +
      -

      Node.js v0.11.14 Manual & Documentation

      +

      Node.js v0.11.15 Manual & Documentation

      Index | @@ -47,9 +52,9 @@

      +
      + +
      - - + + + - -
      - - - + + +
      - - +
      -

      Node.js v0.11.14 Manual & Documentation

      +

      Node.js v0.11.15 Manual & Documentation

      Index | @@ -46,17 +51,17 @@

      Table of Contents

      -

      script.runInContext(contextifiedSandbox, [options])#

      +

      script.runInContext(contextifiedSandbox[, options])#

      Similar to vm.runInContext but a method of a precompiled Script object. script.runInContext runs script's compiled code in contextifiedSandbox and returns the result. Running code does not have access to local scope. @@ -312,7 +317,7 @@

      -

      script.runInNewContext([sandbox], [options])#

      +

      script.runInNewContext([sandbox][, options])#

      Similar to vm.runInNewContext but a method of a precompiled Script object. script.runInNewContext contextifies sandbox if passed or creates a new contextified sandbox if it's omitted, and then runs script's compiled code @@ -350,26 +355,48 @@

      +
      + +
      - - + + + - -
      - - - + + +
      - - +
      -

      Node.js v0.11.14 Manual & Documentation

      +

      Node.js v0.11.15 Manual & Documentation

      Index | @@ -68,20 +73,20 @@

    • Class: zlib.InflateRaw
    • Class: zlib.Unzip
    • Convenience Methods
    • -
    • zlib.deflate(buf, [options], callback)
    • -
    • zlib.deflateSync(buf, [options])
    • -
    • zlib.deflateRaw(buf, [options], callback)
    • -
    • zlib.deflateRawSync(buf, [options])
    • -
    • zlib.gzip(buf, [options], callback)
    • -
    • zlib.gzipSync(buf, [options])
    • -
    • zlib.gunzip(buf, [options], callback)
    • -
    • zlib.gunzipSync(buf, [options])
    • -
    • zlib.inflate(buf, [options], callback)
    • -
    • zlib.inflateSync(buf, [options])
    • -
    • zlib.inflateRaw(buf, [options], callback)
    • -
    • zlib.inflateRawSync(buf, [options])
    • -
    • zlib.unzip(buf, [options], callback)
    • -
    • zlib.unzipSync(buf, [options])
    • +
    • zlib.deflate(buf[, options], callback)
    • +
    • zlib.deflateSync(buf[, options])
    • +
    • zlib.deflateRaw(buf[, options], callback)
    • +
    • zlib.deflateRawSync(buf[, options])
    • +
    • zlib.gzip(buf[, options], callback)
    • +
    • zlib.gzipSync(buf[, options])
    • +
    • zlib.gunzip(buf[, options], callback)
    • +
    • zlib.gunzipSync(buf[, options])
    • +
    • zlib.inflate(buf[, options], callback)
    • +
    • zlib.inflateSync(buf[, options])
    • +
    • zlib.inflateRaw(buf[, options], callback)
    • +
    • zlib.inflateRawSync(buf[, options])
    • +
    • zlib.unzip(buf[, options], callback)
    • +
    • zlib.unzipSync(buf[, options])
    • Options
    • Memory Usage Tuning
    • Constants
    • @@ -295,38 +300,38 @@ without a callback.

      -

      zlib.deflate(buf, [options], callback)#

      -

      zlib.deflateSync(buf, [options])#

      +

      zlib.deflate(buf[, options], callback)#

      +

      zlib.deflateSync(buf[, options])#

      Compress a string with Deflate.

      -

      zlib.deflateRaw(buf, [options], callback)#

      -

      zlib.deflateRawSync(buf, [options])#

      +

      zlib.deflateRaw(buf[, options], callback)#

      +

      zlib.deflateRawSync(buf[, options])#

      Compress a string with DeflateRaw.

      -

      zlib.gzip(buf, [options], callback)#

      -

      zlib.gzipSync(buf, [options])#

      +

      zlib.gzip(buf[, options], callback)#

      +

      zlib.gzipSync(buf[, options])#

      Compress a string with Gzip.

      -

      zlib.gunzip(buf, [options], callback)#

      -

      zlib.gunzipSync(buf, [options])#

      +

      zlib.gunzip(buf[, options], callback)#

      +

      zlib.gunzipSync(buf[, options])#

      Decompress a raw Buffer with Gunzip.

      -

      zlib.inflate(buf, [options], callback)#

      -

      zlib.inflateSync(buf, [options])#

      +

      zlib.inflate(buf[, options], callback)#

      +

      zlib.inflateSync(buf[, options])#

      Decompress a raw Buffer with Inflate.

      -

      zlib.inflateRaw(buf, [options], callback)#

      -

      zlib.inflateRawSync(buf, [options])#

      +

      zlib.inflateRaw(buf[, options], callback)#

      +

      zlib.inflateRawSync(buf[, options])#

      Decompress a raw Buffer with InflateRaw.

      -

      zlib.unzip(buf, [options], callback)#

      -

      zlib.unzipSync(buf, [options])#

      +

      zlib.unzip(buf[, options], callback)#

      +

      zlib.unzipSync(buf[, options])#

      Decompress a raw Buffer with Unzip.

      @@ -485,26 +490,48 @@
      +
      + +
      - - + + + - -
      - - - + + +
      - - +

      Node.js __VERSION__ Manual & Documentation

      @@ -52,26 +57,48 @@
      +
      + + - - + +