From 93525287791c8b16012a146623982d31e1f18775 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 3 Mar 2017 11:02:20 +0100 Subject: [PATCH 001/485] src: remove outdated FIXME in node_crypto.cc Issue 4641 contains a FIXME regarding the InitCrypto function. After discussing this with bnoordhuis it seems to be an outdated comment. Refs: https://github.com/nodejs/node/issues/4641 PR-URL: https://github.com/nodejs/node/pull/11669 Reviewed-By: Gibson Fahnestock Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- src/node_crypto.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index a06e00df1654a5..f4b0506a15e4d1 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5999,7 +5999,6 @@ void SetFipsCrypto(const FunctionCallbackInfo& args) { #endif /* NODE_FIPS_MODE */ } -// FIXME(bnoordhuis) Handle global init correctly. void InitCrypto(Local target, Local unused, Local context, From 1402fef098309bf7fd902d0be86cd8a1a3e07b86 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 1 Mar 2017 08:16:48 +0100 Subject: [PATCH 002/485] test: make tests pass when configured without-ssl Currently when node is build --without-ssl and the test are run, there are a number of failing test due to tests expecting crypto support to be available. This commit fixes fixes the failure and instead skips the tests that expect crypto to be available. PR-URL: https://github.com/nodejs/node/pull/11631 Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- test/addons/openssl-binding/binding.gyp | 8 +++++-- test/addons/openssl-binding/test.js | 4 ++++ test/common.js | 7 +++++++ test/fixtures/tls-connect.js | 16 ++++++-------- test/inspector/test-inspector.js | 3 ++- test/inspector/test-not-blocked-on-idle.js | 3 ++- .../test-cluster-inspector-debug-port.js | 1 + test/parallel/test-tls-addca.js | 2 +- test/parallel/test-tls-ca-concat.js | 2 +- test/parallel/test-tls-cert-chains-concat.js | 2 +- test/parallel/test-tls-cert-chains-in-ca.js | 2 +- .../test-tls-connect-secure-context.js | 2 +- test/parallel/test-tls-peer-certificate.js | 2 +- .../test-tls-socket-default-options.js | 5 ----- test/sequential/test-debugger-debug-brk.js | 1 + test/testpy/__init__.py | 14 ++++++++++++- tools/test.py | 21 +++++++++++++++++-- 17 files changed, 67 insertions(+), 28 deletions(-) diff --git a/test/addons/openssl-binding/binding.gyp b/test/addons/openssl-binding/binding.gyp index 672f84bb860a9d..bafde41348ce3a 100644 --- a/test/addons/openssl-binding/binding.gyp +++ b/test/addons/openssl-binding/binding.gyp @@ -2,8 +2,12 @@ 'targets': [ { 'target_name': 'binding', - 'sources': ['binding.cc'], - 'include_dirs': ['../../../deps/openssl/openssl/include'], + 'conditions': [ + ['node_use_openssl=="true"', { + 'sources': ['binding.cc'], + 'include_dirs': ['../../../deps/openssl/openssl/include'], + }] + ] }, ] } diff --git a/test/addons/openssl-binding/test.js b/test/addons/openssl-binding/test.js index a146ffe5c68f1b..452f59f752f5e5 100644 --- a/test/addons/openssl-binding/test.js +++ b/test/addons/openssl-binding/test.js @@ -1,6 +1,10 @@ 'use strict'; const common = require('../../common'); +if (!common.hasCrypto) { + common.skip('missing crypto'); + process.exit(0); +} const assert = require('assert'); const binding = require(`./build/${common.buildType}/binding`); const bytes = new Uint8Array(1024); diff --git a/test/common.js b/test/common.js index 6c7ea387e38904..9f73e2e8820ec3 100644 --- a/test/common.js +++ b/test/common.js @@ -638,3 +638,10 @@ exports.expectsError = function expectsError({code, type, message}) { return true; }; }; + +exports.skipIfInspectorDisabled = function skipIfInspectorDisabled() { + if (!exports.hasCrypto) { + exports.skip('missing ssl support so inspector is disabled'); + process.exit(0); + } +}; diff --git a/test/fixtures/tls-connect.js b/test/fixtures/tls-connect.js index 72f83736bf370e..a434a0316d6fb5 100644 --- a/test/fixtures/tls-connect.js +++ b/test/fixtures/tls-connect.js @@ -6,19 +6,15 @@ const common = require('../common'); const fs = require('fs'); const join = require('path').join; +// Check if Node was compiled --without-ssl and if so exit early +// as the require of tls will otherwise throw an Error. +if (!common.hasCrypto) { + common.skip('missing crypto'); + process.exit(0); +} const tls = require('tls'); const util = require('util'); -module.exports = exports = checkCrypto; - -function checkCrypto() { - if (!common.hasCrypto) { - common.skip('missing crypto'); - process.exit(0); - } - return exports; -} - exports.assert = require('assert'); exports.debug = util.debuglog('test'); exports.tls = tls; diff --git a/test/inspector/test-inspector.js b/test/inspector/test-inspector.js index a1c69cb6fbb2fe..5cad934e7a51f9 100644 --- a/test/inspector/test-inspector.js +++ b/test/inspector/test-inspector.js @@ -1,5 +1,6 @@ 'use strict'; -require('../common'); +const common = require('../common'); +common.skipIfInspectorDisabled(); const assert = require('assert'); const helper = require('./inspector-helper.js'); diff --git a/test/inspector/test-not-blocked-on-idle.js b/test/inspector/test-not-blocked-on-idle.js index 6d32888b44b802..a33e530a548d78 100644 --- a/test/inspector/test-not-blocked-on-idle.js +++ b/test/inspector/test-not-blocked-on-idle.js @@ -1,5 +1,6 @@ 'use strict'; -require('../common'); +const common = require('../common'); +common.skipIfInspectorDisabled(); const helper = require('./inspector-helper.js'); function shouldShutDown(session) { diff --git a/test/parallel/test-cluster-inspector-debug-port.js b/test/parallel/test-cluster-inspector-debug-port.js index f2f8db9b5d5890..f0e0f58a8655c9 100644 --- a/test/parallel/test-cluster-inspector-debug-port.js +++ b/test/parallel/test-cluster-inspector-debug-port.js @@ -1,6 +1,7 @@ 'use strict'; // Flags: --inspect={PORT} const common = require('../common'); +common.skipIfInspectorDisabled(); const assert = require('assert'); const cluster = require('cluster'); const debuggerPort = common.PORT; diff --git a/test/parallel/test-tls-addca.js b/test/parallel/test-tls-addca.js index 7a6f9a77516e22..f3f5e5b8dea107 100644 --- a/test/parallel/test-tls-addca.js +++ b/test/parallel/test-tls-addca.js @@ -8,7 +8,7 @@ const common = require('../common'); const join = require('path').join; const { assert, connect, keys, tls -} = require(join(common.fixturesDir, 'tls-connect'))(); +} = require(join(common.fixturesDir, 'tls-connect')); const contextWithoutCert = tls.createSecureContext({}); const contextWithCert = tls.createSecureContext({}); diff --git a/test/parallel/test-tls-ca-concat.js b/test/parallel/test-tls-ca-concat.js index 65c837bed9dc37..0c1908049be830 100644 --- a/test/parallel/test-tls-ca-concat.js +++ b/test/parallel/test-tls-ca-concat.js @@ -7,7 +7,7 @@ const common = require('../common'); const join = require('path').join; const { assert, connect, keys -} = require(join(common.fixturesDir, 'tls-connect'))(); +} = require(join(common.fixturesDir, 'tls-connect')); connect({ client: { diff --git a/test/parallel/test-tls-cert-chains-concat.js b/test/parallel/test-tls-cert-chains-concat.js index d53edef89842b9..a90ed67997ee22 100644 --- a/test/parallel/test-tls-cert-chains-concat.js +++ b/test/parallel/test-tls-cert-chains-concat.js @@ -7,7 +7,7 @@ const common = require('../common'); const join = require('path').join; const { assert, connect, debug, keys -} = require(join(common.fixturesDir, 'tls-connect'))(); +} = require(join(common.fixturesDir, 'tls-connect')); // agent6-cert.pem includes cert for agent6 and ca3 connect({ diff --git a/test/parallel/test-tls-cert-chains-in-ca.js b/test/parallel/test-tls-cert-chains-in-ca.js index 3b4e78919fb8b4..03fae36cb74a57 100644 --- a/test/parallel/test-tls-cert-chains-in-ca.js +++ b/test/parallel/test-tls-cert-chains-in-ca.js @@ -7,7 +7,7 @@ const common = require('../common'); const join = require('path').join; const { assert, connect, debug, keys -} = require(join(common.fixturesDir, 'tls-connect'))(); +} = require(join(common.fixturesDir, 'tls-connect')); // agent6-cert.pem includes cert for agent6 and ca3, split it apart and diff --git a/test/parallel/test-tls-connect-secure-context.js b/test/parallel/test-tls-connect-secure-context.js index d1552a62169207..ef063c2ed3a41d 100644 --- a/test/parallel/test-tls-connect-secure-context.js +++ b/test/parallel/test-tls-connect-secure-context.js @@ -6,7 +6,7 @@ const common = require('../common'); const join = require('path').join; const { assert, connect, keys, tls -} = require(join(common.fixturesDir, 'tls-connect'))(); +} = require(join(common.fixturesDir, 'tls-connect')); connect({ client: { diff --git a/test/parallel/test-tls-peer-certificate.js b/test/parallel/test-tls-peer-certificate.js index eb5be6dcb2241b..8c56e72af14632 100644 --- a/test/parallel/test-tls-peer-certificate.js +++ b/test/parallel/test-tls-peer-certificate.js @@ -6,7 +6,7 @@ const common = require('../common'); const join = require('path').join; const { assert, connect, debug, keys -} = require(join(common.fixturesDir, 'tls-connect'))(); +} = require(join(common.fixturesDir, 'tls-connect')); connect({ client: {rejectUnauthorized: false}, diff --git a/test/parallel/test-tls-socket-default-options.js b/test/parallel/test-tls-socket-default-options.js index 24b7a5d34ec0fb..edf16a6bffc78d 100644 --- a/test/parallel/test-tls-socket-default-options.js +++ b/test/parallel/test-tls-socket-default-options.js @@ -9,11 +9,6 @@ const { connect, keys, tls } = require(join(common.fixturesDir, 'tls-connect')); -if (!common.hasCrypto) { - common.skip('missing crypto'); - return; -} - test(undefined, (err) => { assert.strictEqual(err.message, 'unable to verify the first certificate'); }); diff --git a/test/sequential/test-debugger-debug-brk.js b/test/sequential/test-debugger-debug-brk.js index f04af4544f88a2..f5a69b91d6b536 100644 --- a/test/sequential/test-debugger-debug-brk.js +++ b/test/sequential/test-debugger-debug-brk.js @@ -1,5 +1,6 @@ 'use strict'; const common = require('../common'); +common.skipIfInspectorDisabled(); const assert = require('assert'); const spawn = require('child_process').spawn; diff --git a/test/testpy/__init__.py b/test/testpy/__init__.py index 367346f6e1509d..d7ec88992e2366 100644 --- a/test/testpy/__init__.py +++ b/test/testpy/__init__.py @@ -29,6 +29,7 @@ import os from os.path import join, dirname, exists import re +import ast FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)") @@ -64,7 +65,18 @@ def GetCommand(self): # PORT should match the definition in test/common.js. env = { 'PORT': int(os.getenv('NODE_COMMON_PORT', '12346')) } env['PORT'] += self.thread_id * 100 - result += flags_match.group(1).strip().format(**env).split() + flag = flags_match.group(1).strip().format(**env).split() + # The following block reads config.gypi to extract the v8_enable_inspector + # value. This is done to check if the inspector is disabled in which case + # the '--inspect' flag cannot be passed to the node process as it will + # cause node to exit and report the test as failed. The use case + # is currently when Node is configured --without-ssl and the tests should + # still be runnable but skip any tests that require ssl (which includes the + # inspector related tests). + if flag[0].startswith('--inspect') and self.context.v8_enable_inspector == 0: + print('Skipping as inspector is disabled') + else: + result += flag files_match = FILES_PATTERN.search(source); additional_files = [] if files_match: diff --git a/tools/test.py b/tools/test.py index d6715937b60da3..deeb7aeffe2e02 100755 --- a/tools/test.py +++ b/tools/test.py @@ -43,6 +43,7 @@ import multiprocessing import errno import copy +import ast from os.path import join, dirname, abspath, basename, isdir, exists from datetime import datetime @@ -867,7 +868,8 @@ class Context(object): def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail, timeout, processor, suppress_dialogs, - store_unexpected_output, repeat, abort_on_timeout): + store_unexpected_output, repeat, abort_on_timeout, + v8_enable_inspector): self.workspace = workspace self.buildspace = buildspace self.verbose = verbose @@ -880,6 +882,7 @@ def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail, self.store_unexpected_output = store_unexpected_output self.repeat = repeat self.abort_on_timeout = abort_on_timeout + self.v8_enable_inspector = v8_enable_inspector def GetVm(self, arch, mode): if arch == 'none': @@ -912,6 +915,19 @@ def RunTestCases(cases_to_run, progress, tasks, flaky_tests_mode): progress = PROGRESS_INDICATORS[progress](cases_to_run, flaky_tests_mode) return progress.Run(tasks) +def GetV8InspectorEnabledFlag(): + # The following block reads config.gypi to extract the v8_enable_inspector + # value. This is done to check if the inspector is disabled in which case + # the '--inspect' flag cannot be passed to the node process as it will + # cause node to exit and report the test as failed. The use case + # is currently when Node is configured --without-ssl and the tests should + # still be runnable but skip any tests that require ssl (which includes the + # inspector related tests). + with open('config.gypi', 'r') as f: + s = f.read() + config_gypi = ast.literal_eval(s) + return config_gypi['variables']['v8_enable_inspector'] + # ------------------------------------------- # --- T e s t C o n f i g u r a t i o n --- @@ -1587,7 +1603,8 @@ def Main(): options.suppress_dialogs, options.store_unexpected_output, options.repeat, - options.abort_on_timeout) + options.abort_on_timeout, + GetV8InspectorEnabledFlag()) # Get status for tests sections = [ ] From 531de63c144768b70eb9f5e66a88ad885edbfd9f Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 27 Feb 2017 17:54:16 -0800 Subject: [PATCH 003/485] dns: minor refactor of dns module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move to the more efficient module.exports = {} pattern. PR-URL: https://github.com/nodejs/node/pull/11597 Reviewed-By: Colin Ihrig Reviewed-By: Claudio Rodriguez Reviewed-By: Michaël Zasso --- lib/dns.js | 130 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 74 insertions(+), 56 deletions(-) diff --git a/lib/dns.js b/lib/dns.js index cfa04ed192050f..1f22c91c78c27a 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -99,7 +99,7 @@ function onlookupall(err, addresses) { // Easy DNS A/AAAA look up // lookup(hostname, [options,] callback) -exports.lookup = function lookup(hostname, options, callback) { +function lookup(hostname, options, callback) { var hints = 0; var family = -1; var all = false; @@ -119,9 +119,9 @@ exports.lookup = function lookup(hostname, options, callback) { all = options.all === true; if (hints !== 0 && - hints !== exports.ADDRCONFIG && - hints !== exports.V4MAPPED && - hints !== (exports.ADDRCONFIG | exports.V4MAPPED)) { + hints !== cares.AI_ADDRCONFIG && + hints !== cares.AI_V4MAPPED && + hints !== (cares.AI_ADDRCONFIG | cares.AI_V4MAPPED)) { throw new TypeError('Invalid argument: hints must use valid flags'); } } else { @@ -166,7 +166,7 @@ exports.lookup = function lookup(hostname, options, callback) { callback.immediately = true; return req; -}; +} function onlookupservice(err, host, service) { @@ -178,7 +178,7 @@ function onlookupservice(err, host, service) { // lookupService(address, port, callback) -exports.lookupService = function lookupService(host, port, callback) { +function lookupService(host, port, callback) { if (arguments.length !== 3) throw new Error('Invalid arguments'); @@ -205,7 +205,7 @@ exports.lookupService = function lookupService(host, port, callback) { callback.immediately = true; return req; -}; +} function onresolve(err, result, ttls) { @@ -251,26 +251,25 @@ function resolver(bindingName) { var resolveMap = Object.create(null); -exports.resolve4 = resolveMap.A = resolver('queryA'); -exports.resolve6 = resolveMap.AAAA = resolver('queryAaaa'); -exports.resolveCname = resolveMap.CNAME = resolver('queryCname'); -exports.resolveMx = resolveMap.MX = resolver('queryMx'); -exports.resolveNs = resolveMap.NS = resolver('queryNs'); -exports.resolveTxt = resolveMap.TXT = resolver('queryTxt'); -exports.resolveSrv = resolveMap.SRV = resolver('querySrv'); -exports.resolvePtr = resolveMap.PTR = resolver('queryPtr'); -exports.resolveNaptr = resolveMap.NAPTR = resolver('queryNaptr'); -exports.resolveSoa = resolveMap.SOA = resolver('querySoa'); -exports.reverse = resolver('getHostByAddr'); - - -exports.resolve = function resolve(hostname, type_, callback_) { +resolveMap.A = resolver('queryA'); +resolveMap.AAAA = resolver('queryAaaa'); +resolveMap.CNAME = resolver('queryCname'); +resolveMap.MX = resolver('queryMx'); +resolveMap.NS = resolver('queryNs'); +resolveMap.TXT = resolver('queryTxt'); +resolveMap.SRV = resolver('querySrv'); +resolveMap.PTR = resolver('queryPtr'); +resolveMap.NAPTR = resolver('queryNaptr'); +resolveMap.SOA = resolver('querySoa'); + + +function resolve(hostname, type_, callback_) { var resolver, callback; if (typeof type_ === 'string') { resolver = resolveMap[type_]; callback = callback_; } else if (typeof type_ === 'function') { - resolver = exports.resolve4; + resolver = resolveMap.A; callback = type_; } else { throw new Error('"type" argument must be a string'); @@ -281,15 +280,15 @@ exports.resolve = function resolve(hostname, type_, callback_) { } else { throw new Error(`Unknown type "${type_}"`); } -}; +} -exports.getServers = function getServers() { +function getServers() { return cares.getServers(); -}; +} -exports.setServers = function setServers(servers) { +function setServers(servers) { // cache the original servers because in the event of an error setting the // servers cares won't have any servers available for resolution const orig = cares.getServers(); @@ -326,34 +325,53 @@ exports.setServers = function setServers(servers) { var err = cares.strerror(errorNumber); throw new Error(`c-ares failed to set servers: "${err}" [${servers}]`); } -}; +} -// uv_getaddrinfo flags -exports.ADDRCONFIG = cares.AI_ADDRCONFIG; -exports.V4MAPPED = cares.AI_V4MAPPED; - -// ERROR CODES -exports.NODATA = 'ENODATA'; -exports.FORMERR = 'EFORMERR'; -exports.SERVFAIL = 'ESERVFAIL'; -exports.NOTFOUND = 'ENOTFOUND'; -exports.NOTIMP = 'ENOTIMP'; -exports.REFUSED = 'EREFUSED'; -exports.BADQUERY = 'EBADQUERY'; -exports.BADNAME = 'EBADNAME'; -exports.BADFAMILY = 'EBADFAMILY'; -exports.BADRESP = 'EBADRESP'; -exports.CONNREFUSED = 'ECONNREFUSED'; -exports.TIMEOUT = 'ETIMEOUT'; -exports.EOF = 'EOF'; -exports.FILE = 'EFILE'; -exports.NOMEM = 'ENOMEM'; -exports.DESTRUCTION = 'EDESTRUCTION'; -exports.BADSTR = 'EBADSTR'; -exports.BADFLAGS = 'EBADFLAGS'; -exports.NONAME = 'ENONAME'; -exports.BADHINTS = 'EBADHINTS'; -exports.NOTINITIALIZED = 'ENOTINITIALIZED'; -exports.LOADIPHLPAPI = 'ELOADIPHLPAPI'; -exports.ADDRGETNETWORKPARAMS = 'EADDRGETNETWORKPARAMS'; -exports.CANCELLED = 'ECANCELLED'; +module.exports = { + lookup, + lookupService, + getServers, + setServers, + resolve, + resolve4: resolveMap.A, + resolve6: resolveMap.AAAA, + resolveCname: resolveMap.CNAME, + resolveMx: resolveMap.MX, + resolveNs: resolveMap.NS, + resolveTxt: resolveMap.TXT, + resolveSrv: resolveMap.SRV, + resolvePtr: resolveMap.PTR, + resolveNaptr: resolveMap.NAPTR, + resolveSoa: resolveMap.SOA, + reverse: resolver('getHostByAddr'), + + // uv_getaddrinfo flags + ADDRCONFIG: cares.AI_ADDRCONFIG, + V4MAPPED: cares.AI_V4MAPPED, + + // ERROR CODES + NODATA: 'ENODATA', + FORMERR: 'EFORMERR', + SERVFAIL: 'ESERVFAIL', + NOTFOUND: 'ENOTFOUND', + NOTIMP: 'ENOTIMP', + REFUSED: 'EREFUSED', + BADQUERY: 'EBADQUERY', + BADNAME: 'EBADNAME', + BADFAMILY: 'EBADFAMILY', + BADRESP: 'EBADRESP', + CONNREFUSED: 'ECONNREFUSED', + TIMEOUT: 'ETIMEOUT', + EOF: 'EOF', + FILE: 'EFILE', + NOMEM: 'ENOMEM', + DESTRUCTION: 'EDESTRUCTION', + BADSTR: 'EBADSTR', + BADFLAGS: 'EBADFLAGS', + NONAME: 'ENONAME', + BADHINTS: 'EBADHINTS', + NOTINITIALIZED: 'ENOTINITIALIZED', + LOADIPHLPAPI: 'ELOADIPHLPAPI', + ADDRGETNETWORKPARAMS: 'EADDRGETNETWORKPARAMS', + CANCELLED: 'ECANCELLED' +}; From 94d1c8d1b0f85faba7c594631d1065eee957afda Mon Sep 17 00:00:00 2001 From: maurice_hayward Date: Mon, 27 Feb 2017 16:37:05 -0500 Subject: [PATCH 004/485] test: changed test1 of test-vm-timeout.js test: changed test1 of test-vm-timeout.js so that entire error message would be matched in assert.throw. Before test 1 of test-vm-timeout.js would match any error, now it looks specifically for the error message "Script execution timed out." PR-URL: https://github.com/nodejs/node/pull/11590 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- test/parallel/test-vm-timeout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-vm-timeout.js b/test/parallel/test-vm-timeout.js index 5260ca7dc28572..6ed73f8b4ffd78 100644 --- a/test/parallel/test-vm-timeout.js +++ b/test/parallel/test-vm-timeout.js @@ -6,7 +6,7 @@ const vm = require('vm'); // Test 1: Timeout of 100ms executing endless loop assert.throws(function() { vm.runInThisContext('while(true) {}', { timeout: 100 }); -}); +}, /^Error: Script execution timed out\.$/); // Test 2: Timeout must be >= 0ms assert.throws(function() { From 70beef97bdf21b52632492c3b54b067a331ea068 Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Thu, 23 Feb 2017 02:04:48 -0500 Subject: [PATCH 005/485] v8: add cachedDataVersionTag Adds `v8.cachedDataVersionTag()`, which returns an integer representing the version tag for `cachedData` for the current V8 version & flags. PR-URL: https://github.com/nodejs/node/pull/11515 Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis --- doc/api/v8.md | 11 +++++++++++ lib/v8.js | 1 + src/node_v8.cc | 13 +++++++++++++ test/parallel/test-v8-version-tag.js | 19 +++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 test/parallel/test-v8-version-tag.js diff --git a/doc/api/v8.md b/doc/api/v8.md index be222bbabf63ed..173d0abeefcdc6 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -9,6 +9,16 @@ const v8 = require('v8'); *Note*: The APIs and implementation are subject to change at any time. +## v8.cachedDataVersionTag() + + +Returns an integer representing a "version tag" derived from the V8 version, +command line flags and detected CPU features. This is useful for determining +whether a [`vm.Script`][] `cachedData` buffer is compatible with this instance +of V8. + ## v8.getHeapSpaceStatistics() From 51cea054a276c6425e26b25219e67b37207dee3f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 2 Mar 2017 10:37:20 -0800 Subject: [PATCH 009/485] doc: remove Locked from stability index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stability index 3 (Locked) is unused and is being eliminated. Remove it from the documentation about the stability index. Remove mention of the Locked from CONTRIBUTING.md. The remaining text about the stability index is slight and not seemingly valuable. Removing it too. PR-URL: https://github.com/nodejs/node/pull/11661 Ref: https://github.com/nodejs/node/issues/11200 Reviewed-By: Anna Henningsen Reviewed-By: Sam Roberts Reviewed-By: Gibson Fahnestock Reviewed-By: Michael Dawson Reviewed-By: Michaël Zasso Reviewed-By: Сковорода Никита Андреевич Reviewed-By: James M Snell --- CONTRIBUTING.md | 9 --------- doc/api/documentation.md | 6 ------ 2 files changed, 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf3dbd0ad0e163..290cad8faaeb7a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,15 +46,6 @@ $ git remote add upstream git://github.com/nodejs/node.git For developing new features and bug fixes, the `master` branch should be pulled and built upon. -#### Respect the stability index - -The rules for the master branch are less strict; consult the -[stability index](./doc/api/documentation.md#stability-index) for details. - -In a nutshell, modules are at varying levels of API stability. Bug fixes are -always welcome but API or behavioral changes to modules at stability level 3 -(Locked) are off-limits. - #### Dependencies Node.js has several bundled dependencies in the *deps/* and the *tools/* diff --git a/doc/api/documentation.md b/doc/api/documentation.md index 947010d951bdab..5f45c9b56ed387 100644 --- a/doc/api/documentation.md +++ b/doc/api/documentation.md @@ -56,12 +56,6 @@ The API has proven satisfactory. Compatibility with the npm ecosystem is a high priority, and will not be broken unless absolutely necessary. ``` -```txt -Stability: 3 - Locked -Only bug fixes, security fixes, and performance improvements will be accepted. -Please do not suggest API changes in this area; they will be refused. -``` - ## JSON Output > Stability: 1 - Experimental From 0674771f233bd79ea2d9c61e072a89487321f533 Mon Sep 17 00:00:00 2001 From: Poker <306766053@qq.com> Date: Fri, 3 Mar 2017 19:36:22 +0800 Subject: [PATCH 010/485] doc: fix broken URL to event loop guide PR-URL: https://github.com/nodejs/node/pull/11670 Reviewed-By: Colin Ihrig Reviewed-By: Yuta Hiroto Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- doc/api/timers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/timers.md b/doc/api/timers.md index 09c43bfeaa3532..df48905001e19b 100644 --- a/doc/api/timers.md +++ b/doc/api/timers.md @@ -163,7 +163,7 @@ added: v0.0.1 Cancels a `Timeout` object created by [`setTimeout()`][]. -[the Node.js Event Loop]: https://github.com/nodejs/node/blob/master/doc/topics/event-loop-timers-and-nexttick.md +[the Node.js Event Loop]: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick [`TypeError`]: errors.html#errors_class_typeerror [`clearImmediate()`]: timers.html#timers_clearimmediate_immediate [`clearInterval()`]: timers.html#timers_clearinterval_timeout From d0b93c9fefce5ccaa41ef029d33ac9bab4f60f7d Mon Sep 17 00:00:00 2001 From: Ali BARIN Date: Fri, 3 Mar 2017 13:43:16 +0100 Subject: [PATCH 011/485] util: fix inspecting symbol key in string PR-URL: https://github.com/nodejs/node/pull/11672 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- lib/util.js | 4 ++++ test/parallel/test-util-inspect.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/lib/util.js b/lib/util.js index 6453727ad843b0..1ee96c1c84be11 100644 --- a/lib/util.js +++ b/lib/util.js @@ -361,6 +361,10 @@ function formatValue(ctx, value, recurseTimes) { // for boxed Strings, we have to remove the 0-n indexed entries, // since they just noisy up the output and are redundant keys = keys.filter(function(key) { + if (typeof key === 'symbol') { + return true; + } + return !(key >= 0 && key < raw.length); }); } diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 53f7e3014b389e..ded4e4a47f71d5 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -50,6 +50,9 @@ assert.strictEqual(util.inspect(Object.create({}, {visible: {value: 1, enumerable: true}, hidden: {value: 2}})), '{ visible: 1 }' ); +assert.strictEqual(util.inspect(Object.assign(new String('hello'), + { [Symbol('foo')]: 123 }), { showHidden: true }), + '{ [String: \'hello\'] [length]: 5, [Symbol(foo)]: 123 }'); { const regexp = /regexp/; From 672d752e88524265cc825af69efeab701dcaff52 Mon Sep 17 00:00:00 2001 From: Laurent Fortin Date: Fri, 3 Mar 2017 12:44:28 -0500 Subject: [PATCH 012/485] doc: fixed readable.isPaused() version annotation readable.isPaused(): added a missing YAML placeholder so the 'Added to version' annotation is displayed in docs PR-URL: https://github.com/nodejs/node/pull/11677 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Yuta Hiroto --- doc/api/stream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index e882a4b53d9008..c40353ee3abed0 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -737,7 +737,7 @@ end preferred over the use of the `'readable'` event. ##### readable.isPaused() - From 05ac6e1b013be47168e17eee0c9ac9bcc21f560f Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Tue, 28 Feb 2017 18:40:53 +0100 Subject: [PATCH 013/485] benchmark: remove forced optimization from buffer This removes all instances of %OptimizeFunctionOnNextCall from buffer benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- .../buffers/buffer-compare-instance-method.js | 4 ---- benchmark/buffers/buffer-compare-offset.js | 23 ------------------- benchmark/buffers/buffer-swap.js | 5 +--- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/benchmark/buffers/buffer-compare-instance-method.js b/benchmark/buffers/buffer-compare-instance-method.js index bb07326f3de218..ff3bc4c1abda98 100644 --- a/benchmark/buffers/buffer-compare-instance-method.js +++ b/benchmark/buffers/buffer-compare-instance-method.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common.js'); -const v8 = require('v8'); const bench = common.createBenchmark(main, { size: [16, 512, 1024, 4096, 16386], @@ -20,7 +19,6 @@ function main(conf) { b1[size - 1] = 'b'.charCodeAt(0); - // Force optimization before starting the benchmark switch (args) { case 2: b0.compare(b1, 0); @@ -37,8 +35,6 @@ function main(conf) { default: b0.compare(b1); } - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(b0.compare)'); switch (args) { case 2: b0.compare(b1, 0); diff --git a/benchmark/buffers/buffer-compare-offset.js b/benchmark/buffers/buffer-compare-offset.js index 17b36f82883426..fd8c96dbce0158 100644 --- a/benchmark/buffers/buffer-compare-offset.js +++ b/benchmark/buffers/buffer-compare-offset.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common.js'); -const v8 = require('v8'); const bench = common.createBenchmark(main, { method: ['offset', 'slice'], @@ -9,18 +8,6 @@ const bench = common.createBenchmark(main, { }); function compareUsingSlice(b0, b1, len, iter) { - - // Force optimization before starting the benchmark - Buffer.compare(b0.slice(1, len), b1.slice(1, len)); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(Buffer.compare)'); - eval('%OptimizeFunctionOnNextCall(b0.slice)'); - eval('%OptimizeFunctionOnNextCall(b1.slice)'); - Buffer.compare(b0.slice(1, len), b1.slice(1, len)); - doCompareUsingSlice(b0, b1, len, iter); -} - -function doCompareUsingSlice(b0, b1, len, iter) { var i; bench.start(); for (i = 0; i < iter; i++) @@ -29,16 +16,6 @@ function doCompareUsingSlice(b0, b1, len, iter) { } function compareUsingOffset(b0, b1, len, iter) { - len = len + 1; - // Force optimization before starting the benchmark - b0.compare(b1, 1, len, 1, len); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(b0.compare)'); - b0.compare(b1, 1, len, 1, len); - doCompareUsingOffset(b0, b1, len, iter); -} - -function doCompareUsingOffset(b0, b1, len, iter) { var i; bench.start(); for (i = 0; i < iter; i++) diff --git a/benchmark/buffers/buffer-swap.js b/benchmark/buffers/buffer-swap.js index c6d7db470bc69a..71e08890910843 100644 --- a/benchmark/buffers/buffer-swap.js +++ b/benchmark/buffers/buffer-swap.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common.js'); -const v8 = require('v8'); const bench = common.createBenchmark(main, { aligned: ['true', 'false'], @@ -81,9 +80,7 @@ function main(conf) { const buf = createBuffer(len, aligned === 'true'); const bufferSwap = genMethod(method); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(bufferSwap)'); - + bufferSwap(n, buf); bench.start(); bufferSwap(n, buf); bench.end(n); From 17c85ffd80a00289479a7355802cd264935e72d4 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Tue, 28 Feb 2017 18:44:14 +0100 Subject: [PATCH 014/485] benchmark: remove forced optimization from crypto This removes all instances of %OptimizeFunctionOnNextCall from crypto benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/crypto/get-ciphers.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/benchmark/crypto/get-ciphers.js b/benchmark/crypto/get-ciphers.js index 257c9af2fd531e..f6b1767cb4fbcc 100644 --- a/benchmark/crypto/get-ciphers.js +++ b/benchmark/crypto/get-ciphers.js @@ -12,8 +12,11 @@ function main(conf) { const v = conf.v; const method = require(v).getCiphers; var i = 0; - - common.v8ForceOptimization(method); + // first call to getChipers will dominate the results + if (n > 1) { + for (; i < n; i++) + method(); + } bench.start(); for (; i < n; i++) method(); bench.end(n); From ef8cc301fed5f0b4b3107fae5d896eb27f9519f8 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Tue, 28 Feb 2017 18:45:24 +0100 Subject: [PATCH 015/485] benchmark: remove forced optimization from es This removes all instances of %OptimizeFunctionOnNextCall from es benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/es/defaultparams-bench.js | 4 ---- benchmark/es/restparams-bench.js | 6 ------ 2 files changed, 10 deletions(-) diff --git a/benchmark/es/defaultparams-bench.js b/benchmark/es/defaultparams-bench.js index 1b962cfb39333f..56d04cd95bb454 100644 --- a/benchmark/es/defaultparams-bench.js +++ b/benchmark/es/defaultparams-bench.js @@ -22,8 +22,6 @@ function defaultParams(x = 1, y = 2) { function runOldStyleDefaults(n) { - common.v8ForceOptimization(oldStyleDefaults); - var i = 0; bench.start(); for (; i < n; i++) @@ -33,8 +31,6 @@ function runOldStyleDefaults(n) { function runDefaultParams(n) { - common.v8ForceOptimization(defaultParams); - var i = 0; bench.start(); for (; i < n; i++) diff --git a/benchmark/es/restparams-bench.js b/benchmark/es/restparams-bench.js index 0ff9c48dedc490..f5c49dd969b40a 100644 --- a/benchmark/es/restparams-bench.js +++ b/benchmark/es/restparams-bench.js @@ -35,8 +35,6 @@ function useArguments() { function runCopyArguments(n) { - common.v8ForceOptimization(copyArguments, 1, 2, 'a', 'b'); - var i = 0; bench.start(); for (; i < n; i++) @@ -46,8 +44,6 @@ function runCopyArguments(n) { function runRestArguments(n) { - common.v8ForceOptimization(restArguments, 1, 2, 'a', 'b'); - var i = 0; bench.start(); for (; i < n; i++) @@ -57,8 +53,6 @@ function runRestArguments(n) { function runUseArguments(n) { - common.v8ForceOptimization(useArguments, 1, 2, 'a', 'b'); - var i = 0; bench.start(); for (; i < n; i++) From 7587a11adc5013721aae3e0bedb7fbd51e1ced5b Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 1 Mar 2017 12:36:27 +0100 Subject: [PATCH 016/485] benchmark: remove forced optimization from misc This removes all instances of %OptimizeFunctionOnNextCall from misc benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/misc/console.js | 13 ------------- benchmark/misc/punycode.js | 4 ++-- benchmark/misc/util-extend-vs-object-assign.js | 8 -------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/benchmark/misc/console.js b/benchmark/misc/console.js index 9a08a411c51f82..9c5aec0eeeb5fa 100644 --- a/benchmark/misc/console.js +++ b/benchmark/misc/console.js @@ -4,9 +4,6 @@ const common = require('../common.js'); const assert = require('assert'); const Writable = require('stream').Writable; const util = require('util'); -const v8 = require('v8'); - -v8.setFlagsFromString('--allow_natives_syntax'); const methods = [ 'restAndSpread', @@ -51,14 +48,7 @@ function usingArgumentsAndApplyC() { nullStream.write(util.format.apply(null, arguments) + '\n'); } -function optimize(method, ...args) { - method(...args); - eval(`%OptimizeFunctionOnNextCall(${method.name})`); - method(...args); -} - function runUsingRestAndConcat(n) { - optimize(usingRestAndConcat, 'a', 1); var i = 0; bench.start(); @@ -70,7 +60,6 @@ function runUsingRestAndConcat(n) { function runUsingRestAndSpread(n, concat) { const method = concat ? usingRestAndSpreadC : usingRestAndSpreadTS; - optimize(method, 'this is %s of %d', 'a', 1); var i = 0; bench.start(); @@ -82,7 +71,6 @@ function runUsingRestAndSpread(n, concat) { function runUsingRestAndApply(n, concat) { const method = concat ? usingRestAndApplyC : usingRestAndApplyTS; - optimize(method, 'this is %s of %d', 'a', 1); var i = 0; bench.start(); @@ -94,7 +82,6 @@ function runUsingRestAndApply(n, concat) { function runUsingArgumentsAndApply(n, concat) { const method = concat ? usingArgumentsAndApplyC : usingArgumentsAndApplyTS; - optimize(method, 'this is %s of %d', 'a', 1); var i = 0; bench.start(); diff --git a/benchmark/misc/punycode.js b/benchmark/misc/punycode.js index f4d22557ac5d65..b359fbbff4bbc6 100644 --- a/benchmark/misc/punycode.js +++ b/benchmark/misc/punycode.js @@ -42,8 +42,9 @@ function usingICU(val) { } function runPunycode(n, val) { - common.v8ForceOptimization(usingPunycode, val); var i = 0; + for (; i < n; i++) + usingPunycode(val); bench.start(); for (; i < n; i++) usingPunycode(val); @@ -51,7 +52,6 @@ function runPunycode(n, val) { } function runICU(n, val) { - common.v8ForceOptimization(usingICU, val); var i = 0; bench.start(); for (; i < n; i++) diff --git a/benchmark/misc/util-extend-vs-object-assign.js b/benchmark/misc/util-extend-vs-object-assign.js index caea42ce914cf5..41c15d7d2caa0c 100644 --- a/benchmark/misc/util-extend-vs-object-assign.js +++ b/benchmark/misc/util-extend-vs-object-assign.js @@ -2,7 +2,6 @@ const common = require('../common.js'); const util = require('util'); -const v8 = require('v8'); const bench = common.createBenchmark(main, { type: ['extend', 'assign'], @@ -12,15 +11,11 @@ const bench = common.createBenchmark(main, { function main(conf) { let fn; const n = conf.n | 0; - let v8command; if (conf.type === 'extend') { fn = util._extend; - v8command = '%OptimizeFunctionOnNextCall(util._extend)'; } else if (conf.type === 'assign') { fn = Object.assign; - // Object.assign is built-in, cannot be optimized - v8command = ''; } // Force-optimize the method to test so that the benchmark doesn't @@ -28,9 +23,6 @@ function main(conf) { for (var i = 0; i < conf.type.length * 10; i += 1) fn({}, process.env); - v8.setFlagsFromString('--allow_natives_syntax'); - eval(v8command); - var obj = new Proxy({}, { set: function(a, b, c) { return true; } }); bench.start(); From eba2c62bb10fb65785050600212f70d38f1ffba3 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 1 Mar 2017 12:37:12 +0100 Subject: [PATCH 017/485] benchmark: remove forced optimization from path This removes all instances of %OptimizeFunctionOnNextCall from path benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/path/basename-posix.js | 7 ------- benchmark/path/basename-win32.js | 7 ------- benchmark/path/dirname-posix.js | 7 ------- benchmark/path/dirname-win32.js | 7 ------- benchmark/path/extname-posix.js | 7 ------- benchmark/path/extname-win32.js | 7 ------- benchmark/path/format-posix.js | 7 ------- benchmark/path/format-win32.js | 7 ------- benchmark/path/isAbsolute-posix.js | 7 ------- benchmark/path/isAbsolute-win32.js | 7 ------- benchmark/path/join-posix.js | 7 ------- benchmark/path/join-win32.js | 7 ------- benchmark/path/makeLong-win32.js | 7 ------- benchmark/path/normalize-posix.js | 7 ------- benchmark/path/normalize-win32.js | 7 ------- benchmark/path/parse-posix.js | 12 ++++-------- benchmark/path/parse-win32.js | 12 ++++-------- benchmark/path/relative-posix.js | 12 ++++-------- benchmark/path/relative-win32.js | 12 +++++------- benchmark/path/resolve-posix.js | 7 ------- benchmark/path/resolve-win32.js | 7 ------- 21 files changed, 17 insertions(+), 150 deletions(-) diff --git a/benchmark/path/basename-posix.js b/benchmark/path/basename-posix.js index 64da9017793440..fc983c8074c940 100644 --- a/benchmark/path/basename-posix.js +++ b/benchmark/path/basename-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { pathext: [ @@ -30,12 +29,6 @@ function main(conf) { input = input.slice(0, extIdx); } - // Force optimization before starting the benchmark - p.basename(input, ext); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.basename)'); - p.basename(input, ext); - bench.start(); for (var i = 0; i < n; i++) { p.basename(input, ext); diff --git a/benchmark/path/basename-win32.js b/benchmark/path/basename-win32.js index a6214598790033..b493beb87c9e94 100644 --- a/benchmark/path/basename-win32.js +++ b/benchmark/path/basename-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { pathext: [ @@ -30,12 +29,6 @@ function main(conf) { input = input.slice(0, extIdx); } - // Force optimization before starting the benchmark - p.basename(input, ext); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.basename)'); - p.basename(input, ext); - bench.start(); for (var i = 0; i < n; i++) { p.basename(input, ext); diff --git a/benchmark/path/dirname-posix.js b/benchmark/path/dirname-posix.js index e7ea80ffa313c8..af77be5ac06559 100644 --- a/benchmark/path/dirname-posix.js +++ b/benchmark/path/dirname-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -21,12 +20,6 @@ function main(conf) { var p = path.posix; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.dirname(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.dirname)'); - p.dirname(input); - bench.start(); for (var i = 0; i < n; i++) { p.dirname(input); diff --git a/benchmark/path/dirname-win32.js b/benchmark/path/dirname-win32.js index 5cb0829437c2ed..01d97d08e2ae05 100644 --- a/benchmark/path/dirname-win32.js +++ b/benchmark/path/dirname-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -21,12 +20,6 @@ function main(conf) { var p = path.win32; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.dirname(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.dirname)'); - p.dirname(input); - bench.start(); for (var i = 0; i < n; i++) { p.dirname(input); diff --git a/benchmark/path/extname-posix.js b/benchmark/path/extname-posix.js index 61a1073158f8d3..50c4e8f7927ba6 100644 --- a/benchmark/path/extname-posix.js +++ b/benchmark/path/extname-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -24,12 +23,6 @@ function main(conf) { var p = path.posix; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.extname(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.extname)'); - p.extname(input); - bench.start(); for (var i = 0; i < n; i++) { p.extname(input); diff --git a/benchmark/path/extname-win32.js b/benchmark/path/extname-win32.js index 67e53eab85817f..9c0df13ab46105 100644 --- a/benchmark/path/extname-win32.js +++ b/benchmark/path/extname-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -24,12 +23,6 @@ function main(conf) { var p = path.win32; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.extname(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.extname)'); - p.extname(input); - bench.start(); for (var i = 0; i < n; i++) { p.extname(input); diff --git a/benchmark/path/format-posix.js b/benchmark/path/format-posix.js index b30b58be4118f0..ee78a6d5f30980 100644 --- a/benchmark/path/format-posix.js +++ b/benchmark/path/format-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { props: [ @@ -22,12 +21,6 @@ function main(conf) { name: props[4] || '', }; - // Force optimization before starting the benchmark - p.format(obj); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.format)'); - p.format(obj); - bench.start(); for (var i = 0; i < n; i++) { p.format(obj); diff --git a/benchmark/path/format-win32.js b/benchmark/path/format-win32.js index 7404f2e93e6868..9ec981d6310ed6 100644 --- a/benchmark/path/format-win32.js +++ b/benchmark/path/format-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { props: [ @@ -22,12 +21,6 @@ function main(conf) { name: props[4] || '', }; - // Force optimization before starting the benchmark - p.format(obj); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.format)'); - p.format(obj); - bench.start(); for (var i = 0; i < n; i++) { p.format(obj); diff --git a/benchmark/path/isAbsolute-posix.js b/benchmark/path/isAbsolute-posix.js index fb8956c073b9db..22db751100ceee 100644 --- a/benchmark/path/isAbsolute-posix.js +++ b/benchmark/path/isAbsolute-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -19,12 +18,6 @@ function main(conf) { var p = path.posix; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.isAbsolute(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.isAbsolute)'); - p.isAbsolute(input); - bench.start(); for (var i = 0; i < n; i++) { p.isAbsolute(input); diff --git a/benchmark/path/isAbsolute-win32.js b/benchmark/path/isAbsolute-win32.js index 57fb8b8999e838..a565da8e566f8f 100644 --- a/benchmark/path/isAbsolute-win32.js +++ b/benchmark/path/isAbsolute-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -20,12 +19,6 @@ function main(conf) { var p = path.win32; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.isAbsolute(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.isAbsolute)'); - p.isAbsolute(input); - bench.start(); for (var i = 0; i < n; i++) { p.isAbsolute(input); diff --git a/benchmark/path/join-posix.js b/benchmark/path/join-posix.js index 1222f4050aa6ab..a7cf3772522daa 100644 --- a/benchmark/path/join-posix.js +++ b/benchmark/path/join-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { paths: [ @@ -15,12 +14,6 @@ function main(conf) { var p = path.posix; var args = ('' + conf.paths).split('|'); - // Force optimization before starting the benchmark - p.join.apply(null, args); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.join)'); - p.join.apply(null, args); - bench.start(); for (var i = 0; i < n; i++) { p.join.apply(null, args); diff --git a/benchmark/path/join-win32.js b/benchmark/path/join-win32.js index 86801859d56c3b..18c1e802a6bff1 100644 --- a/benchmark/path/join-win32.js +++ b/benchmark/path/join-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { paths: [ @@ -15,12 +14,6 @@ function main(conf) { var p = path.win32; var args = ('' + conf.paths).split('|'); - // Force optimization before starting the benchmark - p.join.apply(null, args); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.join)'); - p.join.apply(null, args); - bench.start(); for (var i = 0; i < n; i++) { p.join.apply(null, args); diff --git a/benchmark/path/makeLong-win32.js b/benchmark/path/makeLong-win32.js index d4b29d7e709b3e..fe5da425a5cd73 100644 --- a/benchmark/path/makeLong-win32.js +++ b/benchmark/path/makeLong-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -18,12 +17,6 @@ function main(conf) { var p = path.win32; var input = '' + conf.path; - // Force optimization before starting the benchmark - p._makeLong(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p._makeLong)'); - p._makeLong(input); - bench.start(); for (var i = 0; i < n; i++) { p._makeLong(input); diff --git a/benchmark/path/normalize-posix.js b/benchmark/path/normalize-posix.js index 19d6461ca51dcf..aec703cbe21242 100644 --- a/benchmark/path/normalize-posix.js +++ b/benchmark/path/normalize-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -20,12 +19,6 @@ function main(conf) { var p = path.posix; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.normalize(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.normalize)'); - p.normalize(input); - bench.start(); for (var i = 0; i < n; i++) { p.normalize(input); diff --git a/benchmark/path/normalize-win32.js b/benchmark/path/normalize-win32.js index 119f9797681113..356d399c3513ab 100644 --- a/benchmark/path/normalize-win32.js +++ b/benchmark/path/normalize-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -20,12 +19,6 @@ function main(conf) { var p = path.win32; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.normalize(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.normalize)'); - p.normalize(input); - bench.start(); for (var i = 0; i < n; i++) { p.normalize(input); diff --git a/benchmark/path/parse-posix.js b/benchmark/path/parse-posix.js index ee4306fcd27496..997eec0452b74a 100644 --- a/benchmark/path/parse-posix.js +++ b/benchmark/path/parse-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -21,15 +20,12 @@ function main(conf) { var p = path.posix; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.parse(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.parse)'); - p.parse(input); - - bench.start(); for (var i = 0; i < n; i++) { p.parse(input); } + bench.start(); + for (i = 0; i < n; i++) { + p.parse(input); + } bench.end(n); } diff --git a/benchmark/path/parse-win32.js b/benchmark/path/parse-win32.js index 5a7b80f0ddb3da..2a95f758665377 100644 --- a/benchmark/path/parse-win32.js +++ b/benchmark/path/parse-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { path: [ @@ -22,15 +21,12 @@ function main(conf) { var p = path.win32; var input = '' + conf.path; - // Force optimization before starting the benchmark - p.parse(input); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.parse)'); - p.parse(input); - - bench.start(); for (var i = 0; i < n; i++) { p.parse(input); } + bench.start(); + for (i = 0; i < n; i++) { + p.parse(input); + } bench.end(n); } diff --git a/benchmark/path/relative-posix.js b/benchmark/path/relative-posix.js index 7544fb2dc67e7d..492b73c3e89f8a 100644 --- a/benchmark/path/relative-posix.js +++ b/benchmark/path/relative-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { paths: [ @@ -26,15 +25,12 @@ function main(conf) { to = from.slice(delimIdx + 1); from = from.slice(0, delimIdx); } - - // Force optimization before starting the benchmark - p.relative(from, to); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.relative)'); - p.relative(from, to); + for (var i = 0; i < n; i++) { + p.relative(from, to); + } bench.start(); - for (var i = 0; i < n; i++) { + for (i = 0; i < n; i++) { p.relative(from, to); } bench.end(n); diff --git a/benchmark/path/relative-win32.js b/benchmark/path/relative-win32.js index 92531959c1c3aa..7e7620299eb16c 100644 --- a/benchmark/path/relative-win32.js +++ b/benchmark/path/relative-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { paths: [ @@ -25,14 +24,13 @@ function main(conf) { from = from.slice(0, delimIdx); } - // Force optimization before starting the benchmark - p.relative(from, to); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.relative)'); - p.relative(from, to); + // Warmup + for (var i = 0; i < n; i++) { + p.relative(from, to); + } bench.start(); - for (var i = 0; i < n; i++) { + for (i = 0; i < n; i++) { p.relative(from, to); } bench.end(n); diff --git a/benchmark/path/resolve-posix.js b/benchmark/path/resolve-posix.js index 93e5b82191a23a..d1364a8ac256c9 100644 --- a/benchmark/path/resolve-posix.js +++ b/benchmark/path/resolve-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { paths: [ @@ -18,12 +17,6 @@ function main(conf) { var p = path.posix; var args = ('' + conf.paths).split('|'); - // Force optimization before starting the benchmark - p.resolve.apply(null, args); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.resolve)'); - p.resolve.apply(null, args); - bench.start(); for (var i = 0; i < n; i++) { p.resolve.apply(null, args); diff --git a/benchmark/path/resolve-win32.js b/benchmark/path/resolve-win32.js index dc0eb30e930049..6dfb38167c96bd 100644 --- a/benchmark/path/resolve-win32.js +++ b/benchmark/path/resolve-win32.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { paths: [ @@ -18,12 +17,6 @@ function main(conf) { var p = path.win32; var args = ('' + conf.paths).split('|'); - // Force optimization before starting the benchmark - p.resolve.apply(null, args); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.resolve)'); - p.resolve.apply(null, args); - bench.start(); for (var i = 0; i < n; i++) { p.resolve.apply(null, args); From 57b5ce1d8ed5c64d9ffcca1f97c8d58b9bb41e19 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 1 Mar 2017 12:45:05 +0100 Subject: [PATCH 018/485] benchmark: remove querystring forced optimization This removes all instances of %OptimizeFunctionOnNextCall from querystring benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/querystring/querystring-parse.js | 15 ++------------- benchmark/querystring/querystring-stringify.js | 5 ----- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/benchmark/querystring/querystring-parse.js b/benchmark/querystring/querystring-parse.js index a44c3879bd63c0..eacbd7f92aa337 100644 --- a/benchmark/querystring/querystring-parse.js +++ b/benchmark/querystring/querystring-parse.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var querystring = require('querystring'); -var v8 = require('v8'); var inputs = require('../fixtures/url-inputs.js').searchParams; var bench = common.createBenchmark(main, { @@ -9,23 +8,13 @@ var bench = common.createBenchmark(main, { n: [1e6], }); -// A deopt followed by a reopt of main() can happen right when the timed loop -// starts, which seems to have a noticeable effect on the benchmark results. -// So we explicitly disable optimization of main() to avoid this potential -// issue. -v8.setFlagsFromString('--allow_natives_syntax'); -eval('%NeverOptimizeFunction(main)'); - function main(conf) { var type = conf.type; var n = conf.n | 0; var input = inputs[type]; var i; - - // Note: we do *not* use OptimizeFunctionOnNextCall() here because currently - // it causes a deopt followed by a reopt, which could make its way into the - // timed loop. Instead, just execute the function a "sufficient" number of - // times before the timed loop to ensure the function is optimized just once. + // Execute the function a "sufficient" number of times before the timed + // loop to ensure the function is optimized just once. if (type === 'multicharsep') { for (i = 0; i < n; i += 1) querystring.parse(input, '&&&&&&&&&&'); diff --git a/benchmark/querystring/querystring-stringify.js b/benchmark/querystring/querystring-stringify.js index 5870a690555a0a..7e31a49e99e54c 100644 --- a/benchmark/querystring/querystring-stringify.js +++ b/benchmark/querystring/querystring-stringify.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var querystring = require('querystring'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { type: ['noencode', 'encodemany', 'encodelast'], @@ -36,10 +35,6 @@ function main(conf) { for (var name in inputs) querystring.stringify(inputs[name]); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(querystring.stringify)'); - querystring.stringify(input); - bench.start(); for (var i = 0; i < n; i += 1) querystring.stringify(input); From 541119c6ee5dc8dca1115569dd640e4753dcce40 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 1 Mar 2017 12:45:47 +0100 Subject: [PATCH 019/485] benchmark: remove streams forced optimization This removes all instances of %OptimizeFunctionOnNextCall from streams benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/streams/readable-bigread.js | 8 -------- benchmark/streams/readable-bigunevenread.js | 8 -------- benchmark/streams/readable-boundaryread.js | 9 --------- benchmark/streams/readable-readall.js | 8 -------- benchmark/streams/readable-unevenread.js | 8 -------- 5 files changed, 41 deletions(-) diff --git a/benchmark/streams/readable-bigread.js b/benchmark/streams/readable-bigread.js index 50f10c44119141..34d478fb478478 100644 --- a/benchmark/streams/readable-bigread.js +++ b/benchmark/streams/readable-bigread.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common'); -const v8 = require('v8'); const Readable = require('stream').Readable; const bench = common.createBenchmark(main, { @@ -15,13 +14,6 @@ function main(conf) { function noop() {} s._read = noop; - // Force optimization before starting the benchmark - s.push(b); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(s.read)'); - s.push(b); - while (s.read(128)); - bench.start(); for (var k = 0; k < n; ++k) { for (var i = 0; i < 1e4; ++i) diff --git a/benchmark/streams/readable-bigunevenread.js b/benchmark/streams/readable-bigunevenread.js index ce6e41c5d30eac..d176166ae4f432 100644 --- a/benchmark/streams/readable-bigunevenread.js +++ b/benchmark/streams/readable-bigunevenread.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common'); -const v8 = require('v8'); const Readable = require('stream').Readable; const bench = common.createBenchmark(main, { @@ -15,13 +14,6 @@ function main(conf) { function noop() {} s._read = noop; - // Force optimization before starting the benchmark - s.push(b); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(s.read)'); - s.push(b); - while (s.read(106)); - bench.start(); for (var k = 0; k < n; ++k) { for (var i = 0; i < 1e4; ++i) diff --git a/benchmark/streams/readable-boundaryread.js b/benchmark/streams/readable-boundaryread.js index 93a6616361ba18..1a0b7eb7ac9ddc 100644 --- a/benchmark/streams/readable-boundaryread.js +++ b/benchmark/streams/readable-boundaryread.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common'); -const v8 = require('v8'); const Readable = require('stream').Readable; const bench = common.createBenchmark(main, { @@ -15,14 +14,6 @@ function main(conf) { function noop() {} s._read = noop; - // Force optimization before starting the benchmark - s.push(b); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(s.push)'); - eval('%OptimizeFunctionOnNextCall(s.read)'); - s.push(b); - while (s.read(32)); - bench.start(); for (var k = 0; k < n; ++k) { for (var i = 0; i < 1e4; ++i) diff --git a/benchmark/streams/readable-readall.js b/benchmark/streams/readable-readall.js index 07626fd7978b9a..be34afbeabc090 100644 --- a/benchmark/streams/readable-readall.js +++ b/benchmark/streams/readable-readall.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common'); -const v8 = require('v8'); const Readable = require('stream').Readable; const bench = common.createBenchmark(main, { @@ -15,13 +14,6 @@ function main(conf) { function noop() {} s._read = noop; - // Force optimization before starting the benchmark - s.push(b); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(s.read)'); - s.push(b); - while (s.read()); - bench.start(); for (var k = 0; k < n; ++k) { for (var i = 0; i < 1e4; ++i) diff --git a/benchmark/streams/readable-unevenread.js b/benchmark/streams/readable-unevenread.js index 4a69bd97a94bcf..ebbc727ad23ec3 100644 --- a/benchmark/streams/readable-unevenread.js +++ b/benchmark/streams/readable-unevenread.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common'); -const v8 = require('v8'); const Readable = require('stream').Readable; const bench = common.createBenchmark(main, { @@ -15,13 +14,6 @@ function main(conf) { function noop() {} s._read = noop; - // Force optimization before starting the benchmark - s.push(b); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(s.read)'); - s.push(b); - while (s.read(12)); - bench.start(); for (var k = 0; k < n; ++k) { for (var i = 0; i < 1e4; ++i) From ea61ce518bed2b8d807062d2f8828739ad6ee693 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 1 Mar 2017 12:46:14 +0100 Subject: [PATCH 020/485] benchmark: remove forced optimization from tls This removes all instances of %OptimizeFunctionOnNextCall from tls benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/tls/convertprotocols.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/benchmark/tls/convertprotocols.js b/benchmark/tls/convertprotocols.js index 32da0fe6fde271..5d561455051a0c 100644 --- a/benchmark/tls/convertprotocols.js +++ b/benchmark/tls/convertprotocols.js @@ -12,8 +12,11 @@ function main(conf) { var i = 0; var m = {}; - common.v8ForceOptimization( - tls.convertNPNProtocols, ['ABC', 'XYZ123', 'FOO'], m); + // First call dominates results + if (n > 1) { + tls.convertNPNProtocols(['ABC', 'XYZ123', 'FOO'], m); + m = {}; + } bench.start(); for (; i < n; i++) tls.convertNPNProtocols(['ABC', 'XYZ123', 'FOO'], m); bench.end(n); From c5958d20fdf5702247e790d7ebc87c7005dc11f0 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 1 Mar 2017 12:46:37 +0100 Subject: [PATCH 021/485] benchmark: remove forced optimization from url This removes all instances of %OptimizeFunctionOnNextCall from url benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/url/url-format.js | 4 ---- benchmark/url/url-resolve.js | 7 ------- 2 files changed, 11 deletions(-) diff --git a/benchmark/url/url-format.js b/benchmark/url/url-format.js index 886958406b91c5..771786d3350513 100644 --- a/benchmark/url/url-format.js +++ b/benchmark/url/url-format.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common.js'); const url = require('url'); -const v8 = require('v8'); const inputs = { slashes: {slashes: true, host: 'localhost'}, @@ -24,9 +23,6 @@ function main(conf) { for (const name in inputs) url.format(inputs[name]); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(url.format)'); - bench.start(); for (var i = 0; i < n; i += 1) url.format(input); diff --git a/benchmark/url/url-resolve.js b/benchmark/url/url-resolve.js index 4335511ca6d2df..421a70ef6d59f1 100644 --- a/benchmark/url/url-resolve.js +++ b/benchmark/url/url-resolve.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common.js'); const url = require('url'); -const v8 = require('v8'); const hrefs = require('../fixtures/url-inputs.js').urls; hrefs.noscheme = 'some.ran/dom/url.thing?oh=yes#whoo'; @@ -24,12 +23,6 @@ function main(conf) { const href = hrefs[conf.href]; const path = paths[conf.path]; - // Force-optimize url.resolve() so that the benchmark doesn't get - // disrupted by the optimizer kicking in halfway through. - url.resolve(href, path); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(url.resolve)'); - bench.start(); for (var i = 0; i < n; i += 1) url.resolve(href, path); From ca86aa5323a36895a3aed917fc9a4a3509d3df9b Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 1 Mar 2017 12:48:05 +0100 Subject: [PATCH 022/485] benchmark: remove forced optimization from util This removes all instances of %OptimizeFunctionOnNextCall from util benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/util/format.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/benchmark/util/format.js b/benchmark/util/format.js index 8040554ba0861a..82e25b4c4c8127 100644 --- a/benchmark/util/format.js +++ b/benchmark/util/format.js @@ -2,7 +2,6 @@ const util = require('util'); const common = require('../common'); -const v8 = require('v8'); const types = [ 'string', 'number', @@ -29,12 +28,6 @@ function main(conf) { const input = inputs[type]; - v8.setFlagsFromString('--allow_natives_syntax'); - - util.format(input[0], input[1]); - eval('%OptimizeFunctionOnNextCall(util.format)'); - util.format(input[0], input[1]); - bench.start(); for (var i = 0; i < n; i++) { util.format(input[0], input[1]); From 75cdc895ec8fd38b3a22535d9f90792c7c7be964 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 1 Mar 2017 12:52:10 +0100 Subject: [PATCH 023/485] benchmark: cleanup after forced optimization drop This removes all instances of %OptimizeFunctionOnNextCall from common.js and README.md PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/README.md | 9 --------- benchmark/common.js | 14 -------------- 2 files changed, 23 deletions(-) diff --git a/benchmark/README.md b/benchmark/README.md index 6fd9a97bdfb3bb..17c733e6eb0b6c 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -235,12 +235,3 @@ it returns to accomplish what they need. This function reports timing data to the parent process (usually created by running `compare.js`, `run.js` or `scatter.js`). -### v8ForceOptimization(method[, ...args]) - -Force V8 to mark the `method` for optimization with the native function -`%OptimizeFunctionOnNextCall()` and return the optimization status -after that. - -It can be used to prevent the benchmark from getting disrupted by the optimizer -kicking in halfway through. However, this could result in a less effective -optimization. In general, only use it if you know what it actually does. diff --git a/benchmark/common.js b/benchmark/common.js index 6a9b2ba0f71681..7ce180fdb7ff0a 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -229,17 +229,3 @@ Benchmark.prototype.report = function(rate, elapsed) { type: 'report' }); }; - -exports.v8ForceOptimization = function(method) { - if (typeof method !== 'function') - return; - - const v8 = require('v8'); - v8.setFlagsFromString('--allow_natives_syntax'); - - const args = Array.prototype.slice.call(arguments, 1); - method.apply(null, args); - eval('%OptimizeFunctionOnNextCall(method)'); - method.apply(null, args); - return eval('%GetOptimizationStatus(method)'); -}; From fd17e8b8d250492fdcabbc8b7a3bf57687ae364a Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Tue, 28 Feb 2017 10:46:29 -0800 Subject: [PATCH 024/485] deps: fix CLEAR_HASH macro to be usable as a single statement Apply unreleased (as of zlib v1.2.11) patch from upstream: - https://github.com/madler/zlib/commit/38e8ce32afbaa82f67d992b9f3056f281fe69259 Original commit message: Fix CLEAR_HASH macro to be usable as a single statement. As it is used in deflateParams(). PR-URL: https://github.com/nodejs/node/pull/11616 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- deps/zlib/deflate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deps/zlib/deflate.c b/deps/zlib/deflate.c index 1ec761448de926..909606df01fb70 100644 --- a/deps/zlib/deflate.c +++ b/deps/zlib/deflate.c @@ -190,8 +190,11 @@ local const config configuration_table[10] = { * prev[] will be initialized on the fly. */ #define CLEAR_HASH(s) \ - s->head[s->hash_size-1] = NIL; \ - zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); + do { \ + s->head[s->hash_size-1] = NIL; \ + zmemzero((Bytef *)s->head, \ + (unsigned)(s->hash_size-1)*sizeof(*s->head)); \ + } while (0) /* =========================================================================== * Slide the hash table when sliding the window down (could be avoided with 32 From aab0d202f8edb079070f417ab4b35678ac937608 Mon Sep 17 00:00:00 2001 From: Nemanja Stojanovic Date: Tue, 28 Feb 2017 13:58:56 -0500 Subject: [PATCH 025/485] util: convert inspect.styles and inspect.colors to prototype-less objects Use a prototype-less object for inspect.styles and inspect.colors to allow modification of Object.prototype in the REPL. Fixes: https://github.com/nodejs/node/issues/11614 PR-URL: https://github.com/nodejs/node/pull/11624 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Timothy Gu --- lib/util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/util.js b/lib/util.js index 1ee96c1c84be11..7e8d23d55e676e 100644 --- a/lib/util.js +++ b/lib/util.js @@ -166,7 +166,7 @@ Object.defineProperty(inspect, 'defaultOptions', { }); // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { +inspect.colors = Object.assign(Object.create(null), { 'bold': [1, 22], 'italic': [3, 23], 'underline': [4, 24], @@ -180,10 +180,10 @@ inspect.colors = { 'magenta': [35, 39], 'red': [31, 39], 'yellow': [33, 39] -}; +}); // Don't use 'blue' not visible on cmd.exe -inspect.styles = { +inspect.styles = Object.assign(Object.create(null), { 'special': 'cyan', 'number': 'yellow', 'boolean': 'yellow', @@ -194,7 +194,7 @@ inspect.styles = { 'date': 'magenta', // "name": intentionally not styling 'regexp': 'red' -}; +}); const customInspectSymbol = internalUtil.customInspectSymbol; From cd3c478f70dd71b8aeb02e041f686fa44742d81b Mon Sep 17 00:00:00 2001 From: "Sakthipriyan Vairamani (thefourtheye)" Date: Tue, 28 Feb 2017 00:15:58 +0530 Subject: [PATCH 026/485] test: skip the test with proper TAP message On Windows, the test simply returns which will be counted as passed. The test actually skips the rest of the test. So proper TAP message has to be included while skipping. This patch uses `common.skip` rather than `console.log` to print the skip messages. PR-URL: https://github.com/nodejs/node/pull/11584 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock Reviewed-By: Luigi Pinca --- test/parallel/test-setproctitle.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-setproctitle.js b/test/parallel/test-setproctitle.js index a971d604b37d14..072ddd447e5bf9 100644 --- a/test/parallel/test-setproctitle.js +++ b/test/parallel/test-setproctitle.js @@ -4,8 +4,7 @@ const common = require('../common'); // FIXME add sunos support if (common.isSunOS) { - console.log(`1..0 # Skipped: Unsupported platform [${process.platform}]`); - return; + return common.skip(`Unsupported platform [${process.platform}]`); } const assert = require('assert'); @@ -22,8 +21,9 @@ process.title = title; assert.strictEqual(process.title, title); // Test setting the title but do not try to run `ps` on Windows. -if (common.isWindows) - return; +if (common.isWindows) { + return common.skip('Windows does not have "ps" utility'); +} exec(`ps -p ${process.pid} -o args=`, function callback(error, stdout, stderr) { assert.ifError(error); From a2ae08999b55088cbc447e5801f009694d71c3a7 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 16 Feb 2017 14:30:29 -0800 Subject: [PATCH 027/485] tls: runtime deprecation for tls.createSecurePair() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgrade the deprecation for _tls_legacy (`tls.createSecurePair()`) to a runtime deprecation. PR-URL: https://github.com/nodejs/node/pull/11349 Reviewed-By: Sam Roberts Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis Reviewed-By: Fedor Indutny Reviewed-By: Michael Dawson Reviewed-By: Сковорода Никита Андреевич --- doc/api/deprecations.md | 8 +++++ lib/_tls_legacy.js | 39 +++++++++++---------- lib/tls.js | 2 ++ test/parallel/test-tls-legacy-deprecated.js | 12 +++++++ 4 files changed, 43 insertions(+), 18 deletions(-) create mode 100644 test/parallel/test-tls-legacy-deprecated.js diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 71f846b8b613eb..b4a074b7e066cd 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -534,6 +534,14 @@ deprecated. Please use `ServerResponse.prototype.writeHead()` instead. *Note*: The `ServerResponse.prototype.writeHeader()` method was never documented as an officially supported API. + +### DEP0064: tls.createSecurePair() + +Type: Runtime + +The `tls.createSecurePair()` API was deprecated in documentation in Node.js +0.11.3. Users should use `tls.Socket` instead. + [alloc]: buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding [alloc_unsafe_size]: buffer.html#buffer_class_method_buffer_allocunsafe_size [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index 83ee3e0f8f5cda..f18ad27ba4e59a 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -3,15 +3,17 @@ require('internal/util').assertCrypto(); const assert = require('assert'); +const Buffer = require('buffer').Buffer; +const common = require('_tls_common'); +const Connection = process.binding('crypto').Connection; const EventEmitter = require('events'); +const internalUtil = require('internal/util'); const stream = require('stream'); +const Timer = process.binding('timer_wrap').Timer; const tls = require('tls'); const util = require('util'); -const common = require('_tls_common'); + const debug = util.debuglog('tls-legacy'); -const Buffer = require('buffer').Buffer; -const Timer = process.binding('timer_wrap').Timer; -const Connection = process.binding('crypto').Connection; function SlabBuffer() { this.create(); @@ -787,18 +789,11 @@ function securePairNT(self, options) { } -exports.createSecurePair = function(context, - isServer, - requestCert, - rejectUnauthorized, - options) { - var pair = new SecurePair(context, - isServer, - requestCert, - rejectUnauthorized, - options); - return pair; -}; +function createSecurePair(context, isServer, requestCert, + rejectUnauthorized, options) { + return new SecurePair(context, isServer, requestCert, + rejectUnauthorized, options); +} SecurePair.prototype.maybeInitFinished = function() { @@ -868,7 +863,7 @@ SecurePair.prototype.error = function(returnOnly) { }; -exports.pipe = function pipe(pair, socket) { +function pipe(pair, socket) { pair.encrypted.pipe(socket); socket.pipe(pair.encrypted); @@ -918,7 +913,7 @@ exports.pipe = function pipe(pair, socket) { socket.on('timeout', ontimeout); return cleartext; -}; +} function pipeCloseNT(pair, socket) { @@ -927,3 +922,11 @@ function pipeCloseNT(pair, socket) { pair.encrypted.unpipe(socket); socket.destroySoon(); } + +module.exports = { + createSecurePair: + internalUtil.deprecate(createSecurePair, + 'tls.createSecurePair() is deprecated. Please use ' + + 'tls.Socket instead.', 'DEP0064'), + pipe +}; diff --git a/lib/tls.js b/lib/tls.js index bb4719d9b02c93..01ee56b2fd154e 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -235,4 +235,6 @@ exports.TLSSocket = require('_tls_wrap').TLSSocket; exports.Server = require('_tls_wrap').Server; exports.createServer = require('_tls_wrap').createServer; exports.connect = require('_tls_wrap').connect; + +// Deprecated: DEP0064 exports.createSecurePair = require('_tls_legacy').createSecurePair; diff --git a/test/parallel/test-tls-legacy-deprecated.js b/test/parallel/test-tls-legacy-deprecated.js new file mode 100644 index 00000000000000..df8290c8622f21 --- /dev/null +++ b/test/parallel/test-tls-legacy-deprecated.js @@ -0,0 +1,12 @@ +// Flags: --no-warnings +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const tls = require('tls'); + +common.expectWarning( + 'DeprecationWarning', + 'tls.createSecurePair() is deprecated. Please use tls.Socket instead.' +); + +assert.doesNotThrow(() => tls.createSecurePair()); From 60c8115f6347d469a43a843fbef3aa2c19bbf3a4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 3 Mar 2017 10:54:10 -0800 Subject: [PATCH 028/485] test: clean up comments in test-url-format test-url-format has the max-len rule disabled by a comment but doesn't have any lines that violate the max-len lint rule. Remove the comment. Reformat other comments for capitalization, punctuation, and updated URLs. PR-URL: https://github.com/nodejs/node/pull/11679 Reviewed-By: Yuta Hiroto Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock Reviewed-By: Anna Henningsen Reviewed-By: Daijiro Wachi --- test/parallel/test-url-format.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-url-format.js b/test/parallel/test-url-format.js index ba427628c28a12..077ced5a078824 100644 --- a/test/parallel/test-url-format.js +++ b/test/parallel/test-url-format.js @@ -1,11 +1,10 @@ -/* eslint-disable max-len */ 'use strict'; require('../common'); const assert = require('assert'); const url = require('url'); -// some extra formatting tests, just to verify -// that it'll format slightly wonky content to a valid url. +// Formatting tests to verify that it'll format slightly wonky content to a +// valid URL. const formatTests = { 'http://example.com?': { href: 'http://example.com/?', @@ -133,7 +132,7 @@ const formatTests = { protocol: 'dot.test:', pathname: '/bar' }, - // ipv6 support + // IPv6 support 'coap:u:p@[::1]:61616/.well-known/r?n=Temperature': { href: 'coap:u:p@[::1]:61616/.well-known/r?n=Temperature', protocol: 'coap:', @@ -150,9 +149,9 @@ const formatTests = { pathname: '/s/stopButton' }, - // encode context-specific delimiters in path and query, but do not touch + // Encode context-specific delimiters in path and query, but do not touch // other non-delimiter chars like `%`. - // + // // `#`,`?` in path '/path/to/%%23%3F+=&.txt?foo=theA1#bar': { From b77c89022b5eaa8204e7957ea49290cd0ed6aac2 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Mon, 27 Feb 2017 17:57:44 -0800 Subject: [PATCH 029/485] repl: remove magic mode semantics The workaround used in repl to support `let` and `const` in non-strict mode (known as "magic" mode) has been unnecessary since V8 v4.9 / Node.js v6.0.0. This commit functionally removes this workaround. PR-URL: https://github.com/nodejs/node/pull/11599 Refs: https://v8project.blogspot.com/2016/01/v8-release-49.html Refs: https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V6.md#6.0.0 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Prince John Wesley --- lib/repl.js | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index 60b68dc05b4c6a..3db04b7718ab20 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -78,10 +78,6 @@ exports.writer = util.inspect; exports._builtinLibs = internalModule.builtinLibs; -const BLOCK_SCOPED_ERROR = 'Block-scoped declarations (let, const, function, ' + - 'class) not yet supported outside strict mode'; - - class LineParser { constructor() { @@ -266,7 +262,6 @@ function REPLServer(prompt, code = code.replace(/\n$/, ''); code = preprocess(code); - var retry = false; var input = code; var err, result, wrappedErr; // first, create the Script object to check the syntax @@ -277,9 +272,9 @@ function REPLServer(prompt, while (true) { try { if (!/^\s*$/.test(code) && - (self.replMode === exports.REPL_MODE_STRICT || retry)) { - // "void 0" keeps the repl from returning "use strict" as the - // result value for let/const statements. + self.replMode === exports.REPL_MODE_STRICT) { + // "void 0" keeps the repl from returning "use strict" as the result + // value for statements and declarations that don't return a value. code = `'use strict'; void 0;\n${code}`; } var script = vm.createScript(code, { @@ -288,17 +283,11 @@ function REPLServer(prompt, }); } catch (e) { debug('parse error %j', code, e); - if (self.replMode === exports.REPL_MODE_MAGIC && - e.message === BLOCK_SCOPED_ERROR && - !retry || self.wrappedCmd) { - if (self.wrappedCmd) { - self.wrappedCmd = false; - // unwrap and try again - code = `${input.substring(1, input.length - 2)}\n`; - wrappedErr = e; - } else { - retry = true; - } + if (self.wrappedCmd) { + self.wrappedCmd = false; + // unwrap and try again + code = `${input.substring(1, input.length - 2)}\n`; + wrappedErr = e; continue; } // preserve original error for wrapped command From 3f27f02da04b70120b397eeee904ff92784644ac Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Mon, 27 Feb 2017 18:45:53 -0800 Subject: [PATCH 030/485] repl: docs-only deprecation of magic mode The workaround used in repl to support `let` and `const` in non-strict mode (known as "magic" mode) has been unnecessary since V8 v4.9 / Node.js v6.0.0. This commit doc-deprecate magic mode (which is now entirely equivalent to sloppy mode) in both `repl` module and in `internal/repl`, which is responsible for starting the REPL in `node` interactive mode. PR-URL: https://github.com/nodejs/node/pull/11599 Refs: https://v8project.blogspot.com/2016/01/v8-release-49.html Refs: https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V6.md#6.0.0 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Prince John Wesley --- doc/api/deprecations.md | 14 ++++++++++++++ doc/api/repl.md | 15 ++++++++------- lib/internal/repl.js | 5 ++--- lib/repl.js | 2 +- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index b4a074b7e066cd..786a6453161b9b 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -542,6 +542,20 @@ Type: Runtime The `tls.createSecurePair()` API was deprecated in documentation in Node.js 0.11.3. Users should use `tls.Socket` instead. + +### DEP0065: repl.REPL_MODE_MAGIC and NODE_REPL_MODE=magic + +Type: Documentation-only + +The `repl` module's `REPL_MODE_MAGIC` constant, used for `replMode` option, has +been deprecated. Its behavior has been functionally identical to that of +`REPL_MODE_SLOPPY` since Node.js v6.0.0, when V8 5.0 was imported. Please use +`REPL_MODE_SLOPPY` instead. + +The `NODE_REPL_MODE` environment variable is used to set the underlying +`replMode` of an interactive `node` session. Its default value, `magic`, is +similarly deprecated in favor of `sloppy`. + [alloc]: buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding [alloc_unsafe_size]: buffer.html#buffer_class_method_buffer_allocunsafe_size [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size diff --git a/doc/api/repl.md b/doc/api/repl.md index d6fa95414db098..29121bb2b5fc55 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -408,14 +408,15 @@ changes: command before writing to `output`. Defaults to [`util.inspect()`][]. * `completer` {Function} An optional function used for custom Tab auto completion. See [`readline.InterfaceCompleter`][] for an example. - * `replMode` - A flag that specifies whether the default evaluator executes - all JavaScript commands in strict mode, default mode, or a hybrid mode - ("magic" mode.) Acceptable values are: + * `replMode` {symbol} A flag that specifies whether the default evaluator + executes all JavaScript commands in strict mode or default (sloppy) mode. + Acceptable values are: * `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. * `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to prefacing every repl statement with `'use strict'`. - * `repl.REPL_MODE_MAGIC` - attempt to evaluates expressions in default - mode. If expressions fail to parse, re-try in strict mode. + * `repl.REPL_MODE_MAGIC` - This value is **deprecated**, since enhanced + spec compliance in V8 has rendered magic mode unnecessary. It is now + equivalent to `repl.REPL_MODE_SLOPPY` (documented above). * `breakEvalOnSigint` - Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is pressed. This cannot be used together with a custom `eval` function. Defaults to `false`. @@ -461,8 +462,8 @@ environment variables: - `NODE_REPL_HISTORY_SIZE` - Defaults to `1000`. Controls how many lines of history will be persisted if history is available. Must be a positive number. - `NODE_REPL_MODE` - May be any of `sloppy`, `strict`, or `magic`. Defaults - to `magic`, which will automatically run "strict mode only" statements in - strict mode. + to `sloppy`, which will allow non-strict mode code to be run. `magic` is + **deprecated** and treated as an alias of `sloppy`. ### Persistent History diff --git a/lib/internal/repl.js b/lib/internal/repl.js index 7782d6b84bb8fe..d81f56f5c96d33 100644 --- a/lib/internal/repl.js +++ b/lib/internal/repl.js @@ -39,12 +39,11 @@ function createRepl(env, opts, cb) { opts.replMode = { 'strict': REPL.REPL_MODE_STRICT, - 'sloppy': REPL.REPL_MODE_SLOPPY, - 'magic': REPL.REPL_MODE_MAGIC + 'sloppy': REPL.REPL_MODE_SLOPPY }[String(env.NODE_REPL_MODE).toLowerCase().trim()]; if (opts.replMode === undefined) { - opts.replMode = REPL.REPL_MODE_MAGIC; + opts.replMode = REPL.REPL_MODE_SLOPPY; } const historySize = Number(env.NODE_REPL_HISTORY_SIZE); diff --git a/lib/repl.js b/lib/repl.js index 3db04b7718ab20..7d50cc6bf5201c 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -633,7 +633,7 @@ exports.REPLServer = REPLServer; exports.REPL_MODE_SLOPPY = Symbol('repl-sloppy'); exports.REPL_MODE_STRICT = Symbol('repl-strict'); -exports.REPL_MODE_MAGIC = Symbol('repl-magic'); +exports.REPL_MODE_MAGIC = exports.REPL_MODE_SLOPPY; // prompt is a string to print on each line for the prompt, // source is a stream to use for I/O, defaulting to stdin/stdout. From efaab8fccf979882c39a3ad5441d2985948a40c1 Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Fri, 3 Mar 2017 15:22:08 +0900 Subject: [PATCH 031/485] build: fix llvm version detection in freebsd-10 In FreeBSD-10, the banner of clang version is "FreeBSD clang version". Fix regex to detect it. PR-URL: https://github.com/nodejs/node/pull/11668 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 0ec69229a8530f..31d682575e7a0d 100755 --- a/configure +++ b/configure @@ -576,11 +576,11 @@ def get_version_helper(cc, regexp): def get_llvm_version(cc): return get_version_helper( - cc, r"(^clang version|based on LLVM) ([3-9]\.[0-9]+)") + cc, r"(^(?:FreeBSD )?clang version|based on LLVM) ([3-9]\.[0-9]+)") def get_xcode_version(cc): return get_version_helper( - cc, r"(^Apple LLVM version) ([5-9]\.[0-9]+)") + cc, r"(^Apple LLVM version) ([5-9]\.[0-9]+)") def get_gas_version(cc): try: From 06942d89648e283961613b2787cf9dd81f166f23 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 25 Feb 2017 11:16:16 -0800 Subject: [PATCH 032/485] meta: move WORKING_GROUPS.md to CTC repo PR-URL: https://github.com/nodejs/node/pull/11555 Ref: https://github.com/nodejs/CTC/pull/73 Reviewed-By: Gibson Fahnestock Reviewed-By: Ben Noordhuis --- README.md | 5 + WORKING_GROUPS.md | 281 ---------------------------------------------- 2 files changed, 5 insertions(+), 281 deletions(-) delete mode 100644 WORKING_GROUPS.md diff --git a/README.md b/README.md index 87e73ffb441cc8..5db1b427ce499e 100644 --- a/README.md +++ b/README.md @@ -395,6 +395,11 @@ Previous releases may also have been signed with one of the following GPG keys: * **Timothy J Fontaine** <tjfontaine@gmail.com> `7937DFD2AB06298B2293C3187D33FF9D0246406D` +### Working Groups + +Information on the current Node.js Working Groups can be found in the +[CTC repository](https://github.com/nodejs/CTC/blob/master/WORKING_GROUPS.md). + [npm]: https://www.npmjs.com [Website]: https://nodejs.org/en/ [Contributing to the project]: CONTRIBUTING.md diff --git a/WORKING_GROUPS.md b/WORKING_GROUPS.md deleted file mode 100644 index 6ba06c9cafa697..00000000000000 --- a/WORKING_GROUPS.md +++ /dev/null @@ -1,281 +0,0 @@ -# Node.js Core Working Groups - -Node.js Core Working Groups are autonomous projects created by the -[Core Technical Committee (CTC)](https://github.com/nodejs/node/blob/master/GOVERNANCE.md#core-technical-committee). - -Working Groups can be formed at any time but must be ratified by the CTC. -Once formed the work defined in the Working Group charter is the -responsibility of the WG rather than the CTC. - -It is important that Working Groups are not formed pre-maturely. Working -Groups are not formed to *begin* a set of tasks but instead are formed -once that work is already underway and the contributors -think it would benefit from being done as an autonomous project. - -If the work defined in a Working Group's charter is complete, the charter -should be revoked. - -A Working Group's charter can be revoked either by consensus of the Working -Group's members or by a CTC vote. Once revoked, any future work that arises -becomes the responsibility of the CTC. - -## Joining a WG - -To find out how to join a working group, consult the GOVERNANCE.md in -the working group's repository, or in the working group's repository. - -## Starting A Core Working Group - -The process to start a Core Working Group is identical to [creating a -Top Level Working Group](https://github.com/nodejs/TSC/blob/master/WORKING_GROUPS.md#starting-a-wg). - -## Current Working Groups - -* [Website](#website) -* [Streams](#streams) -* [Build](#build) -* [Diagnostics](#diagnostics) -* [i18n](#i18n) -* [Evangelism](#evangelism) -* [Docker](#docker) -* [Addon API](#addon-api) -* [Benchmarking](#benchmarking) -* [Post-mortem](#post-mortem) -* [Intl](#intl) -* [Documentation](#documentation) -* [Testing](#testing) - - -### [Website](https://github.com/nodejs/nodejs.org) - -The website Working Group's purpose is to build and maintain a public -website for the Node.js project. - -Responsibilities include: -* Developing and maintaining a build and automation system for nodejs.org. -* Ensuring the site is regularly updated with changes made to Node.js, like - releases and features. -* Fostering and enabling a community of translators. - -### [Streams](https://github.com/nodejs/readable-stream) - -The Streams Working Group is dedicated to the support and improvement of the -Streams API as used in Node.js and the npm ecosystem. We seek to create a -composable API that solves the problem of representing multiple occurrences -of an event over time in a humane, low-overhead fashion. Improvements to the -API will be driven by the needs of the ecosystem; interoperability and -backwards compatibility with other solutions and prior versions are paramount -in importance. - -Responsibilities include: -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance notice of - changes. - -### [Build](https://github.com/nodejs/build) - -The Build Working Group's purpose is to create and maintain a distributed -automation infrastructure. - -Responsibilities include: -* Producing packages for all target platforms. -* Running tests. -* Running performance testing and comparisons. -* Creating and managing build-containers. - -### [Diagnostics](https://github.com/nodejs/diagnostics) - -The Diagnostics Working Group's purpose is to surface a set of comprehensive, -documented, and extensible diagnostic interfaces for use by Node.js tools and -JavaScript VMs. - -Responsibilities include: -* Collaborating with V8 to integrate `v8_inspector` into Node.js. -* Collaborating with V8 to integrate `trace_event` into Node.js. -* Collaborating with Core to refine `async_wrap` and `async_hooks`. -* Maintaining and improving OS trace system integration (e.g. ETW, LTTNG, dtrace). -* Documenting diagnostic capabilities and APIs in Node.js and its components. -* Exploring opportunities and gaps, discussing feature requests, and addressing - conflicts in Node.js diagnostics. -* Fostering an ecosystem of diagnostics tools for Node.js. - -### i18n - -The i18n Working Groups handle more than just translations. They -are endpoints for community members to collaborate with each -other in their language of choice. - -Each team is organized around a common spoken language. Each -language community might then produce multiple localizations for -various project resources. - -Responsibilities include: -* Translating any Node.js materials they believe are relevant to their - community. -* Reviewing processes for keeping translations up to date and of high quality. -* Managing and monitoring social media channels in their language. -* Promoting Node.js speakers for meetups and conferences in their language. - -Note that the i18n Working Groups are distinct from the [Intl](#Intl) Working Group. - -Each language community maintains its own membership. - -* [nodejs-ar - Arabic (اللغة العربية)](https://github.com/nodejs/nodejs-ar) -* [nodejs-bg - Bulgarian (български език)](https://github.com/nodejs/nodejs-bg) -* [nodejs-bn - Bengali (বাংলা)](https://github.com/nodejs/nodejs-bn) -* [nodejs-zh-CN - Chinese (中文)](https://github.com/nodejs/nodejs-zh-CN) -* [nodejs-cs - Czech (Český Jazyk)](https://github.com/nodejs/nodejs-cs) -* [nodejs-da - Danish (Dansk)](https://github.com/nodejs/nodejs-da) -* [nodejs-de - German (Deutsch)](https://github.com/nodejs/nodejs-de) -* [nodejs-el - Greek (Ελληνικά)](https://github.com/nodejs/nodejs-el) -* [nodejs-es - Spanish (Español)](https://github.com/nodejs/nodejs-es) -* [nodejs-fa - Persian (فارسی)](https://github.com/nodejs/nodejs-fa) -* [nodejs-fi - Finnish (Suomi)](https://github.com/nodejs/nodejs-fi) -* [nodejs-fr - French (Français)](https://github.com/nodejs/nodejs-fr) -* [nodejs-he - Hebrew (עברית)](https://github.com/nodejs/nodejs-he) -* [nodejs-hi - Hindi (फिजी बात)](https://github.com/nodejs/nodejs-hi) -* [nodejs-hu - Hungarian (Magyar)](https://github.com/nodejs/nodejs-hu) -* [nodejs-id - Indonesian (Bahasa Indonesia)](https://github.com/nodejs/nodejs-id) -* [nodejs-it - Italian (Italiano)](https://github.com/nodejs/nodejs-it) -* [nodejs-ja - Japanese (日本語)](https://github.com/nodejs/nodejs-ja) -* [nodejs-ka - Georgian (ქართული)](https://github.com/nodejs/nodejs-ka) -* [nodejs-ko - Korean (조선말)](https://github.com/nodejs/nodejs-ko) -* [nodejs-mk - Macedonian (Mакедонски)](https://github.com/nodejs/nodejs-mk) -* [nodejs-ms - Malay (بهاس ملايو)](https://github.com/nodejs/nodejs-ms) -* [nodejs-nl - Dutch (Nederlands)](https://github.com/nodejs/nodejs-nl) -* [nodejs-no - Norwegian (Norsk)](https://github.com/nodejs/nodejs-no) -* [nodejs-pl - Polish (Język Polski)](https://github.com/nodejs/nodejs-pl) -* [nodejs-pt - Portuguese (Português)](https://github.com/nodejs/nodejs-pt) -* [nodejs-ro - Romanian (Română)](https://github.com/nodejs/nodejs-ro) -* [nodejs-ru - Russian (Русский)](https://github.com/nodejs/nodejs-ru) -* [nodejs-sv - Swedish (Svenska)](https://github.com/nodejs/nodejs-sv) -* [nodejs-ta - Tamil (தமிழ்)](https://github.com/nodejs/nodejs-ta) -* [nodejs-tr - Turkish (Türkçe)](https://github.com/nodejs/nodejs-tr) -* [nodejs-zh-TW - Taiwanese (Hō-ló)](https://github.com/nodejs/nodejs-zh-TW) -* [nodejs-uk - Ukrainian (Українська)](https://github.com/nodejs/nodejs-uk) -* [nodejs-vi - Vietnamese (Tiếng Việtnam)](https://github.com/nodejs/nodejs-vi) - -### [Intl](https://github.com/nodejs/Intl) - -The Intl Working Group is dedicated to support and improvement of -Internationalization (i18n) and Localization (l10n) in Node. - -Responsibilities include: -* Ensuring functionality & compliance (standards: ECMA, Unicode…) -* Supporting Globalization and Internationalization issues that come up - in the tracker -* Communicating guidance and best practices -* Refining the existing `Intl` implementation - -The Intl Working Group is not responsible for translation of content. That is the -responsibility of the specific [i18n](#i18n) group for each language. - -### [Evangelism](https://github.com/nodejs/evangelism) - -The Evangelism Working Group promotes the accomplishments -of Node.js and lets the community know how they can get involved. - -Responsibilities include: -* Facilitating project messaging. -* Managing official project social media. -* Handling the promotion of speakers for meetups and conferences. -* Handling the promotion of community events. -* Publishing regular update summaries and other promotional - content. - -### [Docker](https://github.com/nodejs/docker-iojs) - -The Docker Working Group's purpose is to build, maintain, and improve official -Docker images for the Node.js project. - -Responsibilities include: -* Keeping the official Docker images updated in line with new Node.js releases. -* Decide and implement image improvements and/or fixes. -* Maintain and improve the images' documentation. - -### [Addon API](https://github.com/nodejs/nan) - -The Addon API Working Group is responsible for maintaining the NAN project and -corresponding _nan_ package in npm. The NAN project makes available an -abstraction layer for native add-on authors for Node.js, -assisting in the writing of code that is compatible with many actively used -versions of Node.js, V8 and libuv. - -Responsibilities include: -* Maintaining the [NAN](https://github.com/nodejs/nan) GitHub repository, - including code, issues and documentation. -* Maintaining the [addon-examples](https://github.com/nodejs/node-addon-examples) - GitHub repository, including code, issues and documentation. -* Maintaining the C++ Addon API within the Node.js project, in subordination to - the Node.js CTC. -* Maintaining the Addon documentation within the Node.js project, in - subordination to the Node.js CTC. -* Maintaining the _nan_ package in npm, releasing new versions as appropriate. -* Messaging about the future of the Node.js and NAN interface to give the - community advance notice of changes. - -The current members can be found in their -[README](https://github.com/nodejs/nan#collaborators). - -### [Benchmarking](https://github.com/nodejs/benchmarking) - -The purpose of the Benchmark Working Group is to gain consensus -on an agreed set of benchmarks that can be used to: - -* track and evangelize performance gains made between Node.js releases -* avoid performance regressions between releases - -Responsibilities include: -* Identifying 1 or more benchmarks that reflect customer usage. - Likely will need more than one to cover typical Node.js use cases - including low-latency and high concurrency -* Working to get community consensus on the list chosen -* Adding regular execution of chosen benchmarks to Node.js builds -* Tracking/publicizing performance between builds/releases - -### [Post-mortem](https://github.com/nodejs/post-mortem) - -The Post-mortem Diagnostics Working Group is dedicated to the support -and improvement of postmortem debugging for Node.js. It seeks to -elevate the role of postmortem debugging for Node, to assist in the -development of techniques and tools, and to make techniques and tools -known and available to Node.js users. - -Responsibilities include: -* Defining and adding interfaces/APIs in order to allow dumps - to be generated when needed. -* Defining and adding common structures to the dumps generated - in order to support tools that want to introspect those dumps. - -### [Documentation](https://github.com/nodejs/docs) - -The Documentation Working Group exists to support the improvement of Node.js -documentation, both in the core API documentation, and elsewhere, such as the -Node.js website. Its intent is to work closely with the Evangelism, Website, and -Intl Working Groups to make excellent documentation available and accessible -to all. - -Responsibilities include: -* Defining and maintaining documentation style and content standards. -* Producing documentation in a format acceptable for the Website Working Group - to consume. -* Ensuring that Node's documentation addresses a wide variety of audiences. -* Creating and operating a process for documentation review that produces - quality documentation and avoids impeding the progress of Core work. - -### [Testing](https://github.com/nodejs/testing) - -The Node.js Testing Working Group's purpose is to extend and improve testing of -the Node.js source code. - -Responsibilities include: -* Coordinating an overall strategy for improving testing. -* Documenting guidelines around tests. -* Working with the Build Working Group to improve continuous integration. -* Improving tooling for testing. - From 53f386932209ae375c3cf811329483e30868f3ac Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sat, 4 Mar 2017 00:52:12 +0800 Subject: [PATCH 033/485] net: refactor overloaded argument handling * Make normalizeArgs return either [options, null] or [options, cb] (the second element won't be undefined anymore) and avoid OOB read * Use Socket.prototype.connect.call instead of .apply when the number of arguments is certain(returned by normalizeArgs). * Rename some args[i] for readability * Refactor Server.prototype.listen, separate backlogFromArgs and options.backlog, comment the overloading process, refactor control flow PR-URL: https://github.com/nodejs/node/pull/11667 Reviewed-By: Matteo Collina Reviewed-By: James M Snell --- lib/net.js | 170 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 101 insertions(+), 69 deletions(-) diff --git a/lib/net.js b/lib/net.js index d498efb184e713..64e50e907719d5 100644 --- a/lib/net.js +++ b/lib/net.js @@ -24,7 +24,6 @@ var cluster; const errnoException = util._errnoException; const exceptionWithHostPort = util._exceptionWithHostPort; const isLegalPort = internalNet.isLegalPort; -const assertPort = internalNet.assertPort; function noop() {} @@ -60,37 +59,50 @@ exports.createServer = function(options, connectionListener) { // connect(path, [cb]); // exports.connect = exports.createConnection = function() { - var args = new Array(arguments.length); + const args = new Array(arguments.length); for (var i = 0; i < arguments.length; i++) args[i] = arguments[i]; - args = normalizeArgs(args); - debug('createConnection', args); - var s = new Socket(args[0]); + // TODO(joyeecheung): use destructuring when V8 is fast enough + const normalized = normalizeArgs(args); + const options = normalized[0]; + const cb = normalized[1]; + debug('createConnection', normalized); + const socket = new Socket(options); - if (args[0].timeout) { - s.setTimeout(args[0].timeout); + if (options.timeout) { + socket.setTimeout(options.timeout); } - return Socket.prototype.connect.apply(s, args); + return Socket.prototype.connect.call(socket, options, cb); }; -// Returns an array [options, cb], where cb can be null. -// It is the same as the argument of Socket.prototype.connect(). -// This is used by Server.prototype.listen() and Socket.prototype.connect(). -function normalizeArgs(args) { - var options = {}; +// Returns an array [options, cb], where options is an object, +// cb is either a funciton or null. +// Used to normalize arguments of Socket.prototype.connect() and +// Server.prototype.listen(). Possible combinations of paramters: +// (options[...][, cb]) +// (path[...][, cb]) +// ([port][, host][...][, cb]) +// For Socket.prototype.connect(), the [...] part is ignored +// For Server.prototype.listen(), the [...] part is [, backlog] +// but will not be handled here (handled in listen()) +function normalizeArgs(args) { if (args.length === 0) { - return [options]; - } else if (args[0] !== null && typeof args[0] === 'object') { - // connect(options, [cb]) - options = args[0]; - } else if (isPipeName(args[0])) { - // connect(path, [cb]); - options.path = args[0]; + return [{}, null]; + } + + const arg0 = args[0]; + var options = {}; + if (typeof arg0 === 'object' && arg0 !== null) { + // (options[...][, cb]) + options = arg0; + } else if (isPipeName(arg0)) { + // (path[...][, cb]) + options.path = arg0; } else { - // connect(port, [host], [cb]) - options.port = args[0]; + // ([port][, host][...][, cb]) + options.port = arg0; if (args.length > 1 && typeof args[1] === 'string') { options.host = args[1]; } @@ -98,8 +110,9 @@ function normalizeArgs(args) { var cb = args[args.length - 1]; if (typeof cb !== 'function') - cb = null; - return [options, cb]; + return [options, null]; + else + return [options, cb]; } exports._normalizeArgs = normalizeArgs; @@ -892,13 +905,16 @@ Socket.prototype.connect = function(options, cb) { if (options === null || typeof options !== 'object') { // Old API: - // connect(port, [host], [cb]) - // connect(path, [cb]); - var args = new Array(arguments.length); + // connect(port[, host][, cb]) + // connect(path[, cb]); + const args = new Array(arguments.length); for (var i = 0; i < arguments.length; i++) args[i] = arguments[i]; - args = normalizeArgs(args); - return Socket.prototype.connect.apply(this, args); + const normalized = normalizeArgs(args); + const normalizedOptions = normalized[0]; + const normalizedCb = normalized[1]; + return Socket.prototype.connect.call(this, + normalizedOptions, normalizedCb); } if (this.destroyed) { @@ -923,7 +939,7 @@ Socket.prototype.connect = function(options, cb) { initSocketHandle(this); } - if (typeof cb === 'function') { + if (cb !== null) { this.once('connect', cb); } @@ -1334,57 +1350,73 @@ function listen(self, address, port, addressType, backlog, fd, exclusive) { Server.prototype.listen = function() { - var args = new Array(arguments.length); + const args = new Array(arguments.length); for (var i = 0; i < arguments.length; i++) args[i] = arguments[i]; - var [options, cb] = normalizeArgs(args); + // TODO(joyeecheung): use destructuring when V8 is fast enough + const normalized = normalizeArgs(args); + var options = normalized[0]; + const cb = normalized[1]; - if (typeof cb === 'function') { + var hasCallback = (cb !== null); + if (hasCallback) { this.once('listening', cb); } - - if (args.length === 0 || typeof args[0] === 'function') { - // Bind to a random port. - options.port = 0; - } - - // The third optional argument is the backlog size. - // When the ip is omitted it can be the second argument. - var backlog = toNumber(args.length > 1 && args[1]) || - toNumber(args.length > 2 && args[2]); + const backlogFromArgs = + // (handle, backlog) or (path, backlog) or (port, backlog) + toNumber(args.length > 1 && args[1]) || + toNumber(args.length > 2 && args[2]); // (port, host, backlog) options = options._handle || options.handle || options; - + // (handle[, backlog][, cb]) where handle is an object with a handle if (options instanceof TCP) { this._handle = options; - listen(this, null, -1, -1, backlog); - } else if (typeof options.fd === 'number' && options.fd >= 0) { - listen(this, null, null, null, backlog, options.fd); - } else { - backlog = options.backlog || backlog; - - if (typeof options.port === 'number' || typeof options.port === 'string' || - (typeof options.port === 'undefined' && 'port' in options)) { - // Undefined is interpreted as zero (random port) for consistency - // with net.connect(). - assertPort(options.port); - if (options.host) { - lookupAndListen(this, options.port | 0, options.host, backlog, - options.exclusive); - } else { - listen(this, null, options.port | 0, 4, backlog, undefined, - options.exclusive); - } - } else if (options.path && isPipeName(options.path)) { - // UNIX socket or Windows pipe. - const pipeName = this._pipeName = options.path; - listen(this, pipeName, -1, -1, backlog, undefined, options.exclusive); - } else { - throw new Error('Invalid listen argument: ' + options); + listen(this, null, -1, -1, backlogFromArgs); + return this; + } + // (handle[, backlog][, cb]) where handle is an object with a fd + if (typeof options.fd === 'number' && options.fd >= 0) { + listen(this, null, null, null, backlogFromArgs, options.fd); + return this; + } + + // ([port][, host][, backlog][, cb]) where port is omitted, + // that is, listen() or listen(cb), + // or (options[, cb]) where options.port is explicitly set as undefined, + // bind to an arbitrary unused port + if (args.length === 0 || typeof args[0] === 'function' || + (typeof options.port === 'undefined' && 'port' in options)) { + options.port = 0; + } + // ([port][, host][, backlog][, cb]) where port is specified + // or (options[, cb]) where options.port is specified + // or if options.port is normalized as 0 before + if (typeof options.port === 'number' || typeof options.port === 'string') { + if (!isLegalPort(options.port)) { + throw new RangeError('"port" argument must be >= 0 and < 65536'); + } + const backlog = options.backlog || backlogFromArgs; + // start TCP server listening on host:port + if (options.host) { + lookupAndListen(this, options.port | 0, options.host, backlog, + options.exclusive); + } else { // Undefined host, listens on unspecified address + listen(this, null, options.port | 0, 4, // addressType will be ignored + backlog, undefined, options.exclusive); } + return this; } - return this; + // (path[, backlog][, cb]) or (options[, cb]) + // where path or options.path is a UNIX domain socket or Windows pipe + if (options.path && isPipeName(options.path)) { + const pipeName = this._pipeName = options.path; + const backlog = options.backlog || backlogFromArgs; + listen(this, pipeName, -1, -1, backlog, undefined, options.exclusive); + return this; + } + + throw new Error('Invalid listen argument: ' + options); }; function lookupAndListen(self, port, address, backlog, exclusive) { From f6b030986155dd1e2307736f2672fa4885ceddf6 Mon Sep 17 00:00:00 2001 From: Amelia Clarke Date: Fri, 3 Mar 2017 15:23:48 -0800 Subject: [PATCH 034/485] doc: argument types for https methods Ref: https://github.com/nodejs/node/issues/9399 PR-URL: https://github.com/nodejs/node/pull/11681 Reviewed-By: James M Snell Reviewed-By: Joyee Cheung --- doc/api/https.md | 100 ++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 63 deletions(-) diff --git a/doc/api/https.md b/doc/api/https.md index 355fd7b133a76d..515a4362effc85 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -21,17 +21,20 @@ added: v0.3.4 This class is a subclass of `tls.Server` and emits events same as [`http.Server`][]. See [`http.Server`][] for more information. -### server.setTimeout(msecs, callback) +### server.setTimeout([msecs][, callback]) +- `msecs` {number} Defaults to 120000 (2 minutes). +- `callback` {Function} See [`http.Server#setTimeout()`][]. -### server.timeout +### server.timeout([msecs]) +- `msecs` {number} Defaults to 120000 (2 minutes). See [`http.Server#timeout`][]. @@ -39,10 +42,8 @@ See [`http.Server#timeout`][]. - -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. +- `options` {Object} Accepts `options` from [`tls.createServer()`][] and [`tls.createSecureContext()`][]. +- `requestListener` {Function} A listener to be added to the `request` event. Example: @@ -82,19 +83,33 @@ https.createServer(options, (req, res) => { +- `callback` {Function} See [`http.close()`][] for details. ### server.listen(handle[, callback]) +- `handle` {Object} +- `callback` {Function} + ### server.listen(path[, callback]) -### server.listen(port[, host][, backlog][, callback]) +- `path` {string} +- `callback` {Function} + +### server.listen([port][, host][, backlog][, callback]) +- `port` {number} +- `hostname` {string} +- `backlog` {number} +- `callback` {Function} See [`http.listen()`][] for details. -## https.get(options, callback) +## https.get(options[, callback]) +- `options` {Object | string} Accepts the same `options` as + [`https.request()`][], with the `method` always set to `GET`. +- `callback` {Function} Like [`http.get()`][] but for HTTPS. @@ -126,18 +141,27 @@ added: v0.5.9 Global instance of [`https.Agent`][] for all HTTPS client requests. -## https.request(options, callback) +## https.request(options[, callback]) +- `options` {Object | string} Accepts all `options` from [`http.request()`][], + with some differences in default values: + - `protocol` Defaults to `https:` + - `port` Defaults to `443`. + - `agent` Defaults to `https.globalAgent`. +- `callback` {Function} + Makes a request to a secure web server. +The following additional `options` from [`tls.connect()`][] are also accepted when using a + custom [`Agent`][]: + `pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`, `secureProtocol`, `servername` + `options` can be an object or a string. If `options` is a string, it is automatically parsed with [`url.parse()`][]. -All options from [`http.request()`][] are valid. - Example: ```js @@ -164,58 +188,7 @@ req.on('error', (e) => { }); req.end(); ``` - -The options argument has the following options - -- `host`: A domain name or IP address of the server to issue the request to. - Defaults to `'localhost'`. -- `hostname`: Alias for `host`. To support `url.parse()` `hostname` is - preferred over `host`. -- `family`: IP address family to use when resolving `host` and `hostname`. - Valid values are `4` or `6`. When unspecified, both IP v4 and v6 will be - used. -- `port`: Port of remote server. Defaults to 443. -- `localAddress`: Local interface to bind for network connections. -- `socketPath`: Unix Domain Socket (use one of host:port or socketPath). -- `method`: A string specifying the HTTP request method. Defaults to `'GET'`. -- `path`: Request path. Defaults to `'/'`. Should include query string if any. - E.G. `'/index.html?page=12'`. An exception is thrown when the request path - contains illegal characters. Currently, only spaces are rejected but that - may change in the future. -- `headers`: An object containing request headers. -- `auth`: Basic authentication i.e. `'user:password'` to compute an - Authorization header. -- `agent`: Controls [`Agent`][] behavior. When an Agent is used request will - default to `Connection: keep-alive`. Possible values: - - `undefined` (default): use [`globalAgent`][] for this host and port. - - `Agent` object: explicitly use the passed in `Agent`. - - `false`: opts out of connection pooling with an Agent, defaults request to - `Connection: close`. - -The following options from [`tls.connect()`][] can also be specified: - -- `pfx`: Certificate, Private key and CA certificates to use for SSL. Default `null`. -- `key`: Private key to use for SSL. Default `null`. -- `passphrase`: A string of passphrase for the private key or pfx. Default `null`. -- `cert`: Public x509 certificate to use. Default `null`. -- `ca`: A string, [`Buffer`][] or array of strings or [`Buffer`][]s of trusted - certificates in PEM format. If this is omitted several well known "root" - CAs will be used, like VeriSign. These are used to authorize connections. -- `ciphers`: A string describing the ciphers to use or exclude. Consult - for - details on the format. -- `rejectUnauthorized`: If `true`, the server certificate is verified against - 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 - OpenSSL and are defined in the constant [`SSL_METHODS`][]. -- `servername`: Servername for SNI (Server Name Indication) TLS extension. - -In order to specify these options, use a custom [`Agent`][]. - -Example: +Example using options from [`tls.connect()`][]: ```js var options = { @@ -269,4 +242,5 @@ var req = https.request(options, (res) => { [`SSL_METHODS`]: https://www.openssl.org/docs/man1.0.2/ssl/ssl.html#DEALING-WITH-PROTOCOL-METHODS [`tls.connect()`]: tls.html#tls_tls_connect_options_callback [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener +[`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options [`url.parse()`]: url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost From 9772fb928263562a755f1aeef6a65620e7e51bf2 Mon Sep 17 00:00:00 2001 From: Amelia Clarke Date: Fri, 3 Mar 2017 15:45:20 -0800 Subject: [PATCH 035/485] doc: http cleanup and missing argument types Ref: https://github.com/nodejs/node/issues/9399 PR-URL: https://github.com/nodejs/node/pull/11681 Reviewed-By: James M Snell Reviewed-By: Joyee Cheung --- doc/api/http.md | 163 ++++++++++++++++++++++++------------------------ 1 file changed, 82 insertions(+), 81 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 120cf98f237818..88c4552c18f63a 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -73,9 +73,9 @@ It is good practice, to [`destroy()`][] an `Agent` instance when it is no longer in use, because unused sockets consume OS resources. Sockets are removed from an agent's pool when the socket emits either -a `'close'` event or an `'agentRemove'` event. This means that if -you intend to keep one HTTP request open for a long time and don't -want it to stay in the pool you can do something along the lines of: +a `'close'` event or an `'agentRemove'` event. When intending to keep one +HTTP request open for a long time without keeping it in the pool, something +like the following may be done: ```js http.get(options, (res) => { @@ -85,7 +85,7 @@ http.get(options, (res) => { }); ``` -You may also use an agent for an individual request. By providing +An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options will be used for the client connection. @@ -112,21 +112,21 @@ added: v0.3.4 Can have the following fields: * `keepAlive` {boolean} Keep sockets around even when there are no outstanding requests, so they can be used for future requests without - having to reestablish a TCP connection. Default = `false` - * `keepAliveMsecs` {Integer} When using the `keepAlive` option, specifies + having to reestablish a TCP connection. Defaults to `false` + * `keepAliveMsecs` {number} When using the `keepAlive` option, specifies the [initial delay](net.html#net_socket_setkeepalive_enable_initialdelay) for TCP Keep-Alive packets. Ignored when the - `keepAlive` option is `false` or `undefined`. Default = `1000`. + `keepAlive` option is `false` or `undefined`. Defaults to `1000`. * `maxSockets` {number} Maximum number of sockets to allow per - host. Default = `Infinity`. + host. Defaults to `Infinity`. * `maxFreeSockets` {number} Maximum number of sockets to leave open in a free state. Only relevant if `keepAlive` is set to `true`. - Default = `256`. + Defaults to `256`. The default [`http.globalAgent`][] that is used by [`http.request()`][] has all of these values set to their respective defaults. -To configure any of them, you must create your own [`http.Agent`][] instance. +To configure any of them, a custom [`http.Agent`][] instance must be created. ```js const http = require('http'); @@ -162,9 +162,9 @@ added: v0.11.4 Destroy any sockets that are currently in use by the agent. -It is usually not necessary to do this. However, if you are using an +It is usually not necessary to do this. However, if using an agent with `keepAlive` enabled, then it is best to explicitly shut down -the agent when you know that it will no longer be used. Otherwise, +the agent when it will no longer be used. Otherwise, sockets may hang open for quite a long time before the server terminates them. @@ -188,7 +188,7 @@ added: v0.11.4 * `port` {number} Port of remote server * `localAddress` {string} Local interface to bind for network connections when issuing the request -* Returns: {String} +* Returns: {string} Get a unique name for a set of request options, to determine whether a connection can be reused. For an HTTP agent, this returns @@ -201,7 +201,7 @@ socket reusability. added: v0.11.7 --> -* {Number} +* {number} By default set to 256. For agents with `keepAlive` enabled, this sets the maximum number of sockets that will be left open in the free @@ -212,7 +212,7 @@ state. added: v0.3.6 --> -* {Number} +* {number} By default set to Infinity. Determines how many concurrent sockets the agent can have open per origin. Origin is either a 'host:port' or @@ -258,8 +258,8 @@ During the [`'response'`][] event, one can add listeners to the response object; particularly to listen for the `'data'` event. If no [`'response'`][] handler is added, then the response will be -entirely discarded. However, if you add a [`'response'`][] event handler, -then you **must** consume the data from the response object, either by +entirely discarded. However, if a [`'response'`][] event handler is added, +then the data from the response object **must** be consumed, either by calling `response.read()` whenever there is a `'readable'` event, or by adding a `'data'` handler, or by calling the `.resume()` method. Until the data is consumed, the `'end'` event will not fire. Also, until @@ -301,7 +301,7 @@ Emitted each time a server responds to a request with a `CONNECT` method. If thi event is not being listened for, clients receiving a `CONNECT` method will have their connections closed. -A client and server pair that shows you how to listen for the `'connect'` event: +A client and server pair demonstrating how to listen for the `'connect'` event: ```js const http = require('http'); @@ -399,7 +399,7 @@ Emitted each time a server responds to a request with an upgrade. If this event is not being listened for, clients receiving an upgrade header will have their connections closed. -A client server pair that show you how to listen for the `'upgrade'` event. +A client server pair demonstrating how to listen for the `'upgrade'` event. ```js const http = require('http'); @@ -484,13 +484,13 @@ added: v1.6.0 Flush the request headers. -For efficiency reasons, Node.js normally buffers the request headers until you -call `request.end()` or write the first chunk of request data. It then tries -hard to pack the request headers and data into a single TCP packet. +For efficiency reasons, Node.js normally buffers the request headers until +`request.end()` is called or the first chunk of request data is written. It +then tries to pack the request headers and data into a single TCP packet. -That's usually what you want (it saves a TCP round-trip) but not when the first -data is not sent until possibly much later. `request.flushHeaders()` lets you bypass -the optimization and kickstart the request. +That's usually desired (it saves a TCP round-trip), but not when the first +data is not sent until possibly much later. `request.flushHeaders()` bypasses +the optimization and kickstarts the request. ### request.setNoDelay([noDelay]) -* {Boolean} +* {boolean} A Boolean indicating whether or not the server is listening for connections. -### server.maxHeadersCount +### server.maxHeadersCount([limit]) -* {Number} +* `limit` {number} Defaults to 1000. Limits maximum incoming headers count, equal to 1000 by default. If set to 0 - no limit will be applied. -### server.setTimeout(msecs, callback) +### server.setTimeout([msecs][, callback]) -* `msecs` {number} +* `msecs` {number} Defaults to 120000 (2 minutes). * `callback` {Function} Sets the timeout value for sockets, and emits a `'timeout'` event on @@ -820,18 +820,17 @@ If there is a `'timeout'` event listener on the Server object, then it will be called with the timed-out socket as an argument. By default, the Server's timeout value is 2 minutes, and sockets are -destroyed automatically if they time out. However, if you assign a -callback to the Server's `'timeout'` event, then you are responsible -for handling socket timeouts. +destroyed automatically if they time out. However, if a callback is assigned +to the Server's `'timeout'` event, timeouts must be handled explicitly. Returns `server`. -### server.timeout +### server.timeout([msecs]) -* {Number} Default = 120000 (2 minutes) +* `msecs` {number} Defaults to 120000 (2 minutes). The number of milliseconds of inactivity before a socket is presumed to have timed out. @@ -888,7 +887,7 @@ Trailers will **only** be emitted if chunked encoding is used for the response; if it is not (e.g. if the request was HTTP/1.0), they will be silently discarded. -Note that HTTP requires the `Trailer` header to be sent if you intend to +Note that HTTP requires the `Trailer` header to be sent in order to emit trailers, with a list of the header fields in its value. E.g., ```js @@ -926,7 +925,7 @@ is finished. added: v0.0.2 --> -* {Boolean} +* {boolean} Boolean value that indicates whether the response has completed. Starts as `false`. After [`response.end()`][] executes, the value will be `true`. @@ -937,7 +936,7 @@ added: v0.4.0 --> * `name` {string} -* Returns: {String} +* Returns: {string} Reads out a header that's already been queued but not sent to the client. Note that the name is case insensitive. @@ -996,8 +995,8 @@ var headers = response.getHeaders(); added: v7.7.0 --> -* `name` {String} -* Returns: {Boolean} +* `name` {string} +* Returns: {boolean} Returns `true` if the header identified by `name` is currently set in the outgoing headers. Note that the header name matching is case-insensitive. @@ -1013,7 +1012,7 @@ var hasContentType = response.hasHeader('content-type'); added: v0.9.3 --> -* {Boolean} +* {boolean} Boolean (read-only). True if headers were sent, false otherwise. @@ -1037,7 +1036,7 @@ response.removeHeader('Content-Encoding'); added: v0.7.5 --> -* {Boolean} +* {boolean} When true, the Date header will be automatically generated and sent in the response if it is not already present in the headers. Defaults to true. @@ -1051,11 +1050,11 @@ added: v0.4.0 --> * `name` {string} -* `value` {string} +* `value` {string | string[]} Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings -here if you need to send multiple headers with the same name. +here to send multiple headers with the same name. Example: @@ -1086,7 +1085,7 @@ const server = http.createServer((req,res) => { }); ``` -### response.setTimeout(msecs, callback) +### response.setTimeout(msecs[, callback]) @@ -1099,10 +1098,9 @@ provided, then it is added as a listener on the `'timeout'` event on the response object. If no `'timeout'` listener is added to the request, the response, or -the server, then sockets are destroyed when they time out. If you -assign a handler on the request, the response, or the server's -`'timeout'` events, then it is your responsibility to handle timed out -sockets. +the server, then sockets are destroyed when they time out. If a handler is +assigned to the request, the response, or the server's `'timeout'` events, +timed out sockets must be handled explicitly. Returns `response`. @@ -1111,7 +1109,7 @@ Returns `response`. added: v0.4.0 --> -* {Number} +* {number} When using implicit headers (not calling [`response.writeHead()`][] explicitly), this property controls the status code that will be sent to the client when @@ -1131,7 +1129,7 @@ status code which was sent out. added: v0.11.8 --> -* {String} +* {string} When using implicit headers (not calling [`response.writeHead()`][] explicitly), this property controls the status message that will be sent to the client when the headers get @@ -1155,7 +1153,7 @@ added: v0.1.29 * `chunk` {string | Buffer} * `encoding` {string} * `callback` {Function} -* Returns: {Boolean} +* Returns: {boolean} If this method is called and [`response.writeHead()`][] has not been called, it will switch to implicit header mode and flush the implicit headers. @@ -1172,10 +1170,10 @@ of data is flushed. higher-level multi-part body encodings that may be used. The first time [`response.write()`][] is called, it will send the buffered -header information and the first body to the client. The second time -[`response.write()`][] is called, Node.js assumes you're going to be streaming -data, and sends that separately. That is, the response is buffered up to the -first chunk of body. +header information and the first chunk of the body to the client. The second +time [`response.write()`][] is called, Node.js assumes data will be streamed, +and sends the new data separately. That is, the response is buffered up to the +first chunk of the body. 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. @@ -1220,8 +1218,8 @@ response.writeHead(200, { This method must only be called once on a message and it must be called before [`response.end()`][] is called. -If you call [`response.write()`][] or [`response.end()`][] before calling this, -the implicit/mutable headers will be calculated and call this function for you. +If [`response.write()`][] or [`response.end()`][] are called before calling +this, the implicit/mutable headers will be calculated and call this function. When headers have been set with [`response.setHeader()`][], they will be merged with any headers passed to [`response.writeHead()`][], with the headers passed to @@ -1323,7 +1321,7 @@ header name: added: v0.1.1 --> -* {String} +* {string} In case of server request, the HTTP version sent by the client. In the case of client response, the HTTP version of the connected-to server. @@ -1337,7 +1335,7 @@ Also `message.httpVersionMajor` is the first integer and added: v0.1.1 --> -* {String} +* {string} **Only valid for request obtained from [`http.Server`][].** @@ -1412,7 +1410,7 @@ client's authentication details. added: v0.1.1 --> -* {Number} +* {number} **Only valid for response obtained from [`http.ClientRequest`][].** @@ -1423,7 +1421,7 @@ The 3-digit HTTP response status code. E.G. `404`. added: v0.11.10 --> -* {String} +* {string} **Only valid for response obtained from [`http.ClientRequest`][].** @@ -1443,7 +1441,7 @@ The request/response trailers object. Only populated at the `'end'` event. added: v0.1.90 --> -* {String} +* {string} **Only valid for request obtained from [`http.Server`][].** @@ -1462,8 +1460,8 @@ Then `request.url` will be: '/status?name=ryan' ``` -If you would like to parse the URL into its parts, you can use -`require('url').parse(request.url)`. Example: +To parse the url into its parts `require('url').parse(request.url)` +can be used. Example: ```txt $ node @@ -1476,9 +1474,10 @@ $ node } ``` -If you would like to extract the parameters from the query string, -you can use the `require('querystring').parse` function, or pass -`true` as the second argument to `require('url').parse`. Example: +To extract the parameters from the query string, the +`require('querystring').parse` function can be used, or +`true` can be passed as the second argument to `require('url').parse`. +Example: ```txt $ node @@ -1515,6 +1514,7 @@ Found'`. +- `requestListener` {Function} * Returns: {http.Server} @@ -1528,7 +1528,8 @@ added to the [`'request'`][] event. added: v0.3.6 --> -* `options` {Object} +* `options` {Object | string} Accepts the same `options` as + [`http.request()`][], with the `method` always set to `GET`. * `callback` {Function} * Returns: {http.ClientRequest} @@ -1594,10 +1595,10 @@ requests. added: v0.3.6 --> -* `options` {Object} - * `protocol` {string} Protocol to use. Defaults to `'http:'`. +* `options` {Object | string} + * `protocol` {string} Protocol to use. Defaults to `http:`. * `host` {string} A domain name or IP address of the server to issue the - request to. Defaults to `'localhost'`. + request to. Defaults to `localhost`. * `hostname` {string} Alias for `host`. To support [`url.parse()`][], `hostname` is preferred over `host`. * `family` {number} IP address family to use when resolving `host` and @@ -1616,7 +1617,7 @@ added: v0.3.6 * `headers` {Object} An object containing request headers. * `auth` {string} Basic authentication i.e. `'user:password'` to compute an Authorization header. - * `agent` {http.Agent|boolean} Controls [`Agent`][] behavior. Possible values: + * `agent` {http.Agent | boolean} Controls [`Agent`][] behavior. Possible values: * `undefined` (default): use [`http.globalAgent`][] for this host and port. * `Agent` object: explicitly use the passed in `Agent`. * `false`: causes a new `Agent` with default values to be used. @@ -1625,7 +1626,7 @@ added: v0.3.6 avoid creating a custom `Agent` class just to override the default `createConnection` function. See [`agent.createConnection()`][] for more details. - * `timeout` {Integer}: A number specifying the socket timeout in milliseconds. + * `timeout` {number}: A number specifying the socket timeout in milliseconds. This will set the timeout before the socket is connected. * `callback` {Function} * Returns: {http.ClientRequest} @@ -1683,7 +1684,7 @@ req.end(); ``` Note that in the example `req.end()` was called. With `http.request()` one -must always call `req.end()` to signify that you're done with the request - +must always call `req.end()` to signify the end of the request - even if there is no data being written to the request body. If any error is encountered during the request (be that with DNS resolution, @@ -1699,8 +1700,8 @@ There are a few special headers that should be noted. * Sending a 'Content-Length' header will disable the default chunked encoding. * Sending an 'Expect' header will immediately send the request headers. - Usually, when sending 'Expect: 100-continue', you should both set a timeout - and listen for the `'continue'` event. See RFC2616 Section 8.2.3 for more + Usually, when sending 'Expect: 100-continue', both a timeout and a listener + for the `continue` event should be set. See RFC2616 Section 8.2.3 for more information. * Sending an Authorization header will override using the `auth` option From 5f32024055adc2f908c582d933259f9fcf5db423 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Sun, 5 Mar 2017 18:03:39 +0100 Subject: [PATCH 036/485] doc/tools: fix more type inconsistencies - fix a number of uppercase types - lowercase 'integer' - consistent formatting in crypto PR-URL: https://github.com/nodejs/node/pull/11697 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Timothy Gu --- doc/api/assert.md | 2 +- doc/api/buffer.md | 204 +++++++++++----------- doc/api/child_process.md | 32 ++-- doc/api/cluster.md | 8 +- doc/api/console.md | 10 +- doc/api/crypto.md | 20 +-- doc/api/dns.md | 4 +- doc/api/errors.md | 18 +- doc/api/fs.md | 354 +++++++++++++++++++-------------------- doc/api/globals.md | 4 +- doc/api/http.md | 8 +- doc/api/modules.md | 6 +- doc/api/net.md | 2 +- doc/api/os.md | 24 +-- doc/api/path.md | 22 +-- doc/api/process.md | 44 ++--- doc/api/repl.md | 2 +- doc/api/stream.md | 8 +- doc/api/url.md | 38 ++--- tools/doc/type-parser.js | 9 +- 20 files changed, 410 insertions(+), 409 deletions(-) diff --git a/doc/api/assert.md b/doc/api/assert.md index 019de3f0cf2713..70e13f3b87760c 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -248,7 +248,7 @@ added: v0.1.21 * `actual` {any} * `expected` {any} * `message` {any} -* `operator` {String} +* `operator` {string} Throws an `AssertionError`. If `message` is falsy, the error message is set as the values of `actual` and `expected` separated by the provided `operator`. diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 874dcf07971b27..ddc17f28ca7f47 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -357,8 +357,8 @@ changes: * `arrayBuffer` {ArrayBuffer} An [`ArrayBuffer`] or the `.buffer` property of a [`TypedArray`]. -* `byteOffset` {Integer} Index of first byte to expose. **Default:** `0` -* `length` {Integer} Number of bytes to expose. +* `byteOffset` {integer} Index of first byte to expose. **Default:** `0` +* `length` {integer} Number of bytes to expose. **Default:** `arrayBuffer.length - byteOffset` This creates a view of the [`ArrayBuffer`] without copying the underlying @@ -438,7 +438,7 @@ changes: > Stability: 0 - Deprecated: Use [`Buffer.alloc()`] instead (also see > [`Buffer.allocUnsafe()`]). -* `size` {Integer} The desired length of the new `Buffer` +* `size` {integer} The desired length of the new `Buffer` Allocates a new `Buffer` of `size` bytes. If the `size` is larger than [`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown. @@ -507,8 +507,8 @@ console.log(buf2.toString()); added: v5.10.0 --> -* `size` {Integer} The desired length of the new `Buffer` -* `fill` {string | Buffer | Integer} A value to pre-fill the new `Buffer` with. +* `size` {integer} The desired length of the new `Buffer` +* `fill` {string|Buffer|integer} A value to pre-fill the new `Buffer` with. **Default:** `0` * `encoding` {string} If `fill` is a string, this is its encoding. **Default:** `'utf8'` @@ -568,7 +568,7 @@ changes: description: Passing a negative `size` will now throw an error. --> -* `size` {Integer} The desired length of the new `Buffer` +* `size` {integer} The desired length of the new `Buffer` Allocates a new `Buffer` of `size` bytes. If the `size` is larger than [`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown. @@ -614,7 +614,7 @@ additional performance that [`Buffer.allocUnsafe()`] provides. added: v5.10.0 --> -* `size` {Integer} The desired length of the new `Buffer` +* `size` {integer} The desired length of the new `Buffer` Allocates a new `Buffer` of `size` bytes. If the `size` is larger than [`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown. @@ -674,11 +674,11 @@ changes: or `ArrayBuffer`. --> -* `string` {string | Buffer | TypedArray | DataView | ArrayBuffer} A value to +* `string` {string|Buffer|TypedArray|DataView|ArrayBuffer} A value to calculate the length of * `encoding` {string} If `string` is a string, this is its encoding. **Default:** `'utf8'` -* Returns: {Integer} The number of bytes contained within `string` +* Returns: {integer} The number of bytes contained within `string` Returns the actual byte length of a string. This is not the same as [`String.prototype.length`] since that returns the number of *characters* in @@ -712,7 +712,7 @@ changes: * `buf1` {Buffer|Uint8Array} * `buf2` {Buffer|Uint8Array} -* Returns: {Integer} +* Returns: {integer} Compares `buf1` to `buf2` typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling @@ -740,7 +740,7 @@ changes: --> * `list` {Array} List of `Buffer` or [`Uint8Array`] instances to concat -* `totalLength` {Integer} Total length of the `Buffer` instances in `list` +* `totalLength` {integer} Total length of the `Buffer` instances in `list` when concatenated * Returns: {Buffer} @@ -800,8 +800,8 @@ added: v5.10.0 * `arrayBuffer` {ArrayBuffer} An [`ArrayBuffer`] or the `.buffer` property of a [`TypedArray`]. -* `byteOffset` {Integer} Index of first byte to expose. **Default:** `0` -* `length` {Integer} Number of bytes to expose. +* `byteOffset` {integer} Index of first byte to expose. **Default:** `0` +* `length` {integer} Number of bytes to expose. **Default:** `arrayBuffer.length - byteOffset` This creates a view of the [`ArrayBuffer`] without copying the underlying @@ -908,7 +908,7 @@ added: v0.1.101 --> * `obj` {Object} -* Returns: {Boolean} +* Returns: {boolean} Returns `true` if `obj` is a `Buffer`, `false` otherwise. @@ -918,7 +918,7 @@ added: v0.9.1 --> * `encoding` {string} A character encoding name to check -* Returns: {Boolean} +* Returns: {boolean} Returns `true` if `encoding` contains a supported character encoding, or `false` otherwise. @@ -928,7 +928,7 @@ otherwise. added: v0.11.3 --> -* {Integer} **Default:** `8192` +* {integer} **Default:** `8192` This is the number of bytes used to determine the size of pre-allocated, internal `Buffer` instances used for pooling. This value may be modified. @@ -983,17 +983,17 @@ changes: --> * `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] to compare to -* `targetStart` {Integer} The offset within `target` at which to begin +* `targetStart` {integer} The offset within `target` at which to begin comparison. **Default:** `0` -* `targetEnd` {Integer} The offset with `target` at which to end comparison +* `targetEnd` {integer} The offset with `target` at which to end comparison (not inclusive). Ignored when `targetStart` is `undefined`. **Default:** `target.length` -* `sourceStart` {Integer} The offset within `buf` at which to begin comparison. +* `sourceStart` {integer} The offset within `buf` at which to begin comparison. Ignored when `targetStart` is `undefined`. **Default:** `0` -* `sourceEnd` {Integer} The offset within `buf` at which to end comparison +* `sourceEnd` {integer} The offset within `buf` at which to end comparison (not inclusive). Ignored when `targetStart` is `undefined`. **Default:** [`buf.length`] -* Returns: {Integer} +* Returns: {integer} Compares `buf` with `target` and returns a number indicating whether `buf` comes before, after, or is the same as `target` in sort order. @@ -1059,13 +1059,13 @@ added: v0.1.90 --> * `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] to copy into. -* `targetStart` {Integer} The offset within `target` at which to begin +* `targetStart` {integer} The offset within `target` at which to begin copying to. **Default:** `0` -* `sourceStart` {Integer} The offset within `buf` at which to begin copying from. +* `sourceStart` {integer} The offset within `buf` at which to begin copying from. Ignored when `targetStart` is `undefined`. **Default:** `0` -* `sourceEnd` {Integer} The offset within `buf` at which to stop copying (not +* `sourceEnd` {integer} The offset within `buf` at which to stop copying (not inclusive). Ignored when `sourceStart` is `undefined`. **Default:** [`buf.length`] -* Returns: {Integer} The number of bytes copied. +* Returns: {integer} The number of bytes copied. Copies data from a region of `buf` to a region in `target` even if the `target` memory region overlaps with `buf`. @@ -1142,7 +1142,7 @@ changes: --> * `otherBuffer` {Buffer} A `Buffer` or [`Uint8Array`] to compare to -* Returns: {Boolean} +* Returns: {boolean} Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes, `false` otherwise. @@ -1170,9 +1170,9 @@ changes: description: The `encoding` parameter is supported now. --> -* `value` {string | Buffer | Integer} The value to fill `buf` with -* `offset` {Integer} Where to start filling `buf`. **Default:** `0` -* `end` {Integer} Where to stop filling `buf` (not inclusive). **Default:** [`buf.length`] +* `value` {string|Buffer|integer} The value to fill `buf` with +* `offset` {integer} Where to start filling `buf`. **Default:** `0` +* `end` {integer} Where to stop filling `buf` (not inclusive). **Default:** [`buf.length`] * `encoding` {string} If `value` is a string, this is its encoding. **Default:** `'utf8'` * Returns: {Buffer} A reference to `buf` @@ -1207,11 +1207,11 @@ console.log(Buffer.allocUnsafe(3).fill('\u0222')); added: v5.3.0 --> -* `value` {string | Buffer | Integer} What to search for -* `byteOffset` {Integer} Where to begin searching in `buf`. **Default:** `0` +* `value` {string|Buffer|integer} What to search for +* `byteOffset` {integer} Where to begin searching in `buf`. **Default:** `0` * `encoding` {string} If `value` is a string, this is its encoding. **Default:** `'utf8'` -* Returns: {Boolean} `true` if `value` was found in `buf`, `false` otherwise +* Returns: {boolean} `true` if `value` was found in `buf`, `false` otherwise Equivalent to [`buf.indexOf() !== -1`][`buf.indexOf()`]. @@ -1256,11 +1256,11 @@ changes: is no longer required. --> -* `value` {string | Buffer | Uint8Array | Integer} What to search for -* `byteOffset` {Integer} Where to begin searching in `buf`. **Default:** `0` +* `value` {string|Buffer|Uint8Array|integer} What to search for +* `byteOffset` {integer} Where to begin searching in `buf`. **Default:** `0` * `encoding` {string} If `value` is a string, this is its encoding. **Default:** `'utf8'` -* Returns: {Integer} The index of the first occurrence of `value` in `buf` or `-1` +* Returns: {integer} The index of the first occurrence of `value` in `buf` or `-1` if `buf` does not contain `value` If `value` is: @@ -1365,12 +1365,12 @@ changes: description: The `value` can now be a `Uint8Array`. --> -* `value` {string | Buffer | Uint8Array | Integer} What to search for -* `byteOffset` {Integer} Where to begin searching in `buf`. +* `value` {string|Buffer|Uint8Array|integer} What to search for +* `byteOffset` {integer} Where to begin searching in `buf`. **Default:** [`buf.length`]` - 1` * `encoding` {string} If `value` is a string, this is its encoding. **Default:** `'utf8'` -* Returns: {Integer} The index of the last occurrence of `value` in `buf` or `-1` +* Returns: {integer} The index of the last occurrence of `value` in `buf` or `-1` if `buf` does not contain `value` Identical to [`buf.indexOf()`], except `buf` is searched from back to front @@ -1445,7 +1445,7 @@ console.log(b.lastIndexOf('b', [])); added: v0.1.90 --> -* {Integer} +* {integer} Returns the amount of memory allocated for `buf` in bytes. Note that this does not necessarily reflect the amount of "usable" data within `buf`. @@ -1500,9 +1500,9 @@ The `buf.parent` property is a deprecated alias for `buf.buffer`. added: v0.11.15 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 8` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 8` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false` -* Returns: {Number} +* Returns: {number} Reads a 64-bit double from `buf` at the specified `offset` with specified endian format (`readDoubleBE()` returns big endian, `readDoubleLE()` returns @@ -1536,9 +1536,9 @@ console.log(buf.readDoubleLE(1, true)); added: v0.11.15 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false` -* Returns: {Number} +* Returns: {number} Reads a 32-bit float from `buf` at the specified `offset` with specified endian format (`readFloatBE()` returns big endian, `readFloatLE()` returns @@ -1571,9 +1571,9 @@ console.log(buf.readFloatLE(1, true)); added: v0.5.0 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 1` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 1` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false` -* Returns: {Integer} +* Returns: {integer} Reads a signed 8-bit integer from `buf` at the specified `offset`. @@ -1603,9 +1603,9 @@ console.log(buf.readInt8(2)); added: v0.5.5 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 2` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 2` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false` -* Returns: {Integer} +* Returns: {integer} Reads a signed 16-bit integer from `buf` at the specified `offset` with the specified endian format (`readInt16BE()` returns big endian, @@ -1637,9 +1637,9 @@ console.log(buf.readInt16LE(1)); added: v0.5.5 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false` -* Returns: {Integer} +* Returns: {integer} Reads a signed 32-bit integer from `buf` at the specified `offset` with the specified endian format (`readInt32BE()` returns big endian, @@ -1671,10 +1671,10 @@ console.log(buf.readInt32LE(1)); added: v0.11.15 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - byteLength` -* `byteLength` {Integer} How many bytes to read. Must satisfy: `0 < byteLength <= 6` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - byteLength` +* `byteLength` {integer} How many bytes to read. Must satisfy: `0 < byteLength <= 6` * `noAssert` {boolean} Skip `offset` and `byteLength` validation? **Default:** `false` -* Returns: {Integer} +* Returns: {integer} Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a two's complement signed value. Supports up to 48 @@ -1703,9 +1703,9 @@ console.log(buf.readIntBE(1, 6).toString(16)); added: v0.5.0 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 1` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 1` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false` -* Returns: {Integer} +* Returns: {integer} Reads an unsigned 8-bit integer from `buf` at the specified `offset`. @@ -1733,9 +1733,9 @@ console.log(buf.readUInt8(2)); added: v0.5.5 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 2` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 2` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false` -* Returns: {Integer} +* Returns: {integer} Reads an unsigned 16-bit integer from `buf` at the specified `offset` with specified endian format (`readUInt16BE()` returns big endian, `readUInt16LE()` @@ -1771,9 +1771,9 @@ console.log(buf.readUInt16LE(2).toString(16)); added: v0.5.5 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false` -* Returns: {Integer} +* Returns: {integer} Reads an unsigned 32-bit integer from `buf` at the specified `offset` with specified endian format (`readUInt32BE()` returns big endian, @@ -1803,10 +1803,10 @@ console.log(buf.readUInt32LE(1).toString(16)); added: v0.11.15 --> -* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - byteLength` -* `byteLength` {Integer} How many bytes to read. Must satisfy: `0 < byteLength <= 6` +* `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - byteLength` +* `byteLength` {integer} How many bytes to read. Must satisfy: `0 < byteLength <= 6` * `noAssert` {boolean} Skip `offset` and `byteLength` validation? **Default:** `false` -* Returns: {Integer} +* Returns: {integer} Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned integer. Supports up to 48 @@ -1844,8 +1844,8 @@ changes: calculations with them. --> -* `start` {Integer} Where the new `Buffer` will start. **Default:** `0` -* `end` {Integer} Where the new `Buffer` will end (not inclusive). +* `start` {integer} Where the new `Buffer` will start. **Default:** `0` +* `end` {integer} Where the new `Buffer` will end (not inclusive). **Default:** [`buf.length`] * Returns: {Buffer} @@ -2026,10 +2026,10 @@ added: v0.1.90 --> * `encoding` {string} The character encoding to decode to. **Default:** `'utf8'` -* `start` {Integer} The byte offset to start decoding at. **Default:** `0` -* `end` {Integer} The byte offset to stop decoding at (not inclusive). +* `start` {integer} The byte offset to start decoding at. **Default:** `0` +* `end` {integer} The byte offset to stop decoding at (not inclusive). **Default:** [`buf.length`] -* Returns: {String} +* Returns: {string} Decodes `buf` to a string according to the specified character encoding in `encoding`. `start` and `end` may be passed to decode only a subset of `buf`. @@ -2107,10 +2107,10 @@ added: v0.1.90 --> * `string` {string} String to be written to `buf` -* `offset` {Integer} Where to start writing `string`. **Default:** `0` -* `length` {Integer} How many bytes to write. **Default:** `buf.length - offset` +* `offset` {integer} Where to start writing `string`. **Default:** `0` +* `length` {integer} How many bytes to write. **Default:** `buf.length - offset` * `encoding` {string} The character encoding of `string`. **Default:** `'utf8'` -* Returns: {Integer} Number of bytes written +* Returns: {integer} Number of bytes written Writes `string` to `buf` at `offset` according to the character encoding in `encoding`. The `length` parameter is the number of bytes to write. If `buf` did not contain @@ -2135,9 +2135,9 @@ added: v0.11.15 --> * `value` {number} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 8` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 8` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `value` to `buf` at the specified `offset` with specified endian format (`writeDoubleBE()` writes big endian, `writeDoubleLE()` writes little @@ -2170,9 +2170,9 @@ added: v0.11.15 --> * `value` {number} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `value` to `buf` at the specified `offset` with specified endian format (`writeFloatBE()` writes big endian, `writeFloatLE()` writes little @@ -2203,10 +2203,10 @@ console.log(buf); added: v0.5.0 --> -* `value` {Integer} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 1` +* `value` {integer} Number to be written to `buf` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 1` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `value` to `buf` at the specified `offset`. `value` *should* be a valid signed 8-bit integer. Behavior is undefined when `value` is anything other than @@ -2235,10 +2235,10 @@ console.log(buf); added: v0.5.5 --> -* `value` {Integer} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 2` +* `value` {integer} Number to be written to `buf` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 2` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `value` to `buf` at the specified `offset` with specified endian format (`writeInt16BE()` writes big endian, `writeInt16LE()` writes little @@ -2268,10 +2268,10 @@ console.log(buf); added: v0.5.5 --> -* `value` {Integer} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4` +* `value` {integer} Number to be written to `buf` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `value` to `buf` at the specified `offset` with specified endian format (`writeInt32BE()` writes big endian, `writeInt32LE()` writes little @@ -2301,12 +2301,12 @@ console.log(buf); added: v0.11.15 --> -* `value` {Integer} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - byteLength` -* `byteLength` {Integer} How many bytes to write. Must satisfy: `0 < byteLength <= 6` +* `value` {integer} Number to be written to `buf` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - byteLength` +* `byteLength` {integer} How many bytes to write. Must satisfy: `0 < byteLength <= 6` * `noAssert` {boolean} Skip `value`, `offset`, and `byteLength` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `byteLength` bytes of `value` to `buf` at the specified `offset`. Supports up to 48 bits of accuracy. Behavior is undefined when `value` is @@ -2336,10 +2336,10 @@ console.log(buf); added: v0.5.0 --> -* `value` {Integer} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 1` +* `value` {integer} Number to be written to `buf` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 1` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `value` to `buf` at the specified `offset`. `value` *should* be a valid unsigned 8-bit integer. Behavior is undefined when `value` is anything @@ -2368,10 +2368,10 @@ console.log(buf); added: v0.5.5 --> -* `value` {Integer} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 2` +* `value` {integer} Number to be written to `buf` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 2` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `value` to `buf` at the specified `offset` with specified endian format (`writeUInt16BE()` writes big endian, `writeUInt16LE()` writes little @@ -2405,10 +2405,10 @@ console.log(buf); added: v0.5.5 --> -* `value` {Integer} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4` +* `value` {integer} Number to be written to `buf` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `value` to `buf` at the specified `offset` with specified endian format (`writeUInt32BE()` writes big endian, `writeUInt32LE()` writes little @@ -2440,12 +2440,12 @@ console.log(buf); added: v0.5.5 --> -* `value` {Integer} Number to be written to `buf` -* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - byteLength` -* `byteLength` {Integer} How many bytes to write. Must satisfy: `0 < byteLength <= 6` +* `value` {integer} Number to be written to `buf` +* `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - byteLength` +* `byteLength` {integer} How many bytes to write. Must satisfy: `0 < byteLength <= 6` * `noAssert` {boolean} Skip `value`, `offset`, and `byteLength` validation? **Default:** `false` -* Returns: {Integer} `offset` plus the number of bytes written +* Returns: {integer} `offset` plus the number of bytes written Writes `byteLength` bytes of `value` to `buf` at the specified `offset`. Supports up to 48 bits of accuracy. Behavior is undefined when `value` is @@ -2475,7 +2475,7 @@ console.log(buf); added: v0.5.4 --> -* {Integer} **Default:** `50` +* {integer} **Default:** `50` Returns the maximum number of bytes that will be returned when `buf.inspect()` is called. This can be overridden by user modules. See @@ -2489,7 +2489,7 @@ Note that this is a property on the `buffer` module returned by added: v3.0.0 --> -* {Integer} The largest size allowed for a single `Buffer` instance +* {integer} The largest size allowed for a single `Buffer` instance On 32-bit architectures, this value is `(2^30)-1` (~1GB). On 64-bit architectures, this value is `(2^31)-1` (~2GB). @@ -2580,7 +2580,7 @@ deprecated: v6.0.0 > Stability: 0 - Deprecated: Use [`Buffer.allocUnsafeSlow()`] instead. -* `size` {Integer} The desired length of the new `SlowBuffer` +* `size` {integer} The desired length of the new `SlowBuffer` Allocates a new `Buffer` of `size` bytes. If the `size` is larger than [`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown. diff --git a/doc/api/child_process.md b/doc/api/child_process.md index c57cbf680f3beb..39bde058a3e939 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -135,9 +135,9 @@ added: v0.1.90 understand the `-c` switch on UNIX or `/d /s /c` on Windows. On Windows, command line parsing should be compatible with `cmd.exe`.) * `timeout` {number} (Default: `0`) - * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on + * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed (Default: `200*1024`) - * `killSignal` {string|Integer} (Default: `'SIGTERM'`) + * `killSignal` {string|integer} (Default: `'SIGTERM'`) * `uid` {number} Sets the user identity of the process. (See setuid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).) * `callback` {Function} called with the output when process terminates @@ -212,9 +212,9 @@ added: v0.1.91 * `env` {Object} Environment key-value pairs * `encoding` {string} (Default: `'utf8'`) * `timeout` {number} (Default: `0`) - * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on + * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed (Default: `200*1024`) - * `killSignal` {string|Integer} (Default: `'SIGTERM'`) + * `killSignal` {string|integer} (Default: `'SIGTERM'`) * `uid` {number} Sets the user identity of the process. (See setuid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).) * `callback` {Function} called with the output when process terminates @@ -608,7 +608,7 @@ changes: * `input` {string|Buffer|Uint8Array} The value which will be passed as stdin to the spawned process - supplying this value will override `stdio[0]` - * `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`) + * `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`) - `stderr` by default will be output to the parent process' stderr unless `stdio` is specified * `env` {Object} Environment key-value pairs @@ -616,9 +616,9 @@ changes: * `gid` {number} Sets the group identity of the process. (See setgid(2).) * `timeout` {number} In milliseconds the maximum amount of time the process is allowed to run. (Default: `undefined`) - * `killSignal` {string|Integer} The signal value to be used when the spawned + * `killSignal` {string|integer} The signal value to be used when the spawned process will be killed. (Default: `'SIGTERM'`) - * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on + * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed * `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`) * Returns: {Buffer|string} The stdout from the command @@ -650,7 +650,7 @@ changes: * `input` {string|Buffer|Uint8Array} The value which will be passed as stdin to the spawned process - supplying this value will override `stdio[0]` - * `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`) + * `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`) - `stderr` by default will be output to the parent process' stderr unless `stdio` is specified * `env` {Object} Environment key-value pairs @@ -662,9 +662,9 @@ changes: * `gid` {number} Sets the group identity of the process. (See setgid(2).) * `timeout` {number} In milliseconds the maximum amount of time the process is allowed to run. (Default: `undefined`) - * `killSignal` {string|Integer} The signal value to be used when the spawned + * `killSignal` {string|integer} The signal value to be used when the spawned process will be killed. (Default: `'SIGTERM'`) - * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on + * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed * `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`) @@ -708,15 +708,15 @@ changes: * `input` {string|Buffer|Uint8Array} The value which will be passed as stdin to the spawned process - supplying this value will override `stdio[0]` - * `stdio` {string | Array} Child's stdio configuration. + * `stdio` {string|Array} Child's stdio configuration. * `env` {Object} Environment key-value pairs * `uid` {number} Sets the user identity of the process. (See setuid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).) * `timeout` {number} In milliseconds the maximum amount of time the process is allowed to run. (Default: `undefined`) - * `killSignal` {string|Integer} The signal value to be used when the spawned + * `killSignal` {string|integer} The signal value to be used when the spawned process will be killed. (Default: `'SIGTERM'`) - * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on + * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on stdout or stderr - if exceeded child process is killed * `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`) @@ -846,7 +846,7 @@ IPC channel currently exists, this property is `undefined`. added: v0.7.2 --> -* {Boolean} Set to `false` after `child.disconnect()` is called +* {boolean} Set to `false` after `child.disconnect()` is called The `child.connected` property indicates whether it is still possible to send and receive messages from a child process. When `child.connected` is `false`, it @@ -933,7 +933,7 @@ setTimeout(() => { added: v0.1.90 --> -* {Number} Integer +* {number} Integer Returns the process identifier (PID) of the child process. @@ -967,7 +967,7 @@ changes: * `sendHandle` {Handle} * `options` {Object} * `callback` {Function} -* Returns: {Boolean} +* Returns: {boolean} When an IPC channel has been established between the parent and child ( i.e. when using [`child_process.fork()`][]), the `child.send()` method can be diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 580136de14c895..0774938766c7a9 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -332,7 +332,7 @@ if (cluster.isMaster) { added: v6.0.0 --> -* {Boolean} +* {boolean} Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`. @@ -356,7 +356,7 @@ worker.kill(); added: v0.8.0 --> -* {Number} +* {number} Each new worker is given its own unique id, this id is stored in the `id`. @@ -691,7 +691,7 @@ This can only be called from the master process. added: v0.8.1 --> -* {Boolean} +* {boolean} True if the process is a master. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` is @@ -702,7 +702,7 @@ undefined, then `isMaster` is `true`. added: v0.6.0 --> -* {Boolean} +* {boolean} True if the process is not a master (it is the negation of `cluster.isMaster`). diff --git a/doc/api/console.md b/doc/api/console.md index c12173ba5d0e8c..25726d0a82af29 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -169,9 +169,9 @@ added: v0.1.101 --> * `obj` {any} * `options` {Object} - * `showHidden` {Boolean} - * `depth` {Number} - * `colors` {Boolean} + * `showHidden` {boolean} + * `depth` {number} + * `colors` {boolean} Uses [`util.inspect()`][] on `obj` and prints the resulting string to `stdout`. This function bypasses any custom `inspect()` function defined on `obj`. An @@ -250,7 +250,7 @@ values are concatenated. See [`util.format()`][] for more information. -* `label` {String} +* `label` {string} Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`. Use the same `label` when you call @@ -266,7 +266,7 @@ changes: description: This method no longer supports multiple calls that don’t map to individual `console.time()` calls; see below for details. --> -* `label` {String} +* `label` {string} Stops a timer that was previously started by calling [`console.time()`][] and prints the result to `stdout`: diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 3cec15d8223aef..e901edf5fd3615 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -937,8 +937,8 @@ The `private_key` argument can be an object or a string. If `private_key` is a string, it is treated as a raw key with no passphrase. If `private_key` is an object, it is interpreted as a hash containing two properties: -* `key` : {String} - PEM encoded private key -* `passphrase` : {String} - passphrase for the private key +* `key`: {string} - PEM encoded private key +* `passphrase`: {string} - passphrase for the private key The `output_format` can specify one of `'latin1'`, `'hex'` or `'base64'`. If `output_format` is provided a string is returned; otherwise a [`Buffer`][] is @@ -1480,8 +1480,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`. If `private_key` is an object, it is interpreted as a hash object with the keys: -* `key` : {String} - PEM encoded private key -* `passphrase` : {String} - Optional passphrase for the private key +* `key`: {string} - PEM encoded private key +* `passphrase`: {string} - Optional passphrase for the private key * `padding` : An optional padding value, one of the following: * `crypto.constants.RSA_NO_PADDING` * `crypto.constants.RSA_PKCS1_PADDING` @@ -1501,8 +1501,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`. If `private_key` is an object, it is interpreted as a hash object with the keys: -* `key` : {String} - PEM encoded private key -* `passphrase` : {String} - Optional passphrase for the private key +* `key`: {string} - PEM encoded private key +* `passphrase`: {string} - Optional passphrase for the private key * `padding` : An optional padding value, one of the following: * `crypto.constants.RSA_NO_PADDING` * `crypto.constants.RSA_PKCS1_PADDING` @@ -1521,8 +1521,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`. If `public_key` is an object, it is interpreted as a hash object with the keys: -* `key` : {String} - PEM encoded public key -* `passphrase` : {String} - Optional passphrase for the private key +* `key`: {string} - PEM encoded public key +* `passphrase`: {string} - Optional passphrase for the private key * `padding` : An optional padding value, one of the following: * `crypto.constants.RSA_NO_PADDING` * `crypto.constants.RSA_PKCS1_PADDING` @@ -1545,8 +1545,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`. If `public_key` is an object, it is interpreted as a hash object with the keys: -* `key` : {String} - PEM encoded public key -* `passphrase` : {String} - Optional passphrase for the private key +* `key`: {string} - PEM encoded public key +* `passphrase`: {string} - Optional passphrase for the private key * `padding` : An optional padding value, one of the following: * `crypto.constants.RSA_NO_PADDING` * `crypto.constants.RSA_PKCS1_PADDING` diff --git a/doc/api/dns.md b/doc/api/dns.md index 66e665062c60d9..7f075be3114279 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -80,13 +80,13 @@ Alternatively, `options` can be an object containing these properties: * `family` {number} - The record family. If present, must be the integer `4` or `6`. If not provided, both IP v4 and v6 addresses are accepted. -* `hints`: {Number} - If present, it should be one or more of the supported +* `hints`: {number} - If present, it should be one or more of the supported `getaddrinfo` flags. If `hints` is not provided, then no flags are passed to `getaddrinfo`. Multiple flags can be passed through `hints` by bitwise `OR`ing their values. See [supported `getaddrinfo` flags][] for more information on supported flags. -* `all`: {Boolean} - When `true`, the callback returns all resolved addresses +* `all`: {boolean} - When `true`, the callback returns all resolved addresses in an array, otherwise returns a single address. Defaults to `false`. All properties are optional. diff --git a/doc/api/errors.md b/doc/api/errors.md index 6ffbfe4c95f78b..96409a53677689 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -243,7 +243,7 @@ new MyError().stack; ### Error.stackTraceLimit -* {Number} +* {number} The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or @@ -257,7 +257,7 @@ not capture any frames. ### error.message -* {String} +* {string} The `error.message` property is the string description of the error as set by calling `new Error(message)`. The `message` passed to the constructor will also appear in the first line of @@ -273,7 +273,7 @@ console.error(err.message); ### error.stack -* {String} +* {string} The `error.stack` property is a string describing the point in the code at which the `Error` was instantiated. @@ -449,14 +449,14 @@ added properties. #### error.code -* {String} +* {string} The `error.code` property is a string representing the error code, which is always `E` followed by a sequence of capital letters. #### error.errno -* {String | Number} +* {string|number} The `error.errno` property is a number or a string. The number is a **negative** value which corresponds to the error code defined in @@ -466,27 +466,27 @@ In case of a string, it is the same as `error.code`. #### error.syscall -* {String} +* {string} The `error.syscall` property is a string describing the [syscall][] that failed. #### error.path -* {String} +* {string} When present (e.g. in `fs` or `child_process`), the `error.path` property is a string containing a relevant invalid pathname. #### error.address -* {String} +* {string} When present (e.g. in `net` or `dgram`), the `error.address` property is a string describing the address to which the connection failed. #### error.port -* {Number} +* {number} When present (e.g. in `net` or `dgram`), the `error.port` property is a number representing the connection's port that is not available. diff --git a/doc/api/fs.md b/doc/api/fs.md index ae4ae40a0cf8b3..c6046d27313791 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -122,7 +122,7 @@ added: v0.5.8 --> * `eventType` {string} The type of fs change -* `filename` {string | Buffer} The filename that changed (if relevant/available) +* `filename` {string|Buffer} The filename that changed (if relevant/available) Emitted when something changes in a watched directory or file. See more details in [`fs.watch()`][]. @@ -177,7 +177,7 @@ using the `fs.close()` method. added: v0.1.93 --> -* `fd` {Integer} Integer file descriptor used by the ReadStream. +* `fd` {integer} Integer file descriptor used by the ReadStream. Emitted when the ReadStream's file is opened. @@ -291,7 +291,7 @@ using the `fs.close()` method. added: v0.1.93 --> -* `fd` {Integer} Integer file descriptor used by the WriteStream. +* `fd` {integer} Integer file descriptor used by the WriteStream. Emitted when the WriteStream's file is opened. @@ -318,8 +318,8 @@ argument to `fs.createWriteStream()`. If `path` is passed as a string, then added: v0.11.15 --> -* `path` {string | Buffer} -* `mode` {Integer} +* `path` {string|Buffer} +* `mode` {integer} * `callback` {Function} Tests a user's permissions for the file or directory specified by `path`. @@ -439,8 +439,8 @@ process. added: v0.11.15 --> -* `path` {string | Buffer} -* `mode` {Integer} +* `path` {string|Buffer} +* `mode` {integer} Synchronous version of [`fs.access()`][]. This throws if any accessibility checks fail, and does nothing otherwise. @@ -461,11 +461,11 @@ changes: description: The `file` parameter can be a file descriptor now. --> -* `file` {string | Buffer | Number} filename or file descriptor -* `data` {string | Buffer} -* `options` {Object | String} - * `encoding` {string | Null} default = `'utf8'` - * `mode` {Integer} default = `0o666` +* `file` {string|Buffer|number} filename or file descriptor +* `data` {string|Buffer} +* `options` {Object|string} + * `encoding` {string|null} default = `'utf8'` + * `mode` {integer} default = `0o666` * `flag` {string} default = `'a'` * `callback` {Function} @@ -504,11 +504,11 @@ changes: description: The `file` parameter can be a file descriptor now. --> -* `file` {string | Buffer | Number} filename or file descriptor -* `data` {string | Buffer} -* `options` {Object | String} - * `encoding` {string | Null} default = `'utf8'` - * `mode` {Integer} default = `0o666` +* `file` {string|Buffer|number} filename or file descriptor +* `data` {string|Buffer} +* `options` {Object|string} + * `encoding` {string|null} default = `'utf8'` + * `mode` {integer} default = `0o666` * `flag` {string} default = `'a'` The synchronous version of [`fs.appendFile()`][]. Returns `undefined`. @@ -523,8 +523,8 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} -* `mode` {Integer} +* `path` {string|Buffer} +* `mode` {integer} * `callback` {Function} Asynchronous chmod(2). No arguments other than a possible exception are given @@ -535,8 +535,8 @@ to the completion callback. added: v0.6.7 --> -* `path` {string | Buffer} -* `mode` {Integer} +* `path` {string|Buffer} +* `mode` {integer} Synchronous chmod(2). Returns `undefined`. @@ -550,9 +550,9 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} -* `uid` {Integer} -* `gid` {Integer} +* `path` {string|Buffer} +* `uid` {integer} +* `gid` {integer} * `callback` {Function} Asynchronous chown(2). No arguments other than a possible exception are given @@ -563,9 +563,9 @@ to the completion callback. added: v0.1.97 --> -* `path` {string | Buffer} -* `uid` {Integer} -* `gid` {Integer} +* `path` {string|Buffer} +* `uid` {integer} +* `gid` {integer} Synchronous chown(2). Returns `undefined`. @@ -579,7 +579,7 @@ changes: it will emit a deprecation warning. --> -* `fd` {Integer} +* `fd` {integer} * `callback` {Function} Asynchronous close(2). No arguments other than a possible exception are given @@ -590,7 +590,7 @@ to the completion callback. added: v0.1.21 --> -* `fd` {Integer} +* `fd` {integer} Synchronous close(2). Returns `undefined`. @@ -612,15 +612,15 @@ changes: description: The passed `options` object can be a string now. --> -* `path` {string | Buffer} -* `options` {string | Object} +* `path` {string|Buffer} +* `options` {string|Object} * `flags` {string} * `encoding` {string} - * `fd` {Integer} - * `mode` {Integer} + * `fd` {integer} + * `mode` {integer} * `autoClose` {boolean} - * `start` {Integer} - * `end` {Integer} + * `start` {integer} + * `end` {integer} Returns a new [`ReadStream`][] object. (See [Readable Stream][]). @@ -683,14 +683,14 @@ changes: description: The passed `options` object can be a string now. --> -* `path` {string | Buffer} -* `options` {string | Object} +* `path` {string|Buffer} +* `options` {string|Object} * `flags` {string} * `defaultEncoding` {string} - * `fd` {Integer} - * `mode` {Integer} + * `fd` {integer} + * `mode` {integer} * `autoClose` {boolean} - * `start` {Integer} + * `start` {integer} Returns a new [`WriteStream`][] object. (See [Writable Stream][]). @@ -733,7 +733,7 @@ deprecated: v1.0.0 > Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead. -* `path` {string | Buffer} +* `path` {string|Buffer} * `callback` {Function} Test whether or not the given path exists by checking with the file system. @@ -834,7 +834,7 @@ process. added: v0.1.21 --> -* `path` {string | Buffer} +* `path` {string|Buffer} Synchronous version of [`fs.exists()`][]. Returns `true` if the file exists, `false` otherwise. @@ -854,8 +854,8 @@ changes: it will emit a deprecation warning. --> -* `fd` {Integer} -* `mode` {Integer} +* `fd` {integer} +* `mode` {integer} * `callback` {Function} Asynchronous fchmod(2). No arguments other than a possible exception @@ -866,8 +866,8 @@ are given to the completion callback. added: v0.4.7 --> -* `fd` {Integer} -* `mode` {Integer} +* `fd` {integer} +* `mode` {integer} Synchronous fchmod(2). Returns `undefined`. @@ -881,9 +881,9 @@ changes: it will emit a deprecation warning. --> -* `fd` {Integer} -* `uid` {Integer} -* `gid` {Integer} +* `fd` {integer} +* `uid` {integer} +* `gid` {integer} * `callback` {Function} Asynchronous fchown(2). No arguments other than a possible exception are given @@ -894,9 +894,9 @@ to the completion callback. added: v0.4.7 --> -* `fd` {Integer} -* `uid` {Integer} -* `gid` {Integer} +* `fd` {integer} +* `uid` {integer} +* `gid` {integer} Synchronous fchown(2). Returns `undefined`. @@ -910,7 +910,7 @@ changes: it will emit a deprecation warning. --> -* `fd` {Integer} +* `fd` {integer} * `callback` {Function} Asynchronous fdatasync(2). No arguments other than a possible exception are @@ -921,7 +921,7 @@ given to the completion callback. added: v0.1.96 --> -* `fd` {Integer} +* `fd` {integer} Synchronous fdatasync(2). Returns `undefined`. @@ -935,7 +935,7 @@ changes: it will emit a deprecation warning. --> -* `fd` {Integer} +* `fd` {integer} * `callback` {Function} Asynchronous fstat(2). The callback gets two arguments `(err, stats)` where @@ -947,7 +947,7 @@ except that the file to be stat-ed is specified by the file descriptor `fd`. added: v0.1.95 --> -* `fd` {Integer} +* `fd` {integer} Synchronous fstat(2). Returns an instance of [`fs.Stats`][]. @@ -961,7 +961,7 @@ changes: it will emit a deprecation warning. --> -* `fd` {Integer} +* `fd` {integer} * `callback` {Function} Asynchronous fsync(2). No arguments other than a possible exception are given @@ -972,7 +972,7 @@ to the completion callback. added: v0.1.96 --> -* `fd` {Integer} +* `fd` {integer} Synchronous fsync(2). Returns `undefined`. @@ -986,8 +986,8 @@ changes: it will emit a deprecation warning. --> -* `fd` {Integer} -* `len` {Integer} default = `0` +* `fd` {integer} +* `len` {integer} default = `0` * `callback` {Function} Asynchronous ftruncate(2). No arguments other than a possible exception are @@ -1039,8 +1039,8 @@ The last three bytes are null bytes ('\0'), to compensate the over-truncation. added: v0.8.6 --> -* `fd` {Integer} -* `len` {Integer} default = `0` +* `fd` {integer} +* `len` {integer} default = `0` Synchronous ftruncate(2). Returns `undefined`. @@ -1058,9 +1058,9 @@ changes: time specifiers. --> -* `fd` {Integer} -* `atime` {Integer} -* `mtime` {Integer} +* `fd` {integer} +* `atime` {integer} +* `mtime` {integer} * `callback` {Function} Change the file timestamps of a file referenced by the supplied file @@ -1076,9 +1076,9 @@ changes: time specifiers. --> -* `fd` {Integer} -* `atime` {Integer} -* `mtime` {Integer} +* `fd` {integer} +* `atime` {integer} +* `mtime` {integer} Synchronous version of [`fs.futimes()`][]. Returns `undefined`. @@ -1092,8 +1092,8 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} -* `mode` {Integer} +* `path` {string|Buffer} +* `mode` {integer} * `callback` {Function} Asynchronous lchmod(2). No arguments other than a possible exception @@ -1106,8 +1106,8 @@ Only available on Mac OS X. deprecated: v0.4.7 --> -* `path` {string | Buffer} -* `mode` {Integer} +* `path` {string|Buffer} +* `mode` {integer} Synchronous lchmod(2). Returns `undefined`. @@ -1121,9 +1121,9 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} -* `uid` {Integer} -* `gid` {Integer} +* `path` {string|Buffer} +* `uid` {integer} +* `gid` {integer} * `callback` {Function} Asynchronous lchown(2). No arguments other than a possible exception are given @@ -1134,9 +1134,9 @@ to the completion callback. deprecated: v0.4.7 --> -* `path` {string | Buffer} -* `uid` {Integer} -* `gid` {Integer} +* `path` {string|Buffer} +* `uid` {integer} +* `gid` {integer} Synchronous lchown(2). Returns `undefined`. @@ -1150,8 +1150,8 @@ changes: it will emit a deprecation warning. --> -* `existingPath` {string | Buffer} -* `newPath` {string | Buffer} +* `existingPath` {string|Buffer} +* `newPath` {string|Buffer} * `callback` {Function} Asynchronous link(2). No arguments other than a possible exception are given to @@ -1162,8 +1162,8 @@ the completion callback. added: v0.1.31 --> -* `existingPath` {string | Buffer} -* `newPath` {string | Buffer} +* `existingPath` {string|Buffer} +* `newPath` {string|Buffer} Synchronous link(2). Returns `undefined`. @@ -1177,7 +1177,7 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} +* `path` {string|Buffer} * `callback` {Function} Asynchronous lstat(2). The callback gets two arguments `(err, stats)` where @@ -1190,7 +1190,7 @@ not the file that it refers to. added: v0.1.30 --> -* `path` {string | Buffer} +* `path` {string|Buffer} Synchronous lstat(2). Returns an instance of [`fs.Stats`][]. @@ -1204,8 +1204,8 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} -* `mode` {Integer} +* `path` {string|Buffer} +* `mode` {integer} * `callback` {Function} Asynchronous mkdir(2). No arguments other than a possible exception are given @@ -1216,8 +1216,8 @@ to the completion callback. `mode` defaults to `0o777`. added: v0.1.21 --> -* `path` {string | Buffer} -* `mode` {Integer} +* `path` {string|Buffer} +* `mode` {integer} Synchronous mkdir(2). Returns `undefined`. @@ -1235,7 +1235,7 @@ changes: --> * `prefix` {string} -* `options` {string | Object} +* `options` {string|Object} * `encoding` {string} default = `'utf8'` * `callback` {Function} @@ -1297,7 +1297,7 @@ added: v5.10.0 --> * `prefix` {string} -* `options` {string | Object} +* `options` {string|Object} * `encoding` {string} default = `'utf8'` The synchronous version of [`fs.mkdtemp()`][]. Returns the created @@ -1311,9 +1311,9 @@ object with an `encoding` property specifying the character encoding to use. added: v0.0.2 --> -* `path` {string | Buffer} -* `flags` {string | Number} -* `mode` {Integer} +* `path` {string|Buffer} +* `flags` {string|number} +* `mode` {integer} * `callback` {Function} Asynchronous file open. See open(2). `flags` can be: @@ -1395,9 +1395,9 @@ fs.open('', 'a+', (err, fd) => { added: v0.1.21 --> -* `path` {string | Buffer} -* `flags` {string | Number} -* `mode` {Integer} +* `path` {string|Buffer} +* `flags` {string|number} +* `mode` {integer} Synchronous version of [`fs.open()`][]. Returns an integer representing the file descriptor. @@ -1414,11 +1414,11 @@ changes: description: The `length` parameter can now be `0`. --> -* `fd` {Integer} -* `buffer` {string | Buffer | Uint8Array} -* `offset` {Integer} -* `length` {Integer} -* `position` {Integer} +* `fd` {integer} +* `buffer` {string|Buffer|Uint8Array} +* `offset` {integer} +* `length` {integer} +* `position` {integer} * `callback` {Function} Read data from the file specified by `fd`. @@ -1444,8 +1444,8 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} -* `options` {string | Object} +* `path` {string|Buffer} +* `options` {string|Object} * `encoding` {string} default = `'utf8'` * `callback` {Function} @@ -1463,8 +1463,8 @@ the filenames returned will be passed as `Buffer` objects. added: v0.1.21 --> -* `path` {string | Buffer} -* `options` {string | Object} +* `path` {string|Buffer} +* `options` {string|Object} * `encoding` {string} default = `'utf8'` Synchronous readdir(3). Returns an array of filenames excluding `'.'` and @@ -1492,9 +1492,9 @@ changes: description: The `file` parameter can be a file descriptor now. --> -* `file` {string | Buffer | Integer} filename or file descriptor -* `options` {Object | String} - * `encoding` {string | Null} default = `null` +* `file` {string|Buffer|integer} filename or file descriptor +* `options` {Object|string} + * `encoding` {string|null} default = `null` * `flag` {string} default = `'r'` * `callback` {Function} @@ -1532,9 +1532,9 @@ changes: description: The `file` parameter can be a file descriptor now. --> -* `file` {string | Buffer | Integer} filename or file descriptor -* `options` {Object | String} - * `encoding` {string | Null} default = `null` +* `file` {string|Buffer|integer} filename or file descriptor +* `options` {Object|string} + * `encoding` {string|null} default = `null` * `flag` {string} default = `'r'` Synchronous version of [`fs.readFile`][]. Returns the contents of the `file`. @@ -1552,8 +1552,8 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} -* `options` {string | Object} +* `path` {string|Buffer} +* `options` {string|Object} * `encoding` {string} default = `'utf8'` * `callback` {Function} @@ -1570,8 +1570,8 @@ the link path returned will be passed as a `Buffer` object. added: v0.1.31 --> -* `path` {string | Buffer} -* `options` {string | Object} +* `path` {string|Buffer} +* `options` {string|Object} * `encoding` {string} default = `'utf8'` Synchronous readlink(2). Returns the symbolic link's string value. @@ -1590,11 +1590,11 @@ changes: description: The `length` parameter can now be `0`. --> -* `fd` {Integer} -* `buffer` {string | Buffer | Uint8Array} -* `offset` {Integer} -* `length` {Integer} -* `position` {Integer} +* `fd` {integer} +* `buffer` {string|Buffer|Uint8Array} +* `offset` {integer} +* `length` {integer} +* `position` {integer} Synchronous version of [`fs.read()`][]. Returns the number of `bytesRead`. @@ -1615,8 +1615,8 @@ changes: description: The `cache` parameter was removed. --> -* `path` {string | Buffer} -* `options` {string | Object} +* `path` {string|Buffer} +* `options` {string|Object} * `encoding` {string} default = `'utf8'` * `callback` {Function} @@ -1643,8 +1643,8 @@ changes: description: The `cache` parameter was removed. --> -* `path` {string | Buffer}; -* `options` {string | Object} +* `path` {string|Buffer}; +* `options` {string|Object} * `encoding` {string} default = `'utf8'` Synchronous realpath(3). Returns the resolved path. @@ -1666,8 +1666,8 @@ changes: it will emit a deprecation warning. --> -* `oldPath` {string | Buffer} -* `newPath` {string | Buffer} +* `oldPath` {string|Buffer} +* `newPath` {string|Buffer} * `callback` {Function} Asynchronous rename(2). No arguments other than a possible exception are given @@ -1678,8 +1678,8 @@ to the completion callback. added: v0.1.21 --> -* `oldPath` {string | Buffer} -* `newPath` {string | Buffer} +* `oldPath` {string|Buffer} +* `newPath` {string|Buffer} Synchronous rename(2). Returns `undefined`. @@ -1693,7 +1693,7 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} +* `path` {string|Buffer} * `callback` {Function} Asynchronous rmdir(2). No arguments other than a possible exception are given @@ -1704,7 +1704,7 @@ to the completion callback. added: v0.1.21 --> -* `path` {string | Buffer} +* `path` {string|Buffer} Synchronous rmdir(2). Returns `undefined`. @@ -1718,7 +1718,7 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} +* `path` {string|Buffer} * `callback` {Function} Asynchronous stat(2). The callback gets two arguments `(err, stats)` where @@ -1739,7 +1739,7 @@ is recommended. added: v0.1.21 --> -* `path` {string | Buffer} +* `path` {string|Buffer} Synchronous stat(2). Returns an instance of [`fs.Stats`][]. @@ -1748,8 +1748,8 @@ Synchronous stat(2). Returns an instance of [`fs.Stats`][]. added: v0.1.31 --> -* `target` {string | Buffer} -* `path` {string | Buffer} +* `target` {string|Buffer} +* `path` {string|Buffer} * `type` {string} * `callback` {Function} @@ -1773,8 +1773,8 @@ It creates a symbolic link named "new-port" that points to "foo". added: v0.1.31 --> -* `target` {string | Buffer} -* `path` {string | Buffer} +* `target` {string|Buffer} +* `path` {string|Buffer} * `type` {string} Synchronous symlink(2). Returns `undefined`. @@ -1789,8 +1789,8 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} -* `len` {Integer} default = `0` +* `path` {string|Buffer} +* `len` {integer} default = `0` * `callback` {Function} Asynchronous truncate(2). No arguments other than a possible exception are @@ -1802,8 +1802,8 @@ first argument. In this case, `fs.ftruncate()` is called. added: v0.8.6 --> -* `path` {string | Buffer} -* `len` {Integer} default = `0` +* `path` {string|Buffer} +* `len` {integer} default = `0` Synchronous truncate(2). Returns `undefined`. A file descriptor can also be passed as the first argument. In this case, `fs.ftruncateSync()` is called. @@ -1818,7 +1818,7 @@ changes: it will emit a deprecation warning. --> -* `path` {string | Buffer} +* `path` {string|Buffer} * `callback` {Function} Asynchronous unlink(2). No arguments other than a possible exception are given @@ -1829,7 +1829,7 @@ to the completion callback. added: v0.1.21 --> -* `path` {string | Buffer} +* `path` {string|Buffer} Synchronous unlink(2). Returns `undefined`. @@ -1838,7 +1838,7 @@ Synchronous unlink(2). Returns `undefined`. added: v0.1.31 --> -* `filename` {string | Buffer} +* `filename` {string|Buffer} * `listener` {Function} Stop watching for changes on `filename`. If `listener` is specified, only that @@ -1866,9 +1866,9 @@ changes: time specifiers. --> -* `path` {string | Buffer} -* `atime` {Integer} -* `mtime` {Integer} +* `path` {string|Buffer} +* `atime` {integer} +* `mtime` {integer} * `callback` {Function} Change file timestamps of the file referenced by the supplied path. @@ -1893,9 +1893,9 @@ changes: time specifiers. --> -* `path` {string | Buffer} -* `atime` {Integer} -* `mtime` {Integer} +* `path` {string|Buffer} +* `atime` {integer} +* `mtime` {integer} Synchronous version of [`fs.utimes()`][]. Returns `undefined`. @@ -1908,8 +1908,8 @@ changes: description: The passed `options` object will never be modified. --> -* `filename` {string | Buffer} -* `options` {string | Object} +* `filename` {string|Buffer} +* `options` {string|Object} * `persistent` {boolean} Indicates whether the process should continue to run as long as files are being watched. default = `true` * `recursive` {boolean} Indicates whether all subdirectories should be @@ -2011,10 +2011,10 @@ fs.watch('somedir', (eventType, filename) => { added: v0.1.31 --> -* `filename` {string | Buffer} +* `filename` {string|Buffer} * `options` {Object} * `persistent` {boolean} - * `interval` {Integer} + * `interval` {integer} * `listener` {Function} Watch for changes on `filename`. The callback `listener` will be called each @@ -2068,11 +2068,11 @@ changes: it will emit a deprecation warning. --> -* `fd` {Integer} -* `buffer` {Buffer | Uint8Array} -* `offset` {Integer} -* `length` {Integer} -* `position` {Integer} +* `fd` {integer} +* `buffer` {Buffer|Uint8Array} +* `offset` {integer} +* `length` {integer} +* `position` {integer} * `callback` {Function} Write `buffer` to the file specified by `fd`. @@ -2108,9 +2108,9 @@ changes: it will emit a deprecation warning. --> -* `fd` {Integer} +* `fd` {integer} * `string` {string} -* `position` {Integer} +* `position` {integer} * `encoding` {string} * `callback` {Function} @@ -2155,11 +2155,11 @@ changes: description: The `file` parameter can be a file descriptor now. --> -* `file` {string | Buffer | Integer} filename or file descriptor -* `data` {string | Buffer | Uint8Array} -* `options` {Object | String} - * `encoding` {string | Null} default = `'utf8'` - * `mode` {Integer} default = `0o666` +* `file` {string|Buffer|integer} filename or file descriptor +* `data` {string|Buffer|Uint8Array} +* `options` {Object|string} + * `encoding` {string|null} default = `'utf8'` + * `mode` {integer} default = `0o666` * `flag` {string} default = `'w'` * `callback` {Function} @@ -2205,11 +2205,11 @@ changes: description: The `file` parameter can be a file descriptor now. --> -* `file` {string | Buffer | Integer} filename or file descriptor -* `data` {string | Buffer | Uint8Array} -* `options` {Object | String} - * `encoding` {string | Null} default = `'utf8'` - * `mode` {Integer} default = `0o666` +* `file` {string|Buffer|integer} filename or file descriptor +* `data` {string|Buffer|Uint8Array} +* `options` {Object|string} + * `encoding` {string|null} default = `'utf8'` + * `mode` {integer} default = `0o666` * `flag` {string} default = `'w'` The synchronous version of [`fs.writeFile()`][]. Returns `undefined`. @@ -2226,11 +2226,11 @@ changes: description: The `offset` and `length` parameters are optional now. --> -* `fd` {Integer} -* `buffer` {Buffer | Uint8Array} -* `offset` {Integer} -* `length` {Integer} -* `position` {Integer} +* `fd` {integer} +* `buffer` {Buffer|Uint8Array} +* `offset` {integer} +* `length` {integer} +* `position` {integer} ## fs.writeSync(fd, string[, position[, encoding]]) -* `fd` {Integer} +* `fd` {integer} * `string` {string} -* `position` {Integer} +* `position` {integer} * `encoding` {string} Synchronous versions of [`fs.write()`][]. Returns the number of bytes written. diff --git a/doc/api/globals.md b/doc/api/globals.md index 4ce4f479f6c89f..4e727a917ac31c 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -27,7 +27,7 @@ added: v0.1.27 -* {String} +* {string} The directory name of the current module. This the same as the [`path.dirname()`][] of the [`__filename`][]. @@ -50,7 +50,7 @@ added: v0.0.1 -* {String} +* {string} The file name of the current module. This is the resolved absolute path of the current module file. diff --git a/doc/api/http.md b/doc/api/http.md index 88c4552c18f63a..a407c76a5e9550 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -463,7 +463,7 @@ aborted, in milliseconds since 1 January 1970 00:00:00 UTC. added: v0.1.90 --> -* `data` {string | Buffer} +* `data` {string|Buffer} * `encoding` {string} * `callback` {Function} @@ -531,7 +531,7 @@ Returns `request`. added: v0.1.29 --> -* `chunk` {string | Buffer} +* `chunk` {string|Buffer} * `encoding` {string} * `callback` {Function} @@ -906,7 +906,7 @@ will result in a [`TypeError`][] being thrown. added: v0.1.90 --> -* `data` {string | Buffer} +* `data` {string|Buffer} * `encoding` {string} * `callback` {Function} @@ -1150,7 +1150,7 @@ status message which was sent out. added: v0.1.29 --> -* `chunk` {string | Buffer} +* `chunk` {string|Buffer} * `encoding` {string} * `callback` {Function} * Returns: {boolean} diff --git a/doc/api/modules.md b/doc/api/modules.md index 73248180f778bd..973ee7ee8e03c5 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -580,7 +580,7 @@ function require(...) { added: v0.1.16 --> -* {String} +* {string} The fully resolved filename to the module. @@ -589,7 +589,7 @@ The fully resolved filename to the module. added: v0.1.16 --> -* {String} +* {string} The identifier for the module. Typically this is the fully resolved filename. @@ -599,7 +599,7 @@ filename. added: v0.1.16 --> -* {Boolean} +* {boolean} Whether or not the module is done loading, or is in the process of loading. diff --git a/doc/api/net.md b/doc/api/net.md index 0c14e663eeb7b9..67e7abfa8eda7c 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -235,7 +235,7 @@ server.listen({ added: v0.1.90 --> -* `path` {String} +* `path` {string} * `backlog` {number} Common parameter of [`server.listen()`][] functions * `callback` {Function} Common parameter of [`server.listen()`][] functions diff --git a/doc/api/os.md b/doc/api/os.md index 0fcf0e773baed5..06779dbb37cf70 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -14,7 +14,7 @@ const os = require('os'); added: v0.7.8 --> -* {String} +* {string} A string constant defining the operating system-specific end-of-line marker: @@ -26,7 +26,7 @@ A string constant defining the operating system-specific end-of-line marker: added: v0.5.0 --> -* Returns: {String} +* Returns: {string} The `os.arch()` method returns a string identifying the operating system CPU architecture *for which the Node.js binary was compiled*. @@ -172,7 +172,7 @@ all processors are always 0. added: v0.9.4 --> -* Returns: {String} +* Returns: {string} The `os.endianness()` method returns a string identifying the endianness of the CPU *for which the Node.js binary was compiled*. @@ -187,7 +187,7 @@ Possible values are: added: v0.3.3 --> -* Returns: {Integer} +* Returns: {integer} The `os.freemem()` method returns the amount of free system memory in bytes as an integer. @@ -197,7 +197,7 @@ an integer. added: v2.3.0 --> -* Returns: {String} +* Returns: {string} The `os.homedir()` method returns the home directory of the current user as a string. @@ -207,7 +207,7 @@ string. added: v0.3.3 --> -* Returns: {String} +* Returns: {string} The `os.hostname()` method returns the hostname of the operating system as a string. @@ -295,7 +295,7 @@ The properties available on the assigned network address object include: added: v0.5.0 --> -* Returns: {String} +* Returns: {string} The `os.platform()` method returns a string identifying the operating system platform as set during compile time of Node.js. @@ -321,7 +321,7 @@ to be experimental at this time. added: v0.3.3 --> -* Returns: {String} +* Returns: {string} The `os.release()` method returns a string identifying the operating system release. @@ -340,7 +340,7 @@ changes: returns a path with a trailing slash on any platform --> -* Returns: {String} +* Returns: {string} The `os.tmpdir()` method returns a string specifying the operating system's default directory for temporary files. @@ -350,7 +350,7 @@ default directory for temporary files. added: v0.3.3 --> -* Returns: {Integer} +* Returns: {integer} The `os.totalmem()` method returns the total amount of system memory in bytes as an integer. @@ -360,7 +360,7 @@ as an integer. added: v0.3.3 --> -* Returns: {String} +* Returns: {string} The `os.type()` method returns a string identifying the operating system name as returned by uname(3). For example `'Linux'` on Linux, `'Darwin'` on OS X and @@ -374,7 +374,7 @@ information about the output of running uname(3) on various operating systems. added: v0.3.3 --> -* Returns: {Integer} +* Returns: {integer} The `os.uptime()` method returns the system uptime in number of seconds. diff --git a/doc/api/path.md b/doc/api/path.md index 0a1c7dc5894855..0039e2c3ef14bd 100644 --- a/doc/api/path.md +++ b/doc/api/path.md @@ -65,7 +65,7 @@ changes: * `path` {string} * `ext` {string} An optional file extension -* Returns: {String} +* Returns: {string} The `path.basename()` methods returns the last portion of a `path`, similar to the Unix `basename` command. @@ -88,7 +88,7 @@ and is not a string. added: v0.9.3 --> -* {String} +* {string} Provides the platform-specific path delimiter: @@ -125,7 +125,7 @@ changes: --> * `path` {string} -* Returns: {String} +* Returns: {string} The `path.dirname()` method returns the directory name of a `path`, similar to the Unix `dirname` command. @@ -149,7 +149,7 @@ changes: --> * `path` {string} -* Returns: {String} +* Returns: {string} The `path.extname()` method returns the extension of the `path`, from the last occurrence of the `.` (period) character to end of string in the last portion of @@ -189,7 +189,7 @@ added: v0.11.15 * `base` {string} * `name` {string} * `ext` {string} -* Returns: {String} +* Returns: {string} The `path.format()` method returns a path string from an object. This is the opposite of [`path.parse()`][]. @@ -248,7 +248,7 @@ added: v0.11.2 --> * `path` {string} -* Returns: {Boolean} +* Returns: {boolean} The `path.isAbsolute()` method determines if `path` is an absolute path. @@ -283,7 +283,7 @@ added: v0.1.16 --> * `...paths` {string} A sequence of path segments -* Returns: {String} +* Returns: {string} The `path.join()` method joins all given `path` segments together using the platform specific separator as a delimiter, then normalizes the resulting path. @@ -310,7 +310,7 @@ added: v0.1.23 --> * `path` {string} -* Returns: {String} +* Returns: {string} The `path.normalize()` method normalizes the given `path`, resolving `'..'` and `'.'` segments. @@ -429,7 +429,7 @@ changes: * `from` {string} * `to` {string} -* Returns: {String} +* Returns: {string} The `path.relative()` method returns the relative path from `from` to `to`. If `from` and `to` each resolve to the same path (after calling `path.resolve()` @@ -460,7 +460,7 @@ added: v0.3.4 --> * `...paths` {string} A sequence of paths or path segments -* Returns: {String} +* Returns: {string} The `path.resolve()` method resolves a sequence of paths or path segments into an absolute path. @@ -502,7 +502,7 @@ A [`TypeError`][] is thrown if any of the arguments is not a string. added: v0.7.9 --> -* {String} +* {string} Provides the platform-specific path segment separator: diff --git a/doc/api/process.md b/doc/api/process.md index 779709b6cc4c1b..bc9dc7919d6928 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -416,7 +416,7 @@ generate a core file. added: v0.5.0 --> -* {String} +* {string} The `process.arch` property returns a String identifying the processor architecture that the Node.js process is currently running on. For instance @@ -470,7 +470,7 @@ Would generate the output: added: 6.4.0 --> -* {String} +* {string} The `process.argv0` property stores a read-only copy of the original value of `argv[0]` passed when Node.js starts. @@ -565,7 +565,7 @@ replace the value of `process.config`. added: v0.7.2 --> -* {Boolean} +* {boolean} If the Node.js process is spawned with an IPC channel (see the [Child Process][] and [Cluster][] documentation), the `process.connected` property will return @@ -583,8 +583,8 @@ added: v6.1.0 * `previousValue` {Object} A previous return value from calling `process.cpuUsage()` * Returns: {Object} - * `user` {Integer} - * `system` {Integer} + * `user` {integer} + * `system` {integer} The `process.cpuUsage()` method returns the user and system CPU time usage of the current process, in an object with properties `user` and `system`, whose @@ -612,7 +612,7 @@ console.log(process.cpuUsage(startUsage)); added: v0.1.8 --> -* Returns: {String} +* Returns: {string} The `process.cwd()` method returns the current working directory of the Node.js process. @@ -642,7 +642,7 @@ If the Node.js process was not spawned with an IPC channel, added: v6.0.0 --> -* `warning` {string | Error} The warning to emit. +* `warning` {string|Error} The warning to emit. * `type` {string} When `warning` is a String, `type` is the name to use for the *type* of warning being emitted. Default: `Warning`. * `code` {string} A unique identifier for the warning instance being emitted. @@ -848,7 +848,7 @@ And `process.argv`: added: v0.1.100 --> -* {String} +* {string} The `process.execPath` property returns the absolute pathname of the executable that started the Node.js process. @@ -865,7 +865,7 @@ For example: added: v0.1.13 --> -* `code` {Integer} The exit code. Defaults to `0`. +* `code` {integer} The exit code. Defaults to `0`. The `process.exit()` method instructs Node.js to terminate the process synchronously with an exit status of `code`. If `code` is omitted, exit uses @@ -930,7 +930,7 @@ is safer than calling `process.exit()`. added: v0.11.8 --> -* {Integer} +* {integer} A number which will be the process exit code, when the process either exits gracefully, or is exited via [`process.exit()`][] without specifying @@ -1015,7 +1015,7 @@ Android) added: v0.1.28 --> -* Returns: {Integer} +* Returns: {integer} The `process.getuid()` method returns the numeric user identity of the process. (See getuid(2).) @@ -1158,10 +1158,10 @@ changes: --> * Returns: {Object} - * `rss` {Integer} - * `heapTotal` {Integer} - * `heapUsed` {Integer} - * `external` {Integer} + * `rss` {integer} + * `heapTotal` {integer} + * `heapUsed` {integer} + * `external` {integer} The `process.memoryUsage()` method returns an object describing the memory usage of the Node.js process measured in bytes. @@ -1287,7 +1287,7 @@ happening, just like a `while(true);` loop. added: v0.1.15 --> -* {Integer} +* {integer} The `process.pid` property returns the PID of the process. @@ -1300,7 +1300,7 @@ console.log(`This process is pid ${process.pid}`); added: v0.1.16 --> -* {String} +* {string} The `process.platform` property returns a string identifying the operating system platform on which the Node.js process is running. For instance @@ -1329,7 +1329,7 @@ tarball. legacy io.js releases, this will be `'io.js'`. * `sourceUrl` {string} an absolute URL pointing to a _`.tar.gz`_ file containing the source code of the current release. -* `headersUrl`{String} an absolute URL pointing to a _`.tar.gz`_ file containing +* `headersUrl`{string} an absolute URL pointing to a _`.tar.gz`_ file containing only the source header files for the current release. This file is significantly smaller than the full source file and can be used for compiling Node.js native add-ons. @@ -1365,7 +1365,7 @@ added: v0.5.9 * `sendHandle` {Handle object} * `options` {Object} * `callback` {Function} -* Returns: {Boolean} +* Returns: {boolean} If Node.js is spawned with an IPC channel, the `process.send()` method can be used to send messages to the parent process. Messages will be received as a @@ -1617,7 +1617,7 @@ See the [TTY][] documentation for more information. added: v0.1.104 --> -* {String} +* {string} The `process.title` property returns the current process title (i.e. returns the current value of `ps`). Assigning a new value to `process.title` modifies @@ -1658,7 +1658,7 @@ console.log( added: v0.5.0 --> -* Returns: {Number} +* Returns: {number} The `process.uptime()` method returns the number of seconds the current Node.js process has been running. @@ -1668,7 +1668,7 @@ process has been running. added: v0.1.3 --> -* {String} +* {string} The `process.version` property returns the Node.js version string. diff --git a/doc/api/repl.md b/doc/api/repl.md index 29121bb2b5fc55..dff2f8f51d7ace 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -379,7 +379,7 @@ changes: description: The `options` parameter is optional now. --> -* `options` {Object | String} +* `options` {Object|string} * `prompt` {string} The input prompt to display. Defaults to `> ` (with a trailing space). * `input` {Readable} The Readable stream from which REPL input will be read. diff --git a/doc/api/stream.md b/doc/api/stream.md index c40353ee3abed0..50f41a33db1aea 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -443,7 +443,7 @@ changes: * `chunk` {string|Buffer} The data to write * `encoding` {string} The encoding, if `chunk` is a String * `callback` {Function} Callback for when this chunk of data is flushed -* Returns: {Boolean} `false` if the stream wishes for the calling code to +* Returns: {boolean} `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. @@ -741,7 +741,7 @@ preferred over the use of the `'readable'` event. added: v0.11.14 --> -* Returns: {Boolean} +* Returns: {boolean} The `readable.isPaused()` method returns the current operating state of the Readable. This is used primarily by the mechanism that underlies the @@ -846,7 +846,7 @@ added: v0.9.4 --> * `size` {number} Optional argument to specify how much data to read. -* Return {String|Buffer|null} +* Return {string|Buffer|null} The `readable.read()` method pulls some data out of the internal buffer and returns it. If no data available to be read, `null` is returned. By default, @@ -1503,7 +1503,7 @@ user programs. * `chunk` {Buffer|null|string} Chunk of data to push into the read queue * `encoding` {string} Encoding of String chunks. Must be a valid Buffer encoding, such as `'utf8'` or `'ascii'` -* Returns {Boolean} `true` if additional chunks of data may continued to be +* Returns {boolean} `true` if additional chunks of data may continued to be pushed; `false` otherwise. When `chunk` is a `Buffer` or `string`, the `chunk` of data will be added to the diff --git a/doc/api/url.md b/doc/api/url.md index ae97b57097f49e..7efd85c51308a3 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -136,7 +136,7 @@ forward-slash characters (`/`) are required following the colon in the added: v0.1.25 --> -* `urlObject` {Object | String} A URL object (as returned by `url.parse()` or +* `urlObject` {Object|string} A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. @@ -356,7 +356,7 @@ object returned by `url.parse()` are shown. Below it are properties of a WHATWG #### Constructor: new URL(input[, base]) * `input` {string} The input URL to parse -* `base` {string | URL} The base URL to resolve against if the `input` is not +* `base` {string|URL} The base URL to resolve against if the `input` is not absolute. Creates a new `URL` object by parsing the `input` relative to the `base`. If @@ -388,7 +388,7 @@ Additional [examples of parsed URLs][] may be found in the WHATWG URL Standard. #### url.hash -* {String} +* {string} Gets and sets the fragment portion of the URL. @@ -409,7 +409,7 @@ percent-encode may vary somewhat from what the [`url.parse()`][] and #### url.host -* {String} +* {string} Gets and sets the host portion of the URL. @@ -427,7 +427,7 @@ Invalid host values assigned to the `host` property are ignored. #### url.hostname -* {String} +* {string} Gets and sets the hostname portion of the URL. The key difference between `url.host` and `url.hostname` is that `url.hostname` does *not* include the @@ -447,7 +447,7 @@ Invalid hostname values assigned to the `hostname` property are ignored. #### url.href -* {String} +* {string} Gets and sets the serialized URL. @@ -472,7 +472,7 @@ will be thrown. #### url.origin -* {String} +* {string} Gets the read-only serialization of the URL's origin. Unicode characters that may be contained within the hostname will be encoded as-is without [Punycode][] @@ -495,7 +495,7 @@ console.log(idnURL.hostname); #### url.password -* {String} +* {string} Gets and sets the password portion of the URL. @@ -516,7 +516,7 @@ percent-encode may vary somewhat from what the [`url.parse()`][] and #### url.pathname -* {String} +* {string} Gets and sets the path portion of the URL. @@ -537,7 +537,7 @@ to percent-encode may vary somewhat from what the [`url.parse()`][] and #### url.port -* {String} +* {string} Gets and sets the port portion of the URL. @@ -592,7 +592,7 @@ lies outside the range denoted above, it is ignored. #### url.protocol -* {String} +* {string} Gets and sets the protocol portion of the URL. @@ -610,7 +610,7 @@ Invalid URL protocol values assigned to the `protocol` property are ignored. #### url.search -* {String} +* {string} Gets and sets the serialized query portion of the URL. @@ -640,7 +640,7 @@ documentation for details. #### url.username -* {String} +* {string} Gets and sets the username portion of the URL. @@ -661,7 +661,7 @@ and [`url.format()`][] methods would produce. #### url.toString() -* Returns: {String} +* Returns: {string} The `toString()` method on the `URL` object returns the serialized URL. The value returned is equivalent to that of [`url.href`][] and [`url.toJSON()`][]. @@ -672,7 +672,7 @@ to customize the serialization process of the URL. For more flexibility, #### url.toJSON() -* Returns: {String} +* Returns: {string} The `toJSON()` method on the `URL` object returns the serialized URL. The value returned is equivalent to that of [`url.href`][] and @@ -897,7 +897,7 @@ no such pairs, an empty array is returned. #### urlSearchParams.has(name) * `name` {string} -* Returns: {Boolean} +* Returns: {boolean} Returns `true` if there is at least one name-value pair whose name is `name`. @@ -961,7 +961,7 @@ console.log(params.toString()); #### urlSearchParams.toString() -* Returns: {String} +* Returns: {string} Returns the search parameters serialized as a string, with characters percent-encoded where necessary. @@ -996,7 +996,7 @@ for (const [name, value] of params) { ### require('url').domainToASCII(domain) * `domain` {string} -* Returns: {String} +* Returns: {string} Returns the [Punycode][] ASCII serialization of the `domain`. If `domain` is an invalid domain, the empty string is returned. @@ -1019,7 +1019,7 @@ the new `URL` implementation but is not part of the WHATWG URL standard. ### require('url').domainToUnicode(domain) * `domain` {string} -* Returns: {String} +* Returns: {string} Returns the Unicode serialization of the `domain`. If `domain` is an invalid domain, the empty string is returned. diff --git a/tools/doc/type-parser.js b/tools/doc/type-parser.js index 6d9424039eb274..4c2d29f2bf7d0d 100644 --- a/tools/doc/type-parser.js +++ b/tools/doc/type-parser.js @@ -4,12 +4,13 @@ const jsDocPrefix = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/'; const jsDocUrl = jsDocPrefix + 'Reference/Global_Objects/'; const jsPrimitiveUrl = jsDocPrefix + 'Data_structures'; const jsPrimitives = { - 'integer': 'Number', // this is for extending - 'number': 'Number', - 'string': 'String', 'boolean': 'Boolean', + 'integer': 'Number', // not a primitive, used for clarification 'null': 'Null', - 'symbol': 'Symbol' + 'number': 'Number', + 'string': 'String', + 'symbol': 'Symbol', + 'undefined': 'Undefined' }; const jsGlobalTypes = [ 'Error', 'Object', 'Function', 'Array', 'TypedArray', 'Uint8Array', From 7e0410499d8816d67737c7232a898e8d67925b3b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 6 Mar 2017 15:54:55 -0800 Subject: [PATCH 037/485] test: limit lint rule disabling in message test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nexttick_throw.js has a comment that disables all ESLint rules for a line. Change it to only disable the one ESLint rule that the line violates. PR-URL: https://github.com/nodejs/node/pull/11724 Reviewed-By: Teddy Katz Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Yuta Hiroto --- test/message/nexttick_throw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/message/nexttick_throw.js b/test/message/nexttick_throw.js index 49cd6dd0f7cbd6..0c655a8e2e4bf1 100644 --- a/test/message/nexttick_throw.js +++ b/test/message/nexttick_throw.js @@ -5,7 +5,7 @@ process.nextTick(function() { process.nextTick(function() { process.nextTick(function() { process.nextTick(function() { - // eslint-disable-next-line + // eslint-disable-next-line no-undef undefined_reference_error_maker; }); }); From b394cf35c50a6ded7f01374d7b609d4a7f5b8f06 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Wed, 8 Mar 2017 05:49:25 -0600 Subject: [PATCH 038/485] 2017-03-08, Version 7.7.2 (Current) Notable changes: * doc: add `Daijiro Wachi` to collaborators (Daijiro Wachi) https://github.com/nodejs/node/pull/11676 * tty: add ref() so process.stdin.ref() etc. work (Ben Schmidt) https://github.com/nodejs/node/pull/7360 * util: fix inspecting symbol key in string (Ali BARIN) https://github.com/nodejs/node/pull/11672 PR-URL: https://github.com/nodejs/node/pull/11745 --- CHANGELOG.md | 3 +- doc/changelogs/CHANGELOG_V7.md | 59 ++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f284727f76cba9..e2bab714999c46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,8 @@ release. -7.7.1
+7.7.2
+7.7.1
7.7.0
7.6.0
7.5.0
diff --git a/doc/changelogs/CHANGELOG_V7.md b/doc/changelogs/CHANGELOG_V7.md index 2b63c5a07c6abf..53c6b345ba4cfe 100644 --- a/doc/changelogs/CHANGELOG_V7.md +++ b/doc/changelogs/CHANGELOG_V7.md @@ -29,6 +29,65 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + +## 2017-03-08, Version 7.7.2 (Current), @evanlucas + +### Notable changes + +* **doc**: add `Daijiro Wachi` to collaborators (Daijiro Wachi) [#11676](https://github.com/nodejs/node/pull/11676) +* **tty**: add ref() so process.stdin.ref() etc. work (Ben Schmidt) [#7360](https://github.com/nodejs/node/pull/7360) +* **util**: fix inspecting symbol key in string (Ali BARIN) [#11672](https://github.com/nodejs/node/pull/11672) + +### Commits + +* [[`f56ca30bf0`](https://github.com/nodejs/node/commit/f56ca30bf0)] - **benchmark,build,doc,lib,src,test**: correct typos (Benjamin Fleischer) [#11189](https://github.com/nodejs/node/pull/11189) +* [[`02dbae6b3f`](https://github.com/nodejs/node/commit/02dbae6b3f)] - **buffer**: refactor Buffer.prototype.inspect() (Rich Trott) [#11600](https://github.com/nodejs/node/pull/11600) +* [[`e5b530cb62`](https://github.com/nodejs/node/commit/e5b530cb62)] - **build**: fix llvm version detection in freebsd-10 (Shigeki Ohtsu) [#11668](https://github.com/nodejs/node/pull/11668) +* [[`ed6d7412a7`](https://github.com/nodejs/node/commit/ed6d7412a7)] - **deps**: fix CLEAR_HASH macro to be usable as a single statement (Sam Roberts) [#11616](https://github.com/nodejs/node/pull/11616) +* [[`039a1a97d8`](https://github.com/nodejs/node/commit/039a1a97d8)] - **dns**: minor refactor of dns module (James M Snell) [#11597](https://github.com/nodejs/node/pull/11597) +* [[`3b27b8da9d`](https://github.com/nodejs/node/commit/3b27b8da9d)] - **doc**: fixed readable.isPaused() version annotation (Laurent Fortin) [#11677](https://github.com/nodejs/node/pull/11677) +* [[`84028888db`](https://github.com/nodejs/node/commit/84028888db)] - **doc**: fix broken URL to event loop guide (Poker) [#11670](https://github.com/nodejs/node/pull/11670) +* [[`d5c436311c`](https://github.com/nodejs/node/commit/d5c436311c)] - **doc**: remove Locked from stability index (Rich Trott) [#11661](https://github.com/nodejs/node/pull/11661) +* [[`986d391066`](https://github.com/nodejs/node/commit/986d391066)] - **doc**: unlock module (Rich Trott) [#11661](https://github.com/nodejs/node/pull/11661) +* [[`d06dbf03cc`](https://github.com/nodejs/node/commit/d06dbf03cc)] - **doc**: fix misleading ASCII comments (Rahat Ahmed) [#11657](https://github.com/nodejs/node/pull/11657) +* [[`98d33282d9`](https://github.com/nodejs/node/commit/98d33282d9)] - **doc**: add `Daijiro Wachi` to collaborators (Daijiro Wachi) [#11676](https://github.com/nodejs/node/pull/11676) +* [[`3e79dffd2c`](https://github.com/nodejs/node/commit/3e79dffd2c)] - **doc**: fix WHATWG URL url.protocol example (Richard Lau) [#11647](https://github.com/nodejs/node/pull/11647) +* [[`e468cd3ee7`](https://github.com/nodejs/node/commit/e468cd3ee7)] - **doc**: argument types for console methods (Amelia Clarke) [#11554](https://github.com/nodejs/node/pull/11554) +* [[`83c7b245e2`](https://github.com/nodejs/node/commit/83c7b245e2)] - **doc**: fix typo in stream doc (Bradley Curran) [#11560](https://github.com/nodejs/node/pull/11560) +* [[`a0c117ba95`](https://github.com/nodejs/node/commit/a0c117ba95)] - **doc**: fixup errors.md (Vse Mozhet Byt) [#11566](https://github.com/nodejs/node/pull/11566) +* [[`b116830d64`](https://github.com/nodejs/node/commit/b116830d64)] - **doc**: add link to references in net.Socket (Joyee Cheung) [#11625](https://github.com/nodejs/node/pull/11625) +* [[`b968491dc2`](https://github.com/nodejs/node/commit/b968491dc2)] - **doc**: document WHATWG IDNA methods' error handling (Timothy Gu) [#11549](https://github.com/nodejs/node/pull/11549) +* [[`d329abf1c6`](https://github.com/nodejs/node/commit/d329abf1c6)] - **doc**: use common malformed instead of misformatted (James Sumners) [#11518](https://github.com/nodejs/node/pull/11518) +* [[`11aea2662f`](https://github.com/nodejs/node/commit/11aea2662f)] - **doc**: fix typo in STYLE_GUIDE.md (Nikolai Vavilov) [#11615](https://github.com/nodejs/node/pull/11615) +* [[`f972bd81c6`](https://github.com/nodejs/node/commit/f972bd81c6)] - **inspector**: libuv notification on incoming message (Eugene Ostroukhov) [#11617](https://github.com/nodejs/node/pull/11617) +* [[`a7eba9c71c`](https://github.com/nodejs/node/commit/a7eba9c71c)] - **meta**: move WORKING_GROUPS.md to CTC repo (James M Snell) [#11555](https://github.com/nodejs/node/pull/11555) +* [[`5963566367`](https://github.com/nodejs/node/commit/5963566367)] - **meta**: remove out of date ROADMAP.md file (James M Snell) [#11556](https://github.com/nodejs/node/pull/11556) +* [[`b56e851c48`](https://github.com/nodejs/node/commit/b56e851c48)] - **net**: refactor overloaded argument handling (Joyee Cheung) [#11667](https://github.com/nodejs/node/pull/11667) +* [[`13cb8a69e4`](https://github.com/nodejs/node/commit/13cb8a69e4)] - **net**: remove misleading comment (Ben Noordhuis) [#11573](https://github.com/nodejs/node/pull/11573) +* [[`e2133f3e57`](https://github.com/nodejs/node/commit/e2133f3e57)] - **os**: improve cpus() performance (Brian White) [#11564](https://github.com/nodejs/node/pull/11564) +* [[`821d713a38`](https://github.com/nodejs/node/commit/821d713a38)] - **src**: remove outdated FIXME in node_crypto.cc (Daniel Bevenius) [#11669](https://github.com/nodejs/node/pull/11669) +* [[`1b6ba9effb`](https://github.com/nodejs/node/commit/1b6ba9effb)] - **src**: do not ignore IDNA conversion error (Timothy Gu) [#11549](https://github.com/nodejs/node/pull/11549) +* [[`fdb4a6c796`](https://github.com/nodejs/node/commit/fdb4a6c796)] - **test**: skip the test with proper TAP message (Sakthipriyan Vairamani (thefourtheye)) [#11584](https://github.com/nodejs/node/pull/11584) +* [[`5df9110178`](https://github.com/nodejs/node/commit/5df9110178)] - **test**: check the origin of the blob URLs (Daijiro Wachi) [#11426](https://github.com/nodejs/node/pull/11426) +* [[`b4dcb26681`](https://github.com/nodejs/node/commit/b4dcb26681)] - **test**: changed test1 of test-vm-timeout.js (maurice_hayward) [#11590](https://github.com/nodejs/node/pull/11590) +* [[`f69685be65`](https://github.com/nodejs/node/commit/f69685be65)] - **test**: remove obsolete eslint-disable comment (Rich Trott) [#11643](https://github.com/nodejs/node/pull/11643) +* [[`a4d14363a9`](https://github.com/nodejs/node/commit/a4d14363a9)] - **test**: fix args in parallel/test-fs-null-bytes.js (Vse Mozhet Byt) [#11601](https://github.com/nodejs/node/pull/11601) +* [[`8377374754`](https://github.com/nodejs/node/commit/8377374754)] - **test**: fix tests when npn feature is disabled. (Shigeki Ohtsu) [#11655](https://github.com/nodejs/node/pull/11655) +* [[`1445e282c3`](https://github.com/nodejs/node/commit/1445e282c3)] - **test**: add test-buffer-prototype-inspect (Rich Trott) [#11600](https://github.com/nodejs/node/pull/11600) +* [[`00dd20c173`](https://github.com/nodejs/node/commit/00dd20c173)] - **test**: fix flaky test-https-agent-create-connection (Santiago Gimeno) [#11649](https://github.com/nodejs/node/pull/11649) +* [[`91a222de99`](https://github.com/nodejs/node/commit/91a222de99)] - **test**: enable max-len for test-repl (Rich Trott) [#11559](https://github.com/nodejs/node/pull/11559) +* [[`924b785d50`](https://github.com/nodejs/node/commit/924b785d50)] - **test**: fix test-internal-util-assertCrypto regex (Daniel Bevenius) [#11620](https://github.com/nodejs/node/pull/11620) +* [[`cdee945307`](https://github.com/nodejs/node/commit/cdee945307)] - **test**: improve https coverage to check create connection (chiaki-yokoo) [#11435](https://github.com/nodejs/node/pull/11435) +* [[`4f9253686d`](https://github.com/nodejs/node/commit/4f9253686d)] - **test**: apply strict mode in test-repl (Rich Trott) [#11575](https://github.com/nodejs/node/pull/11575) +* [[`2601c06486`](https://github.com/nodejs/node/commit/2601c06486)] - **test**: skip tests with common.skip (Sakthipriyan Vairamani (thefourtheye)) [#11585](https://github.com/nodejs/node/pull/11585) +* [[`6a5d96164a`](https://github.com/nodejs/node/commit/6a5d96164a)] - **test**: more comprehensive IDNA test cases (Timothy Gu) [#11549](https://github.com/nodejs/node/pull/11549) +* [[`163d2d1624`](https://github.com/nodejs/node/commit/163d2d1624)] - **timers**: unlock the timers API (Rich Trott) [#11580](https://github.com/nodejs/node/pull/11580) +* [[`d6ac192fa3`](https://github.com/nodejs/node/commit/d6ac192fa3)] - **tls**: fix macro to check NPN feature (Shigeki Ohtsu) [#11655](https://github.com/nodejs/node/pull/11655) +* [[`ac3deb1481`](https://github.com/nodejs/node/commit/ac3deb1481)] - **tools**: remove NODE_PATH from environment for tests (Rich Trott) [#11612](https://github.com/nodejs/node/pull/11612) +* [[`3c54f8199c`](https://github.com/nodejs/node/commit/3c54f8199c)] - **tty**: add ref() so process.stdin.ref() etc. work (Ben Schmidt) [#7360](https://github.com/nodejs/node/pull/7360) +* [[`24e6fcce8b`](https://github.com/nodejs/node/commit/24e6fcce8b)] - **url**: use `hasIntl` instead of `try-catch` (Daijiro Wachi) [#11571](https://github.com/nodejs/node/pull/11571) +* [[`7b84363636`](https://github.com/nodejs/node/commit/7b84363636)] - **util**: fix inspecting symbol key in string (Ali BARIN) [#11672](https://github.com/nodejs/node/pull/11672) + ## 2017-03-01, Version 7.7.1 (Current), @italoacasas From c7e8aff83972fe907c63cbffe25865ec38ff1189 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 22 Feb 2017 11:32:38 +1100 Subject: [PATCH 039/485] doc: add Franziska Hinkelmann to the CTC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/11488 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Evan Lucas Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Julien Gilli Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Michaël Zasso Reviewed-By: Jeremiah Senkpiel Reviewed-By: Myles Borins Reviewed-By: Colin Ihrig Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Michael Dawson --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5db1b427ce499e..375119484b0770 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,8 @@ more information about the governance of the Node.js project, see **Colin Ihrig** <cjihrig@gmail.com> * [evanlucas](https://github.com/evanlucas) - **Evan Lucas** <evanlucas@me.com> (he/him) +* [fhinkel](https://github.com/fhinkel) - +**Franziska Hinkelmann** <franziska.hinkelmann@gmail.com> * [fishrock123](https://github.com/fishrock123) - **Jeremiah Senkpiel** <fishrock123@rocketmail.com> * [indutny](https://github.com/indutny) - @@ -229,8 +231,6 @@ more information about the governance of the Node.js project, see **Alexander Makarenko** <estliberitas@gmail.com> * [eugeneo](https://github.com/eugeneo) - **Eugene Ostroukhov** <eostroukhov@google.com> -* [fhinkel](https://github.com/fhinkel) - -**Franziska Hinkelmann** <franziska.hinkelmann@gmail.com> * [firedfox](https://github.com/firedfox) - **Daniel Wang** <wangyang0123@gmail.com> * [geek](https://github.com/geek) - From a44aff477056e9ac003c8f6c1bbe2e29775d4e33 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Mon, 6 Mar 2017 12:46:20 +0100 Subject: [PATCH 040/485] deps: cherry-pick 0ba513f05 from V8 upstream Original commit message: [api] Fix DescriptorInterceptor with access check. The DescriptorInterceptor should intercept all Object.getOwnPropertyDescriptor calls. This CL fixes the interceptor's behavior if the iterator state is ACCESS_CHECK. BUG= Review-Url: https://codereview.chromium.org/2707263002 Cr-Commit-Position: refs/heads/master@{#43417} PR-URL: https://github.com/nodejs/node/pull/11712 Reviewed-By: Ben Noordhuis Reviewed-By: Myles Borins Reviewed-By: Ali Ijaz Sheikh Reviewed-By: James M Snell --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/objects.cc | 9 +++- deps/v8/test/cctest/test-api-interceptors.cc | 56 +++++++++++++++++--- 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index b6949876330a21..bb5cb29c136d91 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 5 #define V8_MINOR_VERSION 6 #define V8_BUILD_NUMBER 326 -#define V8_PATCH_LEVEL 55 +#define V8_PATCH_LEVEL 56 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc index e711a219259ebd..15773748ed50eb 100644 --- a/deps/v8/src/objects.cc +++ b/deps/v8/src/objects.cc @@ -7330,7 +7330,13 @@ namespace { Maybe GetPropertyDescriptorWithInterceptor(LookupIterator* it, PropertyDescriptor* desc) { - if (it->state() == LookupIterator::INTERCEPTOR) { + bool has_access = true; + if (it->state() == LookupIterator::ACCESS_CHECK) { + has_access = it->HasAccess() || JSObject::AllCanRead(it); + it->Next(); + } + + if (has_access && it->state() == LookupIterator::INTERCEPTOR) { Isolate* isolate = it->isolate(); Handle interceptor = it->GetInterceptor(); if (!interceptor->descriptor()->IsUndefined(isolate)) { @@ -7374,6 +7380,7 @@ Maybe GetPropertyDescriptorWithInterceptor(LookupIterator* it, } } } + it->Restart(); return Just(false); } } // namespace diff --git a/deps/v8/test/cctest/test-api-interceptors.cc b/deps/v8/test/cctest/test-api-interceptors.cc index 572487976e97ff..396efca01d4b0f 100644 --- a/deps/v8/test/cctest/test-api-interceptors.cc +++ b/deps/v8/test/cctest/test-api-interceptors.cc @@ -609,6 +609,50 @@ THREADED_TEST(SetterCallbackFunctionDeclarationInterceptorThrow) { CHECK_EQ(set_was_called, false); } +namespace { +int descriptor_was_called; + +void PropertyDescriptorCallback( + Local name, const v8::PropertyCallbackInfo& info) { + // Intercept the callback by setting a different descriptor. + descriptor_was_called++; + const char* code = + "var desc = {value: 5};" + "desc;"; + Local descriptor = v8_compile(code) + ->Run(info.GetIsolate()->GetCurrentContext()) + .ToLocalChecked(); + info.GetReturnValue().Set(descriptor); +} +} // namespace + +// Check that the descriptor callback is called on the global object. +THREADED_TEST(DescriptorCallbackOnGlobalObject) { + v8::HandleScope scope(CcTest::isolate()); + LocalContext env; + v8::Local templ = + v8::FunctionTemplate::New(CcTest::isolate()); + + v8::Local object_template = templ->InstanceTemplate(); + object_template->SetHandler(v8::NamedPropertyHandlerConfiguration( + nullptr, nullptr, PropertyDescriptorCallback, nullptr, nullptr, nullptr)); + v8::Local ctx = + v8::Context::New(CcTest::isolate(), nullptr, object_template); + + descriptor_was_called = 0; + + // Declare function. + v8::Local code = v8_str( + "var x = 42; var desc = Object.getOwnPropertyDescriptor(this, 'x'); " + "desc.value;"); + CHECK_EQ(5, v8::Script::Compile(ctx, code) + .ToLocalChecked() + ->Run(ctx) + .ToLocalChecked() + ->Int32Value(ctx) + .FromJust()); + CHECK_EQ(1, descriptor_was_called); +} bool get_was_called_in_order = false; bool define_was_called_in_order = false; @@ -4516,7 +4560,7 @@ TEST(NamedAllCanReadInterceptor) { ExpectInt32("checked.whatever", 17); CHECK(!CompileRun("Object.getOwnPropertyDescriptor(checked, 'whatever')") ->IsUndefined()); - CHECK_EQ(5, access_check_data.count); + CHECK_EQ(6, access_check_data.count); access_check_data.result = false; ExpectInt32("checked.whatever", intercept_data_0.value); @@ -4525,7 +4569,7 @@ TEST(NamedAllCanReadInterceptor) { CompileRun("Object.getOwnPropertyDescriptor(checked, 'whatever')"); CHECK(try_catch.HasCaught()); } - CHECK_EQ(7, access_check_data.count); + CHECK_EQ(9, access_check_data.count); intercept_data_1.should_intercept = true; ExpectInt32("checked.whatever", intercept_data_1.value); @@ -4534,7 +4578,7 @@ TEST(NamedAllCanReadInterceptor) { CompileRun("Object.getOwnPropertyDescriptor(checked, 'whatever')"); CHECK(try_catch.HasCaught()); } - CHECK_EQ(9, access_check_data.count); + CHECK_EQ(12, access_check_data.count); g_access_check_data = nullptr; } @@ -4603,7 +4647,7 @@ TEST(IndexedAllCanReadInterceptor) { ExpectInt32("checked[15]", 17); CHECK(!CompileRun("Object.getOwnPropertyDescriptor(checked, '15')") ->IsUndefined()); - CHECK_EQ(5, access_check_data.count); + CHECK_EQ(6, access_check_data.count); access_check_data.result = false; ExpectInt32("checked[15]", intercept_data_0.value); @@ -4612,7 +4656,7 @@ TEST(IndexedAllCanReadInterceptor) { CompileRun("Object.getOwnPropertyDescriptor(checked, '15')"); CHECK(try_catch.HasCaught()); } - CHECK_EQ(7, access_check_data.count); + CHECK_EQ(9, access_check_data.count); intercept_data_1.should_intercept = true; ExpectInt32("checked[15]", intercept_data_1.value); @@ -4621,7 +4665,7 @@ TEST(IndexedAllCanReadInterceptor) { CompileRun("Object.getOwnPropertyDescriptor(checked, '15')"); CHECK(try_catch.HasCaught()); } - CHECK_EQ(9, access_check_data.count); + CHECK_EQ(12, access_check_data.count); g_access_check_data = nullptr; } From 28584dbf292e3ba600a02ed6be44cf133a143aac Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 6 Mar 2017 09:59:41 -0800 Subject: [PATCH 041/485] doc: fix process links to console.log/error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/11717 PR-URL: https://github.com/nodejs/node/pull/11718 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Franziska Hinkelmann Reviewed-By: Brian White --- doc/api/process.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/process.md b/doc/api/process.md index bc9dc7919d6928..0ff80980f9c651 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1774,6 +1774,8 @@ cases: [`Error`]: errors.html#errors_class_error [`EventEmitter`]: events.html#events_class_eventemitter [`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify +[`console.error()`]: console.html#console_console_error_data_args +[`console.log()`]: console.html#console_console_log_data_args [`net.Server`]: net.html#net_class_net_server [`net.Socket`]: net.html#net_class_net_socket [`process.argv`]: #process_process_argv From 0c10ec91830c1a26bf28d2a55c0846662f5d6390 Mon Sep 17 00:00:00 2001 From: Jeroen Mandersloot Date: Mon, 6 Mar 2017 11:32:45 +0100 Subject: [PATCH 042/485] doc: fix occurences of "the the" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I identified a number of files where it said "the the" in the comments of the source code and in general documentation texts. I replaced these occurences with a single instance of "the". PR-URL: https://github.com/nodejs/node/pull/11711 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Franziska Hinkelmann --- doc/api/child_process.md | 2 +- doc/api/stream.md | 2 +- src/cares_wrap.cc | 4 ++-- test/parallel/test-env-var-no-warnings.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 39bde058a3e939..7ea5a6ea98c529 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -193,7 +193,7 @@ the process is spawned. The default options are: } ``` -If `timeout` is greater than `0`, the parent will send the the signal +If `timeout` is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `'SIGTERM'`) if the child runs longer than `timeout` milliseconds. diff --git a/doc/api/stream.md b/doc/api/stream.md index 50f41a33db1aea..c48dfe050808ee 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -480,7 +480,7 @@ If the data to be written can be generated or fetched on demand, it is recommended to encapsulate the logic into a [Readable][] and use [`stream.pipe()`][]. However, if calling `write()` is preferred, it is possible to respect backpressure and avoid memory issues using the -the [`'drain'`][] event: +[`'drain'`][] event: ```js function write (data, cb) { diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 2b61209f6e643a..7936474b7426d6 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -220,8 +220,8 @@ static void ares_sockstate_cb(void* data, task = ares_task_create(env, sock); if (task == nullptr) { /* This should never happen unless we're out of memory or something */ - /* is seriously wrong. The socket won't be polled, but the the query */ - /* will eventually time out. */ + /* is seriously wrong. The socket won't be polled, but the query will */ + /* eventually time out. */ return; } diff --git a/test/parallel/test-env-var-no-warnings.js b/test/parallel/test-env-var-no-warnings.js index 53b7d302683cf4..5b61e4163af633 100644 --- a/test/parallel/test-env-var-no-warnings.js +++ b/test/parallel/test-env-var-no-warnings.js @@ -36,6 +36,6 @@ if (process.argv[2] === 'child') { test({ NODE_NO_WARNINGS: '01' }); test({ NODE_NO_WARNINGS: '2' }); // Don't test the number 1 because it will come through as a string in the - // the child process environment. + // child process environment. test({ NODE_NO_WARNINGS: '1' }); } From 9ee58c09a4833a0b6dfcfd1ab0c22a4b47be6a1f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 5 Mar 2017 19:25:12 -0800 Subject: [PATCH 043/485] test: test buffer behavior when zeroFill undefined When ArrayBufferAllocator has an undefined zeroFill property, Buffer.allocUnsafe() should zero fill. Refs: https://github.com/nodejs/node/commit/27e84ddd4e1#commitcomment-19182129 PR-URL: https://github.com/nodejs/node/pull/11706 Reviewed-By: Anna Henningsen Reviewed-By: Franziska Hinkelmann --- .../test-buffer-bindingobj-no-zerofill.js | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 test/parallel/test-buffer-bindingobj-no-zerofill.js diff --git a/test/parallel/test-buffer-bindingobj-no-zerofill.js b/test/parallel/test-buffer-bindingobj-no-zerofill.js new file mode 100644 index 00000000000000..a9168713584e33 --- /dev/null +++ b/test/parallel/test-buffer-bindingobj-no-zerofill.js @@ -0,0 +1,53 @@ +'use strict'; + +// Flags: --expose-internals + +// Confirm that if a custom ArrayBufferAllocator does not define a zeroFill +// property, that the buffer module will zero-fill when allocUnsafe() is called. + +require('../common'); + +const assert = require('assert'); +const buffer = require('buffer'); + +// Monkey-patch setupBufferJS() to have an undefined zeroFill. +const process = require('process'); +const originalBinding = process.binding; + +const binding = originalBinding('buffer'); +const originalSetup = binding.setupBufferJS; + +binding.setupBufferJS = (proto, obj) => { + originalSetup(proto, obj); + assert.strictEqual(obj.zeroFill[0], 1); + delete obj.zeroFill; +}; + +const bindingObj = {}; + +binding.setupBufferJS(Buffer.prototype, bindingObj); +assert.strictEqual(bindingObj.zeroFill, undefined); + +process.binding = (bindee) => { + if (bindee === 'buffer') + return binding; + return originalBinding(bindee); +}; + +// Load from file system because internal buffer is already loaded and we're +// testing code that runs on first load only. +// Do not move this require() to top of file. It is important that +// `process.binding('buffer').setupBufferJS` be monkey-patched before this runs. +const monkeyPatchedBuffer = require('../../lib/buffer'); + +// On unpatched buffer, allocUnsafe() should not zero fill memory. It's always +// possible that a segment of memory is already zeroed out, so try again and +// again until we succeed or we time out. +let uninitialized = buffer.Buffer.allocUnsafe(1024); +while (uninitialized.some((val) => val !== 0)) + uninitialized = buffer.Buffer.allocUnsafe(1024); + +// On monkeypatched buffer, zeroFill property is undefined. allocUnsafe() should +// zero-fill in that case. +const zeroFilled = monkeyPatchedBuffer.Buffer.allocUnsafe(1024); +assert(zeroFilled.every((val) => val === 0)); From a9e64a8ce188710dcc51fd2fcfb076b051358a63 Mon Sep 17 00:00:00 2001 From: Claudio Rodriguez Date: Sun, 5 Mar 2017 16:42:03 +0000 Subject: [PATCH 044/485] dgram: refactor dgram to module.exports Refactor dgram module to use the more efficient module.exports = {} pattern. PR-URL: https://github.com/nodejs/node/pull/11696 Reviewed-By: Colin Ihrig Reviewed-By: Timothy Gu Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Franziska Hinkelmann Reviewed-By: Ron Korving --- lib/dgram.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/dgram.js b/lib/dgram.js index afcb6bfa1db9a2..e4741f4cd5bc29 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -57,7 +57,7 @@ function newHandle(type) { } -exports._createSocketHandle = function(address, port, addressType, fd, flags) { +function _createSocketHandle(address, port, addressType, fd, flags) { // Opening an existing fd is not supported for UDP handles. assert(typeof fd !== 'number' || fd < 0); @@ -72,7 +72,7 @@ exports._createSocketHandle = function(address, port, addressType, fd, flags) { } return handle; -}; +} function Socket(type, listener) { @@ -99,12 +99,11 @@ function Socket(type, listener) { this.on('message', listener); } util.inherits(Socket, EventEmitter); -exports.Socket = Socket; -exports.createSocket = function(type, listener) { +function createSocket(type, listener) { return new Socket(type, listener); -}; +} function startListening(socket) { @@ -585,3 +584,9 @@ Socket.prototype.unref = function() { return this; }; + +module.exports = { + _createSocketHandle, + createSocket, + Socket +}; From 47759429578952672ef9d1079412ed56aad77c4d Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sat, 4 Mar 2017 15:03:15 +0800 Subject: [PATCH 045/485] lib, test: fix server.listen error message Previously the error messages are mostly `[object Object]` after the options get normalized. Use util.inspect to make it more useful. Refactor the listen option test, add precise error message validation and a few more test cases. PR-URL: https://github.com/nodejs/node/pull/11693 Reviewed-By: James M Snell Reviewed-By: Franziska Hinkelmann --- lib/net.js | 2 +- test/parallel/test-net-listen-port-option.js | 45 ----------- .../test-net-server-listen-options.js | 81 +++++++++++++++++++ 3 files changed, 82 insertions(+), 46 deletions(-) delete mode 100644 test/parallel/test-net-listen-port-option.js create mode 100644 test/parallel/test-net-server-listen-options.js diff --git a/lib/net.js b/lib/net.js index 64e50e907719d5..2231e5bb32db0f 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1416,7 +1416,7 @@ Server.prototype.listen = function() { return this; } - throw new Error('Invalid listen argument: ' + options); + throw new Error('Invalid listen argument: ' + util.inspect(options)); }; function lookupAndListen(self, port, address, backlog, exclusive) { diff --git a/test/parallel/test-net-listen-port-option.js b/test/parallel/test-net-listen-port-option.js deleted file mode 100644 index 693bf97907aeee..00000000000000 --- a/test/parallel/test-net-listen-port-option.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; -const common = require('../common'); -const assert = require('assert'); -const net = require('net'); - -function close() { this.close(); } - -// From lib/net.js -function toNumber(x) { return (x = Number(x)) >= 0 ? x : false; } - -function isPipeName(s) { - return typeof s === 'string' && toNumber(s) === false; -} - -const listenVariants = [ - (port, cb) => net.Server().listen({port}, cb), - (port, cb) => net.Server().listen(port, cb) -]; - -listenVariants.forEach((listenVariant, i) => { - listenVariant(undefined, common.mustCall(close)); - listenVariant('0', common.mustCall(close)); - - [ - 'nan', - -1, - 123.456, - 0x10000, - 1 / 0, - -1 / 0, - '+Infinity', - '-Infinity' - ].forEach((port) => { - if (i === 1 && isPipeName(port)) { - // skip this, because listen(port) can also be listen(path) - return; - } - assert.throws(() => listenVariant(port, common.mustNotCall()), - /"port" argument must be >= 0 and < 65536/i); - }); - - [null, true, false].forEach((port) => - assert.throws(() => listenVariant(port, common.mustNotCall()), - /invalid listen argument/i)); -}); diff --git a/test/parallel/test-net-server-listen-options.js b/test/parallel/test-net-server-listen-options.js new file mode 100644 index 00000000000000..ed1d0dc894d260 --- /dev/null +++ b/test/parallel/test-net-server-listen-options.js @@ -0,0 +1,81 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const util = require('util'); + +function close() { this.close(); } + +function listenError(literals, ...values) { + let result = literals[0]; + for (const [i, value] of values.entries()) { + const str = util.inspect(value); + // Need to escape special characters. + result += str.replace(/[\\^$.*+?()[\]{}|=!<>:-]/g, '\\$&'); + result += literals[i + 1]; + } + return new RegExp(`Error: Invalid listen argument: ${result}`); +} + +{ + // Test listen() + net.createServer().listen().on('listening', common.mustCall(close)); + // Test listen(cb) + net.createServer().listen(common.mustCall(close)); +} + +// Test listen(port, cb) and listen({port: port}, cb) combinations +const listenOnPort = [ + (port, cb) => net.createServer().listen({port}, cb), + (port, cb) => net.createServer().listen(port, cb) +]; + +{ + const portError = /^RangeError: "port" argument must be >= 0 and < 65536$/; + for (const listen of listenOnPort) { + // Arbitrary unused ports + listen('0', common.mustCall(close)); + listen(0, common.mustCall(close)); + listen(undefined, common.mustCall(close)); + // Test invalid ports + assert.throws(() => listen(-1, common.mustNotCall()), portError); + assert.throws(() => listen(NaN, common.mustNotCall()), portError); + assert.throws(() => listen(123.456, common.mustNotCall()), portError); + assert.throws(() => listen(65536, common.mustNotCall()), portError); + assert.throws(() => listen(1 / 0, common.mustNotCall()), portError); + assert.throws(() => listen(-1 / 0, common.mustNotCall()), portError); + } + // In listen(options, cb), port takes precedence over path + assert.throws(() => { + net.createServer().listen({ port: -1, path: common.PIPE }, + common.mustNotCall()); + }, portError); +} + +{ + function shouldFailToListen(options, optionsInMessage) { + // Plain arguments get normalized into an object before + // formatted in message, options objects don't. + if (arguments.length === 1) { + optionsInMessage = options; + } + const block = () => { + net.createServer().listen(options, common.mustNotCall()); + }; + assert.throws(block, listenError`${optionsInMessage}`, + `expect listen(${util.inspect(options)}) to throw`); + } + + shouldFailToListen(null, { port: null }); + shouldFailToListen({ port: null }); + shouldFailToListen(false, { port: false }); + shouldFailToListen({ port: false }); + shouldFailToListen(true, { port: true }); + shouldFailToListen({ port: true }); + // Invalid fd as listen(handle) + shouldFailToListen({ fd: -1 }); + // Invalid path in listen(options) + shouldFailToListen({ path: -1 }); + // Host without port + shouldFailToListen({ host: 'localhost' }); +} From 7c8bbe37b7a0e07a5754bc21cb00166240953f49 Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Sun, 5 Mar 2017 16:24:41 +0000 Subject: [PATCH 046/485] doc: reduce font size on smaller screens The font size for tablet sized screens (or half a laptop screen) is overly large, reduce it to a more readable size. Fixes: https://github.com/nodejs/nodejs.org/issues/919 PR-URL: https://github.com/nodejs/node/pull/11695 Fixes: https://github.com/nodejs/nodejs.org#919 Reviewed-By: Daijiro Wachi Reviewed-By: Luigi Pinca Reviewed-By: Franziska Hinkelmann --- doc/api_assets/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 7889389f59b251..20845970fbce37 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -487,7 +487,7 @@ th > *:last-child, td > *:last-child { @media only screen and (max-width: 1024px) { #content { - font-size: 2.5em; + font-size: 1.6em; overflow: visible; } #column1.interior { From 6d16048da634eaf2254250262b9016ab69e1f57b Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 5 Mar 2017 02:18:46 +0100 Subject: [PATCH 047/485] src: drop the NODE_ISOLATE_SLOT macro The `NODE_ISOLATE_SLOT` macro has been unused since c3cd453cbae. PR-URL: https://github.com/nodejs/node/pull/11692 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Franziska Hinkelmann --- src/env.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/env.h b/src/env.h index b3bc79d4ce9d04..28f9e0c1728fd9 100644 --- a/src/env.h +++ b/src/env.h @@ -36,14 +36,6 @@ namespace node { #define NODE_CONTEXT_EMBEDDER_DATA_INDEX 32 #endif -// The slot 0 and 1 had already been taken by "gin" and "blink" in Chrome, -// and the size of isolate's slots is 4 by default, so using 3 should -// hopefully make node work independently when embedded into other -// application. -#ifndef NODE_ISOLATE_SLOT -#define NODE_ISOLATE_SLOT 3 -#endif - // The number of items passed to push_values_to_array_function has diminishing // returns around 8. This should be used at all call sites using said function. #ifndef NODE_PUSH_VAL_TO_ARRAY_MAX From dd76f5f661fc59958f674e89b4f951bf6a56d179 Mon Sep 17 00:00:00 2001 From: Michael Cox Date: Thu, 2 Mar 2017 15:58:26 -0500 Subject: [PATCH 048/485] tools: add links to the stability index reference This modifies the script that generates the docs to create a static link from each Stability Index callout bar to the Stability Index explanations in documentation.html. PR-URL: https://github.com/nodejs/node/pull/11664 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Franziska Hinkelmann --- tools/doc/html.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/doc/html.js b/tools/doc/html.js index 10b04a1b9887e4..185a6660047eb4 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -352,9 +352,12 @@ function linkJsTypeDocs(text) { } function parseAPIHeader(text) { + const classNames = 'api_stability api_stability_$2'; + const docsUrl = 'documentation.html#documentation_stability_index'; + text = text.replace( STABILITY_TEXT_REG_EXP, - '
$1 $2$3
' + `
$1 $2$3
` ); return text; } From 74bd3144d6b0745e0b1a8201d820da9e685e232b Mon Sep 17 00:00:00 2001 From: DavidCai Date: Thu, 2 Mar 2017 21:26:28 +0800 Subject: [PATCH 049/485] test: increase coverage of console PR-URL: https://github.com/nodejs/node/pull/11653 Reviewed-By: Claudio Rodriguez Reviewed-By: Michael Dawson Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Yuta Hiroto Reviewed-By: Colin Ihrig Reviewed-By: Franziska Hinkelmann --- test/parallel/test-console-instance.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/parallel/test-console-instance.js b/test/parallel/test-console-instance.js index ac785e2d8c943c..e74edfae2feaef 100644 --- a/test/parallel/test-console-instance.js +++ b/test/parallel/test-console-instance.js @@ -57,3 +57,13 @@ out.write = common.mustCall((d) => { assert.doesNotThrow(() => { Console(out, err); }); + +// Instance that does not ignore the stream errors. +const c2 = new Console(out, err, false); + +out.write = () => { throw new Error('out'); }; +err.write = () => { throw new Error('err'); }; + +assert.throws(() => c2.log('foo'), /^Error: out$/); +assert.throws(() => c2.warn('foo'), /^Error: err$/); +assert.throws(() => c2.dir('foo'), /^Error: out$/); From 86996c5838f7ee38e3cc96b3c65c8ca6965a36a2 Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 5 Mar 2017 21:11:32 -0500 Subject: [PATCH 050/485] doc: deprecate private http properties PR-URL: https://github.com/nodejs/node/pull/10941 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum --- doc/api/deprecations.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 786a6453161b9b..8de386118af960 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -556,6 +556,32 @@ The `NODE_REPL_MODE` environment variable is used to set the underlying `replMode` of an interactive `node` session. Its default value, `magic`, is similarly deprecated in favor of `sloppy`. + +### DEP0066: outgoingMessage.\_headers, outgoingMessage.\_headerNames + +Type: Documentation-only + +The `http` module `outgoingMessage._headers` and `outgoingMessage._headerNames` +properties have been deprecated. Please instead use one of the public methods +(e.g. `outgoingMessage.getHeader()`, `outgoingMessage.getHeaders()`, +`outgoingMessage.getHeaderNames()`, `outgoingMessage.hasHeader()`, +`outgoingMessage.removeHeader()`, `outgoingMessage.setHeader()`) for working +with outgoing headers. + +*Note*: `outgoingMessage._headers` and `outgoingMessage._headerNames` were never +documented as officially supported properties. + + +### DEP0067: OutgoingMessage.prototype.\_renderHeaders + +Type: Documentation-only + +The `http` module `OutgoingMessage.prototype._renderHeaders()` API has been +deprecated. + +*Note*: `OutgoingMessage.prototype._renderHeaders` was never documented as +an officially supported API. + [alloc]: buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding [alloc_unsafe_size]: buffer.html#buffer_class_method_buffer_allocunsafe_size [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size From 940b5303bef7aee9b24214c62e4b6f182f23f82a Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 5 Mar 2017 21:13:09 -0500 Subject: [PATCH 051/485] http: use Symbol for outgoing headers PR-URL: https://github.com/nodejs/node/pull/10941 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum --- lib/_http_client.js | 5 +++-- lib/_http_outgoing.js | 26 ++++++++++++++------------ lib/_http_server.js | 5 +++-- lib/internal/http.js | 5 +++++ node.gyp | 1 + 5 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 lib/internal/http.js diff --git a/lib/_http_client.js b/lib/_http_client.js index e8285fe81012c7..babe772281909f 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -14,6 +14,7 @@ const OutgoingMessage = require('_http_outgoing').OutgoingMessage; const Agent = require('_http_agent'); const Buffer = require('buffer').Buffer; const urlToOptions = require('internal/url').urlToOptions; +const outHeadersKey = require('internal/http').outHeadersKey; // The actual list of disallowed characters in regexp form is more like: // /[^A-Za-z0-9\-._~!$&'()*+,;=/:@]/ @@ -182,7 +183,7 @@ function ClientRequest(options, cb) { 'client'); } self._storeHeader(self.method + ' ' + self.path + ' HTTP/1.1\r\n', - self._headers); + self[outHeadersKey]); } this._ended = false; @@ -278,7 +279,7 @@ ClientRequest.prototype._implicitHeader = function _implicitHeader() { throw new Error('Can\'t render headers after they are sent to the client'); } this._storeHeader(this.method + ' ' + this.path + ' HTTP/1.1\r\n', - this._headers); + this[outHeadersKey]); }; ClientRequest.prototype.abort = function abort() { diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index a095b64230e98e..6ada7bd99f285b 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -9,6 +9,8 @@ const Buffer = require('buffer').Buffer; const common = require('_http_common'); const checkIsHttpToken = common._checkIsHttpToken; const checkInvalidHeaderChar = common._checkInvalidHeaderChar; +const outHeadersKey = require('internal/http').outHeadersKey; +const StorageObject = require('internal/querystring').StorageObject; const CRLF = common.CRLF; const debug = common.debug; @@ -74,7 +76,7 @@ function OutgoingMessage() { this.socket = null; this.connection = null; this._header = null; - this._headers = null; + this[outHeadersKey] = null; this._onPendingData = null; } @@ -201,7 +203,7 @@ function _storeHeader(firstLine, headers) { var value; var i; var j; - if (headers === this._headers) { + if (headers === this[outHeadersKey]) { for (key in headers) { var entry = headers[key]; field = entry[0]; @@ -393,11 +395,11 @@ function validateHeader(msg, name, value) { OutgoingMessage.prototype.setHeader = function setHeader(name, value) { validateHeader(this, name, value); - if (!this._headers) - this._headers = {}; + if (!this[outHeadersKey]) + this[outHeadersKey] = {}; const key = name.toLowerCase(); - this._headers[key] = [name, value]; + this[outHeadersKey][key] = [name, value]; switch (key.length) { case 10: @@ -421,9 +423,9 @@ OutgoingMessage.prototype.getHeader = function getHeader(name) { throw new TypeError('"name" argument must be a string'); } - if (!this._headers) return; + if (!this[outHeadersKey]) return; - var entry = this._headers[name.toLowerCase()]; + var entry = this[outHeadersKey][name.toLowerCase()]; if (!entry) return; return entry[1]; @@ -432,13 +434,13 @@ OutgoingMessage.prototype.getHeader = function getHeader(name) { // Returns an array of the names of the current outgoing headers. OutgoingMessage.prototype.getHeaderNames = function getHeaderNames() { - return (this._headers ? Object.keys(this._headers) : []); + return (this[outHeadersKey] ? Object.keys(this[outHeadersKey]) : []); }; // Returns a shallow copy of the current outgoing headers. OutgoingMessage.prototype.getHeaders = function getHeaders() { - const headers = this._headers; + const headers = this[outHeadersKey]; const ret = new OutgoingHeaders(); if (headers) { const keys = Object.keys(headers); @@ -457,7 +459,7 @@ OutgoingMessage.prototype.hasHeader = function hasHeader(name) { throw new TypeError('"name" argument must be a string'); } - return !!(this._headers && this._headers[name.toLowerCase()]); + return !!(this[outHeadersKey] && this[outHeadersKey][name.toLowerCase()]); }; @@ -491,8 +493,8 @@ OutgoingMessage.prototype.removeHeader = function removeHeader(name) { break; } - if (this._headers) { - delete this._headers[key]; + if (this[outHeadersKey]) { + delete this[outHeadersKey][key]; } }; diff --git a/lib/_http_server.js b/lib/_http_server.js index 082920839459e9..32da9cfe95ed69 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -13,6 +13,7 @@ const continueExpression = common.continueExpression; const chunkExpression = common.chunkExpression; const httpSocketSetup = common.httpSocketSetup; const OutgoingMessage = require('_http_outgoing').OutgoingMessage; +const outHeadersKey = require('internal/http').outHeadersKey; const STATUS_CODES = exports.STATUS_CODES = { 100: 'Continue', @@ -179,7 +180,7 @@ function writeHead(statusCode, reason, obj) { this.statusCode = statusCode; var headers; - if (this._headers) { + if (this[outHeadersKey]) { // Slow-case: when progressive API and header fields are passed. var k; if (obj) { @@ -196,7 +197,7 @@ function writeHead(statusCode, reason, obj) { } } // only progressive api is used - headers = this._headers; + headers = this[outHeadersKey]; } else { // only writeHead() called headers = obj; diff --git a/lib/internal/http.js b/lib/internal/http.js new file mode 100644 index 00000000000000..1ba68a41a5692b --- /dev/null +++ b/lib/internal/http.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + outHeadersKey: Symbol('outHeadersKey') +}; diff --git a/node.gyp b/node.gyp index 673a1d10effaa8..637a1934287841 100644 --- a/node.gyp +++ b/node.gyp @@ -85,6 +85,7 @@ 'lib/internal/errors.js', 'lib/internal/freelist.js', 'lib/internal/fs.js', + 'lib/internal/http.js', 'lib/internal/linkedlist.js', 'lib/internal/net.js', 'lib/internal/module.js', From b377034359aa07f2ba83a5a0c9f859418cb80e39 Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 5 Mar 2017 21:15:15 -0500 Subject: [PATCH 052/485] http: support old private properties and function PR-URL: https://github.com/nodejs/node/pull/10941 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum --- lib/_http_outgoing.js | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 6ada7bd99f285b..51ded1eae6e88b 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -83,6 +83,75 @@ function OutgoingMessage() { util.inherits(OutgoingMessage, Stream); +Object.defineProperty(OutgoingMessage.prototype, '_headers', { + get: function() { + return this.getHeaders(); + }, + set: function(val) { + if (val == null) { + this[outHeadersKey] = null; + } else if (typeof val === 'object') { + const headers = this[outHeadersKey] = {}; + const keys = Object.keys(val); + for (var i = 0; i < keys.length; ++i) { + const name = keys[i]; + headers[name.toLowerCase()] = [name, val[name]]; + } + } + } +}); + +Object.defineProperty(OutgoingMessage.prototype, '_headerNames', { + get: function() { + const headers = this[outHeadersKey]; + if (headers) { + const out = new StorageObject(); + const keys = Object.keys(headers); + for (var i = 0; i < keys.length; ++i) { + const key = keys[i]; + const val = headers[key][0]; + out[key] = val; + } + return out; + } else { + return headers; + } + }, + set: function(val) { + if (typeof val === 'object' && val !== null) { + const headers = this[outHeadersKey]; + if (!headers) + return; + const keys = Object.keys(val); + for (var i = 0; i < keys.length; ++i) { + const header = headers[keys[i]]; + if (header) + header[0] = val[keys[i]]; + } + } + } +}); + + +OutgoingMessage.prototype._renderHeaders = function _renderHeaders() { + if (this._header) { + throw new Error('Can\'t render headers after they are sent to the client'); + } + + var headersMap = this[outHeadersKey]; + if (!headersMap) return {}; + + var headers = {}; + var keys = Object.keys(headersMap); + + for (var i = 0, l = keys.length; i < l; i++) { + var key = keys[i]; + headers[headersMap[key][0]] = headersMap[key][1]; + } + return headers; +}; + + exports.OutgoingMessage = OutgoingMessage; From 8243ca0e0e87b3e114d9ddf2843d1272bc56b053 Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 20 Feb 2017 17:00:14 -0500 Subject: [PATCH 053/485] http: reuse existing StorageObject PR-URL: https://github.com/nodejs/node/pull/10941 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum --- lib/_http_outgoing.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 51ded1eae6e88b..373476a3c43d52 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -20,10 +20,6 @@ var RE_FIELDS = new RegExp('^(?:Connection|Transfer-Encoding|Content-Length|' + var RE_CONN_VALUES = /(?:^|\W)close|upgrade(?:$|\W)/ig; var RE_TE_CHUNKED = common.chunkExpression; -// Used to store headers returned by getHeaders() -function OutgoingHeaders() {} -OutgoingHeaders.prototype = Object.create(null); - var dateCache; function utcDate() { if (!dateCache) { @@ -510,7 +506,7 @@ OutgoingMessage.prototype.getHeaderNames = function getHeaderNames() { // Returns a shallow copy of the current outgoing headers. OutgoingMessage.prototype.getHeaders = function getHeaders() { const headers = this[outHeadersKey]; - const ret = new OutgoingHeaders(); + const ret = new StorageObject(); if (headers) { const keys = Object.keys(headers); for (var i = 0; i < keys.length; ++i) { From 6b2cef65c99cb40fb9ca0789670b9ea9f5fcc2dd Mon Sep 17 00:00:00 2001 From: Brian White Date: Thu, 9 Feb 2017 06:49:39 -0500 Subject: [PATCH 054/485] http: append Cookie header values with semicolon Previously, separate incoming Cookie headers would be concatenated with a comma, which can cause confusion in userland code when it comes to parsing the final Cookie header value. This commit concatenates using a semicolon instead. Fixes: https://github.com/nodejs/node/issues/11256 PR-URL: https://github.com/nodejs/node/pull/11259 Reviewed-By: James M Snell Reviewed-By: Roman Reiss Reviewed-By: Matteo Collina Reviewed-By: Ben Noordhuis --- lib/_http_incoming.js | 20 ++++++++++--------- .../test-http-incoming-matchKnownFields.js | 11 ++++++---- .../test-http-server-multiheaders2.js | 4 +++- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index 53419323f46b0d..d8388917902dd0 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -194,6 +194,9 @@ function matchKnownFields(field) { case 'Set-Cookie': case 'set-cookie': return '\u0001'; + case 'Cookie': + case 'cookie': + return '\u0002cookie'; // The fields below are not used in _addHeaderLine(), but they are common // headers where we can avoid toLowerCase() if the mixed or lower case // versions match the first time through. @@ -215,9 +218,6 @@ function matchKnownFields(field) { case 'Content-Encoding': case 'content-encoding': return '\u0000content-encoding'; - case 'Cookie': - case 'cookie': - return '\u0000cookie'; case 'Origin': case 'origin': return '\u0000origin'; @@ -263,18 +263,20 @@ function matchKnownFields(field) { // // Per RFC2616, section 4.2 it is acceptable to join multiple instances of the // same header with a ', ' if the header in question supports specification of -// multiple values this way. If not, we declare the first instance the winner -// and drop the second. Extended header fields (those beginning with 'x-') are -// always joined. +// multiple values this way. The one exception to this is the Cookie header, +// which has multiple values joined with a '; ' instead. If a header's values +// cannot be joined in either of these ways, we declare the first instance the +// winner and drop the second. Extended header fields (those beginning with +// 'x-') are always joined. IncomingMessage.prototype._addHeaderLine = _addHeaderLine; function _addHeaderLine(field, value, dest) { field = matchKnownFields(field); var flag = field.charCodeAt(0); - if (flag === 0) { + if (flag === 0 || flag === 2) { field = field.slice(1); - // Make comma-separated list + // Make a delimited list if (typeof dest[field] === 'string') { - dest[field] += ', ' + value; + dest[field] += (flag === 0 ? ', ' : '; ') + value; } else { dest[field] = value; } diff --git a/test/parallel/test-http-incoming-matchKnownFields.js b/test/parallel/test-http-incoming-matchKnownFields.js index 7411be4e847d73..f301b9169fcd2b 100644 --- a/test/parallel/test-http-incoming-matchKnownFields.js +++ b/test/parallel/test-http-incoming-matchKnownFields.js @@ -6,9 +6,10 @@ const IncomingMessage = require('http').IncomingMessage; function checkDest(field, result, value) { const dest = {}; - if (value) dest[field] = 'test'; const incomingMessage = new IncomingMessage(field); // dest is changed by IncomingMessage._addHeaderLine + if (value) + incomingMessage._addHeaderLine(field, 'test', dest); incomingMessage._addHeaderLine(field, value, dest); assert.deepStrictEqual(dest, result); } @@ -49,7 +50,7 @@ checkDest('age', {age: 'test'}, 'value'); checkDest('Expires', {expires: undefined}); checkDest('expires', {expires: 'test'}, 'value'); checkDest('Set-Cookie', {'set-cookie': [undefined]}); -checkDest('set-cookie', {'set-cookie': [undefined]}); +checkDest('set-cookie', {'set-cookie': ['test', 'value']}, 'value'); checkDest('Transfer-Encoding', {'transfer-encoding': undefined}); checkDest('transfer-encoding', {'transfer-encoding': 'test, value'}, 'value'); checkDest('Date', {date: undefined}); @@ -64,8 +65,8 @@ checkDest('Vary', {vary: undefined}); checkDest('vary', {vary: 'test, value'}, 'value'); checkDest('Content-Encoding', {'content-encoding': undefined}, undefined); checkDest('content-encoding', {'content-encoding': 'test, value'}, 'value'); -checkDest('Cookies', {cookies: undefined}); -checkDest('cookies', {cookies: 'test, value'}, 'value'); +checkDest('Cookie', {cookie: undefined}); +checkDest('cookie', {cookie: 'test; value'}, 'value'); checkDest('Origin', {origin: undefined}); checkDest('origin', {origin: 'test, value'}, 'value'); checkDest('Upgrade', {upgrade: undefined}); @@ -88,3 +89,5 @@ checkDest('X-Forwarded-Host', {'x-forwarded-host': undefined}); checkDest('x-forwarded-host', {'x-forwarded-host': 'test, value'}, 'value'); checkDest('X-Forwarded-Proto', {'x-forwarded-proto': undefined}); checkDest('x-forwarded-proto', {'x-forwarded-proto': 'test, value'}, 'value'); +checkDest('X-Foo', {'x-foo': undefined}); +checkDest('x-foo', {'x-foo': 'test, value'}, 'value'); diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js index 53e68e6f0d3e74..febffe05235b7f 100644 --- a/test/parallel/test-http-server-multiheaders2.js +++ b/test/parallel/test-http-server-multiheaders2.js @@ -54,8 +54,10 @@ const srv = http.createServer(function(req, res) { 'foo', 'header parsed incorrectly: ' + header); }); multipleAllowed.forEach(function(header) { + const sep = (header.toLowerCase() === 'cookie' ? '; ' : ', '); assert.strictEqual(req.headers[header.toLowerCase()], - 'foo, bar', 'header parsed incorrectly: ' + header); + 'foo' + sep + 'bar', + 'header parsed incorrectly: ' + header); }); res.writeHead(200, {'Content-Type': 'text/plain'}); From d3480776c70bb1622afee5a2a5f39abf9e42a507 Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 10 Feb 2017 20:32:32 -0500 Subject: [PATCH 055/485] http: concatenate outgoing Cookie headers This commit enables automatic concatenation of multiple Cookie header values with a semicolon, except when 2D header arrays are used. Fixes: https://github.com/nodejs/node/issues/11256 PR-URL: https://github.com/nodejs/node/pull/11259 Reviewed-By: James M Snell Reviewed-By: Roman Reiss Reviewed-By: Matteo Collina Reviewed-By: Ben Noordhuis --- lib/_http_outgoing.js | 41 +++++++++--- test/parallel/test-http.js | 129 +++++++++++++++++++++++-------------- 2 files changed, 112 insertions(+), 58 deletions(-) diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 373476a3c43d52..186905ce5fc6a8 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -20,6 +20,27 @@ var RE_FIELDS = new RegExp('^(?:Connection|Transfer-Encoding|Content-Length|' + var RE_CONN_VALUES = /(?:^|\W)close|upgrade(?:$|\W)/ig; var RE_TE_CHUNKED = common.chunkExpression; +// isCookieField performs a case-insensitive comparison of a provided string +// against the word "cookie." This method (at least as of V8 5.4) is faster than +// the equivalent case-insensitive regexp, even if isCookieField does not get +// inlined. +function isCookieField(s) { + if (s.length !== 6) return false; + var ch = s.charCodeAt(0); + if (ch !== 99 && ch !== 67) return false; + ch = s.charCodeAt(1); + if (ch !== 111 && ch !== 79) return false; + ch = s.charCodeAt(2); + if (ch !== 111 && ch !== 79) return false; + ch = s.charCodeAt(3); + if (ch !== 107 && ch !== 75) return false; + ch = s.charCodeAt(4); + if (ch !== 105 && ch !== 73) return false; + ch = s.charCodeAt(5); + if (ch !== 101 && ch !== 69) return false; + return true; +} + var dateCache; function utcDate() { if (!dateCache) { @@ -275,12 +296,14 @@ function _storeHeader(firstLine, headers) { value = entry[1]; if (value instanceof Array) { - for (j = 0; j < value.length; j++) { - storeHeader(this, state, field, value[j], false); + if (value.length < 2 || !isCookieField(field)) { + for (j = 0; j < value.length; j++) + storeHeader(this, state, field, value[j], false); + continue; } - } else { - storeHeader(this, state, field, value, false); + value = value.join('; '); } + storeHeader(this, state, field, value, false); } } else if (headers instanceof Array) { for (i = 0; i < headers.length; i++) { @@ -302,12 +325,14 @@ function _storeHeader(firstLine, headers) { value = headers[field]; if (value instanceof Array) { - for (j = 0; j < value.length; j++) { - storeHeader(this, state, field, value[j], true); + if (value.length < 2 || !isCookieField(field)) { + for (j = 0; j < value.length; j++) + storeHeader(this, state, field, value[j], true); + continue; } - } else { - storeHeader(this, state, field, value, true); + value = value.join('; '); } + storeHeader(this, state, field, value, true); } } diff --git a/test/parallel/test-http.js b/test/parallel/test-http.js index 1178c745e1e12a..dc77be4fdde189 100644 --- a/test/parallel/test-http.js +++ b/test/parallel/test-http.js @@ -1,84 +1,113 @@ 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); const url = require('url'); -let responses_sent = 0; -let responses_recvd = 0; -let body0 = ''; -let body1 = ''; +const expectedRequests = ['/hello', '/there', '/world']; -const server = http.Server(function(req, res) { - if (responses_sent === 0) { - assert.strictEqual('GET', req.method); - assert.strictEqual('/hello', url.parse(req.url).pathname); +const server = http.Server(common.mustCall(function(req, res) { + assert.strictEqual(expectedRequests.shift(), req.url); - console.dir(req.headers); - assert.strictEqual(true, 'accept' in req.headers); - assert.strictEqual('*/*', req.headers['accept']); - - assert.strictEqual(true, 'foo' in req.headers); - assert.strictEqual('bar', req.headers['foo']); + switch (req.url) { + case '/hello': + assert.strictEqual(req.method, 'GET'); + assert.strictEqual(req.headers['accept'], '*/*'); + assert.strictEqual(req.headers['foo'], 'bar'); + assert.strictEqual(req.headers.cookie, 'foo=bar; bar=baz; baz=quux'); + break; + case '/there': + assert.strictEqual(req.method, 'PUT'); + assert.strictEqual(req.headers.cookie, 'node=awesome; ta=da'); + break; + case '/world': + assert.strictEqual(req.method, 'POST'); + assert.deepStrictEqual(req.headers.cookie, 'abc=123; def=456; ghi=789'); + break; + default: + assert(false, `Unexpected request for ${req.url}`); } - if (responses_sent === 1) { - assert.strictEqual('POST', req.method); - assert.strictEqual('/world', url.parse(req.url).pathname); + if (expectedRequests.length === 0) this.close(); - } req.on('end', function() { res.writeHead(200, {'Content-Type': 'text/plain'}); res.write('The path was ' + url.parse(req.url).pathname); res.end(); - responses_sent += 1; }); req.resume(); - - //assert.strictEqual('127.0.0.1', res.connection.remoteAddress); -}); +}, 3)); server.listen(0); server.on('listening', function() { const agent = new http.Agent({ port: this.address().port, maxSockets: 1 }); - http.get({ + const req = http.get({ port: this.address().port, path: '/hello', - headers: {'Accept': '*/*', 'Foo': 'bar'}, + headers: { + Accept: '*/*', + Foo: 'bar', + Cookie: [ 'foo=bar', 'bar=baz', 'baz=quux' ] + }, agent: agent - }, function(res) { - assert.strictEqual(200, res.statusCode); - responses_recvd += 1; + }, common.mustCall(function(res) { + const cookieHeaders = req._header.match(/^Cookie: .+$/img); + assert.deepStrictEqual(cookieHeaders, + ['Cookie: foo=bar; bar=baz; baz=quux']); + assert.strictEqual(res.statusCode, 200); + let body = ''; res.setEncoding('utf8'); - res.on('data', function(chunk) { body0 += chunk; }); - console.error('Got /hello response'); - }); + res.on('data', function(chunk) { body += chunk; }); + res.on('end', common.mustCall(function() { + assert.strictEqual(body, 'The path was /hello'); + })); + })); - setTimeout(function() { + setTimeout(common.mustCall(function() { + const req = http.request({ + port: server.address().port, + method: 'PUT', + path: '/there', + agent: agent + }, common.mustCall(function(res) { + const cookieHeaders = req._header.match(/^Cookie: .+$/img); + assert.deepStrictEqual(cookieHeaders, ['Cookie: node=awesome; ta=da']); + assert.strictEqual(res.statusCode, 200); + let body = ''; + res.setEncoding('utf8'); + res.on('data', function(chunk) { body += chunk; }); + res.on('end', common.mustCall(function() { + assert.strictEqual(body, 'The path was /there'); + })); + })); + req.setHeader('Cookie', ['node=awesome', 'ta=da']); + req.end(); + }), 1); + + setTimeout(common.mustCall(function() { const req = http.request({ port: server.address().port, method: 'POST', path: '/world', + headers: [ ['Cookie', 'abc=123'], + ['Cookie', 'def=456'], + ['Cookie', 'ghi=789'] ], agent: agent - }, function(res) { - assert.strictEqual(200, res.statusCode); - responses_recvd += 1; + }, common.mustCall(function(res) { + const cookieHeaders = req._header.match(/^Cookie: .+$/img); + assert.deepStrictEqual(cookieHeaders, + ['Cookie: abc=123', + 'Cookie: def=456', + 'Cookie: ghi=789']); + assert.strictEqual(res.statusCode, 200); + let body = ''; res.setEncoding('utf8'); - res.on('data', function(chunk) { body1 += chunk; }); - console.error('Got /world response'); - }); + res.on('data', function(chunk) { body += chunk; }); + res.on('end', common.mustCall(function() { + assert.strictEqual(body, 'The path was /world'); + })); + })); req.end(); - }, 1); -}); - -process.on('exit', function() { - console.error('responses_recvd: ' + responses_recvd); - assert.strictEqual(2, responses_recvd); - - console.error('responses_sent: ' + responses_sent); - assert.strictEqual(2, responses_sent); - - assert.strictEqual('The path was /hello', body0); - assert.strictEqual('The path was /world', body1); + }), 2); }); From 7afc70de404b6e5573f4e0b89e0e4a56bb10dda0 Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 5 Mar 2017 06:15:00 -0500 Subject: [PATCH 056/485] url: remove invalid file protocol check 'file' should have been 'file:' but since the WHATWG URL spec suggests using an opaque origin (which is what was already being used for file URLs), we'll just keep using that, making this merely a cleanup. PR-URL: https://github.com/nodejs/node/pull/11691 Reviewed-By: Luigi Pinca Reviewed-By: Joyee Cheung Reviewed-By: Timothy Gu Reviewed-By: Daijiro Wachi Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/internal/url.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/url.js b/lib/internal/url.js index 6e6cc62226766b..7e53ac1dc2d7ba 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -1112,7 +1112,6 @@ function originFor(url, base) { case 'https:': case 'ws:': case 'wss:': - case 'file': origin = new TupleOrigin(protocol.slice(0, -1), url[context].host, url[context].port, From e4fbd8e244cafa4bbb76aeac52c96941156f61d6 Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 5 Mar 2017 06:17:29 -0500 Subject: [PATCH 057/485] test: add more WHATWG URL origin tests PR-URL: https://github.com/nodejs/node/pull/11691 Reviewed-By: Luigi Pinca Reviewed-By: Joyee Cheung Reviewed-By: Timothy Gu Reviewed-By: Daijiro Wachi Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-whatwg-url-properties.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/parallel/test-whatwg-url-properties.js b/test/parallel/test-whatwg-url-properties.js index b5b3119422e668..c5d60229a9f2c1 100644 --- a/test/parallel/test-whatwg-url-properties.js +++ b/test/parallel/test-whatwg-url-properties.js @@ -142,3 +142,19 @@ assert.strictEqual(url.searchParams, oldParams); assert.strictEqual(opts.search, '?l=24'); assert.strictEqual(opts.hash, '#test'); } + +// Test special origins +[ + { expected: 'https://whatwg.org', + url: 'blob:https://whatwg.org/d0360e2f-caee-469f-9a2f-87d5b0456f6f' }, + { expected: 'ftp://example.org', url: 'ftp://example.org/foo' }, + { expected: 'gopher://gopher.quux.org', url: 'gopher://gopher.quux.org/1/' }, + { expected: 'http://example.org', url: 'http://example.org/foo' }, + { expected: 'https://example.org', url: 'https://example.org/foo' }, + { expected: 'ws://example.org', url: 'ws://example.org/foo' }, + { expected: 'wss://example.org', url: 'wss://example.org/foo' }, + { expected: 'null', url: 'file:///tmp/mock/path' }, + { expected: 'null', url: 'npm://nodejs/rules' } +].forEach((test) => { + assert.strictEqual(new URL(test.url).origin, test.expected); +}); From 5efb15e30af87db0953b056e6dc3b43245a1c24b Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 8 Mar 2017 14:08:34 -0800 Subject: [PATCH 058/485] src: add missing #include * We use these functions that are declared in u_strFromUTF8() u_strToUTF8() * At present, is indirectly included, but this will likely change in future ICUs. Adding this header has been the right thing to do for many years, so it is backwards compatible. Fixes: https://github.com/nodejs/node/issues/11753 PR-URL: https://github.com/nodejs/node/issues/11754 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Timothy Gu --- src/node_i18n.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_i18n.cc b/src/node_i18n.cc index b337456c639318..fab594ce79b69e 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc @@ -43,6 +43,7 @@ #include #include #include +#include #ifdef NODE_HAVE_SMALL_ICU /* if this is defined, we have a 'secondary' entry point. From 6df23fa39f0400a6d5e60cc5bbf9e4d18987bb9b Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Thu, 9 Mar 2017 22:01:45 +0100 Subject: [PATCH 059/485] benchmark: fix punycode and get-ciphers benchmark Add missing 'i=0' from for-loops from punycode and get-ciphers benchmarks. PR-URL: https://github.com/nodejs/node/pull/11720 Reviewed-By: Colin Ihrig Reviewed-By: Timothy Gu Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- benchmark/crypto/get-ciphers.js | 2 +- benchmark/misc/punycode.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark/crypto/get-ciphers.js b/benchmark/crypto/get-ciphers.js index f6b1767cb4fbcc..3f5ad17ad38716 100644 --- a/benchmark/crypto/get-ciphers.js +++ b/benchmark/crypto/get-ciphers.js @@ -18,6 +18,6 @@ function main(conf) { method(); } bench.start(); - for (; i < n; i++) method(); + for (i = 0; i < n; i++) method(); bench.end(n); } diff --git a/benchmark/misc/punycode.js b/benchmark/misc/punycode.js index b359fbbff4bbc6..74ddadbb9daa6c 100644 --- a/benchmark/misc/punycode.js +++ b/benchmark/misc/punycode.js @@ -46,7 +46,7 @@ function runPunycode(n, val) { for (; i < n; i++) usingPunycode(val); bench.start(); - for (; i < n; i++) + for (i = 0; i < n; i++) usingPunycode(val); bench.end(n); } From ec2f098156d7abe169aa846ba4bc51a2d9125ba7 Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Mon, 27 Feb 2017 09:20:27 +0200 Subject: [PATCH 060/485] util: change sparse arrays inspection format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Missing elements in sparse arrays used to be serialized to empty placeholders delimited with commas by util.inspect() and in some cases the result was a syntactically correct representation of a JavaScript array with shorter length than the original one. This commit implements @TimothyGu's suggestion to change the way util.inspect() formats sparse arrays to something similar to how Firefox shows them. Fixes: https://github.com/nodejs/node/issues/11570 PR-URL: https://github.com/nodejs/node/pull/11576 Reviewed-By: James M Snell Reviewed-By: Evan Lucas Reviewed-By: Anna Henningsen Reviewed-By: Timothy Gu Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig --- lib/util.js | 24 +++++++++++++++++------- test/parallel/test-util-inspect.js | 24 ++++++++++++++++++------ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/lib/util.js b/lib/util.js index 7e8d23d55e676e..d34bf9303de49d 100644 --- a/lib/util.js +++ b/lib/util.js @@ -626,16 +626,26 @@ function formatObject(ctx, value, recurseTimes, visibleKeys, keys) { function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { var output = []; - const maxLength = Math.min(Math.max(0, ctx.maxArrayLength), value.length); - const remaining = value.length - maxLength; - for (var i = 0; i < maxLength; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); + let visibleLength = 0; + let index = 0; + while (index < value.length && visibleLength < ctx.maxArrayLength) { + let emptyItems = 0; + while (index < value.length && !hasOwnProperty(value, String(index))) { + emptyItems++; + index++; + } + if (emptyItems > 0) { + const ending = emptyItems > 1 ? 's' : ''; + const message = `<${emptyItems} empty item${ending}>`; + output.push(ctx.stylize(message, 'undefined')); } else { - output.push(''); + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(index), true)); + index++; } + visibleLength++; } + const remaining = value.length - index; if (remaining > 0) { output.push(`... ${remaining} more item${remaining > 1 ? 's' : ''}`); } diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index ded4e4a47f71d5..5e359d5d7900b8 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -295,12 +295,18 @@ assert.strictEqual(util.inspect(-0), '-0'); const a = ['foo', 'bar', 'baz']; assert.strictEqual(util.inspect(a), '[ \'foo\', \'bar\', \'baz\' ]'); delete a[1]; -assert.strictEqual(util.inspect(a), '[ \'foo\', , \'baz\' ]'); +assert.strictEqual(util.inspect(a), '[ \'foo\', <1 empty item>, \'baz\' ]'); assert.strictEqual( util.inspect(a, true), - '[ \'foo\', , \'baz\', [length]: 3 ]' + '[ \'foo\', <1 empty item>, \'baz\', [length]: 3 ]' +); +assert.strictEqual(util.inspect(new Array(5)), '[ <5 empty items> ]'); +a[3] = 'bar'; +a[100] = 'qux'; +assert.strictEqual( + util.inspect(a, { breakLength: Infinity }), + '[ \'foo\', <1 empty item>, \'baz\', \'bar\', <96 empty items>, \'qux\' ]' ); -assert.strictEqual(util.inspect(new Array(5)), '[ , , , , ]'); // test for Array constructor in different context { @@ -835,15 +841,21 @@ checkAlignment(new Map(big_array.map(function(y) { return [y, null]; }))); // Do not backport to v5/v4 unless all of // https://github.com/nodejs/node/pull/6334 is backported. { - const x = Array(101); + const x = new Array(101).fill(); assert(/1 more item/.test(util.inspect(x))); } { - const x = Array(101); + const x = new Array(101).fill(); assert(!/1 more item/.test(util.inspect(x, {maxArrayLength: 101}))); } +{ + const x = new Array(101).fill(); + assert(/^\[ ... 101 more items ]$/.test( + util.inspect(x, {maxArrayLength: 0}))); +} + { const x = Array(101); assert(/^\[ ... 101 more items ]$/.test( @@ -901,7 +913,7 @@ checkAlignment(new Map(big_array.map(function(y) { return [y, null]; }))); // util.inspect.defaultOptions tests { - const arr = Array(101); + const arr = new Array(101).fill(); const obj = {a: {a: {a: {a: 1}}}}; const oldOptions = Object.assign({}, util.inspect.defaultOptions); From 7a4adb5b60187c97d39af1d9149eb744dfa01590 Mon Sep 17 00:00:00 2001 From: Clarence Dimitri CHARLES Date: Sun, 19 Feb 2017 18:30:15 +0100 Subject: [PATCH 061/485] test: add regex in test_cyclic_link_protection PR-URL: https://github.com/nodejs/node/pull/11622 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott --- test/parallel/test-fs-realpath.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 331cec5ee8c8bb..96a6deae8af0f6 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -191,21 +191,25 @@ function test_cyclic_link_protection(callback) { common.skip('symlink test (no privs)'); return runNextTest(); } - const entry = common.tmpDir + '/cycles/realpath-3a'; + const entry = path.join(common.tmpDir, '/cycles/realpath-3a'); [ [entry, '../cycles/realpath-3b'], - [common.tmpDir + '/cycles/realpath-3b', '../cycles/realpath-3c'], - [common.tmpDir + '/cycles/realpath-3c', '../cycles/realpath-3a'] + [path.join(common.tmpDir, '/cycles/realpath-3b'), '../cycles/realpath-3c'], + [path.join(common.tmpDir, '/cycles/realpath-3c'), '../cycles/realpath-3a'] ].forEach(function(t) { try { fs.unlinkSync(t[0]); } catch (e) {} fs.symlinkSync(t[1], t[0], 'dir'); unlink.push(t[0]); }); - assert.throws(function() { fs.realpathSync(entry); }); - asynctest(fs.realpath, [entry], callback, function(err, result) { - assert.ok(err && true); - return true; - }); + assert.throws(() => { + fs.realpathSync(entry); + }, common.expectsError({ code: 'ELOOP', type: Error })); + asynctest( + fs.realpath, [entry], callback, common.mustCall(function(err, result) { + assert.strictEqual(err.path, entry); + assert.strictEqual(result, undefined); + return true; + })); } function test_cyclic_link_overprotection(callback) { From e2f151f5b2e76b944bb17f1b324805da6cd2424e Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 5 Mar 2017 22:45:19 -0800 Subject: [PATCH 062/485] src: make process.env work with symbols in/delete The getter for process.env already allows symbols to be used, and `in` operator as a read-only operator can do the same. `delete a[b]` operator in ES always returns `true` without doing anything when `b in a === false`. Allow symbols in the deleter accordingly. PR-URL: https://github.com/nodejs/node/pull/11709 Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- src/node.cc | 42 +++++++++++++---------- test/parallel/test-process-env-symbols.js | 9 ++--- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/node.cc b/src/node.cc index b3e2bbe53aa1db..b7253afed1d604 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2787,24 +2787,26 @@ static void EnvSetter(Local property, static void EnvQuery(Local property, const PropertyCallbackInfo& info) { int32_t rc = -1; // Not found unless proven otherwise. + if (property->IsString()) { #ifdef __POSIX__ - node::Utf8Value key(info.GetIsolate(), property); - if (getenv(*key)) - rc = 0; + node::Utf8Value key(info.GetIsolate(), property); + if (getenv(*key)) + rc = 0; #else // _WIN32 - node::TwoByteValue key(info.GetIsolate(), property); - WCHAR* key_ptr = reinterpret_cast(*key); - if (GetEnvironmentVariableW(key_ptr, nullptr, 0) > 0 || - GetLastError() == ERROR_SUCCESS) { - rc = 0; - if (key_ptr[0] == L'=') { - // Environment variables that start with '=' are hidden and read-only. - rc = static_cast(v8::ReadOnly) | - static_cast(v8::DontDelete) | - static_cast(v8::DontEnum); + node::TwoByteValue key(info.GetIsolate(), property); + WCHAR* key_ptr = reinterpret_cast(*key); + if (GetEnvironmentVariableW(key_ptr, nullptr, 0) > 0 || + GetLastError() == ERROR_SUCCESS) { + rc = 0; + if (key_ptr[0] == L'=') { + // Environment variables that start with '=' are hidden and read-only. + rc = static_cast(v8::ReadOnly) | + static_cast(v8::DontDelete) | + static_cast(v8::DontEnum); + } } - } #endif + } if (rc != -1) info.GetReturnValue().Set(rc); } @@ -2812,14 +2814,16 @@ static void EnvQuery(Local property, static void EnvDeleter(Local property, const PropertyCallbackInfo& info) { + if (property->IsString()) { #ifdef __POSIX__ - node::Utf8Value key(info.GetIsolate(), property); - unsetenv(*key); + node::Utf8Value key(info.GetIsolate(), property); + unsetenv(*key); #else - node::TwoByteValue key(info.GetIsolate(), property); - WCHAR* key_ptr = reinterpret_cast(*key); - SetEnvironmentVariableW(key_ptr, nullptr); + node::TwoByteValue key(info.GetIsolate(), property); + WCHAR* key_ptr = reinterpret_cast(*key); + SetEnvironmentVariableW(key_ptr, nullptr); #endif + } // process.env never has non-configurable properties, so always // return true like the tc39 delete operator. diff --git a/test/parallel/test-process-env-symbols.js b/test/parallel/test-process-env-symbols.js index a8798fc457d935..13a9cd4df30ae6 100644 --- a/test/parallel/test-process-env-symbols.js +++ b/test/parallel/test-process-env-symbols.js @@ -18,10 +18,11 @@ assert.throws(() => { process.env.foo = symbol; }, errRegExp); -// Verify that using a symbol with the in operator throws. -assert.throws(() => { - symbol in process.env; -}, errRegExp); +// Verify that using a symbol with the in operator returns false. +assert.strictEqual(symbol in process.env, false); + +// Verify that deleting a symbol key returns true. +assert.strictEqual(delete process.env[symbol], true); // Checks that well-known symbols like `Symbol.toStringTag` won’t throw. assert.doesNotThrow(() => Object.prototype.toString.call(process.env)); From b98004b79cc5c55922ecd03a4128ba0dfdd07f48 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 8 Mar 2017 13:39:57 +0100 Subject: [PATCH 063/485] test: add hasCrypto check to tls-legacy-deprecated Currently test-tls-legacy-deprecated will fail if node was built using --without-ssl. This commit adds a check to verify is crypto support exists and if not skip this test. PR-URL: https://github.com/nodejs/node/pull/11747 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- test/parallel/test-tls-legacy-deprecated.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parallel/test-tls-legacy-deprecated.js b/test/parallel/test-tls-legacy-deprecated.js index df8290c8622f21..b50c63e7763dfd 100644 --- a/test/parallel/test-tls-legacy-deprecated.js +++ b/test/parallel/test-tls-legacy-deprecated.js @@ -1,6 +1,10 @@ // Flags: --no-warnings 'use strict'; const common = require('../common'); +if (!common.hasCrypto) { + common.skip('missing crypto'); + return; +} const assert = require('assert'); const tls = require('tls'); From dacaaa5fc0750fd41e9f4547d048b40bf28b7829 Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Mon, 27 Feb 2017 18:50:59 +0900 Subject: [PATCH 064/485] test: add script to create 0-dns-cert.pem 0-dns-cert.pem and 0-dns-key.pem were stored in `test/fixtures/key` directory, but the cert file cannot be created with the openssl command via Makefile. Added a script to create it with using `asn1.js` and `asn1.js-rfc5280` and moved them out of key directory and put into `test/fixtures/0-dns`. The domains listed in the cert were also changed into example.com and example.org to show the use for only testing. Fixes: https://github.com/nodejs/node/issues/10228 PR-URL: https://github.com/nodejs/node/pull/11579 Reviewed-By: James M Snell Reviewed-By: Sam Roberts --- test/fixtures/0-dns/0-dns-cert.pem | 19 ++++++ test/fixtures/0-dns/0-dns-key.pem | 27 +++++++++ test/fixtures/0-dns/0-dns-rsapub.der | Bin 0 -> 270 bytes test/fixtures/0-dns/README.md | 26 ++++++++ test/fixtures/0-dns/create-cert.js | 75 ++++++++++++++++++++++++ test/fixtures/0-dns/package.json | 16 +++++ test/fixtures/keys/0-dns-cert.pem | 19 ------ test/fixtures/keys/0-dns-key.pem | 27 --------- test/parallel/test-tls-0-dns-altname.js | 12 ++-- 9 files changed, 170 insertions(+), 51 deletions(-) create mode 100644 test/fixtures/0-dns/0-dns-cert.pem create mode 100644 test/fixtures/0-dns/0-dns-key.pem create mode 100644 test/fixtures/0-dns/0-dns-rsapub.der create mode 100644 test/fixtures/0-dns/README.md create mode 100644 test/fixtures/0-dns/create-cert.js create mode 100644 test/fixtures/0-dns/package.json delete mode 100644 test/fixtures/keys/0-dns-cert.pem delete mode 100644 test/fixtures/keys/0-dns-key.pem diff --git a/test/fixtures/0-dns/0-dns-cert.pem b/test/fixtures/0-dns/0-dns-cert.pem new file mode 100644 index 00000000000000..03a4db3e2d8501 --- /dev/null +++ b/test/fixtures/0-dns/0-dns-cert.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDGDCCAgCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAZMRcwFQYDVQQDEw5jYS5l +eGFtcGxlLmNvbTAeFw0xNzAzMDIwMTMxMjJaFw0yNzAyMjgwMTMxMjJaMBsxGTAX +BgNVBAMTEGV2aWwuZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDFyJT0kv2P9L6iNY6TL7IZonAR8R9ev7iD1tR5ycMEpM/y6WTefIco +civMcBGVZWtCgkoePHiveH9UIep7HFGB4gxCYDZFYB46yGS0YH2fB5GWXTLYObYa +zxuEhgFRG0DLIwNDRLW0+0FG3disp7YdRHBtdbL58F/qNORqPEjIpoQxOJc2UqX2 +/gfomJRdFW/PSgN7uH2QwMzRQRIrKmyAFzeuEWVP+UAV4853Yg66PmYpAASyt069 +sE8QNTNE75KrerMmYzH7AmTEGvY8bukrDuVQZce2/lcK2rAE+G6at2eBNMZKOnzR +y9kWIiJ3rR7+WK55EKelLz0doZFKteu1AgMBAAGjaTBnMGUGA1UdEQReMFyCImdv +b2QuZXhhbXBsZS5vcmcALmV2aWwuZXhhbXBsZS5jb22CGGp1c3QtYW5vdGhlci5l +eGFtcGxlLmNvbYcECAgICIcECAgEBIIQbGFzdC5leGFtcGxlLmNvbTANBgkqhkiG +9w0BAQsFAAOCAQEAvreVoOZO2gpM4Dmzp70D30XZjsK9i0BCsRHBvPLPw3y8B2xg +BRtOREOI69NU0WGpj5Lbqww5M8M1hjHshiGEu2aXfZ6qM3lENaIMCpKlF9jbm02/ +wmxNaAnS8bDSZyO5rbsGr2tJb4ds7DazmMEKWhOBEpJoOp9rG6SAey+a6MkZ7NEN +0p3THCqNf3lL1KblPrMvdsyhHPEzv4uT7+YAnLKHwGzbihcWJRsRo5oipWL8ZDhn +bd3SMWtfRTSWDmghJaHke2xIjDtTwSjHjjPTFsK+rl227W8r4/EQI/X6fTQV2j3T +7zqrJLF9h9F/v3mo57k6sxsQNZ12XvhuTHC2dA== +-----END CERTIFICATE----- diff --git a/test/fixtures/0-dns/0-dns-key.pem b/test/fixtures/0-dns/0-dns-key.pem new file mode 100644 index 00000000000000..4e2fdb5fc61e0e --- /dev/null +++ b/test/fixtures/0-dns/0-dns-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAxciU9JL9j/S+ojWOky+yGaJwEfEfXr+4g9bUecnDBKTP8ulk +3nyHKHIrzHARlWVrQoJKHjx4r3h/VCHqexxRgeIMQmA2RWAeOshktGB9nweRll0y +2Dm2Gs8bhIYBURtAyyMDQ0S1tPtBRt3YrKe2HURwbXWy+fBf6jTkajxIyKaEMTiX +NlKl9v4H6JiUXRVvz0oDe7h9kMDM0UESKypsgBc3rhFlT/lAFePOd2IOuj5mKQAE +srdOvbBPEDUzRO+Sq3qzJmMx+wJkxBr2PG7pKw7lUGXHtv5XCtqwBPhumrdngTTG +Sjp80cvZFiIid60e/liueRCnpS89HaGRSrXrtQIDAQABAoIBABcGA3j5B3VTi0F8 +tI0jtzrOsvcTt5AjB0qpnnBS8VXADcj8LFbN7jniGIEi5pkahkLmwdQFPBNJFqFn +lVEheceB1eWAJ7EpwDsdisOIm/cAPY1gagPLrAww4cYqh0q2vnMnL0EMZY6c1Pt3 +5borh8KebewAEIaR2ch8wb4wKFTbAM0DftYBFzHAF88OeCuIpdsk2Tz0sVQbA3/1 +XNLOVcJvDOVIRPEpo2l7RIN33KvDhzpMoV3qVzWxqdccPRZZFU5KmJ6DtouIPT3S +3WauIL5oVpAyYNJETTyxjBQE4DgFeNX1Wyycgk27EoLcn6Trcs0kNVrmXXblNAtJ +Nko6g10CgYEA+TjzNjyAXPrOpY88uiPVMAgepEQOnDYtMwasdDVaW3xK9KH1rrhU +dx1IDTMmOUfyU2qsj5txmJtReQz//1bpd7e73VO8mHQDUubhs2TivgGs+fqzAdmT +vJsjerfNsxf+4JENzzWmqT/Ybc976Tu55VH5mcRG9Q66fTxdAJ51+8MCgYEAyymF +gntRMBd9e/KIiqlvcxelo0ahyKEzaJC7/FkZotuSB+kAwpdJ5Unb0FeVQZxNhDPg +xgsrGOOOvHvfhv7DPU0TQ/vp6VDPdg+N6m/Ow2vr79A2v6s+7gZj3MLiLRFyEF6l +bxQNGe3qavnm3owUQQCY2RLBKYCFfv/cykYlGycCgYB6etKMRQ+QonIMS2i80f9j +q5njgM7tVnLAMPdv5QiTDXKI50+mnlBkea9/TTPr0r/03ugPa4VYSnyv0QO+qSfz +/ggFrbFx+xHnHDCvyVTlrE0mTV7L+fHxLw0wskQVUCWil6cBvow5gXcMAHwVE5U4 +biEMwLlele5wvcm3FClHoQKBgACV/RGUQ3atCqqZ13T26iBd2Bdxc7P9awWJLVGb +/CvxECm/rUXiY88qeFzQc9i9l6ei8qn/jD9FILtAbDOadnutxjly94i5t+9yOgmM +Cv+bRxHo+s9wsfzDvfP8B+TzYO3VKAr69tK1UfC/CcBojQJm+wndOPtiqH/mQv++ +VgsPAoGBAJ0aNJe3zb+blvAQ3W4iPSjhyxdMC00x46pr6ds+Y8WygbN6lzCvNDw6 +FFTINBckOs5Z/UWUNbExWYjBHZhLlhhxTezCzvIrwNvgUB8Y4sPk3S4KDsnkyy6f +/qMmEHlVyKjh2BCNs7PVnWDlfl3vECE7n8dBizFHgja76l1ia+0z +-----END RSA PRIVATE KEY----- diff --git a/test/fixtures/0-dns/0-dns-rsapub.der b/test/fixtures/0-dns/0-dns-rsapub.der new file mode 100644 index 0000000000000000000000000000000000000000..263a4b8293dd0ef752e74ae4b459bed5b0a88fca GIT binary patch literal 270 zcmV+p0rCDYf&mHwf&l>l#mJQOlKqeLzM?gblP|IvqHq!MA6~z>gVxk}$-@Ms&+_SH z-h78Bax2Vm5tU_YLV`*jJb15oe^eprdmK@L;tWDyHbr0_I>=0Z|)3%Oe9rM76a0K}Ox!tf#geL~w0&via~|>NMnPJV?llFXMr@vN;-Ve%h?tpB6qDG{#dSg U5T~UtJsqKuO10~?0s{d60X%Gbh5!Hn literal 0 HcmV?d00001 diff --git a/test/fixtures/0-dns/README.md b/test/fixtures/0-dns/README.md new file mode 100644 index 00000000000000..650970a2c5a5cf --- /dev/null +++ b/test/fixtures/0-dns/README.md @@ -0,0 +1,26 @@ +## Purpose +The test cert file for use `test/parallel/test-tls-0-dns-altname.js` +can be created by using `asn1.js` and `asn1.js-rfc5280`, + +## How to create a test cert. + +```sh +$ openssl genrsa -out 0-dns-key.pem 2048 +Generating RSA private key, 2048 bit long modulus +...................+++ +..............................................................................................+++ +e is 65537 (0x10001) +$ openssl rsa -in 0-dns-key.pem -RSAPublicKey_out -outform der -out 0-dns-rsapub.der +writing RSA key +$ npm install +0-dns@1.0.0 /home/github/node/test/fixtures/0-dns ++-- asn1.js@4.9.1 +| +-- bn.js@4.11.6 +| +-- inherits@2.0.3 +| `-- minimalistic-assert@1.0.0 +`-- asn1.js-rfc5280@1.2.2 + +$ node ./createCert.js +$ openssl x509 -text -in 0-dns-cert.pem +(You can not see evil.example.com in subjectAltName field) +``` diff --git a/test/fixtures/0-dns/create-cert.js b/test/fixtures/0-dns/create-cert.js new file mode 100644 index 00000000000000..7a353906e4bbec --- /dev/null +++ b/test/fixtures/0-dns/create-cert.js @@ -0,0 +1,75 @@ +'use strict'; +const asn1 = require('asn1.js'); +const crypto = require('crypto'); +const fs = require('fs'); +const rfc5280 = require('asn1.js-rfc5280'); +const BN = asn1.bignum; + +const id_at_commonName = [ 2, 5, 4, 3 ]; +const rsaEncryption = [1, 2, 840, 113549, 1, 1, 1]; +const sha256WithRSAEncryption = [1, 2, 840, 113549, 1, 1, 11]; +const sigalg = 'RSA-SHA256'; + +const private_key = fs.readFileSync('./0-dns-key.pem'); +// public key file can be generated from the private key with +// openssl rsa -in 0-dns-key.pem -RSAPublicKey_out -outform der +// -out 0-dns-rsapub.der +const public_key = fs.readFileSync('./0-dns-rsapub.der'); + +const now = Date.now(); +const days = 3650; + +const Null_ = asn1.define('Null_', function() { + this.null_(); +}); +const null_ = Null_.encode('der'); + +const PrintStr = asn1.define('PrintStr', function() { + this.printstr(); +}); +const issuer = PrintStr.encode('ca.example.com', 'der'); +const subject = PrintStr.encode('evil.example.com', 'der'); + +const tbs = { + version: 'v3', + serialNumber: new BN('01', 16), + signature: { algorithm: sha256WithRSAEncryption, parameters: null_}, + issuer: { type: 'rdnSequence', + value: [ [{type: id_at_commonName, value: issuer}] ] }, + validity: + { notBefore: { type: 'utcTime', value: now }, + notAfter: { type: 'utcTime', value: now + days * 86400000} }, + subject: { type: 'rdnSequence', + value: [ [{type: id_at_commonName, value: subject}] ] }, + subjectPublicKeyInfo: + { algorithm: { algorithm: rsaEncryption, parameters: null_}, + subjectPublicKey: { unused: 0, data: public_key} }, + extensions: + [ { extnID: 'subjectAlternativeName', + critical: false, + // subjectAltName which contains '\0' character to check CVE-2009-2408 + extnValue: [ + { type: 'dNSName', value: 'good.example.org\u0000.evil.example.com' }, + { type: 'dNSName', value: 'just-another.example.com' }, + { type: 'iPAddress', value: Buffer.from('08080808', 'hex') }, + { type: 'iPAddress', value: Buffer.from('08080404', 'hex') }, + { type: 'dNSName', value: 'last.example.com' } ] } + ] +}; + +const tbs_der = rfc5280.TBSCertificate.encode(tbs, 'der'); + +const sign = crypto.createSign(sigalg); +sign.update(tbs_der); +const signature = sign.sign(private_key); + +const cert = { + tbsCertificate: tbs, + signatureAlgorithm: { algorithm: sha256WithRSAEncryption, parameters: null_ }, + signature: + { unused: 0, + data: signature } +}; +const pem = rfc5280.Certificate.encode(cert, 'pem', {label: 'CERTIFICATE'}); + +fs.writeFileSync('./0-dns-cert.pem', pem + '\n'); diff --git a/test/fixtures/0-dns/package.json b/test/fixtures/0-dns/package.json new file mode 100644 index 00000000000000..667600c7d08521 --- /dev/null +++ b/test/fixtures/0-dns/package.json @@ -0,0 +1,16 @@ +{ + "name": "0-dns", + "version": "1.0.0", + "description": "create certificate for 0-dns test", + "main": "createCert.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "SEE LICENSE IN ../../../LICENSE", + "private": true, + "dependencies": { + "asn1.js": "^4.9.1", + "asn1.js-rfc5280": "^1.2.2" + } +} diff --git a/test/fixtures/keys/0-dns-cert.pem b/test/fixtures/keys/0-dns-cert.pem deleted file mode 100644 index 6cfc6c43c460d7..00000000000000 --- a/test/fixtures/keys/0-dns-cert.pem +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC/zCCAemgAwIBAgICJxEwCwYJKoZIhvcNAQEFMBUxEzARBgNVBAMWCm9oLm15 -Lmdvc2gwHhcNMTQxMjA4MTM0MTUzWhcNMzQxMjAzMTM0MTUzWjATMREwDwYDVQQD -FghldmlsLmNvbTCCASAwCwYJKoZIhvcNAQEBA4IBDwAwggEKAoIBAQCsFwwf1dsr -PdxyTHBreymbFGACLQtaOihGsSkYtIzUEF1aT90YDMzNdoLr4wkwWig5FPRMnjmX -7pXY9RVbWmwG/M2eku9S62LekUFkeY1W/QftV9LYgAg7wVDA+v3+zk/EMEqADYm6 -W735tzDIKtvx+/3Dd9puQ0TLFNHBxAmTz7YNaJdIUqzs3DWT4zeZQj0RCOyWCjQL -NfqQ80I7NYFYb4IJqiUY8iOTL5kPi7b5szem5EakQbhufDWun4xGTZk/URZHgYgp -REbOLTYs2hqbK76biW/Yvwd1l7RsptIvJvkuQ1R/dO1WPv6PLKLTuS1EOHM3YqNH -o7wDSplOJe5rAgMBAAGhCQMHADEyMzQ1NqIJAwcANzg5YWJjo0swSTBHBgNVHREE -QDA+ghRnb29nbGUuY29tAC5ldmlsLmNvbYIQanVzdC1hbm90aGVyLmNvbYcECAgI -CIcECAgEBIIIbGFzdC5jb20wCwYJKoZIhvcNAQEBA4IBAQBAC2n4CIXLnyONTjPc -qU0wu41wI+IQlb9mi0C7WEd9HumCbskahAp8vTs35DehnSxrl15FG0rABVtTROCv -eflBKuzwPjtnfZm37UIbQKQUtcxwMQ/zvA83w4GLrLvrFtaQRpXn/RtL/q4CIpQH -MGaPW1Gs24RVBHxI7OXf9UlUruB1yQLUbbtdBtxZ6pk/B32e3yWowbvG7OxuUL0F -1w4DD2m+GfbTyZSCfYKP/zMp3xhTxihVfZ2g07ufc51bNCftWKBLHM/QHJmn4pVo -rrz1vS9nMf/i16zrJ8Xmj61Eo4Aes37lAH5kUiT1VsNxSDcQCiqr1mcj6ByXKNCQ -wDzO ------END CERTIFICATE----- diff --git a/test/fixtures/keys/0-dns-key.pem b/test/fixtures/keys/0-dns-key.pem deleted file mode 100644 index d292789554d798..00000000000000 --- a/test/fixtures/keys/0-dns-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEArBcMH9XbKz3cckxwa3spmxRgAi0LWjooRrEpGLSM1BBdWk/d -GAzMzXaC6+MJMFooORT0TJ45l+6V2PUVW1psBvzNnpLvUuti3pFBZHmNVv0H7VfS -2IAIO8FQwPr9/s5PxDBKgA2Julu9+bcwyCrb8fv9w3fabkNEyxTRwcQJk8+2DWiX -SFKs7Nw1k+M3mUI9EQjslgo0CzX6kPNCOzWBWG+CCaolGPIjky+ZD4u2+bM3puRG -pEG4bnw1rp+MRk2ZP1EWR4GIKURGzi02LNoamyu+m4lv2L8HdZe0bKbSLyb5LkNU -f3TtVj7+jyyi07ktRDhzN2KjR6O8A0qZTiXuawIDAQABAoIBABUlW9sJlz3QAyeU -VvgOEUW6EjYSPOPgY5SULl2XyfpA7IetapiK8huJJXtA0Z88ZNbmyUIk6yTNL2KS -cwZfrQiKxeVnXrsMq4B3ztY+zWxT+UZj1Ue/K8PT9E1SSiWmSkzsNitX/oWEwmpN -5VOjWJV6hmsfbhrAb1KZA1FQ+nBMEQrkEFpmFD1nJE8dH5rWNo4YbM/boR/kC93G -CHOwd2TKNrBa8ZeMOjcyUK9fg15CMkj7uTzfIGkjCM/mXOxvsvTuZ0np7PL7aF+o -GfSHP/l+B5rxT1GTYjZtpSEgAoqYEFJnnZELklo7KRWB7p2rgyHPElSjQN3xIn5Z -apNPrBECgYEA26gZGBP+j1Hqrh3nAhOq/t6PMj+V8yz/i2TrraJ1z7GKRGoBUOX9 -ruJGJExfACzgrKl1hL4XRfLdHuooScUqrIxLX7eKHE2nBSd0M40zEKbgIMRhaMsf -lAFOkxJRHMT7edaVu3MkSfDgFXRbhr+jcdxspzhunHMJVUnC5LgAKHMCgYEAyJAw -6GF80Uud5oDHo2tGY9uYgMIUN9rmrrFjqstkVB6QMFlyyeI3MHUhiU7qH53yaRCi -FxuHU6usQFmduwZAKInoPMRhYTYbexe4CYB+C96trwoV7ltDE+a7ZTsEj5kSYvCO -KLcVTn4mcU0TSpE0MU1XQKP0Ev/mdZ5aYEopvCkCgYEAlkVa3YkYNq5g8btNRbN0 -4SYbKtIrYJChRpjFTyV8mZkpMYKf4dtmANWWDNEekP0iu5y25BgzzcvHkJW6+DTl -6+OS0Sm8V36cS79hFL99dt/jJyeSSGHl+ZgnTCBU02zDaefuya2M3vTmKGdREk9a -ntOglYnayjc85Fcw+M4UdZcCgYAFw/9j7smDysSzR6h1jjPr0vhDW1Dxeh1/kCHp -Wwd7U5WZjji6jQJBJlzccaRRXF0HoC7Is0Xkpd7BytG5+qgFglFmzc5u2PtZQolL -3KHC/ZfInGWdAIqhG9TvSA8Ngb0BkyDDEuBN7Vp1j12qmxoBANQtS4lMsoaRgwfe -FMO2YQKBgGv6Ndv+eHWSkqGFOSXU6dXAjOuAji3K1yRlxUg/RS/DCMK+8XQbuh47 -+p998LwvI70JIr4v2PAkO3/HaRILOTRLLvq8O/yqHwrVf+P7AQ8kPm7uUf7kTXat -DYcKIAp5ddZweyFCgwVm+JMd1E+cpL97RbHCbu7Ct6OD9uLGXCUh ------END RSA PRIVATE KEY----- diff --git a/test/parallel/test-tls-0-dns-altname.js b/test/parallel/test-tls-0-dns-altname.js index 874dc6b235d644..483d256564accd 100644 --- a/test/parallel/test-tls-0-dns-altname.js +++ b/test/parallel/test-tls-0-dns-altname.js @@ -2,6 +2,8 @@ const common = require('../common'); const assert = require('assert'); +// Check getPeerCertificate can properly handle '\0' for fix CVE-2009-2408. + if (!common.hasCrypto) { common.skip('missing crypto'); return; @@ -11,8 +13,8 @@ const tls = require('tls'); const fs = require('fs'); const server = tls.createServer({ - key: fs.readFileSync(common.fixturesDir + '/keys/0-dns-key.pem'), - cert: fs.readFileSync(common.fixturesDir + '/keys/0-dns-cert.pem') + key: fs.readFileSync(common.fixturesDir + '/0-dns/0-dns-key.pem'), + cert: fs.readFileSync(common.fixturesDir + '/0-dns/0-dns-cert.pem') }, function(c) { c.once('data', function() { c.destroy(); @@ -24,11 +26,11 @@ const server = tls.createServer({ }, common.mustCall(function() { const cert = c.getPeerCertificate(); assert.strictEqual(cert.subjectaltname, - 'DNS:google.com\0.evil.com, ' + - 'DNS:just-another.com, ' + + 'DNS:good.example.org\0.evil.example.com, ' + + 'DNS:just-another.example.com, ' + 'IP Address:8.8.8.8, ' + 'IP Address:8.8.4.4, ' + - 'DNS:last.com'); + 'DNS:last.example.com'); c.write('ok'); })); })); From b806e18dd7abda23d6460c672a636753f619ba67 Mon Sep 17 00:00:00 2001 From: Junliang Yan Date: Tue, 7 Mar 2017 10:29:05 -0500 Subject: [PATCH 065/485] s390: enable march=z196 PR-URL: https://github.com/nodejs/node/pull/11730 Reviewed-By: Sam Roberts Reviewed-By: Gibson Fahnestock Reviewed-By: Michael Dawson Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- common.gypi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common.gypi b/common.gypi index a52915d59a7ac4..3aad8e7722d57b 100644 --- a/common.gypi +++ b/common.gypi @@ -315,12 +315,12 @@ 'ldflags': [ '-m64' ], }], [ 'target_arch=="s390"', { - 'cflags': [ '-m31' ], - 'ldflags': [ '-m31' ], + 'cflags': [ '-m31', '-march=z196' ], + 'ldflags': [ '-m31', '-march=z196' ], }], [ 'target_arch=="s390x"', { - 'cflags': [ '-m64' ], - 'ldflags': [ '-m64' ], + 'cflags': [ '-m64', '-march=z196' ], + 'ldflags': [ '-m64', '-march=z196' ], }], [ 'OS=="solaris"', { 'cflags': [ '-pthreads' ], From 1125c8a814030f16fc995d897181ac9920f9d3db Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Mon, 6 Mar 2017 16:22:53 -0600 Subject: [PATCH 066/485] src: fix typos in node_lttng_provider.h Is a semver-breaking change Refs: https://github.com/nodejs/node/pull/11189#discussion_r99509433 PR-URL: https://github.com/nodejs/node/pull/11723 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- src/node_lttng_provider.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_lttng_provider.h b/src/node_lttng_provider.h index 5913f39752caba..fc4576b47806d3 100644 --- a/src/node_lttng_provider.h +++ b/src/node_lttng_provider.h @@ -61,7 +61,7 @@ void NODE_NET_STREAM_END(node_lttng_connection_t* conn, void NODE_GC_START(v8::GCType type, v8::GCCallbackFlags flags, v8::Isolate* isolate) { - const char* typeStr = "Unkown GC Type"; + const char* typeStr = "Unknown GC Type"; const char* flagsStr = "Unknown GC Flag"; #define BUILD_IF(f) if (type == v8::GCType::f) { typeStr = #f; } @@ -78,7 +78,7 @@ void NODE_GC_START(v8::GCType type, void NODE_GC_DONE(v8::GCType type, v8::GCCallbackFlags flags, v8::Isolate* isolate) { - const char* typeStr = "Unkown GC Type"; + const char* typeStr = "Unknown GC Type"; const char* flagsStr = "Unknown GC Flag"; #define BUILD_IF(f) if (type == v8::GCType::f) { typeStr = #f; } From 98e54b0bd4854bdb3e2949d1b6b20d6777fb7cde Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 3 Jan 2017 13:16:48 -0800 Subject: [PATCH 067/485] meta: restore original copyright header A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data. --- benchmark/buffers/buffer-base64-encode.js | 21 +++++++++++++++++ benchmark/buffers/buffer-compare.js | 21 +++++++++++++++++ .../readable-stream/lib/_stream_duplex.js | 21 +++++++++++++++++ .../lib/_stream_passthrough.js | 21 +++++++++++++++++ .../readable-stream/lib/_stream_readable.js | 21 +++++++++++++++++ .../readable-stream/lib/_stream_transform.js | 21 +++++++++++++++++ .../readable-stream/lib/_stream_writable.js | 21 +++++++++++++++++ .../node_modules/core-util-is/lib/util.js | 21 +++++++++++++++++ .../node_modules/string_decoder/index.js | 21 +++++++++++++++++ .../node_modules/util-extend/extend.js | 21 +++++++++++++++++ .../readable-stream/lib/_stream_duplex.js | 21 +++++++++++++++++ .../lib/_stream_passthrough.js | 21 +++++++++++++++++ .../readable-stream/lib/_stream_readable.js | 21 +++++++++++++++++ .../readable-stream/lib/_stream_transform.js | 21 +++++++++++++++++ .../readable-stream/lib/_stream_writable.js | 21 +++++++++++++++++ .../node_modules/core-util-is/lib/util.js | 21 +++++++++++++++++ .../node_modules/string_decoder/index.js | 21 +++++++++++++++++ lib/_debugger.js | 21 +++++++++++++++++ lib/_http_agent.js | 21 +++++++++++++++++ lib/_http_client.js | 21 +++++++++++++++++ lib/_http_common.js | 21 +++++++++++++++++ lib/_http_incoming.js | 21 +++++++++++++++++ lib/_http_outgoing.js | 21 +++++++++++++++++ lib/_http_server.js | 21 +++++++++++++++++ lib/_linklist.js | 21 +++++++++++++++++ lib/_stream_duplex.js | 21 +++++++++++++++++ lib/_stream_passthrough.js | 21 +++++++++++++++++ lib/_stream_readable.js | 21 +++++++++++++++++ lib/_stream_transform.js | 21 +++++++++++++++++ lib/_stream_writable.js | 21 +++++++++++++++++ lib/_tls_common.js | 21 +++++++++++++++++ lib/_tls_legacy.js | 21 +++++++++++++++++ lib/_tls_wrap.js | 21 +++++++++++++++++ lib/buffer.js | 21 +++++++++++++++++ lib/child_process.js | 21 +++++++++++++++++ lib/cluster.js | 21 +++++++++++++++++ lib/console.js | 21 +++++++++++++++++ lib/constants.js | 21 +++++++++++++++++ lib/crypto.js | 21 +++++++++++++++++ lib/dgram.js | 21 +++++++++++++++++ lib/dns.js | 21 +++++++++++++++++ lib/domain.js | 21 +++++++++++++++++ lib/events.js | 21 +++++++++++++++++ lib/fs.js | 21 +++++++++++++++++ lib/http.js | 21 +++++++++++++++++ lib/https.js | 21 +++++++++++++++++ lib/module.js | 21 +++++++++++++++++ lib/net.js | 21 +++++++++++++++++ lib/os.js | 21 +++++++++++++++++ lib/path.js | 21 +++++++++++++++++ lib/querystring.js | 23 +++++++++++++++++++ lib/readline.js | 21 +++++++++++++++++ lib/repl.js | 21 +++++++++++++++++ lib/stream.js | 21 +++++++++++++++++ lib/string_decoder.js | 21 +++++++++++++++++ lib/sys.js | 21 +++++++++++++++++ lib/timers.js | 21 +++++++++++++++++ lib/tls.js | 21 +++++++++++++++++ lib/tty.js | 21 +++++++++++++++++ lib/url.js | 21 +++++++++++++++++ lib/util.js | 21 +++++++++++++++++ lib/vm.js | 21 +++++++++++++++++ lib/zlib.js | 21 +++++++++++++++++ src/async-wrap-inl.h | 21 +++++++++++++++++ src/async-wrap.cc | 21 +++++++++++++++++ src/async-wrap.h | 21 +++++++++++++++++ src/base-object-inl.h | 21 +++++++++++++++++ src/base-object.h | 21 +++++++++++++++++ src/cares_wrap.cc | 21 +++++++++++++++++ src/env-inl.h | 21 +++++++++++++++++ src/env.h | 21 +++++++++++++++++ src/fs_event_wrap.cc | 21 +++++++++++++++++ src/handle_wrap.cc | 21 +++++++++++++++++ src/handle_wrap.h | 21 +++++++++++++++++ src/node.cc | 21 +++++++++++++++++ src/node.h | 21 +++++++++++++++++ src/node.stp | 21 +++++++++++++++++ src/node_buffer.cc | 21 +++++++++++++++++ src/node_buffer.h | 21 +++++++++++++++++ src/node_constants.cc | 21 +++++++++++++++++ src/node_constants.h | 21 +++++++++++++++++ src/node_contextify.cc | 21 +++++++++++++++++ src/node_counters.cc | 21 +++++++++++++++++ src/node_counters.h | 21 +++++++++++++++++ src/node_crypto.cc | 21 +++++++++++++++++ src/node_crypto.h | 21 +++++++++++++++++ src/node_crypto_bio.cc | 21 +++++++++++++++++ src/node_crypto_bio.h | 21 +++++++++++++++++ src/node_crypto_clienthello-inl.h | 21 +++++++++++++++++ src/node_crypto_clienthello.cc | 21 +++++++++++++++++ src/node_crypto_clienthello.h | 21 +++++++++++++++++ src/node_crypto_groups.h | 21 +++++++++++++++++ src/node_dtrace.cc | 21 +++++++++++++++++ src/node_dtrace.h | 21 +++++++++++++++++ src/node_file.cc | 21 +++++++++++++++++ src/node_file.h | 21 +++++++++++++++++ src/node_http_parser.cc | 21 +++++++++++++++++ src/node_http_parser.h | 21 +++++++++++++++++ src/node_i18n.cc | 21 +++++++++++++++++ src/node_i18n.h | 21 +++++++++++++++++ src/node_internals.h | 21 +++++++++++++++++ src/node_javascript.h | 21 +++++++++++++++++ src/node_main.cc | 21 +++++++++++++++++ src/node_object_wrap.h | 21 +++++++++++++++++ src/node_os.cc | 21 +++++++++++++++++ src/node_stat_watcher.cc | 21 +++++++++++++++++ src/node_stat_watcher.h | 21 +++++++++++++++++ src/node_v8.cc | 21 +++++++++++++++++ src/node_version.h | 21 +++++++++++++++++ src/node_watchdog.cc | 21 +++++++++++++++++ src/node_watchdog.h | 21 +++++++++++++++++ src/node_win32_etw_provider-inl.h | 21 +++++++++++++++++ src/node_win32_etw_provider.cc | 21 +++++++++++++++++ src/node_win32_etw_provider.h | 21 +++++++++++++++++ src/node_win32_perfctr_provider.cc | 21 +++++++++++++++++ src/node_win32_perfctr_provider.h | 21 +++++++++++++++++ src/node_wrap.h | 21 +++++++++++++++++ src/node_zlib.cc | 21 +++++++++++++++++ src/pipe_wrap.cc | 21 +++++++++++++++++ src/pipe_wrap.h | 21 +++++++++++++++++ src/process_wrap.cc | 21 +++++++++++++++++ src/res/node.rc | 21 +++++++++++++++++ src/signal_wrap.cc | 21 +++++++++++++++++ src/spawn_sync.cc | 21 +++++++++++++++++ src/spawn_sync.h | 21 +++++++++++++++++ src/stream_wrap.cc | 21 +++++++++++++++++ src/stream_wrap.h | 21 +++++++++++++++++ src/string_bytes.cc | 21 +++++++++++++++++ src/string_bytes.h | 21 +++++++++++++++++ src/tcp_wrap.cc | 21 +++++++++++++++++ src/tcp_wrap.h | 21 +++++++++++++++++ src/timer_wrap.cc | 21 +++++++++++++++++ src/tls_wrap.cc | 21 +++++++++++++++++ src/tls_wrap.h | 21 +++++++++++++++++ src/tty_wrap.cc | 21 +++++++++++++++++ src/tty_wrap.h | 21 +++++++++++++++++ src/udp_wrap.cc | 21 +++++++++++++++++ src/udp_wrap.h | 21 +++++++++++++++++ src/util-inl.h | 21 +++++++++++++++++ src/util.cc | 21 +++++++++++++++++ src/util.h | 21 +++++++++++++++++ src/uv.cc | 21 +++++++++++++++++ test/addons/repl-domain-abort/binding.cc | 21 +++++++++++++++++ test/addons/repl-domain-abort/test.js | 21 +++++++++++++++++ test/common.js | 21 +++++++++++++++++ test/debugger/helper-debugger-repl.js | 21 +++++++++++++++++ test/debugger/test-debug-break-on-uncaught.js | 21 +++++++++++++++++ test/debugger/test-debugger-client.js | 21 +++++++++++++++++ .../test-debugger-repl-break-in-module.js | 21 +++++++++++++++++ test/debugger/test-debugger-repl-restart.js | 21 +++++++++++++++++ test/debugger/test-debugger-repl-term.js | 21 +++++++++++++++++ test/debugger/test-debugger-repl-utf8.js | 21 +++++++++++++++++ test/debugger/test-debugger-repl.js | 21 +++++++++++++++++ test/disabled/test-debug-brk-file.js | 21 +++++++++++++++++ test/disabled/test-dgram-send-error.js | 21 +++++++++++++++++ test/disabled/test-fs-largefile.js | 21 +++++++++++++++++ test/disabled/test-http-abort-stream-end.js | 21 +++++++++++++++++ test/disabled/test-https-loop-to-google.js | 21 +++++++++++++++++ test/disabled/test-readline.js | 21 +++++++++++++++++ test/disabled/test-sendfd.js | 21 +++++++++++++++++ test/disabled/test-setuidgid.js | 21 +++++++++++++++++ test/disabled/tls_server.js | 21 +++++++++++++++++ test/fixtures/GH-1899-output.js | 21 +++++++++++++++++ test/fixtures/GH-892-request.js | 21 +++++++++++++++++ test/fixtures/a.js | 21 +++++++++++++++++ test/fixtures/a1.js | 21 +++++++++++++++++ test/fixtures/b/c.js | 21 +++++++++++++++++ test/fixtures/b/d.js | 21 +++++++++++++++++ test/fixtures/b/package/index.js | 21 +++++++++++++++++ test/fixtures/break-in-module/mod.js | 21 +++++++++++++++++ test/fixtures/catch-stdout-error.js | 21 +++++++++++++++++ .../child_process_should_emit_error.js | 21 +++++++++++++++++ test/fixtures/create-file.js | 21 +++++++++++++++++ test/fixtures/cycles/folder/foo.js | 21 +++++++++++++++++ test/fixtures/cycles/root.js | 21 +++++++++++++++++ test/fixtures/echo-close-check.js | 21 +++++++++++++++++ test/fixtures/echo.js | 21 +++++++++++++++++ test/fixtures/exit.js | 21 +++++++++++++++++ test/fixtures/global/plain.js | 21 +++++++++++++++++ .../module-stub/index.js | 21 +++++++++++++++++ .../one-trailing-slash/two/three.js | 21 +++++++++++++++++ .../module-stub/one/two/three.js | 21 +++++++++++++++++ test/fixtures/listen-on-socket-and-exit.js | 21 +++++++++++++++++ test/fixtures/module-load-order/file1.js | 21 +++++++++++++++++ test/fixtures/module-load-order/file2.js | 21 +++++++++++++++++ .../fixtures/module-load-order/file2/index.js | 21 +++++++++++++++++ .../fixtures/module-load-order/file3/index.js | 21 +++++++++++++++++ .../fixtures/module-load-order/file4/index.js | 21 +++++++++++++++++ .../fixtures/module-load-order/file5/index.js | 21 +++++++++++++++++ .../fixtures/module-load-order/file6/index.js | 21 +++++++++++++++++ test/fixtures/nested-index/one/hello.js | 21 +++++++++++++++++ test/fixtures/nested-index/one/index.js | 21 +++++++++++++++++ test/fixtures/nested-index/three.js | 20 ++++++++++++++++ test/fixtures/nested-index/three/index.js | 20 ++++++++++++++++ test/fixtures/nested-index/two/hello.js | 21 +++++++++++++++++ test/fixtures/nested-index/two/index.js | 21 +++++++++++++++++ test/fixtures/net-fd-passing-receiver.js | 21 +++++++++++++++++ test/fixtures/node_modules/asdf.js | 21 +++++++++++++++++ test/fixtures/node_modules/bar.js | 21 +++++++++++++++++ test/fixtures/node_modules/baz/index.js | 21 +++++++++++++++++ .../node_modules/baz/node_modules/asdf.js | 21 +++++++++++++++++ test/fixtures/node_modules/foo.js | 21 +++++++++++++++++ .../fixtures/node_modules/node_modules/bar.js | 21 +++++++++++++++++ test/fixtures/not-main-module.js | 21 +++++++++++++++++ .../main-index/package-main-module/index.js | 21 +++++++++++++++++ .../packages/main/package-main-module.js | 21 +++++++++++++++++ test/fixtures/path.js | 21 +++++++++++++++++ test/fixtures/print-10-lines.js | 21 +++++++++++++++++ test/fixtures/print-chars-from-buffer.js | 21 +++++++++++++++++ test/fixtures/print-chars.js | 21 +++++++++++++++++ test/fixtures/recvfd.js | 21 +++++++++++++++++ test/fixtures/semicolon.js | 21 +++++++++++++++++ test/fixtures/should_exit.js | 21 +++++++++++++++++ test/fixtures/stdio-filter.js | 21 +++++++++++++++++ test/fixtures/test-fs-readfile-error.js | 21 +++++++++++++++++ test/fixtures/test-init-index/index.js | 21 +++++++++++++++++ test/fixtures/test-init-native/fs.js | 21 +++++++++++++++++ test/fixtures/throws_error.js | 21 +++++++++++++++++ test/fixtures/throws_error1.js | 21 +++++++++++++++++ test/fixtures/throws_error2.js | 21 +++++++++++++++++ test/fixtures/throws_error3.js | 21 +++++++++++++++++ test/fixtures/throws_error4.js | 21 +++++++++++++++++ .../test-dgram-broadcast-multi-process.js | 21 +++++++++++++++++ .../test-dgram-multicast-multi-process.js | 21 +++++++++++++++++ test/internet/test-dns.js | 21 +++++++++++++++++ test/internet/test-http-dns-fail.js | 21 +++++++++++++++++ .../internet/test-http-https-default-ports.js | 21 +++++++++++++++++ test/internet/test-net-connect-timeout.js | 21 +++++++++++++++++ test/internet/test-net-connect-unref.js | 21 +++++++++++++++++ .../test-tls-reuse-host-from-socket.js | 21 +++++++++++++++++ test/message/2100bytes.js | 21 +++++++++++++++++ test/message/error_exit.js | 21 +++++++++++++++++ test/message/eval_messages.js | 21 +++++++++++++++++ test/message/hello_world.js | 21 +++++++++++++++++ test/message/max_tick_depth.js | 21 +++++++++++++++++ test/message/nexttick_throw.js | 21 +++++++++++++++++ test/message/stack_overflow.js | 21 +++++++++++++++++ test/message/stdin_messages.js | 21 +++++++++++++++++ test/message/throw_custom_error.js | 21 +++++++++++++++++ test/message/throw_custom_error.out | 2 +- test/message/throw_in_line_with_tabs.js | 21 +++++++++++++++++ test/message/throw_in_line_with_tabs.out | 2 +- test/message/throw_non_error.js | 21 +++++++++++++++++ test/message/throw_non_error.out | 2 +- test/message/throw_null.js | 21 +++++++++++++++++ test/message/throw_null.out | 2 +- test/message/throw_undefined.js | 21 +++++++++++++++++ test/message/throw_undefined.out | 2 +- test/message/timeout_throw.js | 21 +++++++++++++++++ .../undefined_reference_in_new_context.js | 21 +++++++++++++++++ test/message/vm_display_runtime_error.js | 21 +++++++++++++++++ test/message/vm_display_syntax_error.js | 21 +++++++++++++++++ test/message/vm_dont_display_runtime_error.js | 21 +++++++++++++++++ test/message/vm_dont_display_syntax_error.js | 21 +++++++++++++++++ test/parallel/test-assert.js | 21 +++++++++++++++++ test/parallel/test-bad-unicode.js | 21 +++++++++++++++++ test/parallel/test-beforeexit-event-exit.js | 21 +++++++++++++++++ test/parallel/test-buffer-ascii.js | 21 +++++++++++++++++ test/parallel/test-buffer-concat.js | 21 +++++++++++++++++ test/parallel/test-buffer-inspect.js | 21 +++++++++++++++++ test/parallel/test-buffer-slice.js | 21 +++++++++++++++++ test/parallel/test-c-ares.js | 21 +++++++++++++++++ test/parallel/test-child-process-buffering.js | 21 +++++++++++++++++ test/parallel/test-child-process-cwd.js | 21 +++++++++++++++++ .../test-child-process-default-options.js | 21 +++++++++++++++++ test/parallel/test-child-process-detached.js | 21 +++++++++++++++++ .../parallel/test-child-process-disconnect.js | 21 +++++++++++++++++ .../test-child-process-double-pipe.js | 21 +++++++++++++++++ test/parallel/test-child-process-env.js | 21 +++++++++++++++++ test/parallel/test-child-process-exec-cwd.js | 21 +++++++++++++++++ test/parallel/test-child-process-exec-env.js | 21 +++++++++++++++++ .../parallel/test-child-process-exec-error.js | 21 +++++++++++++++++ test/parallel/test-child-process-exit-code.js | 21 +++++++++++++++++ .../test-child-process-fork-and-spawn.js | 21 +++++++++++++++++ .../parallel/test-child-process-fork-close.js | 21 +++++++++++++++++ .../parallel/test-child-process-fork-dgram.js | 21 +++++++++++++++++ .../test-child-process-fork-exec-argv.js | 21 +++++++++++++++++ .../test-child-process-fork-exec-path.js | 21 +++++++++++++++++ test/parallel/test-child-process-fork-net.js | 21 +++++++++++++++++ test/parallel/test-child-process-fork-net2.js | 21 +++++++++++++++++ test/parallel/test-child-process-fork-ref.js | 21 +++++++++++++++++ test/parallel/test-child-process-fork-ref2.js | 21 +++++++++++++++++ test/parallel/test-child-process-fork.js | 21 +++++++++++++++++ test/parallel/test-child-process-fork3.js | 21 +++++++++++++++++ test/parallel/test-child-process-internal.js | 21 +++++++++++++++++ test/parallel/test-child-process-ipc.js | 21 +++++++++++++++++ test/parallel/test-child-process-kill.js | 21 +++++++++++++++++ .../test-child-process-recv-handle.js | 21 +++++++++++++++++ test/parallel/test-child-process-send-utf8.js | 21 +++++++++++++++++ .../test-child-process-set-blocking.js | 21 +++++++++++++++++ test/parallel/test-child-process-silent.js | 21 +++++++++++++++++ .../test-child-process-spawn-error.js | 21 +++++++++++++++++ .../test-child-process-spawn-typeerror.js | 21 +++++++++++++++++ .../test-child-process-spawnsync-env.js | 21 +++++++++++++++++ .../test-child-process-spawnsync-input.js | 21 +++++++++++++++++ .../test-child-process-spawnsync-timeout.js | 21 +++++++++++++++++ test/parallel/test-child-process-spawnsync.js | 21 +++++++++++++++++ test/parallel/test-child-process-stdin-ipc.js | 21 +++++++++++++++++ test/parallel/test-child-process-stdin.js | 21 +++++++++++++++++ .../test-child-process-stdio-big-write-end.js | 21 +++++++++++++++++ .../test-child-process-stdio-inherit.js | 21 +++++++++++++++++ test/parallel/test-child-process-stdio.js | 21 +++++++++++++++++ .../test-child-process-stdout-flush-exit.js | 21 +++++++++++++++++ .../test-child-process-stdout-flush.js | 21 +++++++++++++++++ test/parallel/test-cli-eval.js | 21 +++++++++++++++++ test/parallel/test-cluster-basic.js | 21 +++++++++++++++++ .../test-cluster-bind-privileged-port.js | 21 +++++++++++++++++ test/parallel/test-cluster-bind-twice.js | 21 +++++++++++++++++ test/parallel/test-cluster-dgram-1.js | 21 +++++++++++++++++ test/parallel/test-cluster-dgram-2.js | 21 +++++++++++++++++ .../test-cluster-disconnect-before-exit.js | 21 +++++++++++++++++ .../test-cluster-disconnect-idle-worker.js | 21 +++++++++++++++++ .../test-cluster-disconnect-unshared-tcp.js | 21 +++++++++++++++++ .../test-cluster-disconnect-unshared-udp.js | 21 +++++++++++++++++ ...test-cluster-disconnect-with-no-workers.js | 21 +++++++++++++++++ test/parallel/test-cluster-disconnect.js | 21 +++++++++++++++++ test/parallel/test-cluster-eaccess.js | 21 +++++++++++++++++ test/parallel/test-cluster-eaddrinuse.js | 21 +++++++++++++++++ test/parallel/test-cluster-fork-env.js | 21 +++++++++++++++++ test/parallel/test-cluster-http-pipe.js | 21 +++++++++++++++++ test/parallel/test-cluster-master-error.js | 21 +++++++++++++++++ test/parallel/test-cluster-master-kill.js | 21 +++++++++++++++++ test/parallel/test-cluster-message.js | 21 +++++++++++++++++ test/parallel/test-cluster-net-listen.js | 21 +++++++++++++++++ test/parallel/test-cluster-net-send.js | 21 +++++++++++++++++ .../parallel/test-cluster-rr-domain-listen.js | 21 +++++++++++++++++ test/parallel/test-cluster-send-deadlock.js | 21 +++++++++++++++++ .../test-cluster-send-handle-twice.js | 21 +++++++++++++++++ .../test-cluster-setup-master-argv.js | 21 +++++++++++++++++ .../test-cluster-setup-master-cumulative.js | 21 +++++++++++++++++ .../test-cluster-setup-master-emit.js | 21 +++++++++++++++++ .../test-cluster-setup-master-multiple.js | 21 +++++++++++++++++ test/parallel/test-cluster-setup-master.js | 21 +++++++++++++++++ .../test-cluster-shared-handle-bind-error.js | 21 +++++++++++++++++ ...ster-shared-handle-bind-privileged-port.js | 21 +++++++++++++++++ .../test-cluster-uncaught-exception.js | 21 +++++++++++++++++ .../test-cluster-worker-constructor.js | 21 +++++++++++++++++ test/parallel/test-cluster-worker-death.js | 21 +++++++++++++++++ test/parallel/test-cluster-worker-destroy.js | 21 +++++++++++++++++ .../test-cluster-worker-disconnect.js | 21 +++++++++++++++++ test/parallel/test-cluster-worker-events.js | 21 +++++++++++++++++ test/parallel/test-cluster-worker-exit.js | 21 +++++++++++++++++ .../test-cluster-worker-forced-exit.js | 21 +++++++++++++++++ test/parallel/test-cluster-worker-init.js | 21 +++++++++++++++++ test/parallel/test-cluster-worker-kill.js | 21 +++++++++++++++++ test/parallel/test-cluster-worker-no-exit.js | 21 +++++++++++++++++ test/parallel/test-common.js | 21 +++++++++++++++++ test/parallel/test-console-instance.js | 21 +++++++++++++++++ .../test-console-not-call-toString.js | 21 +++++++++++++++++ test/parallel/test-console.js | 21 +++++++++++++++++ test/parallel/test-crypto-authenticated.js | 21 +++++++++++++++++ test/parallel/test-crypto-binary-default.js | 21 +++++++++++++++++ test/parallel/test-crypto-certificate.js | 21 +++++++++++++++++ test/parallel/test-crypto-dh-odd-key.js | 21 +++++++++++++++++ test/parallel/test-crypto-domain.js | 21 +++++++++++++++++ test/parallel/test-crypto-domains.js | 21 +++++++++++++++++ test/parallel/test-crypto-ecb.js | 21 +++++++++++++++++ test/parallel/test-crypto-from-binary.js | 21 +++++++++++++++++ test/parallel/test-crypto-hash-stream-pipe.js | 21 +++++++++++++++++ test/parallel/test-crypto-padding-aes256.js | 21 +++++++++++++++++ test/parallel/test-crypto-padding.js | 21 +++++++++++++++++ test/parallel/test-crypto-random.js | 21 +++++++++++++++++ test/parallel/test-crypto-stream.js | 21 +++++++++++++++++ test/parallel/test-crypto-verify-failure.js | 21 +++++++++++++++++ test/parallel/test-crypto.js | 21 +++++++++++++++++ test/parallel/test-debug-port-cluster.js | 21 +++++++++++++++++ test/parallel/test-debug-signal-cluster.js | 21 +++++++++++++++++ test/parallel/test-delayed-require.js | 21 +++++++++++++++++ test/parallel/test-dgram-address.js | 21 +++++++++++++++++ .../test-dgram-bind-default-address.js | 21 +++++++++++++++++ test/parallel/test-dgram-bind-shared-ports.js | 21 +++++++++++++++++ test/parallel/test-dgram-bind.js | 21 +++++++++++++++++ test/parallel/test-dgram-bytes-length.js | 21 +++++++++++++++++ test/parallel/test-dgram-close.js | 21 +++++++++++++++++ .../test-dgram-error-message-address.js | 21 +++++++++++++++++ test/parallel/test-dgram-implicit-bind.js | 21 +++++++++++++++++ test/parallel/test-dgram-listen-after-bind.js | 21 +++++++++++++++++ test/parallel/test-dgram-msgsize.js | 21 +++++++++++++++++ test/parallel/test-dgram-multicast-setTTL.js | 21 +++++++++++++++++ test/parallel/test-dgram-oob-buffer.js | 21 +++++++++++++++++ test/parallel/test-dgram-ref.js | 21 +++++++++++++++++ test/parallel/test-dgram-regress-4496.js | 21 +++++++++++++++++ .../parallel/test-dgram-send-bad-arguments.js | 21 +++++++++++++++++ .../test-dgram-send-callback-buffer-length.js | 21 +++++++++++++++++ test/parallel/test-dgram-send-empty-buffer.js | 21 +++++++++++++++++ test/parallel/test-dgram-udp4.js | 21 +++++++++++++++++ test/parallel/test-dgram-unref.js | 21 +++++++++++++++++ test/parallel/test-dh-padding.js | 21 +++++++++++++++++ test/parallel/test-dns-regress-6244.js | 21 +++++++++++++++++ test/parallel/test-dns-regress-7070.js | 21 +++++++++++++++++ test/parallel/test-dns.js | 21 +++++++++++++++++ test/parallel/test-domain-crypto.js | 21 +++++++++++++++++ test/parallel/test-domain-enter-exit.js | 21 +++++++++++++++++ .../test-domain-exit-dispose-again.js | 21 +++++++++++++++++ test/parallel/test-domain-exit-dispose.js | 21 +++++++++++++++++ test/parallel/test-domain-from-timer.js | 21 +++++++++++++++++ test/parallel/test-domain-http-server.js | 21 +++++++++++++++++ test/parallel/test-domain-implicit-fs.js | 21 +++++++++++++++++ test/parallel/test-domain-multi.js | 21 +++++++++++++++++ test/parallel/test-domain-nested-throw.js | 21 +++++++++++++++++ test/parallel/test-domain-nested.js | 21 +++++++++++++++++ test/parallel/test-domain-safe-exit.js | 21 +++++++++++++++++ test/parallel/test-domain-stack.js | 21 +++++++++++++++++ test/parallel/test-domain-timers.js | 21 +++++++++++++++++ test/parallel/test-domain.js | 21 +++++++++++++++++ test/parallel/test-error-reporting.js | 21 +++++++++++++++++ test/parallel/test-eval-require.js | 21 +++++++++++++++++ test/parallel/test-eval.js | 21 +++++++++++++++++ .../test-event-emitter-add-listeners.js | 21 +++++++++++++++++ ...test-event-emitter-check-listener-leaks.js | 21 +++++++++++++++++ ...st-event-emitter-listeners-side-effects.js | 21 +++++++++++++++++ test/parallel/test-event-emitter-listeners.js | 21 +++++++++++++++++ .../test-event-emitter-max-listeners.js | 21 +++++++++++++++++ .../test-event-emitter-method-names.js | 21 +++++++++++++++++ .../test-event-emitter-modify-in-emit.js | 21 +++++++++++++++++ ...mitter-no-error-provided-to-error-event.js | 21 +++++++++++++++++ test/parallel/test-event-emitter-num-args.js | 21 +++++++++++++++++ test/parallel/test-event-emitter-once.js | 21 +++++++++++++++++ ...test-event-emitter-remove-all-listeners.js | 21 +++++++++++++++++ .../test-event-emitter-remove-listeners.js | 21 +++++++++++++++++ ...-emitter-set-max-listeners-side-effects.js | 21 +++++++++++++++++ test/parallel/test-event-emitter-subclass.js | 21 +++++++++++++++++ test/parallel/test-exception-handler.js | 21 +++++++++++++++++ test/parallel/test-exception-handler2.js | 21 +++++++++++++++++ test/parallel/test-file-read-noexist.js | 21 +++++++++++++++++ test/parallel/test-file-write-stream.js | 21 +++++++++++++++++ test/parallel/test-file-write-stream2.js | 21 +++++++++++++++++ test/parallel/test-file-write-stream3.js | 21 +++++++++++++++++ test/parallel/test-fs-append-file-sync.js | 21 +++++++++++++++++ test/parallel/test-fs-append-file.js | 21 +++++++++++++++++ test/parallel/test-fs-chmod.js | 21 +++++++++++++++++ test/parallel/test-fs-empty-readStream.js | 21 +++++++++++++++++ test/parallel/test-fs-error-messages.js | 21 +++++++++++++++++ test/parallel/test-fs-exists.js | 21 +++++++++++++++++ test/parallel/test-fs-fsync.js | 21 +++++++++++++++++ test/parallel/test-fs-long-path.js | 21 +++++++++++++++++ test/parallel/test-fs-mkdir.js | 21 +++++++++++++++++ test/parallel/test-fs-null-bytes.js | 21 +++++++++++++++++ test/parallel/test-fs-open-flags.js | 21 +++++++++++++++++ test/parallel/test-fs-open.js | 21 +++++++++++++++++ .../test-fs-read-file-sync-hostname.js | 21 +++++++++++++++++ test/parallel/test-fs-read-file-sync.js | 21 +++++++++++++++++ test/parallel/test-fs-read-stream-err.js | 21 +++++++++++++++++ test/parallel/test-fs-read-stream-fd.js | 21 +++++++++++++++++ test/parallel/test-fs-read-stream-resume.js | 21 +++++++++++++++++ test/parallel/test-fs-read-stream.js | 21 +++++++++++++++++ test/parallel/test-fs-read.js | 21 +++++++++++++++++ test/parallel/test-fs-readfile-empty.js | 21 +++++++++++++++++ test/parallel/test-fs-readfile-error.js | 21 +++++++++++++++++ test/parallel/test-fs-readfile-pipe.js | 21 +++++++++++++++++ test/parallel/test-fs-readfile-unlink.js | 21 +++++++++++++++++ .../test-fs-readfile-zero-byte-liar.js | 21 +++++++++++++++++ test/parallel/test-fs-realpath.js | 21 +++++++++++++++++ test/parallel/test-fs-sir-writes-alot.js | 21 +++++++++++++++++ test/parallel/test-fs-stat.js | 21 +++++++++++++++++ test/parallel/test-fs-stream-double-close.js | 21 +++++++++++++++++ .../test-fs-symlink-dir-junction-relative.js | 21 +++++++++++++++++ test/parallel/test-fs-symlink-dir-junction.js | 21 +++++++++++++++++ test/parallel/test-fs-symlink.js | 21 +++++++++++++++++ test/parallel/test-fs-sync-fd-leak.js | 21 +++++++++++++++++ test/parallel/test-fs-truncate-GH-6233.js | 21 +++++++++++++++++ test/parallel/test-fs-truncate.js | 21 +++++++++++++++++ test/parallel/test-fs-utimes.js | 21 +++++++++++++++++ test/parallel/test-fs-write-buffer.js | 21 +++++++++++++++++ test/parallel/test-fs-write-file-buffer.js | 21 +++++++++++++++++ test/parallel/test-fs-write-file-sync.js | 21 +++++++++++++++++ test/parallel/test-fs-write-file.js | 21 +++++++++++++++++ .../test-fs-write-stream-change-open.js | 21 +++++++++++++++++ test/parallel/test-fs-write-stream-end.js | 21 +++++++++++++++++ test/parallel/test-fs-write-stream-err.js | 21 +++++++++++++++++ test/parallel/test-fs-write-stream.js | 21 +++++++++++++++++ test/parallel/test-fs-write-sync.js | 21 +++++++++++++++++ test/parallel/test-fs-write.js | 21 +++++++++++++++++ test/parallel/test-global.js | 21 +++++++++++++++++ test/parallel/test-handle-wrap-close-abort.js | 21 +++++++++++++++++ test/parallel/test-http-1.0-keep-alive.js | 21 +++++++++++++++++ test/parallel/test-http-1.0.js | 21 +++++++++++++++++ test/parallel/test-http-abort-before-end.js | 21 +++++++++++++++++ test/parallel/test-http-abort-client.js | 21 +++++++++++++++++ test/parallel/test-http-abort-queued.js | 21 +++++++++++++++++ test/parallel/test-http-after-connect.js | 21 +++++++++++++++++ .../test-http-agent-destroyed-socket.js | 21 +++++++++++++++++ test/parallel/test-http-agent-false.js | 21 +++++++++++++++++ test/parallel/test-http-agent-keepalive.js | 21 +++++++++++++++++ test/parallel/test-http-agent-no-protocol.js | 21 +++++++++++++++++ test/parallel/test-http-agent-null.js | 21 +++++++++++++++++ test/parallel/test-http-agent.js | 21 +++++++++++++++++ .../test-http-allow-req-after-204-res.js | 21 +++++++++++++++++ test/parallel/test-http-bind-twice.js | 21 +++++++++++++++++ test/parallel/test-http-blank-header.js | 21 +++++++++++++++++ test/parallel/test-http-buffer-sanity.js | 21 +++++++++++++++++ test/parallel/test-http-byteswritten.js | 21 +++++++++++++++++ test/parallel/test-http-chunked-304.js | 21 +++++++++++++++++ test/parallel/test-http-chunked.js | 21 +++++++++++++++++ test/parallel/test-http-client-abort.js | 21 +++++++++++++++++ test/parallel/test-http-client-abort2.js | 21 +++++++++++++++++ test/parallel/test-http-client-agent.js | 21 +++++++++++++++++ .../test-http-client-default-headers-exist.js | 21 +++++++++++++++++ test/parallel/test-http-client-encoding.js | 21 +++++++++++++++++ test/parallel/test-http-client-get-url.js | 21 +++++++++++++++++ test/parallel/test-http-client-parse-error.js | 21 +++++++++++++++++ test/parallel/test-http-client-pipe-end.js | 21 +++++++++++++++++ test/parallel/test-http-client-race-2.js | 21 +++++++++++++++++ test/parallel/test-http-client-race.js | 21 +++++++++++++++++ test/parallel/test-http-client-readable.js | 21 +++++++++++++++++ .../test-http-client-response-domain.js | 21 +++++++++++++++++ .../test-http-client-timeout-agent.js | 21 +++++++++++++++++ .../test-http-client-timeout-event.js | 21 +++++++++++++++++ .../test-http-client-timeout-with-data.js | 21 +++++++++++++++++ test/parallel/test-http-client-timeout.js | 21 +++++++++++++++++ .../test-http-client-unescaped-path.js | 21 +++++++++++++++++ test/parallel/test-http-client-upload-buf.js | 21 +++++++++++++++++ test/parallel/test-http-client-upload.js | 21 +++++++++++++++++ test/parallel/test-http-conn-reset.js | 21 +++++++++++++++++ test/parallel/test-http-connect.js | 21 +++++++++++++++++ test/parallel/test-http-contentLength0.js | 21 +++++++++++++++++ test/parallel/test-http-createConnection.js | 21 +++++++++++++++++ test/parallel/test-http-date-header.js | 21 +++++++++++++++++ test/parallel/test-http-default-encoding.js | 21 +++++++++++++++++ test/parallel/test-http-default-port.js | 21 +++++++++++++++++ .../test-http-destroyed-socket-write2.js | 21 +++++++++++++++++ test/parallel/test-http-dns-error.js | 21 +++++++++++++++++ .../test-http-end-throw-socket-handling.js | 21 +++++++++++++++++ test/parallel/test-http-eof-on-connect.js | 21 +++++++++++++++++ test/parallel/test-http-exceptions.js | 21 +++++++++++++++++ test/parallel/test-http-expect-continue.js | 21 +++++++++++++++++ test/parallel/test-http-extra-response.js | 21 +++++++++++++++++ test/parallel/test-http-flush.js | 21 +++++++++++++++++ test/parallel/test-http-full-response.js | 21 +++++++++++++++++ .../test-http-get-pipeline-problem.js | 21 +++++++++++++++++ test/parallel/test-http-head-request.js | 21 +++++++++++++++++ ...test-http-head-response-has-no-body-end.js | 21 +++++++++++++++++ .../test-http-head-response-has-no-body.js | 21 +++++++++++++++++ test/parallel/test-http-header-read.js | 21 +++++++++++++++++ test/parallel/test-http-hex-write.js | 21 +++++++++++++++++ test/parallel/test-http-host-headers.js | 21 +++++++++++++++++ ...-http-incoming-pipelined-socket-destroy.js | 21 +++++++++++++++++ .../test-http-keep-alive-close-on-header.js | 21 +++++++++++++++++ test/parallel/test-http-keep-alive.js | 21 +++++++++++++++++ test/parallel/test-http-keepalive-client.js | 21 +++++++++++++++++ .../test-http-keepalive-maxsockets.js | 21 +++++++++++++++++ test/parallel/test-http-keepalive-request.js | 21 +++++++++++++++++ .../test-http-localaddress-bind-error.js | 21 +++++++++++++++++ test/parallel/test-http-localaddress.js | 21 +++++++++++++++++ test/parallel/test-http-malformed-request.js | 21 +++++++++++++++++ .../test-http-many-ended-pipelines.js | 21 +++++++++++++++++ test/parallel/test-http-max-headers-count.js | 21 +++++++++++++++++ test/parallel/test-http-methods.js | 21 +++++++++++++++++ test/parallel/test-http-multi-line-headers.js | 21 +++++++++++++++++ test/parallel/test-http-mutable-headers.js | 21 +++++++++++++++++ test/parallel/test-http-no-content-length.js | 21 +++++++++++++++++ test/parallel/test-http-outgoing-finish.js | 21 +++++++++++++++++ test/parallel/test-http-parser-free.js | 21 +++++++++++++++++ test/parallel/test-http-parser.js | 21 +++++++++++++++++ .../test-http-pause-resume-one-end.js | 21 +++++++++++++++++ test/parallel/test-http-pause.js | 21 +++++++++++++++++ test/parallel/test-http-pipe-fs.js | 21 +++++++++++++++++ test/parallel/test-http-proxy.js | 21 +++++++++++++++++ test/parallel/test-http-raw-headers.js | 21 +++++++++++++++++ .../test-http-remove-header-stays-removed.js | 21 +++++++++++++++++ test/parallel/test-http-request-end-twice.js | 21 +++++++++++++++++ test/parallel/test-http-request-end.js | 21 +++++++++++++++++ test/parallel/test-http-request-methods.js | 21 +++++++++++++++++ .../parallel/test-http-res-write-after-end.js | 21 +++++++++++++++++ ...test-http-res-write-end-dont-take-array.js | 21 +++++++++++++++++ test/parallel/test-http-response-close.js | 21 +++++++++++++++++ .../parallel/test-http-response-no-headers.js | 21 +++++++++++++++++ test/parallel/test-http-response-readable.js | 21 +++++++++++++++++ .../test-http-response-status-message.js | 21 +++++++++++++++++ .../parallel/test-http-server-multiheaders.js | 21 +++++++++++++++++ .../test-http-server-multiheaders2.js | 21 +++++++++++++++++ test/parallel/test-http-server-stale-close.js | 21 +++++++++++++++++ test/parallel/test-http-server.js | 21 +++++++++++++++++ test/parallel/test-http-set-cookies.js | 21 +++++++++++++++++ test/parallel/test-http-set-timeout-server.js | 21 +++++++++++++++++ test/parallel/test-http-set-timeout.js | 21 +++++++++++++++++ test/parallel/test-http-set-trailers.js | 21 +++++++++++++++++ test/parallel/test-http-should-keep-alive.js | 21 +++++++++++++++++ test/parallel/test-http-status-code.js | 21 +++++++++++++++++ test/parallel/test-http-status-message.js | 21 +++++++++++++++++ test/parallel/test-http-timeout-overflow.js | 21 +++++++++++++++++ test/parallel/test-http-timeout.js | 21 +++++++++++++++++ test/parallel/test-http-unix-socket.js | 21 +++++++++++++++++ test/parallel/test-http-upgrade-agent.js | 21 +++++++++++++++++ test/parallel/test-http-upgrade-client.js | 21 +++++++++++++++++ test/parallel/test-http-upgrade-client2.js | 21 +++++++++++++++++ test/parallel/test-http-upgrade-server.js | 21 +++++++++++++++++ test/parallel/test-http-upgrade-server2.js | 21 +++++++++++++++++ ...p-url.parse-auth-with-header-in-request.js | 21 +++++++++++++++++ test/parallel/test-http-url.parse-auth.js | 21 +++++++++++++++++ test/parallel/test-http-url.parse-basic.js | 21 +++++++++++++++++ .../test-http-url.parse-https.request.js | 21 +++++++++++++++++ ....parse-only-support-http-https-protocol.js | 21 +++++++++++++++++ test/parallel/test-http-url.parse-path.js | 21 +++++++++++++++++ test/parallel/test-http-url.parse-post.js | 21 +++++++++++++++++ test/parallel/test-http-url.parse-search.js | 21 +++++++++++++++++ test/parallel/test-http-wget.js | 21 +++++++++++++++++ test/parallel/test-http-write-callbacks.js | 21 +++++++++++++++++ test/parallel/test-http-write-empty-string.js | 21 +++++++++++++++++ test/parallel/test-http-write-head.js | 21 +++++++++++++++++ test/parallel/test-http-zero-length-write.js | 21 +++++++++++++++++ test/parallel/test-http.js | 21 +++++++++++++++++ test/parallel/test-https-agent.js | 21 +++++++++++++++++ test/parallel/test-https-byteswritten.js | 21 +++++++++++++++++ .../test-https-client-checkServerIdentity.js | 21 +++++++++++++++++ test/parallel/test-https-client-get-url.js | 21 +++++++++++++++++ test/parallel/test-https-client-reject.js | 21 +++++++++++++++++ test/parallel/test-https-client-resume.js | 21 +++++++++++++++++ .../parallel/test-https-connecting-to-http.js | 21 +++++++++++++++++ test/parallel/test-https-drain.js | 21 +++++++++++++++++ test/parallel/test-https-eof-for-eom.js | 21 +++++++++++++++++ test/parallel/test-https-foafssl.js | 21 +++++++++++++++++ .../test-https-localaddress-bind-error.js | 21 +++++++++++++++++ test/parallel/test-https-localaddress.js | 21 +++++++++++++++++ test/parallel/test-https-pfx.js | 21 +++++++++++++++++ test/parallel/test-https-req-split.js | 21 +++++++++++++++++ .../parallel/test-https-set-timeout-server.js | 21 +++++++++++++++++ test/parallel/test-https-simple.js | 21 +++++++++++++++++ test/parallel/test-https-socket-options.js | 21 +++++++++++++++++ test/parallel/test-https-strict.js | 21 +++++++++++++++++ test/parallel/test-https-timeout-server-2.js | 21 +++++++++++++++++ test/parallel/test-https-timeout-server.js | 21 +++++++++++++++++ test/parallel/test-https-timeout.js | 21 +++++++++++++++++ test/parallel/test-https-truncate.js | 21 +++++++++++++++++ test/parallel/test-intl.js | 21 +++++++++++++++++ test/parallel/test-listen-fd-cluster.js | 21 +++++++++++++++++ .../test-listen-fd-detached-inherit.js | 21 +++++++++++++++++ test/parallel/test-listen-fd-detached.js | 21 +++++++++++++++++ test/parallel/test-listen-fd-ebadf.js | 21 +++++++++++++++++ test/parallel/test-listen-fd-server.js | 21 +++++++++++++++++ test/parallel/test-memory-usage.js | 21 +++++++++++++++++ ...test-microtask-queue-integration-domain.js | 21 +++++++++++++++++ .../test-microtask-queue-integration.js | 21 +++++++++++++++++ .../test-microtask-queue-run-domain.js | 21 +++++++++++++++++ ...st-microtask-queue-run-immediate-domain.js | 21 +++++++++++++++++ .../test-microtask-queue-run-immediate.js | 21 +++++++++++++++++ test/parallel/test-microtask-queue-run.js | 21 +++++++++++++++++ .../test-module-globalpaths-nodepath.js | 21 +++++++++++++++++ test/parallel/test-module-loading-error.js | 21 +++++++++++++++++ test/parallel/test-module-nodemodulepaths.js | 21 +++++++++++++++++ test/parallel/test-net-after-close.js | 21 +++++++++++++++++ test/parallel/test-net-binary.js | 21 +++++++++++++++++ test/parallel/test-net-bind-twice.js | 21 +++++++++++++++++ test/parallel/test-net-buffersize.js | 21 +++++++++++++++++ test/parallel/test-net-bytes-stats.js | 21 +++++++++++++++++ test/parallel/test-net-can-reset-timeout.js | 21 +++++++++++++++++ test/parallel/test-net-connect-buffer.js | 21 +++++++++++++++++ .../test-net-connect-handle-econnrefused.js | 21 +++++++++++++++++ .../test-net-connect-immediate-finish.js | 21 +++++++++++++++++ .../parallel/test-net-connect-options-ipv6.js | 21 +++++++++++++++++ test/parallel/test-net-connect-options.js | 21 +++++++++++++++++ .../test-net-connect-paused-connection.js | 21 +++++++++++++++++ test/parallel/test-net-create-connection.js | 21 +++++++++++++++++ test/parallel/test-net-dns-error.js | 21 +++++++++++++++++ test/parallel/test-net-dns-lookup.js | 21 +++++++++++++++++ test/parallel/test-net-during-close.js | 21 +++++++++++++++++ test/parallel/test-net-eaddrinuse.js | 21 +++++++++++++++++ test/parallel/test-net-end-without-connect.js | 21 +++++++++++++++++ test/parallel/test-net-error-twice.js | 21 +++++++++++++++++ test/parallel/test-net-isip.js | 21 +++++++++++++++++ test/parallel/test-net-keepalive.js | 21 +++++++++++++++++ test/parallel/test-net-large-string.js | 21 +++++++++++++++++ test/parallel/test-net-listen-close-server.js | 21 +++++++++++++++++ test/parallel/test-net-listen-error.js | 21 +++++++++++++++++ test/parallel/test-net-listen-fd0.js | 21 +++++++++++++++++ test/parallel/test-net-listen-shared-ports.js | 21 +++++++++++++++++ test/parallel/test-net-local-address-port.js | 21 +++++++++++++++++ test/parallel/test-net-localerror.js | 21 +++++++++++++++++ .../test-net-pause-resume-connecting.js | 21 +++++++++++++++++ test/parallel/test-net-pingpong.js | 21 +++++++++++++++++ test/parallel/test-net-pipe-connect-errors.js | 21 +++++++++++++++++ test/parallel/test-net-reconnect-error.js | 21 +++++++++++++++++ test/parallel/test-net-reconnect.js | 21 +++++++++++++++++ test/parallel/test-net-remote-address-port.js | 21 +++++++++++++++++ test/parallel/test-net-server-close.js | 21 +++++++++++++++++ test/parallel/test-net-server-connections.js | 21 +++++++++++++++++ .../test-net-server-listen-remove-callback.js | 21 +++++++++++++++++ .../test-net-server-max-connections.js | 21 +++++++++++++++++ .../test-net-server-pause-on-connect.js | 21 +++++++++++++++++ test/parallel/test-net-server-try-ports.js | 21 +++++++++++++++++ test/parallel/test-net-server-unref.js | 21 +++++++++++++++++ test/parallel/test-net-settimeout.js | 21 +++++++++++++++++ .../parallel/test-net-socket-destroy-twice.js | 21 +++++++++++++++++ .../parallel/test-net-socket-timeout-unref.js | 21 +++++++++++++++++ test/parallel/test-net-socket-timeout.js | 21 +++++++++++++++++ test/parallel/test-net-stream.js | 21 +++++++++++++++++ test/parallel/test-net-write-after-close.js | 21 +++++++++++++++++ test/parallel/test-net-write-connect-write.js | 21 +++++++++++++++++ test/parallel/test-net-write-slow.js | 21 +++++++++++++++++ test/parallel/test-next-tick-doesnt-hang.js | 21 +++++++++++++++++ test/parallel/test-next-tick-domain.js | 21 +++++++++++++++++ test/parallel/test-next-tick-errors.js | 21 +++++++++++++++++ .../test-next-tick-intentional-starvation.js | 21 +++++++++++++++++ test/parallel/test-next-tick-ordering.js | 21 +++++++++++++++++ test/parallel/test-next-tick-ordering2.js | 21 +++++++++++++++++ test/parallel/test-next-tick.js | 21 +++++++++++++++++ test/parallel/test-os.js | 21 +++++++++++++++++ test/parallel/test-path-makelong.js | 21 +++++++++++++++++ test/parallel/test-path-parse-format.js | 21 +++++++++++++++++ test/parallel/test-path.js | 21 +++++++++++++++++ test/parallel/test-pipe-file-to-http.js | 21 +++++++++++++++++ test/parallel/test-pipe-return-val.js | 21 +++++++++++++++++ test/parallel/test-process-argv-0.js | 21 +++++++++++++++++ test/parallel/test-process-beforeexit.js | 21 +++++++++++++++++ test/parallel/test-process-config.js | 21 +++++++++++++++++ test/parallel/test-process-env.js | 21 +++++++++++++++++ test/parallel/test-process-exec-argv.js | 21 +++++++++++++++++ test/parallel/test-process-exit-code.js | 21 +++++++++++++++++ .../test-process-exit-from-before-exit.js | 21 +++++++++++++++++ test/parallel/test-process-exit-recursive.js | 21 +++++++++++++++++ test/parallel/test-process-exit.js | 21 +++++++++++++++++ test/parallel/test-process-getgroups.js | 21 +++++++++++++++++ test/parallel/test-process-hrtime.js | 21 +++++++++++++++++ test/parallel/test-process-kill-null.js | 21 +++++++++++++++++ test/parallel/test-process-kill-pid.js | 21 +++++++++++++++++ test/parallel/test-process-next-tick.js | 21 +++++++++++++++++ test/parallel/test-process-raw-debug.js | 21 +++++++++++++++++ test/parallel/test-process-wrap.js | 21 +++++++++++++++++ test/parallel/test-punycode.js | 21 +++++++++++++++++ test/parallel/test-querystring.js | 21 +++++++++++++++++ test/parallel/test-readdouble.js | 21 +++++++++++++++++ test/parallel/test-readfloat.js | 21 +++++++++++++++++ test/parallel/test-readint.js | 21 +++++++++++++++++ test/parallel/test-readline-interface.js | 21 +++++++++++++++++ test/parallel/test-readline-set-raw-mode.js | 21 +++++++++++++++++ test/parallel/test-readuint.js | 21 +++++++++++++++++ test/parallel/test-regress-GH-4256.js | 21 +++++++++++++++++ test/parallel/test-regress-GH-5927.js | 21 +++++++++++++++++ test/parallel/test-regress-GH-6235.js | 21 +++++++++++++++++ test/parallel/test-regress-GH-7511.js | 21 +++++++++++++++++ .../test-regression-object-prototype.js | 21 +++++++++++++++++ test/parallel/test-repl-.save.load.js | 21 +++++++++++++++++ test/parallel/test-repl-autolibs.js | 21 +++++++++++++++++ test/parallel/test-repl-console.js | 21 +++++++++++++++++ test/parallel/test-repl-domain.js | 21 +++++++++++++++++ test/parallel/test-repl-end-emits-exit.js | 21 +++++++++++++++++ test/parallel/test-repl-harmony.js | 21 +++++++++++++++++ test/parallel/test-repl-options.js | 21 +++++++++++++++++ test/parallel/test-repl-require-cache.js | 21 +++++++++++++++++ test/parallel/test-repl-reset-event.js | 21 +++++++++++++++++ test/parallel/test-repl-setprompt.js | 21 +++++++++++++++++ .../test-repl-syntax-error-handling.js | 21 +++++++++++++++++ test/parallel/test-repl-tab-complete.js | 21 +++++++++++++++++ test/parallel/test-repl.js | 23 ++++++++++++++++++- test/parallel/test-require-cache.js | 21 +++++++++++++++++ test/parallel/test-require-exceptions.js | 21 +++++++++++++++++ ...ons-same-filename-as-dir-trailing-slash.js | 21 +++++++++++++++++ ...require-extensions-same-filename-as-dir.js | 21 +++++++++++++++++ test/parallel/test-require-json.js | 21 +++++++++++++++++ test/parallel/test-require-resolve.js | 21 +++++++++++++++++ test/parallel/test-signal-handler.js | 21 +++++++++++++++++ test/parallel/test-stdin-hang.js | 21 +++++++++++++++++ test/parallel/test-stdin-pause-resume-sync.js | 21 +++++++++++++++++ test/parallel/test-stdin-pause-resume.js | 21 +++++++++++++++++ test/parallel/test-stdin-resume-pause.js | 21 +++++++++++++++++ test/parallel/test-stdio-readable-writable.js | 21 +++++++++++++++++ test/parallel/test-stdout-close-unref.js | 21 +++++++++++++++++ test/parallel/test-stream-big-packet.js | 21 +++++++++++++++++ test/parallel/test-stream-big-push.js | 21 +++++++++++++++++ test/parallel/test-stream-duplex.js | 21 +++++++++++++++++ test/parallel/test-stream-end-paused.js | 21 +++++++++++++++++ test/parallel/test-stream-ispaused.js | 21 +++++++++++++++++ test/parallel/test-stream-pipe-after-end.js | 21 +++++++++++++++++ test/parallel/test-stream-pipe-cleanup.js | 21 +++++++++++++++++ .../test-stream-pipe-error-handling.js | 21 +++++++++++++++++ test/parallel/test-stream-pipe-event.js | 21 +++++++++++++++++ test/parallel/test-stream-push-order.js | 21 +++++++++++++++++ test/parallel/test-stream-push-strings.js | 21 +++++++++++++++++ test/parallel/test-stream-readable-event.js | 21 +++++++++++++++++ .../test-stream-readable-flow-recursion.js | 21 +++++++++++++++++ ...tream-transform-objectmode-falsey-value.js | 21 +++++++++++++++++ .../test-stream-transform-split-objectmode.js | 21 +++++++++++++++++ .../test-stream-unshift-empty-chunk.js | 21 +++++++++++++++++ .../parallel/test-stream-unshift-read-race.js | 21 +++++++++++++++++ ...stream-writable-change-default-encoding.js | 21 +++++++++++++++++ .../test-stream-writable-decoded-encoding.js | 21 +++++++++++++++++ test/parallel/test-stream-writev.js | 21 +++++++++++++++++ ...est-stream2-base64-single-char-read-end.js | 21 +++++++++++++++++ test/parallel/test-stream2-compatibility.js | 21 +++++++++++++++++ test/parallel/test-stream2-finish-pipe.js | 21 +++++++++++++++++ .../parallel/test-stream2-large-read-stall.js | 21 +++++++++++++++++ test/parallel/test-stream2-objects.js | 21 +++++++++++++++++ .../test-stream2-pipe-error-handling.js | 21 +++++++++++++++++ .../test-stream2-pipe-error-once-listener.js | 21 +++++++++++++++++ test/parallel/test-stream2-push.js | 21 +++++++++++++++++ test/parallel/test-stream2-read-sync-stack.js | 21 +++++++++++++++++ ...st-stream2-readable-empty-buffer-no-eof.js | 21 +++++++++++++++++ .../test-stream2-readable-from-list.js | 21 +++++++++++++++++ .../test-stream2-readable-legacy-drain.js | 21 +++++++++++++++++ .../test-stream2-readable-non-empty-end.js | 21 +++++++++++++++++ .../test-stream2-readable-wrap-empty.js | 21 +++++++++++++++++ test/parallel/test-stream2-readable-wrap.js | 21 +++++++++++++++++ test/parallel/test-stream2-set-encoding.js | 21 +++++++++++++++++ test/parallel/test-stream2-transform.js | 21 +++++++++++++++++ test/parallel/test-stream2-unpipe-drain.js | 21 +++++++++++++++++ test/parallel/test-stream2-unpipe-leak.js | 21 +++++++++++++++++ test/parallel/test-stream2-writable.js | 21 +++++++++++++++++ test/parallel/test-stream3-pause-then-read.js | 21 +++++++++++++++++ test/parallel/test-string-decoder-end.js | 21 +++++++++++++++++ test/parallel/test-string-decoder.js | 21 +++++++++++++++++ test/parallel/test-stringbytes-external.js | 21 +++++++++++++++++ test/parallel/test-sys.js | 21 +++++++++++++++++ test/parallel/test-tcp-wrap.js | 21 +++++++++++++++++ test/parallel/test-timers-immediate-queue.js | 21 +++++++++++++++++ test/parallel/test-timers-immediate.js | 21 +++++++++++++++++ test/parallel/test-timers-linked-list.js | 21 +++++++++++++++++ .../parallel/test-timers-non-integer-delay.js | 21 +++++++++++++++++ test/parallel/test-timers-ordering.js | 21 +++++++++++++++++ test/parallel/test-timers-this.js | 21 +++++++++++++++++ .../test-timers-uncaught-exception.js | 21 +++++++++++++++++ test/parallel/test-timers-unref.js | 21 +++++++++++++++++ test/parallel/test-timers-zero-timeout.js | 21 +++++++++++++++++ test/parallel/test-timers.js | 21 +++++++++++++++++ test/parallel/test-tls-0-dns-altname.js | 21 +++++++++++++++++ test/parallel/test-tls-alert.js | 21 +++++++++++++++++ test/parallel/test-tls-cert-regression.js | 21 +++++++++++++++++ .../test-tls-check-server-identity.js | 21 +++++++++++++++++ test/parallel/test-tls-client-abort.js | 21 +++++++++++++++++ test/parallel/test-tls-client-abort2.js | 21 +++++++++++++++++ .../test-tls-client-default-ciphers.js | 21 +++++++++++++++++ test/parallel/test-tls-client-destroy-soon.js | 21 +++++++++++++++++ test/parallel/test-tls-client-reject.js | 21 +++++++++++++++++ test/parallel/test-tls-client-resume.js | 21 +++++++++++++++++ test/parallel/test-tls-client-verify.js | 21 +++++++++++++++++ test/parallel/test-tls-close-notify.js | 21 +++++++++++++++++ .../parallel/test-tls-connect-given-socket.js | 21 +++++++++++++++++ test/parallel/test-tls-connect-pipe.js | 21 +++++++++++++++++ test/parallel/test-tls-connect-simple.js | 21 +++++++++++++++++ test/parallel/test-tls-connect.js | 21 +++++++++++++++++ test/parallel/test-tls-delayed-attach.js | 21 +++++++++++++++++ test/parallel/test-tls-dhe.js | 21 +++++++++++++++++ test/parallel/test-tls-ecdh-disable.js | 21 +++++++++++++++++ test/parallel/test-tls-ecdh.js | 21 +++++++++++++++++ test/parallel/test-tls-econnreset.js | 21 +++++++++++++++++ test/parallel/test-tls-fast-writing.js | 21 +++++++++++++++++ .../test-tls-friendly-error-message.js | 21 +++++++++++++++++ test/parallel/test-tls-getcipher.js | 21 +++++++++++++++++ test/parallel/test-tls-handshake-nohang.js | 21 +++++++++++++++++ .../parallel/test-tls-hello-parser-failure.js | 21 +++++++++++++++++ test/parallel/test-tls-inception.js | 21 +++++++++++++++++ test/parallel/test-tls-interleave.js | 21 +++++++++++++++++ test/parallel/test-tls-invoke-queued.js | 21 +++++++++++++++++ test/parallel/test-tls-junk-closes-server.js | 21 +++++++++++++++++ test/parallel/test-tls-key-mismatch.js | 21 +++++++++++++++++ test/parallel/test-tls-max-send-fragment.js | 21 +++++++++++++++++ test/parallel/test-tls-multi-key.js | 21 +++++++++++++++++ test/parallel/test-tls-no-cert-required.js | 21 +++++++++++++++++ test/parallel/test-tls-no-rsa-key.js | 21 +++++++++++++++++ test/parallel/test-tls-npn-server-client.js | 21 +++++++++++++++++ test/parallel/test-tls-ocsp-callback.js | 21 +++++++++++++++++ test/parallel/test-tls-over-http-tunnel.js | 21 +++++++++++++++++ test/parallel/test-tls-passphrase.js | 21 +++++++++++++++++ test/parallel/test-tls-pause.js | 21 +++++++++++++++++ .../test-tls-peer-certificate-encoding.js | 21 +++++++++++++++++ .../test-tls-peer-certificate-multi-keys.js | 21 +++++++++++++++++ test/parallel/test-tls-peer-certificate.js | 21 +++++++++++++++++ test/parallel/test-tls-request-timeout.js | 21 +++++++++++++++++ test/parallel/test-tls-securepair-server.js | 21 +++++++++++++++++ test/parallel/test-tls-server-verify.js | 21 +++++++++++++++++ test/parallel/test-tls-session-cache.js | 21 +++++++++++++++++ test/parallel/test-tls-set-ciphers.js | 21 +++++++++++++++++ test/parallel/test-tls-set-encoding.js | 21 +++++++++++++++++ test/parallel/test-tls-sni-option.js | 21 +++++++++++++++++ test/parallel/test-tls-sni-server-client.js | 21 +++++++++++++++++ test/parallel/test-tls-ticket-cluster.js | 21 +++++++++++++++++ test/parallel/test-tls-ticket.js | 21 +++++++++++++++++ test/parallel/test-tls-timeout-server-2.js | 21 +++++++++++++++++ test/parallel/test-tls-timeout-server.js | 21 +++++++++++++++++ test/parallel/test-tls-zero-clear-in.js | 21 +++++++++++++++++ test/parallel/test-umask.js | 21 +++++++++++++++++ test/parallel/test-utf8-scripts.js | 21 +++++++++++++++++ test/parallel/test-util-format.js | 21 +++++++++++++++++ test/parallel/test-util-inspect.js | 21 +++++++++++++++++ test/parallel/test-util-log.js | 21 +++++++++++++++++ test/parallel/test-util.js | 21 +++++++++++++++++ test/parallel/test-vm-basic.js | 21 +++++++++++++++++ test/parallel/test-vm-context-async-script.js | 21 +++++++++++++++++ .../test-vm-context-property-forwarding.js | 21 +++++++++++++++++ test/parallel/test-vm-context.js | 21 +++++++++++++++++ .../test-vm-create-and-run-in-context.js | 21 +++++++++++++++++ .../test-vm-create-context-accessors.js | 21 +++++++++++++++++ test/parallel/test-vm-create-context-arg.js | 21 +++++++++++++++++ ...st-vm-create-context-circular-reference.js | 21 +++++++++++++++++ test/parallel/test-vm-cross-context.js | 21 +++++++++++++++++ test/parallel/test-vm-debug-context.js | 21 +++++++++++++++++ test/parallel/test-vm-function-declaration.js | 21 +++++++++++++++++ .../test-vm-global-define-property.js | 21 +++++++++++++++++ test/parallel/test-vm-global-identity.js | 21 +++++++++++++++++ test/parallel/test-vm-harmony-symbols.js | 21 +++++++++++++++++ test/parallel/test-vm-is-context.js | 21 +++++++++++++++++ .../test-vm-new-script-new-context.js | 21 +++++++++++++++++ .../test-vm-new-script-this-context.js | 21 +++++++++++++++++ test/parallel/test-vm-run-in-new-context.js | 21 +++++++++++++++++ test/parallel/test-vm-static-this.js | 21 +++++++++++++++++ test/parallel/test-vm-timeout.js | 21 +++++++++++++++++ test/parallel/test-writedouble.js | 21 +++++++++++++++++ test/parallel/test-writefloat.js | 21 +++++++++++++++++ test/parallel/test-writeint.js | 21 +++++++++++++++++ test/parallel/test-writeuint.js | 21 +++++++++++++++++ test/parallel/test-zlib-close-after-write.js | 21 +++++++++++++++++ .../parallel/test-zlib-convenience-methods.js | 21 +++++++++++++++++ test/parallel/test-zlib-dictionary-fail.js | 21 +++++++++++++++++ test/parallel/test-zlib-dictionary.js | 21 +++++++++++++++++ test/parallel/test-zlib-from-gzip.js | 21 +++++++++++++++++ test/parallel/test-zlib-from-string.js | 21 +++++++++++++++++ test/parallel/test-zlib-invalid-input.js | 21 +++++++++++++++++ test/parallel/test-zlib-random-byte-pipes.js | 21 +++++++++++++++++ test/parallel/test-zlib-write-after-close.js | 21 +++++++++++++++++ test/parallel/test-zlib-write-after-flush.js | 21 +++++++++++++++++ test/parallel/test-zlib-zero-byte.js | 21 +++++++++++++++++ test/parallel/test-zlib.js | 21 +++++++++++++++++ test/pummel/test-abort-fatal-error.js | 21 +++++++++++++++++ test/pummel/test-child-process-spawn-loop.js | 21 +++++++++++++++++ test/pummel/test-crypto-dh.js | 21 +++++++++++++++++ test/pummel/test-dh-regr.js | 21 +++++++++++++++++ test/pummel/test-dtrace-jsstack.js | 21 +++++++++++++++++ test/pummel/test-exec.js | 21 +++++++++++++++++ test/pummel/test-fs-watch-file-slow.js | 21 +++++++++++++++++ test/pummel/test-fs-watch-file.js | 21 +++++++++++++++++ test/pummel/test-fs-watch-non-recursive.js | 21 +++++++++++++++++ test/pummel/test-http-client-reconnect-bug.js | 21 +++++++++++++++++ .../test-http-many-keep-alive-connections.js | 21 +++++++++++++++++ test/pummel/test-http-upload-timeout.js | 21 +++++++++++++++++ test/pummel/test-https-ci-reneg-attack.js | 21 +++++++++++++++++ test/pummel/test-https-large-response.js | 21 +++++++++++++++++ test/pummel/test-https-no-reader.js | 21 +++++++++++++++++ test/pummel/test-keep-alive.js | 21 +++++++++++++++++ test/pummel/test-net-connect-econnrefused.js | 21 +++++++++++++++++ test/pummel/test-net-connect-memleak.js | 21 +++++++++++++++++ test/pummel/test-net-many-clients.js | 21 +++++++++++++++++ test/pummel/test-net-pause.js | 21 +++++++++++++++++ test/pummel/test-net-pingpong-delay.js | 21 +++++++++++++++++ test/pummel/test-net-pingpong.js | 21 +++++++++++++++++ test/pummel/test-net-throttle.js | 21 +++++++++++++++++ test/pummel/test-net-timeout.js | 21 +++++++++++++++++ test/pummel/test-net-timeout2.js | 21 +++++++++++++++++ test/pummel/test-net-write-callbacks.js | 21 +++++++++++++++++ test/pummel/test-next-tick-infinite-calls.js | 21 +++++++++++++++++ test/pummel/test-process-hrtime.js | 21 +++++++++++++++++ test/pummel/test-process-uptime.js | 21 +++++++++++++++++ test/pummel/test-regress-GH-814.js | 21 +++++++++++++++++ test/pummel/test-regress-GH-814_2.js | 21 +++++++++++++++++ test/pummel/test-regress-GH-892.js | 21 +++++++++++++++++ test/pummel/test-stream-pipe-multi.js | 21 +++++++++++++++++ test/pummel/test-stream2-basic.js | 21 +++++++++++++++++ test/pummel/test-timer-wrap.js | 21 +++++++++++++++++ test/pummel/test-timer-wrap2.js | 21 +++++++++++++++++ test/pummel/test-timers.js | 21 +++++++++++++++++ test/pummel/test-tls-ci-reneg-attack.js | 21 +++++++++++++++++ test/pummel/test-tls-connect-memleak.js | 21 +++++++++++++++++ test/pummel/test-tls-securepair-client.js | 21 +++++++++++++++++ test/pummel/test-tls-server-large-request.js | 21 +++++++++++++++++ test/pummel/test-tls-session-timeout.js | 21 +++++++++++++++++ test/pummel/test-tls-throttle.js | 21 +++++++++++++++++ test/pummel/test-vm-memleak.js | 21 +++++++++++++++++ test/pummel/test-watch-file.js | 21 +++++++++++++++++ test/sequential/test-child-process-emfile.js | 21 +++++++++++++++++ .../sequential/test-child-process-execsync.js | 21 +++++++++++++++++ .../test-child-process-fork-getconnections.js | 21 +++++++++++++++++ test/sequential/test-deprecation-flags.js | 21 +++++++++++++++++ test/sequential/test-fs-watch.js | 21 +++++++++++++++++ test/sequential/test-init.js | 21 +++++++++++++++++ test/sequential/test-module-loading.js | 21 +++++++++++++++++ test/sequential/test-net-GH-5504.js | 21 +++++++++++++++++ test/sequential/test-net-server-address.js | 21 +++++++++++++++++ test/sequential/test-next-tick-error-spin.js | 21 +++++++++++++++++ test/sequential/test-pipe.js | 21 +++++++++++++++++ test/sequential/test-regress-GH-1697.js | 21 +++++++++++++++++ test/sequential/test-regress-GH-1726.js | 21 +++++++++++++++++ test/sequential/test-regress-GH-4015.js | 21 +++++++++++++++++ test/sequential/test-regress-GH-4027.js | 21 +++++++++++++++++ test/sequential/test-regress-GH-784.js | 21 +++++++++++++++++ test/sequential/test-regress-GH-877.js | 21 +++++++++++++++++ .../test-require-cache-without-stat.js | 21 +++++++++++++++++ test/sequential/test-stream2-fs.js | 21 +++++++++++++++++ test/sequential/test-stream2-stderr-sync.js | 21 +++++++++++++++++ test/sequential/test-util-debug.js | 21 +++++++++++++++++ test/sequential/test-vm-timeout-rethrow.js | 21 +++++++++++++++++ tools/doc/generate.js | 21 +++++++++++++++++ tools/doc/html.js | 21 +++++++++++++++++ tools/doc/json.js | 21 +++++++++++++++++ 981 files changed, 20502 insertions(+), 6 deletions(-) diff --git a/benchmark/buffers/buffer-base64-encode.js b/benchmark/buffers/buffer-base64-encode.js index f618ba21ecfdc9..6805737ba9fe87 100644 --- a/benchmark/buffers/buffer-base64-encode.js +++ b/benchmark/buffers/buffer-base64-encode.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; var common = require('../common.js'); diff --git a/benchmark/buffers/buffer-compare.js b/benchmark/buffers/buffer-compare.js index 84faf84e34aac7..0a8c4c15e74b38 100644 --- a/benchmark/buffers/buffer-compare.js +++ b/benchmark/buffers/buffer-compare.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; var common = require('../common.js'); diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js index 736693b8400fed..2b86f23705bb41 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js @@ -1,3 +1,24 @@ +// 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. + // a duplex stream is just a stream that is both readable and writable. // Since JS doesn't have multiple prototypal inheritance, this class // prototypally inherits from Readable, and then parasitically from diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js index d06f71f1868d77..a9c835884828d8 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js @@ -1,3 +1,24 @@ +// 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. + // a passthrough stream. // basically just the most minimal sort of Transform stream. // Every written chunk gets output as-is. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js index 54a9d5c553d69e..e06af7572621a3 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; module.exports = Readable; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js index 625cdc17698059..b2ce1a030c8014 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js @@ -1,3 +1,24 @@ +// 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. + // a transform stream is a readable/writable stream where you do // something with the data. Sometimes it's called a "filter", // but that's not a great name for it, since that implies a thing where diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js index 95916c992a9507..4fbcd4b4e3a833 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js @@ -1,3 +1,24 @@ +// 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. + // A bit simpler than readable streams. // Implement an async ._write(chunk, encoding, cb), and it'll handle all // the drain event emission and buffering. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js index ff4c851c075a2f..e6a92b7747e980 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js @@ -19,6 +19,27 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +// 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. + // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js index b00e54fb790982..b4df147795ec41 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -19,6 +19,27 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +// 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 Buffer = require('buffer').Buffer; var isBufferEncoding = Buffer.isEncoding diff --git a/deps/npm/node_modules/read-installed/node_modules/util-extend/extend.js b/deps/npm/node_modules/read-installed/node_modules/util-extend/extend.js index de9fcf471abd92..ad1f4d5b9e7718 100644 --- a/deps/npm/node_modules/read-installed/node_modules/util-extend/extend.js +++ b/deps/npm/node_modules/read-installed/node_modules/util-extend/extend.js @@ -19,6 +19,27 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +// 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. + module.exports = extend; function extend(origin, add) { // Don't do anything if add isn't an object diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js index 736693b8400fed..2b86f23705bb41 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js @@ -1,3 +1,24 @@ +// 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. + // a duplex stream is just a stream that is both readable and writable. // Since JS doesn't have multiple prototypal inheritance, this class // prototypally inherits from Readable, and then parasitically from diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js index d06f71f1868d77..a9c835884828d8 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_passthrough.js @@ -1,3 +1,24 @@ +// 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. + // a passthrough stream. // basically just the most minimal sort of Transform stream. // Every written chunk gets output as-is. diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js index 3a7d42d62b86a3..78e248106ac071 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; module.exports = Readable; diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js index cd2583207f5b20..244a308870beb7 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js @@ -1,3 +1,24 @@ +// 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. + // a transform stream is a readable/writable stream where you do // something with the data. Sometimes it's called a "filter", // but that's not a great name for it, since that implies a thing where diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js index 4d9c62ba62ff2b..fa5cb8870173e4 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js @@ -1,3 +1,24 @@ +// 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. + // A bit simpler than readable streams. // Implement an async ._write(chunk, encoding, cb), and it'll handle all // the drain event emission and buffering. diff --git a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js index ff4c851c075a2f..e6a92b7747e980 100644 --- a/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ b/deps/npm/node_modules/readable-stream/node_modules/core-util-is/lib/util.js @@ -19,6 +19,27 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +// 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. + // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. diff --git a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js index b00e54fb790982..b4df147795ec41 100644 --- a/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js +++ b/deps/npm/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -19,6 +19,27 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +// 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 Buffer = require('buffer').Buffer; var isBufferEncoding = Buffer.isEncoding diff --git a/lib/_debugger.js b/lib/_debugger.js index 090c9e5dc650e1..c8a86c0fb70e64 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const util = require('util'); diff --git a/lib/_http_agent.js b/lib/_http_agent.js index ace5923b4516ee..0661ee155371f5 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const net = require('net'); diff --git a/lib/_http_client.js b/lib/_http_client.js index babe772281909f..b818b05c527e61 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const util = require('util'); diff --git a/lib/_http_common.js b/lib/_http_common.js index b8724f00ec6557..c2ffbfce804b86 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const binding = process.binding('http_parser'); diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index d8388917902dd0..b0d5c29b2094d4 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const util = require('util'); diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 186905ce5fc6a8..130adef1de1303 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const assert = require('assert').ok; diff --git a/lib/_http_server.js b/lib/_http_server.js index 32da9cfe95ed69..0a300ade618c85 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const util = require('util'); diff --git a/lib/_linklist.js b/lib/_linklist.js index 1d2e9fa4d4411a..4c1a05e1526e75 100644 --- a/lib/_linklist.js +++ b/lib/_linklist.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; module.exports = require('internal/linkedlist'); diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js index bf498f623c743d..4422b62aac3250 100644 --- a/lib/_stream_duplex.js +++ b/lib/_stream_duplex.js @@ -1,3 +1,24 @@ +// 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. + // a duplex stream is just a stream that is both readable and writable. // Since JS doesn't have multiple prototypal inheritance, this class // prototypally inherits from Readable, and then parasitically from diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js index 30952d436e3d38..82adaa8d1c7d86 100644 --- a/lib/_stream_passthrough.js +++ b/lib/_stream_passthrough.js @@ -1,3 +1,24 @@ +// 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. + // a passthrough stream. // basically just the most minimal sort of Transform stream. // Every written chunk gets output as-is. diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 0c5d1ef5d887ea..1f7bdcc2e7c465 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; module.exports = Readable; diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index 892c80459a3649..8adf3ed12d9384 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -1,3 +1,24 @@ +// 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. + // a transform stream is a readable/writable stream where you do // something with the data. Sometimes it's called a "filter", // but that's not a great name for it, since that implies a thing where diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index eedeb56e125db0..a0a37fbb7a0421 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -1,3 +1,24 @@ +// 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. + // A bit simpler than readable streams. // Implement an async ._write(chunk, encoding, cb), and it'll handle all // the drain event emission and buffering. diff --git a/lib/_tls_common.js b/lib/_tls_common.js index 56baf7bde8c922..2f0b17b111a420 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const tls = require('tls'); diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index f18ad27ba4e59a..64f6fa83ad301d 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('internal/util').assertCrypto(); diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index ebd36519cf1525..64c82b6957efb4 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('internal/util').assertCrypto(); diff --git a/lib/buffer.js b/lib/buffer.js index d4f6ccff7e2fe2..48eca73b53b2e2 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable require-buffer */ 'use strict'; diff --git a/lib/child_process.js b/lib/child_process.js index aff6025e332666..ab9ceb5bad3036 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const util = require('util'); diff --git a/lib/cluster.js b/lib/cluster.js index 02bf3d8f600776..8d2f44f364df5c 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; module.exports = ('NODE_UNIQUE_ID' in process.env) ? diff --git a/lib/console.js b/lib/console.js index 6de9d43ef3359c..7ec9c846329cce 100644 --- a/lib/console.js +++ b/lib/console.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const util = require('util'); diff --git a/lib/constants.js b/lib/constants.js index c1cbf2db3cce37..dbd8dbc4d5a05d 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This module is deprecated in documentation only. Users should be directed diff --git a/lib/crypto.js b/lib/crypto.js index da381463fd4dd8..7ceca8ba26601e 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -1,3 +1,24 @@ +// 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. + // Note: In 0.8 and before, crypto functions all defaulted to using // binary-encoded strings rather than buffers. diff --git a/lib/dgram.js b/lib/dgram.js index e4741f4cd5bc29..f39487ba1b298d 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const assert = require('assert'); diff --git a/lib/dns.js b/lib/dns.js index 1f22c91c78c27a..95d90f6746af8a 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const util = require('util'); diff --git a/lib/domain.js b/lib/domain.js index f45a623e8acafd..5cef123da82b54 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // WARNING: THIS MODULE IS PENDING DEPRECATION. diff --git a/lib/events.js b/lib/events.js index ab167bb2fbd44b..ac080117665296 100644 --- a/lib/events.js +++ b/lib/events.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; var domain; diff --git a/lib/fs.js b/lib/fs.js index 3f2a3cc1ac4761..929f7bcaa6b30b 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1,3 +1,24 @@ +// 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. + // Maintainers, keep in mind that ES1-style octal literals (`0666`) are not // allowed in strict mode. Use ES6-style octal literals instead (`0o666`). diff --git a/lib/http.js b/lib/http.js index 6931a0e26c138a..4b0e589a568956 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; exports.IncomingMessage = require('_http_incoming').IncomingMessage; diff --git a/lib/https.js b/lib/https.js index e59e7dfcb6beeb..c44766bd6e6571 100644 --- a/lib/https.js +++ b/lib/https.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('internal/util').assertCrypto(); diff --git a/lib/module.js b/lib/module.js index 9a6b641a753588..2b1450aa26550e 100644 --- a/lib/module.js +++ b/lib/module.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const NativeModule = require('native_module'); diff --git a/lib/net.js b/lib/net.js index 2231e5bb32db0f..d2dce399880c82 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const EventEmitter = require('events'); diff --git a/lib/os.js b/lib/os.js index 0ce292fbe074b7..7de2e79c153e5b 100644 --- a/lib/os.js +++ b/lib/os.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const binding = process.binding('os'); diff --git a/lib/path.js b/lib/path.js index 3ed587e0e0e167..2f67c8cadc8bd1 100644 --- a/lib/path.js +++ b/lib/path.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const inspect = require('util').inspect; diff --git a/lib/querystring.js b/lib/querystring.js index 0e94dcd0f1ab1d..80e458420351d7 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -1,3 +1,26 @@ +// 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. + +// Query String Utilities + 'use strict'; const { Buffer } = require('buffer'); diff --git a/lib/readline.js b/lib/readline.js index a571657a726d2a..b5dab31a5f7f91 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -1,3 +1,24 @@ +// 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. + // Inspiration for this code comes from Salvatore Sanfilippo's linenoise. // https://github.com/antirez/linenoise // Reference: diff --git a/lib/repl.js b/lib/repl.js index 7d50cc6bf5201c..3dd243b0b0cdbf 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1,3 +1,24 @@ +// 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. + /* A repl library that you can include in your own code to get a runtime * interface to your program. * diff --git a/lib/stream.js b/lib/stream.js index a6b25a212508ab..dca4f50fc09eac 100644 --- a/lib/stream.js +++ b/lib/stream.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Note: export Stream before Readable/Writable/Duplex/... diff --git a/lib/string_decoder.js b/lib/string_decoder.js index 672ba185cc2821..eee9a7d9273ebf 100644 --- a/lib/string_decoder.js +++ b/lib/string_decoder.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const Buffer = require('buffer').Buffer; diff --git a/lib/sys.js b/lib/sys.js index 4d7d305daa056b..87f40fc6d5f1f0 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // the sys module was renamed to 'util'. diff --git a/lib/timers.js b/lib/timers.js index 0784f7f1e11247..2c6c3fc0e6ea35 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const TimerWrap = process.binding('timer_wrap').Timer; diff --git a/lib/tls.js b/lib/tls.js index 01ee56b2fd154e..9e092fe8bb33bf 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const internalUtil = require('internal/util'); diff --git a/lib/tty.js b/lib/tty.js index f9b8a34e95d97a..b7901d9998de98 100644 --- a/lib/tty.js +++ b/lib/tty.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const util = require('util'); diff --git a/lib/url.js b/lib/url.js index 1623de56caa0e4..395a583cb784bc 100644 --- a/lib/url.js +++ b/lib/url.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const { toASCII } = process.binding('config').hasIntl ? diff --git a/lib/util.js b/lib/util.js index d34bf9303de49d..8048caecba00ed 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const uv = process.binding('uv'); diff --git a/lib/vm.js b/lib/vm.js index e2b6c60d1a83f6..5bee450becec8b 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const binding = process.binding('contextify'); diff --git a/lib/zlib.js b/lib/zlib.js index 476503b17f7a26..ab06c736893394 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const Buffer = require('buffer').Buffer; diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index 64b5f091612368..80419405ba78e8 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_ASYNC_WRAP_INL_H_ #define SRC_ASYNC_WRAP_INL_H_ diff --git a/src/async-wrap.cc b/src/async-wrap.cc index a0780566db72d8..bc3e049d262c81 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "async-wrap.h" #include "async-wrap-inl.h" #include "env.h" diff --git a/src/async-wrap.h b/src/async-wrap.h index d01c6ce9f9b724..a044a01863202d 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_ASYNC_WRAP_H_ #define SRC_ASYNC_WRAP_H_ diff --git a/src/base-object-inl.h b/src/base-object-inl.h index 4ddc5e1349bc13..94449819a83239 100644 --- a/src/base-object-inl.h +++ b/src/base-object-inl.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_BASE_OBJECT_INL_H_ #define SRC_BASE_OBJECT_INL_H_ diff --git a/src/base-object.h b/src/base-object.h index 27251379770e2c..0998920f49dd15 100644 --- a/src/base-object.h +++ b/src/base-object.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_BASE_OBJECT_H_ #define SRC_BASE_OBJECT_H_ diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 7936474b7426d6..9fe20f15903e1e 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #define CARES_STATICLIB #include "ares.h" #include "async-wrap.h" diff --git a/src/env-inl.h b/src/env-inl.h index 1a17e2947d0597..06a9474c9d3775 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_ENV_INL_H_ #define SRC_ENV_INL_H_ diff --git a/src/env.h b/src/env.h index 28f9e0c1728fd9..06cc517435af52 100644 --- a/src/env.h +++ b/src/env.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_ENV_H_ #define SRC_ENV_H_ diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 025f511d93b1a5..ce272362c420ee 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "async-wrap.h" #include "async-wrap-inl.h" #include "env.h" diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 317fb48b1d28e3..da65586a7edbdf 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "handle_wrap.h" #include "async-wrap.h" #include "async-wrap-inl.h" diff --git a/src/handle_wrap.h b/src/handle_wrap.h index 2a128dd8b1679d..280d60815e3b52 100644 --- a/src/handle_wrap.h +++ b/src/handle_wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_HANDLE_WRAP_H_ #define SRC_HANDLE_WRAP_H_ diff --git a/src/node.cc b/src/node.cc index b7253afed1d604..fda6c3f257730b 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #include "node_buffer.h" #include "node_constants.h" diff --git a/src/node.h b/src/node.h index 1255a4af7f11ce..e0988649f40458 100644 --- a/src/node.h +++ b/src/node.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_H_ #define SRC_NODE_H_ diff --git a/src/node.stp b/src/node.stp index 466f892de265cd..3369968c205146 100644 --- a/src/node.stp +++ b/src/node.stp @@ -1,3 +1,24 @@ +// 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. + probe node_net_server_connection = process("node").mark("net__server__connection") { remote = user_string($arg2); diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 1f86cf8b3f7ae5..dc8afd578373db 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #include "node_buffer.h" diff --git a/src/node_buffer.h b/src/node_buffer.h index 686450d984e6f9..799d05a7aa6193 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_BUFFER_H_ #define SRC_NODE_BUFFER_H_ diff --git a/src/node_constants.cc b/src/node_constants.cc index a7c2d89906cced..bed87b764980de 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -1,3 +1,24 @@ +// 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. + #include "node_constants.h" #include "env.h" #include "env-inl.h" diff --git a/src/node_constants.h b/src/node_constants.h index 7ba6ec3bd1b015..047d8fc5e7e2f5 100644 --- a/src/node_constants.h +++ b/src/node_constants.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_CONSTANTS_H_ #define SRC_NODE_CONSTANTS_H_ diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 9b0ab4ea262d41..2e7c577cec7afc 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #include "node_internals.h" #include "node_watchdog.h" diff --git a/src/node_counters.cc b/src/node_counters.cc index 092d990d16b3e5..c6e9ea50379cb0 100644 --- a/src/node_counters.cc +++ b/src/node_counters.cc @@ -1,3 +1,24 @@ +// 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. + #include "node_counters.h" #include "uv.h" #include "env.h" diff --git a/src/node_counters.h b/src/node_counters.h index 117db1079e9865..5d866aedb57677 100644 --- a/src/node_counters.h +++ b/src/node_counters.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_COUNTERS_H_ #define SRC_NODE_COUNTERS_H_ diff --git a/src/node_crypto.cc b/src/node_crypto.cc index f4b0506a15e4d1..700508067790de 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #include "node_buffer.h" #include "node_crypto.h" diff --git a/src/node_crypto.h b/src/node_crypto.h index 38f49ba5a05063..63e6ab684fe2e4 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_CRYPTO_H_ #define SRC_NODE_CRYPTO_H_ diff --git a/src/node_crypto_bio.cc b/src/node_crypto_bio.cc index a862573c280acb..3084e50d24cf4b 100644 --- a/src/node_crypto_bio.cc +++ b/src/node_crypto_bio.cc @@ -1,3 +1,24 @@ +// 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. + #include "node_crypto_bio.h" #include "openssl/bio.h" #include "util.h" diff --git a/src/node_crypto_bio.h b/src/node_crypto_bio.h index ed6b46b53237cf..4699d1e6e342a4 100644 --- a/src/node_crypto_bio.h +++ b/src/node_crypto_bio.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_CRYPTO_BIO_H_ #define SRC_NODE_CRYPTO_BIO_H_ diff --git a/src/node_crypto_clienthello-inl.h b/src/node_crypto_clienthello-inl.h index 108383bf2d542a..4044b0cde246df 100644 --- a/src/node_crypto_clienthello-inl.h +++ b/src/node_crypto_clienthello-inl.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ #define SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ diff --git a/src/node_crypto_clienthello.cc b/src/node_crypto_clienthello.cc index 8c862c1b6a5198..c7c8dd7de41db2 100644 --- a/src/node_crypto_clienthello.cc +++ b/src/node_crypto_clienthello.cc @@ -1,3 +1,24 @@ +// 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. + #include "node_crypto_clienthello.h" #include "node_crypto_clienthello-inl.h" #include "node_buffer.h" // Buffer diff --git a/src/node_crypto_clienthello.h b/src/node_crypto_clienthello.h index 3550807c20d05f..e52d6c3f9f8358 100644 --- a/src/node_crypto_clienthello.h +++ b/src/node_crypto_clienthello.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_CRYPTO_CLIENTHELLO_H_ #define SRC_NODE_CRYPTO_CLIENTHELLO_H_ diff --git a/src/node_crypto_groups.h b/src/node_crypto_groups.h index 2817f4c92620af..d22fdc7f966f9a 100644 --- a/src/node_crypto_groups.h +++ b/src/node_crypto_groups.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_CRYPTO_GROUPS_H_ #define SRC_NODE_CRYPTO_GROUPS_H_ diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index 8653b673755fde..94d06a7404ed33 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -1,3 +1,24 @@ +// 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. + #include "node_dtrace.h" #ifdef HAVE_DTRACE diff --git a/src/node_dtrace.h b/src/node_dtrace.h index 5d192a60f716aa..c22bf4e7fc0f12 100644 --- a/src/node_dtrace.h +++ b/src/node_dtrace.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_DTRACE_H_ #define SRC_NODE_DTRACE_H_ diff --git a/src/node_file.cc b/src/node_file.cc index 99048b223478df..8e738fb8bfa8d3 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #include "node_file.h" #include "node_buffer.h" diff --git a/src/node_file.h b/src/node_file.h index 76dbe80348de39..c7ba9417fa0d2b 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_FILE_H_ #define SRC_NODE_FILE_H_ diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index bc9b5d953e8ebf..38450148b706a8 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #include "node_buffer.h" #include "node_http_parser.h" diff --git a/src/node_http_parser.h b/src/node_http_parser.h index 5fbe6f130594a6..a785d46cc10bfc 100644 --- a/src/node_http_parser.h +++ b/src/node_http_parser.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_HTTP_PARSER_H_ #define SRC_NODE_HTTP_PARSER_H_ diff --git a/src/node_i18n.cc b/src/node_i18n.cc index fab594ce79b69e..284f9b0b6c8042 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc @@ -1,3 +1,24 @@ +// 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. + /* * notes: by srl295 * - When in NODE_HAVE_SMALL_ICU mode, ICU is linked against "stub" (null) data diff --git a/src/node_i18n.h b/src/node_i18n.h index 270eb1f3d1bc46..78e18fdb370c94 100644 --- a/src/node_i18n.h +++ b/src/node_i18n.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_I18N_H_ #define SRC_NODE_I18N_H_ diff --git a/src/node_internals.h b/src/node_internals.h index 347712dcd8feae..ff1f1cd11dba4e 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_INTERNALS_H_ #define SRC_NODE_INTERNALS_H_ diff --git a/src/node_javascript.h b/src/node_javascript.h index 738d81957253e2..3e8528fd211fb6 100644 --- a/src/node_javascript.h +++ b/src/node_javascript.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_JAVASCRIPT_H_ #define SRC_NODE_JAVASCRIPT_H_ diff --git a/src/node_main.cc b/src/node_main.cc index 16bda81ae64091..3194eb78cab130 100644 --- a/src/node_main.cc +++ b/src/node_main.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #ifdef _WIN32 diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h index 8f695fd9dd0679..37c759fb894f13 100644 --- a/src/node_object_wrap.h +++ b/src/node_object_wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_OBJECT_WRAP_H_ #define SRC_NODE_OBJECT_WRAP_H_ diff --git a/src/node_os.cc b/src/node_os.cc index c3f3ed75ab7d5d..d7be9095b170c9 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #include "v8.h" #include "env.h" diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index cff92e34045a1e..9289efcf3e5a3d 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -1,3 +1,24 @@ +// 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. + #include "node_stat_watcher.h" #include "async-wrap.h" #include "async-wrap-inl.h" diff --git a/src/node_stat_watcher.h b/src/node_stat_watcher.h index 99cae5880351f7..df15f339d128a2 100644 --- a/src/node_stat_watcher.h +++ b/src/node_stat_watcher.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_STAT_WATCHER_H_ #define SRC_NODE_STAT_WATCHER_H_ diff --git a/src/node_v8.cc b/src/node_v8.cc index 4dfb88a5396115..f46bed248ea2d9 100644 --- a/src/node_v8.cc +++ b/src/node_v8.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #include "env.h" #include "env-inl.h" diff --git a/src/node_version.h b/src/node_version.h index 6a83929a82e77d..4d33a9bb24ee23 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_VERSION_H_ #define SRC_NODE_VERSION_H_ diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index 5d95c4132f1b3f..3065343ddefa6e 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -1,3 +1,24 @@ +// 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. + #include "node_watchdog.h" #include "node_internals.h" #include "util.h" diff --git a/src/node_watchdog.h b/src/node_watchdog.h index 2d55d782d0af5d..9dd5a03f816bd5 100644 --- a/src/node_watchdog.h +++ b/src/node_watchdog.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_WATCHDOG_H_ #define SRC_NODE_WATCHDOG_H_ diff --git a/src/node_win32_etw_provider-inl.h b/src/node_win32_etw_provider-inl.h index efc11ab0b95108..9e3f088ff485db 100644 --- a/src/node_win32_etw_provider-inl.h +++ b/src/node_win32_etw_provider-inl.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_WIN32_ETW_PROVIDER_INL_H_ #define SRC_NODE_WIN32_ETW_PROVIDER_INL_H_ diff --git a/src/node_win32_etw_provider.cc b/src/node_win32_etw_provider.cc index 7b766bd2bb99b8..edb6afd3975596 100644 --- a/src/node_win32_etw_provider.cc +++ b/src/node_win32_etw_provider.cc @@ -1,3 +1,24 @@ +// 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. + #include "node_dtrace.h" #include "node_win32_etw_provider.h" #include "node_etw_provider.h" diff --git a/src/node_win32_etw_provider.h b/src/node_win32_etw_provider.h index baf9e38539f559..53b9529b539b04 100644 --- a/src/node_win32_etw_provider.h +++ b/src/node_win32_etw_provider.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_WIN32_ETW_PROVIDER_H_ #define SRC_NODE_WIN32_ETW_PROVIDER_H_ diff --git a/src/node_win32_perfctr_provider.cc b/src/node_win32_perfctr_provider.cc index ebb299e4c54758..9caadbd10e22fa 100644 --- a/src/node_win32_perfctr_provider.cc +++ b/src/node_win32_perfctr_provider.cc @@ -1,3 +1,24 @@ +// 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. + #define __INIT_node_perfctr_provider_IMP #include "node_counters.h" #include "node_win32_perfctr_provider.h" diff --git a/src/node_win32_perfctr_provider.h b/src/node_win32_perfctr_provider.h index 315e32b0297e4d..35185aa187e1f8 100644 --- a/src/node_win32_perfctr_provider.h +++ b/src/node_win32_perfctr_provider.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ #define SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ diff --git a/src/node_wrap.h b/src/node_wrap.h index 15cea7beda7de8..1b7525cd317483 100644 --- a/src/node_wrap.h +++ b/src/node_wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_NODE_WRAP_H_ #define SRC_NODE_WRAP_H_ diff --git a/src/node_zlib.cc b/src/node_zlib.cc index 0b85e6a1d60921..2214f1cd1ecf54 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -1,3 +1,24 @@ +// 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. + #include "node.h" #include "node_buffer.h" diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 5f47dadddb4d96..132b2662f516f3 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "pipe_wrap.h" #include "async-wrap.h" diff --git a/src/pipe_wrap.h b/src/pipe_wrap.h index 9dcfa91bac8579..5ad6a9be1b2644 100644 --- a/src/pipe_wrap.h +++ b/src/pipe_wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_PIPE_WRAP_H_ #define SRC_PIPE_WRAP_H_ diff --git a/src/process_wrap.cc b/src/process_wrap.cc index 8c8e4704be4f82..c067d5c9d8a765 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "env.h" #include "env-inl.h" #include "handle_wrap.h" diff --git a/src/res/node.rc b/src/res/node.rc index b2f7f3029f2a89..9403e68be70aca 100644 --- a/src/res/node.rc +++ b/src/res/node.rc @@ -1,3 +1,24 @@ +// 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. + #include "winresrc.h" #include "node_version.h" diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index 582d1a9ecfdc02..55f1563438362f 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "async-wrap.h" #include "async-wrap-inl.h" #include "env.h" diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc index 8ef78a796db2ec..430bbe3b8a3766 100644 --- a/src/spawn_sync.cc +++ b/src/spawn_sync.cc @@ -1,3 +1,24 @@ +// 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. + #include "spawn_sync.h" #include "env-inl.h" #include "string_bytes.h" diff --git a/src/spawn_sync.h b/src/spawn_sync.h index 676df43b759bf1..a3eef5b15eb2bf 100644 --- a/src/spawn_sync.h +++ b/src/spawn_sync.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_SPAWN_SYNC_H_ #define SRC_SPAWN_SYNC_H_ diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index ac656505503b22..099151fdb71c35 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "stream_wrap.h" #include "stream_base.h" #include "stream_base-inl.h" diff --git a/src/stream_wrap.h b/src/stream_wrap.h index e930670202d2d8..14ff18e7f3930b 100644 --- a/src/stream_wrap.h +++ b/src/stream_wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_STREAM_WRAP_H_ #define SRC_STREAM_WRAP_H_ diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 882ca6e3e89bd3..39239592595e7a 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -1,3 +1,24 @@ +// 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. + #include "string_bytes.h" #include "base64.h" diff --git a/src/string_bytes.h b/src/string_bytes.h index 75d70defe38104..81561e6e7067cc 100644 --- a/src/string_bytes.h +++ b/src/string_bytes.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_STRING_BYTES_H_ #define SRC_STRING_BYTES_H_ diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index b2617a5695719e..f2525b1fb1b22a 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "tcp_wrap.h" #include "connection_wrap.h" diff --git a/src/tcp_wrap.h b/src/tcp_wrap.h index 2b9e288dced6aa..a3cb2d524b82a9 100644 --- a/src/tcp_wrap.h +++ b/src/tcp_wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_TCP_WRAP_H_ #define SRC_TCP_WRAP_H_ diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc index 843fde4673b071..8ffe934a21e0fb 100644 --- a/src/timer_wrap.cc +++ b/src/timer_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "async-wrap.h" #include "async-wrap-inl.h" #include "env.h" diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 581e017ef85016..e23e686b9d3088 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "tls_wrap.h" #include "async-wrap.h" #include "async-wrap-inl.h" diff --git a/src/tls_wrap.h b/src/tls_wrap.h index f390c9fe9281f7..d0313bd308f9dc 100644 --- a/src/tls_wrap.h +++ b/src/tls_wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_TLS_WRAP_H_ #define SRC_TLS_WRAP_H_ diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc index 5b7518324773ae..82476e755d285b 100644 --- a/src/tty_wrap.cc +++ b/src/tty_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "tty_wrap.h" #include "env.h" diff --git a/src/tty_wrap.h b/src/tty_wrap.h index 5e0517598b0922..8eadbf0a9fc937 100644 --- a/src/tty_wrap.h +++ b/src/tty_wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_TTY_WRAP_H_ #define SRC_TTY_WRAP_H_ diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index d14eefd64d600a..4f5388080e2bfe 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -1,3 +1,24 @@ +// 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. + #include "udp_wrap.h" #include "env.h" #include "env-inl.h" diff --git a/src/udp_wrap.h b/src/udp_wrap.h index ad5f92c0f52bcb..60bedace7410df 100644 --- a/src/udp_wrap.h +++ b/src/udp_wrap.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_UDP_WRAP_H_ #define SRC_UDP_WRAP_H_ diff --git a/src/util-inl.h b/src/util-inl.h index 82ab6632773854..c3855eba098c67 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_UTIL_INL_H_ #define SRC_UTIL_INL_H_ diff --git a/src/util.cc b/src/util.cc index fb23f75ede2d5c..4a89b3a42f24b0 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1,3 +1,24 @@ +// 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. + #include "util.h" #include "string_bytes.h" #include "node_buffer.h" diff --git a/src/util.h b/src/util.h index cf530a4da9146c..f43ccef8b8404c 100644 --- a/src/util.h +++ b/src/util.h @@ -1,3 +1,24 @@ +// 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. + #ifndef SRC_UTIL_H_ #define SRC_UTIL_H_ diff --git a/src/uv.cc b/src/uv.cc index c0e742bf159d98..aec63696d1ec94 100644 --- a/src/uv.cc +++ b/src/uv.cc @@ -1,3 +1,24 @@ +// 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. + #include "uv.h" #include "node.h" #include "env.h" diff --git a/test/addons/repl-domain-abort/binding.cc b/test/addons/repl-domain-abort/binding.cc index e7415c317fc89f..7153a828a930e9 100644 --- a/test/addons/repl-domain-abort/binding.cc +++ b/test/addons/repl-domain-abort/binding.cc @@ -1,3 +1,24 @@ +// 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. + #include #include diff --git a/test/addons/repl-domain-abort/test.js b/test/addons/repl-domain-abort/test.js index 95536f99711324..66b08d507adb3d 100644 --- a/test/addons/repl-domain-abort/test.js +++ b/test/addons/repl-domain-abort/test.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../../common'); const assert = require('assert'); diff --git a/test/common.js b/test/common.js index 9f73e2e8820ec3..8f19efd900abf7 100644 --- a/test/common.js +++ b/test/common.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable required-modules */ 'use strict'; const path = require('path'); diff --git a/test/debugger/helper-debugger-repl.js b/test/debugger/helper-debugger-repl.js index 38c65a03fa590d..cbd29d7674e4df 100644 --- a/test/debugger/helper-debugger-repl.js +++ b/test/debugger/helper-debugger-repl.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/debugger/test-debug-break-on-uncaught.js b/test/debugger/test-debug-break-on-uncaught.js index cfe72bb67b4f02..4c8fb5b3fc27c5 100644 --- a/test/debugger/test-debug-break-on-uncaught.js +++ b/test/debugger/test-debug-break-on-uncaught.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const path = require('path'); diff --git a/test/debugger/test-debugger-client.js b/test/debugger/test-debugger-client.js index 603a6bdbd1c627..cf00f819816d37 100644 --- a/test/debugger/test-debugger-client.js +++ b/test/debugger/test-debugger-client.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/debugger/test-debugger-repl-break-in-module.js b/test/debugger/test-debugger-repl-break-in-module.js index 2e7b9a58aacb0e..4fe37678fe7e27 100644 --- a/test/debugger/test-debugger-repl-break-in-module.js +++ b/test/debugger/test-debugger-repl-break-in-module.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const repl = require('./helper-debugger-repl.js'); diff --git a/test/debugger/test-debugger-repl-restart.js b/test/debugger/test-debugger-repl-restart.js index f5de9f5ee95778..5345702ca72a67 100644 --- a/test/debugger/test-debugger-repl-restart.js +++ b/test/debugger/test-debugger-repl-restart.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const repl = require('./helper-debugger-repl.js'); diff --git a/test/debugger/test-debugger-repl-term.js b/test/debugger/test-debugger-repl-term.js index 4932df12e713bb..0155df51b262b7 100644 --- a/test/debugger/test-debugger-repl-term.js +++ b/test/debugger/test-debugger-repl-term.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); process.env.NODE_FORCE_READLINE = 1; diff --git a/test/debugger/test-debugger-repl-utf8.js b/test/debugger/test-debugger-repl-utf8.js index 90214158884371..8a88c97d145197 100644 --- a/test/debugger/test-debugger-repl-utf8.js +++ b/test/debugger/test-debugger-repl-utf8.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const script = common.fixturesDir + '/breakpoints_utf8.js'; diff --git a/test/debugger/test-debugger-repl.js b/test/debugger/test-debugger-repl.js index 32dbfa22c0d3a9..f138627bb4365b 100644 --- a/test/debugger/test-debugger-repl.js +++ b/test/debugger/test-debugger-repl.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const repl = require('./helper-debugger-repl.js'); diff --git a/test/disabled/test-debug-brk-file.js b/test/disabled/test-debug-brk-file.js index d697de87d06eff..58b7b1fbcd6eec 100644 --- a/test/disabled/test-debug-brk-file.js +++ b/test/disabled/test-debug-brk-file.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/disabled/test-dgram-send-error.js b/test/disabled/test-dgram-send-error.js index d7ec016540044c..190be9c0b56ffe 100644 --- a/test/disabled/test-dgram-send-error.js +++ b/test/disabled/test-dgram-send-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Some operating systems report errors when an UDP message is sent to an // unreachable host. This error can be reported by sendto() and even by diff --git a/test/disabled/test-fs-largefile.js b/test/disabled/test-fs-largefile.js index 365cdec188d5c7..fb6aabe496c88d 100644 --- a/test/disabled/test-fs-largefile.js +++ b/test/disabled/test-fs-largefile.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/disabled/test-http-abort-stream-end.js b/test/disabled/test-http-abort-stream-end.js index 5dc51d9eee911f..f754e60300ff62 100644 --- a/test/disabled/test-http-abort-stream-end.js +++ b/test/disabled/test-http-abort-stream-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/disabled/test-https-loop-to-google.js b/test/disabled/test-https-loop-to-google.js index 2c307f3d1732cd..1fd1048df1bdfe 100644 --- a/test/disabled/test-https-loop-to-google.js +++ b/test/disabled/test-https-loop-to-google.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Failing test for https diff --git a/test/disabled/test-readline.js b/test/disabled/test-readline.js index 4273f1013415e4..581283dbd0a267 100644 --- a/test/disabled/test-readline.js +++ b/test/disabled/test-readline.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Can't test this when 'make test' doesn't assign a tty to the stdout. // Yet another use-case for require('tty').spawn ? diff --git a/test/disabled/test-sendfd.js b/test/disabled/test-sendfd.js index 9f1159e30a401c..89367369bbdba5 100644 --- a/test/disabled/test-sendfd.js +++ b/test/disabled/test-sendfd.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Test sending and receiving a file descriptor. // diff --git a/test/disabled/test-setuidgid.js b/test/disabled/test-setuidgid.js index 14a480fd958923..25d29e79812596 100644 --- a/test/disabled/test-setuidgid.js +++ b/test/disabled/test-setuidgid.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Requires special privileges const common = require('../common'); diff --git a/test/disabled/tls_server.js b/test/disabled/tls_server.js index 2347ab44103946..d90e1a5ec5009d 100644 --- a/test/disabled/tls_server.js +++ b/test/disabled/tls_server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/fixtures/GH-1899-output.js b/test/fixtures/GH-1899-output.js index 0baac9eab9bf15..d6b513324a52f6 100644 --- a/test/fixtures/GH-1899-output.js +++ b/test/fixtures/GH-1899-output.js @@ -1,2 +1,23 @@ +// 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. + console.log('hello, world!'); diff --git a/test/fixtures/GH-892-request.js b/test/fixtures/GH-892-request.js index d0db3e29ff5023..19e1eea96c3d84 100644 --- a/test/fixtures/GH-892-request.js +++ b/test/fixtures/GH-892-request.js @@ -1,3 +1,24 @@ +// 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. + // Called by test/pummel/test-regress-GH-892.js const https = require('https'); diff --git a/test/fixtures/a.js b/test/fixtures/a.js index 1e8bbcf210b8b6..4c8725279577ec 100644 --- a/test/fixtures/a.js +++ b/test/fixtures/a.js @@ -1,3 +1,24 @@ +// 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. + const c = require('./b/c'); console.error('load fixtures/a.js'); diff --git a/test/fixtures/a1.js b/test/fixtures/a1.js index 1e8bbcf210b8b6..4c8725279577ec 100644 --- a/test/fixtures/a1.js +++ b/test/fixtures/a1.js @@ -1,3 +1,24 @@ +// 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. + const c = require('./b/c'); console.error('load fixtures/a.js'); diff --git a/test/fixtures/b/c.js b/test/fixtures/b/c.js index 2305e5b28635bc..f82150b057e16e 100644 --- a/test/fixtures/b/c.js +++ b/test/fixtures/b/c.js @@ -1,3 +1,24 @@ +// 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. + const d = require('./d'); const assert = require('assert'); diff --git a/test/fixtures/b/d.js b/test/fixtures/b/d.js index 3307d8b8584f7f..37fefc2d340a00 100644 --- a/test/fixtures/b/d.js +++ b/test/fixtures/b/d.js @@ -1,3 +1,24 @@ +// 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. + console.error('load fixtures/b/d.js'); var string = 'D'; diff --git a/test/fixtures/b/package/index.js b/test/fixtures/b/package/index.js index cbf16fdc28ce5a..c88d605ea0bb31 100644 --- a/test/fixtures/b/package/index.js +++ b/test/fixtures/b/package/index.js @@ -1,2 +1,23 @@ +// 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. + exports.hello = 'world'; console.error('load package/index.js'); diff --git a/test/fixtures/break-in-module/mod.js b/test/fixtures/break-in-module/mod.js index 13582e760eb2fb..57bf58bb31aa11 100644 --- a/test/fixtures/break-in-module/mod.js +++ b/test/fixtures/break-in-module/mod.js @@ -1,3 +1,24 @@ +// 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. + exports.hello = function() { return 'hello from module'; }; diff --git a/test/fixtures/catch-stdout-error.js b/test/fixtures/catch-stdout-error.js index 90068efd691f86..bdd09b5ab8f450 100644 --- a/test/fixtures/catch-stdout-error.js +++ b/test/fixtures/catch-stdout-error.js @@ -1,3 +1,24 @@ +// 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. + function write() { try { process.stdout.write('Hello, world\n'); diff --git a/test/fixtures/child_process_should_emit_error.js b/test/fixtures/child_process_should_emit_error.js index 34d23fc58347ac..93df1b280ae6fe 100644 --- a/test/fixtures/child_process_should_emit_error.js +++ b/test/fixtures/child_process_should_emit_error.js @@ -1,3 +1,24 @@ +// 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. + const exec = require('child_process').exec; [0, 1].forEach(function(i) { diff --git a/test/fixtures/create-file.js b/test/fixtures/create-file.js index 1cf417616e1636..ec0d8243d355e5 100644 --- a/test/fixtures/create-file.js +++ b/test/fixtures/create-file.js @@ -1,3 +1,24 @@ +// 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. + const fs = require('fs'); var file_name = process.argv[2]; diff --git a/test/fixtures/cycles/folder/foo.js b/test/fixtures/cycles/folder/foo.js index 573f885f4e4090..2e70fab4495b31 100644 --- a/test/fixtures/cycles/folder/foo.js +++ b/test/fixtures/cycles/folder/foo.js @@ -1,3 +1,24 @@ +// 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. + const root = require('./../root'); exports.hello = function() { diff --git a/test/fixtures/cycles/root.js b/test/fixtures/cycles/root.js index 5e3504e2a643e1..3e29b5e39dcc0b 100644 --- a/test/fixtures/cycles/root.js +++ b/test/fixtures/cycles/root.js @@ -1,3 +1,24 @@ +// 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. + const foo = exports.foo = require('./folder/foo'); exports.hello = 'hello'; diff --git a/test/fixtures/echo-close-check.js b/test/fixtures/echo-close-check.js index 720bcc9de458ba..f58515b6b77f1e 100644 --- a/test/fixtures/echo-close-check.js +++ b/test/fixtures/echo-close-check.js @@ -1,3 +1,24 @@ +// 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. + const common = require('../common'); const assert = require('assert'); const net = require('net'); diff --git a/test/fixtures/echo.js b/test/fixtures/echo.js index 429541b5849bd4..8d3d9ecf835ab0 100644 --- a/test/fixtures/echo.js +++ b/test/fixtures/echo.js @@ -1,3 +1,24 @@ +// 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. + const common = require('../common'); const assert = require('assert'); diff --git a/test/fixtures/exit.js b/test/fixtures/exit.js index c6c8b8209db51c..7e0fd7dd6beb6d 100644 --- a/test/fixtures/exit.js +++ b/test/fixtures/exit.js @@ -1 +1,22 @@ +// 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. + process.exit(process.argv[2] || 1); diff --git a/test/fixtures/global/plain.js b/test/fixtures/global/plain.js index 42567881d6537f..f983d7c68ba93f 100644 --- a/test/fixtures/global/plain.js +++ b/test/fixtures/global/plain.js @@ -1,3 +1,24 @@ +// 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. + foo = 'foo'; global.bar = 'bar'; diff --git a/test/fixtures/json-with-directory-name-module/module-stub/index.js b/test/fixtures/json-with-directory-name-module/module-stub/index.js index c24489954e90d3..5cbb00b63c1ad5 100644 --- a/test/fixtures/json-with-directory-name-module/module-stub/index.js +++ b/test/fixtures/json-with-directory-name-module/module-stub/index.js @@ -1 +1,22 @@ +// 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. + module.exports = "hello from module-stub!" diff --git a/test/fixtures/json-with-directory-name-module/module-stub/one-trailing-slash/two/three.js b/test/fixtures/json-with-directory-name-module/module-stub/one-trailing-slash/two/three.js index 1a3628d4e11084..a02399ef8be629 100644 --- a/test/fixtures/json-with-directory-name-module/module-stub/one-trailing-slash/two/three.js +++ b/test/fixtures/json-with-directory-name-module/module-stub/one-trailing-slash/two/three.js @@ -1 +1,22 @@ +// 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. + module.exports = require('../../'); diff --git a/test/fixtures/json-with-directory-name-module/module-stub/one/two/three.js b/test/fixtures/json-with-directory-name-module/module-stub/one/two/three.js index bf59a728db5cde..19025cdc74e20e 100644 --- a/test/fixtures/json-with-directory-name-module/module-stub/one/two/three.js +++ b/test/fixtures/json-with-directory-name-module/module-stub/one/two/three.js @@ -1 +1,22 @@ +// 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. + module.exports = require('../..'); diff --git a/test/fixtures/listen-on-socket-and-exit.js b/test/fixtures/listen-on-socket-and-exit.js index 8627625965e87d..aeb6cb482b715d 100644 --- a/test/fixtures/listen-on-socket-and-exit.js +++ b/test/fixtures/listen-on-socket-and-exit.js @@ -1,3 +1,24 @@ +// 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. + // child process that listens on a socket, allows testing of an EADDRINUSE condition const common = require('../common'); diff --git a/test/fixtures/module-load-order/file1.js b/test/fixtures/module-load-order/file1.js index d4ab32cb7a39e3..d378d845415ab3 100644 --- a/test/fixtures/module-load-order/file1.js +++ b/test/fixtures/module-load-order/file1.js @@ -1 +1,22 @@ +// 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. + exports.file1 = 'file1.js'; diff --git a/test/fixtures/module-load-order/file2.js b/test/fixtures/module-load-order/file2.js index 0b1af928cabb3a..e87d59568e3e71 100644 --- a/test/fixtures/module-load-order/file2.js +++ b/test/fixtures/module-load-order/file2.js @@ -1 +1,22 @@ +// 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. + exports.file2 = 'file2.js'; diff --git a/test/fixtures/module-load-order/file2/index.js b/test/fixtures/module-load-order/file2/index.js index 20c642bf2e3651..720da3147a9f4c 100644 --- a/test/fixtures/module-load-order/file2/index.js +++ b/test/fixtures/module-load-order/file2/index.js @@ -1 +1,22 @@ +// 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. + exports.file2 = 'file2/index.js'; diff --git a/test/fixtures/module-load-order/file3/index.js b/test/fixtures/module-load-order/file3/index.js index 5ec373cad7ba22..2d9936a8d1fcfb 100644 --- a/test/fixtures/module-load-order/file3/index.js +++ b/test/fixtures/module-load-order/file3/index.js @@ -1 +1,22 @@ +// 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. + exports.file3 = 'file3/index.js'; diff --git a/test/fixtures/module-load-order/file4/index.js b/test/fixtures/module-load-order/file4/index.js index f28889d98aa441..0ded410d3c0273 100644 --- a/test/fixtures/module-load-order/file4/index.js +++ b/test/fixtures/module-load-order/file4/index.js @@ -1 +1,22 @@ +// 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. + exports.file4 = 'file4/index.js'; diff --git a/test/fixtures/module-load-order/file5/index.js b/test/fixtures/module-load-order/file5/index.js index 737945ffb5e4ea..9d3a033941466c 100644 --- a/test/fixtures/module-load-order/file5/index.js +++ b/test/fixtures/module-load-order/file5/index.js @@ -1 +1,22 @@ +// 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. + exports.file5 = 'file5/index.js'; diff --git a/test/fixtures/module-load-order/file6/index.js b/test/fixtures/module-load-order/file6/index.js index 4228429e92bb13..9d890bf4f915bb 100644 --- a/test/fixtures/module-load-order/file6/index.js +++ b/test/fixtures/module-load-order/file6/index.js @@ -1 +1,22 @@ +// 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. + exports.file6 = 'file6/index.js'; diff --git a/test/fixtures/nested-index/one/hello.js b/test/fixtures/nested-index/one/hello.js index f139fee4d2f108..c0c8c4fb158368 100644 --- a/test/fixtures/nested-index/one/hello.js +++ b/test/fixtures/nested-index/one/hello.js @@ -1,2 +1,23 @@ +// 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. + exports.hello = 'hello from one!'; diff --git a/test/fixtures/nested-index/one/index.js b/test/fixtures/nested-index/one/index.js index d959a288b18f19..9beac591df2a8e 100644 --- a/test/fixtures/nested-index/one/index.js +++ b/test/fixtures/nested-index/one/index.js @@ -1 +1,22 @@ +// 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. + exports.hello = require('./hello').hello; diff --git a/test/fixtures/nested-index/three.js b/test/fixtures/nested-index/three.js index e69de29bb2d1d6..dd2472dfb2e0f9 100644 --- a/test/fixtures/nested-index/three.js +++ b/test/fixtures/nested-index/three.js @@ -0,0 +1,20 @@ +// 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. diff --git a/test/fixtures/nested-index/three/index.js b/test/fixtures/nested-index/three/index.js index e69de29bb2d1d6..dd2472dfb2e0f9 100644 --- a/test/fixtures/nested-index/three/index.js +++ b/test/fixtures/nested-index/three/index.js @@ -0,0 +1,20 @@ +// 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. diff --git a/test/fixtures/nested-index/two/hello.js b/test/fixtures/nested-index/two/hello.js index 8ec14b950e758a..339276cc7a3930 100644 --- a/test/fixtures/nested-index/two/hello.js +++ b/test/fixtures/nested-index/two/hello.js @@ -1,2 +1,23 @@ +// 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. + exports.hello = 'hello from two!'; diff --git a/test/fixtures/nested-index/two/index.js b/test/fixtures/nested-index/two/index.js index d959a288b18f19..9beac591df2a8e 100644 --- a/test/fixtures/nested-index/two/index.js +++ b/test/fixtures/nested-index/two/index.js @@ -1 +1,22 @@ +// 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. + exports.hello = require('./hello').hello; diff --git a/test/fixtures/net-fd-passing-receiver.js b/test/fixtures/net-fd-passing-receiver.js index 0dba242766a62b..4279a49becacb4 100644 --- a/test/fixtures/net-fd-passing-receiver.js +++ b/test/fixtures/net-fd-passing-receiver.js @@ -1,3 +1,24 @@ +// 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. + process.mixin(require('../common')); net = require('net'); diff --git a/test/fixtures/node_modules/asdf.js b/test/fixtures/node_modules/asdf.js index 7ec6711d1f85b0..84b74de9d9d8f3 100644 --- a/test/fixtures/node_modules/asdf.js +++ b/test/fixtures/node_modules/asdf.js @@ -1,3 +1,24 @@ +// 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. + console.error(__filename); console.error(module.paths.join('\n') + '\n'); throw new Error('Should not ever get here.'); diff --git a/test/fixtures/node_modules/bar.js b/test/fixtures/node_modules/bar.js index 95823eb1417524..5d00c9592ee046 100644 --- a/test/fixtures/node_modules/bar.js +++ b/test/fixtures/node_modules/bar.js @@ -1,2 +1,23 @@ +// 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. + console.error(__filename); console.error(module.paths.join('\n') + '\n'); diff --git a/test/fixtures/node_modules/baz/index.js b/test/fixtures/node_modules/baz/index.js index 939f0351699195..96018ee3e3d87b 100644 --- a/test/fixtures/node_modules/baz/index.js +++ b/test/fixtures/node_modules/baz/index.js @@ -1,3 +1,24 @@ +// 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. + console.error(__filename); console.error(module.paths.join('\n') + '\n'); // this should work, and get the one that doesn't throw diff --git a/test/fixtures/node_modules/baz/node_modules/asdf.js b/test/fixtures/node_modules/baz/node_modules/asdf.js index 95823eb1417524..5d00c9592ee046 100644 --- a/test/fixtures/node_modules/baz/node_modules/asdf.js +++ b/test/fixtures/node_modules/baz/node_modules/asdf.js @@ -1,2 +1,23 @@ +// 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. + console.error(__filename); console.error(module.paths.join('\n') + '\n'); diff --git a/test/fixtures/node_modules/foo.js b/test/fixtures/node_modules/foo.js index 4d4cc9fe12fbc8..8df770577c950d 100644 --- a/test/fixtures/node_modules/foo.js +++ b/test/fixtures/node_modules/foo.js @@ -1,3 +1,24 @@ +// 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. + console.error(__filename); console.error(module.paths.join('\n') + '\n'); const assert = require('assert'); diff --git a/test/fixtures/node_modules/node_modules/bar.js b/test/fixtures/node_modules/node_modules/bar.js index 7ec6711d1f85b0..84b74de9d9d8f3 100644 --- a/test/fixtures/node_modules/node_modules/bar.js +++ b/test/fixtures/node_modules/node_modules/bar.js @@ -1,3 +1,24 @@ +// 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. + console.error(__filename); console.error(module.paths.join('\n') + '\n'); throw new Error('Should not ever get here.'); diff --git a/test/fixtures/not-main-module.js b/test/fixtures/not-main-module.js index 4897a294eacb73..f0bae3db15721d 100644 --- a/test/fixtures/not-main-module.js +++ b/test/fixtures/not-main-module.js @@ -1,3 +1,24 @@ +// 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. + const assert = require('assert'); assert.notStrictEqual(module, require.main, 'require.main should not == module'); assert.notStrictEqual(module, process.mainModule, diff --git a/test/fixtures/packages/main-index/package-main-module/index.js b/test/fixtures/packages/main-index/package-main-module/index.js index 014fa39dc365d1..c361a6dc8d1950 100644 --- a/test/fixtures/packages/main-index/package-main-module/index.js +++ b/test/fixtures/packages/main-index/package-main-module/index.js @@ -1 +1,22 @@ +// 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. + exports.ok = 'ok'; diff --git a/test/fixtures/packages/main/package-main-module.js b/test/fixtures/packages/main/package-main-module.js index 014fa39dc365d1..c361a6dc8d1950 100644 --- a/test/fixtures/packages/main/package-main-module.js +++ b/test/fixtures/packages/main/package-main-module.js @@ -1 +1,22 @@ +// 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. + exports.ok = 'ok'; diff --git a/test/fixtures/path.js b/test/fixtures/path.js index b6323ff059f963..84876e888af4ee 100644 --- a/test/fixtures/path.js +++ b/test/fixtures/path.js @@ -1,3 +1,24 @@ +// 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. + // This is actually more a fixture than a test. It is used to make const common = require('../common'); // sure that require('./path') and require('path') do different things. diff --git a/test/fixtures/print-10-lines.js b/test/fixtures/print-10-lines.js index 0aaf3ef293000e..d483fe6bff3899 100644 --- a/test/fixtures/print-10-lines.js +++ b/test/fixtures/print-10-lines.js @@ -1,3 +1,24 @@ +// 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. + for (var i = 0; i < 10; i++) { console.log('count ' + i); } diff --git a/test/fixtures/print-chars-from-buffer.js b/test/fixtures/print-chars-from-buffer.js index b2f4ac43584c59..30b0c0016836f5 100644 --- a/test/fixtures/print-chars-from-buffer.js +++ b/test/fixtures/print-chars-from-buffer.js @@ -1,3 +1,24 @@ +// 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. + const assert = require('assert'); var n = parseInt(process.argv[2]); diff --git a/test/fixtures/print-chars.js b/test/fixtures/print-chars.js index e350a025a54723..26ff958d33f945 100644 --- a/test/fixtures/print-chars.js +++ b/test/fixtures/print-chars.js @@ -1,3 +1,24 @@ +// 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. + const assert = require('assert'); var n = parseInt(process.argv[2]); diff --git a/test/fixtures/recvfd.js b/test/fixtures/recvfd.js index 4c9d96ffe07612..c27a312c652c63 100644 --- a/test/fixtures/recvfd.js +++ b/test/fixtures/recvfd.js @@ -1,3 +1,24 @@ +// 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. + // See test/simple/test-sendfd.js for a complete description of what this // script is doing and how it fits into the test as a whole. diff --git a/test/fixtures/semicolon.js b/test/fixtures/semicolon.js index 092bc2b0412610..79a30844992a24 100644 --- a/test/fixtures/semicolon.js +++ b/test/fixtures/semicolon.js @@ -1 +1,22 @@ +// 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. + ; diff --git a/test/fixtures/should_exit.js b/test/fixtures/should_exit.js index b251353f1d75a7..1c3b765b1e1ab0 100644 --- a/test/fixtures/should_exit.js +++ b/test/fixtures/should_exit.js @@ -1,3 +1,24 @@ +// 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. + function tmp() {} process.on('SIGINT', tmp); process.removeListener('SIGINT', tmp); diff --git a/test/fixtures/stdio-filter.js b/test/fixtures/stdio-filter.js index cc0e53c39d0353..583e3a3bd1b0db 100644 --- a/test/fixtures/stdio-filter.js +++ b/test/fixtures/stdio-filter.js @@ -1,3 +1,24 @@ +// 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. + const util = require('util'); var regexIn = process.argv[2]; diff --git a/test/fixtures/test-fs-readfile-error.js b/test/fixtures/test-fs-readfile-error.js index 0638d01ac7655a..3f8d9a731eff75 100644 --- a/test/fixtures/test-fs-readfile-error.js +++ b/test/fixtures/test-fs-readfile-error.js @@ -1 +1,22 @@ +// 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. + require('fs').readFile('/'); // throws EISDIR diff --git a/test/fixtures/test-init-index/index.js b/test/fixtures/test-init-index/index.js index a1946530265e64..31272c8995b29e 100644 --- a/test/fixtures/test-init-index/index.js +++ b/test/fixtures/test-init-index/index.js @@ -1,3 +1,24 @@ +// 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. + (function() { require('util').print('Loaded successfully!'); })(); diff --git a/test/fixtures/test-init-native/fs.js b/test/fixtures/test-init-native/fs.js index 6481485d22918c..b2246e5c658809 100644 --- a/test/fixtures/test-init-native/fs.js +++ b/test/fixtures/test-init-native/fs.js @@ -1,3 +1,24 @@ +// 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. + (function() { const fs = require('fs'); if (fs.readFile) { diff --git a/test/fixtures/throws_error.js b/test/fixtures/throws_error.js index 80055bdf603bec..b38000894ba3a9 100644 --- a/test/fixtures/throws_error.js +++ b/test/fixtures/throws_error.js @@ -1 +1,22 @@ +// 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. + throw new Error('blah'); diff --git a/test/fixtures/throws_error1.js b/test/fixtures/throws_error1.js index 80055bdf603bec..b38000894ba3a9 100644 --- a/test/fixtures/throws_error1.js +++ b/test/fixtures/throws_error1.js @@ -1 +1,22 @@ +// 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. + throw new Error('blah'); diff --git a/test/fixtures/throws_error2.js b/test/fixtures/throws_error2.js index f32793fbc36b10..835ad5aa44dced 100644 --- a/test/fixtures/throws_error2.js +++ b/test/fixtures/throws_error2.js @@ -1,2 +1,23 @@ +// 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. + JSON.parse(undefined); diff --git a/test/fixtures/throws_error3.js b/test/fixtures/throws_error3.js index 080d0311fd2ebd..a53084c68cdbc9 100644 --- a/test/fixtures/throws_error3.js +++ b/test/fixtures/throws_error3.js @@ -1,3 +1,24 @@ +// 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. + process.nextTick(function() { JSON.parse(undefined); }); diff --git a/test/fixtures/throws_error4.js b/test/fixtures/throws_error4.js index 8f9666c507bd76..bc7d6f8c6bd6df 100644 --- a/test/fixtures/throws_error4.js +++ b/test/fixtures/throws_error4.js @@ -1,3 +1,24 @@ +// 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. + 01234567890123456789012345/** 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 diff --git a/test/internet/test-dgram-broadcast-multi-process.js b/test/internet/test-dgram-broadcast-multi-process.js index 8414e558bab6d1..a79c05e18e1675 100644 --- a/test/internet/test-dgram-broadcast-multi-process.js +++ b/test/internet/test-dgram-broadcast-multi-process.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/internet/test-dgram-multicast-multi-process.js b/test/internet/test-dgram-multicast-multi-process.js index 793d22bd4c137e..dac8abd6a7a436 100644 --- a/test/internet/test-dgram-multicast-multi-process.js +++ b/test/internet/test-dgram-multicast-multi-process.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/internet/test-dns.js b/test/internet/test-dns.js index 68f0ceab207f48..f38bbe5e91036f 100644 --- a/test/internet/test-dns.js +++ b/test/internet/test-dns.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/internet/test-http-dns-fail.js b/test/internet/test-http-dns-fail.js index 94f2487173c266..82a7030465dbc9 100644 --- a/test/internet/test-http-dns-fail.js +++ b/test/internet/test-http-dns-fail.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * Repeated requests for a domain that fails to resolve diff --git a/test/internet/test-http-https-default-ports.js b/test/internet/test-http-https-default-ports.js index c7e6b3baf7ccdc..b0eb682519bae6 100644 --- a/test/internet/test-http-https-default-ports.js +++ b/test/internet/test-http-https-default-ports.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/internet/test-net-connect-timeout.js b/test/internet/test-net-connect-timeout.js index 85937624238bb6..5d6d32cc723ff0 100644 --- a/test/internet/test-net-connect-timeout.js +++ b/test/internet/test-net-connect-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This example attempts to time out before the connection is established // https://groups.google.com/forum/#!topic/nodejs/UE0ZbfLt6t8 diff --git a/test/internet/test-net-connect-unref.js b/test/internet/test-net-connect-unref.js index 512e56f773a966..da4c77de4840c0 100644 --- a/test/internet/test-net-connect-unref.js +++ b/test/internet/test-net-connect-unref.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/internet/test-tls-reuse-host-from-socket.js b/test/internet/test-tls-reuse-host-from-socket.js index 22af92e2769715..fda9712156cb11 100644 --- a/test/internet/test-tls-reuse-host-from-socket.js +++ b/test/internet/test-tls-reuse-host-from-socket.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/message/2100bytes.js b/test/message/2100bytes.js index 48f5894f5734b4..ff1b51f4653394 100644 --- a/test/message/2100bytes.js +++ b/test/message/2100bytes.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/error_exit.js b/test/message/error_exit.js index 1cb785a1b543a6..e33e5d6929f501 100644 --- a/test/message/error_exit.js +++ b/test/message/error_exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/message/eval_messages.js b/test/message/eval_messages.js index d50df9081b2d25..69dcbd6efa23a7 100644 --- a/test/message/eval_messages.js +++ b/test/message/eval_messages.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/hello_world.js b/test/message/hello_world.js index 187bbd2cfcf7f7..f3b1f8377f37f2 100644 --- a/test/message/hello_world.js +++ b/test/message/hello_world.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/max_tick_depth.js b/test/message/max_tick_depth.js index c433c0bab3f100..89dcf398f65d4c 100644 --- a/test/message/max_tick_depth.js +++ b/test/message/max_tick_depth.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/nexttick_throw.js b/test/message/nexttick_throw.js index 0c655a8e2e4bf1..a3369e0d102924 100644 --- a/test/message/nexttick_throw.js +++ b/test/message/nexttick_throw.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/stack_overflow.js b/test/message/stack_overflow.js index cef53bfb3d35c5..46e101b91615d6 100644 --- a/test/message/stack_overflow.js +++ b/test/message/stack_overflow.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/stdin_messages.js b/test/message/stdin_messages.js index b32004c329dead..66e06282b3b3e2 100644 --- a/test/message/stdin_messages.js +++ b/test/message/stdin_messages.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/throw_custom_error.js b/test/message/throw_custom_error.js index 97df4fd390ded8..7290df53e12420 100644 --- a/test/message/throw_custom_error.js +++ b/test/message/throw_custom_error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/throw_custom_error.out b/test/message/throw_custom_error.out index ef73c52c889dff..0c6b9d128c9095 100644 --- a/test/message/throw_custom_error.out +++ b/test/message/throw_custom_error.out @@ -1,4 +1,4 @@ -*test*message*throw_custom_error.js:6 +*test*message*throw_custom_error.js:* throw ({ name: 'MyCustomError', message: 'This is a custom message' }); ^ MyCustomError: This is a custom message diff --git a/test/message/throw_in_line_with_tabs.js b/test/message/throw_in_line_with_tabs.js index f02e5479d6fe7d..fdc36b331ab8a1 100644 --- a/test/message/throw_in_line_with_tabs.js +++ b/test/message/throw_in_line_with_tabs.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable indent, no-tabs */ 'use strict'; require('../common'); diff --git a/test/message/throw_in_line_with_tabs.out b/test/message/throw_in_line_with_tabs.out index e83b05768433b8..89a81beb4126d1 100644 --- a/test/message/throw_in_line_with_tabs.out +++ b/test/message/throw_in_line_with_tabs.out @@ -1,5 +1,5 @@ before -*test*message*throw_in_line_with_tabs.js:10 +*test*message*throw_in_line_with_tabs.js:* throw ({ foo: 'bar' }); ^ [object Object] diff --git a/test/message/throw_non_error.js b/test/message/throw_non_error.js index 7a23908eece894..e7d2f54b85f78f 100644 --- a/test/message/throw_non_error.js +++ b/test/message/throw_non_error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/throw_non_error.out b/test/message/throw_non_error.out index 15f95fcc11699a..2b7e0120b6f987 100644 --- a/test/message/throw_non_error.out +++ b/test/message/throw_non_error.out @@ -1,4 +1,4 @@ -*test*message*throw_non_error.js:6 +*test*message*throw_non_error.js:* throw ({ foo: 'bar' }); ^ [object Object] diff --git a/test/message/throw_null.js b/test/message/throw_null.js index 2c5a8f47ccaf18..fb233d1db56704 100644 --- a/test/message/throw_null.js +++ b/test/message/throw_null.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/throw_null.out b/test/message/throw_null.out index eb3eeb1294e727..c013c24d24d707 100644 --- a/test/message/throw_null.out +++ b/test/message/throw_null.out @@ -1,5 +1,5 @@ -*test*message*throw_null.js:5 +*test*message*throw_null.js:* throw null; ^ null diff --git a/test/message/throw_undefined.js b/test/message/throw_undefined.js index 7d0fef0dbdc3a6..a89aaf2ee2da59 100644 --- a/test/message/throw_undefined.js +++ b/test/message/throw_undefined.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/throw_undefined.out b/test/message/throw_undefined.out index c23dac051fa5f1..5c633caa2ec69d 100644 --- a/test/message/throw_undefined.out +++ b/test/message/throw_undefined.out @@ -1,5 +1,5 @@ -*test*message*throw_undefined.js:5 +*test*message*throw_undefined.js:* throw undefined; ^ undefined diff --git a/test/message/timeout_throw.js b/test/message/timeout_throw.js index 4008f306fe58be..6ae705369786c4 100644 --- a/test/message/timeout_throw.js +++ b/test/message/timeout_throw.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/message/undefined_reference_in_new_context.js b/test/message/undefined_reference_in_new_context.js index 77c5e1e29111b9..7cb68ec5b3b3df 100644 --- a/test/message/undefined_reference_in_new_context.js +++ b/test/message/undefined_reference_in_new_context.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const vm = require('vm'); diff --git a/test/message/vm_display_runtime_error.js b/test/message/vm_display_runtime_error.js index 861e87f2f2bb93..a7a49bba27750f 100644 --- a/test/message/vm_display_runtime_error.js +++ b/test/message/vm_display_runtime_error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const vm = require('vm'); diff --git a/test/message/vm_display_syntax_error.js b/test/message/vm_display_syntax_error.js index 02612fb92d9a22..097b8e368c1249 100644 --- a/test/message/vm_display_syntax_error.js +++ b/test/message/vm_display_syntax_error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const vm = require('vm'); diff --git a/test/message/vm_dont_display_runtime_error.js b/test/message/vm_dont_display_runtime_error.js index 6a96243a83cf4a..e7c77081a597c6 100644 --- a/test/message/vm_dont_display_runtime_error.js +++ b/test/message/vm_dont_display_runtime_error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const vm = require('vm'); diff --git a/test/message/vm_dont_display_syntax_error.js b/test/message/vm_dont_display_syntax_error.js index 76c3043330946d..f3965b33430e78 100644 --- a/test/message/vm_dont_display_syntax_error.js +++ b/test/message/vm_dont_display_syntax_error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const vm = require('vm'); diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 2c09747e803889..e63d0c42897978 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-bad-unicode.js b/test/parallel/test-bad-unicode.js index a4df4ed9ed7005..b4fccc06440ed7 100644 --- a/test/parallel/test-bad-unicode.js +++ b/test/parallel/test-bad-unicode.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-beforeexit-event-exit.js b/test/parallel/test-beforeexit-event-exit.js index bd6162a46804bf..81730b10d1b224 100644 --- a/test/parallel/test-beforeexit-event-exit.js +++ b/test/parallel/test-beforeexit-event-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-buffer-ascii.js b/test/parallel/test-buffer-ascii.js index cf5b529183cabf..afedb7252cb8dc 100644 --- a/test/parallel/test-buffer-ascii.js +++ b/test/parallel/test-buffer-ascii.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-buffer-concat.js b/test/parallel/test-buffer-concat.js index 9a6a08ad62458e..c28a53977f09f5 100644 --- a/test/parallel/test-buffer-concat.js +++ b/test/parallel/test-buffer-concat.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-buffer-inspect.js b/test/parallel/test-buffer-inspect.js index 41e8197da6a38a..6890e27a3fd5b9 100644 --- a/test/parallel/test-buffer-inspect.js +++ b/test/parallel/test-buffer-inspect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-buffer-slice.js b/test/parallel/test-buffer-slice.js index b43654b952de0b..ca0429c393012b 100644 --- a/test/parallel/test-buffer-slice.js +++ b/test/parallel/test-buffer-slice.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/parallel/test-c-ares.js b/test/parallel/test-c-ares.js index 2eb824b5df28e9..6a8b08fd2064bb 100644 --- a/test/parallel/test-c-ares.js +++ b/test/parallel/test-c-ares.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-buffering.js b/test/parallel/test-child-process-buffering.js index 1c04a6f8130f12..ca8673cb8210f7 100644 --- a/test/parallel/test-child-process-buffering.js +++ b/test/parallel/test-child-process-buffering.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-cwd.js b/test/parallel/test-child-process-cwd.js index 8d0a28135ebf70..087a85243446d8 100644 --- a/test/parallel/test-child-process-cwd.js +++ b/test/parallel/test-child-process-cwd.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-default-options.js b/test/parallel/test-child-process-default-options.js index 37e7ea7494670e..450abc60fcdd49 100644 --- a/test/parallel/test-child-process-default-options.js +++ b/test/parallel/test-child-process-default-options.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-detached.js b/test/parallel/test-child-process-detached.js index 43cae6eeb02a88..bd778543aac7e2 100644 --- a/test/parallel/test-child-process-detached.js +++ b/test/parallel/test-child-process-detached.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-disconnect.js b/test/parallel/test-child-process-disconnect.js index ee9488d1cd0b05..5d9a379c69f5ba 100644 --- a/test/parallel/test-child-process-disconnect.js +++ b/test/parallel/test-child-process-disconnect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-double-pipe.js b/test/parallel/test-child-process-double-pipe.js index dac48a2db7212a..a028963739b778 100644 --- a/test/parallel/test-child-process-double-pipe.js +++ b/test/parallel/test-child-process-double-pipe.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-env.js b/test/parallel/test-child-process-env.js index ad41f978e21768..b67029f9bcf3e8 100644 --- a/test/parallel/test-child-process-env.js +++ b/test/parallel/test-child-process-env.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-exec-cwd.js b/test/parallel/test-child-process-exec-cwd.js index 95feb42314fc8d..c217185ffeadb0 100644 --- a/test/parallel/test-child-process-exec-cwd.js +++ b/test/parallel/test-child-process-exec-cwd.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-exec-env.js b/test/parallel/test-child-process-exec-env.js index 6af3bea2113a89..f475e5bdb79066 100644 --- a/test/parallel/test-child-process-exec-env.js +++ b/test/parallel/test-child-process-exec-env.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-exec-error.js b/test/parallel/test-child-process-exec-error.js index f937fec5d252fc..cb8ace0a9bf3e8 100644 --- a/test/parallel/test-child-process-exec-error.js +++ b/test/parallel/test-child-process-exec-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-exit-code.js b/test/parallel/test-child-process-exit-code.js index 9596a202223993..1f2566be36efdd 100644 --- a/test/parallel/test-child-process-exit-code.js +++ b/test/parallel/test-child-process-exit-code.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-fork-and-spawn.js b/test/parallel/test-child-process-fork-and-spawn.js index 5807147a1c947d..d50753541cd232 100644 --- a/test/parallel/test-child-process-fork-and-spawn.js +++ b/test/parallel/test-child-process-fork-and-spawn.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-fork-close.js b/test/parallel/test-child-process-fork-close.js index d8b1aa0bf3267c..8ee4c873fb8981 100644 --- a/test/parallel/test-child-process-fork-close.js +++ b/test/parallel/test-child-process-fork-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-fork-dgram.js b/test/parallel/test-child-process-fork-dgram.js index 37b40dccd3f369..784e5e55f2b852 100644 --- a/test/parallel/test-child-process-fork-dgram.js +++ b/test/parallel/test-child-process-fork-dgram.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * The purpose of this test is to make sure that when forking a process, diff --git a/test/parallel/test-child-process-fork-exec-argv.js b/test/parallel/test-child-process-fork-exec-argv.js index 97d1e21a2f6d7a..433f83b35e0649 100644 --- a/test/parallel/test-child-process-fork-exec-argv.js +++ b/test/parallel/test-child-process-fork-exec-argv.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-fork-exec-path.js b/test/parallel/test-child-process-fork-exec-path.js index 5af0184a21f55d..aee99fbc7f3c59 100644 --- a/test/parallel/test-child-process-fork-exec-path.js +++ b/test/parallel/test-child-process-fork-exec-path.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-fork-net.js b/test/parallel/test-child-process-fork-net.js index 157704a9ccf9c9..1dec70aca8c3c1 100644 --- a/test/parallel/test-child-process-fork-net.js +++ b/test/parallel/test-child-process-fork-net.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-fork-net2.js b/test/parallel/test-child-process-fork-net2.js index 5dbae25a01b30a..737720cd6a42ac 100644 --- a/test/parallel/test-child-process-fork-net2.js +++ b/test/parallel/test-child-process-fork-net2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-fork-ref.js b/test/parallel/test-child-process-fork-ref.js index a7ff8c04cbab25..a88408674afd74 100644 --- a/test/parallel/test-child-process-fork-ref.js +++ b/test/parallel/test-child-process-fork-ref.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-fork-ref2.js b/test/parallel/test-child-process-fork-ref2.js index 9f59aa344aa2c9..a4638baaabb82e 100644 --- a/test/parallel/test-child-process-fork-ref2.js +++ b/test/parallel/test-child-process-fork-ref2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const fork = require('child_process').fork; diff --git a/test/parallel/test-child-process-fork.js b/test/parallel/test-child-process-fork.js index bfc68e41dc95fb..5177a19f1a18d7 100644 --- a/test/parallel/test-child-process-fork.js +++ b/test/parallel/test-child-process-fork.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-fork3.js b/test/parallel/test-child-process-fork3.js index 5588c41422e21b..cffcf2128fbded 100644 --- a/test/parallel/test-child-process-fork3.js +++ b/test/parallel/test-child-process-fork3.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const child_process = require('child_process'); diff --git a/test/parallel/test-child-process-internal.js b/test/parallel/test-child-process-internal.js index d795b69d7ee0e5..e12866ffff660d 100644 --- a/test/parallel/test-child-process-internal.js +++ b/test/parallel/test-child-process-internal.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-ipc.js b/test/parallel/test-child-process-ipc.js index da952e6c9bf1ae..cdcc3c63ff5a63 100644 --- a/test/parallel/test-child-process-ipc.js +++ b/test/parallel/test-child-process-ipc.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-child-process-kill.js b/test/parallel/test-child-process-kill.js index e0e951610dc146..498c2dbd9723ba 100644 --- a/test/parallel/test-child-process-kill.js +++ b/test/parallel/test-child-process-kill.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-recv-handle.js b/test/parallel/test-child-process-recv-handle.js index a6d75e48b9ed90..24c6b07037f2d0 100644 --- a/test/parallel/test-child-process-recv-handle.js +++ b/test/parallel/test-child-process-recv-handle.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Test that a Linux specific quirk in the handle passing protocol is handled // correctly. See https://github.com/joyent/node/issues/5330 for details. diff --git a/test/parallel/test-child-process-send-utf8.js b/test/parallel/test-child-process-send-utf8.js index c5d0943301c730..f49712a6770ab9 100644 --- a/test/parallel/test-child-process-send-utf8.js +++ b/test/parallel/test-child-process-send-utf8.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-set-blocking.js b/test/parallel/test-child-process-set-blocking.js index d6a044619b6479..2b9896154f7d2e 100644 --- a/test/parallel/test-child-process-set-blocking.js +++ b/test/parallel/test-child-process-set-blocking.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-silent.js b/test/parallel/test-child-process-silent.js index 3bfa9f5f7d5235..bd61770cde4e34 100644 --- a/test/parallel/test-child-process-silent.js +++ b/test/parallel/test-child-process-silent.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-spawn-error.js b/test/parallel/test-child-process-spawn-error.js index 6cd3c47eef46ad..ae84666223993d 100644 --- a/test/parallel/test-child-process-spawn-error.js +++ b/test/parallel/test-child-process-spawn-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const spawn = require('child_process').spawn; diff --git a/test/parallel/test-child-process-spawn-typeerror.js b/test/parallel/test-child-process-spawn-typeerror.js index e8ec5680b80224..70a0ea443cef70 100644 --- a/test/parallel/test-child-process-spawn-typeerror.js +++ b/test/parallel/test-child-process-spawn-typeerror.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-spawnsync-env.js b/test/parallel/test-child-process-spawnsync-env.js index b5a1c723660faa..c8e11b5067c7d1 100644 --- a/test/parallel/test-child-process-spawnsync-env.js +++ b/test/parallel/test-child-process-spawnsync-env.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-spawnsync-input.js b/test/parallel/test-child-process-spawnsync-input.js index af31554846517e..c1f9ef149d4add 100644 --- a/test/parallel/test-child-process-spawnsync-input.js +++ b/test/parallel/test-child-process-spawnsync-input.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/parallel/test-child-process-spawnsync-timeout.js b/test/parallel/test-child-process-spawnsync-timeout.js index 38f22deef26ae7..e2f59acaebb7ee 100644 --- a/test/parallel/test-child-process-spawnsync-timeout.js +++ b/test/parallel/test-child-process-spawnsync-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-spawnsync.js b/test/parallel/test-child-process-spawnsync.js index 77d205f79a414e..0d0a3dba566ad9 100644 --- a/test/parallel/test-child-process-spawnsync.js +++ b/test/parallel/test-child-process-spawnsync.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-stdin-ipc.js b/test/parallel/test-child-process-stdin-ipc.js index 2623e2deeeee8a..b162ced916096d 100644 --- a/test/parallel/test-child-process-stdin-ipc.js +++ b/test/parallel/test-child-process-stdin-ipc.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-stdin.js b/test/parallel/test-child-process-stdin.js index 8782e46f8f7229..4f5352438d2da9 100644 --- a/test/parallel/test-child-process-stdin.js +++ b/test/parallel/test-child-process-stdin.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-stdio-big-write-end.js b/test/parallel/test-child-process-stdio-big-write-end.js index 24991492f63d32..6cc3d86644ac39 100644 --- a/test/parallel/test-child-process-stdio-big-write-end.js +++ b/test/parallel/test-child-process-stdio-big-write-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-stdio-inherit.js b/test/parallel/test-child-process-stdio-inherit.js index d2b64aeb30dd31..4318ba3ee170b1 100644 --- a/test/parallel/test-child-process-stdio-inherit.js +++ b/test/parallel/test-child-process-stdio-inherit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-stdio.js b/test/parallel/test-child-process-stdio.js index 3c67b3c3fe37a0..b7193b2f591a0f 100644 --- a/test/parallel/test-child-process-stdio.js +++ b/test/parallel/test-child-process-stdio.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-stdout-flush-exit.js b/test/parallel/test-child-process-stdout-flush-exit.js index 682d382b9a1034..8737c4fd2a2fcd 100644 --- a/test/parallel/test-child-process-stdout-flush-exit.js +++ b/test/parallel/test-child-process-stdout-flush-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-child-process-stdout-flush.js b/test/parallel/test-child-process-stdout-flush.js index 97d421afd3c125..970a03edeea982 100644 --- a/test/parallel/test-child-process-stdout-flush.js +++ b/test/parallel/test-child-process-stdout-flush.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cli-eval.js b/test/parallel/test-cli-eval.js index 260acdb0d6f90a..7795016dc58255 100644 --- a/test/parallel/test-cli-eval.js +++ b/test/parallel/test-cli-eval.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; if (module.parent) { // Signal we've been loaded as a module. diff --git a/test/parallel/test-cluster-basic.js b/test/parallel/test-cluster-basic.js index 92251b7324bf5f..3993afed13204d 100644 --- a/test/parallel/test-cluster-basic.js +++ b/test/parallel/test-cluster-basic.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-bind-privileged-port.js b/test/parallel/test-cluster-bind-privileged-port.js index af461bee4f9ee2..e726618ffbd31c 100644 --- a/test/parallel/test-cluster-bind-privileged-port.js +++ b/test/parallel/test-cluster-bind-privileged-port.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-bind-twice.js b/test/parallel/test-cluster-bind-twice.js index 215d4829ce215e..69ba21a1a93cdb 100644 --- a/test/parallel/test-cluster-bind-twice.js +++ b/test/parallel/test-cluster-bind-twice.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This test starts two clustered HTTP servers on the same port. It expects the // first cluster to succeed and the second cluster to fail with EADDRINUSE. diff --git a/test/parallel/test-cluster-dgram-1.js b/test/parallel/test-cluster-dgram-1.js index 25391997755f6b..96474c53fffb33 100644 --- a/test/parallel/test-cluster-dgram-1.js +++ b/test/parallel/test-cluster-dgram-1.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const NUM_WORKERS = 4; diff --git a/test/parallel/test-cluster-dgram-2.js b/test/parallel/test-cluster-dgram-2.js index 37aea29e1a4263..d5d649571f6bc1 100644 --- a/test/parallel/test-cluster-dgram-2.js +++ b/test/parallel/test-cluster-dgram-2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const NUM_WORKERS = 4; diff --git a/test/parallel/test-cluster-disconnect-before-exit.js b/test/parallel/test-cluster-disconnect-before-exit.js index 64b338cd8ab836..008ba8d03d4673 100644 --- a/test/parallel/test-cluster-disconnect-before-exit.js +++ b/test/parallel/test-cluster-disconnect-before-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const cluster = require('cluster'); diff --git a/test/parallel/test-cluster-disconnect-idle-worker.js b/test/parallel/test-cluster-disconnect-idle-worker.js index e3ad91ad10238e..5b7e73ba079115 100644 --- a/test/parallel/test-cluster-disconnect-idle-worker.js +++ b/test/parallel/test-cluster-disconnect-idle-worker.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-disconnect-unshared-tcp.js b/test/parallel/test-cluster-disconnect-unshared-tcp.js index dc05d70c81f80e..584881f05f63fe 100644 --- a/test/parallel/test-cluster-disconnect-unshared-tcp.js +++ b/test/parallel/test-cluster-disconnect-unshared-tcp.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); process.env.NODE_CLUSTER_SCHED_POLICY = 'none'; diff --git a/test/parallel/test-cluster-disconnect-unshared-udp.js b/test/parallel/test-cluster-disconnect-unshared-udp.js index 85a87f3fa449eb..653ab6cc9c3be8 100644 --- a/test/parallel/test-cluster-disconnect-unshared-udp.js +++ b/test/parallel/test-cluster-disconnect-unshared-udp.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-cluster-disconnect-with-no-workers.js b/test/parallel/test-cluster-disconnect-with-no-workers.js index 15c5898a7d6f69..a34e04973cac47 100644 --- a/test/parallel/test-cluster-disconnect-with-no-workers.js +++ b/test/parallel/test-cluster-disconnect-with-no-workers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-disconnect.js b/test/parallel/test-cluster-disconnect.js index 0fc1611e2d9577..a4772d1ad655ee 100644 --- a/test/parallel/test-cluster-disconnect.js +++ b/test/parallel/test-cluster-disconnect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-eaccess.js b/test/parallel/test-cluster-eaccess.js index 75b60248a22381..0a7f7055ea419b 100644 --- a/test/parallel/test-cluster-eaccess.js +++ b/test/parallel/test-cluster-eaccess.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Test that errors propagated from cluster workers are properly // received in their master. Creates an EADDRINUSE condition by forking diff --git a/test/parallel/test-cluster-eaddrinuse.js b/test/parallel/test-cluster-eaddrinuse.js index d2baa88c6f6979..2757ded6db2a0e 100644 --- a/test/parallel/test-cluster-eaddrinuse.js +++ b/test/parallel/test-cluster-eaddrinuse.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Check that having a worker bind to a port that's already taken doesn't // leave the master process in a confused state. Releasing the port and diff --git a/test/parallel/test-cluster-fork-env.js b/test/parallel/test-cluster-fork-env.js index 55ea684f3b4ce3..170c0ea4e3abf6 100644 --- a/test/parallel/test-cluster-fork-env.js +++ b/test/parallel/test-cluster-fork-env.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-http-pipe.js b/test/parallel/test-cluster-http-pipe.js index 6db581564a124c..bc97e5cfc0e5c8 100644 --- a/test/parallel/test-cluster-http-pipe.js +++ b/test/parallel/test-cluster-http-pipe.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-cluster-master-error.js b/test/parallel/test-cluster-master-error.js index 11ed09c64ed04e..ce5b8e57044830 100644 --- a/test/parallel/test-cluster-master-error.js +++ b/test/parallel/test-cluster-master-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-master-kill.js b/test/parallel/test-cluster-master-kill.js index 094e5ad256de7d..a0550b8998814c 100644 --- a/test/parallel/test-cluster-master-kill.js +++ b/test/parallel/test-cluster-master-kill.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-message.js b/test/parallel/test-cluster-message.js index 0b699093821b82..7d1cef780f3306 100644 --- a/test/parallel/test-cluster-message.js +++ b/test/parallel/test-cluster-message.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-net-listen.js b/test/parallel/test-cluster-net-listen.js index 7ab142e85ba920..f6b2c4e45a6eb9 100644 --- a/test/parallel/test-cluster-net-listen.js +++ b/test/parallel/test-cluster-net-listen.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-net-send.js b/test/parallel/test-cluster-net-send.js index d375920e91b18b..98c7bd2e66192d 100644 --- a/test/parallel/test-cluster-net-send.js +++ b/test/parallel/test-cluster-net-send.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-rr-domain-listen.js b/test/parallel/test-cluster-rr-domain-listen.js index 10b0530b505a95..8898ae24437403 100644 --- a/test/parallel/test-cluster-rr-domain-listen.js +++ b/test/parallel/test-cluster-rr-domain-listen.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const cluster = require('cluster'); diff --git a/test/parallel/test-cluster-send-deadlock.js b/test/parallel/test-cluster-send-deadlock.js index 3fa64ac0b5d4d0..bd6b6c90338e16 100644 --- a/test/parallel/test-cluster-send-deadlock.js +++ b/test/parallel/test-cluster-send-deadlock.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Testing mutual send of handles: from master to worker, and from worker to // master. diff --git a/test/parallel/test-cluster-send-handle-twice.js b/test/parallel/test-cluster-send-handle-twice.js index f4d1bd8e0cc137..4370f127046a1e 100644 --- a/test/parallel/test-cluster-send-handle-twice.js +++ b/test/parallel/test-cluster-send-handle-twice.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Testing to send an handle twice to the parent process. diff --git a/test/parallel/test-cluster-setup-master-argv.js b/test/parallel/test-cluster-setup-master-argv.js index ba6b366bbe3d08..fa0779dca9a67d 100644 --- a/test/parallel/test-cluster-setup-master-argv.js +++ b/test/parallel/test-cluster-setup-master-argv.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-setup-master-cumulative.js b/test/parallel/test-cluster-setup-master-cumulative.js index 977c89a56aa573..7beffd3cfd8ee2 100644 --- a/test/parallel/test-cluster-setup-master-cumulative.js +++ b/test/parallel/test-cluster-setup-master-cumulative.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-setup-master-emit.js b/test/parallel/test-cluster-setup-master-emit.js index 5b828e7b8e360f..218487a51bb1d6 100644 --- a/test/parallel/test-cluster-setup-master-emit.js +++ b/test/parallel/test-cluster-setup-master-emit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-setup-master-multiple.js b/test/parallel/test-cluster-setup-master-multiple.js index c8fefddc39a23e..2a6341ea56c3c5 100644 --- a/test/parallel/test-cluster-setup-master-multiple.js +++ b/test/parallel/test-cluster-setup-master-multiple.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-setup-master.js b/test/parallel/test-cluster-setup-master.js index 5a92b988e61e5e..3252c5ce07f1e1 100644 --- a/test/parallel/test-cluster-setup-master.js +++ b/test/parallel/test-cluster-setup-master.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-shared-handle-bind-error.js b/test/parallel/test-cluster-shared-handle-bind-error.js index 91a23cad4e3f09..3c1faaaa486d14 100644 --- a/test/parallel/test-cluster-shared-handle-bind-error.js +++ b/test/parallel/test-cluster-shared-handle-bind-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-shared-handle-bind-privileged-port.js b/test/parallel/test-cluster-shared-handle-bind-privileged-port.js index b6800b12110d0b..419307d52ccf8a 100644 --- a/test/parallel/test-cluster-shared-handle-bind-privileged-port.js +++ b/test/parallel/test-cluster-shared-handle-bind-privileged-port.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-uncaught-exception.js b/test/parallel/test-cluster-uncaught-exception.js index 69d0a3095e7368..3d31fece668501 100644 --- a/test/parallel/test-cluster-uncaught-exception.js +++ b/test/parallel/test-cluster-uncaught-exception.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Installing a custom uncaughtException handler should override the default // one that the cluster module installs. diff --git a/test/parallel/test-cluster-worker-constructor.js b/test/parallel/test-cluster-worker-constructor.js index 770d45c6a9edb7..a8094e34df9c72 100644 --- a/test/parallel/test-cluster-worker-constructor.js +++ b/test/parallel/test-cluster-worker-constructor.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // test-cluster-worker-constructor.js // validates correct behavior of the cluster.Worker constructor diff --git a/test/parallel/test-cluster-worker-death.js b/test/parallel/test-cluster-worker-death.js index 7a33721a9aba17..0a7b081c117a85 100644 --- a/test/parallel/test-cluster-worker-death.js +++ b/test/parallel/test-cluster-worker-death.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-worker-destroy.js b/test/parallel/test-cluster-worker-destroy.js index 62000254247a1f..4922547194ae9b 100644 --- a/test/parallel/test-cluster-worker-destroy.js +++ b/test/parallel/test-cluster-worker-destroy.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * The goal of this test is to cover the Workers' implementation of diff --git a/test/parallel/test-cluster-worker-disconnect.js b/test/parallel/test-cluster-worker-disconnect.js index 684fd5541eac55..be7ce2b3bf78a9 100644 --- a/test/parallel/test-cluster-worker-disconnect.js +++ b/test/parallel/test-cluster-worker-disconnect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-worker-events.js b/test/parallel/test-cluster-worker-events.js index 6c2e278f5e4639..91e716285dc2b8 100644 --- a/test/parallel/test-cluster-worker-events.js +++ b/test/parallel/test-cluster-worker-events.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-worker-exit.js b/test/parallel/test-cluster-worker-exit.js index 1cd7b1d0f222c7..5d3df98f3b989e 100644 --- a/test/parallel/test-cluster-worker-exit.js +++ b/test/parallel/test-cluster-worker-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // test-cluster-worker-exit.js // verifies that, when a child process exits (by calling `process.exit(code)`) diff --git a/test/parallel/test-cluster-worker-forced-exit.js b/test/parallel/test-cluster-worker-forced-exit.js index 828188254724ae..6a6046f23c4dd1 100644 --- a/test/parallel/test-cluster-worker-forced-exit.js +++ b/test/parallel/test-cluster-worker-forced-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-cluster-worker-init.js b/test/parallel/test-cluster-worker-init.js index eaa9746c5f99a3..0ebe4b772914c3 100644 --- a/test/parallel/test-cluster-worker-init.js +++ b/test/parallel/test-cluster-worker-init.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // test-cluster-worker-init.js // verifies that, when a child process is forked, the cluster.worker diff --git a/test/parallel/test-cluster-worker-kill.js b/test/parallel/test-cluster-worker-kill.js index 834cd62bc06916..311128f1b896c5 100644 --- a/test/parallel/test-cluster-worker-kill.js +++ b/test/parallel/test-cluster-worker-kill.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // test-cluster-worker-kill.js // verifies that, when a child process is killed (we use SIGKILL) diff --git a/test/parallel/test-cluster-worker-no-exit.js b/test/parallel/test-cluster-worker-no-exit.js index 9cfd8401a0c678..db6f0fc7a033bc 100644 --- a/test/parallel/test-cluster-worker-no-exit.js +++ b/test/parallel/test-cluster-worker-no-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-common.js b/test/parallel/test-common.js index 67e5e6d8b5741b..4bddcf4eb1a462 100644 --- a/test/parallel/test-common.js +++ b/test/parallel/test-common.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-console-instance.js b/test/parallel/test-console-instance.js index e74edfae2feaef..7d56def3747213 100644 --- a/test/parallel/test-console-instance.js +++ b/test/parallel/test-console-instance.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-console-not-call-toString.js b/test/parallel/test-console-not-call-toString.js index 0c1c209374ac17..3c2df00d4767ff 100644 --- a/test/parallel/test-console-not-call-toString.js +++ b/test/parallel/test-console-not-call-toString.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js index 7bf1a5215f89e8..89825cf3d106ee 100644 --- a/test/parallel/test-console.js +++ b/test/parallel/test-console.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js index 1a628023b5c46e..eefd42cd684904 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index 7dbd5e41639a38..0ee11577d2a6aa 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This is the same as test/simple/test-crypto, but from before the shift // to use buffers by default. diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js index c051716556410d..f62fdfa3f3485f 100644 --- a/test/parallel/test-crypto-certificate.js +++ b/test/parallel/test-crypto-certificate.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-crypto-dh-odd-key.js b/test/parallel/test-crypto-dh-odd-key.js index f6bfcf72c0fd7e..94f3d382655ae6 100644 --- a/test/parallel/test-crypto-dh-odd-key.js +++ b/test/parallel/test-crypto-dh-odd-key.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-crypto-domain.js b/test/parallel/test-crypto-domain.js index 6586f7d48a94ce..b41b57e3a258b5 100644 --- a/test/parallel/test-crypto-domain.js +++ b/test/parallel/test-crypto-domain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-crypto-domains.js b/test/parallel/test-crypto-domains.js index f142fd09a57a1a..23ca991500d799 100644 --- a/test/parallel/test-crypto-domains.js +++ b/test/parallel/test-crypto-domains.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const domain = require('domain'); diff --git a/test/parallel/test-crypto-ecb.js b/test/parallel/test-crypto-ecb.js index 655246d0586cbf..d69cb9ea0d2754 100644 --- a/test/parallel/test-crypto-ecb.js +++ b/test/parallel/test-crypto-ecb.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-crypto-from-binary.js b/test/parallel/test-crypto-from-binary.js index 485735e83ce5cc..785fff4388b43b 100644 --- a/test/parallel/test-crypto-from-binary.js +++ b/test/parallel/test-crypto-from-binary.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This is the same as test/simple/test-crypto, but from before the shift // to use buffers by default. diff --git a/test/parallel/test-crypto-hash-stream-pipe.js b/test/parallel/test-crypto-hash-stream-pipe.js index 33aa0f74566be0..ee152dc028e2a4 100644 --- a/test/parallel/test-crypto-hash-stream-pipe.js +++ b/test/parallel/test-crypto-hash-stream-pipe.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-crypto-padding-aes256.js b/test/parallel/test-crypto-padding-aes256.js index 40bbfed0f2824f..08237835815ed8 100644 --- a/test/parallel/test-crypto-padding-aes256.js +++ b/test/parallel/test-crypto-padding-aes256.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-crypto-padding.js b/test/parallel/test-crypto-padding.js index 70905a8a9bd1e7..aee4e7199ce8cf 100644 --- a/test/parallel/test-crypto-padding.js +++ b/test/parallel/test-crypto-padding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-crypto-random.js b/test/parallel/test-crypto-random.js index 28b8847e56478c..dc3e3565f58dd9 100644 --- a/test/parallel/test-crypto-random.js +++ b/test/parallel/test-crypto-random.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-crypto-stream.js b/test/parallel/test-crypto-stream.js index f558851b7940a0..e40b36847b5602 100644 --- a/test/parallel/test-crypto-stream.js +++ b/test/parallel/test-crypto-stream.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-crypto-verify-failure.js b/test/parallel/test-crypto-verify-failure.js index 7e11522f6ddc85..7255410935d07c 100644 --- a/test/parallel/test-crypto-verify-failure.js +++ b/test/parallel/test-crypto-verify-failure.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js index 2e94397c8f22f9..46218e72754eba 100644 --- a/test/parallel/test-crypto.js +++ b/test/parallel/test-crypto.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-debug-port-cluster.js b/test/parallel/test-debug-port-cluster.js index 33fcfdb1975550..d96dab77ca855f 100644 --- a/test/parallel/test-debug-port-cluster.js +++ b/test/parallel/test-debug-port-cluster.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-debug-signal-cluster.js b/test/parallel/test-debug-signal-cluster.js index 059a3c2433a72b..cecedcc3092403 100644 --- a/test/parallel/test-debug-signal-cluster.js +++ b/test/parallel/test-debug-signal-cluster.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-delayed-require.js b/test/parallel/test-delayed-require.js index 8e07367eb47366..f199ebf108e4f3 100644 --- a/test/parallel/test-delayed-require.js +++ b/test/parallel/test-delayed-require.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const path = require('path'); diff --git a/test/parallel/test-dgram-address.js b/test/parallel/test-dgram-address.js index c1f71ae8abbf4a..aa06bb16629ba3 100644 --- a/test/parallel/test-dgram-address.js +++ b/test/parallel/test-dgram-address.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-bind-default-address.js b/test/parallel/test-dgram-bind-default-address.js index 142a5134c013c3..d0b5b6023445ca 100755 --- a/test/parallel/test-dgram-bind-default-address.js +++ b/test/parallel/test-dgram-bind-default-address.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-bind-shared-ports.js b/test/parallel/test-dgram-bind-shared-ports.js index 474c352c55b5a0..6abd1eaa8d5fec 100644 --- a/test/parallel/test-dgram-bind-shared-ports.js +++ b/test/parallel/test-dgram-bind-shared-ports.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-bind.js b/test/parallel/test-dgram-bind.js index f4624358a4fab4..25fd7408ffd17a 100644 --- a/test/parallel/test-dgram-bind.js +++ b/test/parallel/test-dgram-bind.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-bytes-length.js b/test/parallel/test-dgram-bytes-length.js index 07a8bb0e43452b..abf8209b112f91 100644 --- a/test/parallel/test-dgram-bytes-length.js +++ b/test/parallel/test-dgram-bytes-length.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-close.js b/test/parallel/test-dgram-close.js index 43047db697a2eb..264f9fbc67125e 100644 --- a/test/parallel/test-dgram-close.js +++ b/test/parallel/test-dgram-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Ensure that if a dgram socket is closed before the DNS lookup completes, it // won't crash. diff --git a/test/parallel/test-dgram-error-message-address.js b/test/parallel/test-dgram-error-message-address.js index 457883c573a43b..480295b523d169 100644 --- a/test/parallel/test-dgram-error-message-address.js +++ b/test/parallel/test-dgram-error-message-address.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-implicit-bind.js b/test/parallel/test-dgram-implicit-bind.js index bfc86803b463f1..70e29c1f3ab95f 100644 --- a/test/parallel/test-dgram-implicit-bind.js +++ b/test/parallel/test-dgram-implicit-bind.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const dgram = require('dgram'); diff --git a/test/parallel/test-dgram-listen-after-bind.js b/test/parallel/test-dgram-listen-after-bind.js index e60687649cda30..70a828f32cabe9 100644 --- a/test/parallel/test-dgram-listen-after-bind.js +++ b/test/parallel/test-dgram-listen-after-bind.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-msgsize.js b/test/parallel/test-dgram-msgsize.js index 6cc415e83c00ca..166c37546981e7 100644 --- a/test/parallel/test-dgram-msgsize.js +++ b/test/parallel/test-dgram-msgsize.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-multicast-setTTL.js b/test/parallel/test-dgram-multicast-setTTL.js index 11b5a0a7635857..37a2d1586318ef 100644 --- a/test/parallel/test-dgram-multicast-setTTL.js +++ b/test/parallel/test-dgram-multicast-setTTL.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-oob-buffer.js b/test/parallel/test-dgram-oob-buffer.js index 5d869114b3a4e4..aad0690c5dfb31 100644 --- a/test/parallel/test-dgram-oob-buffer.js +++ b/test/parallel/test-dgram-oob-buffer.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Some operating systems report errors when an UDP message is sent to an // unreachable host. This error can be reported by sendto() and even by diff --git a/test/parallel/test-dgram-ref.js b/test/parallel/test-dgram-ref.js index 7b79340f924b06..1a531db9aa194a 100644 --- a/test/parallel/test-dgram-ref.js +++ b/test/parallel/test-dgram-ref.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const dgram = require('dgram'); diff --git a/test/parallel/test-dgram-regress-4496.js b/test/parallel/test-dgram-regress-4496.js index b4ec8195d7e7f0..72c43635e3fc77 100644 --- a/test/parallel/test-dgram-regress-4496.js +++ b/test/parallel/test-dgram-regress-4496.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Remove this test once we support sending strings. diff --git a/test/parallel/test-dgram-send-bad-arguments.js b/test/parallel/test-dgram-send-bad-arguments.js index c7ec6b51eecfa8..e96a01de3281f2 100644 --- a/test/parallel/test-dgram-send-bad-arguments.js +++ b/test/parallel/test-dgram-send-bad-arguments.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-send-callback-buffer-length.js b/test/parallel/test-dgram-send-callback-buffer-length.js index 8551e97387ea51..f409d2666386c4 100644 --- a/test/parallel/test-dgram-send-callback-buffer-length.js +++ b/test/parallel/test-dgram-send-callback-buffer-length.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-dgram-send-empty-buffer.js b/test/parallel/test-dgram-send-empty-buffer.js index d612dbc7e56c83..63badf8e47d513 100644 --- a/test/parallel/test-dgram-send-empty-buffer.js +++ b/test/parallel/test-dgram-send-empty-buffer.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-udp4.js b/test/parallel/test-dgram-udp4.js index 5902dab3597af4..a44346bf40a361 100644 --- a/test/parallel/test-dgram-udp4.js +++ b/test/parallel/test-dgram-udp4.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dgram-unref.js b/test/parallel/test-dgram-unref.js index 6fcdf5d23e1717..930cbf095c5f8c 100644 --- a/test/parallel/test-dgram-unref.js +++ b/test/parallel/test-dgram-unref.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const dgram = require('dgram'); diff --git a/test/parallel/test-dh-padding.js b/test/parallel/test-dh-padding.js index 4744d204739a5d..6853533ee4e4a3 100644 --- a/test/parallel/test-dh-padding.js +++ b/test/parallel/test-dh-padding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-dns-regress-6244.js b/test/parallel/test-dns-regress-6244.js index b464c7bda8f11a..957d3cb672e1d3 100644 --- a/test/parallel/test-dns-regress-6244.js +++ b/test/parallel/test-dns-regress-6244.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const dns = require('dns'); diff --git a/test/parallel/test-dns-regress-7070.js b/test/parallel/test-dns-regress-7070.js index eb939b47559a9d..1082a0ce699671 100644 --- a/test/parallel/test-dns-regress-7070.js +++ b/test/parallel/test-dns-regress-7070.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-dns.js b/test/parallel/test-dns.js index 27b9b81d7d14a2..a21f6e7c76f33c 100644 --- a/test/parallel/test-dns.js +++ b/test/parallel/test-dns.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-domain-crypto.js b/test/parallel/test-domain-crypto.js index e212bc8d562c21..5846360f9a02ef 100644 --- a/test/parallel/test-domain-crypto.js +++ b/test/parallel/test-domain-crypto.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-domain-enter-exit.js b/test/parallel/test-domain-enter-exit.js index 4a11c3a206a5fe..66dbfa4c1e1c52 100644 --- a/test/parallel/test-domain-enter-exit.js +++ b/test/parallel/test-domain-enter-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Make sure the domain stack is a stack diff --git a/test/parallel/test-domain-exit-dispose-again.js b/test/parallel/test-domain-exit-dispose-again.js index 542950f8af428e..31a1ff598a32a8 100644 --- a/test/parallel/test-domain-exit-dispose-again.js +++ b/test/parallel/test-domain-exit-dispose-again.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This test makes sure that when a domain is disposed, timers that are diff --git a/test/parallel/test-domain-exit-dispose.js b/test/parallel/test-domain-exit-dispose.js index e1797cb660a0c0..3bd7bc7103d68a 100644 --- a/test/parallel/test-domain-exit-dispose.js +++ b/test/parallel/test-domain-exit-dispose.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const common = require('../common'); diff --git a/test/parallel/test-domain-from-timer.js b/test/parallel/test-domain-from-timer.js index 2ffae758ef6490..ead0e1b8382fc5 100644 --- a/test/parallel/test-domain-from-timer.js +++ b/test/parallel/test-domain-from-timer.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Simple tests of most basic domain functionality. diff --git a/test/parallel/test-domain-http-server.js b/test/parallel/test-domain-http-server.js index d8bb5c843662b8..98e15a8437774b 100644 --- a/test/parallel/test-domain-http-server.js +++ b/test/parallel/test-domain-http-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const domain = require('domain'); diff --git a/test/parallel/test-domain-implicit-fs.js b/test/parallel/test-domain-implicit-fs.js index 265d291f61941b..6e4127763ce51c 100644 --- a/test/parallel/test-domain-implicit-fs.js +++ b/test/parallel/test-domain-implicit-fs.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Simple tests of most basic domain functionality. diff --git a/test/parallel/test-domain-multi.js b/test/parallel/test-domain-multi.js index ff974676b88291..016e9cd12805ed 100644 --- a/test/parallel/test-domain-multi.js +++ b/test/parallel/test-domain-multi.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Tests of multiple domains happening at once. diff --git a/test/parallel/test-domain-nested-throw.js b/test/parallel/test-domain-nested-throw.js index 39507446a3acfc..f7fcbcad648b15 100644 --- a/test/parallel/test-domain-nested-throw.js +++ b/test/parallel/test-domain-nested-throw.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-domain-nested.js b/test/parallel/test-domain-nested.js index 6d673adc7e6387..1f545696f5363e 100644 --- a/test/parallel/test-domain-nested.js +++ b/test/parallel/test-domain-nested.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Make sure that the nested domains don't cause the domain stack to grow diff --git a/test/parallel/test-domain-safe-exit.js b/test/parallel/test-domain-safe-exit.js index bbc3b2fe22cae8..f6c46d3d757cda 100644 --- a/test/parallel/test-domain-safe-exit.js +++ b/test/parallel/test-domain-safe-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Make sure the domain stack doesn't get clobbered by un-matched .exit() diff --git a/test/parallel/test-domain-stack.js b/test/parallel/test-domain-stack.js index 43152a4a3bb1c9..d8a5af8df861c7 100644 --- a/test/parallel/test-domain-stack.js +++ b/test/parallel/test-domain-stack.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Make sure that the domain stack doesn't get out of hand. diff --git a/test/parallel/test-domain-timers.js b/test/parallel/test-domain-timers.js index 79bd300545bf96..4f45ec437cc2dc 100644 --- a/test/parallel/test-domain-timers.js +++ b/test/parallel/test-domain-timers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const domain = require('domain'); diff --git a/test/parallel/test-domain.js b/test/parallel/test-domain.js index 11c14f3c011eb7..472f5bcb05a317 100644 --- a/test/parallel/test-domain.js +++ b/test/parallel/test-domain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Simple tests of most basic domain functionality. diff --git a/test/parallel/test-error-reporting.js b/test/parallel/test-error-reporting.js index fa7332a67a482b..7d1b1d8ceff863 100644 --- a/test/parallel/test-error-reporting.js +++ b/test/parallel/test-error-reporting.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-eval-require.js b/test/parallel/test-eval-require.js index 35f47a922af474..6e640d4ac6e496 100644 --- a/test/parallel/test-eval-require.js +++ b/test/parallel/test-eval-require.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-eval.js b/test/parallel/test-eval.js index cddbe86795a967..0383511ef79e0b 100644 --- a/test/parallel/test-eval.js +++ b/test/parallel/test-eval.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const util = require('util'); diff --git a/test/parallel/test-event-emitter-add-listeners.js b/test/parallel/test-event-emitter-add-listeners.js index 81af3fd50c8b50..18712087fbd19b 100644 --- a/test/parallel/test-event-emitter-add-listeners.js +++ b/test/parallel/test-event-emitter-add-listeners.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-check-listener-leaks.js b/test/parallel/test-event-emitter-check-listener-leaks.js index 5b9787f1b83bba..97553d632de966 100644 --- a/test/parallel/test-event-emitter-check-listener-leaks.js +++ b/test/parallel/test-event-emitter-check-listener-leaks.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-listeners-side-effects.js b/test/parallel/test-event-emitter-listeners-side-effects.js index 022750da406500..1066c5f3a7a71d 100644 --- a/test/parallel/test-event-emitter-listeners-side-effects.js +++ b/test/parallel/test-event-emitter-listeners-side-effects.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-event-emitter-listeners.js b/test/parallel/test-event-emitter-listeners.js index 8aedd8fc3766bd..9fe4626cd8d81d 100644 --- a/test/parallel/test-event-emitter-listeners.js +++ b/test/parallel/test-event-emitter-listeners.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/parallel/test-event-emitter-max-listeners.js b/test/parallel/test-event-emitter-max-listeners.js index 0ace154aa00a5c..c0c763f2ad5322 100644 --- a/test/parallel/test-event-emitter-max-listeners.js +++ b/test/parallel/test-event-emitter-max-listeners.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-method-names.js b/test/parallel/test-event-emitter-method-names.js index d0464b80a44fe1..c74b88aff7acf2 100644 --- a/test/parallel/test-event-emitter-method-names.js +++ b/test/parallel/test-event-emitter-method-names.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-modify-in-emit.js b/test/parallel/test-event-emitter-modify-in-emit.js index c13fad4347d617..9c28fecbdd8c4c 100644 --- a/test/parallel/test-event-emitter-modify-in-emit.js +++ b/test/parallel/test-event-emitter-modify-in-emit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-no-error-provided-to-error-event.js b/test/parallel/test-event-emitter-no-error-provided-to-error-event.js index bc9eac288737c2..1c56c7bc759215 100644 --- a/test/parallel/test-event-emitter-no-error-provided-to-error-event.js +++ b/test/parallel/test-event-emitter-no-error-provided-to-error-event.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-num-args.js b/test/parallel/test-event-emitter-num-args.js index 53ac0f79c20333..2de86fdf08b0d6 100644 --- a/test/parallel/test-event-emitter-num-args.js +++ b/test/parallel/test-event-emitter-num-args.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-once.js b/test/parallel/test-event-emitter-once.js index 724b2ffd16aad1..d440947ed2bde1 100644 --- a/test/parallel/test-event-emitter-once.js +++ b/test/parallel/test-event-emitter-once.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-remove-all-listeners.js b/test/parallel/test-event-emitter-remove-all-listeners.js index e793cedb0dd4cf..1784b0fc7b3b6f 100644 --- a/test/parallel/test-event-emitter-remove-all-listeners.js +++ b/test/parallel/test-event-emitter-remove-all-listeners.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-remove-listeners.js b/test/parallel/test-event-emitter-remove-listeners.js index dfdae52d1cf21d..b5722fec6c930d 100644 --- a/test/parallel/test-event-emitter-remove-listeners.js +++ b/test/parallel/test-event-emitter-remove-listeners.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-set-max-listeners-side-effects.js b/test/parallel/test-event-emitter-set-max-listeners-side-effects.js index 5235d05638441b..8e66e999a54cab 100644 --- a/test/parallel/test-event-emitter-set-max-listeners-side-effects.js +++ b/test/parallel/test-event-emitter-set-max-listeners-side-effects.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-event-emitter-subclass.js b/test/parallel/test-event-emitter-subclass.js index eb2018e78e4b85..c2a480d09de6ef 100644 --- a/test/parallel/test-event-emitter-subclass.js +++ b/test/parallel/test-event-emitter-subclass.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-exception-handler.js b/test/parallel/test-exception-handler.js index 506fbaed0ebf63..3ce9ad511ace4e 100644 --- a/test/parallel/test-exception-handler.js +++ b/test/parallel/test-exception-handler.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-exception-handler2.js b/test/parallel/test-exception-handler2.js index 1dabedf4c68730..cb22048bbf9a38 100644 --- a/test/parallel/test-exception-handler2.js +++ b/test/parallel/test-exception-handler2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-file-read-noexist.js b/test/parallel/test-file-read-noexist.js index 423c62dfd54c0f..8ffbdeb2d149aa 100644 --- a/test/parallel/test-file-read-noexist.js +++ b/test/parallel/test-file-read-noexist.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-file-write-stream.js b/test/parallel/test-file-write-stream.js index 3b6883444249e6..ed32a7791e03f0 100644 --- a/test/parallel/test-file-write-stream.js +++ b/test/parallel/test-file-write-stream.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-file-write-stream2.js b/test/parallel/test-file-write-stream2.js index 504a572dde67d7..e0e9dae33799d6 100644 --- a/test/parallel/test-file-write-stream2.js +++ b/test/parallel/test-file-write-stream2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-file-write-stream3.js b/test/parallel/test-file-write-stream3.js index 961f51ba82be7a..ed29d67ac9ad29 100644 --- a/test/parallel/test-file-write-stream3.js +++ b/test/parallel/test-file-write-stream3.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-append-file-sync.js b/test/parallel/test-fs-append-file-sync.js index c13fc8953ed5fa..eade1801cd8892 100644 --- a/test/parallel/test-fs-append-file-sync.js +++ b/test/parallel/test-fs-append-file-sync.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-append-file.js b/test/parallel/test-fs-append-file.js index 00691b1e74e6fe..72315026aa94c3 100644 --- a/test/parallel/test-fs-append-file.js +++ b/test/parallel/test-fs-append-file.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-chmod.js b/test/parallel/test-fs-chmod.js index 5121fd89f99466..e26ab16f902d7e 100644 --- a/test/parallel/test-fs-chmod.js +++ b/test/parallel/test-fs-chmod.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-empty-readStream.js b/test/parallel/test-fs-empty-readStream.js index 858d07e4f0b982..706a850b3c3881 100644 --- a/test/parallel/test-fs-empty-readStream.js +++ b/test/parallel/test-fs-empty-readStream.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-error-messages.js b/test/parallel/test-fs-error-messages.js index f2ea85531bf463..a10e97348f2748 100644 --- a/test/parallel/test-fs-error-messages.js +++ b/test/parallel/test-fs-error-messages.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-exists.js b/test/parallel/test-fs-exists.js index 14e1446f5a6d3d..fa8fd688446c3d 100644 --- a/test/parallel/test-fs-exists.js +++ b/test/parallel/test-fs-exists.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-fsync.js b/test/parallel/test-fs-fsync.js index f69a3c5e7f13c6..0a4ebf08e4db39 100644 --- a/test/parallel/test-fs-fsync.js +++ b/test/parallel/test-fs-fsync.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-long-path.js b/test/parallel/test-fs-long-path.js index a85a1b5cb52fa1..b8aa6a2ac871a1 100644 --- a/test/parallel/test-fs-long-path.js +++ b/test/parallel/test-fs-long-path.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const fs = require('fs'); diff --git a/test/parallel/test-fs-mkdir.js b/test/parallel/test-fs-mkdir.js index 73fc899ce57597..0a520a89067670 100644 --- a/test/parallel/test-fs-mkdir.js +++ b/test/parallel/test-fs-mkdir.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-null-bytes.js b/test/parallel/test-fs-null-bytes.js index 522a1591e63962..9adeeea3df8b39 100644 --- a/test/parallel/test-fs-null-bytes.js +++ b/test/parallel/test-fs-null-bytes.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-open-flags.js b/test/parallel/test-fs-open-flags.js index ee3380691104a4..742b997e60551d 100644 --- a/test/parallel/test-fs-open-flags.js +++ b/test/parallel/test-fs-open-flags.js @@ -1,3 +1,24 @@ +// 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. + // Flags: --expose_internals 'use strict'; require('../common'); diff --git a/test/parallel/test-fs-open.js b/test/parallel/test-fs-open.js index d2d24b1e07ab75..94817844bdcb4c 100644 --- a/test/parallel/test-fs-open.js +++ b/test/parallel/test-fs-open.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-read-file-sync-hostname.js b/test/parallel/test-fs-read-file-sync-hostname.js index ca300819e704c6..f7a03e552478a4 100644 --- a/test/parallel/test-fs-read-file-sync-hostname.js +++ b/test/parallel/test-fs-read-file-sync-hostname.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-read-file-sync.js b/test/parallel/test-fs-read-file-sync.js index 45d08f40111f78..14e5db3827e43e 100644 --- a/test/parallel/test-fs-read-file-sync.js +++ b/test/parallel/test-fs-read-file-sync.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-read-stream-err.js b/test/parallel/test-fs-read-stream-err.js index 144337ded482d8..a9b4838cf1834f 100644 --- a/test/parallel/test-fs-read-stream-err.js +++ b/test/parallel/test-fs-read-stream-err.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-read-stream-fd.js b/test/parallel/test-fs-read-stream-fd.js index a9ff56ee93fd91..c5ee6c05ef1e5a 100644 --- a/test/parallel/test-fs-read-stream-fd.js +++ b/test/parallel/test-fs-read-stream-fd.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const fs = require('fs'); diff --git a/test/parallel/test-fs-read-stream-resume.js b/test/parallel/test-fs-read-stream-resume.js index 6c8b2c2421c8e3..d36dd127bf10e6 100644 --- a/test/parallel/test-fs-read-stream-resume.js +++ b/test/parallel/test-fs-read-stream-resume.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-read-stream.js b/test/parallel/test-fs-read-stream.js index d17703fabe6a27..a273d3efda99f2 100644 --- a/test/parallel/test-fs-read-stream.js +++ b/test/parallel/test-fs-read-stream.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-read.js b/test/parallel/test-fs-read.js index 350f287f794c64..6744627737a549 100644 --- a/test/parallel/test-fs-read.js +++ b/test/parallel/test-fs-read.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfile-empty.js b/test/parallel/test-fs-readfile-empty.js index afc0863673ee49..ee2f3f722e1378 100644 --- a/test/parallel/test-fs-readfile-empty.js +++ b/test/parallel/test-fs-readfile-empty.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfile-error.js b/test/parallel/test-fs-readfile-error.js index 827c84d7b7093c..da64505e242b2c 100644 --- a/test/parallel/test-fs-readfile-error.js +++ b/test/parallel/test-fs-readfile-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfile-pipe.js b/test/parallel/test-fs-readfile-pipe.js index 566dbbe4c84929..10fc6a925af47a 100644 --- a/test/parallel/test-fs-readfile-pipe.js +++ b/test/parallel/test-fs-readfile-pipe.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfile-unlink.js b/test/parallel/test-fs-readfile-unlink.js index 5b1cbd14f9c4a4..1098fb73743b97 100644 --- a/test/parallel/test-fs-readfile-unlink.js +++ b/test/parallel/test-fs-readfile-unlink.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfile-zero-byte-liar.js b/test/parallel/test-fs-readfile-zero-byte-liar.js index 82037a77e62122..625438e7c68c88 100644 --- a/test/parallel/test-fs-readfile-zero-byte-liar.js +++ b/test/parallel/test-fs-readfile-zero-byte-liar.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 96a6deae8af0f6..ee77ca08990efe 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-sir-writes-alot.js b/test/parallel/test-fs-sir-writes-alot.js index 7bf97ff1d5cba3..0b27d90766e2e9 100644 --- a/test/parallel/test-fs-sir-writes-alot.js +++ b/test/parallel/test-fs-sir-writes-alot.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const fs = require('fs'); diff --git a/test/parallel/test-fs-stat.js b/test/parallel/test-fs-stat.js index 00fcc1df21c586..ec44d29ae923d6 100644 --- a/test/parallel/test-fs-stat.js +++ b/test/parallel/test-fs-stat.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable strict */ const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-stream-double-close.js b/test/parallel/test-fs-stream-double-close.js index ae6429a62b4f3c..dd896df16ef3aa 100644 --- a/test/parallel/test-fs-stream-double-close.js +++ b/test/parallel/test-fs-stream-double-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const fs = require('fs'); diff --git a/test/parallel/test-fs-symlink-dir-junction-relative.js b/test/parallel/test-fs-symlink-dir-junction-relative.js index 3a2ba1a06c78db..964c32848e3bbb 100644 --- a/test/parallel/test-fs-symlink-dir-junction-relative.js +++ b/test/parallel/test-fs-symlink-dir-junction-relative.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Test creating and resolving relative junction or symbolic link diff --git a/test/parallel/test-fs-symlink-dir-junction.js b/test/parallel/test-fs-symlink-dir-junction.js index ed0430b947ba0c..0c85f3991c0833 100644 --- a/test/parallel/test-fs-symlink-dir-junction.js +++ b/test/parallel/test-fs-symlink-dir-junction.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-symlink.js b/test/parallel/test-fs-symlink.js index c8c6fc933d367b..2ceb4d10936a3f 100644 --- a/test/parallel/test-fs-symlink.js +++ b/test/parallel/test-fs-symlink.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-sync-fd-leak.js b/test/parallel/test-fs-sync-fd-leak.js index 75125d6c679784..10b09481ddefb9 100644 --- a/test/parallel/test-fs-sync-fd-leak.js +++ b/test/parallel/test-fs-sync-fd-leak.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-truncate-GH-6233.js b/test/parallel/test-fs-truncate-GH-6233.js index 95eaf12cbb77f9..b2982cccb9c6e8 100644 --- a/test/parallel/test-fs-truncate-GH-6233.js +++ b/test/parallel/test-fs-truncate-GH-6233.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-truncate.js b/test/parallel/test-fs-truncate.js index 57d706bddbf8f6..a56a1a054ca718 100644 --- a/test/parallel/test-fs-truncate.js +++ b/test/parallel/test-fs-truncate.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-utimes.js b/test/parallel/test-fs-utimes.js index b28a2b96e2075e..2d00d0eaed5847 100644 --- a/test/parallel/test-fs-utimes.js +++ b/test/parallel/test-fs-utimes.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-write-buffer.js b/test/parallel/test-fs-write-buffer.js index 89570314cc504c..ed998958ae060f 100644 --- a/test/parallel/test-fs-write-buffer.js +++ b/test/parallel/test-fs-write-buffer.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-write-file-buffer.js b/test/parallel/test-fs-write-file-buffer.js index 409ddf1d51f557..f2039c87ab4f0e 100644 --- a/test/parallel/test-fs-write-file-buffer.js +++ b/test/parallel/test-fs-write-file-buffer.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const join = require('path').join; diff --git a/test/parallel/test-fs-write-file-sync.js b/test/parallel/test-fs-write-file-sync.js index ca6324ac1ff789..d888fcd3a3b7c1 100644 --- a/test/parallel/test-fs-write-file-sync.js +++ b/test/parallel/test-fs-write-file-sync.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-write-file.js b/test/parallel/test-fs-write-file.js index acc69764fe1425..b18308ad0cc77b 100644 --- a/test/parallel/test-fs-write-file.js +++ b/test/parallel/test-fs-write-file.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-write-stream-change-open.js b/test/parallel/test-fs-write-stream-change-open.js index 146b507a48ac61..50860f2e405f18 100644 --- a/test/parallel/test-fs-write-stream-change-open.js +++ b/test/parallel/test-fs-write-stream-change-open.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-write-stream-end.js b/test/parallel/test-fs-write-stream-end.js index 6329aee4167d7b..c23f13c1e0fb33 100644 --- a/test/parallel/test-fs-write-stream-end.js +++ b/test/parallel/test-fs-write-stream-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-write-stream-err.js b/test/parallel/test-fs-write-stream-err.js index 4a2b3cd130b4c4..762f6188e0a080 100644 --- a/test/parallel/test-fs-write-stream-err.js +++ b/test/parallel/test-fs-write-stream-err.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-write-stream.js b/test/parallel/test-fs-write-stream.js index a3ba0377e2e26e..3b1404f12b29b1 100644 --- a/test/parallel/test-fs-write-stream.js +++ b/test/parallel/test-fs-write-stream.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-write-sync.js b/test/parallel/test-fs-write-sync.js index f663d4a5bfe5f5..41a9f2c8887b32 100644 --- a/test/parallel/test-fs-write-sync.js +++ b/test/parallel/test-fs-write-sync.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-fs-write.js b/test/parallel/test-fs-write.js index 81f5cf707bf00a..e8e31e22fb13f6 100644 --- a/test/parallel/test-fs-write.js +++ b/test/parallel/test-fs-write.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-global.js b/test/parallel/test-global.js index d88f0895869997..42e8eeb7274b21 100644 --- a/test/parallel/test-global.js +++ b/test/parallel/test-global.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable strict */ const common = require('../common'); const path = require('path'); diff --git a/test/parallel/test-handle-wrap-close-abort.js b/test/parallel/test-handle-wrap-close-abort.js index e9f69195ad29cd..33042766757fc1 100644 --- a/test/parallel/test-handle-wrap-close-abort.js +++ b/test/parallel/test-handle-wrap-close-abort.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-http-1.0-keep-alive.js b/test/parallel/test-http-1.0-keep-alive.js index dea5f65c54184d..f3b69a4cd059dd 100644 --- a/test/parallel/test-http-1.0-keep-alive.js +++ b/test/parallel/test-http-1.0-keep-alive.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-1.0.js b/test/parallel/test-http-1.0.js index d98da182a9fee5..f67d949bc8f5f6 100644 --- a/test/parallel/test-http-1.0.js +++ b/test/parallel/test-http-1.0.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-abort-before-end.js b/test/parallel/test-http-abort-before-end.js index f8e0272d43e088..37d1291b074127 100644 --- a/test/parallel/test-http-abort-before-end.js +++ b/test/parallel/test-http-abort-before-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-abort-client.js b/test/parallel/test-http-abort-client.js index 6c00a1e6c64328..8e1da309e6fbc8 100644 --- a/test/parallel/test-http-abort-client.js +++ b/test/parallel/test-http-abort-client.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-abort-queued.js b/test/parallel/test-http-abort-queued.js index 60dde248df542c..639947560e5b35 100644 --- a/test/parallel/test-http-abort-queued.js +++ b/test/parallel/test-http-abort-queued.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-after-connect.js b/test/parallel/test-http-after-connect.js index a93d0b83aa6f4f..323c905a873c81 100644 --- a/test/parallel/test-http-after-connect.js +++ b/test/parallel/test-http-after-connect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-agent-destroyed-socket.js b/test/parallel/test-http-agent-destroyed-socket.js index f0ef6c8808fe7d..322373e69cdd4e 100644 --- a/test/parallel/test-http-agent-destroyed-socket.js +++ b/test/parallel/test-http-agent-destroyed-socket.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-agent-false.js b/test/parallel/test-http-agent-false.js index 5c9907bb706d32..0e633c7c103b76 100644 --- a/test/parallel/test-http-agent-false.js +++ b/test/parallel/test-http-agent-false.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-agent-keepalive.js b/test/parallel/test-http-agent-keepalive.js index 9ea3fd7677aebe..c695b55bfa5ee7 100644 --- a/test/parallel/test-http-agent-keepalive.js +++ b/test/parallel/test-http-agent-keepalive.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-agent-no-protocol.js b/test/parallel/test-http-agent-no-protocol.js index a11489b6c5bc2b..4630ef8ee6388d 100644 --- a/test/parallel/test-http-agent-no-protocol.js +++ b/test/parallel/test-http-agent-no-protocol.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-agent-null.js b/test/parallel/test-http-agent-null.js index 9071b88b98997a..784dc32211c807 100644 --- a/test/parallel/test-http-agent-null.js +++ b/test/parallel/test-http-agent-null.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-agent.js b/test/parallel/test-http-agent.js index cfb37539ede878..23878673aaf8dc 100644 --- a/test/parallel/test-http-agent.js +++ b/test/parallel/test-http-agent.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-allow-req-after-204-res.js b/test/parallel/test-http-allow-req-after-204-res.js index e2243400fcc5bb..cd55a4f17c2b1e 100644 --- a/test/parallel/test-http-allow-req-after-204-res.js +++ b/test/parallel/test-http-allow-req-after-204-res.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-bind-twice.js b/test/parallel/test-http-bind-twice.js index bab6c0fe1e15d2..50834cc5cb028b 100644 --- a/test/parallel/test-http-bind-twice.js +++ b/test/parallel/test-http-bind-twice.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-blank-header.js b/test/parallel/test-http-blank-header.js index edd8923fa8e2f7..1659dc5ed5fd5d 100644 --- a/test/parallel/test-http-blank-header.js +++ b/test/parallel/test-http-blank-header.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-buffer-sanity.js b/test/parallel/test-http-buffer-sanity.js index 4226f1c65237fa..c94ea1f3582b69 100644 --- a/test/parallel/test-http-buffer-sanity.js +++ b/test/parallel/test-http-buffer-sanity.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-byteswritten.js b/test/parallel/test-http-byteswritten.js index c92506e82717f4..32495613afa66f 100644 --- a/test/parallel/test-http-byteswritten.js +++ b/test/parallel/test-http-byteswritten.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-chunked-304.js b/test/parallel/test-http-chunked-304.js index b130004d1a83e7..2a8c33a5901f92 100644 --- a/test/parallel/test-http-chunked-304.js +++ b/test/parallel/test-http-chunked-304.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-chunked.js b/test/parallel/test-http-chunked.js index b70a704bb7fce4..133c1d847792b1 100644 --- a/test/parallel/test-http-chunked.js +++ b/test/parallel/test-http-chunked.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-abort.js b/test/parallel/test-http-client-abort.js index 5c5b319bfa4f5f..549344f0cdbbdf 100644 --- a/test/parallel/test-http-client-abort.js +++ b/test/parallel/test-http-client-abort.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-abort2.js b/test/parallel/test-http-client-abort2.js index 7c7be9b530e2d2..7d28df28997a78 100644 --- a/test/parallel/test-http-client-abort2.js +++ b/test/parallel/test-http-client-abort2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-client-agent.js b/test/parallel/test-http-client-agent.js index 277c7a33ae586a..d3e1dea7aae61d 100644 --- a/test/parallel/test-http-client-agent.js +++ b/test/parallel/test-http-client-agent.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-default-headers-exist.js b/test/parallel/test-http-client-default-headers-exist.js index 2271944773d9db..45bc861b4ccb51 100644 --- a/test/parallel/test-http-client-default-headers-exist.js +++ b/test/parallel/test-http-client-default-headers-exist.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-encoding.js b/test/parallel/test-http-client-encoding.js index d2aa8fdcbbac46..8e795481af7289 100644 --- a/test/parallel/test-http-client-encoding.js +++ b/test/parallel/test-http-client-encoding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/parallel/test-http-client-get-url.js b/test/parallel/test-http-client-get-url.js index aa37055050c952..1355339580b0ff 100644 --- a/test/parallel/test-http-client-get-url.js +++ b/test/parallel/test-http-client-get-url.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-parse-error.js b/test/parallel/test-http-client-parse-error.js index e649f983a51626..f82627af813f1a 100644 --- a/test/parallel/test-http-client-parse-error.js +++ b/test/parallel/test-http-client-parse-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-pipe-end.js b/test/parallel/test-http-client-pipe-end.js index d4ccba8d55b036..81955996528e8f 100644 --- a/test/parallel/test-http-client-pipe-end.js +++ b/test/parallel/test-http-client-pipe-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // see https://github.com/joyent/node/issues/3257 diff --git a/test/parallel/test-http-client-race-2.js b/test/parallel/test-http-client-race-2.js index 24475059c55688..e1f8409a8cbd50 100644 --- a/test/parallel/test-http-client-race-2.js +++ b/test/parallel/test-http-client-race-2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-race.js b/test/parallel/test-http-client-race.js index f7610507378921..33c74ce370866a 100644 --- a/test/parallel/test-http-client-race.js +++ b/test/parallel/test-http-client-race.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-readable.js b/test/parallel/test-http-client-readable.js index bc6421692b305b..b381455e3699a5 100644 --- a/test/parallel/test-http-client-readable.js +++ b/test/parallel/test-http-client-readable.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-response-domain.js b/test/parallel/test-http-client-response-domain.js index 20babf51a9178a..dab5711eb17833 100644 --- a/test/parallel/test-http-client-response-domain.js +++ b/test/parallel/test-http-client-response-domain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-timeout-agent.js b/test/parallel/test-http-client-timeout-agent.js index 16a18342468f94..1e39797cdee94a 100644 --- a/test/parallel/test-http-client-timeout-agent.js +++ b/test/parallel/test-http-client-timeout-agent.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-timeout-event.js b/test/parallel/test-http-client-timeout-event.js index 623b253a20e667..c76d56ef256407 100644 --- a/test/parallel/test-http-client-timeout-event.js +++ b/test/parallel/test-http-client-timeout-event.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-client-timeout-with-data.js b/test/parallel/test-http-client-timeout-with-data.js index a21a2181752701..b7bd2c5479fd77 100644 --- a/test/parallel/test-http-client-timeout-with-data.js +++ b/test/parallel/test-http-client-timeout-with-data.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-timeout.js b/test/parallel/test-http-client-timeout.js index 0caae0d04c333c..bf0a3fbe54f8ce 100644 --- a/test/parallel/test-http-client-timeout.js +++ b/test/parallel/test-http-client-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-unescaped-path.js b/test/parallel/test-http-client-unescaped-path.js index eefae90541f66d..3aede27e7dde55 100644 --- a/test/parallel/test-http-client-unescaped-path.js +++ b/test/parallel/test-http-client-unescaped-path.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-upload-buf.js b/test/parallel/test-http-client-upload-buf.js index 208de06e8ebcd5..b56c1302c2ad00 100644 --- a/test/parallel/test-http-client-upload-buf.js +++ b/test/parallel/test-http-client-upload-buf.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-client-upload.js b/test/parallel/test-http-client-upload.js index 474dc333d142cd..5b384de743fb61 100644 --- a/test/parallel/test-http-client-upload.js +++ b/test/parallel/test-http-client-upload.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-conn-reset.js b/test/parallel/test-http-conn-reset.js index ddcd9ee686b6ac..ffb3aa07551bfd 100644 --- a/test/parallel/test-http-conn-reset.js +++ b/test/parallel/test-http-conn-reset.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-connect.js b/test/parallel/test-http-connect.js index 9eef52146b6971..7aeac2af71af3f 100644 --- a/test/parallel/test-http-connect.js +++ b/test/parallel/test-http-connect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-contentLength0.js b/test/parallel/test-http-contentLength0.js index 46eec45ed2757f..25e098d425fb2c 100644 --- a/test/parallel/test-http-contentLength0.js +++ b/test/parallel/test-http-contentLength0.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-createConnection.js b/test/parallel/test-http-createConnection.js index 279d7022795318..e5bb3834100a7c 100644 --- a/test/parallel/test-http-createConnection.js +++ b/test/parallel/test-http-createConnection.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-date-header.js b/test/parallel/test-http-date-header.js index e14a92b310f2d1..386501c9f4703e 100644 --- a/test/parallel/test-http-date-header.js +++ b/test/parallel/test-http-date-header.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-default-encoding.js b/test/parallel/test-http-default-encoding.js index 2c41328749f027..9fb0cca6563b36 100644 --- a/test/parallel/test-http-default-encoding.js +++ b/test/parallel/test-http-default-encoding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-default-port.js b/test/parallel/test-http-default-port.js index 146e5846c107b6..c09bb184957375 100644 --- a/test/parallel/test-http-default-port.js +++ b/test/parallel/test-http-default-port.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-http-destroyed-socket-write2.js b/test/parallel/test-http-destroyed-socket-write2.js index c10e8eb15527d1..99a0c4663a8ba3 100644 --- a/test/parallel/test-http-destroyed-socket-write2.js +++ b/test/parallel/test-http-destroyed-socket-write2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-dns-error.js b/test/parallel/test-http-dns-error.js index 25224902513049..4a724b0b41a056 100644 --- a/test/parallel/test-http-dns-error.js +++ b/test/parallel/test-http-dns-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-http-end-throw-socket-handling.js b/test/parallel/test-http-end-throw-socket-handling.js index cb4f125948a3c9..31d6228dded80d 100644 --- a/test/parallel/test-http-end-throw-socket-handling.js +++ b/test/parallel/test-http-end-throw-socket-handling.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-http-eof-on-connect.js b/test/parallel/test-http-eof-on-connect.js index f67e45ed403225..1dd27e5956261e 100644 --- a/test/parallel/test-http-eof-on-connect.js +++ b/test/parallel/test-http-eof-on-connect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const net = require('net'); diff --git a/test/parallel/test-http-exceptions.js b/test/parallel/test-http-exceptions.js index c003db131065a3..37b413671312ad 100644 --- a/test/parallel/test-http-exceptions.js +++ b/test/parallel/test-http-exceptions.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-expect-continue.js b/test/parallel/test-http-expect-continue.js index 01f285d29e54fb..5a08aa9fed5a58 100644 --- a/test/parallel/test-http-expect-continue.js +++ b/test/parallel/test-http-expect-continue.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-extra-response.js b/test/parallel/test-http-extra-response.js index 5e994134c2e2ad..61355449d1c476 100644 --- a/test/parallel/test-http-extra-response.js +++ b/test/parallel/test-http-extra-response.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-flush.js b/test/parallel/test-http-flush.js index e8f5782c2f7857..24f43d5efecfa4 100644 --- a/test/parallel/test-http-flush.js +++ b/test/parallel/test-http-flush.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-full-response.js b/test/parallel/test-http-full-response.js index 881734ceb1af6f..c8cfdee2842e8c 100644 --- a/test/parallel/test-http-full-response.js +++ b/test/parallel/test-http-full-response.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-get-pipeline-problem.js b/test/parallel/test-http-get-pipeline-problem.js index e3de0bd16ca146..cfe4b12b1a14df 100644 --- a/test/parallel/test-http-get-pipeline-problem.js +++ b/test/parallel/test-http-get-pipeline-problem.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // In previous versions of Node.js (e.g., 0.6.0), this sort of thing would halt // after http.globalAgent.maxSockets number of files. diff --git a/test/parallel/test-http-head-request.js b/test/parallel/test-http-head-request.js index de94dfb8b7d6e7..26d490d357dcfd 100644 --- a/test/parallel/test-http-head-request.js +++ b/test/parallel/test-http-head-request.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-head-response-has-no-body-end.js b/test/parallel/test-http-head-response-has-no-body-end.js index de5ca976fc47b0..824a1bafe3a5e3 100644 --- a/test/parallel/test-http-head-response-has-no-body-end.js +++ b/test/parallel/test-http-head-response-has-no-body-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-head-response-has-no-body.js b/test/parallel/test-http-head-response-has-no-body.js index b2eb98b1eea06c..bd96d7161b7a4f 100644 --- a/test/parallel/test-http-head-response-has-no-body.js +++ b/test/parallel/test-http-head-response-has-no-body.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-header-read.js b/test/parallel/test-http-header-read.js index 5465fd30f272be..e2b92924073a31 100644 --- a/test/parallel/test-http-header-read.js +++ b/test/parallel/test-http-header-read.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-hex-write.js b/test/parallel/test-http-hex-write.js index 211f818e566699..a3cbec6b36c0ad 100644 --- a/test/parallel/test-http-hex-write.js +++ b/test/parallel/test-http-hex-write.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-host-headers.js b/test/parallel/test-http-host-headers.js index a6667c64034835..a16e4fea095314 100644 --- a/test/parallel/test-http-host-headers.js +++ b/test/parallel/test-http-host-headers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-incoming-pipelined-socket-destroy.js b/test/parallel/test-http-incoming-pipelined-socket-destroy.js index 1465f189dd2045..b9603a5791690c 100644 --- a/test/parallel/test-http-incoming-pipelined-socket-destroy.js +++ b/test/parallel/test-http-incoming-pipelined-socket-destroy.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-http-keep-alive-close-on-header.js b/test/parallel/test-http-keep-alive-close-on-header.js index b36fb2e8db9a5a..fa459a00e671a9 100644 --- a/test/parallel/test-http-keep-alive-close-on-header.js +++ b/test/parallel/test-http-keep-alive-close-on-header.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-keep-alive.js b/test/parallel/test-http-keep-alive.js index 7f12e45765451d..1dc65f72120e55 100644 --- a/test/parallel/test-http-keep-alive.js +++ b/test/parallel/test-http-keep-alive.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-keepalive-client.js b/test/parallel/test-http-keepalive-client.js index eaefa3887c395d..319165c59d3a90 100644 --- a/test/parallel/test-http-keepalive-client.js +++ b/test/parallel/test-http-keepalive-client.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-keepalive-maxsockets.js b/test/parallel/test-http-keepalive-maxsockets.js index 0d684a43f778f9..e4db44f0a764c1 100644 --- a/test/parallel/test-http-keepalive-maxsockets.js +++ b/test/parallel/test-http-keepalive-maxsockets.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-keepalive-request.js b/test/parallel/test-http-keepalive-request.js index 5f53f6d999f38d..e0d17fa8f1eb3f 100644 --- a/test/parallel/test-http-keepalive-request.js +++ b/test/parallel/test-http-keepalive-request.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-localaddress-bind-error.js b/test/parallel/test-http-localaddress-bind-error.js index a23c6f2a4452a6..90ac1090802f30 100644 --- a/test/parallel/test-http-localaddress-bind-error.js +++ b/test/parallel/test-http-localaddress-bind-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-localaddress.js b/test/parallel/test-http-localaddress.js index d48a4ec8f5b0ee..9053c5e089b8c9 100644 --- a/test/parallel/test-http-localaddress.js +++ b/test/parallel/test-http-localaddress.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-malformed-request.js b/test/parallel/test-http-malformed-request.js index 93aff802c7afbd..1b0a0278cc75c8 100644 --- a/test/parallel/test-http-malformed-request.js +++ b/test/parallel/test-http-malformed-request.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-many-ended-pipelines.js b/test/parallel/test-http-many-ended-pipelines.js index b4af99ef00a9d4..d17090cec918a0 100644 --- a/test/parallel/test-http-many-ended-pipelines.js +++ b/test/parallel/test-http-many-ended-pipelines.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/parallel/test-http-max-headers-count.js b/test/parallel/test-http-max-headers-count.js index fd92637f7ac10b..342a6a04127f31 100644 --- a/test/parallel/test-http-max-headers-count.js +++ b/test/parallel/test-http-max-headers-count.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-methods.js b/test/parallel/test-http-methods.js index 6ba02807f8706b..0f24c5abe6508c 100644 --- a/test/parallel/test-http-methods.js +++ b/test/parallel/test-http-methods.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-multi-line-headers.js b/test/parallel/test-http-multi-line-headers.js index f7998c254870d5..fb629ccc46ae60 100644 --- a/test/parallel/test-http-multi-line-headers.js +++ b/test/parallel/test-http-multi-line-headers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-mutable-headers.js b/test/parallel/test-http-mutable-headers.js index d78632c214fe51..562b53f915b7a9 100644 --- a/test/parallel/test-http-mutable-headers.js +++ b/test/parallel/test-http-mutable-headers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-no-content-length.js b/test/parallel/test-http-no-content-length.js index a6cfad13aa2b44..f43d4da42ef8a3 100644 --- a/test/parallel/test-http-no-content-length.js +++ b/test/parallel/test-http-no-content-length.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-outgoing-finish.js b/test/parallel/test-http-outgoing-finish.js index 73654909d88e1b..13c1eafdd6e4cc 100644 --- a/test/parallel/test-http-outgoing-finish.js +++ b/test/parallel/test-http-outgoing-finish.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-parser-free.js b/test/parallel/test-http-parser-free.js index aff0fa6198ef44..53a9a8e5f7841e 100644 --- a/test/parallel/test-http-parser-free.js +++ b/test/parallel/test-http-parser-free.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-parser.js b/test/parallel/test-http-parser.js index 33a7f20ecd13da..a4e03ab4c3bd4d 100644 --- a/test/parallel/test-http-parser.js +++ b/test/parallel/test-http-parser.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-pause-resume-one-end.js b/test/parallel/test-http-pause-resume-one-end.js index 6b98246cc271ac..3fab54c3c7aa27 100644 --- a/test/parallel/test-http-pause-resume-one-end.js +++ b/test/parallel/test-http-pause-resume-one-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-pause.js b/test/parallel/test-http-pause.js index 440cab413c50a5..8fe942491089d3 100644 --- a/test/parallel/test-http-pause.js +++ b/test/parallel/test-http-pause.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-pipe-fs.js b/test/parallel/test-http-pipe-fs.js index 5348637bd07145..e3c13c5a79c943 100644 --- a/test/parallel/test-http-pipe-fs.js +++ b/test/parallel/test-http-pipe-fs.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-proxy.js b/test/parallel/test-http-proxy.js index 91dce932dc576b..9808e506961dc2 100644 --- a/test/parallel/test-http-proxy.js +++ b/test/parallel/test-http-proxy.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-raw-headers.js b/test/parallel/test-http-raw-headers.js index 7ae0c35e3d8d11..eb3f7280f89100 100644 --- a/test/parallel/test-http-raw-headers.js +++ b/test/parallel/test-http-raw-headers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-remove-header-stays-removed.js b/test/parallel/test-http-remove-header-stays-removed.js index c38a042283dbb9..6617a1775441b7 100644 --- a/test/parallel/test-http-remove-header-stays-removed.js +++ b/test/parallel/test-http-remove-header-stays-removed.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-request-end-twice.js b/test/parallel/test-http-request-end-twice.js index ab30c0a1eef8a1..27db0a6a5ee568 100644 --- a/test/parallel/test-http-request-end-twice.js +++ b/test/parallel/test-http-request-end-twice.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-request-end.js b/test/parallel/test-http-request-end.js index dd4a8caf105329..6dd5fa4e91b1b2 100644 --- a/test/parallel/test-http-request-end.js +++ b/test/parallel/test-http-request-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-request-methods.js b/test/parallel/test-http-request-methods.js index e4579791ef301a..888206c5acc291 100644 --- a/test/parallel/test-http-request-methods.js +++ b/test/parallel/test-http-request-methods.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-res-write-after-end.js b/test/parallel/test-http-res-write-after-end.js index 45db9fe13f7655..7133e32429e7b1 100644 --- a/test/parallel/test-http-res-write-after-end.js +++ b/test/parallel/test-http-res-write-after-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-res-write-end-dont-take-array.js b/test/parallel/test-http-res-write-end-dont-take-array.js index 6964ec15965a96..0d519d60592922 100644 --- a/test/parallel/test-http-res-write-end-dont-take-array.js +++ b/test/parallel/test-http-res-write-end-dont-take-array.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-response-close.js b/test/parallel/test-http-response-close.js index de179c113e1db1..c58a5884d59d1a 100644 --- a/test/parallel/test-http-response-close.js +++ b/test/parallel/test-http-response-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-response-no-headers.js b/test/parallel/test-http-response-no-headers.js index e10571af4ccf25..bfd74e1749e5b0 100644 --- a/test/parallel/test-http-response-no-headers.js +++ b/test/parallel/test-http-response-no-headers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-response-readable.js b/test/parallel/test-http-response-readable.js index a4906643d3d35b..ce077320052079 100644 --- a/test/parallel/test-http-response-readable.js +++ b/test/parallel/test-http-response-readable.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-response-status-message.js b/test/parallel/test-http-response-status-message.js index 14fcb43027a599..460fc1890fdf10 100644 --- a/test/parallel/test-http-response-status-message.js +++ b/test/parallel/test-http-response-status-message.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-server-multiheaders.js b/test/parallel/test-http-server-multiheaders.js index a89d45fd6c6195..89d17d0f50774d 100644 --- a/test/parallel/test-http-server-multiheaders.js +++ b/test/parallel/test-http-server-multiheaders.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Verify that the HTTP server implementation handles multiple instances // of the same header as per RFC2616: joining the handful of fields by ', ' diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js index febffe05235b7f..6634f46fec06d7 100644 --- a/test/parallel/test-http-server-multiheaders2.js +++ b/test/parallel/test-http-server-multiheaders2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Verify that the HTTP server implementation handles multiple instances // of the same header as per RFC2616: joining the handful of fields by ', ' diff --git a/test/parallel/test-http-server-stale-close.js b/test/parallel/test-http-server-stale-close.js index 3728453c039447..5d903f0c42f74e 100644 --- a/test/parallel/test-http-server-stale-close.js +++ b/test/parallel/test-http-server-stale-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-server.js b/test/parallel/test-http-server.js index 90c2709ebdbc5c..701d91f623fff1 100644 --- a/test/parallel/test-http-server.js +++ b/test/parallel/test-http-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-set-cookies.js b/test/parallel/test-http-set-cookies.js index 7be28b04034fb0..44a5f47bbb3d03 100644 --- a/test/parallel/test-http-set-cookies.js +++ b/test/parallel/test-http-set-cookies.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-set-timeout-server.js b/test/parallel/test-http-set-timeout-server.js index 097aeb260bdc5e..43b74069ac066d 100644 --- a/test/parallel/test-http-set-timeout-server.js +++ b/test/parallel/test-http-set-timeout-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-set-timeout.js b/test/parallel/test-http-set-timeout.js index 965b3486faee95..6253a4cc8c0a4c 100644 --- a/test/parallel/test-http-set-timeout.js +++ b/test/parallel/test-http-set-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-set-trailers.js b/test/parallel/test-http-set-trailers.js index def13aa89521de..50cc10098c2ef4 100644 --- a/test/parallel/test-http-set-trailers.js +++ b/test/parallel/test-http-set-trailers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-should-keep-alive.js b/test/parallel/test-http-should-keep-alive.js index 190c8c8d8843ad..742c1f03bdeaf7 100644 --- a/test/parallel/test-http-should-keep-alive.js +++ b/test/parallel/test-http-should-keep-alive.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-status-code.js b/test/parallel/test-http-status-code.js index 111b5db16daecb..42001f963f7f3e 100644 --- a/test/parallel/test-http-status-code.js +++ b/test/parallel/test-http-status-code.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-status-message.js b/test/parallel/test-http-status-message.js index 54c683212b8ff1..10d17295814e84 100644 --- a/test/parallel/test-http-status-message.js +++ b/test/parallel/test-http-status-message.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-timeout-overflow.js b/test/parallel/test-http-timeout-overflow.js index 755859ddc9992d..d880309a5d3dd7 100644 --- a/test/parallel/test-http-timeout-overflow.js +++ b/test/parallel/test-http-timeout-overflow.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-timeout.js b/test/parallel/test-http-timeout.js index 63f87ed63089ee..8c24f6e16b96b2 100644 --- a/test/parallel/test-http-timeout.js +++ b/test/parallel/test-http-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/parallel/test-http-unix-socket.js b/test/parallel/test-http-unix-socket.js index f9308d86325cd1..2d29b82b016fd1 100644 --- a/test/parallel/test-http-unix-socket.js +++ b/test/parallel/test-http-unix-socket.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-upgrade-agent.js b/test/parallel/test-http-upgrade-agent.js index e0e1c6d1f3fb6d..3cdecd332a61b0 100644 --- a/test/parallel/test-http-upgrade-agent.js +++ b/test/parallel/test-http-upgrade-agent.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Verify that the 'upgrade' header causes an 'upgrade' event to be emitted to // the HTTP client. This test uses a raw TCP server to better control server diff --git a/test/parallel/test-http-upgrade-client.js b/test/parallel/test-http-upgrade-client.js index 34e3e8f24158e7..3c56e5959fbd93 100644 --- a/test/parallel/test-http-upgrade-client.js +++ b/test/parallel/test-http-upgrade-client.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Verify that the 'upgrade' header causes an 'upgrade' event to be emitted to // the HTTP client. This test uses a raw TCP server to better control server diff --git a/test/parallel/test-http-upgrade-client2.js b/test/parallel/test-http-upgrade-client2.js index fa14f8ca51f030..70eaeaa95f1706 100644 --- a/test/parallel/test-http-upgrade-client2.js +++ b/test/parallel/test-http-upgrade-client2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/parallel/test-http-upgrade-server.js b/test/parallel/test-http-upgrade-server.js index b7335b49e83c5f..a573e3ca5241c1 100644 --- a/test/parallel/test-http-upgrade-server.js +++ b/test/parallel/test-http-upgrade-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-upgrade-server2.js b/test/parallel/test-http-upgrade-server2.js index 3ff33a9c794c25..209ea1f4bc7c6e 100644 --- a/test/parallel/test-http-upgrade-server2.js +++ b/test/parallel/test-http-upgrade-server2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-url.parse-auth-with-header-in-request.js b/test/parallel/test-http-url.parse-auth-with-header-in-request.js index d91ec75f60d767..b1f70c5bb0ed43 100644 --- a/test/parallel/test-http-url.parse-auth-with-header-in-request.js +++ b/test/parallel/test-http-url.parse-auth-with-header-in-request.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-url.parse-auth.js b/test/parallel/test-http-url.parse-auth.js index 25913f4e49a12a..d166120ac2930c 100644 --- a/test/parallel/test-http-url.parse-auth.js +++ b/test/parallel/test-http-url.parse-auth.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-url.parse-basic.js b/test/parallel/test-http-url.parse-basic.js index ac22b6e38d80e1..3ac138c5ccd161 100644 --- a/test/parallel/test-http-url.parse-basic.js +++ b/test/parallel/test-http-url.parse-basic.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-url.parse-https.request.js b/test/parallel/test-http-url.parse-https.request.js index ad40e76debee90..b5a36553de81ba 100644 --- a/test/parallel/test-http-url.parse-https.request.js +++ b/test/parallel/test-http-url.parse-https.request.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js index b3d7795e72cefa..9933c557267c25 100644 --- a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js +++ b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-url.parse-path.js b/test/parallel/test-http-url.parse-path.js index 6fab8bb0eb3b6b..ab2e550f558cea 100644 --- a/test/parallel/test-http-url.parse-path.js +++ b/test/parallel/test-http-url.parse-path.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-url.parse-post.js b/test/parallel/test-http-url.parse-post.js index d63f404c5403dd..fafcb620fe6953 100644 --- a/test/parallel/test-http-url.parse-post.js +++ b/test/parallel/test-http-url.parse-post.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-url.parse-search.js b/test/parallel/test-http-url.parse-search.js index f2a5d1806d89a2..53d06556c318f5 100644 --- a/test/parallel/test-http-url.parse-search.js +++ b/test/parallel/test-http-url.parse-search.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-wget.js b/test/parallel/test-http-wget.js index a633873c8bb16f..5f38997872c500 100644 --- a/test/parallel/test-http-wget.js +++ b/test/parallel/test-http-wget.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-write-callbacks.js b/test/parallel/test-http-write-callbacks.js index 03250a0030ceff..440807a2df7ca0 100644 --- a/test/parallel/test-http-write-callbacks.js +++ b/test/parallel/test-http-write-callbacks.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-write-empty-string.js b/test/parallel/test-http-write-empty-string.js index 81ebc61eef2af4..0a89f0cb66336a 100644 --- a/test/parallel/test-http-write-empty-string.js +++ b/test/parallel/test-http-write-empty-string.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-write-head.js b/test/parallel/test-http-write-head.js index 2ceba8965c0ea4..dd716f17aef423 100644 --- a/test/parallel/test-http-write-head.js +++ b/test/parallel/test-http-write-head.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http-zero-length-write.js b/test/parallel/test-http-zero-length-write.js index 11db6b1aa17f45..35a1b616d704f3 100644 --- a/test/parallel/test-http-zero-length-write.js +++ b/test/parallel/test-http-zero-length-write.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-http.js b/test/parallel/test-http.js index dc77be4fdde189..d7a3c1cf47d483 100644 --- a/test/parallel/test-http.js +++ b/test/parallel/test-http.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-https-agent.js b/test/parallel/test-https-agent.js index 392bdcbf033000..a828c4b37e67d7 100644 --- a/test/parallel/test-https-agent.js +++ b/test/parallel/test-https-agent.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-https-byteswritten.js b/test/parallel/test-https-byteswritten.js index cdea4d1ee930f3..59b57d1293c03a 100644 --- a/test/parallel/test-https-byteswritten.js +++ b/test/parallel/test-https-byteswritten.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-https-client-checkServerIdentity.js b/test/parallel/test-https-client-checkServerIdentity.js index 08add334872bfb..a70af2c42946b6 100644 --- a/test/parallel/test-https-client-checkServerIdentity.js +++ b/test/parallel/test-https-client-checkServerIdentity.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-https-client-get-url.js b/test/parallel/test-https-client-get-url.js index caaa7522cef57b..cd22adf6a83c5e 100644 --- a/test/parallel/test-https-client-get-url.js +++ b/test/parallel/test-https-client-get-url.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); // disable strict server certificate validation by the client diff --git a/test/parallel/test-https-client-reject.js b/test/parallel/test-https-client-reject.js index c81c7f646dde01..95c3ca1a3b8ac6 100644 --- a/test/parallel/test-https-client-reject.js +++ b/test/parallel/test-https-client-reject.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-https-client-resume.js b/test/parallel/test-https-client-resume.js index 79e1a716bd77cf..077a8e3f6d4b7d 100644 --- a/test/parallel/test-https-client-resume.js +++ b/test/parallel/test-https-client-resume.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Create an ssl server. First connection, validate that not resume. // Cache session and close connection. Use session on second connection. diff --git a/test/parallel/test-https-connecting-to-http.js b/test/parallel/test-https-connecting-to-http.js index caeeca5d542430..168be7c2d984e8 100644 --- a/test/parallel/test-https-connecting-to-http.js +++ b/test/parallel/test-https-connecting-to-http.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This tests the situation where you try to connect a https client // to an http server. You should get an error and exit. diff --git a/test/parallel/test-https-drain.js b/test/parallel/test-https-drain.js index 8e85ca70b97c47..e83ec3ebb5d351 100644 --- a/test/parallel/test-https-drain.js +++ b/test/parallel/test-https-drain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-https-eof-for-eom.js b/test/parallel/test-https-eof-for-eom.js index cb48f71e51a226..42090ea6f869dd 100644 --- a/test/parallel/test-https-eof-for-eom.js +++ b/test/parallel/test-https-eof-for-eom.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // I hate HTTP. One way of terminating an HTTP response is to not send // a content-length header, not send a transfer-encoding: chunked header, diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index 5a9b8eb832cae3..8b711b81fee566 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-https-localaddress-bind-error.js b/test/parallel/test-https-localaddress-bind-error.js index 662d6f080a0fff..0b0274b396883f 100644 --- a/test/parallel/test-https-localaddress-bind-error.js +++ b/test/parallel/test-https-localaddress-bind-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const fs = require('fs'); diff --git a/test/parallel/test-https-localaddress.js b/test/parallel/test-https-localaddress.js index 1c796f5843c63c..f6f0f5d5007d5b 100644 --- a/test/parallel/test-https-localaddress.js +++ b/test/parallel/test-https-localaddress.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const fs = require('fs'); diff --git a/test/parallel/test-https-pfx.js b/test/parallel/test-https-pfx.js index 0e3a2ba3cd2663..47d7b893ba9ade 100644 --- a/test/parallel/test-https-pfx.js +++ b/test/parallel/test-https-pfx.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-https-req-split.js b/test/parallel/test-https-req-split.js index 4298abe5eff43d..97730ebcb8898f 100644 --- a/test/parallel/test-https-req-split.js +++ b/test/parallel/test-https-req-split.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); // disable strict server certificate validation by the client diff --git a/test/parallel/test-https-set-timeout-server.js b/test/parallel/test-https-set-timeout-server.js index 23372b60d529ee..cefb0a9eebee86 100644 --- a/test/parallel/test-https-set-timeout-server.js +++ b/test/parallel/test-https-set-timeout-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-https-simple.js b/test/parallel/test-https-simple.js index 8616e6c710c463..cb5a8d4146184a 100644 --- a/test/parallel/test-https-simple.js +++ b/test/parallel/test-https-simple.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-https-socket-options.js b/test/parallel/test-https-socket-options.js index 05137b35c437ff..d93e55b3272825 100644 --- a/test/parallel/test-https-socket-options.js +++ b/test/parallel/test-https-socket-options.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-https-strict.js b/test/parallel/test-https-strict.js index 9c650dc6ab3226..215ce7fe007c4e 100644 --- a/test/parallel/test-https-strict.js +++ b/test/parallel/test-https-strict.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); // disable strict server certificate validation by the client diff --git a/test/parallel/test-https-timeout-server-2.js b/test/parallel/test-https-timeout-server-2.js index ec629f39314959..d31f6ba4c1709a 100644 --- a/test/parallel/test-https-timeout-server-2.js +++ b/test/parallel/test-https-timeout-server-2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-https-timeout-server.js b/test/parallel/test-https-timeout-server.js index 230ad6f64a03eb..07e86f350bd651 100644 --- a/test/parallel/test-https-timeout-server.js +++ b/test/parallel/test-https-timeout-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-https-timeout.js b/test/parallel/test-https-timeout.js index ad8decc03cf474..75e012a5440941 100644 --- a/test/parallel/test-https-timeout.js +++ b/test/parallel/test-https-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-https-truncate.js b/test/parallel/test-https-truncate.js index c96b385fc37fde..c5a550dc5ece8b 100644 --- a/test/parallel/test-https-truncate.js +++ b/test/parallel/test-https-truncate.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-intl.js b/test/parallel/test-intl.js index 43707e08c03710..979506e2ab860d 100644 --- a/test/parallel/test-intl.js +++ b/test/parallel/test-intl.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-listen-fd-cluster.js b/test/parallel/test-listen-fd-cluster.js index 98810a39335acc..688083f2a893cc 100644 --- a/test/parallel/test-listen-fd-cluster.js +++ b/test/parallel/test-listen-fd-cluster.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-listen-fd-detached-inherit.js b/test/parallel/test-listen-fd-detached-inherit.js index 36e4df28897383..808ee25f016695 100644 --- a/test/parallel/test-listen-fd-detached-inherit.js +++ b/test/parallel/test-listen-fd-detached-inherit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-listen-fd-detached.js b/test/parallel/test-listen-fd-detached.js index ec9d039e96e3f2..de4da62ad53c44 100644 --- a/test/parallel/test-listen-fd-detached.js +++ b/test/parallel/test-listen-fd-detached.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-listen-fd-ebadf.js b/test/parallel/test-listen-fd-ebadf.js index dfa99e274a76e6..82340c8bea13e1 100644 --- a/test/parallel/test-listen-fd-ebadf.js +++ b/test/parallel/test-listen-fd-ebadf.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-listen-fd-server.js b/test/parallel/test-listen-fd-server.js index 5a1ffbb989cf8d..3d238a8019a0d9 100644 --- a/test/parallel/test-listen-fd-server.js +++ b/test/parallel/test-listen-fd-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-memory-usage.js b/test/parallel/test-memory-usage.js index cba3f9a5172a07..4d9444805b0f08 100644 --- a/test/parallel/test-memory-usage.js +++ b/test/parallel/test-memory-usage.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-microtask-queue-integration-domain.js b/test/parallel/test-microtask-queue-integration-domain.js index df90b6d3a372da..98da703ee51429 100644 --- a/test/parallel/test-microtask-queue-integration-domain.js +++ b/test/parallel/test-microtask-queue-integration-domain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-microtask-queue-integration.js b/test/parallel/test-microtask-queue-integration.js index 22704ab4a51d49..57c384f8ba8177 100644 --- a/test/parallel/test-microtask-queue-integration.js +++ b/test/parallel/test-microtask-queue-integration.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-microtask-queue-run-domain.js b/test/parallel/test-microtask-queue-run-domain.js index 8ce2f6cd992648..39baf930232411 100644 --- a/test/parallel/test-microtask-queue-run-domain.js +++ b/test/parallel/test-microtask-queue-run-domain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-microtask-queue-run-immediate-domain.js b/test/parallel/test-microtask-queue-run-immediate-domain.js index 8c4d4d40d46d6b..60b17bc38c2670 100644 --- a/test/parallel/test-microtask-queue-run-immediate-domain.js +++ b/test/parallel/test-microtask-queue-run-immediate-domain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-microtask-queue-run-immediate.js b/test/parallel/test-microtask-queue-run-immediate.js index 9fee54b2d741cf..4d998cf0b8a59c 100644 --- a/test/parallel/test-microtask-queue-run-immediate.js +++ b/test/parallel/test-microtask-queue-run-immediate.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-microtask-queue-run.js b/test/parallel/test-microtask-queue-run.js index 1a8f8e2ba32bc0..85eb770da1e0ff 100644 --- a/test/parallel/test-microtask-queue-run.js +++ b/test/parallel/test-microtask-queue-run.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-module-globalpaths-nodepath.js b/test/parallel/test-module-globalpaths-nodepath.js index ec90f1a3e2c868..5368848f3729bf 100644 --- a/test/parallel/test-module-globalpaths-nodepath.js +++ b/test/parallel/test-module-globalpaths-nodepath.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-module-loading-error.js b/test/parallel/test-module-loading-error.js index 1bff2c4a7c7f5c..76c348b774f5d5 100644 --- a/test/parallel/test-module-loading-error.js +++ b/test/parallel/test-module-loading-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-module-nodemodulepaths.js b/test/parallel/test-module-nodemodulepaths.js index 02ea79b49e1ab3..f6e69af124c67b 100644 --- a/test/parallel/test-module-nodemodulepaths.js +++ b/test/parallel/test-module-nodemodulepaths.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-net-after-close.js b/test/parallel/test-net-after-close.js index d46f096116d02e..1594d36f9075a3 100644 --- a/test/parallel/test-net-after-close.js +++ b/test/parallel/test-net-after-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-binary.js b/test/parallel/test-net-binary.js index 0c5cac1c37290b..b8dbc0e8d70e8f 100644 --- a/test/parallel/test-net-binary.js +++ b/test/parallel/test-net-binary.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable strict */ require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-bind-twice.js b/test/parallel/test-net-bind-twice.js index 6452a7a477eaa5..f59818a1e8a384 100644 --- a/test/parallel/test-net-bind-twice.js +++ b/test/parallel/test-net-bind-twice.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-buffersize.js b/test/parallel/test-net-buffersize.js index e8ba17a76e6c69..1359a257440822 100644 --- a/test/parallel/test-net-buffersize.js +++ b/test/parallel/test-net-buffersize.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-bytes-stats.js b/test/parallel/test-net-bytes-stats.js index 33e089da50880a..2cda173e989abd 100644 --- a/test/parallel/test-net-bytes-stats.js +++ b/test/parallel/test-net-bytes-stats.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-can-reset-timeout.js b/test/parallel/test-net-can-reset-timeout.js index faa460e847aa08..a4bdd0bdee3313 100644 --- a/test/parallel/test-net-can-reset-timeout.js +++ b/test/parallel/test-net-can-reset-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-connect-buffer.js b/test/parallel/test-net-connect-buffer.js index 1e296675879130..a391dfde74c721 100644 --- a/test/parallel/test-net-connect-buffer.js +++ b/test/parallel/test-net-connect-buffer.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-connect-handle-econnrefused.js b/test/parallel/test-net-connect-handle-econnrefused.js index 029390353eb793..080c60b2d2e2bb 100644 --- a/test/parallel/test-net-connect-handle-econnrefused.js +++ b/test/parallel/test-net-connect-handle-econnrefused.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-connect-immediate-finish.js b/test/parallel/test-net-connect-immediate-finish.js index 6114233677f5cb..340faffcb69944 100644 --- a/test/parallel/test-net-connect-immediate-finish.js +++ b/test/parallel/test-net-connect-immediate-finish.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-connect-options-ipv6.js b/test/parallel/test-net-connect-options-ipv6.js index e9d8a78cbbefef..1f3ede90060e1c 100644 --- a/test/parallel/test-net-connect-options-ipv6.js +++ b/test/parallel/test-net-connect-options-ipv6.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-connect-options.js b/test/parallel/test-net-connect-options.js index e794c40859856a..d75b62a4c147d0 100644 --- a/test/parallel/test-net-connect-options.js +++ b/test/parallel/test-net-connect-options.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-connect-paused-connection.js b/test/parallel/test-net-connect-paused-connection.js index 867553e0eec702..a53177ed4c7e7e 100644 --- a/test/parallel/test-net-connect-paused-connection.js +++ b/test/parallel/test-net-connect-paused-connection.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-net-create-connection.js b/test/parallel/test-net-create-connection.js index dc5981ecd20221..ebe777b00c1931 100644 --- a/test/parallel/test-net-create-connection.js +++ b/test/parallel/test-net-create-connection.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-dns-error.js b/test/parallel/test-net-dns-error.js index 5ca02313686589..beebcd8cb9cf44 100644 --- a/test/parallel/test-net-dns-error.js +++ b/test/parallel/test-net-dns-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-dns-lookup.js b/test/parallel/test-net-dns-lookup.js index 166029f31c482f..53052de716ee9e 100644 --- a/test/parallel/test-net-dns-lookup.js +++ b/test/parallel/test-net-dns-lookup.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-during-close.js b/test/parallel/test-net-during-close.js index e8723fb1a692a8..a85863955e7728 100644 --- a/test/parallel/test-net-during-close.js +++ b/test/parallel/test-net-during-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-eaddrinuse.js b/test/parallel/test-net-eaddrinuse.js index cf4293e8230875..a89168936d9e8b 100644 --- a/test/parallel/test-net-eaddrinuse.js +++ b/test/parallel/test-net-eaddrinuse.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-end-without-connect.js b/test/parallel/test-net-end-without-connect.js index 99324b071d27d6..98cf49768a2a26 100644 --- a/test/parallel/test-net-end-without-connect.js +++ b/test/parallel/test-net-end-without-connect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-error-twice.js b/test/parallel/test-net-error-twice.js index 79c85631594d4a..ce32be4882f071 100644 --- a/test/parallel/test-net-error-twice.js +++ b/test/parallel/test-net-error-twice.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-isip.js b/test/parallel/test-net-isip.js index 626f29488b67ea..e9a8749aaee412 100644 --- a/test/parallel/test-net-isip.js +++ b/test/parallel/test-net-isip.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-keepalive.js b/test/parallel/test-net-keepalive.js index 68ed5f842ff13b..49331abf040a30 100644 --- a/test/parallel/test-net-keepalive.js +++ b/test/parallel/test-net-keepalive.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-large-string.js b/test/parallel/test-net-large-string.js index 83612111e2a0aa..93c0d41612a115 100644 --- a/test/parallel/test-net-large-string.js +++ b/test/parallel/test-net-large-string.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-listen-close-server.js b/test/parallel/test-net-listen-close-server.js index bf10252235f793..99d7111ebabe55 100644 --- a/test/parallel/test-net-listen-close-server.js +++ b/test/parallel/test-net-listen-close-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-listen-error.js b/test/parallel/test-net-listen-error.js index d672226de7b37f..d3520d2928b994 100644 --- a/test/parallel/test-net-listen-error.js +++ b/test/parallel/test-net-listen-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-listen-fd0.js b/test/parallel/test-net-listen-fd0.js index ce7d11a992ba46..58b184ff10f3e9 100644 --- a/test/parallel/test-net-listen-fd0.js +++ b/test/parallel/test-net-listen-fd0.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-listen-shared-ports.js b/test/parallel/test-net-listen-shared-ports.js index e7bc036ff3986c..46dbeb0ead94e3 100644 --- a/test/parallel/test-net-listen-shared-ports.js +++ b/test/parallel/test-net-listen-shared-ports.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-local-address-port.js b/test/parallel/test-net-local-address-port.js index b256d93b5f8400..dfd7ef359b71d2 100644 --- a/test/parallel/test-net-local-address-port.js +++ b/test/parallel/test-net-local-address-port.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-localerror.js b/test/parallel/test-net-localerror.js index 184e55c890b2bb..03f8e99c5dc7a2 100644 --- a/test/parallel/test-net-localerror.js +++ b/test/parallel/test-net-localerror.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-pause-resume-connecting.js b/test/parallel/test-net-pause-resume-connecting.js index 1ae51d51fb25f2..39d83159920f09 100644 --- a/test/parallel/test-net-pause-resume-connecting.js +++ b/test/parallel/test-net-pause-resume-connecting.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-pingpong.js b/test/parallel/test-net-pingpong.js index b2f756c1ba7147..d030d069c6d1d7 100644 --- a/test/parallel/test-net-pingpong.js +++ b/test/parallel/test-net-pingpong.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-pipe-connect-errors.js b/test/parallel/test-net-pipe-connect-errors.js index 6dc2a340651ef1..917913b30a56cc 100644 --- a/test/parallel/test-net-pipe-connect-errors.js +++ b/test/parallel/test-net-pipe-connect-errors.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const fs = require('fs'); diff --git a/test/parallel/test-net-reconnect-error.js b/test/parallel/test-net-reconnect-error.js index d60ed90c9e13cb..166d177365b3ab 100644 --- a/test/parallel/test-net-reconnect-error.js +++ b/test/parallel/test-net-reconnect-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-reconnect.js b/test/parallel/test-net-reconnect.js index c970ad7fc5c135..5b66c45e20bbeb 100644 --- a/test/parallel/test-net-reconnect.js +++ b/test/parallel/test-net-reconnect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-remote-address-port.js b/test/parallel/test-net-remote-address-port.js index a9d02631be5194..094206f85df34d 100644 --- a/test/parallel/test-net-remote-address-port.js +++ b/test/parallel/test-net-remote-address-port.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-server-close.js b/test/parallel/test-net-server-close.js index e39f851c3906c4..bafd1a85e83b40 100644 --- a/test/parallel/test-net-server-close.js +++ b/test/parallel/test-net-server-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-server-connections.js b/test/parallel/test-net-server-connections.js index 01e535803a8f39..39ff1e8ff6b2f0 100644 --- a/test/parallel/test-net-server-connections.js +++ b/test/parallel/test-net-server-connections.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-server-listen-remove-callback.js b/test/parallel/test-net-server-listen-remove-callback.js index cd47f325a9580f..3989b229062304 100644 --- a/test/parallel/test-net-server-listen-remove-callback.js +++ b/test/parallel/test-net-server-listen-remove-callback.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-server-max-connections.js b/test/parallel/test-net-server-max-connections.js index f560a7dafc4446..cfe4fa999dc8ff 100644 --- a/test/parallel/test-net-server-max-connections.js +++ b/test/parallel/test-net-server-max-connections.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-server-pause-on-connect.js b/test/parallel/test-net-server-pause-on-connect.js index 5b42876e6d652e..b81dd5c38b7a2a 100644 --- a/test/parallel/test-net-server-pause-on-connect.js +++ b/test/parallel/test-net-server-pause-on-connect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-server-try-ports.js b/test/parallel/test-net-server-try-ports.js index 2aba5cef5b59ca..12e8e91be16db6 100644 --- a/test/parallel/test-net-server-try-ports.js +++ b/test/parallel/test-net-server-try-ports.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This test binds to one port, then attempts to start a server on that // port. It should be EADDRINUSE but be able to then bind to another port. diff --git a/test/parallel/test-net-server-unref.js b/test/parallel/test-net-server-unref.js index d49c4472e19b4c..935ba5d639fb48 100644 --- a/test/parallel/test-net-server-unref.js +++ b/test/parallel/test-net-server-unref.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-settimeout.js b/test/parallel/test-net-settimeout.js index 840b1dba99b3e2..581e27ec327d62 100644 --- a/test/parallel/test-net-settimeout.js +++ b/test/parallel/test-net-settimeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This example sets a timeout then immediately attempts to disable the timeout // https://github.com/joyent/node/pull/2245 diff --git a/test/parallel/test-net-socket-destroy-twice.js b/test/parallel/test-net-socket-destroy-twice.js index 998ad05a1d6487..a16e12db0d621e 100644 --- a/test/parallel/test-net-socket-destroy-twice.js +++ b/test/parallel/test-net-socket-destroy-twice.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-socket-timeout-unref.js b/test/parallel/test-net-socket-timeout-unref.js index 1789ec7a1cabbd..1e95fe6b0fb0f3 100644 --- a/test/parallel/test-net-socket-timeout-unref.js +++ b/test/parallel/test-net-socket-timeout-unref.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Test that unref'ed sockets with timeouts do not prevent exit. diff --git a/test/parallel/test-net-socket-timeout.js b/test/parallel/test-net-socket-timeout.js index 61ea54debeaa61..e29f9e147297fc 100644 --- a/test/parallel/test-net-socket-timeout.js +++ b/test/parallel/test-net-socket-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-stream.js b/test/parallel/test-net-stream.js index 9e1ca670e1e145..30bb12f28c25e1 100644 --- a/test/parallel/test-net-stream.js +++ b/test/parallel/test-net-stream.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-write-after-close.js b/test/parallel/test-net-write-after-close.js index 0a1dcd98b2b3c7..bf290c38f5f48d 100644 --- a/test/parallel/test-net-write-after-close.js +++ b/test/parallel/test-net-write-after-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-net-write-connect-write.js b/test/parallel/test-net-write-connect-write.js index ee20ede49fb5a5..a403691ded5146 100644 --- a/test/parallel/test-net-write-connect-write.js +++ b/test/parallel/test-net-write-connect-write.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-net-write-slow.js b/test/parallel/test-net-write-slow.js index c1b2c60e2e202a..89c46c3a0d90ff 100644 --- a/test/parallel/test-net-write-slow.js +++ b/test/parallel/test-net-write-slow.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-next-tick-doesnt-hang.js b/test/parallel/test-next-tick-doesnt-hang.js index 28797b4280e716..f6af2226301499 100644 --- a/test/parallel/test-next-tick-doesnt-hang.js +++ b/test/parallel/test-next-tick-doesnt-hang.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * This test verifies that having a single nextTick statement and nothing else diff --git a/test/parallel/test-next-tick-domain.js b/test/parallel/test-next-tick-domain.js index 6edb7e3050c067..5c526197926df7 100644 --- a/test/parallel/test-next-tick-domain.js +++ b/test/parallel/test-next-tick-domain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-next-tick-errors.js b/test/parallel/test-next-tick-errors.js index 4f47c3f954d92e..989d02b4d9f3e4 100644 --- a/test/parallel/test-next-tick-errors.js +++ b/test/parallel/test-next-tick-errors.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-next-tick-intentional-starvation.js b/test/parallel/test-next-tick-intentional-starvation.js index ee829c94ab6929..fdcdd6a7a6094b 100644 --- a/test/parallel/test-next-tick-intentional-starvation.js +++ b/test/parallel/test-next-tick-intentional-starvation.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-next-tick-ordering.js b/test/parallel/test-next-tick-ordering.js index ea019facdd8fa0..cd784cf8c06114 100644 --- a/test/parallel/test-next-tick-ordering.js +++ b/test/parallel/test-next-tick-ordering.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-next-tick-ordering2.js b/test/parallel/test-next-tick-ordering2.js index 7cfec867f3ed01..6c42bd8e5746e3 100644 --- a/test/parallel/test-next-tick-ordering2.js +++ b/test/parallel/test-next-tick-ordering2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-next-tick.js b/test/parallel/test-next-tick.js index 001e8a2e471e03..896e895aa900ea 100644 --- a/test/parallel/test-next-tick.js +++ b/test/parallel/test-next-tick.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-os.js b/test/parallel/test-os.js index ce0d2ee054d1f9..1c92100818c6e6 100644 --- a/test/parallel/test-os.js +++ b/test/parallel/test-os.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-path-makelong.js b/test/parallel/test-path-makelong.js index 1284f625160ebe..3b89028af5469e 100644 --- a/test/parallel/test-path-makelong.js +++ b/test/parallel/test-path-makelong.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-path-parse-format.js b/test/parallel/test-path-parse-format.js index 9d5c149924ff4c..c67c3726cc7d6b 100644 --- a/test/parallel/test-path-parse-format.js +++ b/test/parallel/test-path-parse-format.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index 3c5374175abd8e..4aa0e8d5e696bd 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-pipe-file-to-http.js b/test/parallel/test-pipe-file-to-http.js index 0ea9244ff76946..ccb1c1c6129e0c 100644 --- a/test/parallel/test-pipe-file-to-http.js +++ b/test/parallel/test-pipe-file-to-http.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-pipe-return-val.js b/test/parallel/test-pipe-return-val.js index 5e6e83dbc7a952..f2a7f573ecf8bf 100644 --- a/test/parallel/test-pipe-return-val.js +++ b/test/parallel/test-pipe-return-val.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This test ensures SourceStream.pipe(DestStream) returns DestStream diff --git a/test/parallel/test-process-argv-0.js b/test/parallel/test-process-argv-0.js index 8e4f0e695ec6a1..21b406873f09b1 100644 --- a/test/parallel/test-process-argv-0.js +++ b/test/parallel/test-process-argv-0.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const path = require('path'); diff --git a/test/parallel/test-process-beforeexit.js b/test/parallel/test-process-beforeexit.js index 4557628c42b611..d197d943a4b07d 100644 --- a/test/parallel/test-process-beforeexit.js +++ b/test/parallel/test-process-beforeexit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-process-config.js b/test/parallel/test-process-config.js index a1767464fd5978..cd9462dd13f299 100644 --- a/test/parallel/test-process-config.js +++ b/test/parallel/test-process-config.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-process-env.js b/test/parallel/test-process-env.js index 5ea0a4a57efc68..7d6434c00b8276 100644 --- a/test/parallel/test-process-env.js +++ b/test/parallel/test-process-env.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-process-exec-argv.js b/test/parallel/test-process-exec-argv.js index 8125850b424d84..fec5699933d6f4 100644 --- a/test/parallel/test-process-exec-argv.js +++ b/test/parallel/test-process-exec-argv.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-process-exit-code.js b/test/parallel/test-process-exit-code.js index 8d0ed1b33bae76..284725293f0b14 100644 --- a/test/parallel/test-process-exit-code.js +++ b/test/parallel/test-process-exit-code.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-process-exit-from-before-exit.js b/test/parallel/test-process-exit-from-before-exit.js index e3c3ab208f7814..21c20ca5bc6fe5 100644 --- a/test/parallel/test-process-exit-from-before-exit.js +++ b/test/parallel/test-process-exit-from-before-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-process-exit-recursive.js b/test/parallel/test-process-exit-recursive.js index 48ad8259168a90..57f5c2956f8c0d 100644 --- a/test/parallel/test-process-exit-recursive.js +++ b/test/parallel/test-process-exit-recursive.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-process-exit.js b/test/parallel/test-process-exit.js index a4ea2bf51b53f5..ac934d4c6818a4 100644 --- a/test/parallel/test-process-exit.js +++ b/test/parallel/test-process-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-process-getgroups.js b/test/parallel/test-process-getgroups.js index 390f188cf5bf4d..91a75c63d60c22 100644 --- a/test/parallel/test-process-getgroups.js +++ b/test/parallel/test-process-getgroups.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-process-hrtime.js b/test/parallel/test-process-hrtime.js index db8700d3e69528..895a37b9a42909 100644 --- a/test/parallel/test-process-hrtime.js +++ b/test/parallel/test-process-hrtime.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-process-kill-null.js b/test/parallel/test-process-kill-null.js index 6c0ee8fa049a50..023724773f6276 100644 --- a/test/parallel/test-process-kill-null.js +++ b/test/parallel/test-process-kill-null.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-process-kill-pid.js b/test/parallel/test-process-kill-pid.js index 79dc00163b78f8..4b042de58b9c52 100644 --- a/test/parallel/test-process-kill-pid.js +++ b/test/parallel/test-process-kill-pid.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-process-next-tick.js b/test/parallel/test-process-next-tick.js index e67ebae0a29559..0fff0c69bfd165 100644 --- a/test/parallel/test-process-next-tick.js +++ b/test/parallel/test-process-next-tick.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const N = 2; diff --git a/test/parallel/test-process-raw-debug.js b/test/parallel/test-process-raw-debug.js index dc31c3737ae1cb..eae0577c5342f9 100644 --- a/test/parallel/test-process-raw-debug.js +++ b/test/parallel/test-process-raw-debug.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-process-wrap.js b/test/parallel/test-process-wrap.js index fee40a84167023..5601328eef3585 100644 --- a/test/parallel/test-process-wrap.js +++ b/test/parallel/test-process-wrap.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-punycode.js b/test/parallel/test-punycode.js index b95d33fdb261a0..c2508898804a92 100644 --- a/test/parallel/test-punycode.js +++ b/test/parallel/test-punycode.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const punycode = require('punycode'); diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js index 1c31908b01901b..1f1fe304c19e63 100644 --- a/test/parallel/test-querystring.js +++ b/test/parallel/test-querystring.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-readdouble.js b/test/parallel/test-readdouble.js index 00340a39e631c0..01ea010609e504 100644 --- a/test/parallel/test-readdouble.js +++ b/test/parallel/test-readdouble.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * Tests to verify we're reading in doubles correctly diff --git a/test/parallel/test-readfloat.js b/test/parallel/test-readfloat.js index 0175c195b8ec22..137eb732678233 100644 --- a/test/parallel/test-readfloat.js +++ b/test/parallel/test-readfloat.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * Tests to verify we're reading in floats correctly diff --git a/test/parallel/test-readint.js b/test/parallel/test-readint.js index 97faa1e7d58d77..42b9d1e61ebc43 100644 --- a/test/parallel/test-readint.js +++ b/test/parallel/test-readint.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * Tests to verify we're reading in signed integers correctly diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index 53c132dc30ec25..2301b9e6662532 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -1,3 +1,24 @@ +// 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. + // Flags: --expose_internals 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-readline-set-raw-mode.js b/test/parallel/test-readline-set-raw-mode.js index 389f014bc3e19a..db42a5a9495a9e 100644 --- a/test/parallel/test-readline-set-raw-mode.js +++ b/test/parallel/test-readline-set-raw-mode.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-readuint.js b/test/parallel/test-readuint.js index d1507a81b5188a..d5a1ba8fe2f524 100644 --- a/test/parallel/test-readuint.js +++ b/test/parallel/test-readuint.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * A battery of tests to help us read a series of uints diff --git a/test/parallel/test-regress-GH-4256.js b/test/parallel/test-regress-GH-4256.js index a312fb277fdad5..6a4a4467b4fd81 100644 --- a/test/parallel/test-regress-GH-4256.js +++ b/test/parallel/test-regress-GH-4256.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); process.domain = null; diff --git a/test/parallel/test-regress-GH-5927.js b/test/parallel/test-regress-GH-5927.js index 7f55356a15e027..f32dd61c978eb4 100644 --- a/test/parallel/test-regress-GH-5927.js +++ b/test/parallel/test-regress-GH-5927.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-regress-GH-6235.js b/test/parallel/test-regress-GH-6235.js index 10092884670980..e8fcda43cc3f3e 100644 --- a/test/parallel/test-regress-GH-6235.js +++ b/test/parallel/test-regress-GH-6235.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-regress-GH-7511.js b/test/parallel/test-regress-GH-7511.js index a7ce8311d7237f..205e1cdaefcf41 100644 --- a/test/parallel/test-regress-GH-7511.js +++ b/test/parallel/test-regress-GH-7511.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-regression-object-prototype.js b/test/parallel/test-regression-object-prototype.js index b1411bf813687a..01de440344d352 100644 --- a/test/parallel/test-regression-object-prototype.js +++ b/test/parallel/test-regression-object-prototype.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable required-modules */ 'use strict'; diff --git a/test/parallel/test-repl-.save.load.js b/test/parallel/test-repl-.save.load.js index 449dd28e90d59e..a52aed97ed05b5 100644 --- a/test/parallel/test-repl-.save.load.js +++ b/test/parallel/test-repl-.save.load.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-repl-autolibs.js b/test/parallel/test-repl-autolibs.js index ce108ba2aa859f..42370f0fcf05a9 100644 --- a/test/parallel/test-repl-autolibs.js +++ b/test/parallel/test-repl-autolibs.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-repl-console.js b/test/parallel/test-repl-console.js index f37dde008044ed..94547e4768bb76 100644 --- a/test/parallel/test-repl-console.js +++ b/test/parallel/test-repl-console.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-repl-domain.js b/test/parallel/test-repl-domain.js index 19c85980cdcc72..ff36eeaf3a4af4 100644 --- a/test/parallel/test-repl-domain.js +++ b/test/parallel/test-repl-domain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-repl-end-emits-exit.js b/test/parallel/test-repl-end-emits-exit.js index c62a51c9626e24..67f667eeb3d8db 100644 --- a/test/parallel/test-repl-end-emits-exit.js +++ b/test/parallel/test-repl-end-emits-exit.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-repl-harmony.js b/test/parallel/test-repl-harmony.js index 743bbe4fabfcd1..624fceaa5fe152 100644 --- a/test/parallel/test-repl-harmony.js +++ b/test/parallel/test-repl-harmony.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-repl-options.js b/test/parallel/test-repl-options.js index 03db110aca6dbc..9dc1b37fa2a250 100644 --- a/test/parallel/test-repl-options.js +++ b/test/parallel/test-repl-options.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-repl-require-cache.js b/test/parallel/test-repl-require-cache.js index 4ccabe473cdbe8..b8fe3a75375976 100644 --- a/test/parallel/test-repl-require-cache.js +++ b/test/parallel/test-repl-require-cache.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-repl-reset-event.js b/test/parallel/test-repl-reset-event.js index 190aa2227de9a3..e9772e3462cc83 100644 --- a/test/parallel/test-repl-reset-event.js +++ b/test/parallel/test-repl-reset-event.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); common.globalCheck = false; diff --git a/test/parallel/test-repl-setprompt.js b/test/parallel/test-repl-setprompt.js index 8dcc4fe94452da..c49e08c399483b 100644 --- a/test/parallel/test-repl-setprompt.js +++ b/test/parallel/test-repl-setprompt.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-repl-syntax-error-handling.js b/test/parallel/test-repl-syntax-error-handling.js index 9014f9a02f22be..79dd4814c57545 100644 --- a/test/parallel/test-repl-syntax-error-handling.js +++ b/test/parallel/test-repl-syntax-error-handling.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index 1a1a2a8628809c..b0ff850eddee83 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 3cf1b52e6179f2..7e426eb54ee51c 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -1,5 +1,26 @@ +// 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. + +/* eslint-disable max-len, strict */ 'use strict'; - const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-require-cache.js b/test/parallel/test-require-cache.js index 437dd80e581e38..098f6fffbb697c 100644 --- a/test/parallel/test-require-cache.js +++ b/test/parallel/test-require-cache.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-require-exceptions.js b/test/parallel/test-require-exceptions.js index e6b7977b48770b..2ae51c5486152d 100644 --- a/test/parallel/test-require-exceptions.js +++ b/test/parallel/test-require-exceptions.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js index 85fc7ec913482d..43245e22de8b52 100644 --- a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js +++ b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable max-len */ 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-require-extensions-same-filename-as-dir.js b/test/parallel/test-require-extensions-same-filename-as-dir.js index ff95a47b9a83bf..610b8d1ce26584 100644 --- a/test/parallel/test-require-extensions-same-filename-as-dir.js +++ b/test/parallel/test-require-extensions-same-filename-as-dir.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-require-json.js b/test/parallel/test-require-json.js index f2c74dc57d743d..10c8694da4adf5 100644 --- a/test/parallel/test-require-json.js +++ b/test/parallel/test-require-json.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const path = require('path'); diff --git a/test/parallel/test-require-resolve.js b/test/parallel/test-require-resolve.js index 202f3c5ef87f3d..92ae3f83bdce96 100644 --- a/test/parallel/test-require-resolve.js +++ b/test/parallel/test-require-resolve.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const fixturesDir = common.fixturesDir; diff --git a/test/parallel/test-signal-handler.js b/test/parallel/test-signal-handler.js index f1dc26b4cef6dd..b6c96a85899fa9 100644 --- a/test/parallel/test-signal-handler.js +++ b/test/parallel/test-signal-handler.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-stdin-hang.js b/test/parallel/test-stdin-hang.js index bb43d52506e5dc..23c686320d3299 100644 --- a/test/parallel/test-stdin-hang.js +++ b/test/parallel/test-stdin-hang.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/parallel/test-stdin-pause-resume-sync.js b/test/parallel/test-stdin-pause-resume-sync.js index c0f41e92de5adb..3fae349ab34cdc 100644 --- a/test/parallel/test-stdin-pause-resume-sync.js +++ b/test/parallel/test-stdin-pause-resume-sync.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); console.error('before opening stdin'); diff --git a/test/parallel/test-stdin-pause-resume.js b/test/parallel/test-stdin-pause-resume.js index a07bf1327d2774..459256099e20cf 100644 --- a/test/parallel/test-stdin-pause-resume.js +++ b/test/parallel/test-stdin-pause-resume.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); console.error('before opening stdin'); diff --git a/test/parallel/test-stdin-resume-pause.js b/test/parallel/test-stdin-resume-pause.js index 25bd3d7a2eaf51..eec01d390e2244 100644 --- a/test/parallel/test-stdin-resume-pause.js +++ b/test/parallel/test-stdin-resume-pause.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); process.stdin.resume(); diff --git a/test/parallel/test-stdio-readable-writable.js b/test/parallel/test-stdio-readable-writable.js index 0bc7fe269b3303..6178313bca3d3b 100644 --- a/test/parallel/test-stdio-readable-writable.js +++ b/test/parallel/test-stdio-readable-writable.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stdout-close-unref.js b/test/parallel/test-stdout-close-unref.js index fcabc1f66af58a..e8d075d18f7ab2 100644 --- a/test/parallel/test-stdout-close-unref.js +++ b/test/parallel/test-stdout-close-unref.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const spawn = require('child_process').spawn; diff --git a/test/parallel/test-stream-big-packet.js b/test/parallel/test-stream-big-packet.js index 8e5af3ea4ba342..2ec69cf2cbf3f0 100644 --- a/test/parallel/test-stream-big-packet.js +++ b/test/parallel/test-stream-big-packet.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-big-push.js b/test/parallel/test-stream-big-push.js index 9083820d42b546..6508fe77ed8cf3 100644 --- a/test/parallel/test-stream-big-push.js +++ b/test/parallel/test-stream-big-push.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-duplex.js b/test/parallel/test-stream-duplex.js index 0b71b3d9a50569..9702eb9fda81a7 100644 --- a/test/parallel/test-stream-duplex.js +++ b/test/parallel/test-stream-duplex.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-end-paused.js b/test/parallel/test-stream-end-paused.js index 4b585fdb999890..92f23d7dcb86eb 100644 --- a/test/parallel/test-stream-end-paused.js +++ b/test/parallel/test-stream-end-paused.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-ispaused.js b/test/parallel/test-stream-ispaused.js index f25e717b2b7be9..f45c0209ccdcb7 100644 --- a/test/parallel/test-stream-ispaused.js +++ b/test/parallel/test-stream-ispaused.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-pipe-after-end.js b/test/parallel/test-stream-pipe-after-end.js index 79ebb2c0e0990d..99e9cd16560d0d 100644 --- a/test/parallel/test-stream-pipe-after-end.js +++ b/test/parallel/test-stream-pipe-after-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-pipe-cleanup.js b/test/parallel/test-stream-pipe-cleanup.js index b28b99b772af26..b8ebc036bee24d 100644 --- a/test/parallel/test-stream-pipe-cleanup.js +++ b/test/parallel/test-stream-pipe-cleanup.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This test asserts that Stream.prototype.pipe does not leave listeners // hanging on the source or dest. diff --git a/test/parallel/test-stream-pipe-error-handling.js b/test/parallel/test-stream-pipe-error-handling.js index db79f6e5f36c70..1baeadfdd85866 100644 --- a/test/parallel/test-stream-pipe-error-handling.js +++ b/test/parallel/test-stream-pipe-error-handling.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-pipe-event.js b/test/parallel/test-stream-pipe-event.js index 1b5447eaa21ff9..9054a5a1663ab3 100644 --- a/test/parallel/test-stream-pipe-event.js +++ b/test/parallel/test-stream-pipe-event.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const stream = require('stream'); diff --git a/test/parallel/test-stream-push-order.js b/test/parallel/test-stream-push-order.js index 5fc1f5e89cf156..be2db9f44a6691 100644 --- a/test/parallel/test-stream-push-order.js +++ b/test/parallel/test-stream-push-order.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const Readable = require('stream').Readable; diff --git a/test/parallel/test-stream-push-strings.js b/test/parallel/test-stream-push-strings.js index e77d8a48c679ef..af7132545b5eb3 100644 --- a/test/parallel/test-stream-push-strings.js +++ b/test/parallel/test-stream-push-strings.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-readable-event.js b/test/parallel/test-stream-readable-event.js index 626858ab914857..aa56dcb89f3765 100644 --- a/test/parallel/test-stream-readable-event.js +++ b/test/parallel/test-stream-readable-event.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-readable-flow-recursion.js b/test/parallel/test-stream-readable-flow-recursion.js index e29553900511c3..a3264fef7da96e 100644 --- a/test/parallel/test-stream-readable-flow-recursion.js +++ b/test/parallel/test-stream-readable-flow-recursion.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-transform-objectmode-falsey-value.js b/test/parallel/test-stream-transform-objectmode-falsey-value.js index 9a05034b206421..78ede5d1006515 100644 --- a/test/parallel/test-stream-transform-objectmode-falsey-value.js +++ b/test/parallel/test-stream-transform-objectmode-falsey-value.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-transform-split-objectmode.js b/test/parallel/test-stream-transform-split-objectmode.js index 52185e18711090..6d9603fca37909 100644 --- a/test/parallel/test-stream-transform-split-objectmode.js +++ b/test/parallel/test-stream-transform-split-objectmode.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-unshift-empty-chunk.js b/test/parallel/test-stream-unshift-empty-chunk.js index d555fd7cae2330..9c2c12a41a3958 100644 --- a/test/parallel/test-stream-unshift-empty-chunk.js +++ b/test/parallel/test-stream-unshift-empty-chunk.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-unshift-read-race.js b/test/parallel/test-stream-unshift-read-race.js index 90d1539b525344..d5b46576f986ed 100644 --- a/test/parallel/test-stream-unshift-read-race.js +++ b/test/parallel/test-stream-unshift-read-race.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-writable-change-default-encoding.js b/test/parallel/test-stream-writable-change-default-encoding.js index c3af66ce83701c..837ff2175224a5 100644 --- a/test/parallel/test-stream-writable-change-default-encoding.js +++ b/test/parallel/test-stream-writable-change-default-encoding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-writable-decoded-encoding.js b/test/parallel/test-stream-writable-decoded-encoding.js index 4c903a0b012e3e..5e433c9db1b5c6 100644 --- a/test/parallel/test-stream-writable-decoded-encoding.js +++ b/test/parallel/test-stream-writable-decoded-encoding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream-writev.js b/test/parallel/test-stream-writev.js index 3876a3a53dc730..24da71c8cf3d8f 100644 --- a/test/parallel/test-stream-writev.js +++ b/test/parallel/test-stream-writev.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-base64-single-char-read-end.js b/test/parallel/test-stream2-base64-single-char-read-end.js index 6a9edbd4eaacbe..9a900d04ddcbc7 100644 --- a/test/parallel/test-stream2-base64-single-char-read-end.js +++ b/test/parallel/test-stream2-base64-single-char-read-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const R = require('_stream_readable'); diff --git a/test/parallel/test-stream2-compatibility.js b/test/parallel/test-stream2-compatibility.js index a353da8dede305..45834ee99e5961 100644 --- a/test/parallel/test-stream2-compatibility.js +++ b/test/parallel/test-stream2-compatibility.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const R = require('_stream_readable'); diff --git a/test/parallel/test-stream2-finish-pipe.js b/test/parallel/test-stream2-finish-pipe.js index 87edf5a5fa6437..3fcdbc07d35ab1 100644 --- a/test/parallel/test-stream2-finish-pipe.js +++ b/test/parallel/test-stream2-finish-pipe.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const stream = require('stream'); diff --git a/test/parallel/test-stream2-large-read-stall.js b/test/parallel/test-stream2-large-read-stall.js index 2422747f820bc1..92c35e35413240 100644 --- a/test/parallel/test-stream2-large-read-stall.js +++ b/test/parallel/test-stream2-large-read-stall.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-objects.js b/test/parallel/test-stream2-objects.js index cab838fbfc9acb..7b775fe1c3ad1a 100644 --- a/test/parallel/test-stream2-objects.js +++ b/test/parallel/test-stream2-objects.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const Readable = require('_stream_readable'); diff --git a/test/parallel/test-stream2-pipe-error-handling.js b/test/parallel/test-stream2-pipe-error-handling.js index cdd1b1a364e183..d5d266db8773e0 100644 --- a/test/parallel/test-stream2-pipe-error-handling.js +++ b/test/parallel/test-stream2-pipe-error-handling.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-pipe-error-once-listener.js b/test/parallel/test-stream2-pipe-error-once-listener.js index 908ac1bdb8e4ab..4ab9065d3593cf 100644 --- a/test/parallel/test-stream2-pipe-error-once-listener.js +++ b/test/parallel/test-stream2-pipe-error-once-listener.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/parallel/test-stream2-push.js b/test/parallel/test-stream2-push.js index 95a98450a3034e..88531d9e3dc58e 100644 --- a/test/parallel/test-stream2-push.js +++ b/test/parallel/test-stream2-push.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const Readable = require('stream').Readable; diff --git a/test/parallel/test-stream2-read-sync-stack.js b/test/parallel/test-stream2-read-sync-stack.js index d4e11af3b8f7c1..b9ac0c7a67f7b9 100644 --- a/test/parallel/test-stream2-read-sync-stack.js +++ b/test/parallel/test-stream2-read-sync-stack.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const Readable = require('stream').Readable; diff --git a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js index 71d6f1e7236db2..18bfa28196be5f 100644 --- a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js +++ b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-readable-from-list.js b/test/parallel/test-stream2-readable-from-list.js index 54db1d1c182526..6f677ce8a4155c 100644 --- a/test/parallel/test-stream2-readable-from-list.js +++ b/test/parallel/test-stream2-readable-from-list.js @@ -1,3 +1,24 @@ +// 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. + // Flags: --expose_internals 'use strict'; require('../common'); diff --git a/test/parallel/test-stream2-readable-legacy-drain.js b/test/parallel/test-stream2-readable-legacy-drain.js index d6db6ba232c693..d927e088edd662 100644 --- a/test/parallel/test-stream2-readable-legacy-drain.js +++ b/test/parallel/test-stream2-readable-legacy-drain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-readable-non-empty-end.js b/test/parallel/test-stream2-readable-non-empty-end.js index 46481fe1dcda4c..5e8c4487fe6d8b 100644 --- a/test/parallel/test-stream2-readable-non-empty-end.js +++ b/test/parallel/test-stream2-readable-non-empty-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-readable-wrap-empty.js b/test/parallel/test-stream2-readable-wrap-empty.js index 5b2dae3c5327fa..f9641d80fe9188 100644 --- a/test/parallel/test-stream2-readable-wrap-empty.js +++ b/test/parallel/test-stream2-readable-wrap-empty.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-stream2-readable-wrap.js b/test/parallel/test-stream2-readable-wrap.js index aa091dc3d806f0..37b937d912e06a 100644 --- a/test/parallel/test-stream2-readable-wrap.js +++ b/test/parallel/test-stream2-readable-wrap.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-set-encoding.js b/test/parallel/test-stream2-set-encoding.js index a207168f39a97e..08d9298c6d2138 100644 --- a/test/parallel/test-stream2-set-encoding.js +++ b/test/parallel/test-stream2-set-encoding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js index 2695ac21b752c4..6e59d2d1787bf2 100644 --- a/test/parallel/test-stream2-transform.js +++ b/test/parallel/test-stream2-transform.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-unpipe-drain.js b/test/parallel/test-stream2-unpipe-drain.js index b546e269c8c272..6bb55531ae2dab 100644 --- a/test/parallel/test-stream2-unpipe-drain.js +++ b/test/parallel/test-stream2-unpipe-drain.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-unpipe-leak.js b/test/parallel/test-stream2-unpipe-leak.js index 8800a2bbc68e45..391ee385320ff6 100644 --- a/test/parallel/test-stream2-unpipe-leak.js +++ b/test/parallel/test-stream2-unpipe-leak.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stream2-writable.js b/test/parallel/test-stream2-writable.js index 0464ee96e2f795..5aefe624a4f9fd 100644 --- a/test/parallel/test-stream2-writable.js +++ b/test/parallel/test-stream2-writable.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const W = require('_stream_writable'); diff --git a/test/parallel/test-stream3-pause-then-read.js b/test/parallel/test-stream3-pause-then-read.js index a1be563683c0a2..d75fe697081b32 100644 --- a/test/parallel/test-stream3-pause-then-read.js +++ b/test/parallel/test-stream3-pause-then-read.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-string-decoder-end.js b/test/parallel/test-string-decoder-end.js index d9fe7f8273b864..0284ee9f6c48c7 100644 --- a/test/parallel/test-string-decoder-end.js +++ b/test/parallel/test-string-decoder-end.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // verify that the string decoder works getting 1 byte at a time, // the whole buffer at once, and that both match the .toString(enc) diff --git a/test/parallel/test-string-decoder.js b/test/parallel/test-string-decoder.js index 78f3a48b608da6..af88b809b89640 100644 --- a/test/parallel/test-string-decoder.js +++ b/test/parallel/test-string-decoder.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-stringbytes-external.js b/test/parallel/test-stringbytes-external.js index 94b58d9c6eadf0..937c0818e67ab2 100644 --- a/test/parallel/test-stringbytes-external.js +++ b/test/parallel/test-stringbytes-external.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-sys.js b/test/parallel/test-sys.js index 234744bb118fd7..a7a77b8e1ca48b 100644 --- a/test/parallel/test-sys.js +++ b/test/parallel/test-sys.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tcp-wrap.js b/test/parallel/test-tcp-wrap.js index aee0bcc8509fdf..96ddd5bfd31ffa 100644 --- a/test/parallel/test-tcp-wrap.js +++ b/test/parallel/test-tcp-wrap.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-timers-immediate-queue.js b/test/parallel/test-timers-immediate-queue.js index 103cd964511a53..511a3adf864859 100644 --- a/test/parallel/test-timers-immediate-queue.js +++ b/test/parallel/test-timers-immediate-queue.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-timers-immediate.js b/test/parallel/test-timers-immediate.js index 11702cdef9da76..f5e0fa00a725cc 100644 --- a/test/parallel/test-timers-immediate.js +++ b/test/parallel/test-timers-immediate.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-timers-linked-list.js b/test/parallel/test-timers-linked-list.js index c89c3e23c6d0d0..3c292cbdfcd238 100644 --- a/test/parallel/test-timers-linked-list.js +++ b/test/parallel/test-timers-linked-list.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Flags: --expose-internals diff --git a/test/parallel/test-timers-non-integer-delay.js b/test/parallel/test-timers-non-integer-delay.js index cd7fa5e661dc81..bda4a31d81e495 100644 --- a/test/parallel/test-timers-non-integer-delay.js +++ b/test/parallel/test-timers-non-integer-delay.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/parallel/test-timers-ordering.js b/test/parallel/test-timers-ordering.js index 853f80a66a2384..8a807f94cda497 100644 --- a/test/parallel/test-timers-ordering.js +++ b/test/parallel/test-timers-ordering.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-timers-this.js b/test/parallel/test-timers-this.js index 6bd4033756626e..a2a028fb0620f9 100644 --- a/test/parallel/test-timers-this.js +++ b/test/parallel/test-timers-this.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-timers-uncaught-exception.js b/test/parallel/test-timers-uncaught-exception.js index 31a2d7eccd8105..d7d59798dc3844 100644 --- a/test/parallel/test-timers-uncaught-exception.js +++ b/test/parallel/test-timers-uncaught-exception.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-timers-unref.js b/test/parallel/test-timers-unref.js index 2bde08f914d790..87820a91236a6b 100644 --- a/test/parallel/test-timers-unref.js +++ b/test/parallel/test-timers-unref.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-timers-zero-timeout.js b/test/parallel/test-timers-zero-timeout.js index 5d72cfe85fb870..44a29b499305a3 100644 --- a/test/parallel/test-timers-zero-timeout.js +++ b/test/parallel/test-timers-zero-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-timers.js b/test/parallel/test-timers.js index df2240d2c444af..671b327dfee67e 100644 --- a/test/parallel/test-timers.js +++ b/test/parallel/test-timers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-0-dns-altname.js b/test/parallel/test-tls-0-dns-altname.js index 483d256564accd..ab7141c952566d 100644 --- a/test/parallel/test-tls-0-dns-altname.js +++ b/test/parallel/test-tls-0-dns-altname.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-alert.js b/test/parallel/test-tls-alert.js index a8c6016f6218b7..d65f26d9ec3c01 100644 --- a/test/parallel/test-tls-alert.js +++ b/test/parallel/test-tls-alert.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-cert-regression.js b/test/parallel/test-tls-cert-regression.js index ff5827bcf844ee..23280b7e932a70 100644 --- a/test/parallel/test-tls-cert-regression.js +++ b/test/parallel/test-tls-cert-regression.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-check-server-identity.js b/test/parallel/test-tls-check-server-identity.js index 9439735ce069b4..e608df5a5a1ae1 100644 --- a/test/parallel/test-tls-check-server-identity.js +++ b/test/parallel/test-tls-check-server-identity.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-client-abort.js b/test/parallel/test-tls-client-abort.js index 5b1e6eb7fbab9c..ef9d28c9f12369 100644 --- a/test/parallel/test-tls-client-abort.js +++ b/test/parallel/test-tls-client-abort.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-client-abort2.js b/test/parallel/test-tls-client-abort2.js index 3698db7a3cf6d0..0656fd0e0f9a81 100644 --- a/test/parallel/test-tls-client-abort2.js +++ b/test/parallel/test-tls-client-abort2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-client-default-ciphers.js b/test/parallel/test-tls-client-default-ciphers.js index 30095197b1c807..9eefe21e95732e 100644 --- a/test/parallel/test-tls-client-default-ciphers.js +++ b/test/parallel/test-tls-client-default-ciphers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-client-destroy-soon.js b/test/parallel/test-tls-client-destroy-soon.js index 016fcfa4da6a95..66e37ca15f2d87 100644 --- a/test/parallel/test-tls-client-destroy-soon.js +++ b/test/parallel/test-tls-client-destroy-soon.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Create an ssl server. First connection, validate that not resume. // Cache session and close connection. Use session on second connection. diff --git a/test/parallel/test-tls-client-reject.js b/test/parallel/test-tls-client-reject.js index 003de4b8a38241..43cf337e672627 100644 --- a/test/parallel/test-tls-client-reject.js +++ b/test/parallel/test-tls-client-reject.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-client-resume.js b/test/parallel/test-tls-client-resume.js index 96109d7656dd19..cf7846a06f7587 100644 --- a/test/parallel/test-tls-client-resume.js +++ b/test/parallel/test-tls-client-resume.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Create an ssl server. First connection, validate that not resume. // Cache session and close connection. Use session on second connection. diff --git a/test/parallel/test-tls-client-verify.js b/test/parallel/test-tls-client-verify.js index 33d6c95fde50d3..926cf79b9d7fb9 100644 --- a/test/parallel/test-tls-client-verify.js +++ b/test/parallel/test-tls-client-verify.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-close-notify.js b/test/parallel/test-tls-close-notify.js index 5d5bc1007749a7..9737c80effceab 100644 --- a/test/parallel/test-tls-close-notify.js +++ b/test/parallel/test-tls-close-notify.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-connect-given-socket.js b/test/parallel/test-tls-connect-given-socket.js index aa9174b8dad2f3..971593b20b50af 100644 --- a/test/parallel/test-tls-connect-given-socket.js +++ b/test/parallel/test-tls-connect-given-socket.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-connect-pipe.js b/test/parallel/test-tls-connect-pipe.js index de60ae084624cf..464a19ebd3a570 100644 --- a/test/parallel/test-tls-connect-pipe.js +++ b/test/parallel/test-tls-connect-pipe.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-connect-simple.js b/test/parallel/test-tls-connect-simple.js index a6bcfcab519fdf..e8f9980a8faa30 100644 --- a/test/parallel/test-tls-connect-simple.js +++ b/test/parallel/test-tls-connect-simple.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-connect.js b/test/parallel/test-tls-connect.js index e53d5e32725da9..e3bb662d7c197d 100644 --- a/test/parallel/test-tls-connect.js +++ b/test/parallel/test-tls-connect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-delayed-attach.js b/test/parallel/test-tls-delayed-attach.js index 9d2aca6a7d6c6f..b8203581e20c6c 100644 --- a/test/parallel/test-tls-delayed-attach.js +++ b/test/parallel/test-tls-delayed-attach.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-dhe.js b/test/parallel/test-tls-dhe.js index b4ca0b46e3c69c..cfb1557cba1961 100644 --- a/test/parallel/test-tls-dhe.js +++ b/test/parallel/test-tls-dhe.js @@ -1,4 +1,25 @@ // Flags: --no-warnings +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-ecdh-disable.js b/test/parallel/test-tls-ecdh-disable.js index eec22c3cd34c8b..011d45173f5e49 100644 --- a/test/parallel/test-tls-ecdh-disable.js +++ b/test/parallel/test-tls-ecdh-disable.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-ecdh.js b/test/parallel/test-tls-ecdh.js index ade8839a954424..9b8662b0759cf2 100644 --- a/test/parallel/test-tls-ecdh.js +++ b/test/parallel/test-tls-ecdh.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-econnreset.js b/test/parallel/test-tls-econnreset.js index 6bf84a2d0ea726..d173580d858e15 100644 --- a/test/parallel/test-tls-econnreset.js +++ b/test/parallel/test-tls-econnreset.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-fast-writing.js b/test/parallel/test-tls-fast-writing.js index b2d6fe6eee88a3..e0f6062da0d87d 100644 --- a/test/parallel/test-tls-fast-writing.js +++ b/test/parallel/test-tls-fast-writing.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-friendly-error-message.js b/test/parallel/test-tls-friendly-error-message.js index 3f3bfe9133fcd6..bba2422bd74e9c 100644 --- a/test/parallel/test-tls-friendly-error-message.js +++ b/test/parallel/test-tls-friendly-error-message.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-getcipher.js b/test/parallel/test-tls-getcipher.js index b5205d48778f5f..a60eaeb504e2cf 100644 --- a/test/parallel/test-tls-getcipher.js +++ b/test/parallel/test-tls-getcipher.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-handshake-nohang.js b/test/parallel/test-tls-handshake-nohang.js index 039c55b486d6a2..791ba8df84b3a0 100644 --- a/test/parallel/test-tls-handshake-nohang.js +++ b/test/parallel/test-tls-handshake-nohang.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-hello-parser-failure.js b/test/parallel/test-tls-hello-parser-failure.js index f9c280f5e57a34..4d3a1b40fb9fd2 100644 --- a/test/parallel/test-tls-hello-parser-failure.js +++ b/test/parallel/test-tls-hello-parser-failure.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-inception.js b/test/parallel/test-tls-inception.js index 183fbe587b366c..38f922107b0b9a 100644 --- a/test/parallel/test-tls-inception.js +++ b/test/parallel/test-tls-inception.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-interleave.js b/test/parallel/test-tls-interleave.js index 9cccee82506005..1f33a7b09794a5 100644 --- a/test/parallel/test-tls-interleave.js +++ b/test/parallel/test-tls-interleave.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-invoke-queued.js b/test/parallel/test-tls-invoke-queued.js index bd3ad43fe653e5..2b64be39f64853 100644 --- a/test/parallel/test-tls-invoke-queued.js +++ b/test/parallel/test-tls-invoke-queued.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-junk-closes-server.js b/test/parallel/test-tls-junk-closes-server.js index 1ecc83da2d77d1..5037758dfbb703 100644 --- a/test/parallel/test-tls-junk-closes-server.js +++ b/test/parallel/test-tls-junk-closes-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-key-mismatch.js b/test/parallel/test-tls-key-mismatch.js index 65cac6f07a296c..7c0a96db6a810d 100644 --- a/test/parallel/test-tls-key-mismatch.js +++ b/test/parallel/test-tls-key-mismatch.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-max-send-fragment.js b/test/parallel/test-tls-max-send-fragment.js index 4b81be35e34522..eec998f249c2f8 100644 --- a/test/parallel/test-tls-max-send-fragment.js +++ b/test/parallel/test-tls-max-send-fragment.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-multi-key.js b/test/parallel/test-tls-multi-key.js index e3d5d661a799a7..aa245c3a1a706e 100644 --- a/test/parallel/test-tls-multi-key.js +++ b/test/parallel/test-tls-multi-key.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-no-cert-required.js b/test/parallel/test-tls-no-cert-required.js index 3c7cf4462fcd07..04a8b91cf8e354 100644 --- a/test/parallel/test-tls-no-cert-required.js +++ b/test/parallel/test-tls-no-cert-required.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const assert = require('assert'); const common = require('../common'); diff --git a/test/parallel/test-tls-no-rsa-key.js b/test/parallel/test-tls-no-rsa-key.js index ed5c941b2d33ba..37d517f4dffc8a 100644 --- a/test/parallel/test-tls-no-rsa-key.js +++ b/test/parallel/test-tls-no-rsa-key.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-npn-server-client.js b/test/parallel/test-tls-npn-server-client.js index c12fddb55bfab0..ec73bbcc503010 100644 --- a/test/parallel/test-tls-npn-server-client.js +++ b/test/parallel/test-tls-npn-server-client.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); if (!process.features.tls_npn) { diff --git a/test/parallel/test-tls-ocsp-callback.js b/test/parallel/test-tls-ocsp-callback.js index c008613c2ccf9f..a02ab8a440ee2e 100644 --- a/test/parallel/test-tls-ocsp-callback.js +++ b/test/parallel/test-tls-ocsp-callback.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-over-http-tunnel.js b/test/parallel/test-tls-over-http-tunnel.js index a37913907b5b19..cc02c0bbc2e65f 100644 --- a/test/parallel/test-tls-over-http-tunnel.js +++ b/test/parallel/test-tls-over-http-tunnel.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-passphrase.js b/test/parallel/test-tls-passphrase.js index 4630fe236d16c7..be9bbf0faefa76 100644 --- a/test/parallel/test-tls-passphrase.js +++ b/test/parallel/test-tls-passphrase.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-pause.js b/test/parallel/test-tls-pause.js index c5b96b96dd675f..1160de5954e63e 100644 --- a/test/parallel/test-tls-pause.js +++ b/test/parallel/test-tls-pause.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-peer-certificate-encoding.js b/test/parallel/test-tls-peer-certificate-encoding.js index 1ae30974aeda83..95f14c7b8ee12a 100644 --- a/test/parallel/test-tls-peer-certificate-encoding.js +++ b/test/parallel/test-tls-peer-certificate-encoding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-peer-certificate-multi-keys.js b/test/parallel/test-tls-peer-certificate-multi-keys.js index 693bb4cb3fa812..a58c747bd41ea1 100644 --- a/test/parallel/test-tls-peer-certificate-multi-keys.js +++ b/test/parallel/test-tls-peer-certificate-multi-keys.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-peer-certificate.js b/test/parallel/test-tls-peer-certificate.js index 8c56e72af14632..ba18870d82f633 100644 --- a/test/parallel/test-tls-peer-certificate.js +++ b/test/parallel/test-tls-peer-certificate.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-request-timeout.js b/test/parallel/test-tls-request-timeout.js index 4873a3c696458f..411c09aa693010 100644 --- a/test/parallel/test-tls-request-timeout.js +++ b/test/parallel/test-tls-request-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-securepair-server.js b/test/parallel/test-tls-securepair-server.js index 76d2f88ac6b8d4..ea6c8e98a9c289 100644 --- a/test/parallel/test-tls-securepair-server.js +++ b/test/parallel/test-tls-securepair-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-server-verify.js b/test/parallel/test-tls-server-verify.js index 3b297dd4cea4d7..a80475bb65dd62 100644 --- a/test/parallel/test-tls-server-verify.js +++ b/test/parallel/test-tls-server-verify.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-session-cache.js b/test/parallel/test-tls-session-cache.js index 272978467167c7..f555da842bbd0c 100644 --- a/test/parallel/test-tls-session-cache.js +++ b/test/parallel/test-tls-session-cache.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-set-ciphers.js b/test/parallel/test-tls-set-ciphers.js index a1af1a917eb826..720c0515891e24 100644 --- a/test/parallel/test-tls-set-ciphers.js +++ b/test/parallel/test-tls-set-ciphers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-set-encoding.js b/test/parallel/test-tls-set-encoding.js index 5eb58132bc2b64..079d3f2c01895f 100644 --- a/test/parallel/test-tls-set-encoding.js +++ b/test/parallel/test-tls-set-encoding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-sni-option.js b/test/parallel/test-tls-sni-option.js index 2e7245336b8b98..24050a99dffe84 100644 --- a/test/parallel/test-tls-sni-option.js +++ b/test/parallel/test-tls-sni-option.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); if (!process.features.tls_sni) { diff --git a/test/parallel/test-tls-sni-server-client.js b/test/parallel/test-tls-sni-server-client.js index 93fffd3888ffd1..158dcf8397eb59 100644 --- a/test/parallel/test-tls-sni-server-client.js +++ b/test/parallel/test-tls-sni-server-client.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); if (!process.features.tls_sni) { diff --git a/test/parallel/test-tls-ticket-cluster.js b/test/parallel/test-tls-ticket-cluster.js index fa630f4ec251bd..fda0ce58507baf 100644 --- a/test/parallel/test-tls-ticket-cluster.js +++ b/test/parallel/test-tls-ticket-cluster.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-ticket.js b/test/parallel/test-tls-ticket.js index 0fa0c057f3e573..5907719aeba8c9 100644 --- a/test/parallel/test-tls-ticket.js +++ b/test/parallel/test-tls-ticket.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-timeout-server-2.js b/test/parallel/test-tls-timeout-server-2.js index 1613e9fc4e06d6..362b83ca46219f 100644 --- a/test/parallel/test-tls-timeout-server-2.js +++ b/test/parallel/test-tls-timeout-server-2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-tls-timeout-server.js b/test/parallel/test-tls-timeout-server.js index 5720317dd0a10f..c676cccacb6c76 100644 --- a/test/parallel/test-tls-timeout-server.js +++ b/test/parallel/test-tls-timeout-server.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-tls-zero-clear-in.js b/test/parallel/test-tls-zero-clear-in.js index c738a0afce988b..10d0efaf0b470b 100644 --- a/test/parallel/test-tls-zero-clear-in.js +++ b/test/parallel/test-tls-zero-clear-in.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-umask.js b/test/parallel/test-umask.js index 7e4827a4cfc47d..6c54f1139c7086 100644 --- a/test/parallel/test-umask.js +++ b/test/parallel/test-umask.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-utf8-scripts.js b/test/parallel/test-utf8-scripts.js index e9d141d58abab0..a67f291f8931aa 100644 --- a/test/parallel/test-utf8-scripts.js +++ b/test/parallel/test-utf8-scripts.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-util-format.js b/test/parallel/test-util-format.js index 71265e4b6a37f8..49b234e2e2bbf7 100644 --- a/test/parallel/test-util-format.js +++ b/test/parallel/test-util-format.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 5e359d5d7900b8..e0a06e97db6e6b 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-util-log.js b/test/parallel/test-util-log.js index 3604b42820063e..f32dcecd15a7bf 100644 --- a/test/parallel/test-util-log.js +++ b/test/parallel/test-util-log.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-util.js b/test/parallel/test-util.js index 3b7e78ea1e464e..fabf9dc22bd22d 100644 --- a/test/parallel/test-util.js +++ b/test/parallel/test-util.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-basic.js b/test/parallel/test-vm-basic.js index 2d57cc0d4ba328..864c3553663a2c 100644 --- a/test/parallel/test-vm-basic.js +++ b/test/parallel/test-vm-basic.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-context-async-script.js b/test/parallel/test-vm-context-async-script.js index 1e9ed629fb114f..87b6f501111a7c 100644 --- a/test/parallel/test-vm-context-async-script.js +++ b/test/parallel/test-vm-context-async-script.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-context-property-forwarding.js b/test/parallel/test-vm-context-property-forwarding.js index b77fc45217039f..eca34e9b0987ec 100644 --- a/test/parallel/test-vm-context-property-forwarding.js +++ b/test/parallel/test-vm-context-property-forwarding.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js index c58bdc29daba66..171d5d7e3d268b 100644 --- a/test/parallel/test-vm-context.js +++ b/test/parallel/test-vm-context.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-create-and-run-in-context.js b/test/parallel/test-vm-create-and-run-in-context.js index 7fd3f1d70436ad..96d7631f24886f 100644 --- a/test/parallel/test-vm-create-and-run-in-context.js +++ b/test/parallel/test-vm-create-and-run-in-context.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Flags: --expose-gc require('../common'); diff --git a/test/parallel/test-vm-create-context-accessors.js b/test/parallel/test-vm-create-context-accessors.js index 27d7e6d7fc0274..291e27e8ae8625 100644 --- a/test/parallel/test-vm-create-context-accessors.js +++ b/test/parallel/test-vm-create-context-accessors.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-create-context-arg.js b/test/parallel/test-vm-create-context-arg.js index 91bbbc3b7793bc..87695b34ec8044 100644 --- a/test/parallel/test-vm-create-context-arg.js +++ b/test/parallel/test-vm-create-context-arg.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-create-context-circular-reference.js b/test/parallel/test-vm-create-context-circular-reference.js index 1d7be0db9fdaf4..7ea22781bdc087 100644 --- a/test/parallel/test-vm-create-context-circular-reference.js +++ b/test/parallel/test-vm-create-context-circular-reference.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-cross-context.js b/test/parallel/test-vm-cross-context.js index bafb32accb6a0e..5d45387e5d76e5 100644 --- a/test/parallel/test-vm-cross-context.js +++ b/test/parallel/test-vm-cross-context.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-debug-context.js b/test/parallel/test-vm-debug-context.js index 2a248fe25ceb71..6cafc6b8bcb9cd 100644 --- a/test/parallel/test-vm-debug-context.js +++ b/test/parallel/test-vm-debug-context.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable no-debugger */ 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-vm-function-declaration.js b/test/parallel/test-vm-function-declaration.js index 668b29885c44cf..70a8188405e7e9 100644 --- a/test/parallel/test-vm-function-declaration.js +++ b/test/parallel/test-vm-function-declaration.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-global-define-property.js b/test/parallel/test-vm-global-define-property.js index 83f6073d1ceaf1..30709fccaab453 100644 --- a/test/parallel/test-vm-global-define-property.js +++ b/test/parallel/test-vm-global-define-property.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-global-identity.js b/test/parallel/test-vm-global-identity.js index ae9fd71b3109ee..8ab47a921c7e3a 100644 --- a/test/parallel/test-vm-global-identity.js +++ b/test/parallel/test-vm-global-identity.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-harmony-symbols.js b/test/parallel/test-vm-harmony-symbols.js index 80c1a2127f918c..901380f4d63a57 100644 --- a/test/parallel/test-vm-harmony-symbols.js +++ b/test/parallel/test-vm-harmony-symbols.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-is-context.js b/test/parallel/test-vm-is-context.js index e58b896fccaa43..1c5a2244323cc3 100644 --- a/test/parallel/test-vm-is-context.js +++ b/test/parallel/test-vm-is-context.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-new-script-new-context.js b/test/parallel/test-vm-new-script-new-context.js index 693a041138602f..8909cc846305c2 100644 --- a/test/parallel/test-vm-new-script-new-context.js +++ b/test/parallel/test-vm-new-script-new-context.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-new-script-this-context.js b/test/parallel/test-vm-new-script-this-context.js index 3df5dc1b5020d5..7ddb2110085ee4 100644 --- a/test/parallel/test-vm-new-script-this-context.js +++ b/test/parallel/test-vm-new-script-this-context.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-run-in-new-context.js b/test/parallel/test-vm-run-in-new-context.js index 7b096ffc3fdc5f..04bc3bf4a1e02a 100644 --- a/test/parallel/test-vm-run-in-new-context.js +++ b/test/parallel/test-vm-run-in-new-context.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Flags: --expose-gc diff --git a/test/parallel/test-vm-static-this.js b/test/parallel/test-vm-static-this.js index 076f81dbf6ff15..5306e31dc0e4a7 100644 --- a/test/parallel/test-vm-static-this.js +++ b/test/parallel/test-vm-static-this.js @@ -1,3 +1,24 @@ +// 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. + /* eslint-disable strict */ const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-vm-timeout.js b/test/parallel/test-vm-timeout.js index 6ed73f8b4ffd78..19ccd2cee50e73 100644 --- a/test/parallel/test-vm-timeout.js +++ b/test/parallel/test-vm-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-writedouble.js b/test/parallel/test-writedouble.js index fa9c94022d419b..b6a53842044340 100644 --- a/test/parallel/test-writedouble.js +++ b/test/parallel/test-writedouble.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * Tests to verify we're writing doubles correctly diff --git a/test/parallel/test-writefloat.js b/test/parallel/test-writefloat.js index aeb62c8c022484..c175840f598087 100644 --- a/test/parallel/test-writefloat.js +++ b/test/parallel/test-writefloat.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * Tests to verify we're writing floats correctly diff --git a/test/parallel/test-writeint.js b/test/parallel/test-writeint.js index 70599dc17750d7..cc3ec80d63ce60 100644 --- a/test/parallel/test-writeint.js +++ b/test/parallel/test-writeint.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * Tests to verify we're writing signed integers correctly diff --git a/test/parallel/test-writeuint.js b/test/parallel/test-writeuint.js index e91e1d256d0261..620d151d4594fb 100644 --- a/test/parallel/test-writeuint.js +++ b/test/parallel/test-writeuint.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; /* * A battery of tests to help us read a series of uints diff --git a/test/parallel/test-zlib-close-after-write.js b/test/parallel/test-zlib-close-after-write.js index d25ccfe381f113..5db420844c0b67 100644 --- a/test/parallel/test-zlib-close-after-write.js +++ b/test/parallel/test-zlib-close-after-write.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const zlib = require('zlib'); diff --git a/test/parallel/test-zlib-convenience-methods.js b/test/parallel/test-zlib-convenience-methods.js index 9b9419c7bfaf47..5f1e1ce9e20b0b 100644 --- a/test/parallel/test-zlib-convenience-methods.js +++ b/test/parallel/test-zlib-convenience-methods.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // test convenience methods with and without options supplied diff --git a/test/parallel/test-zlib-dictionary-fail.js b/test/parallel/test-zlib-dictionary-fail.js index 97d6512100bbf1..ccec8d9d2c7245 100644 --- a/test/parallel/test-zlib-dictionary-fail.js +++ b/test/parallel/test-zlib-dictionary-fail.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-zlib-dictionary.js b/test/parallel/test-zlib-dictionary.js index 0223130ac13877..fd70d73556d0a9 100644 --- a/test/parallel/test-zlib-dictionary.js +++ b/test/parallel/test-zlib-dictionary.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // test compression/decompression with dictionary diff --git a/test/parallel/test-zlib-from-gzip.js b/test/parallel/test-zlib-from-gzip.js index ac01fc03d11c6f..97070dcba405cc 100644 --- a/test/parallel/test-zlib-from-gzip.js +++ b/test/parallel/test-zlib-from-gzip.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // test unzipping a file that was created with a non-node gzip lib, // piped in as fast as possible. diff --git a/test/parallel/test-zlib-from-string.js b/test/parallel/test-zlib-from-string.js index ab2f7d023d8bc8..a17f2bb728bcba 100644 --- a/test/parallel/test-zlib-from-string.js +++ b/test/parallel/test-zlib-from-string.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // test compressing and uncompressing a string with zlib diff --git a/test/parallel/test-zlib-invalid-input.js b/test/parallel/test-zlib-invalid-input.js index 7b0e1fcaae8ce6..19be1169343f2b 100644 --- a/test/parallel/test-zlib-invalid-input.js +++ b/test/parallel/test-zlib-invalid-input.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // test uncompressing invalid input diff --git a/test/parallel/test-zlib-random-byte-pipes.js b/test/parallel/test-zlib-random-byte-pipes.js index d4cd4319f93c21..4ccfd2dc228255 100644 --- a/test/parallel/test-zlib-random-byte-pipes.js +++ b/test/parallel/test-zlib-random-byte-pipes.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-zlib-write-after-close.js b/test/parallel/test-zlib-write-after-close.js index fdad1708c81ff0..9de98780473fa6 100644 --- a/test/parallel/test-zlib-write-after-close.js +++ b/test/parallel/test-zlib-write-after-close.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-zlib-write-after-flush.js b/test/parallel/test-zlib-write-after-flush.js index e0e962218269dd..10eee39951be41 100644 --- a/test/parallel/test-zlib-write-after-flush.js +++ b/test/parallel/test-zlib-write-after-flush.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-zlib-zero-byte.js b/test/parallel/test-zlib-zero-byte.js index cd4cf41f98ac07..bd0f8d132df04b 100644 --- a/test/parallel/test-zlib-zero-byte.js +++ b/test/parallel/test-zlib-zero-byte.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-zlib.js b/test/parallel/test-zlib.js index fdd5d0a9400f25..5ca11a7dac104c 100644 --- a/test/parallel/test-zlib.js +++ b/test/parallel/test-zlib.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-abort-fatal-error.js b/test/pummel/test-abort-fatal-error.js index d1a8d3daa65e4c..7b8a1d07ca38b8 100644 --- a/test/pummel/test-abort-fatal-error.js +++ b/test/pummel/test-abort-fatal-error.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-child-process-spawn-loop.js b/test/pummel/test-child-process-spawn-loop.js index 41d9ff1e49c17b..355fa70728bf21 100644 --- a/test/pummel/test-child-process-spawn-loop.js +++ b/test/pummel/test-child-process-spawn-loop.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-crypto-dh.js b/test/pummel/test-crypto-dh.js index 03be3ab7ad48e2..2268994b4d2f16 100644 --- a/test/pummel/test-crypto-dh.js +++ b/test/pummel/test-crypto-dh.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-dh-regr.js b/test/pummel/test-dh-regr.js index 5be6abb9a8b29c..092d91428eb4e7 100644 --- a/test/pummel/test-dh-regr.js +++ b/test/pummel/test-dh-regr.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-dtrace-jsstack.js b/test/pummel/test-dtrace-jsstack.js index 6c8423c2c9c83b..b5809840753085 100644 --- a/test/pummel/test-dtrace-jsstack.js +++ b/test/pummel/test-dtrace-jsstack.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-exec.js b/test/pummel/test-exec.js index 131b214fc53f42..8047a2dc154b84 100644 --- a/test/pummel/test-exec.js +++ b/test/pummel/test-exec.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-fs-watch-file-slow.js b/test/pummel/test-fs-watch-file-slow.js index 1e9b5eb1f219ff..acccec8a829f46 100644 --- a/test/pummel/test-fs-watch-file-slow.js +++ b/test/pummel/test-fs-watch-file-slow.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-fs-watch-file.js b/test/pummel/test-fs-watch-file.js index 36d2f2c10eff19..2e23a93c62e6a9 100644 --- a/test/pummel/test-fs-watch-file.js +++ b/test/pummel/test-fs-watch-file.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-fs-watch-non-recursive.js b/test/pummel/test-fs-watch-non-recursive.js index 183733dda819dd..02447cf5215e5a 100644 --- a/test/pummel/test-fs-watch-non-recursive.js +++ b/test/pummel/test-fs-watch-non-recursive.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const path = require('path'); diff --git a/test/pummel/test-http-client-reconnect-bug.js b/test/pummel/test-http-client-reconnect-bug.js index 98d21c5cba7bc5..e8b324a7df8fef 100644 --- a/test/pummel/test-http-client-reconnect-bug.js +++ b/test/pummel/test-http-client-reconnect-bug.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/pummel/test-http-many-keep-alive-connections.js b/test/pummel/test-http-many-keep-alive-connections.js index ee616e1d918e66..cb9f9946844912 100644 --- a/test/pummel/test-http-many-keep-alive-connections.js +++ b/test/pummel/test-http-many-keep-alive-connections.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-http-upload-timeout.js b/test/pummel/test-http-upload-timeout.js index da91ab3f0909e7..2c1cbf61988ec6 100644 --- a/test/pummel/test-http-upload-timeout.js +++ b/test/pummel/test-http-upload-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This tests setTimeout() by having multiple clients connecting and sending // data in random intervals. Clients are also randomly disconnecting until there diff --git a/test/pummel/test-https-ci-reneg-attack.js b/test/pummel/test-https-ci-reneg-attack.js index 6113ee54ce904b..8adaf586f3c7e6 100644 --- a/test/pummel/test-https-ci-reneg-attack.js +++ b/test/pummel/test-https-ci-reneg-attack.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-https-large-response.js b/test/pummel/test-https-large-response.js index 39256aa6304b74..20648511366952 100644 --- a/test/pummel/test-https-large-response.js +++ b/test/pummel/test-https-large-response.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-https-no-reader.js b/test/pummel/test-https-no-reader.js index a08676277af6ce..2a446bfbdd3add 100644 --- a/test/pummel/test-https-no-reader.js +++ b/test/pummel/test-https-no-reader.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-keep-alive.js b/test/pummel/test-keep-alive.js index a9e91e201bb19b..fb3e4e7ca6ba32 100644 --- a/test/pummel/test-keep-alive.js +++ b/test/pummel/test-keep-alive.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // This test requires the program 'wrk' diff --git a/test/pummel/test-net-connect-econnrefused.js b/test/pummel/test-net-connect-econnrefused.js index 4ac55da40553e0..4f9110172af8e3 100644 --- a/test/pummel/test-net-connect-econnrefused.js +++ b/test/pummel/test-net-connect-econnrefused.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // verify that connect reqs are properly cleaned up diff --git a/test/pummel/test-net-connect-memleak.js b/test/pummel/test-net-connect-memleak.js index f16034e4773510..4e772c1282eabf 100644 --- a/test/pummel/test-net-connect-memleak.js +++ b/test/pummel/test-net-connect-memleak.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Flags: --expose-gc diff --git a/test/pummel/test-net-many-clients.js b/test/pummel/test-net-many-clients.js index fdcdf1198f8df2..657b03abdec205 100644 --- a/test/pummel/test-net-many-clients.js +++ b/test/pummel/test-net-many-clients.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-net-pause.js b/test/pummel/test-net-pause.js index b850b1179c574e..ce8aae49eb70a9 100644 --- a/test/pummel/test-net-pause.js +++ b/test/pummel/test-net-pause.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-net-pingpong-delay.js b/test/pummel/test-net-pingpong-delay.js index 2236ba83a88f02..25d610bf44a58b 100644 --- a/test/pummel/test-net-pingpong-delay.js +++ b/test/pummel/test-net-pingpong-delay.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-net-pingpong.js b/test/pummel/test-net-pingpong.js index 5e0950285739a1..e862aaa7a52a11 100644 --- a/test/pummel/test-net-pingpong.js +++ b/test/pummel/test-net-pingpong.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-net-throttle.js b/test/pummel/test-net-throttle.js index c222d0bb17ccfa..bc67abda0a2bf9 100644 --- a/test/pummel/test-net-throttle.js +++ b/test/pummel/test-net-throttle.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-net-timeout.js b/test/pummel/test-net-timeout.js index faec443a007f20..15e070c979e441 100644 --- a/test/pummel/test-net-timeout.js +++ b/test/pummel/test-net-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-net-timeout2.js b/test/pummel/test-net-timeout2.js index 113e32523792f2..f66acff4fb85ee 100644 --- a/test/pummel/test-net-timeout2.js +++ b/test/pummel/test-net-timeout2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // socket.write was not resetting the timeout timer. See // https://github.com/joyent/node/issues/2002 diff --git a/test/pummel/test-net-write-callbacks.js b/test/pummel/test-net-write-callbacks.js index b29ae6ef808292..6d8ab0b0ff37d5 100644 --- a/test/pummel/test-net-write-callbacks.js +++ b/test/pummel/test-net-write-callbacks.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/pummel/test-next-tick-infinite-calls.js b/test/pummel/test-next-tick-infinite-calls.js index afce6ef846b10f..b72d18fa40c23e 100644 --- a/test/pummel/test-next-tick-infinite-calls.js +++ b/test/pummel/test-next-tick-infinite-calls.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/pummel/test-process-hrtime.js b/test/pummel/test-process-hrtime.js index d02b9c79822a88..f0f8768702c322 100644 --- a/test/pummel/test-process-hrtime.js +++ b/test/pummel/test-process-hrtime.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-process-uptime.js b/test/pummel/test-process-uptime.js index 5c09d59b06d55c..781066371eaa31 100644 --- a/test/pummel/test-process-uptime.js +++ b/test/pummel/test-process-uptime.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-regress-GH-814.js b/test/pummel/test-regress-GH-814.js index 20323360debfe3..898f30c89c05d2 100644 --- a/test/pummel/test-regress-GH-814.js +++ b/test/pummel/test-regress-GH-814.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Flags: --expose_gc diff --git a/test/pummel/test-regress-GH-814_2.js b/test/pummel/test-regress-GH-814_2.js index 233e8530459545..c272196846c788 100644 --- a/test/pummel/test-regress-GH-814_2.js +++ b/test/pummel/test-regress-GH-814_2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Flags: --expose_gc diff --git a/test/pummel/test-regress-GH-892.js b/test/pummel/test-regress-GH-892.js index 3ec44dfa12bb5b..c6f52a676aaf0b 100644 --- a/test/pummel/test-regress-GH-892.js +++ b/test/pummel/test-regress-GH-892.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Uploading a big file via HTTPS causes node to drop out of the event loop. // https://github.com/joyent/node/issues/892 diff --git a/test/pummel/test-stream-pipe-multi.js b/test/pummel/test-stream-pipe-multi.js index 478b61c822d4e0..bb16c62348dab1 100644 --- a/test/pummel/test-stream-pipe-multi.js +++ b/test/pummel/test-stream-pipe-multi.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Test that having a bunch of streams piping in parallel // doesn't break anything. diff --git a/test/pummel/test-stream2-basic.js b/test/pummel/test-stream2-basic.js index 0e2bf3e8e302ce..9e61a6ef0ad738 100644 --- a/test/pummel/test-stream2-basic.js +++ b/test/pummel/test-stream2-basic.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const R = require('_stream_readable'); diff --git a/test/pummel/test-timer-wrap.js b/test/pummel/test-timer-wrap.js index d30661716bd2b2..847781b3f27097 100644 --- a/test/pummel/test-timer-wrap.js +++ b/test/pummel/test-timer-wrap.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/pummel/test-timer-wrap2.js b/test/pummel/test-timer-wrap2.js index 4bae86f8cefb0c..965f0aeef8d93b 100644 --- a/test/pummel/test-timer-wrap2.js +++ b/test/pummel/test-timer-wrap2.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); diff --git a/test/pummel/test-timers.js b/test/pummel/test-timers.js index 600b7ce35b0913..44dcf0be14595d 100644 --- a/test/pummel/test-timers.js +++ b/test/pummel/test-timers.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-tls-ci-reneg-attack.js b/test/pummel/test-tls-ci-reneg-attack.js index 9c2d3da5c3f6b1..0eda7d84499bf9 100644 --- a/test/pummel/test-tls-ci-reneg-attack.js +++ b/test/pummel/test-tls-ci-reneg-attack.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-tls-connect-memleak.js b/test/pummel/test-tls-connect-memleak.js index b1d1f05190c39d..d445f39fb66352 100644 --- a/test/pummel/test-tls-connect-memleak.js +++ b/test/pummel/test-tls-connect-memleak.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Flags: --expose-gc diff --git a/test/pummel/test-tls-securepair-client.js b/test/pummel/test-tls-securepair-client.js index cd9299cb790958..93e774a44aa40a 100644 --- a/test/pummel/test-tls-securepair-client.js +++ b/test/pummel/test-tls-securepair-client.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // diff --git a/test/pummel/test-tls-server-large-request.js b/test/pummel/test-tls-server-large-request.js index 36fb566fab15d2..a88ee5870e76e8 100644 --- a/test/pummel/test-tls-server-large-request.js +++ b/test/pummel/test-tls-server-large-request.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/pummel/test-tls-session-timeout.js b/test/pummel/test-tls-session-timeout.js index c194188b3682a9..23b79e312f9d82 100644 --- a/test/pummel/test-tls-session-timeout.js +++ b/test/pummel/test-tls-session-timeout.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/pummel/test-tls-throttle.js b/test/pummel/test-tls-throttle.js index e427e0bf89f877..55dcdd258a16ee 100644 --- a/test/pummel/test-tls-throttle.js +++ b/test/pummel/test-tls-throttle.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Server sends a large string. Client counts bytes and pauses every few // seconds. Makes sure that pause and resume work properly. diff --git a/test/pummel/test-vm-memleak.js b/test/pummel/test-vm-memleak.js index 8503e2389b44a7..79c22f030f57b1 100644 --- a/test/pummel/test-vm-memleak.js +++ b/test/pummel/test-vm-memleak.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Flags: --max_old_space_size=32 diff --git a/test/pummel/test-watch-file.js b/test/pummel/test-watch-file.js index 90909875d74a15..0ca8154ee2d254 100644 --- a/test/pummel/test-watch-file.js +++ b/test/pummel/test-watch-file.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-child-process-emfile.js b/test/sequential/test-child-process-emfile.js index ff141bdf4bfcf0..59756e4c7b2e7c 100644 --- a/test/sequential/test-child-process-emfile.js +++ b/test/sequential/test-child-process-emfile.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index fd9970db7db814..4c8dd0d0a424f9 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-child-process-fork-getconnections.js b/test/sequential/test-child-process-fork-getconnections.js index 355a45913c8699..f9dda9ba1d1ce9 100644 --- a/test/sequential/test-child-process-fork-getconnections.js +++ b/test/sequential/test-child-process-fork-getconnections.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-deprecation-flags.js b/test/sequential/test-deprecation-flags.js index 3bd2e99033beb1..ae5de814397d49 100644 --- a/test/sequential/test-deprecation-flags.js +++ b/test/sequential/test-deprecation-flags.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-fs-watch.js b/test/sequential/test-fs-watch.js index 34e53f59aa0961..cc0f241c3a7c1b 100644 --- a/test/sequential/test-fs-watch.js +++ b/test/sequential/test-fs-watch.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-init.js b/test/sequential/test-init.js index 75ac39c35ae4cc..2e6a23cd346d58 100644 --- a/test/sequential/test-init.js +++ b/test/sequential/test-init.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index 3355930df60c6d..1894bc20165b14 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-net-GH-5504.js b/test/sequential/test-net-GH-5504.js index a7f64c2e73da10..35e2f818311b82 100644 --- a/test/sequential/test-net-GH-5504.js +++ b/test/sequential/test-net-GH-5504.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); diff --git a/test/sequential/test-net-server-address.js b/test/sequential/test-net-server-address.js index 75fe14812962ea..a6e09a86532dbc 100644 --- a/test/sequential/test-net-server-address.js +++ b/test/sequential/test-net-server-address.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-next-tick-error-spin.js b/test/sequential/test-next-tick-error-spin.js index 911d99d7416db5..dc3a3a115d3b99 100644 --- a/test/sequential/test-next-tick-error-spin.js +++ b/test/sequential/test-next-tick-error-spin.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-pipe.js b/test/sequential/test-pipe.js index 75154bcdf5f360..05b3f00a3c8a90 100644 --- a/test/sequential/test-pipe.js +++ b/test/sequential/test-pipe.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-regress-GH-1697.js b/test/sequential/test-regress-GH-1697.js index d99acf9e468bb3..00117c528673c4 100644 --- a/test/sequential/test-regress-GH-1697.js +++ b/test/sequential/test-regress-GH-1697.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const net = require('net'); diff --git a/test/sequential/test-regress-GH-1726.js b/test/sequential/test-regress-GH-1726.js index c464193b23f3e4..1291dec261ccf6 100644 --- a/test/sequential/test-regress-GH-1726.js +++ b/test/sequential/test-regress-GH-1726.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Open a chain of five Node processes each a child of the next. The final // process exits immediately. Each process in the chain is instructed to diff --git a/test/sequential/test-regress-GH-4015.js b/test/sequential/test-regress-GH-4015.js index 249817de1d2068..12b238bfb48979 100644 --- a/test/sequential/test-regress-GH-4015.js +++ b/test/sequential/test-regress-GH-4015.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-regress-GH-4027.js b/test/sequential/test-regress-GH-4027.js index 8d9c6bb1ad795a..e3e9e5a4de4ef6 100644 --- a/test/sequential/test-regress-GH-4027.js +++ b/test/sequential/test-regress-GH-4027.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-regress-GH-784.js b/test/sequential/test-regress-GH-784.js index 0bfa407ec10dc3..7176d07ae2554b 100644 --- a/test/sequential/test-regress-GH-784.js +++ b/test/sequential/test-regress-GH-784.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Regression test for GH-784 // https://github.com/joyent/node/issues/784 diff --git a/test/sequential/test-regress-GH-877.js b/test/sequential/test-regress-GH-877.js index 1a0d7a48e5758c..014f3b716fc9a9 100644 --- a/test/sequential/test-regress-GH-877.js +++ b/test/sequential/test-regress-GH-877.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const http = require('http'); diff --git a/test/sequential/test-require-cache-without-stat.js b/test/sequential/test-require-cache-without-stat.js index d90bbd2b7bb71f..33a523c28744cd 100644 --- a/test/sequential/test-require-cache-without-stat.js +++ b/test/sequential/test-require-cache-without-stat.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // We've experienced a regression where the module loader stats a bunch of // directories on require() even if it's been called before. The require() diff --git a/test/sequential/test-stream2-fs.js b/test/sequential/test-stream2-fs.js index 58a66ef99df9cf..fba52a42d4f81f 100644 --- a/test/sequential/test-stream2-fs.js +++ b/test/sequential/test-stream2-fs.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-stream2-stderr-sync.js b/test/sequential/test-stream2-stderr-sync.js index 08f35e597ce357..9822d2908e3c01 100644 --- a/test/sequential/test-stream2-stderr-sync.js +++ b/test/sequential/test-stream2-stderr-sync.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; // Make sure that sync writes to stderr get processed before exiting. diff --git a/test/sequential/test-util-debug.js b/test/sequential/test-util-debug.js index 08988997e735a6..242c536125aff2 100644 --- a/test/sequential/test-util-debug.js +++ b/test/sequential/test-util-debug.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-vm-timeout-rethrow.js b/test/sequential/test-vm-timeout-rethrow.js index 54ffee1ff976f5..a7aa83e513d03c 100644 --- a/test/sequential/test-vm-timeout-rethrow.js +++ b/test/sequential/test-vm-timeout-rethrow.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/tools/doc/generate.js b/tools/doc/generate.js index b7fcf0d4f90da5..0ae413ea7f6a82 100644 --- a/tools/doc/generate.js +++ b/tools/doc/generate.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const processIncludes = require('./preprocess.js'); diff --git a/tools/doc/html.js b/tools/doc/html.js index 185a6660047eb4..38031b4c80fe38 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; const common = require('./common.js'); diff --git a/tools/doc/json.js b/tools/doc/json.js index 3e329a965f068c..dedfb1a84c697e 100644 --- a/tools/doc/json.js +++ b/tools/doc/json.js @@ -1,3 +1,24 @@ +// 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. + 'use strict'; module.exports = doJSON; From 455e6f1dd88dc43b9e6d95fadb24c2cad3798ac7 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 5 Mar 2017 21:57:02 -0800 Subject: [PATCH 068/485] util: throw toJSON errors when formatting %j MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously all errors resulting from JSON.stringify were treated as a proof for circularity of the object structure. That is not the case if the `toJSON` method of the object throws an error. Explicitly check for the exact error message when determining the object structure's cyclicity. PR-URL: https://github.com/nodejs/node/pull/11708 Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig --- lib/util.js | 8 ++++++-- test/parallel/test-util-format.js | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/util.js b/lib/util.js index 8048caecba00ed..31761f0dd35545 100644 --- a/lib/util.js +++ b/lib/util.js @@ -38,13 +38,17 @@ const inspectDefaultOptions = Object.seal({ breakLength: 60 }); +const CIRCULAR_ERROR_MESSAGE = 'Converting circular structure to JSON'; + var Debug; function tryStringify(arg) { try { return JSON.stringify(arg); - } catch (_) { - return '[Circular]'; + } catch (err) { + if (err.name === 'TypeError' && err.message === CIRCULAR_ERROR_MESSAGE) + return '[Circular]'; + throw err; } } diff --git a/test/parallel/test-util-format.js b/test/parallel/test-util-format.js index 49b234e2e2bbf7..a57a8094ac05ba 100644 --- a/test/parallel/test-util-format.js +++ b/test/parallel/test-util-format.js @@ -86,6 +86,16 @@ assert.strictEqual(util.format('o: %j, a: %j'), 'o: %j, a: %j'); assert.strictEqual(util.format('%j', o), '[Circular]'); } +{ + const o = { + toJSON() { + throw new Error('Not a circular object but still not serializable'); + } + }; + assert.throws(() => util.format('%j', o), + /^Error: Not a circular object but still not serializable$/); +} + // Errors const err = new Error('foo'); assert.strictEqual(util.format(err), err.stack); From df97727272eb380a4ac9447f4592d396d1055678 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 7 Mar 2017 14:49:36 +0800 Subject: [PATCH 069/485] doc: improve net.md on sockets and connections * Improve description of socket.connect, net.connect, net.createConnection * Nest the overloaded signatures * Alias net.connect to net.createConnection * Add type annotations to the options * Make a separate section to explain IPC support and how to specify the path parameter. * General improvements to wording and explanation PR-URL: https://github.com/nodejs/node/pull/11700 Reviewed-By: James M Snell Reviewed-By: Sam Roberts --- doc/api/net.md | 412 ++++++++++++++++++++++++++++++------------------- 1 file changed, 249 insertions(+), 163 deletions(-) diff --git a/doc/api/net.md b/doc/api/net.md index 67e7abfa8eda7c..d20e6bf767e047 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -3,20 +3,52 @@ > Stability: 2 - Stable The `net` module provides an asynchronous network API for creating stream-based -servers ([`net.createServer()`][]) and clients ([`net.createConnection()`][]) -that implement TCP or local communications (domain sockets on UNIX, named pipes -on Windows). It can be accessed using: +TCP or [IPC][] servers ([`net.createServer()`][]) and clients +([`net.createConnection()`][]). + +It can be accessed using: ```js const net = require('net'); ``` +## IPC Support + +The `net` module supports IPC with named pipes on Windows, and UNIX domain +sockets on other operating systems. + +### Identifying paths for IPC connections + +[`net.connect()`][], [`net.createConnection()`][], [`server.listen()`][] and +[`socket.connect()`][] take a `path` parameter to identify IPC endpoints. + +On UNIX, the local domain is also known as the UNIX domain. The path is a +filesystem path name. It gets truncated to `sizeof(sockaddr_un.sun_path) - 1`, +which varies on different operating system between 91 and 107 bytes. +The typical values are 107 on Linux and 103 on OS X. The path is +subject to the same naming conventions and permissions checks as would be done +on file creation. It will be visible in the filesystem, and will *persist until +unlinked*. + +On Windows, the local domain is implemented using a named pipe. The path *must* +refer to an entry in `\\?\pipe\` or `\\.\pipe\`. Any characters are permitted, +but the latter may do some processing of pipe names, such as resolving `..` +sequences. Despite appearances, the pipe name space is flat. Pipes will *not +persist*, they are removed when the last reference to them is closed. Do not +forget JavaScript string escaping requires paths to be specified with +double-backslashes, such as: + +```js +net.createServer().listen( + path.join('\\\\?\\pipe', process.cwd(), 'myctl')) +``` + ## Class: net.Server -This class is used to create a TCP or local server. +This class is used to create a TCP or [IPC][] server. ## new net.Server([options][, connectionListener]) @@ -129,17 +161,14 @@ Callback should take two arguments `err` and `count`. ### server.listen() Start a server listening for connections. A `net.Server` can be a TCP or -local (domain sockets on UNIX, named pipes on Windows) server depending on -what it listens to. - -*Note*: Unix named pipes (FIFOs) are not supported. +a [IPC][] server depending on what it listens to. Possible signatures: * [`server.listen(handle[, backlog][, callback])`][`server.listen(handle)`] * [`server.listen(options[, callback])`][`server.listen(options)`] * [`server.listen(path[, backlog][, callback])`][`server.listen(path)`] - for local servers + for [IPC][] servers * [`server.listen([port][, host][, backlog][, callback])`][`server.listen(port, host)`] for TCP servers @@ -201,13 +230,14 @@ added: v0.11.14 --> * `options` {Object} Required. Supports the following properties: - * `port` {number} Optional. - * `host` {string} Optional. - * `path` {string} Optional. Will be ignored if `port` is specified. - * `backlog` {number} Optional. Common parameter of [`server.listen()`][] + * `port` {number} + * `host` {string} + * `path` {string} Will be ignored if `port` is specified. See + [Identifying paths for IPC connections][]. + * `backlog` {number} Common parameter of [`server.listen()`][] functions - * `exclusive` {boolean} Optional. Default to `false` -* `callback` {Function} Optional. Common parameter of [`server.listen()`][] + * `exclusive` {boolean} Default to `false` +* `callback` {Function} Common parameter of [`server.listen()`][] functions If `port` is specified, it behaves the same as @@ -235,32 +265,12 @@ server.listen({ added: v0.1.90 --> -* `path` {string} +* `path` {String} Path the server should listen to. See + [Identifying paths for IPC connections][]. * `backlog` {number} Common parameter of [`server.listen()`][] functions * `callback` {Function} Common parameter of [`server.listen()`][] functions -Start a local socket server listening for connections on the given `path`. - -On UNIX, the local domain is usually known as the UNIX domain. The path is a -filesystem path name. It gets truncated to `sizeof(sockaddr_un.sun_path)` -bytes, decreased by 1. It varies on different operating system between 91 and -107 bytes. The typical values are 107 on Linux and 103 on OS X. The path is -subject to the same naming conventions and permissions checks as would be done -on file creation, will be visible in the filesystem, and will *persist until -unlinked*. - -On Windows, the local domain is implemented using a named pipe. The path *must* -refer to an entry in `\\?\pipe\` or `\\.\pipe\`. Any characters are permitted, -but the latter may do some processing of pipe names, such as resolving `..` -sequences. Despite appearances, the pipe name space is flat. Pipes will *not -persist*, they are removed when the last reference to them is closed. Do not -forget JavaScript string escaping requires paths to be specified with -double-backslashes, such as: - -```js -net.createServer().listen( - path.join('\\\\?\\pipe', process.cwd(), 'myctl')) -``` +Start a [IPC][] server listening for connections on the given `path`. #### server.listen([port][, host][, backlog][, callback]) -This object is an abstraction of a TCP or local socket. `net.Socket` -instances implement a duplex Stream interface. They can be created by the -user and used as a client (with [`connect()`][]) or they can be created by Node.js -and passed to the user through the `'connection'` event of a server. +This class is an abstraction of a TCP socket or a streaming [IPC][] endpoint +(uses named pipes on Windows, and UNIX domain sockets otherwise). A +`net.Socket` is also a [duplex stream][], so it can be both readable and +writable, and it is also a [`EventEmitter`][]. + +A `net.Socket` can be created by the user and used directly to interact with +a server. For example, it is returned by [`net.createConnection()`][], +so the user can use it to talk to the server. + +It can also be be created by Node.js and passed to the user when a connection +is received. For example, it is passed to the listeners of a +[`'connection'`][] event emitted on a [`net.Server`][], so the user can use +it to interact with the client. ### new net.Socket([options]) -Construct a new socket object. +Creates a new socket object. -`options` is an object with the following defaults: +* `options` {Object} Available options are: + * `fd`: {number} If specified, wrap around an existing socket with + the given file descriptor, otherwise a new socket will be created. + * `allowHalfOpen` {boolean} Indicates whether half-opened TCP connections + are allowed. See [`net.createServer()`][] and the [`'end'`][] event + for details. Defaults to `false`. + * `readable` {boolean} Allow reads on the socket when a `fd` is passed, + otherwise ignored. Defaults to `false`. + * `writable` {boolean} Allow reads on the socket when a `fd` is passed, + otherwise ignored. Defaults to `false`. +* Returns: {net.Socket} -```js -{ - fd: null, - allowHalfOpen: false, - readable: false, - writable: false -} -``` - -`fd` allows you to specify the existing file descriptor of socket. -Set `readable` and/or `writable` to `true` to allow reads and/or writes on this -socket (NOTE: Works only when `fd` is passed). -About `allowHalfOpen`, refer to [`net.createServer()`][] and [`'end'`][] event. - -`net.Socket` instances are [`EventEmitter`][] with the following events: +The newly created socket can be either a TCP socket or a streaming [IPC][] +endpoint, depending on what it [`connect()`][`socket.connect()`] to. ### Event: 'close' Emitted when a socket connection is successfully established. -See [`connect()`][]. +See [`net.createConnection()`][]. ### Event: 'data' -Opens the connection for a given socket. - -For TCP sockets, `options` argument should be an object which specifies: - - - `port`: Port the client should connect to (Required). - - - `host`: Host the client should connect to. Defaults to `'localhost'`. - - - `localAddress`: Local interface to bind to for network connections. +* `options` {Object} +* `connectListener` {Function} Common parameter of [`socket.connect()`][] + methods. Will be added as a listener for the [`'connect'`][] event once. +* Returns: {net.Socket} The socket itself. - - `localPort`: Local port to bind to for network connections. +Initiate a connection on a given socket. Normally this method is not needed, +the socket should be created and opened with [`net.createConnection()`][]. Use +this only if you are implementing a custom Socket. - - `family` : Version of IP stack. Defaults to `4`. +For TCP connections, available `options` are: - - `hints`: [`dns.lookup()` hints][]. Defaults to `0`. +* `port` {number} Required. Port the socket should connect to. +* `host` {string} Host the socket should connect to. Defaults to `'localhost'`. +* `localAddress` {string} Local address the socket should connect from. +* `localPort` {number} Local port the socket should connect from. +* `family` {number}: Version of IP stack, can be either 4 or 6. Defaults to 4. +* `hints` {number} Optional [`dns.lookup()` hints][]. +* `lookup` {Function} Custom lookup function. Defaults to [`dns.lookup()`][]. - - `lookup` : Custom lookup function. Defaults to `dns.lookup`. +For [IPC][] connections, available `options` are: -For local domain sockets, `options` argument should be an object which -specifies: +* `path` {string} Required. Path the client should connect to. + See [Identifying paths for IPC connections][]. - - `path`: Path the client should connect to (Required). +#### socket.connect(path[, connectListener]) -Normally this method is not needed, as `net.createConnection` opens the -socket. Use this only if you are implementing a custom Socket. +* `path` {string} Path the client should connect to. See + [Identifying paths for IPC connections][]. +* `connectListener` {Function} Common parameter of [`socket.connect()`][] + methods. Will be added as a listener for the [`'connect'`][] event once. +* Returns: {net.Socket} The socket itself. -This function is asynchronous. When the [`'connect'`][] event is emitted the -socket is established. If there is a problem connecting, the `'connect'` event -will not be emitted, the [`'error'`][] event will be emitted with the exception. +Initiate an [IPC][] connection on the given socket. -The `connectListener` parameter will be added as a listener for the -[`'connect'`][] event. +Alias to +[`socket.connect(options[, connectListener])`][`socket.connect(options)`] +called with `{ path: path }` as `options`. -### socket.connect(path[, connectListener]) -### socket.connect(port[, host][, connectListener]) +#### socket.connect(port[, host][, connectListener]) -As [`socket.connect(options[, connectListener])`][`socket.connect(options, connectListener)`], -with options as either `{port: port, host: host}` or `{path: path}`. +* `port` {number} Port the client should connect to. +* `host` {string} Host the client should connect to. +* `connectListener` {Function} Common parameter of [`socket.connect()`][] + methods. Will be added as a listener for the [`'connect'`][] event once. +* Returns: {net.Socket} The socket itself. + +Initiate a TCP connection on the given socket. + +Alias to +[`socket.connect(options[, connectListener])`][`socket.connect(options)`] +called with `{port: port, host: host}` as `options`. ### socket.connecting -If `true` - [`socket.connect(options[, connectListener])`][`socket.connect(options, connectListener)`] was called and -haven't yet finished. Will be set to `false` before emitting `connect` event -and/or calling [`socket.connect(options[, connectListener])`][`socket.connect(options, connectListener)`]'s callback. +If `true` - +[`socket.connect(options[, connectListener])`][`socket.connect(options)`] +was called and haven't yet finished. Will be set to `false` before emitting +`connect` event and/or calling +[`socket.connect(options[, connectListener])`][`socket.connect(options)`]'s +callback. ### socket.destroy([exception]) - -A factory function, which returns a new [`net.Socket`][] and automatically -connects with the supplied `options`. - -The options are passed to both the [`net.Socket`][] constructor and the -[`socket.connect`][] method. +## net.connect() -The `connectListener` parameter will be added as a listener for the -[`'connect'`][] event once. +Aliases to +[`net.createConnection()`][`net.createConnection()`]. -Here is an example of a client of the previously described echo server: - -```js -const net = require('net'); -const client = net.connect({port: 8124}, () => { - // 'connect' listener - console.log('connected to server!'); - client.write('world!\r\n'); -}); -client.on('data', (data) => { - console.log(data.toString()); - client.end(); -}); -client.on('end', () => { - console.log('disconnected from server'); -}); -``` +Possible signatures: -To connect on the socket `/tmp/echo.sock` the second line would just be -changed to +* [`net.connect(options[, connectListener])`][`net.connect(options)`] +* [`net.connect(path[, connectListener])`][`net.connect(path)`] for [IPC][] + connections. +* [`net.connect(port[, host][, connectListener])`][`net.connect(port, host)`] + for TCP connections. -```js -const client = net.connect({path: '/tmp/echo.sock'}); -``` +### net.connect(options[, connectListener]) + +Alias to +[`net.createConnection(options[, connectListener])`][`net.createConnection(options)`]. -## net.connect(path[, connectListener]) +### net.connect(path[, connectListener]) -A factory function, which returns a new unix [`net.Socket`][] and automatically -connects to the supplied `path`. - -The `connectListener` parameter will be added as a listener for the -[`'connect'`][] event once. +Alias to +[`net.createConnection(path[, connectListener])`][`net.createConnection(path)`]. -## net.connect(port[, host][, connectListener]) +### net.connect(port[, host][, connectListener]) -A factory function, which returns a new [`net.Socket`][] and automatically -connects to the supplied `port` and `host`. +Alias to +[`net.createConnection(port[, host][, connectListener])`][`net.createConnection(port, host)`]. + +## net.createConnection() -If `host` is omitted, `'localhost'` will be assumed. +A factory function, which creates a new [`net.Socket`][], +immediately initiates connection with [`socket.connect()`][], +then returns the `net.Socket` that starts the connection. -The `connectListener` parameter will be added as a listener for the -[`'connect'`][] event once. +When the connection is established, a [`'connect'`][] event will be emitted +on the returned socket. The last parameter `connectListener`, if supplied, +will be added as a listener for the [`'connect'`][] event **once**. -## net.createConnection(options[, connectListener]) +Possible signatures: + +* [`net.createConnection(options[, connectListener])`][`net.createConnection(options)`] +* [`net.createConnection(path[, connectListener])`][`net.createConnection(path)`] + for [IPC][] connections. +* [`net.createConnection(port[, host][, connectListener])`][`net.createConnection(port, host)`] + for TCP connections. + +*Note*: the [`net.connect()`][] function is an alias to this function. + +### net.createConnection(options[, connectListener]) -A factory function, which returns a new [`net.Socket`][] and automatically -connects with the supplied `options`. +* `options` {Object} Required. Will be passed to both the + [`new net.Socket([options])`][`new net.Socket(options)`] call and the + [`socket.connect(options[, connectListener])`][`socket.connect(options)`] + method. +* `connectListener` {Function} Common parameter of the + [`net.createConnection()`][] functions. If supplied, will be added as + a listener for the [`'connect'`][] event on the returned socket once. +* Returns: {net.Socket} The newly created socket used to start the connection. -The options are passed to both the [`net.Socket`][] constructor and the -[`socket.connect`][] method. +For available options, see +[`new net.Socket([options])`][`new net.Socket(options)`] +and [`socket.connect(options[, connectListener])`][`socket.connect(options)`]. -Passing `timeout` as an option will call [`socket.setTimeout()`][] after the socket is created, but before it is connecting. +Additional options: -The `connectListener` parameter will be added as a listener for the -[`'connect'`][] event once. +* `timeout` {number} If set, will be used to call + [`socket.setTimeout(timeout)`][] after the socket is created, but before + it starts the connection. Here is an example of a client of the previously described echo server: @@ -844,39 +896,59 @@ To connect on the socket `/tmp/echo.sock` the second line would just be changed to ```js -const client = net.connect({path: '/tmp/echo.sock'}); +const client = net.createConnection({path: '/tmp/echo.sock'}); ``` -## net.createConnection(path[, connectListener]) +### net.createConnection(path[, connectListener]) -A factory function, which returns a new unix [`net.Socket`][] and automatically -connects to the supplied `path`. +* `path` {string} Path the socket should connect to. Will be passed to + [`socket.connect(path[, connectListener])`][`socket.connect(path)`]. + See [Identifying paths for IPC connections][]. +* `connectListener` {Function} Common parameter of the + [`net.createConnection()`][] functions, an "once" listener for the + `'connect'` event on the initiating socket. Will be passed to + [`socket.connect(path[, connectListener])`][`socket.connect(path)`]. +* Returns: {net.Socket} The newly created socket used to start the connection. + +Initiates an [IPC][] connection. -The `connectListener` parameter will be added as a listener for the -[`'connect'`][] event once. +This function creates a new [`net.Socket`][] with all options set to default, +immediately initiates connection with +[`socket.connect(path[, connectListener])`][`socket.connect(path)`], +then returns the `net.Socket` that starts the connection. -## net.createConnection(port[, host][, connectListener]) +### net.createConnection(port[, host][, connectListener]) -A factory function, which returns a new [`net.Socket`][] and automatically -connects to the supplied `port` and `host`. +* `port` {number} Port the socket should connect to. Will be passed to + [`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`]. +* `host` {string} Host the socket should connect to. Defaults to `'localhost'`. + Will be passed to + [`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`]. +* `connectListener` {Function} Common parameter of the + [`net.createConnection()`][] functions, an "once" listener for the + `'connect'` event on the initiating socket. Will be passed to + [`socket.connect(path[, connectListener])`][`socket.connect(port, host)`]. +* Returns: {net.Socket} The newly created socket used to start the connection. -If `host` is omitted, `'localhost'` will be assumed. +Initiates a TCP connection. -The `connectListener` parameter will be added as a listener for the -[`'connect'`][] event once. +This function creates a new [`net.Socket`][] with all options set to default, +immediately initiates connection with +[`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`], +then returns the `net.Socket` that starts the connection. ## net.createServer([options][, connectionListener]) -Creates a new TCP or local server. +Creates a new TCP or [IPC][] server. * `options` {Object} * `allowHalfOpen` {boolean} Default to `false`. Indicates whether half-opened @@ -898,7 +970,7 @@ 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 [`socket.resume()`][]. -The server can be a TCP server or a local server, depending on what it +The server can be a TCP server or a [IPC][] server, depending on what it [`listen()`][`server.listen()`] to. Here is an example of an TCP echo server which listens for connections @@ -978,14 +1050,22 @@ Returns true if input is a version 6 IP address, otherwise returns false. [`'listening'`]: #net_event_listening [`'timeout'`]: #net_event_timeout [`child_process.fork()`]: child_process.html#child_process_child_process_fork_modulepath_args_options -[`connect()`]: #net_socket_connect_options_connectlistener [`dns.lookup()`]: dns.html#dns_dns_lookup_hostname_options_callback [`dns.lookup()` hints]: dns.html#dns_supported_getaddrinfo_flags [`EventEmitter`]: events.html#events_class_eventemitter -[`net.createConnection()`]: #net_net_createconnection_options_connectlistener +[`net.connect()`]: #net_net_connect +[`net.connect(options)`]: #net_net_connect_options_connectlistener +[`net.connect(path)`]: #net_net_connect_path_connectlistener +[`net.connect(port, host)`]: #net_net_connect_port_host_connectlistener +[`net.connect()`]: #net_net_connect +[`net.createConnection()`]: #net_net_createconnection +[`net.createConnection(options)`]: #net_net_createconnection_options_connectlistener +[`net.createConnection(path)`]: #net_net_createconnection_path_connectlistener +[`net.createConnection(port, host)`]: #net_net_createconnection_port_host_connectlistener [`net.createServer()`]: #net_net_createserver_options_connectionlistener [`net.Server`]: #net_class_net_server [`net.Socket`]: #net_class_net_socket +[`new net.Socket(options)`]: #net_new_net_socket_options [`server.getConnections()`]: #net_server_getconnections_callback [`server.listen()`]: #net_server_listen [`server.listen(handle)`]: #net_server_listen_handle_backlog_callback @@ -993,15 +1073,21 @@ Returns true if input is a version 6 IP address, otherwise returns false. [`server.listen(path)`]: #net_server_listen_path_backlog_callback [`server.listen(port, host)`]: #net_server_listen_port_host_backlog_callback [`server.close()`]: #net_server_close_callback -[`socket.connect(options, connectListener)`]: #net_socket_connect_options_connectlistener -[`socket.connect`]: #net_socket_connect_options_connectlistener +[`socket.connect()`]: #net_socket_connect +[`socket.connect(options)`]: #net_socket_connect_options_connectlistener +[`socket.connect(path)`]: #net_socket_connect_path_connectlistener +[`socket.connect(port, host)`]: #net_socket_connect_port_host_connectlistener [`socket.destroy()`]: #net_socket_destroy_exception [`socket.end()`]: #net_socket_end_data_encoding [`socket.setTimeout()`]: #net_socket_settimeout_timeout_callback +[`socket.setTimeout(timeout)`]: #net_socket_settimeout_timeout_callback [`socket.resume()`]: #net_socket_resume [`socket.pause()`]: #net_socket_pause [`stream.setEncoding()`]: stream.html#stream_readable_setencoding_encoding +[duplex stream]: stream.html#stream_class_stream_duplex [half-closed]: https://tools.ietf.org/html/rfc1122#section-4.2.2.13 +[Identifying paths for IPC connections]: #net_identifying_paths_for_ipc_connections +[IPC]: #net_ipc_support [Readable Stream]: stream.html#stream_class_stream_readable [socket(7)]: http://man7.org/linux/man-pages/man7/socket.7.html [unspecified IPv6 address]: https://en.wikipedia.org/wiki/IPv6_address#Unspecified_address From 99b27ce99a8bdd6bc733cde36a144a82cfea0b98 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Tue, 7 Mar 2017 19:31:29 -0800 Subject: [PATCH 070/485] url: prioritize toString when stringifying MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ES addition operator calls the ToPrimitive() abstract operation without hint String, leading a subsequent OrdinaryToPrimitive() to call valueOf() first on an object rather than the desired toString(). Instead, use template literals which directly call ToString() abstract operation, per Web IDL spec. PR-URL: https://github.com/nodejs/node/pull/11737 Fixes: b610a4db1c2919f887119 "url: enforce valid UTF-8 in WHATWG parser" Refs: https://github.com/nodejs/node/commit/b610a4db1c2919f88711962f5797f25ecb1cd36b#commitcomment-21200056 Refs: https://tc39.github.io/ecma262/#sec-addition-operator-plus-runtime-semantics-evaluation Refs: https://tc39.github.io/ecma262/#sec-template-literals-runtime-semantics-evaluation Reviewed-By: Michaël Zasso Reviewed-By: Daijiro Wachi Reviewed-By: Joyee Cheung Reviewed-By: James M Snell --- lib/internal/url.js | 26 +++++++++---------- .../test-whatwg-url-searchparams-append.js | 5 +++- ...est-whatwg-url-searchparams-constructor.js | 5 +++- .../test-whatwg-url-searchparams-delete.js | 5 +++- .../test-whatwg-url-searchparams-get.js | 5 +++- .../test-whatwg-url-searchparams-getall.js | 5 +++- .../test-whatwg-url-searchparams-has.js | 5 +++- .../test-whatwg-url-searchparams-set.js | 5 +++- test/parallel/test-whatwg-url-setters.js | 5 +++- 9 files changed, 45 insertions(+), 21 deletions(-) diff --git a/lib/internal/url.js b/lib/internal/url.js index 7e53ac1dc2d7ba..4af9e34f91b4cb 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -26,7 +26,7 @@ const IteratorPrototype = Object.getPrototypeOf( const unpairedSurrogateRe = /([^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/; function toUSVString(val) { - const str = '' + val; + const str = `${val}`; // As of V8 5.5, `str.search()` (and `unpairedSurrogateRe[@@search]()`) are // slower than `unpairedSurrogateRe.exec()`. const match = unpairedSurrogateRe.exec(str); @@ -218,7 +218,7 @@ function onParseHashComplete(flags, protocol, username, password, class URL { constructor(input, base) { // toUSVString is not needed. - input = '' + input; + input = `${input}`; if (base !== undefined && !(base instanceof URL)) base = new URL(base); parse(this, input, base); @@ -329,7 +329,7 @@ Object.defineProperties(URL.prototype, { }, set(input) { // toUSVString is not needed. - input = '' + input; + input = `${input}`; parse(this, input); } }, @@ -348,7 +348,7 @@ Object.defineProperties(URL.prototype, { }, set(scheme) { // toUSVString is not needed. - scheme = '' + scheme; + scheme = `${scheme}`; if (scheme.length === 0) return; binding.parse(scheme, binding.kSchemeStart, null, this[context], @@ -363,7 +363,7 @@ Object.defineProperties(URL.prototype, { }, set(username) { // toUSVString is not needed. - username = '' + username; + username = `${username}`; if (!this.hostname) return; const ctx = this[context]; @@ -384,7 +384,7 @@ Object.defineProperties(URL.prototype, { }, set(password) { // toUSVString is not needed. - password = '' + password; + password = `${password}`; if (!this.hostname) return; const ctx = this[context]; @@ -410,7 +410,7 @@ Object.defineProperties(URL.prototype, { set(host) { const ctx = this[context]; // toUSVString is not needed. - host = '' + host; + host = `${host}`; if (this[cannotBeBase] || (this[special] && host.length === 0)) { // Cannot set the host if cannot-be-base is set or @@ -435,7 +435,7 @@ Object.defineProperties(URL.prototype, { set(host) { const ctx = this[context]; // toUSVString is not needed. - host = '' + host; + host = `${host}`; if (this[cannotBeBase] || (this[special] && host.length === 0)) { // Cannot set the host if cannot-be-base is set or @@ -460,7 +460,7 @@ Object.defineProperties(URL.prototype, { }, set(port) { // toUSVString is not needed. - port = '' + port; + port = `${port}`; const ctx = this[context]; if (!ctx.host || this[cannotBeBase] || this.protocol === 'file:') @@ -484,7 +484,7 @@ Object.defineProperties(URL.prototype, { }, set(path) { // toUSVString is not needed. - path = '' + path; + path = `${path}`; if (this[cannotBeBase]) return; binding.parse(path, binding.kPathStart, null, this[context], @@ -533,7 +533,7 @@ Object.defineProperties(URL.prototype, { set(hash) { const ctx = this[context]; // toUSVString is not needed. - hash = '' + hash; + hash = `${hash}`; if (this.protocol === 'javascript:') return; if (!hash) { @@ -1125,12 +1125,12 @@ function originFor(url, base) { function domainToASCII(domain) { // toUSVString is not needed. - return binding.domainToASCII('' + domain); + return binding.domainToASCII(`${domain}`); } function domainToUnicode(domain) { // toUSVString is not needed. - return binding.domainToUnicode('' + domain); + return binding.domainToUnicode(`${domain}`); } // Utility function that converts a URL object into an ordinary diff --git a/test/parallel/test-whatwg-url-searchparams-append.js b/test/parallel/test-whatwg-url-searchparams-append.js index 67eddbcc503e1e..ff4a568c303668 100644 --- a/test/parallel/test-whatwg-url-searchparams-append.js +++ b/test/parallel/test-whatwg-url-searchparams-append.js @@ -58,7 +58,10 @@ test(function() { params.set('a'); }, /^TypeError: "name" and "value" arguments must be specified$/); - const obj = { toString() { throw new Error('toString'); } }; + const obj = { + toString() { throw new Error('toString'); }, + valueOf() { throw new Error('valueOf'); } + }; const sym = Symbol(); assert.throws(() => params.set(obj, 'b'), /^Error: toString$/); assert.throws(() => params.set('a', obj), /^Error: toString$/); diff --git a/test/parallel/test-whatwg-url-searchparams-constructor.js b/test/parallel/test-whatwg-url-searchparams-constructor.js index 8ccd8f9427f160..236d01396095f1 100644 --- a/test/parallel/test-whatwg-url-searchparams-constructor.js +++ b/test/parallel/test-whatwg-url-searchparams-constructor.js @@ -209,7 +209,10 @@ test(() => { } { - const obj = { toString() { throw new Error('toString'); } }; + const obj = { + toString() { throw new Error('toString'); }, + valueOf() { throw new Error('valueOf'); } + }; const sym = Symbol(); assert.throws(() => new URLSearchParams({ a: obj }), /^Error: toString$/); diff --git a/test/parallel/test-whatwg-url-searchparams-delete.js b/test/parallel/test-whatwg-url-searchparams-delete.js index d0bae75b4718a8..589fbc2f8698b5 100644 --- a/test/parallel/test-whatwg-url-searchparams-delete.js +++ b/test/parallel/test-whatwg-url-searchparams-delete.js @@ -52,7 +52,10 @@ test(function() { params.delete(); }, /^TypeError: "name" argument must be specified$/); - const obj = { toString() { throw new Error('toString'); } }; + const obj = { + toString() { throw new Error('toString'); }, + valueOf() { throw new Error('valueOf'); } + }; const sym = Symbol(); assert.throws(() => params.delete(obj), /^Error: toString$/); assert.throws(() => params.delete(sym), diff --git a/test/parallel/test-whatwg-url-searchparams-get.js b/test/parallel/test-whatwg-url-searchparams-get.js index 2244fc28612755..5e81be4f32cc1d 100644 --- a/test/parallel/test-whatwg-url-searchparams-get.js +++ b/test/parallel/test-whatwg-url-searchparams-get.js @@ -43,7 +43,10 @@ test(function() { params.get(); }, /^TypeError: "name" argument must be specified$/); - const obj = { toString() { throw new Error('toString'); } }; + const obj = { + toString() { throw new Error('toString'); }, + valueOf() { throw new Error('valueOf'); } + }; const sym = Symbol(); assert.throws(() => params.get(obj), /^Error: toString$/); assert.throws(() => params.get(sym), diff --git a/test/parallel/test-whatwg-url-searchparams-getall.js b/test/parallel/test-whatwg-url-searchparams-getall.js index 921a6c9bc66da2..f80f45d5427e77 100644 --- a/test/parallel/test-whatwg-url-searchparams-getall.js +++ b/test/parallel/test-whatwg-url-searchparams-getall.js @@ -47,7 +47,10 @@ test(function() { params.getAll(); }, /^TypeError: "name" argument must be specified$/); - const obj = { toString() { throw new Error('toString'); } }; + const obj = { + toString() { throw new Error('toString'); }, + valueOf() { throw new Error('valueOf'); } + }; const sym = Symbol(); assert.throws(() => params.getAll(obj), /^Error: toString$/); assert.throws(() => params.getAll(sym), diff --git a/test/parallel/test-whatwg-url-searchparams-has.js b/test/parallel/test-whatwg-url-searchparams-has.js index 9d7272f999c653..f2696063b998a1 100644 --- a/test/parallel/test-whatwg-url-searchparams-has.js +++ b/test/parallel/test-whatwg-url-searchparams-has.js @@ -46,7 +46,10 @@ test(function() { params.has(); }, /^TypeError: "name" argument must be specified$/); - const obj = { toString() { throw new Error('toString'); } }; + const obj = { + toString() { throw new Error('toString'); }, + valueOf() { throw new Error('valueOf'); } + }; const sym = Symbol(); assert.throws(() => params.has(obj), /^Error: toString$/); assert.throws(() => params.has(sym), diff --git a/test/parallel/test-whatwg-url-searchparams-set.js b/test/parallel/test-whatwg-url-searchparams-set.js index 0eee7b5c9a0130..acd62955d22a44 100644 --- a/test/parallel/test-whatwg-url-searchparams-set.js +++ b/test/parallel/test-whatwg-url-searchparams-set.js @@ -44,7 +44,10 @@ test(function() { params.set('a'); }, /^TypeError: "name" and "value" arguments must be specified$/); - const obj = { toString() { throw new Error('toString'); } }; + const obj = { + toString() { throw new Error('toString'); }, + valueOf() { throw new Error('valueOf'); } + }; const sym = Symbol(); assert.throws(() => params.append(obj, 'b'), /^Error: toString$/); assert.throws(() => params.append('a', obj), /^Error: toString$/); diff --git a/test/parallel/test-whatwg-url-setters.js b/test/parallel/test-whatwg-url-setters.js index 6342243c78fd17..66188e48158c9f 100644 --- a/test/parallel/test-whatwg-url-setters.js +++ b/test/parallel/test-whatwg-url-setters.js @@ -107,7 +107,10 @@ startURLSettersTests() { const url = new URL('http://example.com/'); - const obj = { toString() { throw new Error('toString'); } }; + const obj = { + toString() { throw new Error('toString'); }, + valueOf() { throw new Error('valueOf'); } + }; const sym = Symbol(); const props = Object.getOwnPropertyDescriptors(Object.getPrototypeOf(url)); for (const [name, { set }] of Object.entries(props)) { From 190dc69c89b1d5ab3eb0e0c023a127752573acab Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:02:45 -0500 Subject: [PATCH 071/485] benchmark: add parameter for module benchmark MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- benchmark/module/module-loader.js | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/benchmark/module/module-loader.js b/benchmark/module/module-loader.js index a175533c7bbc6e..090f7b78549a4d 100644 --- a/benchmark/module/module-loader.js +++ b/benchmark/module/module-loader.js @@ -8,7 +8,8 @@ var benchmarkDirectory = path.join(tmpDirectory, 'nodejs-benchmark-module'); var bench = common.createBenchmark(main, { thousands: [50], - fullPath: ['true', 'false'] + fullPath: ['true', 'false'], + useCache: ['true', 'false'] }); function main(conf) { @@ -31,22 +32,34 @@ function main(conf) { } if (conf.fullPath === 'true') - measureFull(n); + measureFull(n, conf.useCache === 'true'); else - measureDir(n); + measureDir(n, conf.useCache === 'true'); } -function measureFull(n) { +function measureFull(n, useCache) { + var i; + if (useCache) { + for (i = 0; i <= n; i++) { + require(benchmarkDirectory + i + '/index.js'); + } + } bench.start(); - for (var i = 0; i <= n; i++) { + for (i = 0; i <= n; i++) { require(benchmarkDirectory + i + '/index.js'); } bench.end(n / 1e3); } -function measureDir(n) { +function measureDir(n, useCache) { + var i; + if (useCache) { + for (i = 0; i <= n; i++) { + require(benchmarkDirectory + i); + } + } bench.start(); - for (var i = 0; i <= n; i++) { + for (i = 0; i <= n; i++) { require(benchmarkDirectory + i); } bench.end(n / 1e3); From 21b24401768aa111142522fd56a49f8de805fd74 Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:04:18 -0500 Subject: [PATCH 072/485] fs: avoid recompilation of closure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/fs.js | 86 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 929f7bcaa6b30b..eab8d942e183f0 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1527,21 +1527,16 @@ fs.realpathSync = function realpathSync(p, options) { // the partial path scanned in the previous round, with slash var previous; - start(); + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; } // walk down the path, swapping out linked pathparts for their real @@ -1595,7 +1590,18 @@ fs.realpathSync = function realpathSync(p, options) { // resolve the link, then start over p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); + + // Skip over roots + m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } } if (cache) cache.set(original, p); @@ -1626,26 +1632,21 @@ fs.realpath = function realpath(p, options, callback) { // the partial path scanned in the previous round, with slash var previous; - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return callback(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return callback(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); } // walk down the path, swapping out linked pathparts for their real @@ -1711,7 +1712,22 @@ fs.realpath = function realpath(p, options, callback) { function gotResolvedLink(resolvedLink) { // resolve the link, then start over p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return callback(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } } }; From 34c9fc2e4e12fa9aa58d94a3283193444302a3ab Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:07:18 -0500 Subject: [PATCH 073/485] fs: avoid multiple conversions to string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nullCheck() implicitly converts the argument to string when checking the value, so this commit avoids any unnecessary additional (Buffer) conversions to string. PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/fs.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index eab8d942e183f0..3e9a0540dd9d12 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1503,21 +1503,21 @@ function encodeRealpathResult(result, options) { fs.realpathSync = function realpathSync(p, options) { options = getOptions(options, {}); handleError((p = getPathFromURL(p))); + if (typeof p !== 'string') + p += ''; nullCheck(p); - - p = p.toString('utf8'); p = pathModule.resolve(p); - const seenLinks = {}; - const knownHard = {}; const cache = options[internalFS.realpathCacheKey]; - const original = p; - const maybeCachedResult = cache && cache.get(p); if (maybeCachedResult) { return maybeCachedResult; } + const seenLinks = {}; + const knownHard = {}; + const original = p; + // current character position in p var pos; // the partial path so far, including a trailing slash if any @@ -1614,10 +1614,10 @@ fs.realpath = function realpath(p, options, callback) { options = getOptions(options, {}); if (handleError((p = getPathFromURL(p)), callback)) return; + if (typeof p !== 'string') + p += ''; if (!nullCheck(p, callback)) return; - - p = p.toString('utf8'); p = pathModule.resolve(p); const seenLinks = {}; From 1c3df965705d156db7b8132b86b3193a7467a2e2 Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:09:52 -0500 Subject: [PATCH 074/485] fs: replace regexp with function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replacing the path separator-finding regexp with a custom function results in a measurable improvement in performance. PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/fs.js | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 3e9a0540dd9d12..7cf96d88f18d98 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1478,12 +1478,6 @@ fs.unwatchFile = function(filename, listener) { }; -// Regexp that finds the next portion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -const nextPartRe = isWindows ? - /(.*?)(?:[/\\]+|$)/g : - /(.*?)(?:[/]+|$)/g; - // Regex to find the device root, including trailing slash. E.g. 'c:\\'. const splitRootRe = isWindows ? /^(?:[a-zA-Z]:|[\\/]{2}[^\\/]+[\\/][^\\/]+)?[\\/]*/ : @@ -1500,6 +1494,21 @@ function encodeRealpathResult(result, options) { } } +// Finds the next portion of a (partial) path, up to the next path delimiter +var nextPart; +if (isWindows) { + nextPart = function nextPart(p, i) { + for (; i < p.length; ++i) { + const ch = p.charCodeAt(i); + if (ch === 92/*'\'*/ || ch === 47/*'/'*/) + return i; + } + return -1; + }; +} else { + nextPart = function nextPart(p, i) { return p.indexOf('/', i); }; +} + fs.realpathSync = function realpathSync(p, options) { options = getOptions(options, {}); handleError((p = getPathFromURL(p))); @@ -1544,12 +1553,18 @@ fs.realpathSync = function realpathSync(p, options) { // NB: p.length changes. while (pos < p.length) { // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); + var result = nextPart(p, pos); previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; + if (result === -1) { + var last = p.slice(pos); + current += last; + base = previous + last; + pos = p.length; + } else { + current += p.slice(pos, result + 1); + base = previous + p.slice(pos, result); + pos = result + 1; + } // continue if not a symlink if (knownHard[base] || (cache && cache.get(base) === base)) { @@ -1658,12 +1673,18 @@ fs.realpath = function realpath(p, options, callback) { } // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); + var result = nextPart(p, pos); previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; + if (result === -1) { + var last = p.slice(pos); + current += last; + base = previous + last; + pos = p.length; + } else { + current += p.slice(pos, result + 1); + base = previous + p.slice(pos, result); + pos = result + 1; + } // continue if not a symlink if (knownHard[base]) { From a851b868c0a475c29e5af4c0414f9b2d1fa8d26f Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:11:11 -0500 Subject: [PATCH 075/485] lib: remove sources of permanent deopts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/fs.js | 6 +++--- lib/module.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 7cf96d88f18d98..d8ae0b09ba414e 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1572,7 +1572,7 @@ fs.realpathSync = function realpathSync(p, options) { } var resolvedLink; - const maybeCachedResolved = cache && cache.get(base); + var maybeCachedResolved = cache && cache.get(base); if (maybeCachedResolved) { resolvedLink = maybeCachedResolved; } else { @@ -1585,8 +1585,8 @@ fs.realpathSync = function realpathSync(p, options) { // read the link if it wasn't read before // dev/ino always return 0 on windows, so skip the check. - let linkTarget = null; - let id; + var linkTarget = null; + var id; if (!isWindows) { id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`; if (seenLinks.hasOwnProperty(id)) { diff --git a/lib/module.js b/lib/module.js index 2b1450aa26550e..f40a9aebb1592e 100644 --- a/lib/module.js +++ b/lib/module.js @@ -179,8 +179,8 @@ Module._findPath = function(request, paths, isMain) { } var exts; - const trailingSlash = request.length > 0 && - request.charCodeAt(request.length - 1) === 47/*/*/; + var trailingSlash = request.length > 0 && + request.charCodeAt(request.length - 1) === 47/*/*/; // For each path for (var i = 0; i < paths.length; i++) { @@ -190,7 +190,7 @@ Module._findPath = function(request, paths, isMain) { var basePath = path.resolve(curPath, request); var filename; - const rc = stat(basePath); + var rc = stat(basePath); if (!trailingSlash) { if (rc === 0) { // File. if (preserveSymlinks && !isMain) { From 298a40e04ee496dbd6b2324a20d9ff745fef74cb Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:12:54 -0500 Subject: [PATCH 076/485] module: use "clean" objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/module.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/module.js b/lib/module.js index f40a9aebb1592e..bd6af190f642b1 100644 --- a/lib/module.js +++ b/lib/module.js @@ -69,9 +69,9 @@ function Module(id, parent) { } module.exports = Module; -Module._cache = {}; -Module._pathCache = {}; -Module._extensions = {}; +Module._cache = Object.create(null); +Module._pathCache = Object.create(null); +Module._extensions = Object.create(null); var modulePaths = []; Module.globalPaths = []; From 403b89e72b6367934ca3c36d389ce0f3214ffbf5 Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:13:53 -0500 Subject: [PATCH 077/485] module: avoid hasOwnProperty() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hasOwnProperty() is known to be slow, do a direct lookup on a "clean" object instead. PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/module.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/module.js b/lib/module.js index bd6af190f642b1..8916b3b36c2e6f 100644 --- a/lib/module.js +++ b/lib/module.js @@ -33,14 +33,6 @@ const internalModuleReadFile = process.binding('fs').internalModuleReadFile; const internalModuleStat = process.binding('fs').internalModuleStat; const preserveSymlinks = !!process.binding('config').preserveSymlinks; -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - - function stat(filename) { filename = path._makeLong(filename); const cache = stat.cache; @@ -95,12 +87,12 @@ const debug = Module._debug; // -> a/index. // check if the directory is a package.json dir -const packageMainCache = {}; +const packageMainCache = Object.create(null); function readPackage(requestPath) { - if (hasOwnProperty(packageMainCache, requestPath)) { - return packageMainCache[requestPath]; - } + const entry = packageMainCache[requestPath]; + if (entry) + return entry; const jsonPath = path.resolve(requestPath, 'package.json'); const json = internalModuleReadFile(path._makeLong(jsonPath)); From 28dc848e702b70f8c07941a1dfd46227f90c8267 Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:16:46 -0500 Subject: [PATCH 078/485] lib: improve method of function calling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using a more "direct" method of function calling yields better performance. PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/internal/module.js | 13 ++++++------- lib/module.js | 6 +++--- lib/repl.js | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/internal/module.js b/lib/internal/module.js index 2f38618daac5f7..8fc8dfbf327e61 100644 --- a/lib/internal/module.js +++ b/lib/internal/module.js @@ -8,23 +8,22 @@ exports = module.exports = { exports.requireDepth = 0; -// Invoke with makeRequireFunction.call(module) where |module| is the -// Module object to use as the context for the require() function. -function makeRequireFunction() { - const Module = this.constructor; - const self = this; +// Invoke with makeRequireFunction(module) where |module| is the Module object +// to use as the context for the require() function. +function makeRequireFunction(mod) { + const Module = mod.constructor; function require(path) { try { exports.requireDepth += 1; - return self.require(path); + return mod.require(path); } finally { exports.requireDepth -= 1; } } function resolve(request) { - return Module._resolveFilename(request, self); + return Module._resolveFilename(request, mod); } require.resolve = resolve; diff --git a/lib/module.js b/lib/module.js index 8916b3b36c2e6f..1b9c2413b7ce9e 100644 --- a/lib/module.js +++ b/lib/module.js @@ -577,11 +577,11 @@ Module.prototype._compile = function(content, filename) { } } var dirname = path.dirname(filename); - var require = internalModule.makeRequireFunction.call(this); - var args = [this.exports, require, this, filename, dirname]; + var require = internalModule.makeRequireFunction(this); var depth = internalModule.requireDepth; if (depth === 0) stat.cache = new Map(); - var result = compiledWrapper.apply(this.exports, args); + var result = compiledWrapper.call(this.exports, this.exports, require, this, + filename, dirname); if (depth === 0) stat.cache = null; return result; }; diff --git a/lib/repl.js b/lib/repl.js index 3dd243b0b0cdbf..676fa105861d33 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -714,7 +714,7 @@ REPLServer.prototype.createContext = function() { const module = new Module(''); module.paths = Module._resolveLookupPaths('', parentModule)[1]; - const require = internalModule.makeRequireFunction.call(module); + const require = internalModule.makeRequireFunction(module); context.module = module; context.require = require; From e32425bfcd55497cdad4982908d6fcba9a0e033c Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:19:54 -0500 Subject: [PATCH 079/485] module: avoid JSON.stringify() for cache key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By avoiding JSON.stringify() and simply joining the strings with a delimiter that does not appear in paths, we can improve cached require() performance by at least 50%. Additionally, this commit removes the last source of permanent function deoptimization (const) for _findPath(). PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/module.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/module.js b/lib/module.js index 1b9c2413b7ce9e..77675fcd980421 100644 --- a/lib/module.js +++ b/lib/module.js @@ -165,10 +165,11 @@ Module._findPath = function(request, paths, isMain) { return false; } - const cacheKey = JSON.stringify({request: request, paths: paths}); - if (Module._pathCache[cacheKey]) { - return Module._pathCache[cacheKey]; - } + var cacheKey = request + '\x00' + + (paths.length === 1 ? paths[0] : paths.join('\x00')); + var entry = Module._pathCache[cacheKey]; + if (entry) + return entry; var exts; var trailingSlash = request.length > 0 && From c67207731f16a78f6cae90e49c53b10728241ecf Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:22:27 -0500 Subject: [PATCH 080/485] lib: simplify Module._resolveLookupPaths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit consists of two changes: * Avoids returning request/id *just* for the debug() output * Returns `null` instead of an empty array for the list of paths PR-URL: https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/module.js | 29 ++++++++++---------- lib/repl.js | 2 +- test/parallel/test-module-relative-lookup.js | 7 ++++- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/lib/module.js b/lib/module.js index 77675fcd980421..115afc7553ad82 100644 --- a/lib/module.js +++ b/lib/module.js @@ -326,14 +326,14 @@ if (process.platform === 'win32') { // 'index.' character codes var indexChars = [ 105, 110, 100, 101, 120, 46 ]; var indexLen = indexChars.length; -Module._resolveLookupPaths = function(request, parent) { +Module._resolveLookupPaths = function(request, parent, newReturn) { if (NativeModule.nonInternalExists(request)) { - return [request, []]; + debug('looking for %j in []', request); + return (newReturn ? null : [request, []]); } - var reqLen = request.length; // Check for relative path - if (reqLen < 2 || + if (request.length < 2 || request.charCodeAt(0) !== 46/*.*/ || (request.charCodeAt(1) !== 46/*.*/ && request.charCodeAt(1) !== 47/*/*/)) { @@ -355,7 +355,8 @@ Module._resolveLookupPaths = function(request, parent) { } } - return [request, paths]; + debug('looking for %j in %j', request, paths); + return (newReturn ? (paths.length > 0 ? paths : null) : [request, paths]); } // with --eval, parent.id is not set and parent.filename is null @@ -363,7 +364,9 @@ Module._resolveLookupPaths = function(request, parent) { // make require('./path/to/foo') work - normally the path is taken // from realpath(__filename) but with eval there is no filename var mainPaths = ['.'].concat(Module._nodeModulePaths('.'), modulePaths); - return [request, mainPaths]; + + debug('looking for %j in %j', request, mainPaths); + return (newReturn ? mainPaths : [request, mainPaths]); } // Is the parent an index module? @@ -413,7 +416,9 @@ Module._resolveLookupPaths = function(request, parent) { debug('RELATIVE: requested: %s set ID to: %s from %s', request, id, parent.id); - return [id, [path.dirname(parent.filename)]]; + var parentDir = [path.dirname(parent.filename)]; + debug('looking for %j in %j', id, parentDir); + return (newReturn ? parentDir : [id, parentDir]); }; @@ -472,16 +477,12 @@ Module._resolveFilename = function(request, parent, isMain) { return request; } - var resolvedModule = Module._resolveLookupPaths(request, parent); - var id = resolvedModule[0]; - var paths = resolvedModule[1]; + var paths = Module._resolveLookupPaths(request, parent, true); // look up the filename first, since that's the cache key. - debug('looking for %j in %j', id, paths); - var filename = Module._findPath(request, paths, isMain); if (!filename) { - var err = new Error("Cannot find module '" + request + "'"); + var err = new Error(`Cannot find module '${request}'`); err.code = 'MODULE_NOT_FOUND'; throw err; } @@ -564,7 +565,7 @@ Module.prototype._compile = function(content, filename) { if (!resolvedArgv) { // we enter the repl if we're not given a filename argument. if (process.argv[1]) { - resolvedArgv = Module._resolveFilename(process.argv[1], null); + resolvedArgv = Module._resolveFilename(process.argv[1], null, false); } else { resolvedArgv = 'repl'; } diff --git a/lib/repl.js b/lib/repl.js index 676fa105861d33..b00666267a646b 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -712,7 +712,7 @@ REPLServer.prototype.createContext = function() { } const module = new Module(''); - module.paths = Module._resolveLookupPaths('', parentModule)[1]; + module.paths = Module._resolveLookupPaths('', parentModule, true) || []; const require = internalModule.makeRequireFunction(module); context.module = module; diff --git a/test/parallel/test-module-relative-lookup.js b/test/parallel/test-module-relative-lookup.js index 2ecb412ce22782..6ebb8ee1881962 100644 --- a/test/parallel/test-module-relative-lookup.js +++ b/test/parallel/test-module-relative-lookup.js @@ -4,7 +4,12 @@ require('../common'); const assert = require('assert'); const _module = require('module'); // avoid collision with global.module const lookupResults = _module._resolveLookupPaths('./lodash'); -const paths = lookupResults[1]; +let paths = lookupResults[1]; assert.strictEqual(paths[0], '.', 'Current directory gets highest priority for local modules'); + +paths = _module._resolveLookupPaths('./lodash', null, true); + +assert.strictEqual(paths && paths[0], '.', + 'Current directory gets highest priority for local modules'); From 443691a5aef8a908bc4c6f63b1710eb988235674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mo=CC=88ller?= Date: Sat, 17 Sep 2016 11:32:29 +0200 Subject: [PATCH 081/485] crypto: fix default encoding of LazyTransform PullRequest #5522 and #5500 described the change of the default encoding into UTF8 in crypto functions. This however was only changed for the non-streaming API. The streaming API still used binary as the default encoding. This commit will change the default streaming API encoding to UTF8 to make both APIs behave the same. It will also add tests to validate the behavior. Refs: https://github.com/nodejs/node/pull/5522 Refs: https://github.com/nodejs/node/pull/5500 PR-URL: https://github.com/nodejs/node/pull/8611 Reviewed-By: Fedor Indutny Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- lib/internal/streams/lazy_transform.js | 7 ++++- test/parallel/test-crypto.js | 39 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/lib/internal/streams/lazy_transform.js b/lib/internal/streams/lazy_transform.js index bd68bef4b6dd17..3607d985346992 100644 --- a/lib/internal/streams/lazy_transform.js +++ b/lib/internal/streams/lazy_transform.js @@ -5,6 +5,7 @@ const stream = require('stream'); const util = require('util'); +const crypto = require('crypto'); module.exports = LazyTransform; @@ -22,7 +23,11 @@ util.inherits(LazyTransform, stream.Transform); get: function() { stream.Transform.call(this, this._options); this._writableState.decodeStrings = false; - this._writableState.defaultEncoding = 'latin1'; + + if (!this._options || !this._options.defaultEncoding) { + this._writableState.defaultEncoding = crypto.DEFAULT_ENCODING; + } + return this[prop]; }, set: function(val) { diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js index 46218e72754eba..37729b2cbcde37 100644 --- a/test/parallel/test-crypto.js +++ b/test/parallel/test-crypto.js @@ -189,3 +189,42 @@ console.log(crypto.randomBytes(16)); assert.throws(function() { tls.createSecureContext({ crl: 'not a CRL' }); }, /^Error: Failed to parse CRL$/); + +/** + * Check if the stream function uses utf8 as a default encoding. + **/ + +function testEncoding(options, assertionHash) { + const hash = crypto.createHash('sha256', options); + let hashValue = ''; + + hash.on('data', (data) => { + hashValue += data.toString('hex'); + }); + + hash.on('end', common.mustCall(() => { + assert.strictEqual(hashValue, assertionHash); + })); + + hash.write('öäü'); + hash.end(); +} + +// Hash of "öäü" in utf8 format +const assertionHashUtf8 = + '4f53d15bee524f082380e6d7247cc541e7cb0d10c64efdcc935ceeb1e7ea345c'; + +// Hash of "öäü" in latin1 format +const assertionHashLatin1 = + 'cd37bccd5786e2e76d9b18c871e919e6eb11cc12d868f5ae41c40ccff8e44830'; + +testEncoding(undefined, assertionHashUtf8); +testEncoding({}, assertionHashUtf8); + +testEncoding({ + defaultEncoding: 'utf8' +}, assertionHashUtf8); + +testEncoding({ + defaultEncoding: 'latin1' +}, assertionHashLatin1); From 92e7c93fce831650a0aea554074b0d0a8eb97f1c Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Thu, 20 Oct 2016 15:38:54 -0400 Subject: [PATCH 082/485] test: add test for loading from global folders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test executes with a copy of the node executable since $PREFIX/lib/node is relative to the executable location. PR-URL: https://github.com/nodejs/node/pull/9283 Reviewed-By: Sam Roberts Reviewed-By: Gibson Fahnestock Reviewed-By: João Reis Reviewed-By: Ben Noordhuis --- .../home-pkg-in-both/.node_libraries/foo.js | 1 + .../home-pkg-in-both/.node_modules/foo.js | 1 + .../.node_libraries/foo.js | 1 + .../.node_modules/foo.js | 1 + .../local-pkg/node_modules/foo.js | 1 + .../local-pkg/test.js | 2 + .../node_path/foo.js | 1 + .../test-module-loading-globalpaths.js | 101 ++++++++++++++++++ 8 files changed, 109 insertions(+) create mode 100644 test/fixtures/test-module-loading-globalpaths/home-pkg-in-both/.node_libraries/foo.js create mode 100644 test/fixtures/test-module-loading-globalpaths/home-pkg-in-both/.node_modules/foo.js create mode 100644 test/fixtures/test-module-loading-globalpaths/home-pkg-in-node_libraries/.node_libraries/foo.js create mode 100644 test/fixtures/test-module-loading-globalpaths/home-pkg-in-node_modules/.node_modules/foo.js create mode 100644 test/fixtures/test-module-loading-globalpaths/local-pkg/node_modules/foo.js create mode 100644 test/fixtures/test-module-loading-globalpaths/local-pkg/test.js create mode 100644 test/fixtures/test-module-loading-globalpaths/node_path/foo.js create mode 100644 test/parallel/test-module-loading-globalpaths.js diff --git a/test/fixtures/test-module-loading-globalpaths/home-pkg-in-both/.node_libraries/foo.js b/test/fixtures/test-module-loading-globalpaths/home-pkg-in-both/.node_libraries/foo.js new file mode 100644 index 00000000000000..eb278f95762215 --- /dev/null +++ b/test/fixtures/test-module-loading-globalpaths/home-pkg-in-both/.node_libraries/foo.js @@ -0,0 +1 @@ +exports.string = '$HOME/.node_libraries'; diff --git a/test/fixtures/test-module-loading-globalpaths/home-pkg-in-both/.node_modules/foo.js b/test/fixtures/test-module-loading-globalpaths/home-pkg-in-both/.node_modules/foo.js new file mode 100644 index 00000000000000..8a665b3e98cfe2 --- /dev/null +++ b/test/fixtures/test-module-loading-globalpaths/home-pkg-in-both/.node_modules/foo.js @@ -0,0 +1 @@ +exports.string = '$HOME/.node_modules'; diff --git a/test/fixtures/test-module-loading-globalpaths/home-pkg-in-node_libraries/.node_libraries/foo.js b/test/fixtures/test-module-loading-globalpaths/home-pkg-in-node_libraries/.node_libraries/foo.js new file mode 100644 index 00000000000000..eb278f95762215 --- /dev/null +++ b/test/fixtures/test-module-loading-globalpaths/home-pkg-in-node_libraries/.node_libraries/foo.js @@ -0,0 +1 @@ +exports.string = '$HOME/.node_libraries'; diff --git a/test/fixtures/test-module-loading-globalpaths/home-pkg-in-node_modules/.node_modules/foo.js b/test/fixtures/test-module-loading-globalpaths/home-pkg-in-node_modules/.node_modules/foo.js new file mode 100644 index 00000000000000..8a665b3e98cfe2 --- /dev/null +++ b/test/fixtures/test-module-loading-globalpaths/home-pkg-in-node_modules/.node_modules/foo.js @@ -0,0 +1 @@ +exports.string = '$HOME/.node_modules'; diff --git a/test/fixtures/test-module-loading-globalpaths/local-pkg/node_modules/foo.js b/test/fixtures/test-module-loading-globalpaths/local-pkg/node_modules/foo.js new file mode 100644 index 00000000000000..63e844e4d4060b --- /dev/null +++ b/test/fixtures/test-module-loading-globalpaths/local-pkg/node_modules/foo.js @@ -0,0 +1 @@ +exports.string = 'local'; diff --git a/test/fixtures/test-module-loading-globalpaths/local-pkg/test.js b/test/fixtures/test-module-loading-globalpaths/local-pkg/test.js new file mode 100644 index 00000000000000..8054983e992ce8 --- /dev/null +++ b/test/fixtures/test-module-loading-globalpaths/local-pkg/test.js @@ -0,0 +1,2 @@ +'use strict'; +console.log(require('foo').string); diff --git a/test/fixtures/test-module-loading-globalpaths/node_path/foo.js b/test/fixtures/test-module-loading-globalpaths/node_path/foo.js new file mode 100644 index 00000000000000..3ce43c49206f73 --- /dev/null +++ b/test/fixtures/test-module-loading-globalpaths/node_path/foo.js @@ -0,0 +1 @@ +exports.string = '$NODE_PATH'; diff --git a/test/parallel/test-module-loading-globalpaths.js b/test/parallel/test-module-loading-globalpaths.js new file mode 100644 index 00000000000000..d789f5409901ba --- /dev/null +++ b/test/parallel/test-module-loading-globalpaths.js @@ -0,0 +1,101 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); +const child_process = require('child_process'); +const pkgName = 'foo'; + +if (process.argv[2] === 'child') { + console.log(require(pkgName).string); +} else { + common.refreshTmpDir(); + + // Copy node binary into a test $PREFIX directory. + const prefixPath = path.join(common.tmpDir, 'install'); + fs.mkdirSync(prefixPath); + let testExecPath; + if (common.isWindows) { + testExecPath = path.join(prefixPath, path.basename(process.execPath)); + } else { + const prefixBinPath = path.join(prefixPath, 'bin'); + fs.mkdirSync(prefixBinPath); + testExecPath = path.join(prefixBinPath, path.basename(process.execPath)); + } + const mode = fs.statSync(process.execPath).mode; + fs.writeFileSync(testExecPath, fs.readFileSync(process.execPath)); + fs.chmodSync(testExecPath, mode); + + const runTest = (expectedString, env) => { + const child = child_process.execFileSync(testExecPath, + [ __filename, 'child' ], + { encoding: 'utf8', env: env }); + assert.strictEqual(child.trim(), expectedString); + }; + + const testFixturesDir = path.join(common.fixturesDir, + path.basename(__filename, '.js')); + + const env = Object.assign({}, process.env); + // Turn on module debug to aid diagnosing failures. + env['NODE_DEBUG'] = 'module'; + // Unset NODE_PATH. + delete env['NODE_PATH']; + + // Test empty global path. + const noPkgHomeDir = path.join(common.tmpDir, 'home-no-pkg'); + fs.mkdirSync(noPkgHomeDir); + env['HOME'] = env['USERPROFILE'] = noPkgHomeDir; + assert.throws( + () => { + child_process.execFileSync(testExecPath, [ __filename, 'child' ], + { encoding: 'utf8', env: env }); + }, + new RegExp('Cannot find module \'' + pkgName + '\'')); + + // Test module in $HOME/.node_modules. + const modHomeDir = path.join(testFixturesDir, 'home-pkg-in-node_modules'); + env['HOME'] = env['USERPROFILE'] = modHomeDir; + runTest('$HOME/.node_modules', env); + + // Test module in $HOME/.node_libraries. + const libHomeDir = path.join(testFixturesDir, 'home-pkg-in-node_libraries'); + env['HOME'] = env['USERPROFILE'] = libHomeDir; + runTest('$HOME/.node_libraries', env); + + // Test module both $HOME/.node_modules and $HOME/.node_libraries. + const bothHomeDir = path.join(testFixturesDir, 'home-pkg-in-both'); + env['HOME'] = env['USERPROFILE'] = bothHomeDir; + runTest('$HOME/.node_modules', env); + + // Test module in $PREFIX/lib/node. + // Write module into $PREFIX/lib/node. + const expectedString = '$PREFIX/lib/node'; + const prefixLibPath = path.join(prefixPath, 'lib'); + fs.mkdirSync(prefixLibPath); + const prefixLibNodePath = path.join(prefixLibPath, 'node'); + fs.mkdirSync(prefixLibNodePath); + const pkgPath = path.join(prefixLibNodePath, pkgName + '.js'); + fs.writeFileSync(pkgPath, 'exports.string = \'' + expectedString + '\';'); + + env['HOME'] = env['USERPROFILE'] = noPkgHomeDir; + runTest(expectedString, env); + + // Test module in all global folders. + env['HOME'] = env['USERPROFILE'] = bothHomeDir; + runTest('$HOME/.node_modules', env); + + // Test module in NODE_PATH is loaded ahead of global folders. + env['HOME'] = env['USERPROFILE'] = bothHomeDir; + env['NODE_PATH'] = path.join(testFixturesDir, 'node_path'); + runTest('$NODE_PATH', env); + + // Test module in local folder is loaded ahead of global folders. + const localDir = path.join(testFixturesDir, 'local-pkg'); + env['HOME'] = env['USERPROFILE'] = bothHomeDir; + env['NODE_PATH'] = path.join(testFixturesDir, 'node_path'); + const child = child_process.execFileSync(testExecPath, + [ path.join(localDir, 'test.js') ], + { encoding: 'utf8', env: env }); + assert.strictEqual(child.trim(), 'local'); +} From 055482c21e2df94446d9796949d1bb810e8331bf Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Tue, 25 Oct 2016 23:58:06 +0100 Subject: [PATCH 083/485] module: fix loading from global folders on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code was calculating $PREFIX/lib/node relative to process.execPath, but on Windows process.execPath is $PREFIX\node.exe whereas everywhere else process.execPath is $PREFIX/bin/node (where $PREFIX is the root of the installed Node.js). PR-URL: https://github.com/nodejs/node/pull/9283 Reviewed-By: Sam Roberts Reviewed-By: Gibson Fahnestock Reviewed-By: João Reis Reviewed-By: Ben Noordhuis --- lib/module.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/module.js b/lib/module.js index 115afc7553ad82..ef2b97322e3d2e 100644 --- a/lib/module.js +++ b/lib/module.js @@ -632,7 +632,16 @@ Module._initPaths = function() { homeDir = process.env.HOME; } - var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; + // $PREFIX/lib/node, where $PREFIX is the root of the Node.js installation. + var prefixDir; + // process.execPath is $PREFIX/bin/node except on Windows where it is + // $PREFIX\node.exe. + if (isWindows) { + prefixDir = path.resolve(process.execPath, '..'); + } else { + prefixDir = path.resolve(process.execPath, '..', '..'); + } + var paths = [path.resolve(prefixDir, 'lib', 'node')]; if (homeDir) { paths.unshift(path.resolve(homeDir, '.node_libraries')); From efec14a7d12d9e07e4efcc8e5c0ad7f80c47f83f Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 1 Feb 2017 03:51:54 +0800 Subject: [PATCH 084/485] assert: enforce type check in deepStrictEqual Add checks for the built-in type tags to catch objects with faked prototypes. See https://tc39.github.io/ecma262/#sec-object.prototype.tostring for a partial list of built-in tags. Fixes: https://github.com/nodejs/node/issues/10258 PR-URL: https://github.com/nodejs/node/pull/10282 Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- doc/api/assert.md | 25 ++++++++++- lib/assert.js | 4 ++ test/parallel/test-assert-checktag.js | 61 +++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-assert-checktag.js diff --git a/doc/api/assert.md b/doc/api/assert.md index 70e13f3b87760c..14de5af2ed9561 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -125,12 +125,13 @@ changes: * `expected` {any} * `message` {any} -Generally identical to `assert.deepEqual()` with two exceptions: +Generally identical to `assert.deepEqual()` with three exceptions: 1. Primitive values are compared using the [Strict Equality Comparison][] ( `===` ). 2. [`[[Prototype]]`][prototype-spec] of objects are compared using the [Strict Equality Comparison][] too. +3. [Type tags][Object.prototype.toString()] of objects should be the same. ```js const assert = require('assert'); @@ -141,6 +142,25 @@ assert.deepEqual({a: 1}, {a: '1'}); assert.deepStrictEqual({a: 1}, {a: '1'}); // AssertionError: { a: 1 } deepStrictEqual { a: '1' } // because 1 !== '1' using strict equality + +// The following objects don't have own properties +const date = new Date(); +const object = {}; +const fakeDate = {}; + +Object.setPrototypeOf(fakeDate, Date.prototype); + +assert.deepEqual(object, fakeDate); +// OK, doesn't check [[Prototype]] +assert.deepStrictEqual(object, fakeDate); +// AssertionError: {} deepStrictEqual Date {} +// Different [[Prototype]] + +assert.deepEqual(date, fakeDate); +// OK, doesn't check type tags +assert.deepStrictEqual(date, fakeDate); +// AssertionError: 2017-03-11T14:25:31.849Z deepStrictEqual Date {} +// Different type tags ``` If the values are not equal, an `AssertionError` is thrown with a `message` @@ -579,4 +599,5 @@ For more information, see [SameValueZero]: https://tc39.github.io/ecma262/#sec-samevaluezero [prototype-spec]: https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots [mdn-equality-guide]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness -[enumerable "own" properties]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties \ No newline at end of file +[enumerable "own" properties]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties +[Object.prototype.toString()]: https://tc39.github.io/ecma262/#sec-object.prototype.tostring diff --git a/lib/assert.js b/lib/assert.js index 3183784dbfc42d..df575c0f169b22 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -200,6 +200,10 @@ function _deepEqual(actual, expected, strict, memos) { if (Object.getPrototypeOf(actual) !== Object.getPrototypeOf(expected)) { return false; } + + if (actualTag !== expectedTag) { + return false; + } } // Do fast checks for builtin types. diff --git a/test/parallel/test-assert-checktag.js b/test/parallel/test-assert-checktag.js new file mode 100644 index 00000000000000..ae409c7250350e --- /dev/null +++ b/test/parallel/test-assert-checktag.js @@ -0,0 +1,61 @@ +'use strict'; +require('../common'); +const assert = require('assert'); +const util = require('util'); + +// Template tag function turning an error message into a RegExp +// for assert.throws() +function re(literals, ...values) { + let result = literals[0]; + for (const [i, value] of values.entries()) { + const str = util.inspect(value); + // Need to escape special characters. + result += str.replace(/[\\^$.*+?()[\]{}|=!<>:-]/g, '\\$&'); + result += literals[i + 1]; + } + return new RegExp('^AssertionError: ' + result + '$'); +} + +// Turn off no-restricted-properties because we are testing deepEqual! +/* eslint-disable no-restricted-properties */ + +// See https://github.com/nodejs/node/issues/10258 +{ + const date = new Date('2016'); + function FakeDate() {} + FakeDate.prototype = Date.prototype; + const fake = new FakeDate(); + + assert.doesNotThrow(() => assert.deepEqual(date, fake)); + assert.doesNotThrow(() => assert.deepEqual(fake, date)); + + // For deepStrictEqual we check the runtime type, + // then reveal the fakeness of the fake date + assert.throws(() => assert.deepStrictEqual(date, fake), + re`${date} deepStrictEqual Date {}`); + assert.throws(() => assert.deepStrictEqual(fake, date), + re`Date {} deepStrictEqual ${date}`); +} + +{ // At the moment global has its own type tag + const fakeGlobal = {}; + Object.setPrototypeOf(fakeGlobal, Object.getPrototypeOf(global)); + for (const prop of Object.keys(global)) { + fakeGlobal[prop] = global[prop]; + } + assert.doesNotThrow(() => assert.deepEqual(fakeGlobal, global)); + // Message will be truncated anyway, don't validate + assert.throws(() => assert.deepStrictEqual(fakeGlobal, global)); +} + +{ // At the moment process has its own type tag + const fakeProcess = {}; + Object.setPrototypeOf(fakeProcess, Object.getPrototypeOf(process)); + for (const prop of Object.keys(process)) { + fakeProcess[prop] = process[prop]; + } + assert.doesNotThrow(() => assert.deepEqual(fakeProcess, process)); + // Message will be truncated anyway, don't validate + assert.throws(() => assert.deepStrictEqual(fakeProcess, process)); +} +/* eslint-enable */ From c6cbbf92630069f7f7c29e4dff2f622d48d741d5 Mon Sep 17 00:00:00 2001 From: Juwan Yoo Date: Wed, 8 Mar 2017 19:36:15 -0800 Subject: [PATCH 085/485] net: allow missing callback for Socket.connect Arguments of Socket.prototype.connect should be also normalized, causing error when called without callback. Changed Socket.prototype.connect's code same as net.connect and added test. Fixes: https://github.com/nodejs/node/issues/11761 PR-URL: https://github.com/nodejs/node/pull/11762 Reviewed-By: Sam Roberts Reviewed-By: Joyee Cheung Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas --- lib/net.js | 24 +++++++------------ .../test-net-socket-connect-without-cb.js | 20 ++++++++++++++++ 2 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 test/parallel/test-net-socket-connect-without-cb.js diff --git a/lib/net.js b/lib/net.js index d2dce399880c82..fb9c72cb95240a 100644 --- a/lib/net.js +++ b/lib/net.js @@ -920,24 +920,18 @@ function connect(self, address, port, addressType, localAddress, localPort) { } -Socket.prototype.connect = function(options, cb) { +Socket.prototype.connect = function() { + const args = new Array(arguments.length); + for (var i = 0; i < arguments.length; i++) + args[i] = arguments[i]; + // TODO(joyeecheung): use destructuring when V8 is fast enough + const normalized = normalizeArgs(args); + const options = normalized[0]; + const cb = normalized[1]; + if (this.write !== Socket.prototype.write) this.write = Socket.prototype.write; - if (options === null || typeof options !== 'object') { - // Old API: - // connect(port[, host][, cb]) - // connect(path[, cb]); - const args = new Array(arguments.length); - for (var i = 0; i < arguments.length; i++) - args[i] = arguments[i]; - const normalized = normalizeArgs(args); - const normalizedOptions = normalized[0]; - const normalizedCb = normalized[1]; - return Socket.prototype.connect.call(this, - normalizedOptions, normalizedCb); - } - if (this.destroyed) { this._readableState.reading = false; this._readableState.ended = false; diff --git a/test/parallel/test-net-socket-connect-without-cb.js b/test/parallel/test-net-socket-connect-without-cb.js new file mode 100644 index 00000000000000..468b29a3a486d7 --- /dev/null +++ b/test/parallel/test-net-socket-connect-without-cb.js @@ -0,0 +1,20 @@ +'use strict'; +const common = require('../common'); + +// This test ensures that socket.connect can be called without callback +// which is optional. + +const net = require('net'); + +const server = net.createServer(common.mustCall(function(conn) { + conn.end(); + server.close(); +})).listen(0, common.mustCall(function() { + const client = new net.Socket(); + + client.on('connect', common.mustCall(function() { + client.end(); + })); + + client.connect(server.address()); +})); From 608ea942726e491de7327a3fe32cb5a715026c07 Mon Sep 17 00:00:00 2001 From: Bradley Farias Date: Mon, 27 Feb 2017 12:01:18 -0600 Subject: [PATCH 086/485] doc: package main can be directory with an index This behavior dates back to 2011 but was not documented. PR-URL: https://github.com/nodejs/node/pull/11581 Reviewed-By: Bradley Farias Reviewed-By: James Snell --- doc/api/modules.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/api/modules.md b/doc/api/modules.md index 973ee7ee8e03c5..a0c669f20956e8 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -161,14 +161,18 @@ LOAD_AS_FILE(X) 3. If X.json is a file, parse X.json to a JavaScript Object. STOP 4. If X.node is a file, load X.node as binary addon. STOP +LOAD_INDEX(X) +1. If X/index.js is a file, load X/index.js as JavaScript text. STOP +2. If X/index.json is a file, parse X/index.json to a JavaScript object. STOP +3. If X/index.node is a file, load X/index.node as binary addon. STOP + LOAD_AS_DIRECTORY(X) 1. If X/package.json is a file, a. Parse X/package.json, and look for "main" field. b. let M = X + (json main field) c. LOAD_AS_FILE(M) -2. If X/index.js is a file, load X/index.js as JavaScript text. STOP -3. If X/index.json is a file, parse X/index.json to a JavaScript object. STOP -4. If X/index.node is a file, load X/index.node as binary addon. STOP + d. LOAD_INDEX(M) +2. LOAD_INDEX(X) LOAD_NODE_MODULES(X, START) 1. let DIRS=NODE_MODULES_PATHS(START) From b170fb7c55c15a5f29b1f6feef520c65849871dc Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Wed, 1 Mar 2017 15:52:43 -0800 Subject: [PATCH 087/485] inspector: proper WS URLs when bound to 0.0.0.0 JSON target list response will now return appropriate IP address for instances listening on 0.0.0.0. Refs: https://github.com/nodejs/node/issues/11591 PR-URL: https://github.com/nodejs/node/pull/11755 Reviewed-By: James Snell Reviewed-By: Ben Noordhuis --- src/inspector_socket_server.cc | 26 +++++++++- test/inspector/inspector-helper.js | 25 +++++---- test/inspector/test-inspector-ip-detection.js | 52 +++++++++++++++++++ test/inspector/test-inspector.js | 12 ++--- 4 files changed, 99 insertions(+), 16 deletions(-) create mode 100644 test/inspector/test-inspector-ip-detection.js diff --git a/src/inspector_socket_server.cc b/src/inspector_socket_server.cc index ee44a69a683690..1c8fa70b65a3b3 100644 --- a/src/inspector_socket_server.cc +++ b/src/inspector_socket_server.cc @@ -139,6 +139,28 @@ void SendProtocolJson(InspectorSocket* socket) { SendHttpResponse(socket, data); } +int GetSocketHost(uv_tcp_t* socket, std::string* out_host) { + char ip[INET6_ADDRSTRLEN]; + sockaddr_storage addr; + int len = sizeof(addr); + int err = uv_tcp_getsockname(socket, + reinterpret_cast(&addr), + &len); + if (err != 0) + return err; + if (addr.ss_family == AF_INET6) { + const sockaddr_in6* v6 = reinterpret_cast(&addr); + err = uv_ip6_name(v6, ip, sizeof(ip)); + } else { + const sockaddr_in* v4 = reinterpret_cast(&addr); + err = uv_ip4_name(v4, ip, sizeof(ip)); + } + if (err != 0) + return err; + *out_host = ip; + return err; +} + int GetPort(uv_tcp_t* socket, int* out_port) { sockaddr_storage addr; int len = sizeof(addr); @@ -341,7 +363,9 @@ void InspectorSocketServer::SendListResponse(InspectorSocket* socket) { } } if (!connected) { - std::string address = GetWsUrl(host_, port_, id); + std::string host; + GetSocketHost(&socket->client, &host); + std::string address = GetWsUrl(host, port_, id); std::ostringstream frontend_url; frontend_url << "chrome-devtools://devtools/bundled"; frontend_url << "/inspector.html?experiments=true&v8only=true&ws="; diff --git a/test/inspector/inspector-helper.js b/test/inspector/inspector-helper.js index beaf1a8aa1a3fd..004f4f93e4c309 100644 --- a/test/inspector/inspector-helper.js +++ b/test/inspector/inspector-helper.js @@ -80,8 +80,8 @@ function tearDown(child, err) { } } -function checkHttpResponse(port, path, callback) { - http.get({port, path}, function(res) { +function checkHttpResponse(host, port, path, callback, errorcb) { + const req = http.get({host, port, path}, function(res) { let response = ''; res.setEncoding('utf8'); res @@ -98,6 +98,8 @@ function checkHttpResponse(port, path, callback) { callback(err, json); }); }); + if (errorcb) + req.on('error', errorcb); } function makeBufferingDataCallback(dataCallback) { @@ -295,7 +297,7 @@ TestSession.prototype.disconnect = function(childDone) { TestSession.prototype.testHttpResponse = function(path, check) { return this.enqueue((callback) => - checkHttpResponse(this.harness_.port, path, (err, response) => { + checkHttpResponse(null, this.harness_.port, path, (err, response) => { check.call(this, err, response); callback(); })); @@ -361,12 +363,17 @@ Harness.prototype.enqueue_ = function(task) { return this; }; -Harness.prototype.testHttpResponse = function(path, check) { +Harness.prototype.testHttpResponse = function(host, path, check, errorcb) { return this.enqueue_((doneCallback) => { - checkHttpResponse(this.port, path, (err, response) => { - check.call(this, err, response); - doneCallback(); - }); + function wrap(callback) { + if (callback) { + return function() { + callback(...arguments); + doneCallback(); + }; + } + } + checkHttpResponse(host, this.port, path, wrap(check), wrap(errorcb)); }); }; @@ -404,7 +411,7 @@ Harness.prototype.wsHandshake = function(devtoolsUrl, tests, readyCallback) { Harness.prototype.runFrontendSession = function(tests) { return this.enqueue_((callback) => { - checkHttpResponse(this.port, '/json/list', (err, response) => { + checkHttpResponse(null, this.port, '/json/list', (err, response) => { assert.ifError(err); this.wsHandshake(response[0]['webSocketDebuggerUrl'], tests, callback); }); diff --git a/test/inspector/test-inspector-ip-detection.js b/test/inspector/test-inspector-ip-detection.js new file mode 100644 index 00000000000000..d2d60411894ca8 --- /dev/null +++ b/test/inspector/test-inspector-ip-detection.js @@ -0,0 +1,52 @@ +'use strict'; +const common = require('../common'); +common.skipIfInspectorDisabled(); + +const assert = require('assert'); +const helper = require('./inspector-helper.js'); +const os = require('os'); + +const ip = pickIPv4Address(); + +if (!ip) { + common.skip('No IP address found'); + return; +} + +function checkListResponse(instance, err, response) { + assert.ifError(err); + const res = response[0]; + const wsUrl = res['webSocketDebuggerUrl']; + assert.ok(wsUrl); + const match = wsUrl.match(/^ws:\/\/(.*):9229\/(.*)/); + assert.strictEqual(ip, match[1]); + assert.strictEqual(res['id'], match[2]); + assert.strictEqual(ip, res['devtoolsFrontendUrl'].match(/.*ws=(.*):9229/)[1]); + instance.childInstanceDone = true; +} + +function checkError(instance, error) { + // Some OSes will not allow us to connect + if (error.code === 'EHOSTUNREACH') { + common.skip('Unable to connect to self'); + } else { + throw error; + } + instance.childInstanceDone = true; +} + +function runTests(instance) { + instance + .testHttpResponse(ip, '/json/list', checkListResponse.bind(null, instance), + checkError.bind(null, instance)) + .kill(); +} + +function pickIPv4Address() { + for (const i of [].concat(...Object.values(os.networkInterfaces()))) { + if (i.family === 'IPv4' && i.address !== '127.0.0.1') + return i.address; + } +} + +helper.startNodeForInspectorTest(runTests, '--inspect-brk=0.0.0.0'); diff --git a/test/inspector/test-inspector.js b/test/inspector/test-inspector.js index 5cad934e7a51f9..1c3ef12bafe4ad 100644 --- a/test/inspector/test-inspector.js +++ b/test/inspector/test-inspector.js @@ -209,12 +209,12 @@ function testWaitsForFrontendDisconnect(session, harness) { function runTests(harness) { harness - .testHttpResponse('/json', checkListResponse) - .testHttpResponse('/json/list', checkListResponse) - .testHttpResponse('/json/version', checkVersion) - .testHttpResponse('/json/activate', checkBadPath) - .testHttpResponse('/json/activate/boom', checkBadPath) - .testHttpResponse('/json/badpath', checkBadPath) + .testHttpResponse(null, '/json', checkListResponse) + .testHttpResponse(null, '/json/list', checkListResponse) + .testHttpResponse(null, '/json/version', checkVersion) + .testHttpResponse(null, '/json/activate', checkBadPath) + .testHttpResponse(null, '/json/activate/boom', checkBadPath) + .testHttpResponse(null, '/json/badpath', checkBadPath) .runFrontendSession([ testNoUrlsWhenConnected, testBreakpointOnStart, From 78cdd4baa41af8a51146dcda3d1932c0011a8a78 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 9 Mar 2017 23:15:14 -0800 Subject: [PATCH 088/485] test: include all stdio strings for fork() test-child-process-fork-stdio-string-variant was only testing 'pipe' for its `stdio` value. Add `inherit` and `ignore`. Also added a `common.mustCall()` to verify that the `message` event is triggered. PR-URL: https://github.com/nodejs/node/pull/11783 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Santiago Gimeno --- ...t-child-process-fork-stdio-string-variant.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-child-process-fork-stdio-string-variant.js b/test/parallel/test-child-process-fork-stdio-string-variant.js index 51c943da090c71..5c69850216a6b4 100644 --- a/test/parallel/test-child-process-fork-stdio-string-variant.js +++ b/test/parallel/test-child-process-fork-stdio-string-variant.js @@ -12,16 +12,19 @@ const childScript = `${common.fixturesDir}/child-process-spawn-node`; const errorRegexp = /^TypeError: Incorrect value of stdio option:/; const malFormedOpts = {stdio: '33'}; const payload = {hello: 'world'}; -const stringOpts = {stdio: 'pipe'}; assert.throws(() => fork(childScript, malFormedOpts), errorRegexp); -const child = fork(childScript, stringOpts); +function test(stringVariant) { + const child = fork(childScript, {stdio: stringVariant}); -child.on('message', (message) => { - assert.deepStrictEqual(message, {foo: 'bar'}); -}); + child.on('message', common.mustCall((message) => { + assert.deepStrictEqual(message, {foo: 'bar'}); + })); -child.send(payload); + child.send(payload); -child.on('exit', common.mustCall((code) => assert.strictEqual(code, 0))); + child.on('exit', common.mustCall((code) => assert.strictEqual(code, 0))); +} + +['pipe', 'inherit', 'ignore'].forEach(test); From ea5a2f4e2b477ae589a22ffc0659e244491c7d05 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 10 Mar 2017 09:43:48 -0800 Subject: [PATCH 089/485] doc: improve child_process `maxBuffer` text `maxBuffer` information in child_process.md used atypical formatting. This uses a single consistent style for all instances of `maxBuffer` information. PR-URL: https://github.com/nodejs/node/pull/11791 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- doc/api/child_process.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 7ea5a6ea98c529..7c1f5373d996bf 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -135,8 +135,9 @@ added: v0.1.90 understand the `-c` switch on UNIX or `/d /s /c` on Windows. On Windows, command line parsing should be compatible with `cmd.exe`.) * `timeout` {number} (Default: `0`) - * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on - stdout or stderr - if exceeded child process is killed (Default: `200*1024`) + * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or + stderr. (Default: `200*1024`) If exceeded, the child process is terminated. + See caveat at [`maxBuffer` and Unicode][]. * `killSignal` {string|integer} (Default: `'SIGTERM'`) * `uid` {number} Sets the user identity of the process. (See setuid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).) @@ -212,8 +213,9 @@ added: v0.1.91 * `env` {Object} Environment key-value pairs * `encoding` {string} (Default: `'utf8'`) * `timeout` {number} (Default: `0`) - * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on - stdout or stderr - if exceeded child process is killed (Default: `200*1024`) + * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or + stderr. (Default: `200*1024`) If exceeded, the child process is terminated. + See caveat at [`maxBuffer` and Unicode][]. * `killSignal` {string|integer} (Default: `'SIGTERM'`) * `uid` {number} Sets the user identity of the process. (See setuid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).) @@ -618,8 +620,9 @@ changes: is allowed to run. (Default: `undefined`) * `killSignal` {string|integer} The signal value to be used when the spawned process will be killed. (Default: `'SIGTERM'`) - * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on - stdout or stderr - if exceeded child process is killed + * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or + stderr. (Default: `200*1024`) If exceeded, the child process is terminated. + See caveat at [`maxBuffer` and Unicode][]. * `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`) * Returns: {Buffer|string} The stdout from the command @@ -664,8 +667,9 @@ changes: is allowed to run. (Default: `undefined`) * `killSignal` {string|integer} The signal value to be used when the spawned process will be killed. (Default: `'SIGTERM'`) - * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on - stdout or stderr - if exceeded child process is killed + * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or + stderr. (Default: `200*1024`) If exceeded, the child process is terminated. + See caveat at [`maxBuffer` and Unicode][]. * `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`) * Returns: {Buffer|string} The stdout from the command @@ -716,8 +720,9 @@ changes: is allowed to run. (Default: `undefined`) * `killSignal` {string|integer} The signal value to be used when the spawned process will be killed. (Default: `'SIGTERM'`) - * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on - stdout or stderr - if exceeded child process is killed + * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or + stderr. (Default: `200*1024`) If exceeded, the child process is terminated. + See caveat at [`maxBuffer` and Unicode][]. * `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`) * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses @@ -1235,7 +1240,7 @@ to `stdout` although there are only 4 characters. [`Error`]: errors.html#errors_class_error [`EventEmitter`]: events.html#events_class_eventemitter [`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify -[`maxBuffer`]: #child_process_maxbuffer_and_unicode +[`maxBuffer` and Unicode]: #child_process_maxbuffer_and_unicode [`net.Server`]: net.html#net_class_net_server [`net.Socket`]: net.html#net_class_net_socket [`options.detached`]: #child_process_options_detached From 471aa19ffa5f61d3f50fa6566b283c7ee0e9d74a Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 9 Mar 2017 10:31:54 +0100 Subject: [PATCH 090/485] build: add node_use_openssl check to install.py When configuring --without-ssl and then running make install openssl headers will be copied from deps/openssl to the target installation directory. This commit adds a check for is node_use_openssl is set in which case the headers are not copied. PR-URL: https://github.com/nodejs/node/pull/11766 Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: Brian White --- tools/install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/install.py b/tools/install.py index 4f155376eaf534..d1100352c6a413 100755 --- a/tools/install.py +++ b/tools/install.py @@ -165,7 +165,8 @@ def headers(action): if 'false' == variables.get('node_shared_libuv'): subdir_files('deps/uv/include', 'include/node/', action) - if 'false' == variables.get('node_shared_openssl'): + if 'true' == variables.get('node_use_openssl') and \ + 'false' == variables.get('node_shared_openssl'): subdir_files('deps/openssl/openssl/include/openssl', 'include/node/openssl/', action) subdir_files('deps/openssl/config/archs', 'include/node/openssl/archs', action) action(['deps/openssl/config/opensslconf.h'], 'include/node/openssl/') From 1d1dbcafa8a2deca2417e976650d0ad7a01a38c2 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Fri, 10 Mar 2017 11:22:27 +0100 Subject: [PATCH 091/485] doc: update to current V8 versions Update the documentation to the correct V8 versions in the guide *Maintaining V8 in Node.js*. PR-URL: https://github.com/nodejs/node/pull/11787 Reviewed-By: James M Snell --- doc/guides/maintaining-V8.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/guides/maintaining-V8.md b/doc/guides/maintaining-V8.md index 4bfed3790f5185..e57b73bcf91d3a 100644 --- a/doc/guides/maintaining-V8.md +++ b/doc/guides/maintaining-V8.md @@ -93,11 +93,11 @@ includes the following branches1: 2017-04-01 - 5.4 + 5.5 - 2016-10-18 + 2016-12-06 - ~2016-12-01 + 2017-01-24 @@ -107,11 +107,11 @@ includes the following branches1: N/A - 5.4 + 5.6 - 2016-10-18 + 2017-01-31 - ~2016-12-01 + 2017-03-07 From 3be1db8702f0e2737bf0fceedd4a58b3ddd4ce99 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Fri, 10 Mar 2017 12:13:49 +0100 Subject: [PATCH 092/485] test: fix flaky test-http-set-timeout-server It can happen that the connection and server is closed before the second reponse has been processed by server. In this case, the `res.setTimeout()` callback will never be called causing the test to fail. Fix this by only closing the connection and server when the 2nd has been received. PR-URL: https://github.com/nodejs/node/pull/11790 Fixes: https://github.com/nodejs/node/issues/11768 Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock --- test/parallel/test-http-set-timeout-server.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-http-set-timeout-server.js b/test/parallel/test-http-set-timeout-server.js index 43b74069ac066d..0420a21cb4c4d4 100644 --- a/test/parallel/test-http-set-timeout-server.js +++ b/test/parallel/test-http-set-timeout-server.js @@ -138,10 +138,13 @@ test(function serverRequestNotTimeoutAfterEnd(cb) { test(function serverResponseTimeoutWithPipeline(cb) { let caughtTimeout = ''; + let secReceived = false; process.on('exit', function() { assert.strictEqual(caughtTimeout, '/2'); }); const server = http.createServer(function(req, res) { + if (req.url === '/2') + secReceived = true; const s = res.setTimeout(50, function() { caughtTimeout += req.url; }); @@ -149,9 +152,11 @@ test(function serverResponseTimeoutWithPipeline(cb) { if (req.url === '/1') res.end(); }); server.on('timeout', function(socket) { - socket.destroy(); - server.close(); - cb(); + if (secReceived) { + socket.destroy(); + server.close(); + cb(); + } }); server.listen(common.mustCall(function() { const port = server.address().port; From 6ff495bfde3e14e370e60912cab28687b419fddd Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Mon, 13 Mar 2017 05:25:26 -0500 Subject: [PATCH 093/485] doc: add missing changelog heading for 7.7.2 When the release was cut, the changelog heading in CHANGELOG_V7 was accidentally omitted. PR-URL: https://github.com/nodejs/node/pull/11823 Fixes: https://github.com/nodejs/node/issues/11822 Reviewed-By: Gibson Fahnestock Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- doc/changelogs/CHANGELOG_V7.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelogs/CHANGELOG_V7.md b/doc/changelogs/CHANGELOG_V7.md index 53c6b345ba4cfe..ff76e64a2c9d90 100644 --- a/doc/changelogs/CHANGELOG_V7.md +++ b/doc/changelogs/CHANGELOG_V7.md @@ -6,6 +6,7 @@ +7.7.2
7.7.1
7.7.0
7.6.0
From d3418b13190d142112270dcacf33d5542170729d Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Fri, 10 Mar 2017 12:07:15 +0200 Subject: [PATCH 094/485] doc: fix stylistic issues in api/net.md * Change var to const in an example of server creation. * Add missing semicolons. * Use `console` syntax highlighting in `telnet` and `nc` invocation examples and add shell prompt symbols to be consistent with the rest of the documentation. PR-URL: https://github.com/nodejs/node/pull/11786 Reviewed-By: Luigi Pinca Reviewed-By: Joyee Cheung Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- doc/api/net.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/api/net.md b/doc/api/net.md index d20e6bf767e047..f1df6911859d32 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -40,7 +40,7 @@ double-backslashes, such as: ```js net.createServer().listen( - path.join('\\\\?\\pipe', process.cwd(), 'myctl')) + path.join('\\\\?\\pipe', process.cwd(), 'myctl')); ``` ## Class: net.Server @@ -107,7 +107,7 @@ Returns an object with `port`, `family`, and `address` properties: Example: ```js -var server = net.createServer((socket) => { +const server = net.createServer((socket) => { socket.end('goodbye\n'); }).on('error', (err) => { // handle errors here @@ -758,7 +758,7 @@ socket.setTimeout(3000); socket.on('timeout', () => { console.log('socket timeout'); socket.end(); -}) +}); ``` If `timeout` is 0, then the existing idle timeout is disabled. @@ -997,8 +997,8 @@ server.listen(8124, () => { Test this by using `telnet`: -```sh -telnet localhost 8124 +```console +$ telnet localhost 8124 ``` To listen on the socket `/tmp/echo.sock` the third line from the last would @@ -1012,8 +1012,8 @@ server.listen('/tmp/echo.sock', () => { Use `nc` to connect to a UNIX domain socket server: -```js -nc -U /tmp/echo.sock +```console +$ nc -U /tmp/echo.sock ``` ## net.isIP(input) From 879d6663eafdfd6e07111e7a38652cadbb1d17bd Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Tue, 14 Mar 2017 18:51:36 +0100 Subject: [PATCH 095/485] net: remove an unused internal module `assertPort` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A module `assertPort` in `lib/internal/net.js` is not used anymore. Refs: https://github.com/nodejs/node/pull/11667 PR-URL: https://github.com/nodejs/node/pull/11812 Reviewed-By: James M Snell Reviewed-By: Evan Lucas Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig Reviewed-By: Joyee Cheung --- lib/internal/net.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/internal/net.js b/lib/internal/net.js index 8f279cad1608f5..ce8f549bdfa613 100644 --- a/lib/internal/net.js +++ b/lib/internal/net.js @@ -9,13 +9,6 @@ function isLegalPort(port) { return +port === (+port >>> 0) && port <= 0xFFFF; } - -function assertPort(port) { - if (typeof port !== 'undefined' && !isLegalPort(port)) - throw new RangeError('"port" argument must be >= 0 and < 65536'); -} - module.exports = { - isLegalPort, - assertPort + isLegalPort }; From 92bcc13be00ef73c4989f1c8ad92c0f4a4c0b911 Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Tue, 14 Mar 2017 20:43:39 +0100 Subject: [PATCH 096/485] test: test resolveObject with an empty path Add a case to test an URL object that has no path at all for `url.resolveObject`. PR-URL: https://github.com/nodejs/node/pull/11811 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Yuta Hiroto Reviewed-By: Joyee Cheung --- test/parallel/test-url-relative.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-url-relative.js b/test/parallel/test-url-relative.js index aff0eb76f8878a..cf379e591d6088 100644 --- a/test/parallel/test-url-relative.js +++ b/test/parallel/test-url-relative.js @@ -368,6 +368,9 @@ const relativeTests2 = [ ['https://example.com/foo', 'https://user:password@example.com', 'https://user:password@example.com/foo'], + + // No path at all + ['#hash1', '#hash2', '#hash1'] ]; relativeTests2.forEach(function(relativeTest) { const a = url.resolve(relativeTest[1], relativeTest[0]); From d77a7588cf4f356955e85d91e638a01120195e6b Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Fri, 3 Feb 2017 17:34:47 -0800 Subject: [PATCH 097/485] url: spec-compliant URLSearchParams serializer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/11626 Reviewed-By: Joyee Cheung Reviewed-By: Michaël Zasso Reviewed-By: James M Snell Reviewed-By: Daijiro Wachi --- ...cy-vs-whatwg-url-searchparams-serialize.js | 2 +- lib/internal/url.js | 105 ++++++++++++++++-- test/fixtures/url-tests.js | 2 +- test/parallel/test-whatwg-url-constructor.js | 6 +- ...est-whatwg-url-searchparams-constructor.js | 4 +- ...est-whatwg-url-searchparams-stringifier.js | 20 ++-- test/parallel/test-whatwg-url-searchparams.js | 2 +- 7 files changed, 111 insertions(+), 30 deletions(-) diff --git a/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js b/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js index 7e56b5fba6e4f8..2b8d2c36a810b3 100644 --- a/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js +++ b/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js @@ -7,7 +7,7 @@ const inputs = require('../fixtures/url-inputs.js').searchParams; const bench = common.createBenchmark(main, { type: Object.keys(inputs), method: ['legacy', 'whatwg'], - n: [1e5] + n: [1e6] }); function useLegacy(n, input, prop) { diff --git a/lib/internal/url.js b/lib/internal/url.js index 4af9e34f91b4cb..005f5b66476752 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -1,7 +1,7 @@ 'use strict'; const util = require('util'); -const { StorageObject } = require('internal/querystring'); +const { hexTable, StorageObject } = require('internal/querystring'); const binding = process.binding('url'); const context = Symbol('context'); const cannotBeBase = Symbol('cannot-be-base'); @@ -597,18 +597,99 @@ function getParamsFromObject(obj) { return values; } -function getObjectFromParams(array) { - const obj = new StorageObject(); - for (var i = 0; i < array.length; i += 2) { - const name = array[i]; - const value = array[i + 1]; - if (obj[name]) { - obj[name].push(value); - } else { - obj[name] = [value]; +// Adapted from querystring's implementation. +// Ref: https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer +const noEscape = [ +//0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x00 - 0x0F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x10 - 0x1F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, // 0x20 - 0x2F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 0x30 - 0x3F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40 - 0x4F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 0x50 - 0x5F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 - 0x6F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 0x70 - 0x7F +]; + +// Special version of hexTable that uses `+` for U+0020 SPACE. +const paramHexTable = hexTable.slice(); +paramHexTable[0x20] = '+'; + +function escapeParam(str) { + const len = str.length; + if (len === 0) + return ''; + + var out = ''; + var lastPos = 0; + + for (var i = 0; i < len; i++) { + var c = str.charCodeAt(i); + + // ASCII + if (c < 0x80) { + if (noEscape[c] === 1) + continue; + if (lastPos < i) + out += str.slice(lastPos, i); + lastPos = i + 1; + out += paramHexTable[c]; + continue; + } + + if (lastPos < i) + out += str.slice(lastPos, i); + + // Multi-byte characters ... + if (c < 0x800) { + lastPos = i + 1; + out += paramHexTable[0xC0 | (c >> 6)] + + paramHexTable[0x80 | (c & 0x3F)]; + continue; + } + if (c < 0xD800 || c >= 0xE000) { + lastPos = i + 1; + out += paramHexTable[0xE0 | (c >> 12)] + + paramHexTable[0x80 | ((c >> 6) & 0x3F)] + + paramHexTable[0x80 | (c & 0x3F)]; + continue; } + // Surrogate pair + ++i; + var c2; + if (i < len) + c2 = str.charCodeAt(i) & 0x3FF; + else { + // This branch should never happen because all URLSearchParams entries + // should already be converted to USVString. But, included for + // completion's sake anyway. + c2 = 0; + } + lastPos = i + 1; + c = 0x10000 + (((c & 0x3FF) << 10) | c2); + out += paramHexTable[0xF0 | (c >> 18)] + + paramHexTable[0x80 | ((c >> 12) & 0x3F)] + + paramHexTable[0x80 | ((c >> 6) & 0x3F)] + + paramHexTable[0x80 | (c & 0x3F)]; } - return obj; + if (lastPos === 0) + return str; + if (lastPos < len) + return out + str.slice(lastPos); + return out; +} + +// application/x-www-form-urlencoded serializer +// Ref: https://url.spec.whatwg.org/#concept-urlencoded-serializer +function serializeParams(array) { + const len = array.length; + if (len === 0) + return ''; + + var output = `${escapeParam(array[0])}=${escapeParam(array[1])}`; + for (var i = 2; i < len; i += 2) + output += `&${escapeParam(array[i])}=${escapeParam(array[i + 1])}`; + return output; } // Mainly to mitigate func-name-matching ESLint rule @@ -993,7 +1074,7 @@ defineIDLClass(URLSearchParams.prototype, 'URLSearchParams', { throw new TypeError('Value of `this` is not a URLSearchParams'); } - return querystring.stringify(getObjectFromParams(this[searchParams])); + return serializeParams(this[searchParams]); } }); diff --git a/test/fixtures/url-tests.js b/test/fixtures/url-tests.js index 0e510eb366d0f2..a4e7de9f26b199 100644 --- a/test/fixtures/url-tests.js +++ b/test/fixtures/url-tests.js @@ -4639,7 +4639,7 @@ module.exports = "port": "", "pathname": "/foo/bar", "search": "??a=b&c=d", - // "searchParams": "%3Fa=b&c=d", + "searchParams": "%3Fa=b&c=d", "hash": "" }, "# Scheme only", diff --git a/test/parallel/test-whatwg-url-constructor.js b/test/parallel/test-whatwg-url-constructor.js index c5d70b3f4c1544..c2773b9af105fb 100644 --- a/test/parallel/test-whatwg-url-constructor.js +++ b/test/parallel/test-whatwg-url-constructor.js @@ -120,12 +120,12 @@ function runURLSearchParamTests() { // And in the other direction, altering searchParams propagates // back to 'search'. searchParams.append('i', ' j ') - // assert_equals(url.search, '?e=f&g=h&i=+j+') - // assert_equals(url.searchParams.toString(), 'e=f&g=h&i=+j+') + assert_equals(url.search, '?e=f&g=h&i=+j+') + assert_equals(url.searchParams.toString(), 'e=f&g=h&i=+j+') assert_equals(searchParams.get('i'), ' j ') searchParams.set('e', 'updated') - // assert_equals(url.search, '?e=updated&g=h&i=+j+') + assert_equals(url.search, '?e=updated&g=h&i=+j+') assert_equals(searchParams.get('e'), 'updated') var url2 = bURL('http://example.org/file??a=b&c=d') diff --git a/test/parallel/test-whatwg-url-searchparams-constructor.js b/test/parallel/test-whatwg-url-searchparams-constructor.js index 236d01396095f1..da459fe99c7fb8 100644 --- a/test/parallel/test-whatwg-url-searchparams-constructor.js +++ b/test/parallel/test-whatwg-url-searchparams-constructor.js @@ -11,7 +11,7 @@ const { /* eslint-disable */ var params; // Strict mode fix for WPT. /* WPT Refs: - https://github.com/w3c/web-platform-tests/blob/405394a/url/urlsearchparams-constructor.html + https://github.com/w3c/web-platform-tests/blob/e94c604916/url/urlsearchparams-constructor.html License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html */ test(function() { @@ -154,7 +154,7 @@ test(function() { }, "Constructor with sequence of sequences of strings"); [ -// { "input": {"+": "%C2"}, "output": [[" ", "\uFFFD"]], "name": "object with +" }, + { "input": {"+": "%C2"}, "output": [["+", "%C2"]], "name": "object with +" }, { "input": {c: "x", a: "?"}, "output": [["c", "x"], ["a", "?"]], "name": "object with two keys" }, { "input": [["c", "x"], ["a", "?"]], "output": [["c", "x"], ["a", "?"]], "name": "array with two keys" } ].forEach((val) => { diff --git a/test/parallel/test-whatwg-url-searchparams-stringifier.js b/test/parallel/test-whatwg-url-searchparams-stringifier.js index 5f751b1c503d5b..ac09979e027b7c 100644 --- a/test/parallel/test-whatwg-url-searchparams-stringifier.js +++ b/test/parallel/test-whatwg-url-searchparams-stringifier.js @@ -10,14 +10,14 @@ const { test, assert_equals } = common.WPT; https://github.com/w3c/web-platform-tests/blob/8791bed/url/urlsearchparams-stringifier.html License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html */ -// test(function() { -// var params = new URLSearchParams(); -// params.append('a', 'b c'); -// assert_equals(params + '', 'a=b+c'); -// params.delete('a'); -// params.append('a b', 'c'); -// assert_equals(params + '', 'a+b=c'); -// }, 'Serialize space'); +test(function() { + var params = new URLSearchParams(); + params.append('a', 'b c'); + assert_equals(params + '', 'a=b+c'); + params.delete('a'); + params.append('a b', 'c'); + assert_equals(params + '', 'a+b=c'); +}, 'Serialize space'); test(function() { var params = new URLSearchParams(); @@ -114,8 +114,8 @@ test(function() { var params; params = new URLSearchParams('a=b&c=d&&e&&'); assert_equals(params.toString(), 'a=b&c=d&e='); - // params = new URLSearchParams('a = b &a=b&c=d%20'); - // assert_equals(params.toString(), 'a+=+b+&a=b&c=d+'); + params = new URLSearchParams('a = b &a=b&c=d%20'); + assert_equals(params.toString(), 'a+=+b+&a=b&c=d+'); // The lone '=' _does_ survive the roundtrip. params = new URLSearchParams('a=&a=b'); assert_equals(params.toString(), 'a=&a=b'); diff --git a/test/parallel/test-whatwg-url-searchparams.js b/test/parallel/test-whatwg-url-searchparams.js index e0d1826596704c..7d6df646407269 100644 --- a/test/parallel/test-whatwg-url-searchparams.js +++ b/test/parallel/test-whatwg-url-searchparams.js @@ -7,7 +7,7 @@ const URL = require('url').URL; // Tests below are not from WPT. const serialized = 'a=a&a=1&a=true&a=undefined&a=null&a=%EF%BF%BD' + '&a=%EF%BF%BD&a=%F0%9F%98%80&a=%EF%BF%BD%EF%BF%BD' + - '&a=%5Bobject%20Object%5D'; + '&a=%5Bobject+Object%5D'; const values = ['a', 1, true, undefined, null, '\uD83D', '\uDE00', '\uD83D\uDE00', '\uDE00\uD83D', {}]; const normalizedValues = ['a', '1', 'true', 'undefined', 'null', '\uFFFD', From 39d9afe279e9d66f983bc06294cb38243e54d637 Mon Sep 17 00:00:00 2001 From: Blake Embrey Date: Fri, 13 Nov 2015 16:40:08 -0800 Subject: [PATCH 098/485] repl: refactor `LineParser` implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the core logic from `LineParser` should fail handling into the recoverable error check for the REPL default eval. PR-URL: https://github.com/nodejs/node/pull/6171 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso --- lib/repl.js | 262 +++++++++++++++---------------------- test/parallel/test-repl.js | 9 +- 2 files changed, 114 insertions(+), 157 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index b00666267a646b..e4364e7d11cc42 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -99,105 +99,6 @@ exports.writer = util.inspect; exports._builtinLibs = internalModule.builtinLibs; -class LineParser { - - constructor() { - this.reset(); - } - - reset() { - this._literal = null; - this.shouldFail = false; - this.blockComment = false; - this.regExpLiteral = false; - this.prevTokenChar = null; - } - - parseLine(line) { - var previous = null; - this.shouldFail = false; - const wasWithinStrLiteral = this._literal !== null; - - for (const current of line) { - if (previous === '\\') { - // valid escaping, skip processing. previous doesn't matter anymore - previous = null; - continue; - } - - if (!this._literal) { - if (this.regExpLiteral && current === '/') { - this.regExpLiteral = false; - previous = null; - continue; - } - if (previous === '*' && current === '/') { - if (this.blockComment) { - this.blockComment = false; - previous = null; - continue; - } else { - this.shouldFail = true; - break; - } - } - - // ignore rest of the line if `current` and `previous` are `/`s - if (previous === current && previous === '/' && !this.blockComment) { - break; - } - - if (previous === '/') { - if (current === '*') { - this.blockComment = true; - } else if ( - // Distinguish between a division operator and the start of a regex - // by examining the non-whitespace character that precedes the / - [null, '(', '[', '{', '}', ';'].includes(this.prevTokenChar) - ) { - this.regExpLiteral = true; - } - previous = null; - } - } - - if (this.blockComment || this.regExpLiteral) continue; - - if (current === this._literal) { - this._literal = null; - } else if (current === '\'' || current === '"') { - this._literal = this._literal || current; - } - - if (current.trim() && current !== '/') this.prevTokenChar = current; - - previous = current; - } - - const isWithinStrLiteral = this._literal !== null; - - if (!wasWithinStrLiteral && !isWithinStrLiteral) { - // Current line has nothing to do with String literals, trim both ends - line = line.trim(); - } else if (wasWithinStrLiteral && !isWithinStrLiteral) { - // was part of a string literal, but it is over now, trim only the end - line = line.trimRight(); - } else if (isWithinStrLiteral && !wasWithinStrLiteral) { - // was not part of a string literal, but it is now, trim only the start - line = line.trimLeft(); - } - - const lastChar = line.charAt(line.length - 1); - - this.shouldFail = this.shouldFail || - ((!this._literal && lastChar === '\\') || - (this._literal && lastChar !== '\\')); - - return line; - } -} - - function REPLServer(prompt, stream, eval_, @@ -249,8 +150,6 @@ function REPLServer(prompt, self.breakEvalOnSigint = !!breakEvalOnSigint; self.editorMode = false; - self._inTemplateLiteral = false; - // just for backwards compat, see github.com/joyent/node/pull/7127 self.rli = this; @@ -262,29 +161,20 @@ function REPLServer(prompt, eval_ = eval_ || defaultEval; - function preprocess(code) { - let cmd = code; - if (/^\s*\{/.test(cmd) && /\}\s*$/.test(cmd)) { + function defaultEval(code, context, file, cb) { + var err, result, script, wrappedErr; + var wrappedCmd = false; + var input = code; + + if (/^\s*\{/.test(code) && /\}\s*$/.test(code)) { // It's confusing for `{ a : 1 }` to be interpreted as a block // statement rather than an object literal. So, we first try // to wrap it in parentheses, so that it will be interpreted as // an expression. - cmd = `(${cmd})`; - self.wrappedCmd = true; + code = `(${code.trim()})\n`; + wrappedCmd = true; } - // Append a \n so that it will be either - // terminated, or continued onto the next expression if it's an - // unexpected end of input. - return `${cmd}\n`; - } - function defaultEval(code, context, file, cb) { - // Remove trailing new line - code = code.replace(/\n$/, ''); - code = preprocess(code); - - var input = code; - var err, result, wrappedErr; // first, create the Script object to check the syntax if (code === '\n') @@ -298,22 +188,22 @@ function REPLServer(prompt, // value for statements and declarations that don't return a value. code = `'use strict'; void 0;\n${code}`; } - var script = vm.createScript(code, { + script = vm.createScript(code, { filename: file, displayErrors: true }); } catch (e) { debug('parse error %j', code, e); - if (self.wrappedCmd) { - self.wrappedCmd = false; + if (wrappedCmd) { + wrappedCmd = false; // unwrap and try again - code = `${input.substring(1, input.length - 2)}\n`; + code = input; wrappedErr = e; continue; } // preserve original error for wrapped command const error = wrappedErr || e; - if (isRecoverableError(error, self)) + if (isRecoverableError(error, code)) err = new Recoverable(error); else err = error; @@ -400,7 +290,6 @@ function REPLServer(prompt, (_, pre, line) => pre + (line - 1)); } top.outputStream.write((e.stack || e) + '\n'); - top.lineParser.reset(); top.bufferedCommand = ''; top.lines.level = []; top.displayPrompt(); @@ -427,7 +316,6 @@ function REPLServer(prompt, self.outputStream = output; self.resetContext(); - self.lineParser = new LineParser(); self.bufferedCommand = ''; self.lines.level = []; @@ -490,7 +378,6 @@ function REPLServer(prompt, sawSIGINT = false; } - self.lineParser.reset(); self.bufferedCommand = ''; self.lines.level = []; self.displayPrompt(); @@ -498,6 +385,7 @@ function REPLServer(prompt, self.on('line', function onLine(cmd) { debug('line %j', cmd); + cmd = cmd || ''; sawSIGINT = false; if (self.editorMode) { @@ -515,23 +403,28 @@ function REPLServer(prompt, return; } - // leading whitespaces in template literals should not be trimmed. - if (self._inTemplateLiteral) { - self._inTemplateLiteral = false; - } else { - cmd = self.lineParser.parseLine(cmd); - } + // Check REPL keywords and empty lines against a trimmed line input. + const trimmedCmd = cmd.trim(); // Check to see if a REPL keyword was used. If it returns true, // display next prompt and return. - if (cmd && cmd.charAt(0) === '.' && isNaN(parseFloat(cmd))) { - var matches = cmd.match(/^\.([^\s]+)\s*(.*)$/); - var keyword = matches && matches[1]; - var rest = matches && matches[2]; - if (self.parseREPLKeyword(keyword, rest) === true) { - return; - } else if (!self.bufferedCommand) { - self.outputStream.write('Invalid REPL keyword\n'); + if (trimmedCmd) { + if (trimmedCmd.charAt(0) === '.' && isNaN(parseFloat(trimmedCmd))) { + const matches = trimmedCmd.match(/^\.([^\s]+)\s*(.*)$/); + const keyword = matches && matches[1]; + const rest = matches && matches[2]; + if (self.parseREPLKeyword(keyword, rest) === true) { + return; + } + if (!self.bufferedCommand) { + self.outputStream.write('Invalid REPL keyword\n'); + finish(null); + return; + } + } + } else { + // Print a new line when hitting enter. + if (!self.bufferedCommand) { finish(null); return; } @@ -546,12 +439,10 @@ function REPLServer(prompt, debug('finish', e, ret); self.memory(cmd); - self.wrappedCmd = false; if (e && !self.bufferedCommand && cmd.trim().startsWith('npm ')) { self.outputStream.write('npm should be run outside of the ' + 'node repl, in your normal shell.\n' + '(Press Control-D to exit.)\n'); - self.lineParser.reset(); self.bufferedCommand = ''; self.displayPrompt(); return; @@ -559,8 +450,7 @@ function REPLServer(prompt, // If error was SyntaxError and not JSON.parse error if (e) { - if (e instanceof Recoverable && !self.lineParser.shouldFail && - !sawCtrlD) { + if (e instanceof Recoverable && !sawCtrlD) { // Start buffering data like that: // { // ... x: 1 @@ -574,7 +464,6 @@ function REPLServer(prompt, } // Clear buffer if no SyntaxErrors - self.lineParser.reset(); self.bufferedCommand = ''; sawCtrlD = false; @@ -1234,7 +1123,6 @@ function defineDefaultCommands(repl) { repl.defineCommand('break', { help: 'Sometimes you get stuck, this gets you out', action: function() { - this.lineParser.reset(); this.bufferedCommand = ''; this.displayPrompt(); } @@ -1249,7 +1137,6 @@ function defineDefaultCommands(repl) { repl.defineCommand('clear', { help: clearMessage, action: function() { - this.lineParser.reset(); this.bufferedCommand = ''; if (!this.useGlobal) { this.outputStream.write('Clearing context...\n'); @@ -1370,20 +1257,13 @@ REPLServer.prototype.convertToContext = util.deprecate(function(cmd) { return cmd; }, 'replServer.convertToContext() is deprecated', 'DEP0024'); -function bailOnIllegalToken(parser) { - return parser._literal === null && - !parser.blockComment && - !parser.regExpLiteral; -} - // If the error is that we've unexpectedly ended the input, // then let the user try to recover by adding more input. -function isRecoverableError(e, self) { +function isRecoverableError(e, code) { if (e && e.name === 'SyntaxError') { var message = e.message; if (message === 'Unterminated template literal' || message === 'Missing } in template expression') { - self._inTemplateLiteral = true; return true; } @@ -1393,11 +1273,81 @@ function isRecoverableError(e, self) { return true; if (message === 'Invalid or unexpected token') - return !bailOnIllegalToken(self.lineParser); + return isCodeRecoverable(code); } return false; } +// Check whether a code snippet should be forced to fail in the REPL. +function isCodeRecoverable(code) { + var current, previous, stringLiteral; + var isBlockComment = false; + var isSingleComment = false; + var isRegExpLiteral = false; + var lastChar = code.charAt(code.length - 2); + var prevTokenChar = null; + + for (var i = 0; i < code.length; i++) { + previous = current; + current = code[i]; + + if (previous === '\\' && (stringLiteral || isRegExpLiteral)) { + current = null; + continue; + } + + if (stringLiteral) { + if (stringLiteral === current) { + stringLiteral = null; + } + continue; + } else { + if (isRegExpLiteral && current === '/') { + isRegExpLiteral = false; + continue; + } + + if (isBlockComment && previous === '*' && current === '/') { + isBlockComment = false; + continue; + } + + if (isSingleComment && current === '\n') { + isSingleComment = false; + continue; + } + + if (isBlockComment || isRegExpLiteral || isSingleComment) continue; + + if (current === '/' && previous === '/') { + isSingleComment = true; + continue; + } + + if (previous === '/') { + if (current === '*') { + isBlockComment = true; + } else if ( + // Distinguish between a division operator and the start of a regex + // by examining the non-whitespace character that precedes the / + [null, '(', '[', '{', '}', ';'].includes(prevTokenChar) + ) { + isRegExpLiteral = true; + } + continue; + } + + if (current.trim()) prevTokenChar = current; + } + + if (current === '\'' || current === '"') { + stringLiteral = current; + } + } + + return stringLiteral ? lastChar === '\\' : isBlockComment; +} + function Recoverable(err) { this.err = err; } diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 7e426eb54ee51c..b6de19856985ed 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -407,7 +407,14 @@ function error_test() { { client: client_unix, send: '(function() {\nif (false) {} /bar"/;\n}())', expect: prompt_multiline + prompt_multiline + 'undefined\n' + prompt_unix - } + }, + + // Newline within template string maintains whitespace. + { client: client_unix, send: '`foo \n`', + expect: prompt_multiline + '\'foo \\n\'\n' + prompt_unix }, + // Whitespace is not evaluated. + { client: client_unix, send: ' \t \n', + expect: prompt_unix } ]); } From c9bc3e50edf192aac7a051c1dd585d9df5c43c79 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sat, 4 Mar 2017 18:54:48 +0800 Subject: [PATCH 099/485] test: fail when child dies in fork-net Previously when the child dies with errors in this test, the parent will just hang and timeout, the errors in the child would be swallowed. This makes it fail so at least there is more information about why this test fails. Also removes the unnecessary child.kill() call. PR-URL: https://github.com/nodejs/node/pull/11684 Ref: https://github.com/nodejs/node/pull/11667 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-child-process-fork-net.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-child-process-fork-net.js b/test/parallel/test-child-process-fork-net.js index 1dec70aca8c3c1..42994007e83c49 100644 --- a/test/parallel/test-child-process-fork-net.js +++ b/test/parallel/test-child-process-fork-net.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const fork = require('child_process').fork; const net = require('net'); @@ -81,9 +81,10 @@ if (process.argv[2] === 'child') { const child = fork(process.argv[1], ['child']); - child.on('exit', function() { - console.log('CHILD: died'); - }); + child.on('exit', common.mustCall(function(code, signal) { + const message = `CHILD: died with ${code}, ${signal}`; + assert.strictEqual(code, 0, message); + })); // send net.Server to child and test by connecting const testServer = function(callback) { @@ -192,7 +193,6 @@ if (process.argv[2] === 'child') { testSocket(function() { socketSuccess = true; - child.kill(); }); }); From bc26c62524c0522d6a4d03d33032e32984b39a25 Mon Sep 17 00:00:00 2001 From: "Italo A. Casas" Date: Tue, 14 Mar 2017 10:38:22 -0400 Subject: [PATCH 100/485] 2017-03-14, Version 7.7.3 (Current) Notable changes: * module: The [module loading global fallback] (https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_loading_from_the_global_folders) to the Node executable's directory now works correctly on Windows. (Richard Lau) [#9283](https://github.com/nodejs/node/pull/9283) * net: `Socket.prototype.connect` now once again functions without a callback. (Juwan Yoo) [#11762](https://github.com/nodejs/node/pull/11762) * url: `URL.prototype.origin` now properly specified an opaque return of `'null'` for `file://` URLs. (Brian White) [#11691](https://github.com/nodejs/node/pull/11691) PR-URL: https://github.com/nodejs/node/pull/11831 --- CHANGELOG.md | 3 ++- doc/changelogs/CHANGELOG_V7.md | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2bab714999c46..49d686356e725b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,8 @@ release. -7.7.2
+7.7.3
+7.7.2
7.7.1
7.7.0
7.6.0
diff --git a/doc/changelogs/CHANGELOG_V7.md b/doc/changelogs/CHANGELOG_V7.md index ff76e64a2c9d90..45dda5d2edd22e 100644 --- a/doc/changelogs/CHANGELOG_V7.md +++ b/doc/changelogs/CHANGELOG_V7.md @@ -6,6 +6,7 @@ +7.7.3
7.7.2
7.7.1
7.7.0
@@ -30,6 +31,45 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + +## 2017-03-14, Version 7.7.3 (Current), @italoacasas + +### Notable changes + +* **module**: The [module loading global fallback](https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_loading_from_the_global_folders) to the Node executable's directory now works correctly on Windows. (Richard Lau) [#9283](https://github.com/nodejs/node/pull/9283) +* **net**: `Socket.prototype.connect` now once again functions without a callback. (Juwan Yoo) [#11762](https://github.com/nodejs/node/pull/11762) +* **url**: `URL.prototype.origin` now properly specified an opaque return of `'null'` for `file://` URLs. (Brian White) [#11691](https://github.com/nodejs/node/pull/11691) + +### Commits + +* [[`542a3735a7`](https://github.com/nodejs/node/commit/542a3735a7)] - **build**: add node_use_openssl check to install.py (Daniel Bevenius) [#11766](https://github.com/nodejs/node/pull/11766) +* [[`2fcefeeda0`](https://github.com/nodejs/node/commit/2fcefeeda0)] - **dgram**: refactor dgram to module.exports (Claudio Rodriguez) [#11696](https://github.com/nodejs/node/pull/11696) +* [[`dd3e6adaa7`](https://github.com/nodejs/node/commit/dd3e6adaa7)] - **doc**: add missing changelog heading for 7.7.2 (Evan Lucas) [#11823](https://github.com/nodejs/node/pull/11823) +* [[`b543fd441c`](https://github.com/nodejs/node/commit/b543fd441c)] - **doc**: update to current V8 versions (Franziska Hinkelmann) [#11787](https://github.com/nodejs/node/pull/11787) +* [[`6cc7b30c62`](https://github.com/nodejs/node/commit/6cc7b30c62)] - **doc**: improve child_process `maxBuffer` text (Rich Trott) [#11791](https://github.com/nodejs/node/pull/11791) +* [[`188cbc6eea`](https://github.com/nodejs/node/commit/188cbc6eea)] - **doc**: package main can be directory with an index (Bradley Farias) [#11581](https://github.com/nodejs/node/pull/11581) +* [[`a20aa0ee48`](https://github.com/nodejs/node/commit/a20aa0ee48)] - **doc**: http cleanup and missing argument types (Amelia Clarke) [#11681](https://github.com/nodejs/node/pull/11681) +* [[`8a1b2b4417`](https://github.com/nodejs/node/commit/8a1b2b4417)] - **doc**: reduce font size on smaller screens (Gibson Fahnestock) [#11695](https://github.com/nodejs/node/pull/11695) +* [[`5bea8b42d9`](https://github.com/nodejs/node/commit/5bea8b42d9)] - **doc**: fix occurences of "the the" (Jeroen Mandersloot) [#11711](https://github.com/nodejs/node/pull/11711) +* [[`517c3af21a`](https://github.com/nodejs/node/commit/517c3af21a)] - **doc**: fix process links to console.log/error (Sam Roberts) [#11718](https://github.com/nodejs/node/pull/11718) +* [[`108449b6ff`](https://github.com/nodejs/node/commit/108449b6ff)] - **doc**: add Franziska Hinkelmann to the CTC (Rod Vagg) [#11488](https://github.com/nodejs/node/pull/11488) +* [[`9c3cf13cbc`](https://github.com/nodejs/node/commit/9c3cf13cbc)] - **doc**: argument types for https methods (Amelia Clarke) [#11681](https://github.com/nodejs/node/pull/11681) +* [[`103458772a`](https://github.com/nodejs/node/commit/103458772a)] - **module**: fix loading from global folders on Windows (Richard Lau) [#9283](https://github.com/nodejs/node/pull/9283) +* [[`1dff218cd1`](https://github.com/nodejs/node/commit/1dff218cd1)] - **net**: allow missing callback for Socket.connect (Juwan Yoo) [#11762](https://github.com/nodejs/node/pull/11762) +* [[`52f0092f54`](https://github.com/nodejs/node/commit/52f0092f54)] - **s390**: enable march=z196 (Junliang Yan) [#11730](https://github.com/nodejs/node/pull/11730) +* [[`032becdc28`](https://github.com/nodejs/node/commit/032becdc28)] - **src**: add missing #include \ (Steven R. Loomis) [#11754](https://github.com/nodejs/node/issues/11754) +* [[`1da2afcc26`](https://github.com/nodejs/node/commit/1da2afcc26)] - **src**: drop the NODE_ISOLATE_SLOT macro (Anna Henningsen) [#11692](https://github.com/nodejs/node/pull/11692) +* [[`734ddbe77b`](https://github.com/nodejs/node/commit/734ddbe77b)] - **test**: fix flaky test-http-set-timeout-server (Santiago Gimeno) [#11790](https://github.com/nodejs/node/pull/11790) +* [[`aaf8536dbc`](https://github.com/nodejs/node/commit/aaf8536dbc)] - **test**: add test for loading from global folders (Richard Lau) [#9283](https://github.com/nodejs/node/pull/9283) +* [[`c01c7a490a`](https://github.com/nodejs/node/commit/c01c7a490a)] - **test**: add script to create 0-dns-cert.pem (Shigeki Ohtsu) [#11579](https://github.com/nodejs/node/pull/11579) +* [[`4477e15217`](https://github.com/nodejs/node/commit/4477e15217)] - **test**: add regex in test_cyclic_link_protection (Clarence Dimitri CHARLES) [#11622](https://github.com/nodejs/node/pull/11622) +* [[`3d55cf06b1`](https://github.com/nodejs/node/commit/3d55cf06b1)] - **test**: add more WHATWG URL origin tests (Brian White) [#11691](https://github.com/nodejs/node/pull/11691) +* [[`a98d963082`](https://github.com/nodejs/node/commit/a98d963082)] - **test**: increase coverage of console (DavidCai) [#11653](https://github.com/nodejs/node/pull/11653) +* [[`1af0fa4b84`](https://github.com/nodejs/node/commit/1af0fa4b84)] - **test**: test buffer behavior when zeroFill undefined (Rich Trott) [#11706](https://github.com/nodejs/node/pull/11706) +* [[`1e52ba3b3d`](https://github.com/nodejs/node/commit/1e52ba3b3d)] - **test**: limit lint rule disabling in message test (Rich Trott) [#11724](https://github.com/nodejs/node/pull/11724) +* [[`5e7baa5a72`](https://github.com/nodejs/node/commit/5e7baa5a72)] - **tools**: add links to the stability index reference (Michael Cox) [#11664](https://github.com/nodejs/node/pull/11664) +* [[`c5874d1bd4`](https://github.com/nodejs/node/commit/c5874d1bd4)] - **url**: remove invalid file protocol check (Brian White) [#11691](https://github.com/nodejs/node/pull/11691) + ## 2017-03-08, Version 7.7.2 (Current), @evanlucas From 22819446123efb68313f2ae385e57d1e780f6b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Kraj=C4=8Dovi=C4=8D?= Date: Sun, 12 Mar 2017 16:09:32 +0100 Subject: [PATCH 101/485] test: add regex to assert.throws Make sure test matches this specific error message. PR-URL: https://github.com/nodejs/node/pull/11815 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Yuta Hiroto Reviewed-By: James M Snell --- test/parallel/test-vm-run-in-new-context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-vm-run-in-new-context.js b/test/parallel/test-vm-run-in-new-context.js index 04bc3bf4a1e02a..0da73ea6a90726 100644 --- a/test/parallel/test-vm-run-in-new-context.js +++ b/test/parallel/test-vm-run-in-new-context.js @@ -38,7 +38,7 @@ assert.strictEqual('passed', result); console.error('thrown error'); assert.throws(function() { vm.runInNewContext('throw new Error(\'test\');'); -}); +}, /^Error: test$/); global.hello = 5; vm.runInNewContext('hello = 2'); From e494e427c93a55d8f716e9d771324bc5837c79a8 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 12 Mar 2017 13:11:13 +0200 Subject: [PATCH 102/485] doc: var -> let / const in events.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/11810 Reviewed-By: Luigi Pinca Reviewed-By: Michaël Zasso Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock Reviewed-By: James M Snell --- doc/api/events.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index 5f12cfe3191837..0cc9a0206b55c3 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -98,7 +98,7 @@ listener will be invoked _every time_ the named event is emitted. ```js const myEmitter = new MyEmitter(); -var m = 0; +let m = 0; myEmitter.on('event', () => { console.log(++m); }); @@ -114,7 +114,7 @@ the listener is unregistered and *then* called. ```js const myEmitter = new MyEmitter(); -var m = 0; +let m = 0; myEmitter.once('event', () => { console.log(++m); }); @@ -502,7 +502,7 @@ Removes the specified `listener` from the listener array for the event named `eventName`. ```js -var callback = (stream) => { +const callback = (stream) => { console.log('someone connected!'); }; server.on('connection', callback); @@ -524,12 +524,12 @@ events will behave as expected. ```js const myEmitter = new MyEmitter(); -var callbackA = () => { +const callbackA = () => { console.log('A'); myEmitter.removeListener('event', callbackB); }; -var callbackB = () => { +const callbackB = () => { console.log('B'); }; From 4d52d12fd1254cc2c9edd8ebfbc2fce5571d9be7 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 12 Mar 2017 13:14:00 +0200 Subject: [PATCH 103/485] doc: console.log() -> console.error() in events.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/11810 Reviewed-By: Luigi Pinca Reviewed-By: Michaël Zasso Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock Reviewed-By: James M Snell --- doc/api/events.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index 0cc9a0206b55c3..7c72245ced6ca5 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -148,7 +148,7 @@ can be used. (_Note, however, that the `domain` module has been deprecated_) const myEmitter = new MyEmitter(); process.on('uncaughtException', (err) => { - console.log('whoops! there was an error'); + console.error('whoops! there was an error'); }); myEmitter.emit('error', new Error('whoops!')); @@ -160,7 +160,7 @@ As a best practice, listeners should always be added for the `'error'` events. ```js const myEmitter = new MyEmitter(); myEmitter.on('error', (err) => { - console.log('whoops! there was an error'); + console.error('whoops! there was an error'); }); myEmitter.emit('error', new Error('whoops!')); // Prints: whoops! there was an error From 8b03221b281042d84e4b946c157eb168a49f7a87 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 11 Mar 2017 23:26:50 +0300 Subject: [PATCH 104/485] doc: correct comment error in stream.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix comment about remove listener (not setting) PR-URL: https://github.com/nodejs/node/pull/11804 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: Brian White --- doc/api/stream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index c48dfe050808ee..75cba6fd514bd2 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1016,7 +1016,7 @@ function parseHeader(stream, callback) { const remaining = split.join('\n\n'); const buf = Buffer.from(remaining, 'utf8'); stream.removeListener('error', callback); - // set the readable listener before unshifting + // remove the readable listener before unshifting stream.removeListener('readable', onReadable); if (buf.length) stream.unshift(buf); From 38ba0c25d474b76b2132abd8a83c0e6248cf720d Mon Sep 17 00:00:00 2001 From: Amelia Clarke Date: Sat, 11 Mar 2017 00:15:20 -0800 Subject: [PATCH 105/485] doc: missing argument types for events methods Refs: https://github.com/nodejs/node/issues/9399 PR-URL: https://github.com/nodejs/node/pull/11802 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Brian White --- doc/api/events.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index 7c72245ced6ca5..5c0614b68bf2df 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -185,7 +185,7 @@ added and `'removeListener'` when existing listeners are removed. added: v0.1.26 --> -* `eventName` {string|symbol} The name of the event being listened for +* `eventName` {any} The name of the event being listened for * `listener` {Function} The event handler function The `EventEmitter` instance will emit its own `'newListener'` event *before* @@ -229,7 +229,7 @@ changes: now yields the original listener function. --> -* `eventName` {string|symbol} The event name +* `eventName` {any} The event name * `listener` {Function} The event handler function The `'removeListener'` event is emitted *after* the `listener` is removed. @@ -296,6 +296,8 @@ Its `name` property is set to `'MaxListenersExceededWarning'`. +- `eventName` {any} +- `listener` {Function} Alias for `emitter.on(eventName, listener)`. @@ -303,6 +305,8 @@ Alias for `emitter.on(eventName, listener)`. +- `eventName` {any} +- `...args` {any} Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments @@ -345,7 +349,7 @@ set by [`emitter.setMaxListeners(n)`][] or defaults to added: v3.2.0 --> -* `eventName` {string|symbol} The name of the event being listened for +* `eventName` {any} The name of the event being listened for Returns the number of listeners listening to the event named `eventName`. @@ -358,6 +362,7 @@ changes: description: For listeners attached using `.once()` this returns the original listeners instead of wrapper functions now. --> +- `eventName` {any} Returns a copy of the array of listeners for the event named `eventName`. @@ -374,7 +379,7 @@ console.log(util.inspect(server.listeners('connection'))); added: v0.1.101 --> -* `eventName` {string|symbol} The name of the event. +* `eventName` {any} The name of the event. * `listener` {Function} The callback function Adds the `listener` function to the end of the listeners array for the @@ -410,7 +415,7 @@ myEE.emit('foo'); added: v0.3.0 --> -* `eventName` {string|symbol} The name of the event. +* `eventName` {any} The name of the event. * `listener` {Function} The callback function Adds a **one time** `listener` function for the event named `eventName`. The @@ -443,7 +448,7 @@ myEE.emit('foo'); added: v6.0.0 --> -* `eventName` {string|symbol} The name of the event. +* `eventName` {any} The name of the event. * `listener` {Function} The callback function Adds the `listener` function to the *beginning* of the listeners array for the @@ -465,7 +470,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained. added: v6.0.0 --> -* `eventName` {string|symbol} The name of the event. +* `eventName` {any} The name of the event. * `listener` {Function} The callback function Adds a **one time** `listener` function for the event named `eventName` to the @@ -484,6 +489,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained. +- `eventName` {any} Removes all listeners, or those of the specified `eventName`. @@ -497,6 +503,8 @@ Returns a reference to the `EventEmitter`, so that calls can be chained. +- `eventName` {any} +- `listener` {Function} Removes the specified `listener` from the listener array for the event named `eventName`. @@ -564,6 +572,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained. +- `n` {integer} By default EventEmitters will print a warning if more than `10` listeners are added for a particular event. This is a useful default that helps finding From 73e2d0bce61410a86ab7dacf180562fcea92f69c Mon Sep 17 00:00:00 2001 From: Amelia Clarke Date: Fri, 10 Mar 2017 22:30:48 -0800 Subject: [PATCH 106/485] doc: argument types for crypto methods Refs: https://github.com/nodejs/node/issues/9399 PR-URL: https://github.com/nodejs/node/pull/11799 Reviewed-By: James M Snell Reviewed-By: Joyee Cheung --- doc/api/crypto.md | 219 +++++++++++++++++++++++++++++++--------------- 1 file changed, 147 insertions(+), 72 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index e901edf5fd3615..9557273a9b7b5a 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -62,11 +62,9 @@ const cert2 = crypto.Certificate(); - -The `spkac` data structure includes a public key and a challenge. The -`certificate.exportChallenge()` returns the challenge component in the -form of a Node.js [`Buffer`][]. The `spkac` argument can be either a string -or a [`Buffer`][]. +- `spkac` {string | Buffer} +- Returns {Buffer} The challenge component of the `spkac` data structure, which +includes a public key and a challenge. ```js const cert = require('crypto').Certificate(); @@ -80,11 +78,9 @@ console.log(challenge.toString('utf8')); - -The `spkac` data structure includes a public key and a challenge. The -`certificate.exportPublicKey()` returns the public key component in the -form of a Node.js [`Buffer`][]. The `spkac` argument can be either a string -or a [`Buffer`][]. +- `spkac` {string | Buffer} +- Returns {Buffer} The public key component of the `spkac` data structure, +which includes a public key and a challenge. ```js const cert = require('crypto').Certificate(); @@ -98,9 +94,9 @@ console.log(publicKey); - -Returns `true` if the given `spkac` data structure is valid, `false` otherwise. -The `spkac` argument must be a Node.js [`Buffer`][]. +- `spkac` {Buffer} +- Returns {boolean} `true` if the given `spkac` data structure is valid, `false` +otherwise. ```js const cert = require('crypto').Certificate(); @@ -176,6 +172,7 @@ console.log(encrypted); +- `output_encoding` {string} Returns any remaining enciphered contents. If `output_encoding` parameter is one of `'latin1'`, `'base64'` or `'hex'`, a string is returned. @@ -189,6 +186,8 @@ once will result in an error being thrown. +- `buffer` {Buffer} +- Returns the {Cipher} for method chaining. When using an authenticated encryption mode (only `GCM` is currently supported), the `cipher.setAAD()` method sets the value used for the @@ -196,8 +195,6 @@ _additional authenticated data_ (AAD) input parameter. The `cipher.setAAD()` method must be called before [`cipher.update()`][]. -Returns `this` for method chaining. - ### cipher.getAuthTag() +- `auto_padding` {boolean} Defaults to `true`. +- Returns the {Cipher} for method chaining. When using block encryption algorithms, the `Cipher` class will automatically add padding to the input data to the appropriate block size. To disable the @@ -227,8 +226,6 @@ using `0x0` instead of PKCS padding. The `cipher.setAutoPadding()` method must be called before [`cipher.final()`][]. -Returns `this` for method chaining. - ### cipher.update(data[, input_encoding][, output_encoding]) +- `data` {string | Buffer} +- `input_encoding` {string} +- `output_encoding` {string} Updates the cipher with `data`. If the `input_encoding` argument is given, its value must be one of `'utf8'`, `'ascii'`, or `'latin1'` and the `data` @@ -322,6 +322,7 @@ console.log(decrypted); +- `output_encoding` {string} Returns any remaining deciphered contents. If `output_encoding` parameter is one of `'latin1'`, `'ascii'` or `'utf8'`, a string is returned. @@ -339,6 +340,8 @@ changes: pr-url: https://github.com/nodejs/node/pull/9398 description: This method now returns a reference to `decipher`. --> +- `buffer` {Buffer} +- Returns the {Cipher} for method chaining. When using an authenticated encryption mode (only `GCM` is currently supported), the `decipher.setAAD()` method sets the value used for the @@ -346,8 +349,6 @@ _additional authenticated data_ (AAD) input parameter. The `decipher.setAAD()` method must be called before [`decipher.update()`][]. -Returns `this` for method chaining. - ### decipher.setAuthTag(buffer) +- `buffer` {Buffer} +- Returns the {Cipher} for method chaining. When using an authenticated encryption mode (only `GCM` is currently supported), the `decipher.setAuthTag()` method is used to pass in the @@ -366,12 +369,12 @@ cipher text should be discarded due to failed authentication. The `decipher.setAuthTag()` method must be called before [`decipher.final()`][]. -Returns `this` for method chaining. - -### decipher.setAutoPadding(auto_padding=true) +### decipher.setAutoPadding([auto_padding]) +- `auto_padding` {boolean} Defaults to `true`. +- Returns the {Cipher} for method chaining. When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent @@ -383,8 +386,6 @@ multiple of the ciphers block size. The `decipher.setAutoPadding()` method must be called before [`decipher.final()`][]. -Returns `this` for method chaining. - ### decipher.update(data[, input_encoding][, output_encoding]) +- `data` {string | Buffer} +- `input_encoding` {string} +- `output_encoding` {string} Updates the decipher with `data`. If the `input_encoding` argument is given, its value must be one of `'latin1'`, `'base64'`, or `'hex'` and the `data` @@ -444,6 +448,9 @@ assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); +- `other_public_key` {string | Buffer} +- `input_encoding` {string} +- `output_encoding` {string} Computes the shared secret using `other_public_key` as the other party's public key and returns the computed shared secret. The supplied @@ -459,6 +466,7 @@ If `output_encoding` is given a string is returned; otherwise, a +- `encoding` {string} Generates private and public Diffie-Hellman key values, and returns the public key in the specified `encoding`. This key should be @@ -470,6 +478,7 @@ or `'base64'`. If `encoding` is provided a string is returned; otherwise a +- `encoding` {string} Returns the Diffie-Hellman generator in the specified `encoding`, which can be `'latin1'`, `'hex'`, or `'base64'`. If `encoding` is provided a string is @@ -479,6 +488,7 @@ returned; otherwise a [`Buffer`][] is returned. +- `encoding` {string} Returns the Diffie-Hellman prime in the specified `encoding`, which can be `'latin1'`, `'hex'`, or `'base64'`. If `encoding` is provided a string is @@ -488,6 +498,7 @@ returned; otherwise a [`Buffer`][] is returned. +- `encoding` {string} Returns the Diffie-Hellman private key in the specified `encoding`, which can be `'latin1'`, `'hex'`, or `'base64'`. If `encoding` is provided a @@ -497,6 +508,7 @@ string is returned; otherwise a [`Buffer`][] is returned. +- `encoding` {string} Returns the Diffie-Hellman public key in the specified `encoding`, which can be `'latin1'`, `'hex'`, or `'base64'`. If `encoding` is provided a @@ -506,6 +518,8 @@ string is returned; otherwise a [`Buffer`][] is returned. +- `private_key` {string | Buffer} +- `encoding` {string} Sets the Diffie-Hellman private key. If the `encoding` argument is provided and is either `'latin1'`, `'hex'`, or `'base64'`, `private_key` is expected @@ -516,6 +530,8 @@ to be a [`Buffer`][]. +- `public_key` {string | Buffer} +- `encoding` {string} Sets the Diffie-Hellman public key. If the `encoding` argument is provided and is either `'latin1'`, `'hex'` or `'base64'`, `public_key` is expected @@ -577,6 +593,9 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> +- `other_public_key` {string | Buffer} +- `input_encoding` {string} +- `output_encoding` {string} Computes the shared secret using `other_public_key` as the other party's public key and returns the computed shared secret. The supplied @@ -592,6 +611,8 @@ If `output_encoding` is given a string will be returned; otherwise a +- `encoding` {string} +- `format` {string} Defaults to `uncompressed`. Generates private and public EC Diffie-Hellman key values, and returns the public key in the specified `format` and `encoding`. This key should be @@ -609,15 +630,18 @@ is returned. +- `encoding` {string} Returns the EC Diffie-Hellman private key in the specified `encoding`, which can be `'latin1'`, `'hex'`, or `'base64'`. If `encoding` is provided a string is returned; otherwise a [`Buffer`][] is returned. -### ecdh.getPublicKey([encoding[, format]]) +### ecdh.getPublicKey([encoding][, format]) +- `encoding` {string} +- `format` {string} Defaults to `uncompressed`. Returns the EC Diffie-Hellman public key in the specified `encoding` and `format`. @@ -634,6 +658,8 @@ returned. +- `private_key` {string | Buffer} +- `encoding` {string} Sets the EC Diffie-Hellman private key. The `encoding` can be `'latin1'`, `'hex'` or `'base64'`. If `encoding` is provided, `private_key` is expected @@ -650,6 +676,9 @@ deprecated: v5.2.0 > Stability: 0 - Deprecated +- `public_key` {string | Buffer} +- `encoding` {string} + Sets the EC Diffie-Hellman public key. Key encoding can be `'latin1'`, `'hex'` or `'base64'`. If `encoding` is provided `public_key` is expected to be a string; otherwise a [`Buffer`][] is expected. @@ -747,6 +776,7 @@ console.log(hash.digest('hex')); +- `encoding` {string} Calculates the digest of all of the data passed to be hashed (using the [`hash.update()`][] method). The `encoding` can be `'hex'`, `'latin1'` or @@ -764,6 +794,8 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> +- `data` {string | Buffer} +- `input_encoding` {string} Updates the hash content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or @@ -834,6 +866,7 @@ console.log(hmac.digest('hex')); +- `encoding` {string} Calculates the HMAC digest of all of the data passed using [`hmac.update()`][]. The `encoding` can be `'hex'`, `'latin1'` or `'base64'`. If `encoding` is @@ -850,6 +883,8 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> +- `data` {string | Buffer} +- `input_encoding` {string} Updates the `Hmac` content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or @@ -929,6 +964,10 @@ console.log(sign.sign(privateKey).toString('hex')); +- `private_key` {string | Object} + - `key` {string} + - `passphrase` {string} +- `output_format` {string} Calculates the signature on all the data passed through using either [`sign.update()`][] or [`sign.write()`][stream-writable-write]. @@ -955,6 +994,8 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> +- `data` {string | Buffer} +- `input_encoding` {string} Updates the `Sign` content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or @@ -1017,6 +1058,8 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> +- `data` {string | Buffer} +- `input_encoding` {string} Updates the `Verify` content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or @@ -1030,10 +1073,13 @@ This can be called many times with new data as it is streamed. +- `object` {string} +- `signature` {string | Buffer} +- `signature_format` {string} Verifies the provided data using the given `object` and `signature`. The `object` argument is a string containing a PEM encoded object, which can be -one an RSA public key, a DSA public key, or an X.509 certificate. +an RSA public key, a DSA public key, or an X.509 certificate. The `signature` argument is the previously calculated signature for the data, in the `signature_format` which can be `'latin1'`, `'hex'` or `'base64'`. If a `signature_format` is specified, the `signature` is expected to be a @@ -1084,6 +1130,8 @@ currently in use. Setting to true requires a FIPS build of Node.js. +- `algorithm` {string} +- `password` {string | Buffer} Creates and returns a `Cipher` object that uses the given `algorithm` and `password`. @@ -1108,6 +1156,9 @@ their own using [`crypto.pbkdf2()`][] and to use [`crypto.createCipheriv()`][] to create the `Cipher` object. ### crypto.createCipheriv(algorithm, key, iv) +- `algorithm` {string} +- `key` {string | Buffer} +- `iv` {string | Buffer} Creates and returns a `Cipher` object, with the given `algorithm`, `key` and initialization vector (`iv`). @@ -1142,6 +1193,8 @@ called. +- `algorithm` {string} +- `password` {string | Buffer} Creates and returns a `Decipher` object that uses the given `algorithm` and `password` (key). @@ -1162,6 +1215,9 @@ to create the `Decipher` object. +- `algorithm` {string} +- `key` {string | Buffer} +- `iv` {string | Buffer} Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`). @@ -1183,6 +1239,10 @@ changes: description: The default for the encoding parameters changed from `binary` to `utf8`. --> +- `prime` {string | Buffer} +- `prime_encoding` {string} +- `generator` {number | string | Buffer} Defaults to `2`. +- `generator_encoding` {string} Creates a `DiffieHellman` key exchange object using the supplied `prime` and an optional specific `generator`. @@ -1203,6 +1263,8 @@ otherwise either a number or [`Buffer`][] is expected. +- `prime_length` {number} +- `generator` {number | string | Buffer} Defaults to `2`. Creates a `DiffieHellman` key exchange object and generates a prime of `prime_length` bits using an optional specific numeric `generator`. @@ -1212,6 +1274,7 @@ If `generator` is not specified, the value `2` is used. +- `curve_name` {string} Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a predefined curve specified by the `curve_name` string. Use @@ -1223,6 +1286,7 @@ and description of each available elliptic curve. +- `algorithm` {string} Creates and returns a `Hash` object that can be used to generate hash digests using the given `algorithm`. @@ -1256,6 +1320,8 @@ input.on('readable', () => { +- `algorithm` {string} +- `key` {string | Buffer} Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. @@ -1290,6 +1356,7 @@ input.on('readable', () => { +- `algorithm` {string} Creates and returns a `Sign` object that uses the given `algorithm`. Use [`crypto.getHashes()`][] to obtain an array of names of the available @@ -1299,6 +1366,7 @@ signing algorithms. +- `algorithm` {string} Creates and returns a `Verify` object that uses the given algorithm. Use [`crypto.getHashes()`][] to obtain an array of names of the available @@ -1336,6 +1404,7 @@ console.log(curves); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] +- `group_name` {string} Creates a predefined `DiffieHellman` key exchange object. The supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in @@ -1396,6 +1465,14 @@ changes: description: The default encoding for `password` if it is a string changed from `binary` to `utf8`. --> +- `password` {string} +- `salt` {string} +- `iterations` {number} +- `keylen` {number} +- `digest` {string} +- `callback` {Function} + - `err` {Error} + - `derivedKey` {Buffer} Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) implementation. A selected HMAC digest algorithm specified by `digest` is @@ -1418,9 +1495,9 @@ Example: ```js const crypto = require('crypto'); -crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, key) => { +crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => { if (err) throw err; - console.log(key.toString('hex')); // '3745e48...aa39b34' + console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' }); ``` @@ -1440,6 +1517,11 @@ changes: description: The default encoding for `password` if it is a string changed from `binary` to `utf8`. --> +- `password` {string} +- `salt` {string} +- `iterations` {number} +- `keylen` {number} +- `digest` {string} Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) implementation. A selected HMAC digest algorithm specified by `digest` is @@ -1472,95 +1554,84 @@ An array of supported digest functions can be retrieved using +- `private_key` {Object | string} + - `key` {string} A PEM encoded private key. + - `passphrase` {string} An optional passphrase for the private key. + - `padding` {crypto.constants} An optional padding value defined in + `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`, + `RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`. +- `buffer` {Buffer} Decrypts `buffer` with `private_key`. `private_key` can be an object or a string. If `private_key` is a string, it is treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`. -If `private_key` is an object, it is interpreted as a hash object with the -keys: - -* `key`: {string} - PEM encoded private key -* `passphrase`: {string} - Optional passphrase for the private key -* `padding` : An optional padding value, one of the following: - * `crypto.constants.RSA_NO_PADDING` - * `crypto.constants.RSA_PKCS1_PADDING` - * `crypto.constants.RSA_PKCS1_OAEP_PADDING` - -All paddings are defined in `crypto.constants`. ### crypto.privateEncrypt(private_key, buffer) +- `private_key` {Object | string} + - `key` {string} A PEM encoded private key. + - `passphrase` {string} An optional passphrase for the private key. + - `padding` {crypto.constants} An optional padding value defined in + `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or + `RSA_PKCS1_PADDING`. +- `buffer` {Buffer} Encrypts `buffer` with `private_key`. `private_key` can be an object or a string. If `private_key` is a string, it is treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`. -If `private_key` is an object, it is interpreted as a hash object with the -keys: - -* `key`: {string} - PEM encoded private key -* `passphrase`: {string} - Optional passphrase for the private key -* `padding` : An optional padding value, one of the following: - * `crypto.constants.RSA_NO_PADDING` - * `crypto.constants.RSA_PKCS1_PADDING` - -All paddings are defined in `crypto.constants`. ### crypto.publicDecrypt(public_key, buffer) +- `private_key` {Object | string} + - `key` {string} A PEM encoded private key. + - `passphrase` {string} An optional passphrase for the private key. + - `padding` {crypto.constants} An optional padding value defined in + `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`, + `RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`. +- `buffer` {Buffer} Decrypts `buffer` with `public_key`. `public_key` can be an object or a string. If `public_key` is a string, it is treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`. -If `public_key` is an object, it is interpreted as a hash object with the -keys: - -* `key`: {string} - PEM encoded public key -* `passphrase`: {string} - Optional passphrase for the private key -* `padding` : An optional padding value, one of the following: - * `crypto.constants.RSA_NO_PADDING` - * `crypto.constants.RSA_PKCS1_PADDING` - * `crypto.constants.RSA_PKCS1_OAEP_PADDING` Because RSA public keys can be derived from private keys, a private key may be passed instead of a public key. -All paddings are defined in `crypto.constants`. - ### crypto.publicEncrypt(public_key, buffer) +- `private_key` {Object | string} + - `key` {string} A PEM encoded private key. + - `passphrase` {string} An optional passphrase for the private key. + - `padding` {crypto.constants} An optional padding value defined in + `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`, + `RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`. +- `buffer` {Buffer} Encrypts `buffer` with `public_key`. `public_key` can be an object or a string. If `public_key` is a string, it is treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`. -If `public_key` is an object, it is interpreted as a hash object with the -keys: - -* `key`: {string} - PEM encoded public key -* `passphrase`: {string} - Optional passphrase for the private key -* `padding` : An optional padding value, one of the following: - * `crypto.constants.RSA_NO_PADDING` - * `crypto.constants.RSA_PKCS1_PADDING` - * `crypto.constants.RSA_PKCS1_OAEP_PADDING` Because RSA public keys can be derived from private keys, a private key may be passed instead of a public key. -All paddings are defined in `crypto.constants`. - ### crypto.randomBytes(size[, callback]) +- `size` {number} +- `callback` {Function} + - `err` {Error} + - `buf` {Buffer} Generates cryptographically strong pseudo-random data. The `size` argument is a number indicating the number of bytes to generate. @@ -1599,6 +1670,8 @@ time is right after boot, when the whole system is still low on entropy. +- `engine` {string} +- `flags` {crypto.constants} Defaults to `crypto.constants.ENGINE_METHOD_ALL`. Load and set the `engine` for some or all OpenSSL functions (selected by flags). @@ -1626,6 +1699,8 @@ is a bit field taking one of or a mix of the following flags (defined in +- `a` {Buffer} +- `b` {Buffer} Returns true if `a` is equal to `b`, without leaking timing information that would allow an attacker to guess one of the values. This is suitable for From 27f4c9407f1b052512e2bbd8262a627ab785fa20 Mon Sep 17 00:00:00 2001 From: Gaara Date: Fri, 10 Mar 2017 10:52:43 +0800 Subject: [PATCH 107/485] doc: fix a typo in api/process.md Fix a mistyped module name in example REPL sessions found in the description of the 'warning' event: it should be `events` instead of `event`. PR-URL: https://github.com/nodejs/node/pull/11780 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- doc/api/process.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index 0ff80980f9c651..2e9b655f28c2a5 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -298,7 +298,7 @@ too many listeners have been added to an event ```txt $ node -> event.defaultMaxListeners = 1; +> events.defaultMaxListeners = 1; > process.on('foo', () => {}); > process.on('foo', () => {}); > (node:38638) Warning: Possible EventEmitter memory leak detected. 2 foo @@ -311,7 +311,7 @@ adds a custom handler to the `'warning'` event: ```txt $ node --no-warnings > var p = process.on('warning', (warning) => console.warn('Do not do that!')); -> event.defaultMaxListeners = 1; +> events.defaultMaxListeners = 1; > process.on('foo', () => {}); > process.on('foo', () => {}); > Do not do that! From 205f4e500654d38e12df38b0d45925a5850046bb Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Wed, 8 Mar 2017 02:37:35 +0200 Subject: [PATCH 108/485] test: fix repl-function-redefinition-edge-case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `test/known_issues/test-repl-function-redefinition-edge-case.js` had been introduced as a part of https://github.com/nodejs/node/pull/7624 but the meat of the test became fixed in 007386ee81ceeffd65c2248869717b0717db3e46. Despite that, the test continued to fail since it was broken itself: there was a missing colon in the expected output. This commit adds the missing colon and moves the test from `test/known_issues` to `test/parallel`. PR-URL: https://github.com/nodejs/node/pull/11772 Reviewed-By: Anna Henningsen Reviewed-By: Michaël Zasso Reviewed-By: James M Snell Reviewed-By: Michael Dawson Reviewed-By: Colin Ihrig --- .../test-repl-function-definition-edge-case.js} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/{known_issues/test-repl-function-redefinition-edge-case.js => parallel/test-repl-function-definition-edge-case.js} (95%) diff --git a/test/known_issues/test-repl-function-redefinition-edge-case.js b/test/parallel/test-repl-function-definition-edge-case.js similarity index 95% rename from test/known_issues/test-repl-function-redefinition-edge-case.js rename to test/parallel/test-repl-function-definition-edge-case.js index 03b721fba7e7d5..1e3063e3db53ff 100644 --- a/test/known_issues/test-repl-function-redefinition-edge-case.js +++ b/test/parallel/test-repl-function-definition-edge-case.js @@ -13,7 +13,7 @@ r.input.emit('data', 'function a() { return 42; } (1)\n'); r.input.emit('data', 'a\n'); r.input.emit('data', '.exit'); -const expected = '1\n[Function a]\n'; +const expected = '1\n[Function: a]\n'; const got = r.output.accumulator.join(''); assert.strictEqual(got, expected); From 1faf136bfdfcf74fefcb507ff25db7b3fcb17ca7 Mon Sep 17 00:00:00 2001 From: Amelia Clarke Date: Wed, 8 Mar 2017 21:33:31 -0800 Subject: [PATCH 109/485] doc: argument types for dns methods Refs: https://github.com/nodejs/node/issues/9399 PR-URL: https://github.com/nodejs/node/pull/11764 Reviewed-By: Anna Henningsen Reviewed-By: Timothy Gu Reviewed-By: James M Snell Reviewed-By: Michael Dawson Reviewed-By: Colin Ihrig --- doc/api/dns.md | 139 +++++++++++++++++++++++++++++++------------------ 1 file changed, 89 insertions(+), 50 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index 7f075be3114279..45d494eab3bcf2 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -70,33 +70,25 @@ changes: pr-url: https://github.com/nodejs/node/pull/744 description: The `all` option is supported now. --> +- `hostname` {string} +- `options` {integer | Object} + - `family` {integer} The record family. Must be `4` or `6`. IPv4 + and IPv6 addresses are both returned by default. + - `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple + flags may be passed by bitwise `OR`ing their values. + - `all` {boolean} When `true`, the callback returns all resolved addresses in + an array. Otherwise, returns a single address. Defaults to `false`. +- `callback` {Function} + - `err` {Error} + - `address` {string} A string representation of an IPv4 or IPv6 address. + - `family` {integer} `4` or `6`, denoting the family of `address`. Resolves a hostname (e.g. `'nodejs.org'`) into the first found A (IPv4) or -AAAA (IPv6) record. `options` can be an object or integer. If `options` is -not provided, then IPv4 and IPv6 addresses are both valid. If `options` is -an integer, then it must be `4` or `6`. - -Alternatively, `options` can be an object containing these properties: - -* `family` {number} - The record family. If present, must be the integer - `4` or `6`. If not provided, both IP v4 and v6 addresses are accepted. -* `hints`: {number} - If present, it should be one or more of the supported - `getaddrinfo` flags. If `hints` is not provided, then no flags are passed to - `getaddrinfo`. Multiple flags can be passed through `hints` by bitwise - `OR`ing their values. - See [supported `getaddrinfo` flags][] for more information on supported - flags. -* `all`: {boolean} - When `true`, the callback returns all resolved addresses - in an array, otherwise returns a single address. Defaults to `false`. - -All properties are optional. - -The `callback` function has arguments `(err, address, family)`. `address` is a -string representation of an IPv4 or IPv6 address. `family` is either the -integer `4` or `6` and denotes the family of `address` (not necessarily the -value initially passed to `lookup`). - -With the `all` option set to `true`, the arguments change to +AAAA (IPv6) record. All `option` properties are optional. If `options` is an +integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 +and IPv6 addresses are both returned if found. + +With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the properties `address` and `family`. @@ -147,6 +139,12 @@ on some operating systems (e.g FreeBSD 10.1). +- `address` {string} +- `port` {number} +- `callback` {Function} + - `err` {Error} + - `hostname` {string} e.g. `example.com` + - `service` {string} e.g. `http` Resolves the given `address` and `port` into a hostname and service using the operating system's underlying `getnameinfo` implementation. @@ -155,10 +153,7 @@ If `address` is not a valid IP address, a `TypeError` will be thrown. The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. -The callback has arguments `(err, hostname, service)`. The `hostname` and -`service` arguments are strings (e.g. `'localhost'` and `'http'` respectively). - -On error, `err` is an [`Error`][] object, where `err.code` is the error code. +On an error, `err` is an [`Error`][] object, where `err.code` is the error code. ```js const dns = require('dns'); @@ -172,6 +167,11 @@ dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { +- `hostname` {string} +- `rrtype` {string} +- `callback` {Function} + - `err` {Error} + - `addresses` {string[] | Object[] | string[][] | Object} Uses the DNS protocol to resolve a hostname (e.g. `'nodejs.org'`) into an array of the record types specified by `rrtype`. @@ -208,18 +208,21 @@ changes: description: This method now supports passing `options`, specifically `options.ttl`. --> +- `hostname` {string} Hostname to resolve. +- `options` {Object} + - `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record. + When `true`, the callback receives an array of + `{ address: '1.2.3.4', ttl: 60 }` objects rather than an array of strings, + with the TTL expressed in seconds. +- `callback` {Function} + - `err` {Error} + - `addresses` {string[] | Object[]} Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of IPv4 addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). -* `hostname` {string} Hostname to resolve. -* `options` {Object} - * `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record. - The callback receives an array of `{ address: '1.2.3.4', ttl: 60 }` objects - rather than an array of strings. The TTL is expressed in seconds. -* `callback` {Function} An `(err, result)` callback function. ## dns.resolve6(hostname[, options], callback) +- `hostname` {string} Hostname to resolve. +- `options` {Object} + - `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record. + When `true`, the callback receives an array of + `{ address: '0:1:2:3:4:5:6:7', ttl: 60 }` objects rather than an array of + strings, with the TTL expressed in seconds. +- `callback` {Function} + - `err` {Error} + - `addresses` {string[] | Object[]} Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of IPv6 addresses. -* `hostname` {string} Hostname to resolve. -* `options` {Object} - * `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record. - The callback receives an array of `{ address: '0:1:2:3:4:5:6:7', ttl: 60 }` - objects rather than an array of strings. The TTL is expressed in seconds. -* `callback` {Function} An `(err, result)` callback function. ## dns.resolveCname(hostname, callback) +- `hostname` {string} +- `callback` {Function} + - `err` {Error} + - `addresses` {string[]} Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function @@ -256,6 +266,10 @@ will contain an array of canonical name records available for the `hostname` +- `hostname` {string} +- `callback` {Function} + - `err` {Error} + - `addresses` {Object[]} Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will @@ -266,11 +280,14 @@ property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). +- `hostname` {string} +- `callback` {Function} + - `err` {Error} + - `addresses` {Object[]} Uses the DNS protocol to resolve regular expression based records (`NAPTR` -records) for the `hostname`. The `callback` function has arguments -`(err, addresses)`. The `addresses` argument passed to the `callback` function -will contain an array of objects with the following properties: +records) for the `hostname`. The `addresses` argument passed to the `callback` +function will contain an array of objects with the following properties: * `flags` * `service` @@ -296,16 +313,24 @@ For example: +- `hostname` {string} +- `callback` {Function} + - `err` {Error} + - `addresses` {string[]} Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`). -## dns.resolvePtr(hostname, callback) +## dns.resolvePtr(hostname) +- `hostname` {string} +- `callback` {Function} + - `err` {Error} + - `addresses` {string[]} Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will @@ -315,9 +340,13 @@ be an array of strings containing the reply records. +- `hostname` {string} +- `callback` {Function} + - `err` {Error} + - `address` {Object} Uses the DNS protocol to resolve a start of authority record (`SOA` record) for -the `hostname`. The `addresses` argument passed to the `callback` function will +the `hostname`. The `address` argument passed to the `callback` function will be an object with the following properties: * `nsname` @@ -344,6 +373,10 @@ be an object with the following properties: +- `hostname` {string} +- `callback` {Function} + - `err` {Error} + - `addresses` {Object[]} Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will @@ -367,6 +400,10 @@ be an array of objects with the following properties: +- `hostname` {string} +- `callback` {Function} + - `err` {Error} + - `addresses` {string[][]} Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `addresses` argument passed to the `callback` function is @@ -379,13 +416,14 @@ treated separately. +- `ip` {string} +- `callback` {Function} + - `err` {Error} + - `hostnames` {string[]} Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of hostnames. -The `callback` function has arguments `(err, hostnames)`, where `hostnames` -is an array of resolved hostnames for the given `ip`. - On error, `err` is an [`Error`][] object, where `err.code` is one of the [DNS error codes][]. @@ -393,11 +431,12 @@ one of the [DNS error codes][]. +- `servers` {string[]} Sets the IP addresses of the servers to be used when resolving. The `servers` argument is an array of IPv4 or IPv6 addresses. -If a port specified on the address it will be removed. +If a port is specified on the address, it will be removed. An error will be thrown if an invalid address is provided. From 7acc482432c7b961a52a4a081a87b05f882cf1dd Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Fri, 10 Mar 2017 05:00:04 +0200 Subject: [PATCH 110/485] test: add arrow functions to test-util-inspect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Even though arrow functions and ES5 anonymous functions are technically the same for util.js, it won't hurt to test both. The same goes for async functions. PR-URL: https://github.com/nodejs/node/pull/11781 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Michaël Zasso Reviewed-By: Daniel Bevenius Reviewed-By: Luigi Pinca Reviewed-By: Michael Dawson Reviewed-By: Colin Ihrig Reviewed-By: Timothy Gu --- test/parallel/test-util-inspect.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index e0a06e97db6e6b..c5af77eccf56b9 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -30,7 +30,9 @@ assert.strictEqual(util.inspect(false), 'false'); assert.strictEqual(util.inspect(''), "''"); assert.strictEqual(util.inspect('hello'), "'hello'"); assert.strictEqual(util.inspect(function() {}), '[Function]'); +assert.strictEqual(util.inspect(() => {}), '[Function]'); assert.strictEqual(util.inspect(async function() {}), '[AsyncFunction]'); +assert.strictEqual(util.inspect(async () => {}), '[AsyncFunction]'); assert.strictEqual(util.inspect(function*() {}), '[GeneratorFunction]'); assert.strictEqual(util.inspect(undefined), 'undefined'); assert.strictEqual(util.inspect(null), 'null'); @@ -51,8 +53,11 @@ assert.strictEqual(util.inspect([1, [2, 3]]), '[ 1, [ 2, 3 ] ]'); assert.strictEqual(util.inspect({}), '{}'); assert.strictEqual(util.inspect({a: 1}), '{ a: 1 }'); assert.strictEqual(util.inspect({a: function() {}}), '{ a: [Function: a] }'); +assert.strictEqual(util.inspect({a: () => {}}), '{ a: [Function: a] }'); assert.strictEqual(util.inspect({a: async function() {}}), '{ a: [AsyncFunction: a] }'); +assert.strictEqual(util.inspect({a: async () => {}}), + '{ a: [AsyncFunction: a] }'); assert.strictEqual(util.inspect({a: function*() {}}), '{ a: [GeneratorFunction: a] }'); assert.strictEqual(util.inspect({a: 1, b: 2}), '{ a: 1, b: 2 }'); From 3d7245c0989878dc708df06151fa2426c251a03a Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Fri, 10 Mar 2017 03:47:06 +0200 Subject: [PATCH 111/485] test: refactor test-util-inspect.js * Enclose tests that used to introduce module-level variables into their own scopes. * Replace ES5 anonymous functions with arrow functions where it makes sense. * And make one arrow function a regular function thus fixing a bug in a getter inside an object created in "Array with dynamic properties" test. This getter has never been invoked though, so the test hasn't been failing. * Convert snake_case identifiers to camelCase. * Make some variable names more readable. * Replace regular expressions in maxArrayLength tests with simple assert.strictEquals() and assert(...endsWith()) checks, as suggested in . PR-URL: https://github.com/nodejs/node/pull/11779 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- test/parallel/test-util-inspect.js | 603 +++++++++++++++-------------- 1 file changed, 322 insertions(+), 281 deletions(-) diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index c5af77eccf56b9..033d15ff057850 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -259,80 +259,97 @@ assert.strictEqual( // Dynamic properties -assert.strictEqual(util.inspect({get readonly() {}}), - '{ readonly: [Getter] }'); +{ + assert.strictEqual(util.inspect({get readonly() {}}), + '{ readonly: [Getter] }'); -assert.strictEqual(util.inspect({get readwrite() {}, set readwrite(val) {}}), - '{ readwrite: [Getter/Setter] }'); + assert.strictEqual(util.inspect({get readwrite() {}, set readwrite(val) {}}), + '{ readwrite: [Getter/Setter] }'); -assert.strictEqual(util.inspect({set writeonly(val) {}}), - '{ writeonly: [Setter] }'); + assert.strictEqual(util.inspect({set writeonly(val) {}}), + '{ writeonly: [Setter] }'); -let value = {}; -value['a'] = value; -assert.strictEqual(util.inspect(value), '{ a: [Circular] }'); + const value = {}; + value['a'] = value; + assert.strictEqual(util.inspect(value), '{ a: [Circular] }'); +} // Array with dynamic properties -value = [1, 2, 3]; -Object.defineProperty( - value, - 'growingLength', - { - enumerable: true, - get: () => { this.push(true); return this.length; } - } -); -assert.strictEqual(util.inspect(value), '[ 1, 2, 3, growingLength: [Getter] ]'); +{ + const value = [1, 2, 3]; + Object.defineProperty( + value, + 'growingLength', + { + enumerable: true, + get: function() { this.push(true); return this.length; } + } + ); + assert.strictEqual(util.inspect(value), + '[ 1, 2, 3, growingLength: [Getter] ]'); +} // Function with properties -value = function() {}; -value.aprop = 42; -assert.strictEqual(util.inspect(value), '{ [Function: value] aprop: 42 }'); +{ + const value = function() {}; + value.aprop = 42; + assert.strictEqual(util.inspect(value), '{ [Function: value] aprop: 42 }'); +} // Anonymous function with properties -value = (() => function() {})(); -value.aprop = 42; -assert.strictEqual(util.inspect(value), '{ [Function] aprop: 42 }'); +{ + const value = (() => function() {})(); + value.aprop = 42; + assert.strictEqual(util.inspect(value), '{ [Function] aprop: 42 }'); +} // Regular expressions with properties -value = /123/ig; -value.aprop = 42; -assert.strictEqual(util.inspect(value), '{ /123/gi aprop: 42 }'); +{ + const value = /123/ig; + value.aprop = 42; + assert.strictEqual(util.inspect(value), '{ /123/gi aprop: 42 }'); +} // Dates with properties -value = new Date('Sun, 14 Feb 2010 11:48:40 GMT'); -value.aprop = 42; -assert.strictEqual(util.inspect(value), '{ 2010-02-14T11:48:40.000Z aprop: 42 }' -); +{ + const value = new Date('Sun, 14 Feb 2010 11:48:40 GMT'); + value.aprop = 42; + assert.strictEqual(util.inspect(value), + '{ 2010-02-14T11:48:40.000Z aprop: 42 }'); +} // test the internal isDate implementation -const Date2 = vm.runInNewContext('Date'); -const d = new Date2(); -const orig = util.inspect(d); -Date2.prototype.foo = 'bar'; -const after = util.inspect(d); -assert.strictEqual(orig, after); +{ + const Date2 = vm.runInNewContext('Date'); + const d = new Date2(); + const orig = util.inspect(d); + Date2.prototype.foo = 'bar'; + const after = util.inspect(d); + assert.strictEqual(orig, after); +} // test positive/negative zero assert.strictEqual(util.inspect(0), '0'); assert.strictEqual(util.inspect(-0), '-0'); // test for sparse array -const a = ['foo', 'bar', 'baz']; -assert.strictEqual(util.inspect(a), '[ \'foo\', \'bar\', \'baz\' ]'); -delete a[1]; -assert.strictEqual(util.inspect(a), '[ \'foo\', <1 empty item>, \'baz\' ]'); -assert.strictEqual( - util.inspect(a, true), - '[ \'foo\', <1 empty item>, \'baz\', [length]: 3 ]' -); -assert.strictEqual(util.inspect(new Array(5)), '[ <5 empty items> ]'); -a[3] = 'bar'; -a[100] = 'qux'; -assert.strictEqual( - util.inspect(a, { breakLength: Infinity }), - '[ \'foo\', <1 empty item>, \'baz\', \'bar\', <96 empty items>, \'qux\' ]' -); +{ + const a = ['foo', 'bar', 'baz']; + assert.strictEqual(util.inspect(a), '[ \'foo\', \'bar\', \'baz\' ]'); + delete a[1]; + assert.strictEqual(util.inspect(a), '[ \'foo\', <1 empty item>, \'baz\' ]'); + assert.strictEqual( + util.inspect(a, true), + '[ \'foo\', <1 empty item>, \'baz\', [length]: 3 ]' + ); + assert.strictEqual(util.inspect(new Array(5)), '[ <5 empty items> ]'); + a[3] = 'bar'; + a[100] = 'qux'; + assert.strictEqual( + util.inspect(a, { breakLength: Infinity }), + '[ \'foo\', <1 empty item>, \'baz\', \'bar\', <96 empty items>, \'qux\' ]' + ); +} // test for Array constructor in different context { @@ -350,98 +367,107 @@ assert.strictEqual( } // test for other constructors in different context -let obj = vm.runInNewContext('(function(){return {}})()', {}); -assert.strictEqual(util.inspect(obj), '{}'); -obj = vm.runInNewContext('var m=new Map();m.set(1,2);m', {}); -assert.strictEqual(util.inspect(obj), 'Map { 1 => 2 }'); -obj = vm.runInNewContext('var s=new Set();s.add(1);s.add(2);s', {}); -assert.strictEqual(util.inspect(obj), 'Set { 1, 2 }'); -obj = vm.runInNewContext('fn=function(){};new Promise(fn,fn)', {}); -assert.strictEqual(util.inspect(obj), 'Promise { }'); +{ + let obj = vm.runInNewContext('(function(){return {}})()', {}); + assert.strictEqual(util.inspect(obj), '{}'); + obj = vm.runInNewContext('var m=new Map();m.set(1,2);m', {}); + assert.strictEqual(util.inspect(obj), 'Map { 1 => 2 }'); + obj = vm.runInNewContext('var s=new Set();s.add(1);s.add(2);s', {}); + assert.strictEqual(util.inspect(obj), 'Set { 1, 2 }'); + obj = vm.runInNewContext('fn=function(){};new Promise(fn,fn)', {}); + assert.strictEqual(util.inspect(obj), 'Promise { }'); +} // test for property descriptors -const getter = Object.create(null, { - a: { - get: function() { return 'aaa'; } - } -}); -const setter = Object.create(null, { - b: { - set: function() {} - } -}); -const getterAndSetter = Object.create(null, { - c: { - get: function() { return 'ccc'; }, - set: function() {} - } -}); -assert.strictEqual(util.inspect(getter, true), '{ [a]: [Getter] }'); -assert.strictEqual(util.inspect(setter, true), '{ [b]: [Setter] }'); -assert.strictEqual( - util.inspect(getterAndSetter, true), - '{ [c]: [Getter/Setter] }' -); +{ + const getter = Object.create(null, { + a: { + get: function() { return 'aaa'; } + } + }); + const setter = Object.create(null, { + b: { + set: function() {} + } + }); + const getterAndSetter = Object.create(null, { + c: { + get: function() { return 'ccc'; }, + set: function() {} + } + }); + assert.strictEqual(util.inspect(getter, true), '{ [a]: [Getter] }'); + assert.strictEqual(util.inspect(setter, true), '{ [b]: [Setter] }'); + assert.strictEqual( + util.inspect(getterAndSetter, true), + '{ [c]: [Getter/Setter] }' + ); +} // exceptions should print the error message, not '{}' -const errors = []; -errors.push(new Error()); -errors.push(new Error('FAIL')); -errors.push(new TypeError('FAIL')); -errors.push(new SyntaxError('FAIL')); -errors.forEach(function(err) { - assert.strictEqual(util.inspect(err), err.stack); -}); -try { - undef(); // eslint-disable-line no-undef -} catch (e) { - assert.strictEqual(util.inspect(e), e.stack); -} -const ex = util.inspect(new Error('FAIL'), true); -assert(ex.includes('Error: FAIL')); -assert(ex.includes('[stack]')); -assert(ex.includes('[message]')); +{ + const errors = []; + errors.push(new Error()); + errors.push(new Error('FAIL')); + errors.push(new TypeError('FAIL')); + errors.push(new SyntaxError('FAIL')); + errors.forEach((err) => { + assert.strictEqual(util.inspect(err), err.stack); + }); + try { + undef(); // eslint-disable-line no-undef + } catch (e) { + assert.strictEqual(util.inspect(e), e.stack); + } + const ex = util.inspect(new Error('FAIL'), true); + assert(ex.includes('Error: FAIL')); + assert(ex.includes('[stack]')); + assert(ex.includes('[message]')); +} + // Doesn't capture stack trace -function BadCustomError(msg) { - Error.call(this); - Object.defineProperty(this, 'message', - { value: msg, enumerable: false }); - Object.defineProperty(this, 'name', - { value: 'BadCustomError', enumerable: false }); -} -util.inherits(BadCustomError, Error); -assert.strictEqual( - util.inspect(new BadCustomError('foo')), - '[BadCustomError: foo]' -); +{ + function BadCustomError(msg) { + Error.call(this); + Object.defineProperty(this, 'message', + { value: msg, enumerable: false }); + Object.defineProperty(this, 'name', + { value: 'BadCustomError', enumerable: false }); + } + util.inherits(BadCustomError, Error); + assert.strictEqual( + util.inspect(new BadCustomError('foo')), + '[BadCustomError: foo]' + ); +} // GH-1941 // should not throw: assert.strictEqual(util.inspect(Object.create(Date.prototype)), 'Date {}'); // GH-1944 -assert.doesNotThrow(function() { +assert.doesNotThrow(() => { const d = new Date(); d.toUTCString = null; util.inspect(d); }); -assert.doesNotThrow(function() { +assert.doesNotThrow(() => { const d = new Date(); d.toISOString = null; util.inspect(d); }); -assert.doesNotThrow(function() { +assert.doesNotThrow(() => { const r = /regexp/; r.toString = null; util.inspect(r); }); // bug with user-supplied inspect function returns non-string -assert.doesNotThrow(function() { +assert.doesNotThrow(() => { util.inspect([{ - inspect: function() { return 123; } + inspect: () => 123 }]); }); @@ -452,53 +478,57 @@ assert.doesNotThrow(function() { } // util.inspect should not display the escaped value of a key. -const w = { - '\\': 1, - '\\\\': 2, - '\\\\\\': 3, - '\\\\\\\\': 4, -}; +{ + const w = { + '\\': 1, + '\\\\': 2, + '\\\\\\': 3, + '\\\\\\\\': 4, + }; -const y = ['a', 'b', 'c']; -y['\\\\\\'] = 'd'; + const y = ['a', 'b', 'c']; + y['\\\\\\'] = 'd'; -assert.strictEqual( - util.inspect(w), - '{ \'\\\': 1, \'\\\\\': 2, \'\\\\\\\': 3, \'\\\\\\\\\': 4 }' -); -assert.strictEqual( - util.inspect(y), - '[ \'a\', \'b\', \'c\', \'\\\\\\\': \'d\' ]' -); - -// util.inspect.styles and util.inspect.colors -function test_color_style(style, input, implicit) { - const color_name = util.inspect.styles[style]; - let color = ['', '']; - if (util.inspect.colors[color_name]) - color = util.inspect.colors[color_name]; - - const without_color = util.inspect(input, false, 0, false); - const with_color = util.inspect(input, false, 0, true); - const expect = '\u001b[' + color[0] + 'm' + without_color + - '\u001b[' + color[1] + 'm'; assert.strictEqual( - with_color, - expect, - `util.inspect color for style ${style}`); + util.inspect(w), + '{ \'\\\': 1, \'\\\\\': 2, \'\\\\\\\': 3, \'\\\\\\\\\': 4 }' + ); + assert.strictEqual( + util.inspect(y), + '[ \'a\', \'b\', \'c\', \'\\\\\\\': \'d\' ]' + ); } -test_color_style('special', function() {}); -test_color_style('number', 123.456); -test_color_style('boolean', true); -test_color_style('undefined', undefined); -test_color_style('null', null); -test_color_style('string', 'test string'); -test_color_style('date', new Date()); -test_color_style('regexp', /regexp/); +// util.inspect.styles and util.inspect.colors +{ + function testColorStyle(style, input, implicit) { + const colorName = util.inspect.styles[style]; + let color = ['', '']; + if (util.inspect.colors[colorName]) + color = util.inspect.colors[colorName]; + + const withoutColor = util.inspect(input, false, 0, false); + const withColor = util.inspect(input, false, 0, true); + const expect = '\u001b[' + color[0] + 'm' + withoutColor + + '\u001b[' + color[1] + 'm'; + assert.strictEqual( + withColor, + expect, + `util.inspect color for style ${style}`); + } + + testColorStyle('special', function() {}); + testColorStyle('number', 123.456); + testColorStyle('boolean', true); + testColorStyle('undefined', undefined); + testColorStyle('null', null); + testColorStyle('string', 'test string'); + testColorStyle('date', new Date()); + testColorStyle('regexp', /regexp/); +} // an object with "hasOwnProperty" overwritten should not throw -assert.doesNotThrow(function() { +assert.doesNotThrow(() => { util.inspect({ hasOwnProperty: null }); @@ -541,7 +571,7 @@ assert.doesNotThrow(function() { { // "customInspect" option can enable/disable calling inspect() on objects - const subject = { inspect: function() { return 123; } }; + const subject = { inspect: () => 123 }; assert.strictEqual( util.inspect(subject, { customInspect: true }).includes('123'), @@ -561,11 +591,11 @@ assert.doesNotThrow(function() { ); // custom inspect() functions should be able to return other Objects - subject.inspect = function() { return { foo: 'bar' }; }; + subject.inspect = () => ({ foo: 'bar' }); assert.strictEqual(util.inspect(subject), '{ foo: \'bar\' }'); - subject.inspect = function(depth, opts) { + subject.inspect = (depth, opts) => { assert.strictEqual(opts.customInspectOptions, true); }; @@ -574,7 +604,7 @@ assert.doesNotThrow(function() { { // "customInspect" option can enable/disable calling [util.inspect.custom]() - const subject = { [util.inspect.custom]: function() { return 123; } }; + const subject = { [util.inspect.custom]: () => 123 }; assert.strictEqual( util.inspect(subject, { customInspect: true }).includes('123'), @@ -586,11 +616,11 @@ assert.doesNotThrow(function() { ); // a custom [util.inspect.custom]() should be able to return other Objects - subject[util.inspect.custom] = function() { return { foo: 'bar' }; }; + subject[util.inspect.custom] = () => ({ foo: 'bar' }); assert.strictEqual(util.inspect(subject), '{ foo: \'bar\' }'); - subject[util.inspect.custom] = function(depth, opts) { + subject[util.inspect.custom] = (depth, opts) => { assert.strictEqual(opts.customInspectOptions, true); }; @@ -628,38 +658,32 @@ assert.doesNotThrow(function() { '{ a: 123, inspect: [Function: inspect] }'); const subject = { a: 123, [util.inspect.custom]() { return this; } }; - assert.strictEqual(util.inspect(subject), - '{ a: 123 }'); + assert.strictEqual(util.inspect(subject), '{ a: 123 }'); } // util.inspect with "colors" option should produce as many lines as without it -function test_lines(input) { - const count_lines = function(str) { - return (str.match(/\n/g) || []).length; - }; +{ + function testLines(input) { + const countLines = (str) => (str.match(/\n/g) || []).length; + const withoutColor = util.inspect(input); + const withColor = util.inspect(input, {colors: true}); + assert.strictEqual(countLines(withoutColor), countLines(withColor)); + } - const without_color = util.inspect(input); - const with_color = util.inspect(input, {colors: true}); - assert.strictEqual(count_lines(without_color), count_lines(with_color)); + const bigArray = new Array(100).fill().map((value, index) => index); + + testLines([1, 2, 3, 4, 5, 6, 7]); + testLines(bigArray); + testLines({foo: 'bar', baz: 35, b: {a: 35}}); + testLines({ + foo: 'bar', + baz: 35, + b: {a: 35}, + veryLongKey: 'very long value', + evenLongerKey: ['with even longer value in array'] + }); } -test_lines([1, 2, 3, 4, 5, 6, 7]); -test_lines(function() { - const big_array = []; - for (let i = 0; i < 100; i++) { - big_array.push(i); - } - return big_array; -}()); -test_lines({foo: 'bar', baz: 35, b: {a: 35}}); -test_lines({ - foo: 'bar', - baz: 35, - b: {a: 35}, - very_long_key: 'very_long_value', - even_longer_key: ['with even longer value in array'] -}); - // test boxed primitives output the correct values assert.strictEqual(util.inspect(new String('test')), '[String: \'test\']'); assert.strictEqual( @@ -674,17 +698,19 @@ assert.strictEqual(util.inspect(new Number(-1.1)), '[Number: -1.1]'); assert.strictEqual(util.inspect(new Number(13.37)), '[Number: 13.37]'); // test boxed primitives with own properties -const str = new String('baz'); -str.foo = 'bar'; -assert.strictEqual(util.inspect(str), '{ [String: \'baz\'] foo: \'bar\' }'); +{ + const str = new String('baz'); + str.foo = 'bar'; + assert.strictEqual(util.inspect(str), '{ [String: \'baz\'] foo: \'bar\' }'); -const bool = new Boolean(true); -bool.foo = 'bar'; -assert.strictEqual(util.inspect(bool), '{ [Boolean: true] foo: \'bar\' }'); + const bool = new Boolean(true); + bool.foo = 'bar'; + assert.strictEqual(util.inspect(bool), '{ [Boolean: true] foo: \'bar\' }'); -const num = new Number(13.37); -num.foo = 'bar'; -assert.strictEqual(util.inspect(num), '{ [Number: 13.37] foo: \'bar\' }'); + const num = new Number(13.37); + num.foo = 'bar'; + assert.strictEqual(util.inspect(num), '{ [Number: 13.37] foo: \'bar\' }'); +} // test es6 Symbol if (typeof Symbol !== 'undefined') { @@ -714,14 +740,16 @@ if (typeof Symbol !== 'undefined') { } // test Set -assert.strictEqual(util.inspect(new Set()), 'Set {}'); -assert.strictEqual(util.inspect(new Set([1, 2, 3])), 'Set { 1, 2, 3 }'); -const set = new Set(['foo']); -set.bar = 42; -assert.strictEqual( - util.inspect(set, true), - 'Set { \'foo\', [size]: 1, bar: 42 }' -); +{ + assert.strictEqual(util.inspect(new Set()), 'Set {}'); + assert.strictEqual(util.inspect(new Set([1, 2, 3])), 'Set { 1, 2, 3 }'); + const set = new Set(['foo']); + set.bar = 42; + assert.strictEqual( + util.inspect(set, true), + 'Set { \'foo\', [size]: 1, bar: 42 }' + ); +} // test Map { @@ -735,83 +763,92 @@ assert.strictEqual( } // test Promise -assert.strictEqual(util.inspect(Promise.resolve(3)), 'Promise { 3 }'); - { + const resolved = Promise.resolve(3); + assert.strictEqual(util.inspect(resolved), 'Promise { 3 }'); + const rejected = Promise.reject(3); assert.strictEqual(util.inspect(rejected), 'Promise { 3 }'); // squelch UnhandledPromiseRejection rejected.catch(() => {}); -} -assert.strictEqual( - util.inspect(new Promise(function() {})), - 'Promise { }' -); -const promise = Promise.resolve('foo'); -promise.bar = 42; -assert.strictEqual(util.inspect(promise), 'Promise { \'foo\', bar: 42 }'); + const pending = new Promise(() => {}); + assert.strictEqual(util.inspect(pending), 'Promise { }'); + + const promiseWithProperty = Promise.resolve('foo'); + promiseWithProperty.bar = 42; + assert.strictEqual(util.inspect(promiseWithProperty), + 'Promise { \'foo\', bar: 42 }'); +} // Make sure it doesn't choke on polyfills. Unlike Set/Map, there is no standard // interface to synchronously inspect a Promise, so our techniques only work on // a bonafide native Promise. -const oldPromise = Promise; -global.Promise = function() { this.bar = 42; }; -assert.strictEqual(util.inspect(new Promise()), '{ bar: 42 }'); -global.Promise = oldPromise; - -// Map/Set Iterators -const m = new Map([['foo', 'bar']]); -assert.strictEqual(util.inspect(m.keys()), 'MapIterator { \'foo\' }'); -assert.strictEqual(util.inspect(m.values()), 'MapIterator { \'bar\' }'); -assert.strictEqual(util.inspect(m.entries()), - 'MapIterator { [ \'foo\', \'bar\' ] }'); -// make sure the iterator doesn't get consumed -let keys = m.keys(); -assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }'); -assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }'); - -const s = new Set([1, 3]); -assert.strictEqual(util.inspect(s.keys()), 'SetIterator { 1, 3 }'); -assert.strictEqual(util.inspect(s.values()), 'SetIterator { 1, 3 }'); -assert.strictEqual(util.inspect(s.entries()), - 'SetIterator { [ 1, 1 ], [ 3, 3 ] }'); -// make sure the iterator doesn't get consumed -keys = s.keys(); -assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }'); -assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }'); +{ + const oldPromise = Promise; + global.Promise = function() { this.bar = 42; }; + assert.strictEqual(util.inspect(new Promise()), '{ bar: 42 }'); + global.Promise = oldPromise; +} + +// Test Map iterators +{ + const map = new Map([['foo', 'bar']]); + assert.strictEqual(util.inspect(map.keys()), 'MapIterator { \'foo\' }'); + assert.strictEqual(util.inspect(map.values()), 'MapIterator { \'bar\' }'); + assert.strictEqual(util.inspect(map.entries()), + 'MapIterator { [ \'foo\', \'bar\' ] }'); + // make sure the iterator doesn't get consumed + const keys = map.keys(); + assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }'); + assert.strictEqual(util.inspect(keys), 'MapIterator { \'foo\' }'); +} + +// Test Set iterators +{ + const aSet = new Set([1, 3]); + assert.strictEqual(util.inspect(aSet.keys()), 'SetIterator { 1, 3 }'); + assert.strictEqual(util.inspect(aSet.values()), 'SetIterator { 1, 3 }'); + assert.strictEqual(util.inspect(aSet.entries()), + 'SetIterator { [ 1, 1 ], [ 3, 3 ] }'); + // make sure the iterator doesn't get consumed + const keys = aSet.keys(); + assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }'); + assert.strictEqual(util.inspect(keys), 'SetIterator { 1, 3 }'); +} // Test alignment of items in container // Assumes that the first numeric character is the start of an item. +{ + function checkAlignment(container) { + const lines = util.inspect(container).split('\n'); + let pos; + lines.forEach((line) => { + const npos = line.search(/\d/); + if (npos !== -1) { + if (pos !== undefined) { + assert.strictEqual(pos, npos, 'container items not aligned'); + } + pos = npos; + } + }); + } -function checkAlignment(container) { - const lines = util.inspect(container).split('\n'); - let pos; - lines.forEach(function(line) { - const npos = line.search(/\d/); - if (npos !== -1) { - if (pos !== undefined) - assert.strictEqual(pos, npos, 'container items not aligned'); - pos = npos; - } - }); -} - -const big_array = []; -for (let i = 0; i < 100; i++) { - big_array.push(i); -} + const bigArray = []; + for (let i = 0; i < 100; i++) { + bigArray.push(i); + } -checkAlignment(big_array); -checkAlignment(function() { const obj = {}; - big_array.forEach(function(v) { - obj[v] = null; + bigArray.forEach((prop) => { + obj[prop] = null; }); - return obj; -}()); -checkAlignment(new Set(big_array)); -checkAlignment(new Map(big_array.map(function(y) { return [y, null]; }))); + + checkAlignment(bigArray); + checkAlignment(obj); + checkAlignment(new Set(bigArray)); + checkAlignment(new Map(bigArray.map((number) => [number, null]))); +} // Test display of constructors @@ -832,7 +869,7 @@ checkAlignment(new Map(big_array.map(function(y) { return [y, null]; }))); 'SetSubclass { 1, 2, 3 }'); assert.strictEqual(util.inspect(new MapSubclass([['foo', 42]])), 'MapSubclass { \'foo\' => 42 }'); - assert.strictEqual(util.inspect(new PromiseSubclass(function() {})), + assert.strictEqual(util.inspect(new PromiseSubclass(() => {})), 'PromiseSubclass { }'); } @@ -868,60 +905,64 @@ checkAlignment(new Map(big_array.map(function(y) { return [y, null]; }))); // https://github.com/nodejs/node/pull/6334 is backported. { const x = new Array(101).fill(); - assert(/1 more item/.test(util.inspect(x))); + assert(util.inspect(x).endsWith('1 more item ]')); } { const x = new Array(101).fill(); - assert(!/1 more item/.test(util.inspect(x, {maxArrayLength: 101}))); + assert(!util.inspect(x, { maxArrayLength: 101 }).endsWith('1 more item ]')); } { const x = new Array(101).fill(); - assert(/^\[ ... 101 more items ]$/.test( - util.inspect(x, {maxArrayLength: 0}))); + assert.strictEqual(util.inspect(x, { maxArrayLength: 0 }), + '[ ... 101 more items ]'); } { const x = Array(101); - assert(/^\[ ... 101 more items ]$/.test( - util.inspect(x, {maxArrayLength: 0}))); + assert.strictEqual(util.inspect(x, { maxArrayLength: 0 }), + '[ ... 101 more items ]'); } { const x = new Uint8Array(101); - assert(/1 more item/.test(util.inspect(x))); + assert(util.inspect(x).endsWith('1 more item ]')); } { const x = new Uint8Array(101); - assert(!/1 more item/.test(util.inspect(x, {maxArrayLength: 101}))); + assert(!util.inspect(x, { maxArrayLength: 101 }).endsWith('1 more item ]')); } { const x = new Uint8Array(101); - assert(/\[ ... 101 more items ]$/.test( - util.inspect(x, {maxArrayLength: 0}))); + assert.strictEqual(util.inspect(x, { maxArrayLength: 0 }), + 'Uint8Array [ ... 101 more items ]'); } { const x = Array(101); - assert(!/1 more item/.test(util.inspect(x, {maxArrayLength: null}))); + assert(!util.inspect(x, { maxArrayLength: null }).endsWith('1 more item ]')); } { const x = Array(101); - assert(!/1 more item/.test(util.inspect(x, {maxArrayLength: Infinity}))); + assert(!util.inspect( + x, { maxArrayLength: Infinity } + ).endsWith('1 more item ]')); } { const x = new Uint8Array(101); - assert(!/1 more item/.test(util.inspect(x, {maxArrayLength: null}))); + assert(!util.inspect(x, { maxArrayLength: null }).endsWith('1 more item ]')); } { const x = new Uint8Array(101); - assert(!/1 more item/.test(util.inspect(x, {maxArrayLength: Infinity}))); + assert(!util.inspect( + x, { maxArrayLength: Infinity } + ).endsWith('1 more item ]')); } { From 6a5ab5d550719f416683ec0d588461b8bc9a8787 Mon Sep 17 00:00:00 2001 From: Brian White Date: Sat, 11 Mar 2017 19:41:20 -0500 Subject: [PATCH 112/485] fs: include more fs.stat*() optimizations Including: * Move async *stat() functions to FillStatsArray() now used by the sync *stat() functions * Avoid creating fs.Stats instances for implicit async/sync *stat() calls used in various fs functions * Store reference to Float64Array data on C++ side for easier/faster access, instead of passing from JS to C++ on every async/sync *stat() call PR-URL: https://github.com/nodejs/node/pull/11665 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig --- benchmark/fs/bench-stat.js | 22 ++- benchmark/fs/bench-statSync.js | 37 ++--- benchmark/fs/readFileSync.js | 17 +++ lib/fs.js | 153 +++++++++++++-------- src/env-inl.h | 10 ++ src/env.h | 6 +- src/node_file.cc | 189 ++++++-------------------- src/node_internals.h | 2 +- src/node_stat_watcher.cc | 11 +- test/parallel/test-fs-sync-fd-leak.js | 2 +- 10 files changed, 205 insertions(+), 244 deletions(-) create mode 100644 benchmark/fs/readFileSync.js diff --git a/benchmark/fs/bench-stat.js b/benchmark/fs/bench-stat.js index c0db00e27deee6..149b4f3d3bee92 100644 --- a/benchmark/fs/bench-stat.js +++ b/benchmark/fs/bench-stat.js @@ -4,20 +4,30 @@ const common = require('../common'); const fs = require('fs'); const bench = common.createBenchmark(main, { - n: [1e4], - kind: ['lstat', 'stat'] + n: [20e4], + kind: ['fstat', 'lstat', 'stat'] }); function main(conf) { const n = conf.n >>> 0; + const kind = conf.kind; + var arg; + if (kind === 'fstat') + arg = fs.openSync(__filename, 'r'); + else + arg = __filename; bench.start(); (function r(cntr, fn) { - if (cntr-- <= 0) - return bench.end(n); - fn(__filename, function() { + if (cntr-- <= 0) { + bench.end(n); + if (kind === 'fstat') + fs.closeSync(arg); + return; + } + fn(arg, function() { r(cntr, fn); }); - }(n, fs[conf.kind])); + }(n, fs[kind])); } diff --git a/benchmark/fs/bench-statSync.js b/benchmark/fs/bench-statSync.js index 4bc2ecd65a3624..57e03df3b04951 100644 --- a/benchmark/fs/bench-statSync.js +++ b/benchmark/fs/bench-statSync.js @@ -4,36 +4,23 @@ const common = require('../common'); const fs = require('fs'); const bench = common.createBenchmark(main, { - n: [1e4], + n: [1e6], kind: ['fstatSync', 'lstatSync', 'statSync'] }); function main(conf) { const n = conf.n >>> 0; - var fn; - var i; - switch (conf.kind) { - case 'statSync': - case 'lstatSync': - fn = fs[conf.kind]; - bench.start(); - for (i = 0; i < n; i++) { - fn(__filename); - } - bench.end(n); - break; - case 'fstatSync': - fn = fs.fstatSync; - const fd = fs.openSync(__filename, 'r'); - bench.start(); - for (i = 0; i < n; i++) { - fn(fd); - } - bench.end(n); - fs.closeSync(fd); - break; - default: - throw new Error('Invalid kind argument'); + const kind = conf.kind; + const arg = (kind === 'fstatSync' ? fs.openSync(__filename, 'r') : __dirname); + const fn = fs[conf.kind]; + + bench.start(); + for (var i = 0; i < n; i++) { + fn(arg); } + bench.end(n); + + if (kind === 'fstat') + fs.closeSync(arg); } diff --git a/benchmark/fs/readFileSync.js b/benchmark/fs/readFileSync.js new file mode 100644 index 00000000000000..7c8f5d240d1da9 --- /dev/null +++ b/benchmark/fs/readFileSync.js @@ -0,0 +1,17 @@ +'use strict'; + +var common = require('../common.js'); +var fs = require('fs'); + +var bench = common.createBenchmark(main, { + n: [60e4] +}); + +function main(conf) { + var n = +conf.n; + + bench.start(); + for (var i = 0; i < n; ++i) + fs.readFileSync(__filename); + bench.end(n); +} diff --git a/lib/fs.js b/lib/fs.js index d8ae0b09ba414e..7b50412ea76fa9 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -25,6 +25,7 @@ 'use strict'; const constants = process.binding('constants').fs; +const { S_IFMT, S_IFREG, S_IFLNK } = constants; const util = require('util'); const pathModule = require('path'); const { isUint8Array } = process.binding('util'); @@ -135,6 +136,24 @@ function makeCallback(cb) { }; } +// Special case of `makeCallback()` that is specific to async `*stat()` calls as +// an optimization, since the data passed back to the callback needs to be +// transformed anyway. +function makeStatsCallback(cb) { + if (cb === undefined) { + return rethrow(); + } + + if (typeof cb !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + + return function(err) { + if (err) return cb(err); + cb(err, statsFromValues()); + }; +} + function nullCheck(path, callback) { if (('' + path).indexOf('\u0000') !== -1) { var er = new Error('Path must be a string without null bytes'); @@ -151,7 +170,7 @@ function isFd(path) { return (path >>> 0) === path; } -// Static method to set the stats properties on a Stats object. +// Constructor for file stats. function Stats( dev, mode, @@ -184,41 +203,49 @@ function Stats( } fs.Stats = Stats; -// Create a C++ binding to the function which creates a Stats object. -binding.FSInitialize(fs.Stats); - -fs.Stats.prototype._checkModeProperty = function(property) { - return ((this.mode & constants.S_IFMT) === property); +Stats.prototype._checkModeProperty = function(property) { + return ((this.mode & S_IFMT) === property); }; -fs.Stats.prototype.isDirectory = function() { +Stats.prototype.isDirectory = function() { return this._checkModeProperty(constants.S_IFDIR); }; -fs.Stats.prototype.isFile = function() { - return this._checkModeProperty(constants.S_IFREG); +Stats.prototype.isFile = function() { + return this._checkModeProperty(S_IFREG); }; -fs.Stats.prototype.isBlockDevice = function() { +Stats.prototype.isBlockDevice = function() { return this._checkModeProperty(constants.S_IFBLK); }; -fs.Stats.prototype.isCharacterDevice = function() { +Stats.prototype.isCharacterDevice = function() { return this._checkModeProperty(constants.S_IFCHR); }; -fs.Stats.prototype.isSymbolicLink = function() { - return this._checkModeProperty(constants.S_IFLNK); +Stats.prototype.isSymbolicLink = function() { + return this._checkModeProperty(S_IFLNK); }; -fs.Stats.prototype.isFIFO = function() { +Stats.prototype.isFIFO = function() { return this._checkModeProperty(constants.S_IFIFO); }; -fs.Stats.prototype.isSocket = function() { +Stats.prototype.isSocket = function() { return this._checkModeProperty(constants.S_IFSOCK); }; +const statValues = binding.getStatValues(); + +function statsFromValues() { + return new Stats(statValues[0], statValues[1], statValues[2], statValues[3], + statValues[4], statValues[5], + statValues[6] < 0 ? undefined : statValues[6], statValues[7], + statValues[8], statValues[9] < 0 ? undefined : statValues[9], + statValues[10], statValues[11], statValues[12], + statValues[13]); +} + // Don't allow mode to accidentally be overwritten. ['F_OK', 'R_OK', 'W_OK', 'X_OK'].forEach(function(key) { Object.defineProperty(fs, key, { @@ -275,7 +302,7 @@ fs.exists = function(path, callback) { var req = new FSReqWrap(); req.oncomplete = cb; binding.stat(pathModule._makeLong(path), req); - function cb(err, stats) { + function cb(err) { if (callback) callback(err ? false : true); } }; @@ -284,7 +311,7 @@ fs.existsSync = function(path) { try { handleError((path = getPathFromURL(path))); nullCheck(path); - binding.stat(pathModule._makeLong(path), statValues); + binding.stat(pathModule._makeLong(path)); return true; } catch (e) { return false; @@ -387,13 +414,19 @@ function readFileAfterOpen(err, fd) { binding.fstat(fd, req); } -function readFileAfterStat(err, st) { +function readFileAfterStat(err) { var context = this.context; if (err) return context.close(err); - var size = context.size = st.isFile() ? st.size : 0; + // Use stats array directly to avoid creating an fs.Stats instance just for + // our internal use. + var size; + if ((statValues[1/*mode*/] & S_IFMT) === S_IFREG) + size = context.size = statValues[8/*size*/]; + else + size = context.size = 0; if (size === 0) { context.buffers = []; @@ -467,14 +500,13 @@ function tryToString(buf, encoding, callback) { function tryStatSync(fd, isUserFd) { var threw = true; - var st; try { - st = fs.fstatSync(fd); + binding.fstat(fd); threw = false; } finally { if (threw && !isUserFd) fs.closeSync(fd); } - return st; + return !threw; } function tryCreateBuffer(size, fd, isUserFd) { @@ -506,8 +538,13 @@ fs.readFileSync = function(path, options) { var isUserFd = isFd(path); // file descriptor ownership var fd = isUserFd ? path : fs.openSync(path, options.flag || 'r', 0o666); - var st = tryStatSync(fd, isUserFd); - var size = st.isFile() ? st.size : 0; + // Use stats array directly to avoid creating an fs.Stats instance just for + // our internal use. + var size; + if (tryStatSync(fd, isUserFd) && (statValues[1/*mode*/] & S_IFMT) === S_IFREG) + size = statValues[8/*size*/]; + else + size = 0; var pos = 0; var buffer; // single buffer with file data var buffers; // list for when size is unknown @@ -854,12 +891,12 @@ fs.readdirSync = function(path, options) { fs.fstat = function(fd, callback) { var req = new FSReqWrap(); - req.oncomplete = makeCallback(callback); + req.oncomplete = makeStatsCallback(callback); binding.fstat(fd, req); }; fs.lstat = function(path, callback) { - callback = makeCallback(callback); + callback = makeStatsCallback(callback); if (handleError((path = getPathFromURL(path)), callback)) return; if (!nullCheck(path, callback)) return; @@ -869,7 +906,7 @@ fs.lstat = function(path, callback) { }; fs.stat = function(path, callback) { - callback = makeCallback(callback); + callback = makeStatsCallback(callback); if (handleError((path = getPathFromURL(path)), callback)) return; if (!nullCheck(path, callback)) return; @@ -878,32 +915,22 @@ fs.stat = function(path, callback) { binding.stat(pathModule._makeLong(path), req); }; -const statValues = new Float64Array(14); -function statsFromValues() { - return new Stats(statValues[0], statValues[1], statValues[2], statValues[3], - statValues[4], statValues[5], - statValues[6] < 0 ? undefined : statValues[6], statValues[7], - statValues[8], statValues[9] < 0 ? undefined : statValues[9], - statValues[10], statValues[11], statValues[12], - statValues[13]); -} - fs.fstatSync = function(fd) { - binding.fstat(fd, statValues); + binding.fstat(fd); return statsFromValues(); }; fs.lstatSync = function(path) { handleError((path = getPathFromURL(path))); nullCheck(path); - binding.lstat(pathModule._makeLong(path), statValues); + binding.lstat(pathModule._makeLong(path)); return statsFromValues(); }; fs.statSync = function(path) { handleError((path = getPathFromURL(path))); nullCheck(path); - binding.stat(pathModule._makeLong(path), statValues); + binding.stat(pathModule._makeLong(path)); return statsFromValues(); }; @@ -1380,6 +1407,15 @@ function emitStop(self) { self.emit('stop'); } +function statsFromPrevValues() { + return new Stats(statValues[14], statValues[15], statValues[16], + statValues[17], statValues[18], statValues[19], + statValues[20] < 0 ? undefined : statValues[20], + statValues[21], statValues[22], + statValues[23] < 0 ? undefined : statValues[23], + statValues[24], statValues[25], statValues[26], + statValues[27]); +} function StatWatcher() { EventEmitter.call(this); @@ -1390,13 +1426,13 @@ function StatWatcher() { // the sake of backwards compatibility var oldStatus = -1; - this._handle.onchange = function(current, previous, newStatus) { + this._handle.onchange = function(newStatus) { if (oldStatus === -1 && newStatus === -1 && - current.nlink === previous.nlink) return; + statValues[2/*new nlink*/] === statValues[16/*old nlink*/]) return; oldStatus = newStatus; - self.emit('change', current, previous); + self.emit('change', statsFromValues(), statsFromPrevValues()); }; this._handle.onstop = function() { @@ -1544,7 +1580,7 @@ fs.realpathSync = function realpathSync(p, options) { // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { - fs.lstatSync(base); + binding.lstat(pathModule._makeLong(base)); knownHard[base] = true; } @@ -1576,8 +1612,12 @@ fs.realpathSync = function realpathSync(p, options) { if (maybeCachedResolved) { resolvedLink = maybeCachedResolved; } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { + // Use stats array directly to avoid creating an fs.Stats instance just + // for our internal use. + + binding.lstat(pathModule._makeLong(base)); + + if ((statValues[1/*mode*/] & S_IFMT) !== S_IFLNK) { knownHard[base] = true; if (cache) cache.set(base, base); continue; @@ -1588,14 +1628,16 @@ fs.realpathSync = function realpathSync(p, options) { var linkTarget = null; var id; if (!isWindows) { - id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`; + var dev = statValues[0/*dev*/].toString(32); + var ino = statValues[7/*ino*/].toString(32); + id = `${dev}:${ino}`; if (seenLinks.hasOwnProperty(id)) { linkTarget = seenLinks[id]; } } if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); + binding.stat(pathModule._makeLong(base)); + linkTarget = binding.readlink(pathModule._makeLong(base)); } resolvedLink = pathModule.resolve(previous, linkTarget); @@ -1614,7 +1656,7 @@ fs.realpathSync = function realpathSync(p, options) { // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { - fs.lstatSync(base); + binding.lstat(pathModule._makeLong(base)); knownHard[base] = true; } } @@ -1694,11 +1736,14 @@ fs.realpath = function realpath(p, options, callback) { return fs.lstat(base, gotStat); } - function gotStat(err, stat) { + function gotStat(err) { if (err) return callback(err); + // Use stats array directly to avoid creating an fs.Stats instance just for + // our internal use. + // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { + if ((statValues[1/*mode*/] & S_IFMT) !== S_IFLNK) { knownHard[base] = true; return process.nextTick(LOOP); } @@ -1708,7 +1753,9 @@ fs.realpath = function realpath(p, options, callback) { // dev/ino always return 0 on windows, so skip the check. let id; if (!isWindows) { - id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`; + var dev = statValues[0/*ino*/].toString(32); + var ino = statValues[7/*ino*/].toString(32); + id = `${dev}:${ino}`; if (seenLinks.hasOwnProperty(id)) { return gotTarget(null, seenLinks[id], base); } diff --git a/src/env-inl.h b/src/env-inl.h index 06a9474c9d3775..978f8ca819dec1 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -199,6 +199,7 @@ inline Environment::Environment(IsolateData* isolate_data, #endif handle_cleanup_waiting_(0), http_parser_buffer_(nullptr), + fs_stats_field_array_(nullptr), context_(context->GetIsolate(), context) { // We'll be creating new objects so make sure we've entered the context. v8::HandleScope handle_scope(isolate()); @@ -380,6 +381,15 @@ inline void Environment::set_http_parser_buffer(char* buffer) { http_parser_buffer_ = buffer; } +inline double* Environment::fs_stats_field_array() const { + return fs_stats_field_array_; +} + +inline void Environment::set_fs_stats_field_array(double* fields) { + CHECK_EQ(fs_stats_field_array_, nullptr); // Should be set only once. + fs_stats_field_array_ = fields; +} + inline Environment* Environment::from_cares_timer_handle(uv_timer_t* handle) { return ContainerOf(&Environment::cares_timer_handle_, handle); } diff --git a/src/env.h b/src/env.h index 06cc517435af52..abb0e6d0e5a8a5 100644 --- a/src/env.h +++ b/src/env.h @@ -253,7 +253,6 @@ namespace node { V(context, v8::Context) \ V(domain_array, v8::Array) \ V(domains_stack_array, v8::Array) \ - V(fs_stats_constructor_function, v8::Function) \ V(generic_internal_field_template, v8::ObjectTemplate) \ V(jsstream_constructor_template, v8::FunctionTemplate) \ V(module_load_list_array, v8::Array) \ @@ -492,6 +491,9 @@ class Environment { inline char* http_parser_buffer() const; inline void set_http_parser_buffer(char* buffer); + inline double* fs_stats_field_array() const; + inline void set_fs_stats_field_array(double* fields); + inline void ThrowError(const char* errmsg); inline void ThrowTypeError(const char* errmsg); inline void ThrowRangeError(const char* errmsg); @@ -600,6 +602,8 @@ class Environment { char* http_parser_buffer_; + double* fs_stats_field_array_; + #define V(PropertyName, TypeName) \ v8::Persistent PropertyName ## _; ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES(V) diff --git a/src/node_file.cc b/src/node_file.cc index 8e738fb8bfa8d3..9c180833fb926f 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -50,7 +50,6 @@ namespace node { using v8::Array; using v8::ArrayBuffer; using v8::Context; -using v8::EscapableHandleScope; using v8::Float64Array; using v8::Function; using v8::FunctionCallbackInfo; @@ -211,6 +210,14 @@ static void After(uv_fs_t *req) { argc = 1; break; + case UV_FS_STAT: + case UV_FS_LSTAT: + case UV_FS_FSTAT: + argc = 1; + FillStatsArray(env->fs_stats_field_array(), + static_cast(req->ptr)); + break; + case UV_FS_UTIME: case UV_FS_FUTIME: argc = 0; @@ -224,13 +231,6 @@ static void After(uv_fs_t *req) { argv[1] = Integer::New(env->isolate(), req->result); break; - case UV_FS_STAT: - case UV_FS_LSTAT: - case UV_FS_FSTAT: - argv[1] = BuildStatsObject(env, - static_cast(req->ptr)); - break; - case UV_FS_MKDTEMP: link = StringBytes::Encode(env->isolate(), static_cast(req->path), @@ -441,116 +441,6 @@ static void Close(const FunctionCallbackInfo& args) { } -Local BuildStatsObject(Environment* env, const uv_stat_t* s) { - EscapableHandleScope handle_scope(env->isolate()); - - // If you hit this assertion, you forgot to enter the v8::Context first. - CHECK_EQ(env->context(), env->isolate()->GetCurrentContext()); - - // The code below is very nasty-looking but it prevents a segmentation fault - // when people run JS code like the snippet below. It's apparently more - // common than you would expect, several people have reported this crash... - // - // function crash() { - // fs.statSync('.'); - // crash(); - // } - // - // We need to check the return value of Number::New() and Date::New() - // and make sure that we bail out when V8 returns an empty handle. - - // Unsigned integers. It does not actually seem to be specified whether - // uid and gid are unsigned or not, but in practice they are unsigned, - // and Node’s (F)Chown functions do check their arguments for unsignedness. -#define X(name) \ - Local name = Integer::NewFromUnsigned(env->isolate(), s->st_##name); \ - if (name.IsEmpty()) \ - return Local(); \ - - X(uid) - X(gid) -# if defined(__POSIX__) - X(blksize) -# else - Local blksize = Undefined(env->isolate()); -# endif -#undef X - - // Integers. -#define X(name) \ - Local name = Integer::New(env->isolate(), s->st_##name); \ - if (name.IsEmpty()) \ - return Local(); \ - - X(dev) - X(mode) - X(nlink) - X(rdev) -#undef X - - // Numbers. -#define X(name) \ - Local name = Number::New(env->isolate(), \ - static_cast(s->st_##name)); \ - if (name.IsEmpty()) \ - return Local(); \ - - X(ino) - X(size) -# if defined(__POSIX__) - X(blocks) -# else - Local blocks = Undefined(env->isolate()); -# endif -#undef X - - // Dates. -#define X(name) \ - Local name##_msec = \ - Number::New(env->isolate(), \ - (static_cast(s->st_##name.tv_sec) * 1000) + \ - (static_cast(s->st_##name.tv_nsec / 1000000))); \ - \ - if (name##_msec.IsEmpty()) \ - return Local(); \ - - X(atim) - X(mtim) - X(ctim) - X(birthtim) -#undef X - - // Pass stats as the first argument, this is the object we are modifying. - Local argv[] = { - dev, - mode, - nlink, - uid, - gid, - rdev, - blksize, - ino, - size, - blocks, - atim_msec, - mtim_msec, - ctim_msec, - birthtim_msec - }; - - // Call out to JavaScript to create the stats object. - Local stats = - env->fs_stats_constructor_function()->NewInstance( - env->context(), - arraysize(argv), - argv).FromMaybe(Local()); - - if (stats.IsEmpty()) - return handle_scope.Escape(Local()); - - return handle_scope.Escape(stats); -} - void FillStatsArray(double* fields, const uv_stat_t* s) { fields[0] = s->st_dev; fields[1] = s->st_mode; @@ -666,15 +556,12 @@ static void Stat(const FunctionCallbackInfo& args) { BufferValue path(env->isolate(), args[0]); ASSERT_PATH(path) - if (args[1]->IsFloat64Array()) { - Local array = args[1].As(); - CHECK_EQ(array->Length(), 14); - Local ab = array->Buffer(); - double* fields = static_cast(ab->GetContents().Data()); - SYNC_CALL(stat, *path, *path) - FillStatsArray(fields, static_cast(SYNC_REQ.ptr)); - } else if (args[1]->IsObject()) { + if (args[1]->IsObject()) { ASYNC_CALL(stat, args[1], UTF8, *path) + } else { + SYNC_CALL(stat, *path, *path) + FillStatsArray(env->fs_stats_field_array(), + static_cast(SYNC_REQ.ptr)); } } @@ -687,15 +574,12 @@ static void LStat(const FunctionCallbackInfo& args) { BufferValue path(env->isolate(), args[0]); ASSERT_PATH(path) - if (args[1]->IsFloat64Array()) { - Local array = args[1].As(); - CHECK_EQ(array->Length(), 14); - Local ab = array->Buffer(); - double* fields = static_cast(ab->GetContents().Data()); - SYNC_CALL(lstat, *path, *path) - FillStatsArray(fields, static_cast(SYNC_REQ.ptr)); - } else if (args[1]->IsObject()) { + if (args[1]->IsObject()) { ASYNC_CALL(lstat, args[1], UTF8, *path) + } else { + SYNC_CALL(lstat, *path, *path) + FillStatsArray(env->fs_stats_field_array(), + static_cast(SYNC_REQ.ptr)); } } @@ -709,15 +593,12 @@ static void FStat(const FunctionCallbackInfo& args) { int fd = args[0]->Int32Value(); - if (args[1]->IsFloat64Array()) { - Local array = args[1].As(); - CHECK_EQ(array->Length(), 14); - Local ab = array->Buffer(); - double* fields = static_cast(ab->GetContents().Data()); - SYNC_CALL(fstat, 0, fd) - FillStatsArray(fields, static_cast(SYNC_REQ.ptr)); - } else if (args[1]->IsObject()) { + if (args[1]->IsObject()) { ASYNC_CALL(fstat, args[1], UTF8, fd) + } else { + SYNC_CALL(fstat, nullptr, fd) + FillStatsArray(env->fs_stats_field_array(), + static_cast(SYNC_REQ.ptr)); } } @@ -1496,12 +1377,20 @@ static void Mkdtemp(const FunctionCallbackInfo& args) { } } -void FSInitialize(const FunctionCallbackInfo& args) { - Local stats_constructor = args[0].As(); - CHECK(stats_constructor->IsFunction()); - +void GetStatValues(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - env->set_fs_stats_constructor_function(stats_constructor); + double* fields = env->fs_stats_field_array(); + if (fields == nullptr) { + // stat fields contains twice the number of entries because `fs.StatWatcher` + // needs room to store data for *two* `fs.Stats` instances. + fields = new double[2 * 14]; + env->set_fs_stats_field_array(fields); + } + Local ab = ArrayBuffer::New(env->isolate(), + fields, + sizeof(double) * 2 * 14); + Local fields_array = Float64Array::New(ab, 0, 2 * 14); + args.GetReturnValue().Set(fields_array); } void InitFs(Local target, @@ -1510,10 +1399,6 @@ void InitFs(Local target, void* priv) { Environment* env = Environment::GetCurrent(context); - // Function which creates a new Stats object. - target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "FSInitialize"), - env->NewFunctionTemplate(FSInitialize)->GetFunction()); - env->SetMethod(target, "access", Access); env->SetMethod(target, "close", Close); env->SetMethod(target, "open", Open); @@ -1552,6 +1437,8 @@ void InitFs(Local target, env->SetMethod(target, "mkdtemp", Mkdtemp); + env->SetMethod(target, "getStatValues", GetStatValues); + StatWatcher::Initialize(env, target); // Create FunctionTemplate for FSReqWrap diff --git a/src/node_internals.h b/src/node_internals.h index ff1f1cd11dba4e..0ee694a2284707 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -162,7 +162,7 @@ NO_RETURN void FatalError(const char* location, const char* message); void ProcessEmitWarning(Environment* env, const char* fmt, ...); -v8::Local BuildStatsObject(Environment* env, const uv_stat_t* s); +void FillStatsArray(double* fields, const uv_stat_t* s); void SetupProcessObject(Environment* env, int argc, diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index 9289efcf3e5a3d..9eeed77476be56 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -86,12 +86,11 @@ void StatWatcher::Callback(uv_fs_poll_t* handle, Environment* env = wrap->env(); HandleScope handle_scope(env->isolate()); Context::Scope context_scope(env->context()); - Local argv[] = { - BuildStatsObject(env, curr), - BuildStatsObject(env, prev), - Integer::New(env->isolate(), status) - }; - wrap->MakeCallback(env->onchange_string(), arraysize(argv), argv); + + FillStatsArray(env->fs_stats_field_array(), curr); + FillStatsArray(env->fs_stats_field_array() + 14, prev); + Local arg = Integer::New(env->isolate(), status); + wrap->MakeCallback(env->onchange_string(), 1, &arg); } diff --git a/test/parallel/test-fs-sync-fd-leak.js b/test/parallel/test-fs-sync-fd-leak.js index 10b09481ddefb9..7e785ea3a2a82b 100644 --- a/test/parallel/test-fs-sync-fd-leak.js +++ b/test/parallel/test-fs-sync-fd-leak.js @@ -39,7 +39,7 @@ fs.writeSync = function() { throw new Error('BAM'); }; -fs.fstatSync = function() { +process.binding('fs').fstat = function() { throw new Error('BAM'); }; From 71097744b265fd0966935d9f2fd7efda3d8fb370 Mon Sep 17 00:00:00 2001 From: Brian White Date: Sat, 11 Mar 2017 23:59:37 -0500 Subject: [PATCH 113/485] fs: more realpath*() optimizations Including: * Skip URL instance check for common (string) cases * Avoid regexp on non-Windows platforms when parsing the root of a path * Skip call to `getOptions()` in common case where no `options` is passed * Avoid `hasOwnProperty()` PR-URL: https://github.com/nodejs/node/pull/11665 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig --- lib/fs.js | 96 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 40 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 7b50412ea76fa9..8a028bf79943e7 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -43,6 +43,7 @@ const internalUtil = require('internal/util'); const assertEncoding = internalFS.assertEncoding; const stringToFlags = internalFS.stringToFlags; const getPathFromURL = internalURL.getPathFromURL; +const { StorageObject } = require('internal/querystring'); Object.defineProperty(exports, 'constants', { configurable: false, @@ -1514,10 +1515,23 @@ fs.unwatchFile = function(filename, listener) { }; -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -const splitRootRe = isWindows ? - /^(?:[a-zA-Z]:|[\\/]{2}[^\\/]+[\\/][^\\/]+)?[\\/]*/ : - /^[/]*/; +var splitRoot; +if (isWindows) { + // Regex to find the device root on Windows (e.g. 'c:\\'), including trailing + // slash. + const splitRootRe = /^(?:[a-zA-Z]:|[\\/]{2}[^\\/]+[\\/][^\\/]+)?[\\/]*/; + splitRoot = function splitRoot(str) { + return splitRootRe.exec(str)[0]; + }; +} else { + splitRoot = function splitRoot(str) { + for (var i = 0; i < str.length; ++i) { + if (str.charCodeAt(i) !== 47/*'/'*/) + return str.slice(0, i); + } + return str; + }; +} function encodeRealpathResult(result, options) { if (!options || !options.encoding || options.encoding === 'utf8') @@ -1545,11 +1559,17 @@ if (isWindows) { nextPart = function nextPart(p, i) { return p.indexOf('/', i); }; } +const emptyObj = new StorageObject(); fs.realpathSync = function realpathSync(p, options) { - options = getOptions(options, {}); - handleError((p = getPathFromURL(p))); - if (typeof p !== 'string') - p += ''; + if (!options) + options = emptyObj; + else + options = getOptions(options, emptyObj); + if (typeof p !== 'string') { + handleError((p = getPathFromURL(p))); + if (typeof p !== 'string') + p += ''; + } nullCheck(p); p = pathModule.resolve(p); @@ -1559,8 +1579,8 @@ fs.realpathSync = function realpathSync(p, options) { return maybeCachedResult; } - const seenLinks = {}; - const knownHard = {}; + const seenLinks = new StorageObject(); + const knownHard = new StorageObject(); const original = p; // current character position in p @@ -1573,10 +1593,8 @@ fs.realpathSync = function realpathSync(p, options) { var previous; // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; + current = base = splitRoot(p); + pos = current.length; // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { @@ -1615,7 +1633,8 @@ fs.realpathSync = function realpathSync(p, options) { // Use stats array directly to avoid creating an fs.Stats instance just // for our internal use. - binding.lstat(pathModule._makeLong(base)); + var baseLong = pathModule._makeLong(base); + binding.lstat(baseLong); if ((statValues[1/*mode*/] & S_IFMT) !== S_IFLNK) { knownHard[base] = true; @@ -1631,13 +1650,13 @@ fs.realpathSync = function realpathSync(p, options) { var dev = statValues[0/*dev*/].toString(32); var ino = statValues[7/*ino*/].toString(32); id = `${dev}:${ino}`; - if (seenLinks.hasOwnProperty(id)) { + if (seenLinks[id]) { linkTarget = seenLinks[id]; } } if (linkTarget === null) { - binding.stat(pathModule._makeLong(base)); - linkTarget = binding.readlink(pathModule._makeLong(base)); + binding.stat(baseLong); + linkTarget = binding.readlink(baseLong); } resolvedLink = pathModule.resolve(previous, linkTarget); @@ -1649,10 +1668,8 @@ fs.realpathSync = function realpathSync(p, options) { p = pathModule.resolve(resolvedLink, p.slice(pos)); // Skip over roots - m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; + current = base = splitRoot(p); + pos = current.length; // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { @@ -1668,17 +1685,22 @@ fs.realpathSync = function realpathSync(p, options) { fs.realpath = function realpath(p, options, callback) { callback = maybeCallback(typeof options === 'function' ? options : callback); - options = getOptions(options, {}); - if (handleError((p = getPathFromURL(p)), callback)) - return; - if (typeof p !== 'string') - p += ''; + if (!options) + options = emptyObj; + else + options = getOptions(options, emptyObj); + if (typeof p !== 'string') { + if (handleError((p = getPathFromURL(p)), callback)) + return; + if (typeof p !== 'string') + p += ''; + } if (!nullCheck(p, callback)) return; p = pathModule.resolve(p); - const seenLinks = {}; - const knownHard = {}; + const seenLinks = new StorageObject(); + const knownHard = new StorageObject(); // current character position in p var pos; @@ -1689,11 +1711,8 @@ fs.realpath = function realpath(p, options, callback) { // the partial path scanned in the previous round, with slash var previous; - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; + current = base = splitRoot(p); + pos = current.length; // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { @@ -1756,7 +1775,7 @@ fs.realpath = function realpath(p, options, callback) { var dev = statValues[0/*ino*/].toString(32); var ino = statValues[7/*ino*/].toString(32); id = `${dev}:${ino}`; - if (seenLinks.hasOwnProperty(id)) { + if (seenLinks[id]) { return gotTarget(null, seenLinks[id], base); } } @@ -1780,11 +1799,8 @@ fs.realpath = function realpath(p, options, callback) { function gotResolvedLink(resolvedLink) { // resolve the link, then start over p = pathModule.resolve(resolvedLink, p.slice(pos)); - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; + current = base = splitRoot(p); + pos = current.length; // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { From 1a210c4ee4a5e0757faf50f1bf244dcf1fa48654 Mon Sep 17 00:00:00 2001 From: AnnaMag Date: Thu, 9 Mar 2017 14:00:34 +0000 Subject: [PATCH 114/485] test: added test for indexed properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, indexed properties are correctly copied onto the sandbox by CopyProperties(). This will break when CopyProperties() is removed after adjusting NamedPropertyHandlerConfiguration config() to use property callbacks from the new V8 API. To fix it, we will set a config for indexed properties. This test is a preparation step for the patch that removes CopyProperties(). PR-URL: https://github.com/nodejs/node/pull/11769 Reviewed-By: Franziska Hinkelmann Reviewed-By: Michaël Zasso Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Brian White --- test/parallel/test-vm-indexed-properties.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/parallel/test-vm-indexed-properties.js diff --git a/test/parallel/test-vm-indexed-properties.js b/test/parallel/test-vm-indexed-properties.js new file mode 100644 index 00000000000000..34ef8d020b2181 --- /dev/null +++ b/test/parallel/test-vm-indexed-properties.js @@ -0,0 +1,17 @@ +'use strict'; + +require('../common'); +const assert = require('assert'); +const vm = require('vm'); + +const code = `Object.defineProperty(this, 99, { + value: 20, + enumerable: true + });`; + + +const sandbox = {}; +const ctx = vm.createContext(sandbox); +vm.runInContext(code, ctx); + +assert.strictEqual(sandbox[99], 20); From db277f00fe1b6f1fc9dea0bac6fc64be4bd84163 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 13 Mar 2017 20:46:57 -0700 Subject: [PATCH 115/485] readline: remove unneeded eslint-disable comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove a comment disabling an ESLint rule that is not triggered by the code anyway. PR-URL: https://github.com/nodejs/node/pull/11836 Reviewed-By: Colin Ihrig Reviewed-By: Yuta Hiroto Reviewed-By: Teddy Katz Reviewed-By: Michaël Zasso Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Franziska Hinkelmann --- lib/internal/readline.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/readline.js b/lib/internal/readline.js index 60fe946560aaaa..9f1884ad0ea9e1 100644 --- a/lib/internal/readline.js +++ b/lib/internal/readline.js @@ -1,7 +1,6 @@ 'use strict'; // Regex used for ansi escape code splitting -// eslint-disable-next-line no-control-regex // Adopted from https://github.com/chalk/ansi-regex/blob/master/index.js // License: MIT, authors: @sindresorhus, Qix-, and arjunmehta // Matches all ansi escape code sequences in a string From 5bd1642dd1797b6f1c016dfbaf6cf3c96075ac79 Mon Sep 17 00:00:00 2001 From: mr-spd Date: Mon, 13 Mar 2017 17:38:32 +0100 Subject: [PATCH 116/485] lib: remove unused msg parameter in debug_agent Removed the msg parameter in the Client function of _debug_agent.js, because it is unused. PR-URL: https://github.com/nodejs/node/pull/11833 Reviewed-By: James M Snell Reviewed-By: Daniel Bevenius Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig Reviewed-By: Yuta Hiroto Reviewed-By: Franziska Hinkelmann Reviewed-By: Jackson Tian --- lib/_debug_agent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_debug_agent.js b/lib/_debug_agent.js index 58293b17f84db5..fd89d5a5cc5211 100644 --- a/lib/_debug_agent.js +++ b/lib/_debug_agent.js @@ -108,7 +108,7 @@ function Client(agent, socket) { } util.inherits(Client, Transform); -Client.prototype.destroy = function destroy(msg) { +Client.prototype.destroy = function destroy() { this.socket.destroy(); this.emit('close'); From b5eccc4c7eb634eabbc00ef0e72df6ce0b4c0377 Mon Sep 17 00:00:00 2001 From: DavidCai Date: Tue, 14 Mar 2017 00:11:35 +0800 Subject: [PATCH 117/485] lib, test: add duplicate symbol checking in E() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add duplicate symbol checking in E() to avoid potential confusing result. Increase coverage of internal/errors. PR-URL: https://github.com/nodejs/node/pull/11829 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: Franziska Hinkelmann --- lib/internal/errors.js | 2 ++ test/parallel/test-internal-errors.js | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index f2376f70371c60..3cab1409422d6f 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -60,6 +60,8 @@ function message(key, args) { // Utility function for registering the error codes. Only used here. Exported // *only* to allow for testing. function E(sym, val) { + const assert = lazyAssert(); + assert(messages.has(sym) === false, `Error symbol: ${sym} was already used.`); messages.set(sym, typeof val === 'function' ? val : String(val)); } diff --git a/test/parallel/test-internal-errors.js b/test/parallel/test-internal-errors.js index 354209fbadaade..014a0a7a038c6e 100644 --- a/test/parallel/test-internal-errors.js +++ b/test/parallel/test-internal-errors.js @@ -12,6 +12,7 @@ const err1 = new errors.Error('TEST_ERROR_1', 'test'); const err2 = new errors.TypeError('TEST_ERROR_1', 'test'); const err3 = new errors.RangeError('TEST_ERROR_1', 'test'); const err4 = new errors.Error('TEST_ERROR_2', 'abc', 'xyz'); +const err5 = new errors.Error('TEST_ERROR_1'); assert(err1 instanceof Error); assert.strictEqual(err1.name, 'Error[TEST_ERROR_1]'); @@ -33,6 +34,11 @@ assert.strictEqual(err4.name, 'Error[TEST_ERROR_2]'); assert.strictEqual(err4.message, 'abc xyz'); assert.strictEqual(err4.code, 'TEST_ERROR_2'); +assert(err5 instanceof Error); +assert.strictEqual(err5.name, 'Error[TEST_ERROR_1]'); +assert.strictEqual(err5.message, 'Error for testing purposes: %s'); +assert.strictEqual(err5.code, 'TEST_ERROR_1'); + assert.throws( () => new errors.Error('TEST_FOO_KEY'), /^AssertionError: An invalid error message key was used: TEST_FOO_KEY.$/); @@ -118,3 +124,9 @@ assert.throws(() => { type: TypeError, message: /^Error for testing 2/ })); }, /AssertionError: .+ does not match \S/); + +assert.doesNotThrow(() => errors.E('TEST_ERROR_USED_SYMBOL')); +assert.throws( + () => errors.E('TEST_ERROR_USED_SYMBOL'), + /^AssertionError: Error symbol: TEST_ERROR_USED_SYMBOL was already used\.$/ +); From e296ffb36018891a21b4152e4358b4f3a0c99f6d Mon Sep 17 00:00:00 2001 From: Christian d'Heureuse Date: Sun, 12 Mar 2017 02:35:42 +0100 Subject: [PATCH 118/485] doc: fix mistakes in stream doc (object mode) This patch fixes some trivial documentation mistakes for streams operating in object mode. For `unshift()`, `_write()`, `push()` and `_transform()`, the data type of the `chunk` parameter is extended with `any` and the description is corrected to take into account that streams can operate in object mode. PR-URL: https://github.com/nodejs/node/pull/11807 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig Reviewed-By: Franziska Hinkelmann Reviewed-By: Anna Henningsen --- doc/api/stream.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 75cba6fd514bd2..289250c638ff15 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -981,7 +981,7 @@ setTimeout(() => { added: v0.9.11 --> -* `chunk` {Buffer|string} Chunk of data to unshift onto the read queue +* `chunk` {Buffer|string|any} Chunk of data to unshift onto the read queue The `readable.unshift()` method pushes a chunk of data back into the internal buffer. This is useful in certain situations where a stream is being consumed by @@ -1295,8 +1295,9 @@ const myWritable = new Writable({ #### writable.\_write(chunk, encoding, callback) -* `chunk` {Buffer|string} The chunk to be written. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. +* `chunk` {Buffer|string|any} The chunk to be written. Will **always** + be a buffer unless the `decodeStrings` option was set to `false` + or the stream is operating in object mode. * `encoding` {string} If the chunk is a string, then `encoding` is the character encoding of that string. If chunk is a `Buffer`, or if the stream is operating in object mode, `encoding` may be ignored. @@ -1500,13 +1501,13 @@ user programs. #### readable.push(chunk[, encoding]) -* `chunk` {Buffer|null|string} Chunk of data to push into the read queue +* `chunk` {Buffer|null|string|any} Chunk of data to push into the read queue * `encoding` {string} Encoding of String chunks. Must be a valid Buffer encoding, such as `'utf8'` or `'ascii'` * Returns {boolean} `true` if additional chunks of data may continued to be pushed; `false` otherwise. -When `chunk` is a `Buffer` or `string`, the `chunk` of data will be added to the +When `chunk` is not `null`, the `chunk` of data will be added to the internal queue for users of the stream to consume. Passing `chunk` as `null` signals the end of the stream (EOF), after which no more data can be written. @@ -1873,8 +1874,9 @@ user programs. #### transform.\_transform(chunk, encoding, callback) -* `chunk` {Buffer|string} The chunk to be transformed. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. +* `chunk` {Buffer|string|any} The chunk to be transformed. Will **always** + be a buffer unless the `decodeStrings` option was set to `false` + or the stream is operating in object mode. * `encoding` {string} If the chunk is a string, then this is the encoding type. If chunk is a buffer, then this is the special value - 'buffer', ignore it in this case. From 474e9d64b54b91f6c38454d5e7700337b4c54406 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 10 Mar 2017 09:55:36 +0800 Subject: [PATCH 119/485] test: add more test cases of server.listen option * Test listening with different handle and fd * Test listening without callback PR-URL: https://github.com/nodejs/node/pull/11778/ Reviewed-By: James M Snell Reviewed-By: Sam Roberts --- .../parallel/test-net-server-listen-handle.js | 152 ++++++++++++++++++ .../test-net-server-listen-options.js | 5 + test/parallel/test-net-server-listen-path.js | 49 ++++++ 3 files changed, 206 insertions(+) create mode 100644 test/parallel/test-net-server-listen-handle.js create mode 100644 test/parallel/test-net-server-listen-path.js diff --git a/test/parallel/test-net-server-listen-handle.js b/test/parallel/test-net-server-listen-handle.js new file mode 100644 index 00000000000000..8d25d885770d0a --- /dev/null +++ b/test/parallel/test-net-server-listen-handle.js @@ -0,0 +1,152 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const fs = require('fs'); +const uv = process.binding('uv'); +const TCP = process.binding('tcp_wrap').TCP; +const Pipe = process.binding('pipe_wrap').Pipe; + +common.refreshTmpDir(); + +function closeServer() { + return common.mustCall(function() { + this.close(); + }); +} + +// server.listen(pipe) creates a new pipe wrap, +// so server.close() doesn't actually unlink this existing pipe. +// It needs to be unlinked separately via handle.close() +function closePipeServer(handle) { + return common.mustCall(function() { + this.close(); + handle.close(); + }); +} + +let counter = 0; + +// Avoid conflict with listen-path +function randomPipePath() { + return common.PIPE + '-listen-handle-' + (counter++); +} + +function randomHandle(type) { + let handle, errno, handleName; + if (type === 'tcp') { + handle = new TCP(); + errno = handle.bind('0.0.0.0', 0); + handleName = 'arbitrary tcp port'; + } else { + const path = randomPipePath(); + handle = new Pipe(); + errno = handle.bind(path); + handleName = `pipe ${path}`; + } + + if (errno < 0) { // uv.errname requires err < 0 + assert(errno >= 0, `unable to bind ${handleName}: ${uv.errname(errno)}`); + } + if (!common.isWindows) { // fd doesn't work on windows + // err >= 0 but fd = -1, should not happen + assert.notStrictEqual(handle.fd, -1, + `Bound ${handleName} has fd -1 and errno ${errno}`); + } + return handle; +} + +// Not a public API, used by child_process +{ + // Test listen(tcp) + net.createServer() + .listen(randomHandle('tcp')) + .on('listening', closeServer()); + // Test listen(tcp, cb) + net.createServer() + .listen(randomHandle('tcp'), closeServer()); +} + +function randomPipes(number) { + const arr = []; + for (let i = 0; i < number; ++i) { + arr.push(randomHandle('pipe')); + } + return arr; +} + +// Not a public API, used by child_process +if (!common.isWindows) { // Windows doesn't support {fd: } + const handles = randomPipes(2); // generate pipes in advance + // Test listen(pipe) + net.createServer() + .listen(handles[0]) + .on('listening', closePipeServer(handles[0])); + // Test listen(pipe, cb) + net.createServer() + .listen(handles[1], closePipeServer(handles[1])); +} + +{ + // Test listen({handle: tcp}, cb) + net.createServer() + .listen({handle: randomHandle('tcp')}, closeServer()); + // Test listen({handle: tcp}) + net.createServer() + .listen({handle: randomHandle('tcp')}) + .on('listening', closeServer()); + // Test listen({_handle: tcp}, cb) + net.createServer() + .listen({_handle: randomHandle('tcp')}, closeServer()); + // Test listen({_handle: tcp}) + net.createServer() + .listen({_handle: randomHandle('tcp')}) + .on('listening', closeServer()); +} + +if (!common.isWindows) { // Windows doesn't support {fd: } + // Test listen({fd: tcp.fd}, cb) + net.createServer() + .listen({fd: randomHandle('tcp').fd}, closeServer()); + // Test listen({fd: tcp.fd}) + net.createServer() + .listen({fd: randomHandle('tcp').fd}) + .on('listening', closeServer()); +} + +if (!common.isWindows) { // Windows doesn't support {fd: } + const handles = randomPipes(6); // generate pipes in advance + // Test listen({handle: pipe}, cb) + net.createServer() + .listen({handle: handles[0]}, closePipeServer(handles[0])); + // Test listen({handle: pipe}) + net.createServer() + .listen({handle: handles[1]}) + .on('listening', closePipeServer(handles[1])); + // Test listen({_handle: pipe}, cb) + net.createServer() + .listen({_handle: handles[2]}, closePipeServer(handles[2])); + // Test listen({_handle: pipe}) + net.createServer() + .listen({_handle: handles[3]}) + .on('listening', closePipeServer(handles[3])); + // Test listen({fd: pipe.fd}, cb) + net.createServer() + .listen({fd: handles[4].fd}, closePipeServer(handles[4])); + // Test listen({fd: pipe.fd}) + net.createServer() + .listen({fd: handles[5].fd}) + .on('listening', closePipeServer(handles[5])); +} + +if (!common.isWindows) { // Windows doesn't support {fd: } + // Test invalid fd + const fd = fs.openSync(__filename, 'r'); + net.createServer() + .listen({fd: fd}, common.mustNotCall()) + .on('error', common.mustCall(function(err) { + assert.strictEqual(err + '', 'Error: listen EINVAL'); + this.close(); + })); +} diff --git a/test/parallel/test-net-server-listen-options.js b/test/parallel/test-net-server-listen-options.js index ed1d0dc894d260..494a331223fb5d 100644 --- a/test/parallel/test-net-server-listen-options.js +++ b/test/parallel/test-net-server-listen-options.js @@ -22,6 +22,11 @@ function listenError(literals, ...values) { net.createServer().listen().on('listening', common.mustCall(close)); // Test listen(cb) net.createServer().listen(common.mustCall(close)); + // Test listen(port) + net.createServer().listen(0).on('listening', common.mustCall(close)); + // Test listen({port}) + net.createServer().listen({port: 0}) + .on('listening', common.mustCall(close)); } // Test listen(port, cb) and listen({port: port}, cb) combinations diff --git a/test/parallel/test-net-server-listen-path.js b/test/parallel/test-net-server-listen-path.js new file mode 100644 index 00000000000000..f9cc982a42867f --- /dev/null +++ b/test/parallel/test-net-server-listen-path.js @@ -0,0 +1,49 @@ +'use strict'; + +const common = require('../common'); +const net = require('net'); + +common.refreshTmpDir(); + +function closeServer() { + return common.mustCall(function() { + this.close(); + }); +} + +let counter = 0; + +// Avoid conflict with listen-handle +function randomPipePath() { + return common.PIPE + '-listen-path-' + (counter++); +} + +// Test listen(path) +{ + const handlePath = randomPipePath(); + net.createServer() + .listen(handlePath) + .on('listening', closeServer()); +} + +// Test listen({path}) +{ + const handlePath = randomPipePath(); + net.createServer() + .listen({path: handlePath}) + .on('listening', closeServer()); +} + +// Test listen(path, cb) +{ + const handlePath = randomPipePath(); + net.createServer() + .listen(handlePath, closeServer()); +} + +// Test listen(path, cb) +{ + const handlePath = randomPipePath(); + net.createServer() + .listen({path: handlePath}, closeServer()); +} From 5bfd13b81e38b60a7b9f346fbfcb216192cf0974 Mon Sep 17 00:00:00 2001 From: Shahar Or Date: Tue, 22 Nov 2016 00:14:36 +0200 Subject: [PATCH 120/485] util: display Symbol keys in inspect by default I use symbol key properties. And I find it awful that they do not show up in inspection. I can alter `util.inspect.defaultOptions.showHidden` each time I debug. Does that sound like fun to you? Isn't fun a core principle life? The way I see it, it is not about the spec or about what is enumerable/hidden, etc. When inspecting, it is about ease of access to the information. That's how I see it. Does anyone have any other thoughts? Fixes: https://github.com/nodejs/node/issues/9709 PR-URL: https://github.com/nodejs/node/pull/9726 Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis --- lib/util.js | 7 +++++-- test/parallel/test-util-inspect.js | 21 ++++++++++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/lib/util.js b/lib/util.js index 31761f0dd35545..9e61bd83e05541 100644 --- a/lib/util.js +++ b/lib/util.js @@ -362,10 +362,13 @@ function formatValue(ctx, value, recurseTimes) { // Look up the keys of the object. var keys = Object.keys(value); var visibleKeys = arrayToHash(keys); + const symbolKeys = Object.getOwnPropertySymbols(value); + const enumSymbolKeys = symbolKeys + .filter((key) => Object.prototype.propertyIsEnumerable.call(value, key)); + keys = keys.concat(enumSymbolKeys); if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - keys = keys.concat(Object.getOwnPropertySymbols(value)); + keys = Object.getOwnPropertyNames(value).concat(symbolKeys); } // This could be a boxed primitive (new String(), etc.), check valueOf() diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 033d15ff057850..873918f942284b 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -658,7 +658,9 @@ assert.doesNotThrow(() => { '{ a: 123, inspect: [Function: inspect] }'); const subject = { a: 123, [util.inspect.custom]() { return this; } }; - assert.strictEqual(util.inspect(subject), '{ a: 123 }'); + const UIC = 'util.inspect.custom'; + assert.strictEqual(util.inspect(subject), + `{ a: 123,\n [Symbol(${UIC})]: [Function: [${UIC}]] }`); } // util.inspect with "colors" option should produce as many lines as without it @@ -725,18 +727,27 @@ if (typeof Symbol !== 'undefined') { subject[Symbol('symbol')] = 42; - assert.strictEqual(util.inspect(subject), '{}'); + assert.strictEqual(util.inspect(subject), '{ [Symbol(symbol)]: 42 }'); assert.strictEqual( util.inspect(subject, options), '{ [Symbol(symbol)]: 42 }' ); + Object.defineProperty( + subject, + Symbol(), + {enumerable: false, value: 'non-enum'}); + assert.strictEqual(util.inspect(subject), '{ [Symbol(symbol)]: 42 }'); + assert.strictEqual( + util.inspect(subject, options), + '{ [Symbol(symbol)]: 42, [Symbol()]: \'non-enum\' }' + ); + subject = [1, 2, 3]; subject[Symbol('symbol')] = 42; - assert.strictEqual(util.inspect(subject), '[ 1, 2, 3 ]'); - assert.strictEqual(util.inspect(subject, options), - '[ 1, 2, 3, [length]: 3, [Symbol(symbol)]: 42 ]'); + assert.strictEqual(util.inspect(subject), + '[ 1, 2, 3, [Symbol(symbol)]: 42 ]'); } // test Set From db39273a8a21d78e074b363473031af894787f27 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 14 Mar 2017 10:43:08 -0400 Subject: [PATCH 121/485] doc: increase Buffer.concat() documentation This commit adds documentation for two edge cases in Buffer.concat(). Those cases are: - totalLength is specified, but is not an integer. - The combined buffer length is greater than totalLength. PR-URL: https://github.com/nodejs/node/pull/11845 Fixes: https://github.com/nodejs/node/issues/11605 Reviewed-By: James M Snell Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca --- doc/api/buffer.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index ddc17f28ca7f47..1e564bfafe566a 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -755,6 +755,10 @@ in `list`. This however causes an additional loop to be executed in order to calculate the `totalLength`, so it is faster to provide the length explicitly if it is already known. +If `totalLength` is provided, it is coerced to an unsigned integer. If the +combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is +truncated to `totalLength`. + Example: Create a single `Buffer` from a list of three `Buffer` instances ```js From 7b830f4e4acdfd469e4a62ed63039132ffa99032 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 13 Mar 2017 23:14:14 +0800 Subject: [PATCH 122/485] test: add more and refactor test cases to net.connect PR-URL: https://github.com/nodejs/node/pull/11847 Reviewed-By: James M Snell --- .../test-net-connect-options-allowhalfopen.js | 124 ++++++++++ test/parallel/test-net-connect-options-fd.js | 100 ++++++++ .../parallel/test-net-connect-options-path.js | 53 +++++ .../parallel/test-net-connect-options-port.js | 221 ++++++++++++++++++ test/parallel/test-net-connect-options.js | 53 ----- test/parallel/test-net-create-connection.js | 127 ---------- 6 files changed, 498 insertions(+), 180 deletions(-) create mode 100644 test/parallel/test-net-connect-options-allowhalfopen.js create mode 100644 test/parallel/test-net-connect-options-fd.js create mode 100644 test/parallel/test-net-connect-options-path.js create mode 100644 test/parallel/test-net-connect-options-port.js delete mode 100644 test/parallel/test-net-connect-options.js delete mode 100644 test/parallel/test-net-create-connection.js diff --git a/test/parallel/test-net-connect-options-allowhalfopen.js b/test/parallel/test-net-connect-options-allowhalfopen.js new file mode 100644 index 00000000000000..4bf6b9094bdc4d --- /dev/null +++ b/test/parallel/test-net-connect-options-allowhalfopen.js @@ -0,0 +1,124 @@ +// 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. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +function testClients(getSocketOpt, getConnectOpt, getConnectCb) { + const cloneOptions = (index) => + Object.assign({}, getSocketOpt(index), getConnectOpt(index)); + return [ + net.connect(cloneOptions(0), getConnectCb(0)), + net.connect(cloneOptions(1)) + .on('connect', getConnectCb(1)), + net.createConnection(cloneOptions(2), getConnectCb(2)), + net.createConnection(cloneOptions(3)) + .on('connect', getConnectCb(3)), + new net.Socket(getSocketOpt(4)).connect(getConnectOpt(4), getConnectCb(4)), + new net.Socket(getSocketOpt(5)).connect(getConnectOpt(5)) + .on('connect', getConnectCb(5)) + ]; +} + +const CLIENT_VARIANTS = 6; // Same length as array above +const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS); + +// Test allowHalfOpen +{ + let clientReceivedFIN = 0; + let serverConnections = 0; + let clientSentFIN = 0; + let serverReceivedFIN = 0; + const server = net.createServer({ + allowHalfOpen: true + }) + .on('connection', forAllClients(function serverOnConnection(socket) { + const serverConnection = ++serverConnections; + let clientId; + console.error(`${serverConnections} 'connection' emitted on server`); + socket.resume(); + // 'end' on each socket must not be emitted twice + socket.on('data', common.mustCall(function(data) { + clientId = data.toString(); + console.error(`${serverConnection} server connection is started ` + + `by client No. ${clientId}`); + })); + socket.on('end', common.mustCall(function() { + serverReceivedFIN++; + console.error(`Server recieved FIN sent by No. ${clientId}`); + if (serverReceivedFIN === CLIENT_VARIANTS) { + setTimeout(() => { + server.close(); + console.error(`No. ${clientId} connection is closing server: ` + + `${serverReceivedFIN} FIN received by server, ` + + `${clientReceivedFIN} FIN received by client, ` + + `${clientSentFIN} FIN sent by client, ` + + `${serverConnections} FIN sent by server`); + }, 50); + } + }, 1)); + socket.end(); + console.error(`Server has sent ${serverConnections} FIN`); + })) + .on('close', common.mustCall(function serverOnClose() { + console.error('Server has been closed: ' + + `${serverReceivedFIN} FIN received by server, ` + + `${clientReceivedFIN} FIN received by client, ` + + `${clientSentFIN} FIN sent by client, ` + + `${serverConnections} FIN sent by server`); + })) + .listen(0, 'localhost', common.mustCall(function serverOnListen() { + const host = 'localhost'; + const port = server.address().port; + + console.error(`Server starts at ${host}:${port}`); + const getSocketOpt = () => ({ allowHalfOpen: true }); + const getConnectOpt = () => ({ host, port }); + const getConnectCb = (index) => common.mustCall(function clientOnConnect() { + const client = this; + console.error(`'connect' emitted on Client ${index}`); + client.resume(); + client.on('end', common.mustCall(function clientOnEnd() { + setTimeout(function() { + // when allowHalfOpen is true, client must still be writable + // after the server closes the connections, but not readable + console.error(`No. ${index} client received FIN`); + assert(!client.readable); + assert(client.writable); + assert(client.write(index + '')); + client.end(); + clientSentFIN++; + console.error(`No. ${index} client sent FIN, ` + + `${clientSentFIN} have been sent`); + }, 50); + })); + client.on('close', common.mustCall(function clientOnClose() { + clientReceivedFIN++; + console.error(`No. ${index} connection has been closed by both ` + + `sides, ${clientReceivedFIN} clients have closed`); + })); + }); + + testClients(getSocketOpt, getConnectOpt, getConnectCb); + })); +} diff --git a/test/parallel/test-net-connect-options-fd.js b/test/parallel/test-net-connect-options-fd.js new file mode 100644 index 00000000000000..5a0db83184ed0c --- /dev/null +++ b/test/parallel/test-net-connect-options-fd.js @@ -0,0 +1,100 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const Pipe = process.binding('pipe_wrap').Pipe; + +if (common.isWindows) { + common.skip('Does not support wrapping sockets with fd on Windows'); + return; +} + +common.refreshTmpDir(); + +function testClients(getSocketOpt, getConnectOpt, getConnectCb) { + const cloneOptions = (index) => + Object.assign({}, getSocketOpt(index), getConnectOpt(index)); + return [ + net.connect(cloneOptions(0), getConnectCb(0)), + net.connect(cloneOptions(1)) + .on('connect', getConnectCb(1)), + net.createConnection(cloneOptions(2), getConnectCb(2)), + net.createConnection(cloneOptions(3)) + .on('connect', getConnectCb(3)), + new net.Socket(getSocketOpt(4)).connect(getConnectOpt(4), getConnectCb(4)), + new net.Socket(getSocketOpt(5)).connect(getConnectOpt(5)) + .on('connect', getConnectCb(5)) + ]; +} + +const CLIENT_VARIANTS = 6; // Same length as array above +const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS); + +// Test Pipe fd is wrapped correctly +{ + const prefix = `${common.PIPE}-net-connect-options-fd`; + const serverPath = `${prefix}-server`; + let counter = 0; + let socketCounter = 0; + const handleMap = new Map(); + const server = net.createServer() + .on('connection', forAllClients(function serverOnConnection(socket) { + let clientFd; + socket.on('data', common.mustCall(function(data) { + clientFd = data.toString(); + console.error(`[Pipe]Received data from fd ${clientFd}`); + socket.end(); + })); + socket.on('end', common.mustCall(function() { + counter++; + console.error(`[Pipe]Received end from fd ${clientFd}, total ${counter}`); + if (counter === CLIENT_VARIANTS) { + setTimeout(() => { + console.error(`[Pipe]Server closed by fd ${clientFd}`); + server.close(); + }, 10); + } + }, 1)); + })) + .on('close', function() { + setTimeout(() => { + for (const pair of handleMap) { + console.error(`[Pipe]Clean up handle with fd ${pair[1].fd}`); + pair[1].close(); // clean up handles + } + }, 10); + }) + .on('error', function(err) { + console.error(err); + assert.fail(null, null, '[Pipe server]' + err); + }) + .listen({path: serverPath}, common.mustCall(function serverOnListen() { + const getSocketOpt = (index) => { + const handle = new Pipe(); + const err = handle.bind(`${prefix}-client-${socketCounter++}`); + assert(err >= 0, '' + err); + assert.notStrictEqual(handle.fd, -1); + handleMap.set(index, handle); + console.error(`[Pipe]Bound handle with Pipe ${handle.fd}`); + return { fd: handle.fd, readable: true, writable: true }; + }; + const getConnectOpt = () => ({ + path: serverPath + }); + const getConnectCb = (index) => common.mustCall(function clientOnConnect() { + const client = this; + // Test if it's wrapping an existing fd + assert(handleMap.has(index)); + const oldHandle = handleMap.get(index); + assert.strictEqual(oldHandle.fd, this._handle.fd); + client.write(oldHandle.fd + ''); + console.error(`[Pipe]Sending data through fd ${oldHandle.fd}`); + client.on('error', function(err) { + console.error(err); + assert.fail(null, null, '[Pipe Client]' + err); + }); + }); + + testClients(getSocketOpt, getConnectOpt, getConnectCb); + })); +} diff --git a/test/parallel/test-net-connect-options-path.js b/test/parallel/test-net-connect-options-path.js new file mode 100644 index 00000000000000..927bd95207370d --- /dev/null +++ b/test/parallel/test-net-connect-options-path.js @@ -0,0 +1,53 @@ +'use strict'; +const common = require('../common'); +const net = require('net'); + +// This file tests the option handling of net.connect, +// net.createConnect, and new Socket().connect + +common.refreshTmpDir(); + +const CLIENT_VARIANTS = 12; + +// Test connect(path) +{ + const prefix = `${common.PIPE}-net-connect-options-path`; + const serverPath = `${prefix}-server`; + let counter = 0; + const server = net.createServer() + .on('connection', common.mustCall(function(socket) { + socket.end('ok'); + }, CLIENT_VARIANTS)) + .listen(serverPath, common.mustCall(function() { + const getConnectCb = () => common.mustCall(function() { + const client = this; + client.end(); + client.on('close', common.mustCall(function() { + counter++; + if (counter === CLIENT_VARIANTS) { + server.close(); + } + })); + }); + + // CLIENT_VARIANTS depends on the following code + net.connect(serverPath, getConnectCb()); + net.connect(serverPath) + .on('connect', getConnectCb()); + net.createConnection(serverPath, getConnectCb()); + net.createConnection(serverPath) + .on('connect', getConnectCb()); + new net.Socket().connect(serverPath, getConnectCb()); + new net.Socket().connect(serverPath) + .on('connect', getConnectCb()); + net.connect({path: serverPath}, getConnectCb()); + net.connect({path: serverPath}) + .on('connect', getConnectCb()); + net.createConnection({path: serverPath}, getConnectCb()); + net.createConnection({path: serverPath}) + .on('connect', getConnectCb()); + new net.Socket().connect({path: serverPath}, getConnectCb()); + new net.Socket().connect({path: serverPath}) + .on('connect', getConnectCb()); + })); +} diff --git a/test/parallel/test-net-connect-options-port.js b/test/parallel/test-net-connect-options-port.js new file mode 100644 index 00000000000000..6f17bb2856c453 --- /dev/null +++ b/test/parallel/test-net-connect-options-port.js @@ -0,0 +1,221 @@ +// 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. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dns = require('dns'); +const net = require('net'); + +// Test wrong type of ports +{ + function portTypeError(opt) { + const prefix = '"port" option should be a number or string: '; + const cleaned = opt.replace(/[\\^$.*+?()[\]{}|=!<>:-]/g, '\\$&'); + return new RegExp(`^TypeError: ${prefix}${cleaned}$`); + } + + syncFailToConnect(true, portTypeError('true')); + syncFailToConnect(false, portTypeError('false')); + syncFailToConnect([], portTypeError(''), true); + syncFailToConnect({}, portTypeError('[object Object]'), true); + syncFailToConnect(null, portTypeError('null')); +} + +// Test out of range ports +{ + function portRangeError(opt) { + const prefix = '"port" option should be >= 0 and < 65536: '; + const cleaned = opt.replace(/[\\^$.*+?()[\]{}|=!<>:-]/g, '\\$&'); + return new RegExp(`^RangeError: ${prefix}${cleaned}$`); + } + + syncFailToConnect('', portRangeError('')); + syncFailToConnect(' ', portRangeError(' ')); + syncFailToConnect('0x', portRangeError('0x'), true); + syncFailToConnect('-0x1', portRangeError('-0x1'), true); + syncFailToConnect(NaN, portRangeError('NaN')); + syncFailToConnect(Infinity, portRangeError('Infinity')); + syncFailToConnect(-1, portRangeError('-1')); + syncFailToConnect(65536, portRangeError('65536')); +} + +// Test invalid hints +{ + const regexp = /^TypeError: Invalid argument: hints must use valid flags$/; + // connect({hint}, cb) and connect({hint}) + const hints = (dns.ADDRCONFIG | dns.V4MAPPED) + 42; + const hintOptBlocks = doConnect([{hints: hints}], + () => common.mustNotCall()); + for (const block of hintOptBlocks) { + assert.throws(block, regexp, + `${block.name}({hints: ${hints})`); + } +} + +// Test valid combinations of connect(port) and connect(port, host) +{ + const expectedConnections = 72; + let serverConnected = 0; + + const server = net.createServer(common.mustCall(function(socket) { + socket.end('ok'); + if (++serverConnected === expectedConnections) { + server.close(); + } + }, expectedConnections)); + + server.listen(0, 'localhost', common.mustCall(function() { + const port = this.address().port; + + // Total connections = 3 * 4(canConnect) * 6(doConnect) = 72 + canConnect(port); + canConnect(port + ''); + canConnect('0x' + port.toString(16)); + })); + + // Try connecting to random ports, but do so once the server is closed + server.on('close', function() { + asyncFailToConnect(0); + asyncFailToConnect(/* undefined */); + }); +} + +function doConnect(args, getCb) { + return [ + function createConnectionWithCb() { + return net.createConnection.apply(net, args.concat(getCb())); + }, + function createConnectionWithoutCb() { + return net.createConnection.apply(net, args) + .on('connect', getCb()); + }, + function connectWithCb() { + return net.connect.apply(net, args.concat(getCb())); + }, + function connectWithoutCb() { + return net.connect.apply(net, args) + .on('connect', getCb()); + }, + function socketConnectWithCb() { + const socket = new net.Socket(); + return socket.connect.apply(socket, args.concat(getCb())); + }, + function socketConnectWithoutCb() { + const socket = new net.Socket(); + return socket.connect.apply(socket, args) + .on('connect', getCb()); + } + ]; +} + +function syncFailToConnect(port, regexp, optOnly) { + if (!optOnly) { + // connect(port, cb) and connect(port) + const portArgBlocks = doConnect([port], () => common.mustNotCall()); + for (const block of portArgBlocks) { + assert.throws(block, regexp, `${block.name}(${port})`); + } + + // connect(port, host, cb) and connect(port, host) + const portHostArgBlocks = doConnect([port, 'localhost'], + () => common.mustNotCall()); + for (const block of portHostArgBlocks) { + assert.throws(block, regexp, `${block.name}(${port}, 'localhost')`); + } + } + // connect({port}, cb) and connect({port}) + const portOptBlocks = doConnect([{port}], + () => common.mustNotCall()); + for (const block of portOptBlocks) { + assert.throws(block, regexp, `${block.name}({port: ${port}})`); + } + + // connect({port, host}, cb) and connect({port, host}) + const portHostOptBlocks = doConnect([{port: port, host: 'localhost'}], + () => common.mustNotCall()); + for (const block of portHostOptBlocks) { + assert.throws(block, regexp, + `${block.name}({port: ${port}, host: 'localhost'})`); + } +} + +function canConnect(port) { + const noop = () => common.mustCall(function() {}); + // connect(port, cb) and connect(port) + const portArgBlocks = doConnect([port], noop); + for (const block of portArgBlocks) { + assert.doesNotThrow(block, `${block.name}(${port})`); + } + + // connect(port, host, cb) and connect(port, host) + const portHostArgBlocks = doConnect([port, 'localhost'], noop); + for (const block of portHostArgBlocks) { + assert.doesNotThrow(block, `${block.name}(${port})`); + } + + // connect({port}, cb) and connect({port}) + const portOptBlocks = doConnect([{port}], noop); + for (const block of portOptBlocks) { + assert.doesNotThrow(block, `${block.name}({port: ${port}})`); + } + + // connect({port, host}, cb) and connect({port, host}) + const portHostOptBlocks = doConnect([{port: port, host: 'localhost'}], + noop); + for (const block of portHostOptBlocks) { + assert.doesNotThrow(block, + `${block.name}({port: ${port}, host: 'localhost'})`); + } +} + +function asyncFailToConnect(port) { + const onError = () => common.mustCall(function(err) { + const regexp = /^Error: connect (E\w+)(.+)$/; + assert(regexp.test(err + ''), err + ''); + }); + + const dont = () => common.mustNotCall(); + // connect(port, cb) and connect(port) + const portArgBlocks = doConnect([port], dont); + for (const block of portArgBlocks) { + assert.doesNotThrow(function() { + block().on('error', onError()); + }, `${block.name}(${port})`); + } + + // connect({port}, cb) and connect({port}) + const portOptBlocks = doConnect([{port}], dont); + for (const block of portOptBlocks) { + assert.doesNotThrow(function() { + block().on('error', onError()); + }, `${block.name}({port: ${port}})`); + } + + // connect({port, host}, cb) and connect({port, host}) + const portHostOptBlocks = doConnect([{port: port, host: 'localhost'}], + dont); + for (const block of portHostOptBlocks) { + assert.doesNotThrow(function() { + block().on('error', onError()); + }, `${block.name}({port: ${port}, host: 'localhost'})`); + } +} diff --git a/test/parallel/test-net-connect-options.js b/test/parallel/test-net-connect-options.js deleted file mode 100644 index d75b62a4c147d0..00000000000000 --- a/test/parallel/test-net-connect-options.js +++ /dev/null @@ -1,53 +0,0 @@ -// 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. - -'use strict'; -const common = require('../common'); -const assert = require('assert'); -const net = require('net'); - -const server = net.createServer({ - allowHalfOpen: true -}, common.mustCall(function(socket) { - socket.resume(); - socket.on('end', common.mustCall(function() {})); - socket.end(); -})); - -server.listen(0, function() { - const client = net.connect({ - host: '127.0.0.1', - port: this.address().port, - allowHalfOpen: true - }, common.mustCall(function() { - console.error('client connect cb'); - client.resume(); - client.on('end', common.mustCall(function() { - setTimeout(function() { - assert(client.writable); - client.end(); - }, 10); - })); - client.on('close', function() { - server.close(); - }); - })); -}); diff --git a/test/parallel/test-net-create-connection.js b/test/parallel/test-net-create-connection.js deleted file mode 100644 index ebe777b00c1931..00000000000000 --- a/test/parallel/test-net-create-connection.js +++ /dev/null @@ -1,127 +0,0 @@ -// 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. - -'use strict'; -require('../common'); -const assert = require('assert'); -const dns = require('dns'); -const net = require('net'); - -const expectedConnections = 7; -let clientConnected = 0; -let serverConnected = 0; - -const server = net.createServer(function(socket) { - socket.end(); - if (++serverConnected === expectedConnections) { - server.close(); - } -}); - -server.listen(0, 'localhost', function() { - function cb() { - ++clientConnected; - } - - function fail(opts, errtype, msg) { - assert.throws(function() { - net.createConnection(opts, cb); - }, function(err) { - return err instanceof errtype && msg === err.message; - }); - } - - net.createConnection(this.address().port).on('connect', cb); - net.createConnection(this.address().port, 'localhost').on('connect', cb); - net.createConnection(this.address().port, cb); - net.createConnection(this.address().port, 'localhost', cb); - net.createConnection(this.address().port + '', 'localhost', cb); - net.createConnection({port: this.address().port + ''}).on('connect', cb); - net.createConnection({port: '0x' + this.address().port.toString(16)}, cb); - - fail({ - port: true - }, TypeError, '"port" option should be a number or string: true'); - - fail({ - port: false - }, TypeError, '"port" option should be a number or string: false'); - - fail({ - port: [] - }, TypeError, '"port" option should be a number or string: '); - - fail({ - port: {} - }, TypeError, '"port" option should be a number or string: [object Object]'); - - fail({ - port: null - }, TypeError, '"port" option should be a number or string: null'); - - fail({ - port: '' - }, RangeError, '"port" option should be >= 0 and < 65536: '); - - fail({ - port: ' ' - }, RangeError, '"port" option should be >= 0 and < 65536: '); - - fail({ - port: '0x' - }, RangeError, '"port" option should be >= 0 and < 65536: 0x'); - - fail({ - port: '-0x1' - }, RangeError, '"port" option should be >= 0 and < 65536: -0x1'); - - fail({ - port: NaN - }, RangeError, '"port" option should be >= 0 and < 65536: NaN'); - - fail({ - port: Infinity - }, RangeError, '"port" option should be >= 0 and < 65536: Infinity'); - - fail({ - port: -1 - }, RangeError, '"port" option should be >= 0 and < 65536: -1'); - - fail({ - port: 65536 - }, RangeError, '"port" option should be >= 0 and < 65536: 65536'); - - fail({ - hints: (dns.ADDRCONFIG | dns.V4MAPPED) + 42, - }, TypeError, 'Invalid argument: hints must use valid flags'); -}); - -// Try connecting to random ports, but do so once the server is closed -server.on('close', function() { - function nop() {} - - net.createConnection({port: 0}).on('error', nop); - net.createConnection({port: undefined}).on('error', nop); -}); - -process.on('exit', function() { - assert.strictEqual(clientConnected, expectedConnections); -}); From 746339ef6db2ad5fd417ebf5d573cfc31d19bfdb Mon Sep 17 00:00:00 2001 From: detailyang Date: Tue, 14 Mar 2017 17:07:09 +0800 Subject: [PATCH 123/485] doc: gcc version is at least 4.8.5 in BUILDING.md >= 4.8.5 is required because of compiler bugs in earlier versions PR-URL: https://github.com/nodejs/node/pull/11840 Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index a28759e1c7cc1e..13f4e34734a012 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -13,7 +13,7 @@ file a new issue. Prerequisites: -* `gcc` and `g++` 4.8 or newer, or +* `gcc` and `g++` 4.8.5 or newer, or * `clang` and `clang++` 3.4 or newer * Python 2.6 or 2.7 * GNU Make 3.81 or newer From 5e3d536ea30528c79ecc4a8b36425f82285e03d1 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 12 Mar 2017 09:10:50 -0700 Subject: [PATCH 124/485] test: fix flaky test-domain-abort-on-uncaught test-domain-abort-on-uncaught is flaky under load. Move it to sequential so it is not competing with other tests for resources. PR-URL: https://github.com/nodejs/node/pull/11817 Fixes: https://github.com/nodejs/node/issues/11814 Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock Reviewed-By: Daijiro Wachi Reviewed-By: Santiago Gimeno Reviewed-By: Yuta Hiroto Reviewed-By: James M Snell --- test/{parallel => sequential}/test-domain-abort-on-uncaught.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{parallel => sequential}/test-domain-abort-on-uncaught.js (100%) diff --git a/test/parallel/test-domain-abort-on-uncaught.js b/test/sequential/test-domain-abort-on-uncaught.js similarity index 100% rename from test/parallel/test-domain-abort-on-uncaught.js rename to test/sequential/test-domain-abort-on-uncaught.js From 303962aca192e28b5ec5a74da9f53d9f26e52359 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Fri, 10 Mar 2017 11:35:46 -0800 Subject: [PATCH 125/485] doc: linkable commit message guidelines Put the commit guidelines themselves under a heading to be more prominent, and to allow linking directly to them (instead of the section on how to use git). Link the pull request template to the guidelines, so contributors can find them. PR-URL: https://github.com/nodejs/node/pull/11792 Reviewed-By: Rich Trott Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- .github/PULL_REQUEST_TEMPLATE.md | 4 +++- CONTRIBUTING.md | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f62bb1d118d76c..4b37b8325063ef 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,7 +13,9 @@ Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md - [ ] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes - [ ] tests and/or benchmarks are included - [ ] documentation is changed or added -- [ ] commit message follows commit guidelines +- [ ] commit message follows [commit guidelines][] ##### Affected core subsystem(s) + +[commit guidelines]: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#commit-guidelines diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 290cad8faaeb7a..923fb0299046fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -95,6 +95,8 @@ $ git add my/changed/files $ git commit ``` +### Commit guidelines + Writing good commit logs is important. A commit log should describe what changed and why. Follow these guidelines when writing one: From 4cdb0e89d8daf7e1371c3b8d3f057940aa327d4a Mon Sep 17 00:00:00 2001 From: jBarz Date: Thu, 9 Mar 2017 08:33:59 -0500 Subject: [PATCH 126/485] tls: keep track of stream that is closed TLSWrap object keeps a pointer reference to the underlying TCPWrap object. This TCPWrap object could be closed and deleted by the event-loop which leaves us with a dangling pointer. So the TLSWrap object needs to track the "close" event on the TCPWrap object. PR-URL: https://github.com/nodejs/node/pull/11776 Reviewed-By: Fedor Indutny Reviewed-By: James M Snell Reviewed-By: Brian White --- lib/_tls_wrap.js | 6 ++++ src/tls_wrap.cc | 11 ++++++- src/tls_wrap.h | 1 + test/parallel/test-tls-socket-close.js | 43 ++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-tls-socket-close.js diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 64c82b6957efb4..f87a390dcc577b 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -395,6 +395,12 @@ TLSSocket.prototype._wrapHandle = function(wrap) { res = null; }); + if (wrap) { + wrap.on('close', function() { + res.onStreamClose(); + }); + } + return res; }; diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index e23e686b9d3088..ad6daa43011bda 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -543,7 +543,7 @@ int TLSWrap::GetFD() { bool TLSWrap::IsAlive() { - return ssl_ != nullptr && stream_->IsAlive(); + return ssl_ != nullptr && stream_ != nullptr && stream_->IsAlive(); } @@ -802,6 +802,14 @@ void TLSWrap::EnableSessionCallbacks( } +void TLSWrap::OnStreamClose(const FunctionCallbackInfo& args) { + TLSWrap* wrap; + ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder()); + + wrap->stream_ = nullptr; +} + + void TLSWrap::DestroySSL(const FunctionCallbackInfo& args) { TLSWrap* wrap; ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder()); @@ -932,6 +940,7 @@ void TLSWrap::Initialize(Local target, env->SetProtoMethod(t, "enableSessionCallbacks", EnableSessionCallbacks); env->SetProtoMethod(t, "destroySSL", DestroySSL); env->SetProtoMethod(t, "enableCertCb", EnableCertCb); + env->SetProtoMethod(t, "onStreamClose", OnStreamClose); StreamBase::AddMethods(env, t, StreamBase::kFlagHasWritev); SSLWrap::AddMethods(env, t); diff --git a/src/tls_wrap.h b/src/tls_wrap.h index d0313bd308f9dc..d6c4b62493d10b 100644 --- a/src/tls_wrap.h +++ b/src/tls_wrap.h @@ -158,6 +158,7 @@ class TLSWrap : public AsyncWrap, static void EnableCertCb( const v8::FunctionCallbackInfo& args); static void DestroySSL(const v8::FunctionCallbackInfo& args); + static void OnStreamClose(const v8::FunctionCallbackInfo& args); #ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB static void GetServername(const v8::FunctionCallbackInfo& args); diff --git a/test/parallel/test-tls-socket-close.js b/test/parallel/test-tls-socket-close.js new file mode 100644 index 00000000000000..440c0c4ff7cde7 --- /dev/null +++ b/test/parallel/test-tls-socket-close.js @@ -0,0 +1,43 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const tls = require('tls'); +const fs = require('fs'); +const net = require('net'); + +const key = fs.readFileSync(common.fixturesDir + '/keys/agent2-key.pem'); +const cert = fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem'); + +const T = 100; + +// tls server +const tlsServer = tls.createServer({ cert, key }, (socket) => { + setTimeout(() => { + socket.on('error', (error) => { + assert.strictEqual(error.code, 'EINVAL'); + tlsServer.close(); + netServer.close(); + }); + socket.write('bar'); + }, T * 2); +}); + +// plain tcp server +const netServer = net.createServer((socket) => { + // if client wants to use tls + tlsServer.emit('connection', socket); + + socket.setTimeout(T, () => { + // this breaks if TLSSocket is already managing the socket: + socket.destroy(); + }); +}).listen(0, common.mustCall(function() { + + // connect client + tls.connect({ + host: 'localhost', + port: this.address().port, + rejectUnauthorized: false + }).write('foo'); +})); From d099f8e317a6c55c2c0b877565b47d40c5a3ba9c Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Tue, 14 Mar 2017 23:41:57 -0700 Subject: [PATCH 127/485] src: remove explicit UTF-8 validity check in url This step was never part of the URL Standard's host parser algorithm, and is rendered unnecessary after IDNA errors are no longer ignored. PR-URL: https://github.com/nodejs/node/pull/11859 Refs: c2a302c50b3787666339371 "src: do not ignore IDNA conversion error" Refs: https://url.spec.whatwg.org/#concept-host-parser Reviewed-By: Ben Noordhuis Reviewed-By: Daijiro Wachi Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- src/node_url.cc | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/node_url.cc b/src/node_url.cc index b2f1322ade3cc0..1aae557115851f 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -15,11 +15,6 @@ #include #include -#if defined(NODE_HAVE_I18N_SUPPORT) -#include -#include -#endif - #define UNICODE_REPLACEMENT_CHARACTER 0xFFFD namespace node { @@ -113,21 +108,6 @@ namespace url { output->assign(*buf, buf.length()); return true; } - - // Unfortunately there's not really a better way to do this. - // Iterate through each encoded codepoint and verify that - // it is a valid unicode codepoint. - static bool IsValidUTF8(std::string* input) { - const char* p = input->c_str(); - int32_t len = input->length(); - for (int32_t i = 0; i < len;) { - UChar32 c; - U8_NEXT_UNSAFE(p, i, c); - if (!U_IS_UNICODE_CHAR(c)) - return false; - } - return true; - } #else // Intentional non-ops if ICU is not present. static bool ToUnicode(std::string* input, std::string* output) { @@ -139,10 +119,6 @@ namespace url { *output = *input; return true; } - - static bool IsValidUTF8(std::string* input) { - return true; - } #endif // If a UTF-16 character is a low/trailing surrogate. @@ -395,12 +371,6 @@ namespace url { if (PercentDecode(input, length, &decoded) < 0) goto end; - // If there are any invalid UTF8 byte sequences, we have to fail. - // Unfortunately this means iterating through the string and checking - // each decoded codepoint. - if (!IsValidUTF8(&decoded)) - goto end; - // Then we have to punycode toASCII if (!ToASCII(&decoded, &decoded)) goto end; From d631af59c0c4bf0811c7176176bf78f68e9fab6d Mon Sep 17 00:00:00 2001 From: Gireesh Punathil Date: Mon, 6 Mar 2017 10:24:07 -0500 Subject: [PATCH 128/485] test: delay child exit in AIX for pseudo-tty tests The tests in pseudo-tty takes the form of child node writing some data and exiting, while parent python consume them through pseudo tty implementations, and validate the result. While there is no synchronization between child and parent, this works for most platforms, except AIX, where the child exits even before the parent could setup the read loop, under race conditions Fixing the race condition is ideally done through sending ACK messages to and forth, but involves massive changes and have side effect. The workaround is to address them in AIX alone, by adding a reasonable delay. PR-URL: https://github.com/nodejs/node/pull/11715 Fixes: https://github.com/nodejs/node/issues/7973 Fixes: https://github.com/nodejs/node/issues/9765 Fixes: https://github.com/nodejs/node/issues/11541 Reviewed-By: Michael Dawson Reviewed-By: James M Snell Reviewed-By: Gibson Fahnestock --- test/pseudo-tty/no_dropped_stdio.js | 10 +++++++--- test/pseudo-tty/no_interleaved_stdio.js | 10 +++++++--- test/pseudo-tty/pseudo-tty.status | 3 --- test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js | 6 +++++- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/test/pseudo-tty/no_dropped_stdio.js b/test/pseudo-tty/no_dropped_stdio.js index b24d234a38b2b7..f7d9625c62b0c7 100644 --- a/test/pseudo-tty/no_dropped_stdio.js +++ b/test/pseudo-tty/no_dropped_stdio.js @@ -1,7 +1,7 @@ // https://github.com/nodejs/node/issues/6456#issuecomment-219320599 // https://gist.github.com/isaacs/1495b91ec66b21d30b10572d72ad2cdd 'use strict'; -require('../common'); +const common = require('../common'); // 1000 bytes wrapped at 50 columns // \n turns into a double-byte character @@ -11,5 +11,9 @@ let out = ('o'.repeat(48) + '\n').repeat(20); // This results in 1025 bytes, just enough to overflow the 1kb OS X TTY buffer. out += 'o'.repeat(24) + 'O'; -process.stdout.write(out); -process.exit(0); +// In AIX, the child exits even before the python parent +// can setup the readloop. Provide a reasonable delay. +setTimeout(function() { + process.stdout.write(out); + process.exit(0); +}, common.isAix ? 200 : 0); diff --git a/test/pseudo-tty/no_interleaved_stdio.js b/test/pseudo-tty/no_interleaved_stdio.js index ff3ed8594a0baa..ba3989f93878bc 100644 --- a/test/pseudo-tty/no_interleaved_stdio.js +++ b/test/pseudo-tty/no_interleaved_stdio.js @@ -1,7 +1,7 @@ // https://github.com/nodejs/node/issues/6456#issuecomment-219320599 // https://gist.github.com/isaacs/1495b91ec66b21d30b10572d72ad2cdd 'use strict'; -require('../common'); +const common = require('../common'); // 1000 bytes wrapped at 50 columns // \n turns into a double-byte character @@ -13,5 +13,9 @@ out += 'o'.repeat(24) + 'O'; const err = '__This is some stderr__'; -process.stdout.write(out); -process.stderr.write(err); +// In AIX, the child exits even before the python parent +// can setup the readloop. Provide a reasonable delay. +setTimeout(function() { + process.stdout.write(out); + process.stderr.write(err); +}, common.isAix ? 200 : 0); diff --git a/test/pseudo-tty/pseudo-tty.status b/test/pseudo-tty/pseudo-tty.status index 50f54de029d874..13279019b6bd72 100644 --- a/test/pseudo-tty/pseudo-tty.status +++ b/test/pseudo-tty/pseudo-tty.status @@ -1,8 +1,5 @@ prefix pseudo-tty [$system==aix] -# test issue only, covered under https://github.com/nodejs/node/issues/7973 -no_dropped_stdio : SKIP -no_interleaved_stdio : SKIP # being investigated under https://github.com/nodejs/node/issues/9728 test-tty-wrap : FAIL, PASS diff --git a/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js b/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js index f828e92afbe71c..4d87e15d342c36 100644 --- a/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js +++ b/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js @@ -27,4 +27,8 @@ process.stdout._refreshSize = wrap(originalRefreshSizeStdout, process.stdout, 'calling stdout._refreshSize'); -process.emit('SIGWINCH'); +// In AIX, the child exits even before the python parent +// can setup the readloop. Provide a reasonable delay. +setTimeout(function() { + process.emit('SIGWINCH'); +}, common.isAix ? 200 : 0); From f0d4237ef537a6aacac1c4b548c433d59f6be509 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 15 Mar 2017 05:31:31 +0100 Subject: [PATCH 129/485] build: mac OBJ_DIR should point to obj.target I think there might be an issue with the value of OBJ_DIR when using a "mac" os. The value is currently specified in common.gypi which is included by node.gyp: 'OBJ_DIR': '<(PRODUCT_DIR)/obj', In the generated Makefile (out/Makefile) the object output directory is: obj := $(builddir)/obj And in the included node.target.mk we have the OBJS declared: OBJS := \ $(obj).target/$(TARGET)/src/async-wrap.o \ $(obj).target/$(TARGET)/src/cares_wrap.o \ If OBJ_DIR is used in node.gyp to point to generated object files on mac they will not be found. PR-URL: https://github.com/nodejs/node/pull/11857 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- common.gypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 3aad8e7722d57b..147cc70fa5d5df 100644 --- a/common.gypi +++ b/common.gypi @@ -43,7 +43,7 @@ 'v8_postmortem_support%': 'true', }], ['OS== "mac"', { - 'OBJ_DIR': '<(PRODUCT_DIR)/obj', + 'OBJ_DIR': '<(PRODUCT_DIR)/obj.target', 'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a', }, { 'conditions': [ From c7b60165a61520941b0e3c18d79b89a88c60d720 Mon Sep 17 00:00:00 2001 From: Jan Krems Date: Wed, 15 Mar 2017 13:48:11 -0700 Subject: [PATCH 130/485] repl: Empty command should be sent to eval function This fixes a regression introduced in https://github.com/nodejs/node/pull/6171 PR-URL: https://github.com/nodejs/node/pull/11871 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- lib/repl.js | 6 ------ test/parallel/test-repl-empty.js | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 test/parallel/test-repl-empty.js diff --git a/lib/repl.js b/lib/repl.js index e4364e7d11cc42..f3e08efa813e93 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -422,12 +422,6 @@ function REPLServer(prompt, return; } } - } else { - // Print a new line when hitting enter. - if (!self.bufferedCommand) { - finish(null); - return; - } } const evalCmd = self.bufferedCommand + cmd + '\n'; diff --git a/test/parallel/test-repl-empty.js b/test/parallel/test-repl-empty.js new file mode 100644 index 00000000000000..e9794d9bea45c6 --- /dev/null +++ b/test/parallel/test-repl-empty.js @@ -0,0 +1,29 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const repl = require('repl'); + +{ + let evalCalledWithExpectedArgs = false; + + const options = { + eval: common.mustCall((cmd, context) => { + // Assertions here will not cause the test to exit with an error code + // so set a boolean that is checked in process.on('exit',...) instead. + evalCalledWithExpectedArgs = (cmd === '\n'); + }) + }; + + const r = repl.start(options); + + try { + // Empty strings should be sent to the repl's eval function + r.write('\n'); + } finally { + r.write('.exit\n'); + } + + process.on('exit', () => { + assert(evalCalledWithExpectedArgs); + }); +} From 379eec357d2a8bdd0a9f7ad3147ab410b5e5457e Mon Sep 17 00:00:00 2001 From: liusi Date: Wed, 15 Mar 2017 11:12:32 +0800 Subject: [PATCH 131/485] build: add cpp linting to windows build This PR adds cpp linting to windows build script. After this change, running command `vcbuild lint` will run both cpp linting and javascript linting on a windows machine. PR-URL: https://github.com/nodejs/node/pull/11856 Fixes: https://github.com/nodejs/node/issues/11816 Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- CONTRIBUTING.md | 3 +-- tools/cpplint.py | 3 ++- vcbuild.bat | 55 +++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 923fb0299046fb..4daf126bd16053 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -178,8 +178,7 @@ Running `make test`/`vcbuild test` will run the linter as well unless one or more tests fail. If you want to run the linter without running tests, use -`make lint`/`vcbuild jslint`. At this time, only JavaScript linting is -available on Windows. `make lint` on POSIX will run both JavaScript linting and +`make lint`/`vcbuild lint`. It will run both JavaScript linting and C++ linting. If you are updating tests and just want to run a single test to check it, you diff --git a/tools/cpplint.py b/tools/cpplint.py index b5a05f0af39ba7..305220060c5cdb 100644 --- a/tools/cpplint.py +++ b/tools/cpplint.py @@ -1074,7 +1074,8 @@ def RepositoryName(self): """ fullname = self.FullName() # XXX(bnoordhuis) Expects that cpplint.py lives in the tools/ directory. - toplevel = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) + toplevel = os.path.abspath( + os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/') prefix = os.path.commonprefix([fullname, toplevel]) return fullname[len(prefix) + 1:] diff --git a/vcbuild.bat b/vcbuild.bat index f07c50b0fbfc91..e4c5276bf2af6e 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -27,6 +27,7 @@ set msi= set upload= set licensertf= set jslint= +set cpplint= set build_testgc_addon= set noetw= set noetw_msi_arg= @@ -58,7 +59,7 @@ if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok if /i "%1"=="noetw" set noetw=1&goto arg-ok if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok if /i "%1"=="licensertf" set licensertf=1&goto arg-ok -if /i "%1"=="test" set test_args=%test_args% addons doctool known_issues message parallel sequential -J&set jslint=1&set build_addons=1&goto arg-ok +if /i "%1"=="test" set test_args=%test_args% addons doctool known_issues message parallel sequential -J&set cpplint=1&set jslint=1&set build_addons=1&goto arg-ok if /i "%1"=="test-ci" set test_args=%test_args% %test_ci_args% -p tap --logfile test.tap addons doctool inspector known_issues message sequential parallel&set cctest_args=%cctest_args% --gtest_output=tap:cctest.tap&set build_addons=1&goto arg-ok if /i "%1"=="test-addons" set test_args=%test_args% addons&set build_addons=1&goto arg-ok if /i "%1"=="test-simple" set test_args=%test_args% sequential parallel -J&goto arg-ok @@ -68,11 +69,13 @@ if /i "%1"=="test-inspector" set test_args=%test_args% inspector&goto arg-ok if /i "%1"=="test-tick-processor" set test_args=%test_args% tick-processor&goto arg-ok if /i "%1"=="test-internet" set test_args=%test_args% internet&goto arg-ok if /i "%1"=="test-pummel" set test_args=%test_args% pummel&goto arg-ok -if /i "%1"=="test-all" set test_args=%test_args% sequential parallel message gc inspector internet pummel&set build_testgc_addon=1&set jslint=1&goto arg-ok +if /i "%1"=="test-all" set test_args=%test_args% sequential parallel message gc inspector internet pummel&set build_testgc_addon=1&set cpplint=1&set jslint=1&goto arg-ok if /i "%1"=="test-known-issues" set test_args=%test_args% known_issues&goto arg-ok if /i "%1"=="test-node-inspect" set test_node_inspect=1&goto arg-ok if /i "%1"=="jslint" set jslint=1&goto arg-ok if /i "%1"=="jslint-ci" set jslint_ci=1&goto arg-ok +if /i "%1"=="lint" set cpplint=1&set jslint=1&goto arg-ok +if /i "%1"=="lint-ci" set cpplint=1&set jslint_ci=1&goto arg-ok if /i "%1"=="package" set package=1&goto arg-ok if /i "%1"=="msi" set msi=1&set licensertf=1&set download_arg="--download=all"&set i18n_arg=small-icu&goto arg-ok if /i "%1"=="build-release" set build_release=1&set sign=1&goto arg-ok @@ -323,14 +326,14 @@ for /d %%F in (test\addons\??_*) do ( "%node_exe%" tools\doc\addon-verify.js if %errorlevel% neq 0 exit /b %errorlevel% :: building addons -SetLocal EnableDelayedExpansion +setlocal EnableDelayedExpansion for /d %%F in (test\addons\*) do ( "%node_exe%" deps\npm\node_modules\node-gyp\bin\node-gyp rebuild ^ --directory="%%F" ^ --nodedir="%cd%" if !errorlevel! neq 0 exit /b !errorlevel! ) -EndLocal +endlocal goto run-tests :run-tests @@ -340,15 +343,57 @@ set USE_EMBEDDED_NODE_INSPECT=1 goto node-tests :node-tests -if "%test_args%"=="" goto jslint +if "%test_args%"=="" goto cpplint if "%config%"=="Debug" set test_args=--mode=debug %test_args% if "%config%"=="Release" set test_args=--mode=release %test_args% echo running 'cctest %cctest_args%' "%config%\cctest" %cctest_args% echo running 'python tools\test.py %test_args%' python tools\test.py %test_args% +goto cpplint + +:cpplint +if not defined cpplint goto jslint +echo running cpplint +set cppfilelist= +setlocal enabledelayedexpansion +for /f "tokens=*" %%G in ('dir /b /s /a src\*.c src\*.cc src\*.h ^ +test\addons\*.cc test\addons\*.h test\cctest\*.cc test\cctest\*.h ^ +test\gc\binding.cc tools\icu\*.cc tools\icu\*.h') do ( + set relpath=%%G + set relpath=!relpath:*%~dp0=! + call :add-to-list !relpath! +) +( endlocal + set cppfilelist=%localcppfilelist% +) +python tools/cpplint.py %cppfilelist% +python tools/check-imports.py goto jslint +:add-to-list +echo %1 | findstr /c:"src\node_root_certs.h" +if %errorlevel% equ 0 goto exit + +echo %1 | findstr /c:"src\queue.h" +if %errorlevel% equ 0 goto exit + +echo %1 | findstr /c:"src\tree.h" +if %errorlevel% equ 0 goto exit + +@rem skip subfolders under /src +echo %1 | findstr /r /c:"src\\.*\\.*" +if %errorlevel% equ 0 goto exit + +echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.h" +if %errorlevel% equ 0 goto exit + +echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.cc" +if %errorlevel% equ 0 goto exit + +set "localcppfilelist=%localcppfilelist% %1" +goto exit + :jslint if defined jslint_ci goto jslint-ci if not defined jslint goto exit From 6473737bb1a66930395a28095705f394196ee219 Mon Sep 17 00:00:00 2001 From: AnnaMag Date: Thu, 2 Mar 2017 16:03:54 +0000 Subject: [PATCH 132/485] test: failing behaviour on sandboxed Proxy CopyProperties() causes sandboxed Proxy to throw error when in fact no code has been run. The function will be removed with the updates to the V8 API. Here, failing Proxy test case is moved to known_issues. PR-URL: https://github.com/nodejs/node/pull/11671 Reviewed-By: James M Snell Reviewed-By: Franziska Hinkelmann --- test/known_issues/test-vm-proxy-failure-CP.js | 20 +++++++++++++++++++ test/parallel/test-vm-proxies.js | 13 ------------ 2 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 test/known_issues/test-vm-proxy-failure-CP.js diff --git a/test/known_issues/test-vm-proxy-failure-CP.js b/test/known_issues/test-vm-proxy-failure-CP.js new file mode 100644 index 00000000000000..de644599b233b8 --- /dev/null +++ b/test/known_issues/test-vm-proxy-failure-CP.js @@ -0,0 +1,20 @@ +'use strict'; + +// Sandbox throws in CopyProperties() despite no code being run +// Issue: https://github.com/nodejs/node/issues/11902 + + +require('../common'); +const assert = require('assert'); +const vm = require('vm'); + +const handler = { + getOwnPropertyDescriptor: (target, prop) => { + throw new Error('whoops'); + } +}; +const sandbox = new Proxy({foo: 'bar'}, handler); +const context = vm.createContext(sandbox); + + +assert.doesNotThrow(() => vm.runInContext('', context)); diff --git a/test/parallel/test-vm-proxies.js b/test/parallel/test-vm-proxies.js index 25e16e8f5ccc55..266b212fb827b8 100644 --- a/test/parallel/test-vm-proxies.js +++ b/test/parallel/test-vm-proxies.js @@ -16,16 +16,3 @@ sandbox = { Proxy: Proxy }; vm.runInNewContext('this.Proxy = Proxy', sandbox); assert.strictEqual(typeof sandbox.Proxy, 'function'); assert.strictEqual(sandbox.Proxy, Proxy); - -// Handle a sandbox that throws while copying properties -assert.throws(() => { - const handler = { - getOwnPropertyDescriptor: (target, prop) => { - throw new Error('whoops'); - } - }; - const sandbox = new Proxy({foo: 'bar'}, handler); - const context = vm.createContext(sandbox); - - vm.runInContext('', context); -}, /whoops/); From 38299d245663729982df532a91b396bedaccd399 Mon Sep 17 00:00:00 2001 From: Noj Vek Date: Wed, 15 Mar 2017 19:34:51 -0700 Subject: [PATCH 133/485] Fix #7065: cli help documentation for --inspect Adding documentation to node.1 and cli.md PR-URL: https://github.com/nodejs/node/pull/11660 Reviewed-By: Eugene Ostroukhov Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/cli.md | 21 +++++++++++++++++++++ doc/node.1 | 11 +++++++++++ 2 files changed, 32 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 1153d9d3a258b1..5e6390335bfef1 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -94,6 +94,26 @@ Follows `require()`'s module resolution rules. `module` may be either a path to a file, or a node module name. +### `--inspect[=host:port]` + + +Activate inspector on host:port. Default is 127.0.0.1:9229. + +V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug +and profile Node.js instances. The tools attach to Node.js instances via a +tcp port and communicate using the [Chrome Debugging Protocol][]. + + +### `--inspect-brk[=host:port]` + + +Activate inspector on host:port and break at start of user script. + + ### `--no-deprecation` - -Streams can be either [Readable][], [Writable][], or both ([Duplex][]). - -All streams are EventEmitters, but they also have other custom methods -and properties depending on whether they are Readable, Writable, or -Duplex. - -If a stream is both Readable and Writable, then it implements all of -the methods and events. So, a [Duplex][] or [Transform][] stream is -fully described by this API, though their implementation may be -somewhat different. - -It is not necessary to implement Stream interfaces in order to consume -streams in your programs. If you **are** implementing streaming -interfaces in your own program, please also refer to -[API for Stream Implementors][]. - -Almost all Node.js programs, no matter how simple, use Streams in some -way. Here is an example of using Streams in an Node.js program: - -```js -const http = require('http'); - -var server = http.createServer( (req, res) => { - // req is an http.IncomingMessage, which is a Readable Stream - // res is an http.ServerResponse, which is a Writable Stream - - var body = ''; - // we want to get the data as utf8 strings - // If you don't set an encoding, then you'll get Buffer objects - req.setEncoding('utf8'); - - // Readable streams emit 'data' events once a listener is added - req.on('data', (chunk) => { - body += chunk; - }); - - // the end event tells you that you have entire body - req.on('end', () => { - try { - var data = JSON.parse(body); - } catch (er) { - // uh oh! bad json! - res.statusCode = 400; - return res.end(`error: ${er.message}`); - } - - // write back something interesting to the user: - res.write(typeof data); - res.end(); - }); -}); - -server.listen(1337); - -// $ curl localhost:1337 -d '{}' -// object -// $ curl localhost:1337 -d '"foo"' -// string -// $ curl localhost:1337 -d 'not json' -// error: Unexpected token o -``` - -### Class: stream.Duplex - -Duplex streams are streams that implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Duplex streams include: - -* [TCP sockets][] -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Readable - - - -The Readable stream interface is the abstraction for a *source* of -data that you are reading from. In other words, data comes *out* of a -Readable stream. - -A Readable stream will not start emitting data until you indicate that -you are ready to receive it. - -Readable streams have two "modes": a **flowing mode** and a **paused -mode**. When in flowing mode, data is read from the underlying system -and provided to your program as fast as possible. In paused mode, you -must explicitly call [`stream.read()`][stream-read] to get chunks of data out. -Streams start out in paused mode. - -**Note**: If no data event handlers are attached, and there are no -[`stream.pipe()`][] destinations, and the stream is switched into flowing -mode, then data will be lost. - -You can switch to flowing mode by doing any of the following: - -* Adding a [`'data'`][] event handler to listen for data. -* Calling the [`stream.resume()`][stream-resume] method to explicitly open the - flow. -* Calling the [`stream.pipe()`][] method to send the data to a [Writable][]. - -You can switch back to paused mode by doing either of the following: - -* If there are no pipe destinations, by calling the - [`stream.pause()`][stream-pause] method. -* If there are pipe destinations, by removing any [`'data'`][] event - handlers, and removing all pipe destinations by calling the - [`stream.unpipe()`][] method. - -Note that, for backwards compatibility reasons, removing [`'data'`][] -event handlers will **not** automatically pause the stream. Also, if -there are piped destinations, then calling [`stream.pause()`][stream-pause] will -not guarantee that the stream will *remain* paused once those -destinations drain and ask for more data. - -Examples of readable streams include: - -* [HTTP responses, on the client][http-incoming-message] -* [HTTP requests, on the server][http-incoming-message] -* [fs read streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdout and stderr][] -* [`process.stdin`][] - -#### Event: 'close' - -Emitted when the stream and any of its underlying resources (a file -descriptor, for example) have been closed. The event indicates that -no more events will be emitted, and no further computation will occur. - -Not all streams will emit the `'close'` event. - -#### Event: 'data' - -* `chunk` {Buffer|String} The chunk of data. - -Attaching a `'data'` event listener to a stream that has not been -explicitly paused will switch the stream into flowing mode. Data will -then be passed as soon as it is available. - -If you just want to get all the data out of the stream as fast as -possible, this is the best way to do so. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -``` - -#### Event: 'end' - -This event fires when there will be no more data to read. - -Note that the `'end'` event **will not fire** unless the data is -completely consumed. This can be done by switching into flowing mode, -or by calling [`stream.read()`][stream-read] repeatedly until you get to the -end. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -readable.on('end', () => { - console.log('there will be no more data.'); -}); -``` - -#### Event: 'error' - -* {Error Object} - -Emitted if there was an error receiving data. - -#### Event: 'readable' - -When a chunk of data can be read from the stream, it will emit a -`'readable'` event. - -In some cases, listening for a `'readable'` event will cause some data -to be read into the internal buffer from the underlying system, if it -hadn't already. - -```javascript -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - // there is some data to read now -}); -``` - -Once the internal buffer is drained, a `'readable'` event will fire -again when more data is available. - -The `'readable'` event is not emitted in the "flowing" mode with the -sole exception of the last one, on end-of-stream. - -The `'readable'` event indicates that the stream has new information: -either new data is available or the end of the stream has been reached. -In the former case, [`stream.read()`][stream-read] will return that data. In the -latter case, [`stream.read()`][stream-read] will return null. For instance, in -the following example, `foo.txt` is an empty file: - -```js -const fs = require('fs'); -var rr = fs.createReadStream('foo.txt'); -rr.on('readable', () => { - console.log('readable:', rr.read()); -}); -rr.on('end', () => { - console.log('end'); -}); -``` - -The output of running this script is: - -``` -$ node test.js -readable: null -end -``` - -#### readable.isPaused() - -* Return: {Boolean} - -This method returns whether or not the `readable` has been **explicitly** -paused by client code (using [`stream.pause()`][stream-pause] without a -corresponding [`stream.resume()`][stream-resume]). - -```js -var readable = new stream.Readable - -readable.isPaused() // === false -readable.pause() -readable.isPaused() // === true -readable.resume() -readable.isPaused() // === false -``` - -#### readable.pause() - -* Return: `this` - -This method will cause a stream in flowing mode to stop emitting -[`'data'`][] events, switching out of flowing mode. Any data that becomes -available will remain in the internal buffer. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); - readable.pause(); - console.log('there will be no more data for 1 second'); - setTimeout(() => { - console.log('now data will start flowing again'); - readable.resume(); - }, 1000); -}); -``` - -#### readable.pipe(destination[, options]) - -* `destination` {stream.Writable} The destination for writing data -* `options` {Object} Pipe options - * `end` {Boolean} End the writer when the reader ends. Default = `true` - -This method pulls all the data out of a readable stream, and writes it -to the supplied destination, automatically managing the flow so that -the destination is not overwhelmed by a fast readable stream. - -Multiple destinations can be piped to safely. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt' -readable.pipe(writable); -``` - -This function returns the destination stream, so you can set up pipe -chains like so: - -```js -var r = fs.createReadStream('file.txt'); -var z = zlib.createGzip(); -var w = fs.createWriteStream('file.txt.gz'); -r.pipe(z).pipe(w); -``` - -For example, emulating the Unix `cat` command: - -```js -process.stdin.pipe(process.stdout); -``` - -By default [`stream.end()`][stream-end] is called on the destination when the -source stream emits [`'end'`][], so that `destination` is no longer writable. -Pass `{ end: false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - -```js -reader.pipe(writer, { end: false }); -reader.on('end', () => { - writer.end('Goodbye\n'); -}); -``` - -Note that [`process.stderr`][] and [`process.stdout`][] are never closed until -the process exits, regardless of the specified options. - -#### readable.read([size]) - -* `size` {Number} Optional argument to specify how much data to read. -* Return {String|Buffer|Null} - -The `read()` method pulls some data out of the internal buffer and -returns it. If there is no data available, then it will return -`null`. - -If you pass in a `size` argument, then it will return that many -bytes. If `size` bytes are not available, then it will return `null`, -unless we've ended, in which case it will return the data remaining -in the buffer. - -If you do not specify a `size` argument, then it will return all the -data in the internal buffer. - -This method should only be called in paused mode. In flowing mode, -this method is called automatically until the internal buffer is -drained. - -```js -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - var chunk; - while (null !== (chunk = readable.read())) { - console.log('got %d bytes of data', chunk.length); - } -}); -``` - -If this method returns a data chunk, then it will also trigger the -emission of a [`'data'`][] event. - -Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][] -event has been triggered will return `null`. No runtime error will be raised. - -#### readable.resume() - -* Return: `this` - -This method will cause the readable stream to resume emitting [`'data'`][] -events. - -This method will switch the stream into flowing mode. If you do *not* -want to consume the data from a stream, but you *do* want to get to -its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open -the flow of data. - -```js -var readable = getReadableStreamSomehow(); -readable.resume(); -readable.on('end', () => { - console.log('got to the end, but did not read anything'); -}); -``` - -#### readable.setEncoding(encoding) - -* `encoding` {String} The encoding to use. -* Return: `this` - -Call this function to cause the stream to return strings of the specified -encoding instead of Buffer objects. For example, if you do -`readable.setEncoding('utf8')`, then the output data will be interpreted as -UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`, -then the data will be encoded in hexadecimal string format. - -This properly handles multi-byte characters that would otherwise be -potentially mangled if you simply pulled the Buffers directly and -called [`buf.toString(encoding)`][] on them. If you want to read the data -as strings, always use this method. - -Also you can disable any encoding at all with `readable.setEncoding(null)`. -This approach is very useful if you deal with binary data or with large -multi-byte strings spread out over multiple chunks. - -```js -var readable = getReadableStreamSomehow(); -readable.setEncoding('utf8'); -readable.on('data', (chunk) => { - assert.equal(typeof chunk, 'string'); - console.log('got %d characters of string data', chunk.length); -}); -``` - -#### readable.unpipe([destination]) - -* `destination` {stream.Writable} Optional specific stream to unpipe - -This method will remove the hooks set up for a previous [`stream.pipe()`][] -call. - -If the destination is not specified, then all pipes are removed. - -If the destination is specified, but no pipe is set up for it, then -this is a no-op. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt', -// but only for the first second -readable.pipe(writable); -setTimeout(() => { - console.log('stop writing to file.txt'); - readable.unpipe(writable); - console.log('manually close the file stream'); - writable.end(); -}, 1000); -``` - -#### readable.unshift(chunk) - -* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue - -This is useful in certain cases where a stream is being consumed by a -parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source, so that the stream can be -passed on to some other party. - -Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event -has been triggered; a runtime error will be raised. - -If you find that you must often call `stream.unshift(chunk)` in your -programs, consider implementing a [Transform][] stream instead. (See [API -for Stream Implementors][].) - -```js -// Pull off a header delimited by \n\n -// use unshift() if we get too much -// Call the callback with (error, header, stream) -const StringDecoder = require('string_decoder').StringDecoder; -function parseHeader(stream, callback) { - stream.on('error', callback); - stream.on('readable', onReadable); - var decoder = new StringDecoder('utf8'); - var header = ''; - function onReadable() { - var chunk; - while (null !== (chunk = stream.read())) { - var str = decoder.write(chunk); - if (str.match(/\n\n/)) { - // found the header boundary - var split = str.split(/\n\n/); - header += split.shift(); - var remaining = split.join('\n\n'); - var buf = new Buffer(remaining, 'utf8'); - if (buf.length) - stream.unshift(buf); - stream.removeListener('error', callback); - stream.removeListener('readable', onReadable); - // now the body of the message can be read from the stream. - callback(null, header, stream); - } else { - // still reading the header. - header += str; - } - } - } -} -``` - -Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)` -will not end the reading process by resetting the internal reading state of the -stream. This can cause unexpected results if `unshift()` is called during a -read (i.e. from within a [`stream._read()`][stream-_read] implementation on a -custom stream). Following the call to `unshift()` with an immediate -[`stream.push('')`][stream-push] will reset the reading state appropriately, -however it is best to simply avoid calling `unshift()` while in the process of -performing a read. - -#### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -Versions of Node.js prior to v0.10 had streams that did not implement the -entire Streams API as it is today. (See [Compatibility][] for -more information.) - -If you are using an older Node.js library that emits [`'data'`][] events and -has a [`stream.pause()`][stream-pause] method that is advisory only, then you -can use the `wrap()` method to create a [Readable][] stream that uses the old -stream as its data source. - -You will very rarely ever need to call this function, but it exists -as a convenience for interacting with old Node.js programs and libraries. - -For example: - -```js -const OldReader = require('./old-api-module.js').OldReader; -const Readable = require('stream').Readable; -const oreader = new OldReader; -const myReader = new Readable().wrap(oreader); - -myReader.on('readable', () => { - myReader.read(); // etc. -}); -``` - -### Class: stream.Transform - -Transform streams are [Duplex][] streams where the output is in some way -computed from the input. They implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Transform streams include: - -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Writable - - - -The Writable stream interface is an abstraction for a *destination* -that you are writing data *to*. - -Examples of writable streams include: - -* [HTTP requests, on the client][] -* [HTTP responses, on the server][] -* [fs write streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdin][] -* [`process.stdout`][], [`process.stderr`][] - -#### Event: 'drain' - -If a [`stream.write(chunk)`][stream-write] call returns `false`, then the -`'drain'` event will indicate when it is appropriate to begin writing more data -to the stream. - -```js -// Write the data to the supplied writable stream one million times. -// Be attentive to back-pressure. -function writeOneMillionTimes(writer, data, encoding, callback) { - var i = 1000000; - write(); - function write() { - var ok = true; - do { - i -= 1; - if (i === 0) { - // last time! - writer.write(data, encoding, callback); - } else { - // see if we should continue, or wait - // don't pass the callback, because we're not done yet. - ok = writer.write(data, encoding); - } - } while (i > 0 && ok); - if (i > 0) { - // had to stop early! - // write some more once it drains - writer.once('drain', write); - } - } -} -``` - -#### Event: 'error' - -* {Error} - -Emitted if there was an error when writing or piping data. - -#### Event: 'finish' - -When the [`stream.end()`][stream-end] method has been called, and all data has -been flushed to the underlying system, this event is emitted. - -```javascript -var writer = getWritableStreamSomehow(); -for (var i = 0; i < 100; i ++) { - writer.write('hello, #${i}!\n'); -} -writer.end('this is the end\n'); -writer.on('finish', () => { - console.error('all writes are now complete.'); -}); -``` - -#### Event: 'pipe' - -* `src` {stream.Readable} source stream that is piping to this writable - -This is emitted whenever the [`stream.pipe()`][] method is called on a readable -stream, adding this writable to its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('pipe', (src) => { - console.error('something is piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -``` - -#### Event: 'unpipe' - -* `src` {[Readable][] Stream} The source stream that - [unpiped][`stream.unpipe()`] this writable - -This is emitted whenever the [`stream.unpipe()`][] method is called on a -readable stream, removing this writable from its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('unpipe', (src) => { - console.error('something has stopped piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -reader.unpipe(writer); -``` - -#### writable.cork() - -Forces buffering of all writes. - -Buffered data will be flushed either at [`stream.uncork()`][] or at -[`stream.end()`][stream-end] call. - -#### writable.end([chunk][, encoding][, callback]) - -* `chunk` {String|Buffer} Optional data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Optional callback for when the stream is finished - -Call this method when no more data will be written to the stream. If supplied, -the callback is attached as a listener on the [`'finish'`][] event. - -Calling [`stream.write()`][stream-write] after calling -[`stream.end()`][stream-end] will raise an error. - -```js -// write 'hello, ' and then end with 'world!' -var file = fs.createWriteStream('example.txt'); -file.write('hello, '); -file.end('world!'); -// writing more now is not allowed! -``` - -#### writable.setDefaultEncoding(encoding) - -* `encoding` {String} The new default encoding - -Sets the default encoding for a writable stream. - -#### writable.uncork() - -Flush all data, buffered since [`stream.cork()`][] call. - -#### writable.write(chunk[, encoding][, callback]) - -* `chunk` {String|Buffer} The data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Callback for when this chunk of data is flushed -* Returns: {Boolean} `true` if the data was handled completely. - -This method writes some data to the underlying system, and calls the -supplied callback once the data has been fully handled. - -The return value indicates if you should continue writing right now. -If the data had to be buffered internally, then it will return -`false`. Otherwise, it will return `true`. - -This return value is strictly advisory. You MAY continue to write, -even if it returns `false`. However, writes will be buffered in -memory, so it is best not to do this excessively. Instead, wait for -the [`'drain'`][] event before writing more data. - - -## API for Stream Implementors - - - -To implement any sort of stream, the pattern is the same: - -1. Extend the appropriate parent class in your own subclass. (The - [`util.inherits()`][] method is particularly helpful for this.) -2. Call the appropriate parent class constructor in your constructor, - to be sure that the internal mechanisms are set up properly. -3. Implement one or more specific methods, as detailed below. - -The class to extend and the method(s) to implement depend on the sort -of stream class you are writing: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Use-case

-
-

Class

-
-

Method(s) to implement

-
-

Reading only

-
-

[Readable](#stream_class_stream_readable_1)

-
-

[_read][stream-_read]

-
-

Writing only

-
-

[Writable](#stream_class_stream_writable_1)

-
-

[_write][stream-_write], [_writev][stream-_writev]

-
-

Reading and writing

-
-

[Duplex](#stream_class_stream_duplex_1)

-
-

[_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev]

-
-

Operate on written data, then read the result

-
-

[Transform](#stream_class_stream_transform_1)

-
-

[_transform][stream-_transform], [_flush][stream-_flush]

-
- -In your implementation code, it is very important to never call the methods -described in [API for Stream Consumers][]. Otherwise, you can potentially cause -adverse side effects in programs that consume your streaming interfaces. - -### Class: stream.Duplex - - - -A "duplex" stream is one that is both Readable and Writable, such as a TCP -socket connection. - -Note that `stream.Duplex` is an abstract class designed to be extended -with an underlying implementation of the [`stream._read(size)`][stream-_read] -and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you -would with a Readable or Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this class -prototypally inherits from Readable, and then parasitically from Writable. It is -thus up to the user to implement both the low-level -[`stream._read(n)`][stream-_read] method as well as the low-level -[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension -duplex classes. - -#### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for readable side of the stream. Has no effect if `objectMode` - is `true`. - * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for writable side of the stream. Has no effect if `objectMode` - is `true`. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### Class: stream.PassThrough - -This is a trivial implementation of a [Transform][] stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy as a building block for novel sorts of streams. - -### Class: stream.Readable - - - -`stream.Readable` is an abstract class designed to be extended with an -underlying implementation of the [`stream._read(size)`][stream-_read] method. - -Please see [API for Stream Consumers][] for how to consume -streams in your programs. What follows is an explanation of how to -implement Readable streams in your programs. - -#### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default = `16384` (16kb), or `16` for `objectMode` streams - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default = `null` - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns - a single value instead of a Buffer of size n. Default = `false` - * `read` {Function} Implementation for the [`stream._read()`][stream-_read] - method. - -In classes that extend the Readable class, make sure to call the -Readable constructor so that the buffering settings can be properly -initialized. - -#### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **Implement this method, but do NOT call it directly.** - -This method is prefixed with an underscore because it is internal to the -class that defines it and should only be called by the internal Readable -class methods. All Readable stream implementations must provide a \_read -method to fetch data from the underlying resource. - -When `_read()` is called, if data is available from the resource, the `_read()` -implementation should start pushing that data into the read queue by calling -[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from -the resource and pushing data until push returns `false`, at which point it -should stop reading from the resource. Only when `_read()` is called again after -it has stopped should it start reading more data from the resource and pushing -that data onto the queue. - -Note: once the `_read()` method is called, it will not be called again until -the [`stream.push()`][stream-push] method is called. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling [`stream.push(chunk)`][stream-push]. - -#### 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 - Buffer encoding, such as `'utf8'` or `'ascii'` -* return {Boolean} Whether or not more pushes should be performed - -Note: **This method should be called by Readable implementors, NOT -by consumers of Readable streams.** - -If a value other than null is passed, The `push()` method adds a chunk of data -into the queue for subsequent stream processors to consume. If `null` is -passed, it signals the end of the stream (EOF), after which no more data -can be written. - -The data added with `push()` can be pulled out by calling the -[`stream.read()`][stream-read] method when the [`'readable'`][] event fires. - -This API is designed to be as flexible as possible. For example, -you may be wrapping a lower-level source which has some sort of -pause/resume mechanism, and a data callback. In those cases, you -could wrap the low-level source object by doing something like this: - -```js -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -util.inherits(SourceWrapper, Readable); - -function SourceWrapper(options) { - Readable.call(this, options); - - this._source = getLowlevelSourceObject(); - - // Every time there's data, we push it into the internal buffer. - this._source.ondata = (chunk) => { - // if push() returns false, then we need to stop reading from source - if (!this.push(chunk)) - this._source.readStop(); - }; - - // When the source ends, we push the EOF-signaling `null` chunk - this._source.onend = () => { - this.push(null); - }; -} - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -SourceWrapper.prototype._read = function(size) { - this._source.readStart(); -}; -``` - -#### Example: A Counting Stream - - - -This is a basic example of a Readable stream. It emits the numerals -from 1 to 1,000,000 in ascending order, and then ends. - -```js -const Readable = require('stream').Readable; -const util = require('util'); -util.inherits(Counter, Readable); - -function Counter(opt) { - Readable.call(this, opt); - this._max = 1000000; - this._index = 1; -} - -Counter.prototype._read = function() { - var i = this._index++; - if (i > this._max) - this.push(null); - else { - var str = '' + i; - var buf = new Buffer(str, 'ascii'); - this.push(buf); - } -}; -``` - -#### Example: SimpleProtocol v1 (Sub-optimal) - -This is similar to the `parseHeader` function described -[here](#stream_readable_unshift_chunk), but implemented as a custom stream. -Also, note that this implementation does not convert the incoming data to a -string. - -However, this would be better implemented as a [Transform][] stream. See -[SimpleProtocol v2][] for a better implementation. - -```js -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// NOTE: This can be done more simply as a Transform stream! -// Using Readable directly for this is sub-optimal. See the -// alternative example below under the Transform section. - -const Readable = require('stream').Readable; -const util = require('util'); - -util.inherits(SimpleProtocol, Readable); - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(source, options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', () => { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', () => { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - // calling unshift by itself does not reset the reading state - // of the stream; since we're inside _read, doing an additional - // push('') will reset the state appropriately. - this.push(''); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -// var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a [zlib][] stream or a -[crypto][] stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will produce output -that is either much smaller or much larger than its input. - -Rather than implement the [`stream._read()`][stream-_read] and -[`stream._write()`][stream-_write] methods, Transform classes must implement the -[`stream._transform()`][stream-_transform] method, and may optionally -also implement the [`stream._flush()`][stream-_flush] method. (See below.) - -#### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `transform` {Function} Implementation for the - [`stream._transform()`][stream-_transform] method. - * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush] - method. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### Events: 'finish' and 'end' - -The [`'finish'`][] and [`'end'`][] events are from the parent Writable -and Readable classes respectively. The `'finish'` event is fired after -[`stream.end()`][stream-end] is called and all chunks have been processed by -[`stream._transform()`][stream-_transform], `'end'` is fired after all data has -been output which is after the callback in [`stream._flush()`][stream-_flush] -has been called. - -#### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush()` method, which will be -called at the very end, after all the written data is consumed, but -before emitting [`'end'`][] to signal the end of the readable side. Just -like with [`stream._transform()`][stream-_transform], call -`transform.push(chunk)` zero or more times, as appropriate, and call `callback` -when the flush operation is complete. - -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 -your own extension classes. - -#### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be transformed. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - 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 -class methods only. - -All Transform stream implementations must provide a `_transform()` -method to accept input and produce output. - -`_transform()` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -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. If you supply a second argument to the callback -it will be passed to the push method. In other words the following are -equivalent: - -```js -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 -your own extension classes. - -#### Example: `SimpleProtocol` parser v2 - -The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple -protocol parser can be implemented simply by using the higher level -[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol -v1` examples. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node.js stream -approach. - -```javascript -const util = require('util'); -const Transform = require('stream').Transform; -util.inherits(SimpleProtocol, Transform); - -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(chunk.slice(split)); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(chunk); - } - done(); -}; - -// Usage: -// var parser = new SimpleProtocol(); -// source.pipe(parser) -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Writable - - - -`stream.Writable` is an abstract class designed to be extended with an -underlying implementation of the -[`stream._write(chunk, encoding, callback)`][stream-_write] method. - -Please see [API for Stream Consumers][] for how to consume -writable streams in your programs. What follows is an explanation of -how to implement Writable streams in your programs. - -#### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when - [`stream.write()`][stream-write] starts returning `false`. Default = `16384` - (16kb), or `16` for `objectMode` streams. - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to [`stream._write()`][stream-_write]. - Default = `true` - * `objectMode` {Boolean} Whether or not the - [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can - write arbitrary data instead of only `Buffer` / `String` data. - Default = `false` - * `write` {Function} Implementation for the - [`stream._write()`][stream-_write] method. - * `writev` {Function} Implementation for the - [`stream._writev()`][stream-_writev] method. - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be written. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a -[`stream._write()`][stream-_write] method to send data to the underlying -resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -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 -your own extension classes. - -#### writable.\_writev(chunks, callback) - -* `chunks` {Array} The chunks to be written. Each chunk has following - format: `{ chunk: ..., encoding: ... }`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunks. - -Note: **This function MUST NOT be called directly.** It may be -implemented by child classes, and called by the internal Writable -class methods only. - -This function is completely optional to implement. In most cases it is -unnecessary. If implemented, it will be called with all the chunks -that are buffered in the write queue. - - -## Simplified Constructor API - - - -In simple cases there is now the added benefit of being able to construct a -stream without inheritance. - -This can be done by passing the appropriate methods as constructor options: - -Examples: - -### Duplex - -```js -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -### Readable - -```js -var readable = new stream.Readable({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - } -}); -``` - -### Transform - -```js -var transform = new stream.Transform({ - transform: function(chunk, encoding, next) { - // sets this._transform under the hood - - // generate output as many times as needed - // this.push(chunk); - - // call when the current chunk is consumed - next(); - }, - flush: function(done) { - // sets this._flush under the hood - - // generate output as many times as needed - // this.push(chunk); - - done(); - } -}); -``` - -### Writable - -```js -var writable = new stream.Writable({ - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var writable = new stream.Writable({ - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -## Streams: Under the Hood - - - -### Buffering - - - -Both Writable and Readable streams will buffer data on an internal -object which can be retrieved from `_writableState.getBuffer()` or -`_readableState.buffer`, respectively. - -The amount of data that will potentially be buffered depends on the -`highWaterMark` option which is passed into the constructor. - -Buffering in Readable streams happens when the implementation calls -[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not -call [`stream.read()`][stream-read], then the data will sit in the internal -queue until it is consumed. - -Buffering in Writable streams happens when the user calls -[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`. - -The purpose of streams, especially with the [`stream.pipe()`][] method, is to -limit the buffering of data to acceptable levels, so that sources and -destinations of varying speed will not overwhelm the available memory. - -### Compatibility with Older Node.js Versions - - - -In versions of Node.js prior to v0.10, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the [`stream.read()`][stream-read] method, - [`'data'`][] events would start emitting immediately. If you needed to do - some I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The [`stream.pause()`][stream-pause] method was advisory, rather than - guaranteed. This meant that you still had to be prepared to receive - [`'data'`][] events even when the stream was in a paused state. - -In Node.js v0.10, the [Readable][] class was added. -For backwards compatibility with older Node.js programs, Readable streams -switch into "flowing mode" when a [`'data'`][] event handler is added, or -when the [`stream.resume()`][stream-resume] method is called. The effect is -that, even if you are not using the new [`stream.read()`][stream-read] method -and [`'readable'`][] event, you no longer have to worry about losing -[`'data'`][] chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No [`'data'`][] event handler is added. -* The [`stream.resume()`][stream-resume] method is never called. -* The stream is not piped to any writable destination. - -For example, consider the following code: - -```js -// WARNING! BROKEN! -net.createServer((socket) => { - - // we add an 'end' method, but never consume the data - socket.on('end', () => { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of Node.js prior to v0.10, the incoming message data would be -simply discarded. However, in Node.js v0.10 and beyond, -the socket will remain paused forever. - -The workaround in this situation is to call the -[`stream.resume()`][stream-resume] method to start the flow of data: - -```js -// Workaround -net.createServer((socket) => { - - socket.on('end', () => { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into flowing mode, -pre-v0.10 style streams can be wrapped in a Readable class using the -[`stream.wrap()`][] method. - - -### Object Mode - - - -Normally, Streams operate on Strings and Buffers exclusively. - -Streams that are in **object mode** can emit generic JavaScript values -other than Buffers and Strings. - -A Readable stream in object mode will always return a single item from -a call to [`stream.read(size)`][stream-read], regardless of what the size -argument is. - -A Writable stream in object mode will always ignore the `encoding` -argument to [`stream.write(data, encoding)`][stream-write]. - -The special value `null` still retains its special value for object -mode streams. That is, for object mode readable streams, `null` as a -return value from [`stream.read()`][stream-read] indicates that there is no more -data, and [`stream.push(null)`][stream-push] will signal the end of stream data -(`EOF`). - -No streams in Node.js core are object mode streams. This pattern is only -used by userland streaming libraries. - -You should set `objectMode` in your stream child class constructor on -the options object. Setting `objectMode` mid-stream is not safe. - -For Duplex streams `objectMode` can be set exclusively for readable or -writable side with `readableObjectMode` and `writableObjectMode` -respectively. These options can be used to implement parsers and -serializers with Transform streams. - -```js -const util = require('util'); -const StringDecoder = require('string_decoder').StringDecoder; -const Transform = require('stream').Transform; -util.inherits(JSONParseStream, Transform); - -// Gets \n-delimited JSON string data, and emits the parsed objects -function JSONParseStream() { - if (!(this instanceof JSONParseStream)) - return new JSONParseStream(); - - Transform.call(this, { readableObjectMode : true }); - - this._buffer = ''; - this._decoder = new StringDecoder('utf8'); -} - -JSONParseStream.prototype._transform = function(chunk, encoding, cb) { - this._buffer += this._decoder.write(chunk); - // split on newlines - var lines = this._buffer.split(/\r?\n/); - // keep the last partial line buffered - this._buffer = lines.pop(); - for (var l = 0; l < lines.length; l++) { - var line = lines[l]; - try { - var obj = JSON.parse(line); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; - -JSONParseStream.prototype._flush = function(cb) { - // Just handle any leftover - var rem = this._buffer.trim(); - if (rem) { - try { - var obj = JSON.parse(rem); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; -``` - -### `stream.read(0)` - -There are some cases where you want to trigger a refresh of the -underlying readable stream mechanisms, without actually consuming any -data. In that case, you can call `stream.read(0)`, which will always -return null. - -If the internal read buffer is below the `highWaterMark`, and the -stream is not currently reading, then calling `stream.read(0)` will trigger -a low-level [`stream._read()`][stream-_read] call. - -There is almost never a need to do this. However, you will see some -cases in Node.js's internals where this is done, particularly in the -Readable stream class internals. - -### `stream.push('')` - -Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an -interesting side effect. Because it *is* a call to -[`stream.push()`][stream-push], it will end the `reading` process. However, it -does *not* add any data to the readable buffer, so there's nothing for -a user to consume. - -Very rarely, there are cases where you have no data to provide now, -but the consumer of your stream (or, perhaps, another bit of your own -code) will know when to check again, by calling [`stream.read(0)`][stream-read]. -In those cases, you *may* call `stream.push('')`. - -So far, the only use case for this functionality is in the -[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you -find that you have to use `stream.push('')`, please consider another -approach, because it almost certainly indicates that something is -horribly wrong. - -[`'data'`]: #stream_event_data -[`'drain'`]: #stream_event_drain -[`'end'`]: #stream_event_end -[`'finish'`]: #stream_event_finish -[`'readable'`]: #stream_event_readable -[`buf.toString(encoding)`]: https://nodejs.org/docs/v5.8.0/api/buffer.html#buffer_buf_tostring_encoding_start_end -[`EventEmitter`]: https://nodejs.org/docs/v5.8.0/api/events.html#events_class_eventemitter -[`process.stderr`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stderr -[`process.stdin`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdin -[`process.stdout`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdout -[`stream.cork()`]: #stream_writable_cork -[`stream.pipe()`]: #stream_readable_pipe_destination_options -[`stream.uncork()`]: #stream_writable_uncork -[`stream.unpipe()`]: #stream_readable_unpipe_destination -[`stream.wrap()`]: #stream_readable_wrap_stream -[`tls.CryptoStream`]: https://nodejs.org/docs/v5.8.0/api/tls.html#tls_class_cryptostream -[`util.inherits()`]: https://nodejs.org/docs/v5.8.0/api/util.html#util_util_inherits_constructor_superconstructor -[API for Stream Consumers]: #stream_api_for_stream_consumers -[API for Stream Implementors]: #stream_api_for_stream_implementors -[child process stdin]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdin -[child process stdout and stderr]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdout -[Compatibility]: #stream_compatibility_with_older_node_js_versions -[crypto]: crypto.html -[Duplex]: #stream_class_stream_duplex -[fs read streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_readstream -[fs write streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_writestream -[HTTP requests, on the client]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_clientrequest -[HTTP responses, on the server]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_serverresponse -[http-incoming-message]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_incomingmessage -[Object mode]: #stream_object_mode -[Readable]: #stream_class_stream_readable -[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2 -[stream-_flush]: #stream_transform_flush_callback -[stream-_read]: #stream_readable_read_size_1 -[stream-_transform]: #stream_transform_transform_chunk_encoding_callback -[stream-_write]: #stream_writable_write_chunk_encoding_callback_1 -[stream-_writev]: #stream_writable_writev_chunks_callback -[stream-end]: #stream_writable_end_chunk_encoding_callback -[stream-pause]: #stream_readable_pause -[stream-push]: #stream_readable_push_chunk_encoding -[stream-read]: #stream_readable_read_size -[stream-resume]: #stream_readable_resume -[stream-write]: #stream_writable_write_chunk_encoding_callback -[TCP sockets]: https://nodejs.org/docs/v5.8.0/api/net.html#net_class_net_socket -[Transform]: #stream_class_stream_transform -[Writable]: #stream_class_stream_writable -[zlib]: zlib.html diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index c141a99c26c638..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,58 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af87620dd..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 736693b8400fed..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,75 +0,0 @@ -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index d06f71f1868d77..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,26 +0,0 @@ -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 54a9d5c553d69e..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,880 +0,0 @@ -'use strict'; - -module.exports = Readable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events'); - -/**/ -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = undefined; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -var Duplex; -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -var Duplex; -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options && typeof options.read === 'function') this._read = options.read; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - - if (!state.objectMode && typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - var skipAdd; - if (state.decoder && !addToFront && !encoding) { - chunk = state.decoder.write(chunk); - skipAdd = !state.objectMode && chunk.length === 0; - } - - if (!addToFront) state.reading = false; - - // Don't add to the buffer if we've decoded to an empty string chunk and - // we're not in object mode - if (!skipAdd) { - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) return 0; - - if (state.objectMode) return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; - } - - if (n <= 0) return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else { - return state.length; - } - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) endReadable(this); - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - if (state.pipesCount === 1 && state.pipes[0] === dest && src.listenerCount('data') === 1 && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) dest.on('error', onerror);else if (isArray(dest._events.error)) dest._events.error.unshift(onerror);else dest._events.error = [onerror, dest._events.error]; - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var _i = 0; _i < len; _i++) { - dests[_i].emit('unpipe', this); - }return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && !this._readableState.endEmitted) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - processNextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - processNextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function (ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) return null; - - if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) ret = '';else ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) ret += buf.slice(0, cpy);else buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) list[0] = buf.slice(cpy);else list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - processNextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 625cdc17698059..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,180 +0,0 @@ -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) stream.push(data); - - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er) { - done(stream, er); - });else done(stream); - }); -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -function done(stream, er) { - if (er) return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 95916c992a9507..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,516 +0,0 @@ -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -module.exports = Writable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; -/**/ - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; - -util.inherits(Writable, Stream); - -function nop() {} - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -var Duplex; -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // create the two objects needed to store the corked requests - // they are not a linked list, as no new elements are inserted in there - this.corkedRequestsFree = new CorkedRequest(this); - this.corkedRequestsFree.next = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function writableStateGetBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') - }); - } catch (_) {} -})(); - -var Duplex; -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - processNextTick(cb, er); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - processNextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - - if (Buffer.isBuffer(chunk)) encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) processNextTick(cb, er);else cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - while (entry) { - buffer[count] = entry; - entry = entry.next; - count += 1; - } - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequestCount = 0; - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else { - prefinish(stream, state); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function (err) { - var entry = _this.entry; - _this.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = _this; - } else { - state.corkedRequestsFree = _this; - } - }; -} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f9437dbf5a..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/README.md b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b4149c5eb5..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05f75fd5..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c075a2f..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// 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. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index f2794488b08868..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "core-util-is@~1.0.0", - "scope": null, - "escapedName": "core-util-is", - "name": "core-util-is", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ] - ], - "_from": "core-util-is@>=1.0.0 <1.1.0", - "_id": "core-util-is@1.0.2", - "_inCache": true, - "_location": "/mississippi/concat-stream/readable-stream/core-util-is", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "3.3.2", - "_phantomChildren": {}, - "_requested": { - "raw": "core-util-is@~1.0.0", - "scope": null, - "escapedName": "core-util-is", - "name": "core-util-is", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/concat-stream/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_shrinkwrap": null, - "_spec": "core-util-is@~1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "dependencies": {}, - "description": "The `util.is*` functions introduced in Node v0.12.", - "devDependencies": { - "tap": "^2.3.0" - }, - "directories": {}, - "dist": { - "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "tarball": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", - "homepage": "https://github.com/isaacs/core-util-is#readme", - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "license": "MIT", - "main": "lib/util.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "core-util-is", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "scripts": { - "test": "tap test.js" - }, - "version": "1.0.2" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65ac8b5d..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/Makefile b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/Makefile deleted file mode 100644 index 0ecc29c402c243..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59c6195f9..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/component.json b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683889015..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js deleted file mode 100644 index a57f63495943a0..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json deleted file mode 100644 index 529beb69b774d5..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ] - ], - "_from": "isarray@>=1.0.0 <1.1.0", - "_id": "isarray@1.0.0", - "_inCache": true, - "_location": "/mississippi/concat-stream/readable-stream/isarray", - "_nodeVersion": "5.1.0", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/concat-stream/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_shrinkwrap": null, - "_spec": "isarray@~1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "dependencies": {}, - "description": "Array#isArray for older browsers", - "devDependencies": { - "tape": "~2.13.4" - }, - "directories": {}, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "homepage": "https://github.com/juliangruber/isarray", - "keywords": [ - "browser", - "isarray", - "array" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "name": "isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "scripts": { - "test": "tape test.js" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/test.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/test.js deleted file mode 100644 index f7f7bcd19fec56..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/test.js +++ /dev/null @@ -1,19 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml deleted file mode 100644 index 36201b10017a5e..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" - - "0.12" - - "1.7.1" - - 1 - - 2 - - 3 - - 4 - - 5 diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js deleted file mode 100644 index a4f40f845faa65..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -if (!process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = nextTick; -} else { - module.exports = process.nextTick; -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json deleted file mode 100644 index c9d5f61669b5a8..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "process-nextick-args@~1.0.6", - "scope": null, - "escapedName": "process-nextick-args", - "name": "process-nextick-args", - "rawSpec": "~1.0.6", - "spec": ">=1.0.6 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ] - ], - "_from": "process-nextick-args@>=1.0.6 <1.1.0", - "_id": "process-nextick-args@1.0.7", - "_inCache": true, - "_location": "/mississippi/concat-stream/readable-stream/process-nextick-args", - "_nodeVersion": "5.11.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "raw": "process-nextick-args@~1.0.6", - "scope": null, - "escapedName": "process-nextick-args", - "name": "process-nextick-args", - "rawSpec": "~1.0.6", - "spec": ">=1.0.6 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/concat-stream/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "_shrinkwrap": null, - "_spec": "process-nextick-args@~1.0.6", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream", - "author": "", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "dependencies": {}, - "description": "process.nextTick but always with args", - "devDependencies": { - "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - }, - "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "process-nextick-args", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.7" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/readme.md b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/readme.md deleted file mode 100644 index 78e7cfaeb7acde..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -process-nextick-args -===== - -[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) - -```bash -npm install --save process-nextick-args -``` - -Always be able to pass arguments to process.nextTick, no matter the platform - -```js -var nextTick = require('process-nextick-args'); - -nextTick(function (a, b, c) { - console.log(a, b, c); -}, 'step', 3, 'profit'); -``` diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/test.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/test.js deleted file mode 100644 index ef15721584ac99..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/test.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require("tap").test; -var nextTick = require('./'); - -test('should work', function (t) { - t.plan(5); - nextTick(function (a) { - t.ok(a); - nextTick(function (thing) { - t.equals(thing, 7); - }, 7); - }, true); - nextTick(function (a, b, c) { - t.equals(a, 'step'); - t.equals(b, 3); - t.equals(c, 'profit'); - }, 'step', 3, 'profit'); -}); - -test('correct number of arguments', function (t) { - t.plan(1); - nextTick(function () { - t.equals(2, arguments.length, 'correct number'); - }, 1, 2); -}); diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc1d21b9..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a48f5c89..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001501107..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54fb790982..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// 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 Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 4bc4749854bd57..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "string_decoder@~0.10.x", - "scope": null, - "escapedName": "string_decoder", - "name": "string_decoder", - "rawSpec": "~0.10.x", - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ] - ], - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_id": "string_decoder@0.10.31", - "_inCache": true, - "_location": "/mississippi/concat-stream/readable-stream/string_decoder", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "_npmVersion": "1.4.23", - "_phantomChildren": {}, - "_requested": { - "raw": "string_decoder@~0.10.x", - "scope": null, - "escapedName": "string_decoder", - "name": "string_decoder", - "rawSpec": "~0.10.x", - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/concat-stream/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_shrinkwrap": null, - "_spec": "string_decoder@~0.10.x", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "dependencies": {}, - "description": "The string_decoder module from Node core", - "devDependencies": { - "tap": "~0.4.8" - }, - "directories": {}, - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "name": "string_decoder", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "0.10.31" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/History.md b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/History.md deleted file mode 100644 index acc8675372e980..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/LICENSE b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c225c9ba..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/README.md b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa7c250a6..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/browser.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f065ea5a..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/node.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5ddd3fb..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json deleted file mode 100644 index d350c79f1b75c0..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "util-deprecate@~1.0.1", - "scope": null, - "escapedName": "util-deprecate", - "name": "util-deprecate", - "rawSpec": "~1.0.1", - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ] - ], - "_from": "util-deprecate@>=1.0.1 <1.1.0", - "_id": "util-deprecate@1.0.2", - "_inCache": true, - "_location": "/mississippi/concat-stream/readable-stream/util-deprecate", - "_nodeVersion": "4.1.2", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "raw": "util-deprecate@~1.0.1", - "scope": null, - "escapedName": "util-deprecate", - "name": "util-deprecate", - "rawSpec": "~1.0.1", - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/concat-stream/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_shrinkwrap": null, - "_spec": "util-deprecate@~1.0.1", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "dependencies": {}, - "description": "The Node.js `util.deprecate()` function with browser support", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", - "homepage": "https://github.com/TooTallNate/util-deprecate", - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "license": "MIT", - "main": "node.js", - "maintainers": [ - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "name": "util-deprecate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.0.2" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/package.json b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/package.json deleted file mode 100644 index df563e83657298..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-stream@~2.0.0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream" - ] - ], - "_from": "readable-stream@>=2.0.0 <2.1.0", - "_id": "readable-stream@2.0.6", - "_inCache": true, - "_location": "/mississippi/concat-stream/readable-stream", - "_nodeVersion": "5.7.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.0.6.tgz_1457893507709_0.369257491780445" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-stream@~2.0.0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/concat-stream" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "_shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "_shrinkwrap": null, - "_spec": "readable-stream@~2.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream", - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - }, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "tap": "~0.2.6", - "tape": "~4.5.1", - "zuul": "~3.9.0" - }, - "directories": {}, - "dist": { - "shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" - }, - "gitHead": "01fb5608a970b42c900b96746cadc13d27dd9d7e", - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "readable-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "browser": "npm run write-zuul && zuul -- test/browser.js", - "test": "tap test/parallel/*.js test/ours/*.js", - "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" - }, - "version": "2.0.6" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a55165f9..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/readable.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/readable.js deleted file mode 100644 index 6222a579864dd2..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,12 +0,0 @@ -var Stream = (function (){ - try { - return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify - } catch(_){} -}()); -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream || exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/transform.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f0780e993..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/writable.js b/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf3c12e9..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/package.json b/deps/npm/node_modules/mississippi/node_modules/concat-stream/package.json index abbb3d43623df7..cd01702872c3fa 100644 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/package.json +++ b/deps/npm/node_modules/mississippi/node_modules/concat-stream/package.json @@ -14,22 +14,20 @@ ] ], "_from": "concat-stream@>=1.5.0 <2.0.0", - "_id": "concat-stream@1.5.2", + "_id": "concat-stream@1.6.0", "_inCache": true, "_location": "/mississippi/concat-stream", - "_nodeVersion": "4.4.3", + "_nodeVersion": "4.6.2", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/concat-stream-1.5.2.tgz_1472715196934_0.010375389130786061" + "tmp": "tmp/concat-stream-1.6.0.tgz_1482162257023_0.2988202746491879" }, "_npmUser": { "name": "mafintosh", "email": "mathiasbuus@gmail.com" }, - "_npmVersion": "2.15.9", - "_phantomChildren": { - "inherits": "2.0.3" - }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, "_requested": { "raw": "concat-stream@^1.5.0", "scope": null, @@ -42,8 +40,8 @@ "_requiredBy": [ "/mississippi" ], - "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "_shasum": "708978624d856af41a5a741defdd261da752c266", + "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "_shasum": "0aac662fd52be78964d5532f694784e70110acf7", "_shrinkwrap": null, "_spec": "concat-stream@^1.5.0", "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi", @@ -55,18 +53,18 @@ "url": "http://github.com/maxogden/concat-stream/issues" }, "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "~2.0.0", - "typedarray": "~0.0.5" + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" }, "description": "writable stream that concatenates strings or binary data and calls a callback with the result", "devDependencies": { - "tape": "~2.3.2" + "tape": "^4.6.3" }, "directories": {}, "dist": { - "shasum": "708978624d856af41a5a741defdd261da752c266", - "tarball": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz" + "shasum": "0aac662fd52be78964d5532f694784e70110acf7", + "tarball": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz" }, "engines": [ "node >= 0.8" @@ -74,8 +72,8 @@ "files": [ "index.js" ], - "gitHead": "731fedd137eae89d066c249fdca070f8f16afbb8", - "homepage": "https://github.com/maxogden/concat-stream#readme", + "gitHead": "e482281642c1e011fc158f5749ef40a71c77a426", + "homepage": "https://github.com/maxogden/concat-stream", "license": "MIT", "main": "index.js", "maintainers": [ @@ -120,5 +118,5 @@ "android-browser/4.2..latest" ] }, - "version": "1.5.2" + "version": "1.6.0" } diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/readme.md b/deps/npm/node_modules/mississippi/node_modules/concat-stream/readme.md index a2e1d2b151746d..94787219906507 100644 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/readme.md +++ b/deps/npm/node_modules/mississippi/node_modules/concat-stream/readme.md @@ -16,7 +16,7 @@ There are also `objectMode` streams that emit things other than Buffers, and you ## Related -`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. +`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. ### examples diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/README.md b/deps/npm/node_modules/mississippi/node_modules/duplexify/README.md index 6ed497b4ad143e..27669f6b6b9003 100644 --- a/deps/npm/node_modules/mississippi/node_modules/duplexify/README.md +++ b/deps/npm/node_modules/mississippi/node_modules/duplexify/README.md @@ -3,7 +3,7 @@ Turn a writeable and readable stream into a single streams2 duplex stream. Similar to [duplexer2](https://github.com/deoxxa/duplexer2) except it supports both streams2 and streams1 as input -and it allows you to set the readable and writable part asynchroniously using `setReadable(stream)` and `setWritable(stream)` +and it allows you to set the readable and writable part asynchronously using `setReadable(stream)` and `setWritable(stream)` ``` npm install duplexify @@ -27,7 +27,7 @@ dup.on('data', function(data) { }) ``` -You can also set the readable and writable parts asynchroniously +You can also set the readable and writable parts asynchronously ``` js var dup = duplexify() diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/index.js b/deps/npm/node_modules/mississippi/node_modules/duplexify/index.js index 377eb60ad78356..a04f124fa9362c 100644 --- a/deps/npm/node_modules/mississippi/node_modules/duplexify/index.js +++ b/deps/npm/node_modules/mississippi/node_modules/duplexify/index.js @@ -158,7 +158,8 @@ Duplexify.prototype._forward = function() { var data - while ((data = shift(this._readable2)) !== null) { + while (this._drained && (data = shift(this._readable2)) !== null) { + if (this.destroyed) continue this._drained = this.push(data) } diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/package.json b/deps/npm/node_modules/mississippi/node_modules/duplexify/package.json index 485f0312ea86cb..a8de9a133f9a60 100644 --- a/deps/npm/node_modules/mississippi/node_modules/duplexify/package.json +++ b/deps/npm/node_modules/mississippi/node_modules/duplexify/package.json @@ -14,13 +14,13 @@ ] ], "_from": "duplexify@>=3.4.2 <4.0.0", - "_id": "duplexify@3.4.5", + "_id": "duplexify@3.5.0", "_inCache": true, "_location": "/mississippi/duplexify", - "_nodeVersion": "4.4.3", + "_nodeVersion": "4.6.1", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/duplexify-3.4.5.tgz_1468011872327_0.44416941492818296" + "tmp": "tmp/duplexify-3.5.0.tgz_1477317448157_0.2257942291907966" }, "_npmUser": { "name": "mafintosh", @@ -43,8 +43,8 @@ "/mississippi", "/mississippi/pumpify" ], - "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.4.5.tgz", - "_shasum": "0e7e287a775af753bf57e6e7b7f21f183f6c3a53", + "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.0.tgz", + "_shasum": "1aa773002e1578457e9d9d4a50b0ccaaebcbd604", "_shrinkwrap": null, "_spec": "duplexify@^3.4.2", "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi", @@ -60,7 +60,7 @@ "readable-stream": "^2.0.0", "stream-shift": "^1.0.0" }, - "description": "Turn a writeable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input", + "description": "Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input", "devDependencies": { "concat-stream": "^1.4.6", "tape": "^2.13.3", @@ -68,10 +68,10 @@ }, "directories": {}, "dist": { - "shasum": "0e7e287a775af753bf57e6e7b7f21f183f6c3a53", - "tarball": "https://registry.npmjs.org/duplexify/-/duplexify-3.4.5.tgz" + "shasum": "1aa773002e1578457e9d9d4a50b0ccaaebcbd604", + "tarball": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.0.tgz" }, - "gitHead": "338de6776ce9b25d7ab6e91d766166245a8f070a", + "gitHead": "97f525d36ce275e52435611d70b3a77a7234eaa1", "homepage": "https://github.com/mafintosh/duplexify", "keywords": [ "duplex", @@ -100,5 +100,5 @@ "scripts": { "test": "tape test.js" }, - "version": "3.4.5" + "version": "3.5.0" } diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/.npmignore b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/.npmignore index 3c3629e647f5dd..3e70011a19a60e 100644 --- a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/.npmignore +++ b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/.npmignore @@ -1 +1,3 @@ node_modules +bundle.js +test.html diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/example.js b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/example.js new file mode 100644 index 00000000000000..fa6b5dab25578c --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/example.js @@ -0,0 +1,22 @@ +var writer = require('./') + +var ws = writer(write, flush) + +ws.on('finish', function () { + console.log('finished') +}) + +ws.write('hello') +ws.write('world') +ws.end() + +function write (data, enc, cb) { + // i am your normal ._write method + console.log('writing', data.toString()) + cb() +} + +function flush (cb) { + // i am called before finish is emitted + setTimeout(cb, 1000) // wait 1 sec +} diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js index d7715734b4d1d9..e82e126126fd24 100644 --- a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js +++ b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js @@ -1,5 +1,5 @@ var stream = require('readable-stream') -var util = require('util') +var inherits = require('inherits') var SIGNAL_FLUSH = new Buffer([0]) @@ -21,7 +21,7 @@ function WriteStream (opts, write, flush) { this._flush = flush || null } -util.inherits(WriteStream, stream.Writable) +inherits(WriteStream, stream.Writable) WriteStream.obj = function (opts, worker, flush) { if (typeof opts === 'function') return WriteStream.obj(null, opts, worker) @@ -47,6 +47,6 @@ WriteStream.prototype.end = function (data, enc, cb) { WriteStream.prototype.destroy = function (err) { if (this.destroyed) return this.destroyed = true - if (err) this.emit('error') + if (err) this.emit('error', err) this.emit('close') } diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/package.json b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/package.json index a73eaeb36efeb0..cd239a22b51edd 100644 --- a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/package.json +++ b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/package.json @@ -14,15 +14,19 @@ ] ], "_from": "flush-write-stream@>=1.0.0 <2.0.0", - "_id": "flush-write-stream@1.0.0", + "_id": "flush-write-stream@1.0.2", "_inCache": true, "_location": "/mississippi/flush-write-stream", - "_nodeVersion": "4.1.1", + "_nodeVersion": "4.2.6", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/flush-write-stream-1.0.2.tgz_1476614807882_0.22224654001183808" + }, "_npmUser": { "name": "mafintosh", "email": "mathiasbuus@gmail.com" }, - "_npmVersion": "2.14.4", + "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { "raw": "flush-write-stream@^1.0.0", @@ -36,8 +40,8 @@ "_requiredBy": [ "/mississippi" ], - "_resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.0.tgz", - "_shasum": "cc4fc24f4b4c973f80027f27cc095841639965a7", + "_resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", + "_shasum": "c81b90d8746766f1a609a46809946c45dd8ae417", "_shrinkwrap": null, "_spec": "flush-write-stream@^1.0.0", "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi", @@ -49,6 +53,7 @@ "url": "https://github.com/mafintosh/flush-write-stream/issues" }, "dependencies": { + "inherits": "^2.0.1", "readable-stream": "^2.0.4" }, "description": "A write stream constructor that supports a flush function that is called before finish is emitted", @@ -57,10 +62,10 @@ }, "directories": {}, "dist": { - "shasum": "cc4fc24f4b4c973f80027f27cc095841639965a7", - "tarball": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.0.tgz" + "shasum": "c81b90d8746766f1a609a46809946c45dd8ae417", + "tarball": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz" }, - "gitHead": "50e81d8eeee8a9666c7d5105775a6c89b7ae9dfa", + "gitHead": "d35a4071dacbcc60fc40d798fa58fc425cba3efc", "homepage": "https://github.com/mafintosh/flush-write-stream", "license": "MIT", "main": "index.js", @@ -80,5 +85,5 @@ "scripts": { "test": "tape test.js" }, - "version": "1.0.0" + "version": "1.0.2" } diff --git a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/test.js b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/test.js index 7383acede6f5db..6cd0c20e1f795a 100644 --- a/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/test.js +++ b/deps/npm/node_modules/mississippi/node_modules/flush-write-stream/test.js @@ -70,3 +70,16 @@ tape('can pass options', function (t) { process.nextTick(cb) } }) + +tape('emits error on destroy', function (t) { + var expected = new Error() + + var ws = writer({objectMode: true}, function () {}) + + ws.on('error', function (err) { + t.equal(err, expected) + }) + ws.on('close', t.end) + + ws.destroy(expected) +}) diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.npmignore b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/.npmignore similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.npmignore rename to deps/npm/node_modules/mississippi/node_modules/parallel-transform/.npmignore diff --git a/deps/npm/node_modules/mississippi/node_modules/parallel-transform/LICENSE b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/LICENSE new file mode 100644 index 00000000000000..4b30ed5d9509cb --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/LICENSE @@ -0,0 +1,20 @@ +Copyright 2013 Mathias Buus + +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. diff --git a/deps/npm/node_modules/mississippi/node_modules/parallel-transform/README.md b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/README.md new file mode 100644 index 00000000000000..f53e130849328f --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/README.md @@ -0,0 +1,54 @@ +# parallel-transform + +[Transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform_1) for Node.js that allows you to run your transforms +in parallel without changing the order of the output. + + npm install parallel-transform + +It is easy to use + +``` js +var transform = require('parallel-transform'); + +var stream = transform(10, function(data, callback) { // 10 is the parallism level + setTimeout(function() { + callback(null, data); + }, Math.random() * 1000); +}); + +for (var i = 0; i < 10; i++) { + stream.write(''+i); +} +stream.end(); + +stream.on('data', function(data) { + console.log(data); // prints 0,1,2,... +}); +stream.on('end', function() { + console.log('stream has ended'); +}); +``` + +If you run the above example you'll notice that it runs in parallel +(does not take ~1 second between each print) and that the order is preserved + +## Stream options + +All transforms are Node 0.10 streams. Per default they are created with the options `{objectMode:true}`. +If you want to use your own stream options pass them as the second parameter + +``` js +var stream = transform(10, {objectMode:false}, function(data, callback) { + // data is now a buffer + callback(null, data); +}); + +fs.createReadStream('filename').pipe(stream).pipe(process.stdout); +``` + +### Unordered +Passing the option `{ordered:false}` will output the data as soon as it's processed by a transform, without waiting to respect the order. + +## License + +MIT \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/parallel-transform/index.js b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/index.js new file mode 100644 index 00000000000000..77329e4ccfecf1 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/index.js @@ -0,0 +1,105 @@ +var Transform = require('readable-stream').Transform; +var inherits = require('inherits'); +var cyclist = require('cyclist'); +var util = require('util'); + +var ParallelTransform = function(maxParallel, opts, ontransform) { + if (!(this instanceof ParallelTransform)) return new ParallelTransform(maxParallel, opts, ontransform); + + if (typeof maxParallel === 'function') { + ontransform = maxParallel; + opts = null; + maxParallel = 1; + } + if (typeof opts === 'function') { + ontransform = opts; + opts = null; + } + + if (!opts) opts = {}; + if (!opts.highWaterMark) opts.highWaterMark = Math.max(maxParallel, 16); + if (opts.objectMode !== false) opts.objectMode = true; + + Transform.call(this, opts); + + this._maxParallel = maxParallel; + this._ontransform = ontransform; + this._destroyed = false; + this._flushed = false; + this._ordered = opts.ordered !== false; + this._buffer = this._ordered ? cyclist(maxParallel) : []; + this._top = 0; + this._bottom = 0; + this._ondrain = null; +}; + +inherits(ParallelTransform, Transform); + +ParallelTransform.prototype.destroy = function() { + if (this._destroyed) return; + this._destroyed = true; + this.emit('close'); +}; + +ParallelTransform.prototype._transform = function(chunk, enc, callback) { + var self = this; + var pos = this._top++; + + this._ontransform(chunk, function(err, data) { + if (self._destroyed) return; + if (err) { + self.emit('error', err); + self.push(null); + self.destroy(); + return; + } + if (self._ordered) { + self._buffer.put(pos, (data === undefined || data === null) ? null : data); + } + else { + self._buffer.push(data); + } + self._drain(); + }); + + if (this._top - this._bottom < this._maxParallel) return callback(); + this._ondrain = callback; +}; + +ParallelTransform.prototype._flush = function(callback) { + this._flushed = true; + this._ondrain = callback; + this._drain(); +}; + +ParallelTransform.prototype._drain = function() { + if (this._ordered) { + while (this._buffer.get(this._bottom) !== undefined) { + var data = this._buffer.del(this._bottom++); + if (data === null) continue; + this.push(data); + } + } + else { + while (this._buffer.length > 0) { + var data = this._buffer.pop(); + this._bottom++; + if (data === null) continue; + this.push(data); + } + } + + + if (!this._drained() || !this._ondrain) return; + + var ondrain = this._ondrain; + this._ondrain = null; + ondrain(); +}; + +ParallelTransform.prototype._drained = function() { + var diff = this._top - this._bottom; + return this._flushed ? !diff : diff < this._maxParallel; +}; + +module.exports = ParallelTransform; diff --git a/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore new file mode 100644 index 00000000000000..ba99195bae87cd --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore @@ -0,0 +1 @@ +bench diff --git a/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md new file mode 100644 index 00000000000000..50c35cc5fd4573 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md @@ -0,0 +1,39 @@ +# Cyclist + +Cyclist is an efficient [cyclic list](http://en.wikipedia.org/wiki/Circular_buffer) implemention for Javascript. +It is available through npm + + npm install cyclist + +## What? + +Cyclist allows you to create a list of fixed size that is cyclic. +In a cyclist list the element following the last one is the first one. +This property can be really useful when for example trying to order data +packets that can arrive out of order over a network stream. + +## Usage + +``` js +var cyclist = require('cyclist'); +var list = cyclist(4); // if size (4) is not a power of 2 it will be the follwing power of 2 + // this buffer can now hold 4 elements in total + +list.put(42, 'hello 42'); // store something and index 42 +list.put(43, 'hello 43'); // store something and index 43 + +console.log(list.get(42)); // prints hello 42 +console.log(list.get(46)); // prints hello 42 again since 46 - 42 == list.size +``` + +## API + +* `cyclist(size)` creates a new buffer +* `cyclist#get(index)` get an object stored in the buffer +* `cyclist#put(index,value)` insert an object into the buffer +* `cyclist#del(index)` delete an object from an index +* `cyclist#size` property containing current size of buffer + +## License + +MIT diff --git a/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js new file mode 100644 index 00000000000000..baf710c3a9a61c --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js @@ -0,0 +1,33 @@ +var ensureTwoPower = function(n) { + if (n && !(n & (n - 1))) return n; + var p = 1; + while (p < n) p <<= 1; + return p; +}; + +var Cyclist = function(size) { + if (!(this instanceof Cyclist)) return new Cyclist(size); + size = ensureTwoPower(size); + this.mask = size-1; + this.size = size; + this.values = new Array(size); +}; + +Cyclist.prototype.put = function(index, val) { + var pos = index & this.mask; + this.values[pos] = val; + return pos; +}; + +Cyclist.prototype.get = function(index) { + return this.values[index & this.mask]; +}; + +Cyclist.prototype.del = function(index) { + var pos = index & this.mask; + var val = this.values[pos]; + this.values[pos] = undefined; + return val; +}; + +module.exports = Cyclist; \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json new file mode 100644 index 00000000000000..ad045eb971434b --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + { + "raw": "cyclist@~0.2.2", + "scope": null, + "escapedName": "cyclist", + "name": "cyclist", + "rawSpec": "~0.2.2", + "spec": ">=0.2.2 <0.3.0", + "type": "range" + }, + "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/parallel-transform" + ] + ], + "_from": "cyclist@>=0.2.2 <0.3.0", + "_id": "cyclist@0.2.2", + "_inCache": true, + "_location": "/mississippi/parallel-transform/cyclist", + "_npmUser": { + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" + }, + "_npmVersion": "1.3.5", + "_phantomChildren": {}, + "_requested": { + "raw": "cyclist@~0.2.2", + "scope": null, + "escapedName": "cyclist", + "name": "cyclist", + "rawSpec": "~0.2.2", + "spec": ">=0.2.2 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/mississippi/parallel-transform" + ], + "_resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "_shasum": "1b33792e11e914a2fd6d6ed6447464444e5fa640", + "_shrinkwrap": null, + "_spec": "cyclist@~0.2.2", + "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/parallel-transform", + "author": { + "name": "Mathias Buus Madsen", + "email": "mathiasbuus@gmail.com" + }, + "bugs": { + "url": "https://github.com/mafintosh/cyclist/issues" + }, + "dependencies": {}, + "description": "Cyclist is an efficient cyclic list implemention.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "1b33792e11e914a2fd6d6ed6447464444e5fa640", + "tarball": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz" + }, + "homepage": "https://github.com/mafintosh/cyclist#readme", + "keywords": [ + "circular", + "buffer", + "ring", + "cyclic", + "data" + ], + "maintainers": [ + { + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" + } + ], + "name": "cyclist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/cyclist.git" + }, + "version": "0.2.2" +} diff --git a/deps/npm/node_modules/mississippi/node_modules/parallel-transform/package.json b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/package.json new file mode 100644 index 00000000000000..357b4898a662b3 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/parallel-transform/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + { + "raw": "parallel-transform@^1.1.0", + "scope": null, + "escapedName": "parallel-transform", + "name": "parallel-transform", + "rawSpec": "^1.1.0", + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "/Users/zkat/Documents/code/npm/node_modules/mississippi" + ] + ], + "_from": "parallel-transform@>=1.1.0 <2.0.0", + "_id": "parallel-transform@1.1.0", + "_inCache": true, + "_location": "/mississippi/parallel-transform", + "_nodeVersion": "4.6.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/parallel-transform-1.1.0.tgz_1478596056784_0.9169374129269272" + }, + "_npmUser": { + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "parallel-transform@^1.1.0", + "scope": null, + "escapedName": "parallel-transform", + "name": "parallel-transform", + "rawSpec": "^1.1.0", + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/mississippi" + ], + "_resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "_shasum": "d410f065b05da23081fcd10f28854c29bda33b06", + "_shrinkwrap": null, + "_spec": "parallel-transform@^1.1.0", + "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi", + "author": { + "name": "Mathias Buus Madsen", + "email": "mathiasbuus@gmail.com" + }, + "bugs": { + "url": "https://github.com/mafintosh/parallel-transform/issues" + }, + "dependencies": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + }, + "description": "Transform stream that allows you to run your transforms in parallel without changing the order", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "d410f065b05da23081fcd10f28854c29bda33b06", + "tarball": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz" + }, + "gitHead": "1b4919bc318eb0cbd6e8ee08c4d56f405d74e643", + "homepage": "https://github.com/mafintosh/parallel-transform", + "keywords": [ + "transform", + "stream", + "parallel", + "preserve", + "order" + ], + "license": "MIT", + "maintainers": [ + { + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" + } + ], + "name": "parallel-transform", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/parallel-transform.git" + }, + "scripts": {}, + "version": "1.1.0" +} diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/index.js b/deps/npm/node_modules/mississippi/node_modules/pump/index.js index 843da727ef88a3..060ce5f4fd3662 100644 --- a/deps/npm/node_modules/mississippi/node_modules/pump/index.js +++ b/deps/npm/node_modules/mississippi/node_modules/pump/index.js @@ -9,6 +9,7 @@ var isFn = function (fn) { } var isFS = function (stream) { + if (!fs) return false // browser return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) } diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/package.json b/deps/npm/node_modules/mississippi/node_modules/pump/package.json index 2457d2f00d2cdf..2226426b52ab4c 100644 --- a/deps/npm/node_modules/mississippi/node_modules/pump/package.json +++ b/deps/npm/node_modules/mississippi/node_modules/pump/package.json @@ -14,15 +14,19 @@ ] ], "_from": "pump@>=1.0.0 <2.0.0", - "_id": "pump@1.0.1", + "_id": "pump@1.0.2", "_inCache": true, "_location": "/mississippi/pump", - "_nodeVersion": "4.1.1", + "_nodeVersion": "4.6.2", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/pump-1.0.2.tgz_1482243286673_0.09530888125300407" + }, "_npmUser": { "name": "mafintosh", "email": "mathiasbuus@gmail.com" }, - "_npmVersion": "2.14.4", + "_npmVersion": "2.15.11", "_phantomChildren": {}, "_requested": { "raw": "pump@^1.0.0", @@ -37,8 +41,8 @@ "/mississippi", "/mississippi/pumpify" ], - "_resolved": "https://registry.npmjs.org/pump/-/pump-1.0.1.tgz", - "_shasum": "f1f1409fb9bd1085bbdb576b43b84ec4b5eadc1a", + "_resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", + "_shasum": "3b3ee6512f94f0e575538c17995f9f16990a5d51", "_shrinkwrap": null, "_spec": "pump@^1.0.0", "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi", @@ -46,6 +50,9 @@ "name": "Mathias Buus Madsen", "email": "mathiasbuus@gmail.com" }, + "browser": { + "fs": false + }, "bugs": { "url": "https://github.com/mafintosh/pump/issues" }, @@ -57,10 +64,10 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "f1f1409fb9bd1085bbdb576b43b84ec4b5eadc1a", - "tarball": "https://registry.npmjs.org/pump/-/pump-1.0.1.tgz" + "shasum": "3b3ee6512f94f0e575538c17995f9f16990a5d51", + "tarball": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz" }, - "gitHead": "6abb030191e1ccb12c5f735a4f39162307f93b90", + "gitHead": "90ed7ae8923ade7c7589e3db28c29fbc5c2d42ca", "homepage": "https://github.com/mafintosh/pump", "keywords": [ "streams", @@ -85,5 +92,5 @@ "scripts": { "test": "node test.js" }, - "version": "1.0.1" + "version": "1.0.2" } diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/test-browser.js b/deps/npm/node_modules/mississippi/node_modules/pump/test-browser.js new file mode 100644 index 00000000000000..80e852c7dcb9d8 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/pump/test-browser.js @@ -0,0 +1,58 @@ +var stream = require('stream') +var pump = require('./index') + +var rs = new stream.Readable() +var ws = new stream.Writable() + +rs._read = function (size) { + this.push(Buffer(size).fill('abc')) +} + +ws._write = function (chunk, encoding, cb) { + setTimeout(function () { + cb() + }, 100) +} + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) console.log('done') +} + +ws.on('finish', function () { + wsClosed = true + check() +}) + +rs.on('end', function () { + rsClosed = true + check() +}) + +pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +setTimeout(function () { + rs.push(null) + rs.emit('close') +}, 1000) + +setTimeout(function () { + if (!check()) throw new Error('timeout') +}, 5000) diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js b/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js index ea8d112f981f09..2c07e957a3beb2 100644 --- a/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js +++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js @@ -1,4 +1,5 @@ var eos = require('end-of-stream') +var shift = require('stream-shift') module.exports = each @@ -41,7 +42,7 @@ function each (stream, fn, cb) { if (ended || running) return want = false - var data = stream.read() + var data = shift(stream) if (!data) { want = true return diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/.npmignore b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore similarity index 100% rename from deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/.npmignore rename to deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.travis.yml b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml similarity index 58% rename from deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.travis.yml rename to deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml index cc4dba29d959a2..ecd4193f6025e0 100644 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/.travis.yml +++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml @@ -1,4 +1,6 @@ language: node_js node_js: - - "0.8" - "0.10" + - "0.12" + - "4" + - "6" diff --git a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/license.md b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE similarity index 79% rename from deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/license.md rename to deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE index c67e3532b54245..bae9da7bfae2b5 100644 --- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/license.md +++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE @@ -1,4 +1,6 @@ -# Copyright (c) 2015 Calvin Metcalf +The MIT License (MIT) + +Copyright (c) 2016 Mathias Buus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -7,13 +9,13 @@ 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 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 +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.** +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md new file mode 100644 index 00000000000000..d9cc2d945fa161 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md @@ -0,0 +1,25 @@ +# stream-shift + +Returns the next buffer/object in a stream's readable queue + +``` +npm install stream-shift +``` + +[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift) + +## Usage + +``` js +var shift = require('stream-shift') + +console.log(shift(someStream)) // first item in its buffer +``` + +## Credit + +Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6 + +## License + +MIT diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js new file mode 100644 index 00000000000000..c4b18b9c2a5cf8 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js @@ -0,0 +1,20 @@ +module.exports = shift + +function shift (stream) { + var rs = stream._readableState + if (!rs) return null + return rs.objectMode ? stream.read() : stream.read(getStateLength(rs)) +} + +function getStateLength (state) { + if (state.buffer.length) { + // Since node 6.3.0 state.buffer is a BufferList not an array + if (state.buffer.head) { + return state.buffer.head.data.length + } + + return state.buffer[0].length + } + + return state.length +} diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json new file mode 100644 index 00000000000000..54bd23eb8e69a1 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "stream-shift@^1.0.0", + "scope": null, + "escapedName": "stream-shift", + "name": "stream-shift", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/duplexify" + ], + [ + { + "raw": "stream-shift@^1.0.0", + "scope": null, + "escapedName": "stream-shift", + "name": "stream-shift", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/stream-each" + ] + ], + "_from": "stream-shift@^1.0.0", + "_id": "stream-shift@1.0.0", + "_inCache": true, + "_location": "/mississippi/stream-each/stream-shift", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/stream-shift-1.0.0.tgz_1468011662152_0.6510484367609024" + }, + "_npmUser": { + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "stream-shift@^1.0.0", + "scope": null, + "escapedName": "stream-shift", + "name": "stream-shift", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/mississippi/stream-each" + ], + "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "_shasum": "d5c752825e5367e786f78e18e445ea223a155952", + "_shrinkwrap": null, + "_spec": "stream-shift@^1.0.0", + "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/stream-each", + "author": { + "name": "Mathias Buus", + "url": "@mafintosh" + }, + "bugs": { + "url": "https://github.com/mafintosh/stream-shift/issues" + }, + "dependencies": {}, + "description": "Returns the next buffer/object in a stream's readable queue", + "devDependencies": { + "standard": "^7.1.2", + "tape": "^4.6.0", + "through2": "^2.0.1" + }, + "directories": {}, + "dist": { + "shasum": "d5c752825e5367e786f78e18e445ea223a155952", + "tarball": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz" + }, + "gitHead": "2ea5f7dcd8ac6babb08324e6e603a3269252a2c4", + "homepage": "https://github.com/mafintosh/stream-shift", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" + } + ], + "name": "stream-shift", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mafintosh/stream-shift.git" + }, + "scripts": { + "test": "standard && tape test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js new file mode 100644 index 00000000000000..c0222c37d53fe5 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js @@ -0,0 +1,48 @@ +var tape = require('tape') +var through = require('through2') +var stream = require('stream') +var shift = require('./') + +tape('shifts next', function (t) { + var passthrough = through() + + passthrough.write('hello') + passthrough.write('world') + + t.same(shift(passthrough), Buffer('hello')) + t.same(shift(passthrough), Buffer('world')) + t.end() +}) + +tape('shifts next with core', function (t) { + var passthrough = stream.PassThrough() + + passthrough.write('hello') + passthrough.write('world') + + t.same(shift(passthrough), Buffer('hello')) + t.same(shift(passthrough), Buffer('world')) + t.end() +}) + +tape('shifts next with object mode', function (t) { + var passthrough = through({objectMode: true}) + + passthrough.write({hello: 1}) + passthrough.write({world: 1}) + + t.same(shift(passthrough), {hello: 1}) + t.same(shift(passthrough), {world: 1}) + t.end() +}) + +tape('shifts next with object mode with core', function (t) { + var passthrough = stream.PassThrough({objectMode: true}) + + passthrough.write({hello: 1}) + passthrough.write({world: 1}) + + t.same(shift(passthrough), {hello: 1}) + t.same(shift(passthrough), {world: 1}) + t.end() +}) diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json b/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json index d73cd30d829b82..f8594afda69674 100644 --- a/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json +++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json @@ -14,19 +14,19 @@ ] ], "_from": "stream-each@>=1.1.0 <2.0.0", - "_id": "stream-each@1.1.2", + "_id": "stream-each@1.2.0", "_inCache": true, "_location": "/mississippi/stream-each", - "_nodeVersion": "4.2.3", + "_nodeVersion": "4.6.1", "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/stream-each-1.1.2.tgz_1454600601831_0.7560806761030108" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/stream-each-1.2.0.tgz_1478427484733_0.5437065886799246" }, "_npmUser": { "name": "mafintosh", "email": "mathiasbuus@gmail.com" }, - "_npmVersion": "2.14.7", + "_npmVersion": "2.15.9", "_phantomChildren": {}, "_requested": { "raw": "stream-each@^1.1.0", @@ -40,8 +40,8 @@ "_requiredBy": [ "/mississippi" ], - "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.1.2.tgz", - "_shasum": "7d4f887f24c721ab0155b12a34263d8732ad8d39", + "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.0.tgz", + "_shasum": "1e95d47573f580d814dc0ff8cd0f66f1ce53c991", "_shrinkwrap": null, "_spec": "stream-each@^1.1.0", "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi", @@ -53,7 +53,8 @@ "url": "https://github.com/mafintosh/stream-each/issues" }, "dependencies": { - "end-of-stream": "^1.1.0" + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" }, "description": "Iterate all the data in a stream", "devDependencies": { @@ -63,10 +64,10 @@ }, "directories": {}, "dist": { - "shasum": "7d4f887f24c721ab0155b12a34263d8732ad8d39", - "tarball": "https://registry.npmjs.org/stream-each/-/stream-each-1.1.2.tgz" + "shasum": "1e95d47573f580d814dc0ff8cd0f66f1ce53c991", + "tarball": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.0.tgz" }, - "gitHead": "f0ef91ddbe95688e376598b9959cab463c733b57", + "gitHead": "2968bf4f195641f5eda594c781a0b590776bc702", "homepage": "https://github.com/mafintosh/stream-each", "license": "MIT", "main": "index.js", @@ -94,5 +95,5 @@ "scripts": { "test": "standard && tape test.js" }, - "version": "1.1.2" + "version": "1.2.0" } diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/LICENSE b/deps/npm/node_modules/mississippi/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029de11d71..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/LICENSE.html b/deps/npm/node_modules/mississippi/node_modules/through2/LICENSE.html new file mode 100644 index 00000000000000..ac478189ea2271 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/through2/LICENSE.html @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + +
+

The MIT License (MIT)

+

Copyright (c) 2016 Rod Vagg (the "Original Author") and additional 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.

+
+
+ + \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/LICENSE.md b/deps/npm/node_modules/mississippi/node_modules/through2/LICENSE.md new file mode 100644 index 00000000000000..7f0b93daaa4708 --- /dev/null +++ b/deps/npm/node_modules/mississippi/node_modules/through2/LICENSE.md @@ -0,0 +1,9 @@ +# The MIT License (MIT) + +**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional 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. \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/README.md b/deps/npm/node_modules/mississippi/node_modules/through2/README.md index c84b3464ada4c9..a916f15ef5e330 100644 --- a/deps/npm/node_modules/mississippi/node_modules/through2/README.md +++ b/deps/npm/node_modules/mississippi/node_modules/through2/README.md @@ -20,6 +20,9 @@ fs.createReadStream('ex.txt') callback() })) .pipe(fs.createWriteStream('out.txt')) + .on('finish', function () { + doSomethingSpecial() + }) ``` Or object streams: diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87a62766..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/.travis.yml deleted file mode 100644 index 1b82118460cfe4..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - npm install -g npm -notifications: - email: false -matrix: - fast_finish: true - allow_failures: - - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - include: - - node_js: '0.8' - env: TASK=test - - node_js: '0.10' - env: TASK=test - - node_js: '0.11' - env: TASK=test - - node_js: '0.12' - env: TASK=test - - node_js: 1 - env: TASK=test - - node_js: 2 - env: TASK=test - - node_js: 3 - env: TASK=test - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 5 - env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/.zuul.yml b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/.zuul.yml deleted file mode 100644 index 96d9cfbd38662f..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/.zuul.yml +++ /dev/null @@ -1 +0,0 @@ -ui: tape diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695a4cff2..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/README.md b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index 1a67c48cd031b5..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# readable-stream - -***Node-core v5.8.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core, including [documentation](doc/stream.markdown). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams WG Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/doc/stream.markdown b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/doc/stream.markdown deleted file mode 100644 index 0bc3819e63b025..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/doc/stream.markdown +++ /dev/null @@ -1,1760 +0,0 @@ -# Stream - - Stability: 2 - Stable - -A stream is an abstract interface implemented by various objects in -Node.js. For example a [request to an HTTP server][http-incoming-message] is a -stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All -streams are instances of [`EventEmitter`][]. - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for [Readable][] streams, [Writable][] -streams, [Duplex][] streams, and [Transform][] streams. - -This document is split up into 3 sections: - -1. The first section explains the parts of the API that you need to be - aware of to use streams in your programs. -2. The second section explains the parts of the API that you need to - use if you implement your own custom streams yourself. The API is designed to - make this easy for you to do. -3. The third section goes into more depth about how streams work, - including some of the internal mechanisms and functions that you - should probably not modify unless you definitely know what you are - doing. - - -## API for Stream Consumers - - - -Streams can be either [Readable][], [Writable][], or both ([Duplex][]). - -All streams are EventEmitters, but they also have other custom methods -and properties depending on whether they are Readable, Writable, or -Duplex. - -If a stream is both Readable and Writable, then it implements all of -the methods and events. So, a [Duplex][] or [Transform][] stream is -fully described by this API, though their implementation may be -somewhat different. - -It is not necessary to implement Stream interfaces in order to consume -streams in your programs. If you **are** implementing streaming -interfaces in your own program, please also refer to -[API for Stream Implementors][]. - -Almost all Node.js programs, no matter how simple, use Streams in some -way. Here is an example of using Streams in an Node.js program: - -```js -const http = require('http'); - -var server = http.createServer( (req, res) => { - // req is an http.IncomingMessage, which is a Readable Stream - // res is an http.ServerResponse, which is a Writable Stream - - var body = ''; - // we want to get the data as utf8 strings - // If you don't set an encoding, then you'll get Buffer objects - req.setEncoding('utf8'); - - // Readable streams emit 'data' events once a listener is added - req.on('data', (chunk) => { - body += chunk; - }); - - // the end event tells you that you have entire body - req.on('end', () => { - try { - var data = JSON.parse(body); - } catch (er) { - // uh oh! bad json! - res.statusCode = 400; - return res.end(`error: ${er.message}`); - } - - // write back something interesting to the user: - res.write(typeof data); - res.end(); - }); -}); - -server.listen(1337); - -// $ curl localhost:1337 -d '{}' -// object -// $ curl localhost:1337 -d '"foo"' -// string -// $ curl localhost:1337 -d 'not json' -// error: Unexpected token o -``` - -### Class: stream.Duplex - -Duplex streams are streams that implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Duplex streams include: - -* [TCP sockets][] -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Readable - - - -The Readable stream interface is the abstraction for a *source* of -data that you are reading from. In other words, data comes *out* of a -Readable stream. - -A Readable stream will not start emitting data until you indicate that -you are ready to receive it. - -Readable streams have two "modes": a **flowing mode** and a **paused -mode**. When in flowing mode, data is read from the underlying system -and provided to your program as fast as possible. In paused mode, you -must explicitly call [`stream.read()`][stream-read] to get chunks of data out. -Streams start out in paused mode. - -**Note**: If no data event handlers are attached, and there are no -[`stream.pipe()`][] destinations, and the stream is switched into flowing -mode, then data will be lost. - -You can switch to flowing mode by doing any of the following: - -* Adding a [`'data'`][] event handler to listen for data. -* Calling the [`stream.resume()`][stream-resume] method to explicitly open the - flow. -* Calling the [`stream.pipe()`][] method to send the data to a [Writable][]. - -You can switch back to paused mode by doing either of the following: - -* If there are no pipe destinations, by calling the - [`stream.pause()`][stream-pause] method. -* If there are pipe destinations, by removing any [`'data'`][] event - handlers, and removing all pipe destinations by calling the - [`stream.unpipe()`][] method. - -Note that, for backwards compatibility reasons, removing [`'data'`][] -event handlers will **not** automatically pause the stream. Also, if -there are piped destinations, then calling [`stream.pause()`][stream-pause] will -not guarantee that the stream will *remain* paused once those -destinations drain and ask for more data. - -Examples of readable streams include: - -* [HTTP responses, on the client][http-incoming-message] -* [HTTP requests, on the server][http-incoming-message] -* [fs read streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdout and stderr][] -* [`process.stdin`][] - -#### Event: 'close' - -Emitted when the stream and any of its underlying resources (a file -descriptor, for example) have been closed. The event indicates that -no more events will be emitted, and no further computation will occur. - -Not all streams will emit the `'close'` event. - -#### Event: 'data' - -* `chunk` {Buffer|String} The chunk of data. - -Attaching a `'data'` event listener to a stream that has not been -explicitly paused will switch the stream into flowing mode. Data will -then be passed as soon as it is available. - -If you just want to get all the data out of the stream as fast as -possible, this is the best way to do so. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -``` - -#### Event: 'end' - -This event fires when there will be no more data to read. - -Note that the `'end'` event **will not fire** unless the data is -completely consumed. This can be done by switching into flowing mode, -or by calling [`stream.read()`][stream-read] repeatedly until you get to the -end. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -readable.on('end', () => { - console.log('there will be no more data.'); -}); -``` - -#### Event: 'error' - -* {Error Object} - -Emitted if there was an error receiving data. - -#### Event: 'readable' - -When a chunk of data can be read from the stream, it will emit a -`'readable'` event. - -In some cases, listening for a `'readable'` event will cause some data -to be read into the internal buffer from the underlying system, if it -hadn't already. - -```javascript -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - // there is some data to read now -}); -``` - -Once the internal buffer is drained, a `'readable'` event will fire -again when more data is available. - -The `'readable'` event is not emitted in the "flowing" mode with the -sole exception of the last one, on end-of-stream. - -The `'readable'` event indicates that the stream has new information: -either new data is available or the end of the stream has been reached. -In the former case, [`stream.read()`][stream-read] will return that data. In the -latter case, [`stream.read()`][stream-read] will return null. For instance, in -the following example, `foo.txt` is an empty file: - -```js -const fs = require('fs'); -var rr = fs.createReadStream('foo.txt'); -rr.on('readable', () => { - console.log('readable:', rr.read()); -}); -rr.on('end', () => { - console.log('end'); -}); -``` - -The output of running this script is: - -``` -$ node test.js -readable: null -end -``` - -#### readable.isPaused() - -* Return: {Boolean} - -This method returns whether or not the `readable` has been **explicitly** -paused by client code (using [`stream.pause()`][stream-pause] without a -corresponding [`stream.resume()`][stream-resume]). - -```js -var readable = new stream.Readable - -readable.isPaused() // === false -readable.pause() -readable.isPaused() // === true -readable.resume() -readable.isPaused() // === false -``` - -#### readable.pause() - -* Return: `this` - -This method will cause a stream in flowing mode to stop emitting -[`'data'`][] events, switching out of flowing mode. Any data that becomes -available will remain in the internal buffer. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); - readable.pause(); - console.log('there will be no more data for 1 second'); - setTimeout(() => { - console.log('now data will start flowing again'); - readable.resume(); - }, 1000); -}); -``` - -#### readable.pipe(destination[, options]) - -* `destination` {stream.Writable} The destination for writing data -* `options` {Object} Pipe options - * `end` {Boolean} End the writer when the reader ends. Default = `true` - -This method pulls all the data out of a readable stream, and writes it -to the supplied destination, automatically managing the flow so that -the destination is not overwhelmed by a fast readable stream. - -Multiple destinations can be piped to safely. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt' -readable.pipe(writable); -``` - -This function returns the destination stream, so you can set up pipe -chains like so: - -```js -var r = fs.createReadStream('file.txt'); -var z = zlib.createGzip(); -var w = fs.createWriteStream('file.txt.gz'); -r.pipe(z).pipe(w); -``` - -For example, emulating the Unix `cat` command: - -```js -process.stdin.pipe(process.stdout); -``` - -By default [`stream.end()`][stream-end] is called on the destination when the -source stream emits [`'end'`][], so that `destination` is no longer writable. -Pass `{ end: false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - -```js -reader.pipe(writer, { end: false }); -reader.on('end', () => { - writer.end('Goodbye\n'); -}); -``` - -Note that [`process.stderr`][] and [`process.stdout`][] are never closed until -the process exits, regardless of the specified options. - -#### readable.read([size]) - -* `size` {Number} Optional argument to specify how much data to read. -* Return {String|Buffer|Null} - -The `read()` method pulls some data out of the internal buffer and -returns it. If there is no data available, then it will return -`null`. - -If you pass in a `size` argument, then it will return that many -bytes. If `size` bytes are not available, then it will return `null`, -unless we've ended, in which case it will return the data remaining -in the buffer. - -If you do not specify a `size` argument, then it will return all the -data in the internal buffer. - -This method should only be called in paused mode. In flowing mode, -this method is called automatically until the internal buffer is -drained. - -```js -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - var chunk; - while (null !== (chunk = readable.read())) { - console.log('got %d bytes of data', chunk.length); - } -}); -``` - -If this method returns a data chunk, then it will also trigger the -emission of a [`'data'`][] event. - -Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][] -event has been triggered will return `null`. No runtime error will be raised. - -#### readable.resume() - -* Return: `this` - -This method will cause the readable stream to resume emitting [`'data'`][] -events. - -This method will switch the stream into flowing mode. If you do *not* -want to consume the data from a stream, but you *do* want to get to -its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open -the flow of data. - -```js -var readable = getReadableStreamSomehow(); -readable.resume(); -readable.on('end', () => { - console.log('got to the end, but did not read anything'); -}); -``` - -#### readable.setEncoding(encoding) - -* `encoding` {String} The encoding to use. -* Return: `this` - -Call this function to cause the stream to return strings of the specified -encoding instead of Buffer objects. For example, if you do -`readable.setEncoding('utf8')`, then the output data will be interpreted as -UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`, -then the data will be encoded in hexadecimal string format. - -This properly handles multi-byte characters that would otherwise be -potentially mangled if you simply pulled the Buffers directly and -called [`buf.toString(encoding)`][] on them. If you want to read the data -as strings, always use this method. - -Also you can disable any encoding at all with `readable.setEncoding(null)`. -This approach is very useful if you deal with binary data or with large -multi-byte strings spread out over multiple chunks. - -```js -var readable = getReadableStreamSomehow(); -readable.setEncoding('utf8'); -readable.on('data', (chunk) => { - assert.equal(typeof chunk, 'string'); - console.log('got %d characters of string data', chunk.length); -}); -``` - -#### readable.unpipe([destination]) - -* `destination` {stream.Writable} Optional specific stream to unpipe - -This method will remove the hooks set up for a previous [`stream.pipe()`][] -call. - -If the destination is not specified, then all pipes are removed. - -If the destination is specified, but no pipe is set up for it, then -this is a no-op. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt', -// but only for the first second -readable.pipe(writable); -setTimeout(() => { - console.log('stop writing to file.txt'); - readable.unpipe(writable); - console.log('manually close the file stream'); - writable.end(); -}, 1000); -``` - -#### readable.unshift(chunk) - -* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue - -This is useful in certain cases where a stream is being consumed by a -parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source, so that the stream can be -passed on to some other party. - -Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event -has been triggered; a runtime error will be raised. - -If you find that you must often call `stream.unshift(chunk)` in your -programs, consider implementing a [Transform][] stream instead. (See [API -for Stream Implementors][].) - -```js -// Pull off a header delimited by \n\n -// use unshift() if we get too much -// Call the callback with (error, header, stream) -const StringDecoder = require('string_decoder').StringDecoder; -function parseHeader(stream, callback) { - stream.on('error', callback); - stream.on('readable', onReadable); - var decoder = new StringDecoder('utf8'); - var header = ''; - function onReadable() { - var chunk; - while (null !== (chunk = stream.read())) { - var str = decoder.write(chunk); - if (str.match(/\n\n/)) { - // found the header boundary - var split = str.split(/\n\n/); - header += split.shift(); - var remaining = split.join('\n\n'); - var buf = new Buffer(remaining, 'utf8'); - if (buf.length) - stream.unshift(buf); - stream.removeListener('error', callback); - stream.removeListener('readable', onReadable); - // now the body of the message can be read from the stream. - callback(null, header, stream); - } else { - // still reading the header. - header += str; - } - } - } -} -``` - -Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)` -will not end the reading process by resetting the internal reading state of the -stream. This can cause unexpected results if `unshift()` is called during a -read (i.e. from within a [`stream._read()`][stream-_read] implementation on a -custom stream). Following the call to `unshift()` with an immediate -[`stream.push('')`][stream-push] will reset the reading state appropriately, -however it is best to simply avoid calling `unshift()` while in the process of -performing a read. - -#### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -Versions of Node.js prior to v0.10 had streams that did not implement the -entire Streams API as it is today. (See [Compatibility][] for -more information.) - -If you are using an older Node.js library that emits [`'data'`][] events and -has a [`stream.pause()`][stream-pause] method that is advisory only, then you -can use the `wrap()` method to create a [Readable][] stream that uses the old -stream as its data source. - -You will very rarely ever need to call this function, but it exists -as a convenience for interacting with old Node.js programs and libraries. - -For example: - -```js -const OldReader = require('./old-api-module.js').OldReader; -const Readable = require('stream').Readable; -const oreader = new OldReader; -const myReader = new Readable().wrap(oreader); - -myReader.on('readable', () => { - myReader.read(); // etc. -}); -``` - -### Class: stream.Transform - -Transform streams are [Duplex][] streams where the output is in some way -computed from the input. They implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Transform streams include: - -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Writable - - - -The Writable stream interface is an abstraction for a *destination* -that you are writing data *to*. - -Examples of writable streams include: - -* [HTTP requests, on the client][] -* [HTTP responses, on the server][] -* [fs write streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdin][] -* [`process.stdout`][], [`process.stderr`][] - -#### Event: 'drain' - -If a [`stream.write(chunk)`][stream-write] call returns `false`, then the -`'drain'` event will indicate when it is appropriate to begin writing more data -to the stream. - -```js -// Write the data to the supplied writable stream one million times. -// Be attentive to back-pressure. -function writeOneMillionTimes(writer, data, encoding, callback) { - var i = 1000000; - write(); - function write() { - var ok = true; - do { - i -= 1; - if (i === 0) { - // last time! - writer.write(data, encoding, callback); - } else { - // see if we should continue, or wait - // don't pass the callback, because we're not done yet. - ok = writer.write(data, encoding); - } - } while (i > 0 && ok); - if (i > 0) { - // had to stop early! - // write some more once it drains - writer.once('drain', write); - } - } -} -``` - -#### Event: 'error' - -* {Error} - -Emitted if there was an error when writing or piping data. - -#### Event: 'finish' - -When the [`stream.end()`][stream-end] method has been called, and all data has -been flushed to the underlying system, this event is emitted. - -```javascript -var writer = getWritableStreamSomehow(); -for (var i = 0; i < 100; i ++) { - writer.write('hello, #${i}!\n'); -} -writer.end('this is the end\n'); -writer.on('finish', () => { - console.error('all writes are now complete.'); -}); -``` - -#### Event: 'pipe' - -* `src` {stream.Readable} source stream that is piping to this writable - -This is emitted whenever the [`stream.pipe()`][] method is called on a readable -stream, adding this writable to its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('pipe', (src) => { - console.error('something is piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -``` - -#### Event: 'unpipe' - -* `src` {[Readable][] Stream} The source stream that - [unpiped][`stream.unpipe()`] this writable - -This is emitted whenever the [`stream.unpipe()`][] method is called on a -readable stream, removing this writable from its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('unpipe', (src) => { - console.error('something has stopped piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -reader.unpipe(writer); -``` - -#### writable.cork() - -Forces buffering of all writes. - -Buffered data will be flushed either at [`stream.uncork()`][] or at -[`stream.end()`][stream-end] call. - -#### writable.end([chunk][, encoding][, callback]) - -* `chunk` {String|Buffer} Optional data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Optional callback for when the stream is finished - -Call this method when no more data will be written to the stream. If supplied, -the callback is attached as a listener on the [`'finish'`][] event. - -Calling [`stream.write()`][stream-write] after calling -[`stream.end()`][stream-end] will raise an error. - -```js -// write 'hello, ' and then end with 'world!' -var file = fs.createWriteStream('example.txt'); -file.write('hello, '); -file.end('world!'); -// writing more now is not allowed! -``` - -#### writable.setDefaultEncoding(encoding) - -* `encoding` {String} The new default encoding - -Sets the default encoding for a writable stream. - -#### writable.uncork() - -Flush all data, buffered since [`stream.cork()`][] call. - -#### writable.write(chunk[, encoding][, callback]) - -* `chunk` {String|Buffer} The data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Callback for when this chunk of data is flushed -* Returns: {Boolean} `true` if the data was handled completely. - -This method writes some data to the underlying system, and calls the -supplied callback once the data has been fully handled. - -The return value indicates if you should continue writing right now. -If the data had to be buffered internally, then it will return -`false`. Otherwise, it will return `true`. - -This return value is strictly advisory. You MAY continue to write, -even if it returns `false`. However, writes will be buffered in -memory, so it is best not to do this excessively. Instead, wait for -the [`'drain'`][] event before writing more data. - - -## API for Stream Implementors - - - -To implement any sort of stream, the pattern is the same: - -1. Extend the appropriate parent class in your own subclass. (The - [`util.inherits()`][] method is particularly helpful for this.) -2. Call the appropriate parent class constructor in your constructor, - to be sure that the internal mechanisms are set up properly. -3. Implement one or more specific methods, as detailed below. - -The class to extend and the method(s) to implement depend on the sort -of stream class you are writing: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Use-case

-
-

Class

-
-

Method(s) to implement

-
-

Reading only

-
-

[Readable](#stream_class_stream_readable_1)

-
-

[_read][stream-_read]

-
-

Writing only

-
-

[Writable](#stream_class_stream_writable_1)

-
-

[_write][stream-_write], [_writev][stream-_writev]

-
-

Reading and writing

-
-

[Duplex](#stream_class_stream_duplex_1)

-
-

[_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev]

-
-

Operate on written data, then read the result

-
-

[Transform](#stream_class_stream_transform_1)

-
-

[_transform][stream-_transform], [_flush][stream-_flush]

-
- -In your implementation code, it is very important to never call the methods -described in [API for Stream Consumers][]. Otherwise, you can potentially cause -adverse side effects in programs that consume your streaming interfaces. - -### Class: stream.Duplex - - - -A "duplex" stream is one that is both Readable and Writable, such as a TCP -socket connection. - -Note that `stream.Duplex` is an abstract class designed to be extended -with an underlying implementation of the [`stream._read(size)`][stream-_read] -and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you -would with a Readable or Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this class -prototypally inherits from Readable, and then parasitically from Writable. It is -thus up to the user to implement both the low-level -[`stream._read(n)`][stream-_read] method as well as the low-level -[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension -duplex classes. - -#### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for readable side of the stream. Has no effect if `objectMode` - is `true`. - * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for writable side of the stream. Has no effect if `objectMode` - is `true`. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### Class: stream.PassThrough - -This is a trivial implementation of a [Transform][] stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy as a building block for novel sorts of streams. - -### Class: stream.Readable - - - -`stream.Readable` is an abstract class designed to be extended with an -underlying implementation of the [`stream._read(size)`][stream-_read] method. - -Please see [API for Stream Consumers][] for how to consume -streams in your programs. What follows is an explanation of how to -implement Readable streams in your programs. - -#### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default = `16384` (16kb), or `16` for `objectMode` streams - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default = `null` - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns - a single value instead of a Buffer of size n. Default = `false` - * `read` {Function} Implementation for the [`stream._read()`][stream-_read] - method. - -In classes that extend the Readable class, make sure to call the -Readable constructor so that the buffering settings can be properly -initialized. - -#### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **Implement this method, but do NOT call it directly.** - -This method is prefixed with an underscore because it is internal to the -class that defines it and should only be called by the internal Readable -class methods. All Readable stream implementations must provide a \_read -method to fetch data from the underlying resource. - -When `_read()` is called, if data is available from the resource, the `_read()` -implementation should start pushing that data into the read queue by calling -[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from -the resource and pushing data until push returns `false`, at which point it -should stop reading from the resource. Only when `_read()` is called again after -it has stopped should it start reading more data from the resource and pushing -that data onto the queue. - -Note: once the `_read()` method is called, it will not be called again until -the [`stream.push()`][stream-push] method is called. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling [`stream.push(chunk)`][stream-push]. - -#### 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 - Buffer encoding, such as `'utf8'` or `'ascii'` -* return {Boolean} Whether or not more pushes should be performed - -Note: **This method should be called by Readable implementors, NOT -by consumers of Readable streams.** - -If a value other than null is passed, The `push()` method adds a chunk of data -into the queue for subsequent stream processors to consume. If `null` is -passed, it signals the end of the stream (EOF), after which no more data -can be written. - -The data added with `push()` can be pulled out by calling the -[`stream.read()`][stream-read] method when the [`'readable'`][] event fires. - -This API is designed to be as flexible as possible. For example, -you may be wrapping a lower-level source which has some sort of -pause/resume mechanism, and a data callback. In those cases, you -could wrap the low-level source object by doing something like this: - -```js -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -util.inherits(SourceWrapper, Readable); - -function SourceWrapper(options) { - Readable.call(this, options); - - this._source = getLowlevelSourceObject(); - - // Every time there's data, we push it into the internal buffer. - this._source.ondata = (chunk) => { - // if push() returns false, then we need to stop reading from source - if (!this.push(chunk)) - this._source.readStop(); - }; - - // When the source ends, we push the EOF-signaling `null` chunk - this._source.onend = () => { - this.push(null); - }; -} - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -SourceWrapper.prototype._read = function(size) { - this._source.readStart(); -}; -``` - -#### Example: A Counting Stream - - - -This is a basic example of a Readable stream. It emits the numerals -from 1 to 1,000,000 in ascending order, and then ends. - -```js -const Readable = require('stream').Readable; -const util = require('util'); -util.inherits(Counter, Readable); - -function Counter(opt) { - Readable.call(this, opt); - this._max = 1000000; - this._index = 1; -} - -Counter.prototype._read = function() { - var i = this._index++; - if (i > this._max) - this.push(null); - else { - var str = '' + i; - var buf = new Buffer(str, 'ascii'); - this.push(buf); - } -}; -``` - -#### Example: SimpleProtocol v1 (Sub-optimal) - -This is similar to the `parseHeader` function described -[here](#stream_readable_unshift_chunk), but implemented as a custom stream. -Also, note that this implementation does not convert the incoming data to a -string. - -However, this would be better implemented as a [Transform][] stream. See -[SimpleProtocol v2][] for a better implementation. - -```js -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// NOTE: This can be done more simply as a Transform stream! -// Using Readable directly for this is sub-optimal. See the -// alternative example below under the Transform section. - -const Readable = require('stream').Readable; -const util = require('util'); - -util.inherits(SimpleProtocol, Readable); - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(source, options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', () => { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', () => { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - // calling unshift by itself does not reset the reading state - // of the stream; since we're inside _read, doing an additional - // push('') will reset the state appropriately. - this.push(''); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -// var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a [zlib][] stream or a -[crypto][] stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will produce output -that is either much smaller or much larger than its input. - -Rather than implement the [`stream._read()`][stream-_read] and -[`stream._write()`][stream-_write] methods, Transform classes must implement the -[`stream._transform()`][stream-_transform] method, and may optionally -also implement the [`stream._flush()`][stream-_flush] method. (See below.) - -#### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `transform` {Function} Implementation for the - [`stream._transform()`][stream-_transform] method. - * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush] - method. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### Events: 'finish' and 'end' - -The [`'finish'`][] and [`'end'`][] events are from the parent Writable -and Readable classes respectively. The `'finish'` event is fired after -[`stream.end()`][stream-end] is called and all chunks have been processed by -[`stream._transform()`][stream-_transform], `'end'` is fired after all data has -been output which is after the callback in [`stream._flush()`][stream-_flush] -has been called. - -#### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush()` method, which will be -called at the very end, after all the written data is consumed, but -before emitting [`'end'`][] to signal the end of the readable side. Just -like with [`stream._transform()`][stream-_transform], call -`transform.push(chunk)` zero or more times, as appropriate, and call `callback` -when the flush operation is complete. - -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 -your own extension classes. - -#### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be transformed. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - 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 -class methods only. - -All Transform stream implementations must provide a `_transform()` -method to accept input and produce output. - -`_transform()` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -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. If you supply a second argument to the callback -it will be passed to the push method. In other words the following are -equivalent: - -```js -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 -your own extension classes. - -#### Example: `SimpleProtocol` parser v2 - -The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple -protocol parser can be implemented simply by using the higher level -[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol -v1` examples. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node.js stream -approach. - -```javascript -const util = require('util'); -const Transform = require('stream').Transform; -util.inherits(SimpleProtocol, Transform); - -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(chunk.slice(split)); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(chunk); - } - done(); -}; - -// Usage: -// var parser = new SimpleProtocol(); -// source.pipe(parser) -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Writable - - - -`stream.Writable` is an abstract class designed to be extended with an -underlying implementation of the -[`stream._write(chunk, encoding, callback)`][stream-_write] method. - -Please see [API for Stream Consumers][] for how to consume -writable streams in your programs. What follows is an explanation of -how to implement Writable streams in your programs. - -#### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when - [`stream.write()`][stream-write] starts returning `false`. Default = `16384` - (16kb), or `16` for `objectMode` streams. - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to [`stream._write()`][stream-_write]. - Default = `true` - * `objectMode` {Boolean} Whether or not the - [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can - write arbitrary data instead of only `Buffer` / `String` data. - Default = `false` - * `write` {Function} Implementation for the - [`stream._write()`][stream-_write] method. - * `writev` {Function} Implementation for the - [`stream._writev()`][stream-_writev] method. - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be written. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a -[`stream._write()`][stream-_write] method to send data to the underlying -resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -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 -your own extension classes. - -#### writable.\_writev(chunks, callback) - -* `chunks` {Array} The chunks to be written. Each chunk has following - format: `{ chunk: ..., encoding: ... }`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunks. - -Note: **This function MUST NOT be called directly.** It may be -implemented by child classes, and called by the internal Writable -class methods only. - -This function is completely optional to implement. In most cases it is -unnecessary. If implemented, it will be called with all the chunks -that are buffered in the write queue. - - -## Simplified Constructor API - - - -In simple cases there is now the added benefit of being able to construct a -stream without inheritance. - -This can be done by passing the appropriate methods as constructor options: - -Examples: - -### Duplex - -```js -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -### Readable - -```js -var readable = new stream.Readable({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - } -}); -``` - -### Transform - -```js -var transform = new stream.Transform({ - transform: function(chunk, encoding, next) { - // sets this._transform under the hood - - // generate output as many times as needed - // this.push(chunk); - - // call when the current chunk is consumed - next(); - }, - flush: function(done) { - // sets this._flush under the hood - - // generate output as many times as needed - // this.push(chunk); - - done(); - } -}); -``` - -### Writable - -```js -var writable = new stream.Writable({ - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var writable = new stream.Writable({ - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -## Streams: Under the Hood - - - -### Buffering - - - -Both Writable and Readable streams will buffer data on an internal -object which can be retrieved from `_writableState.getBuffer()` or -`_readableState.buffer`, respectively. - -The amount of data that will potentially be buffered depends on the -`highWaterMark` option which is passed into the constructor. - -Buffering in Readable streams happens when the implementation calls -[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not -call [`stream.read()`][stream-read], then the data will sit in the internal -queue until it is consumed. - -Buffering in Writable streams happens when the user calls -[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`. - -The purpose of streams, especially with the [`stream.pipe()`][] method, is to -limit the buffering of data to acceptable levels, so that sources and -destinations of varying speed will not overwhelm the available memory. - -### Compatibility with Older Node.js Versions - - - -In versions of Node.js prior to v0.10, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the [`stream.read()`][stream-read] method, - [`'data'`][] events would start emitting immediately. If you needed to do - some I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The [`stream.pause()`][stream-pause] method was advisory, rather than - guaranteed. This meant that you still had to be prepared to receive - [`'data'`][] events even when the stream was in a paused state. - -In Node.js v0.10, the [Readable][] class was added. -For backwards compatibility with older Node.js programs, Readable streams -switch into "flowing mode" when a [`'data'`][] event handler is added, or -when the [`stream.resume()`][stream-resume] method is called. The effect is -that, even if you are not using the new [`stream.read()`][stream-read] method -and [`'readable'`][] event, you no longer have to worry about losing -[`'data'`][] chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No [`'data'`][] event handler is added. -* The [`stream.resume()`][stream-resume] method is never called. -* The stream is not piped to any writable destination. - -For example, consider the following code: - -```js -// WARNING! BROKEN! -net.createServer((socket) => { - - // we add an 'end' method, but never consume the data - socket.on('end', () => { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of Node.js prior to v0.10, the incoming message data would be -simply discarded. However, in Node.js v0.10 and beyond, -the socket will remain paused forever. - -The workaround in this situation is to call the -[`stream.resume()`][stream-resume] method to start the flow of data: - -```js -// Workaround -net.createServer((socket) => { - - socket.on('end', () => { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into flowing mode, -pre-v0.10 style streams can be wrapped in a Readable class using the -[`stream.wrap()`][] method. - - -### Object Mode - - - -Normally, Streams operate on Strings and Buffers exclusively. - -Streams that are in **object mode** can emit generic JavaScript values -other than Buffers and Strings. - -A Readable stream in object mode will always return a single item from -a call to [`stream.read(size)`][stream-read], regardless of what the size -argument is. - -A Writable stream in object mode will always ignore the `encoding` -argument to [`stream.write(data, encoding)`][stream-write]. - -The special value `null` still retains its special value for object -mode streams. That is, for object mode readable streams, `null` as a -return value from [`stream.read()`][stream-read] indicates that there is no more -data, and [`stream.push(null)`][stream-push] will signal the end of stream data -(`EOF`). - -No streams in Node.js core are object mode streams. This pattern is only -used by userland streaming libraries. - -You should set `objectMode` in your stream child class constructor on -the options object. Setting `objectMode` mid-stream is not safe. - -For Duplex streams `objectMode` can be set exclusively for readable or -writable side with `readableObjectMode` and `writableObjectMode` -respectively. These options can be used to implement parsers and -serializers with Transform streams. - -```js -const util = require('util'); -const StringDecoder = require('string_decoder').StringDecoder; -const Transform = require('stream').Transform; -util.inherits(JSONParseStream, Transform); - -// Gets \n-delimited JSON string data, and emits the parsed objects -function JSONParseStream() { - if (!(this instanceof JSONParseStream)) - return new JSONParseStream(); - - Transform.call(this, { readableObjectMode : true }); - - this._buffer = ''; - this._decoder = new StringDecoder('utf8'); -} - -JSONParseStream.prototype._transform = function(chunk, encoding, cb) { - this._buffer += this._decoder.write(chunk); - // split on newlines - var lines = this._buffer.split(/\r?\n/); - // keep the last partial line buffered - this._buffer = lines.pop(); - for (var l = 0; l < lines.length; l++) { - var line = lines[l]; - try { - var obj = JSON.parse(line); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; - -JSONParseStream.prototype._flush = function(cb) { - // Just handle any leftover - var rem = this._buffer.trim(); - if (rem) { - try { - var obj = JSON.parse(rem); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; -``` - -### `stream.read(0)` - -There are some cases where you want to trigger a refresh of the -underlying readable stream mechanisms, without actually consuming any -data. In that case, you can call `stream.read(0)`, which will always -return null. - -If the internal read buffer is below the `highWaterMark`, and the -stream is not currently reading, then calling `stream.read(0)` will trigger -a low-level [`stream._read()`][stream-_read] call. - -There is almost never a need to do this. However, you will see some -cases in Node.js's internals where this is done, particularly in the -Readable stream class internals. - -### `stream.push('')` - -Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an -interesting side effect. Because it *is* a call to -[`stream.push()`][stream-push], it will end the `reading` process. However, it -does *not* add any data to the readable buffer, so there's nothing for -a user to consume. - -Very rarely, there are cases where you have no data to provide now, -but the consumer of your stream (or, perhaps, another bit of your own -code) will know when to check again, by calling [`stream.read(0)`][stream-read]. -In those cases, you *may* call `stream.push('')`. - -So far, the only use case for this functionality is in the -[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you -find that you have to use `stream.push('')`, please consider another -approach, because it almost certainly indicates that something is -horribly wrong. - -[`'data'`]: #stream_event_data -[`'drain'`]: #stream_event_drain -[`'end'`]: #stream_event_end -[`'finish'`]: #stream_event_finish -[`'readable'`]: #stream_event_readable -[`buf.toString(encoding)`]: https://nodejs.org/docs/v5.8.0/api/buffer.html#buffer_buf_tostring_encoding_start_end -[`EventEmitter`]: https://nodejs.org/docs/v5.8.0/api/events.html#events_class_eventemitter -[`process.stderr`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stderr -[`process.stdin`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdin -[`process.stdout`]: https://nodejs.org/docs/v5.8.0/api/process.html#process_process_stdout -[`stream.cork()`]: #stream_writable_cork -[`stream.pipe()`]: #stream_readable_pipe_destination_options -[`stream.uncork()`]: #stream_writable_uncork -[`stream.unpipe()`]: #stream_readable_unpipe_destination -[`stream.wrap()`]: #stream_readable_wrap_stream -[`tls.CryptoStream`]: https://nodejs.org/docs/v5.8.0/api/tls.html#tls_class_cryptostream -[`util.inherits()`]: https://nodejs.org/docs/v5.8.0/api/util.html#util_util_inherits_constructor_superconstructor -[API for Stream Consumers]: #stream_api_for_stream_consumers -[API for Stream Implementors]: #stream_api_for_stream_implementors -[child process stdin]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdin -[child process stdout and stderr]: https://nodejs.org/docs/v5.8.0/api/child_process.html#child_process_child_stdout -[Compatibility]: #stream_compatibility_with_older_node_js_versions -[crypto]: crypto.html -[Duplex]: #stream_class_stream_duplex -[fs read streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_readstream -[fs write streams]: https://nodejs.org/docs/v5.8.0/api/fs.html#fs_class_fs_writestream -[HTTP requests, on the client]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_clientrequest -[HTTP responses, on the server]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_serverresponse -[http-incoming-message]: https://nodejs.org/docs/v5.8.0/api/http.html#http_class_http_incomingmessage -[Object mode]: #stream_object_mode -[Readable]: #stream_class_stream_readable -[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2 -[stream-_flush]: #stream_transform_flush_callback -[stream-_read]: #stream_readable_read_size_1 -[stream-_transform]: #stream_transform_transform_chunk_encoding_callback -[stream-_write]: #stream_writable_write_chunk_encoding_callback_1 -[stream-_writev]: #stream_writable_writev_chunks_callback -[stream-end]: #stream_writable_end_chunk_encoding_callback -[stream-pause]: #stream_readable_pause -[stream-push]: #stream_readable_push_chunk_encoding -[stream-read]: #stream_readable_read_size -[stream-resume]: #stream_readable_resume -[stream-write]: #stream_writable_write_chunk_encoding_callback -[TCP sockets]: https://nodejs.org/docs/v5.8.0/api/net.html#net_class_net_socket -[Transform]: #stream_class_stream_transform -[Writable]: #stream_class_stream_writable -[zlib]: zlib.html diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index c141a99c26c638..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,58 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af87620dd..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 736693b8400fed..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,75 +0,0 @@ -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index d06f71f1868d77..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,26 +0,0 @@ -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 54a9d5c553d69e..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,880 +0,0 @@ -'use strict'; - -module.exports = Readable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events'); - -/**/ -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = undefined; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -var Duplex; -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -var Duplex; -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options && typeof options.read === 'function') this._read = options.read; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - - if (!state.objectMode && typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - var skipAdd; - if (state.decoder && !addToFront && !encoding) { - chunk = state.decoder.write(chunk); - skipAdd = !state.objectMode && chunk.length === 0; - } - - if (!addToFront) state.reading = false; - - // Don't add to the buffer if we've decoded to an empty string chunk and - // we're not in object mode - if (!skipAdd) { - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) return 0; - - if (state.objectMode) return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; - } - - if (n <= 0) return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else { - return state.length; - } - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) endReadable(this); - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - if (state.pipesCount === 1 && state.pipes[0] === dest && src.listenerCount('data') === 1 && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) dest.on('error', onerror);else if (isArray(dest._events.error)) dest._events.error.unshift(onerror);else dest._events.error = [onerror, dest._events.error]; - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var _i = 0; _i < len; _i++) { - dests[_i].emit('unpipe', this); - }return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && !this._readableState.endEmitted) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - processNextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - processNextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function (ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) return null; - - if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) ret = '';else ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) ret += buf.slice(0, cpy);else buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) list[0] = buf.slice(cpy);else list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - processNextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 625cdc17698059..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,180 +0,0 @@ -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) stream.push(data); - - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er) { - done(stream, er); - });else done(stream); - }); -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -function done(stream, er) { - if (er) return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 95916c992a9507..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,516 +0,0 @@ -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -module.exports = Writable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; -/**/ - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; - -util.inherits(Writable, Stream); - -function nop() {} - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -var Duplex; -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // create the two objects needed to store the corked requests - // they are not a linked list, as no new elements are inserted in there - this.corkedRequestsFree = new CorkedRequest(this); - this.corkedRequestsFree.next = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function writableStateGetBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') - }); - } catch (_) {} -})(); - -var Duplex; -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - processNextTick(cb, er); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - processNextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - - if (Buffer.isBuffer(chunk)) encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) processNextTick(cb, er);else cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - while (entry) { - buffer[count] = entry; - entry = entry.next; - count += 1; - } - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequestCount = 0; - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else { - prefinish(stream, state); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function (err) { - var entry = _this.entry; - _this.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = _this; - } else { - state.corkedRequestsFree = _this; - } - }; -} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f9437dbf5a..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b4149c5eb5..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05f75fd5..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c075a2f..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// 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. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index 4f65c18e22abb3..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "core-util-is@~1.0.0", - "scope": null, - "escapedName": "core-util-is", - "name": "core-util-is", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ], - [ - { - "raw": "core-util-is@~1.0.0", - "scope": null, - "escapedName": "core-util-is", - "name": "core-util-is", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream" - ] - ], - "_from": "core-util-is@~1.0.0", - "_id": "core-util-is@1.0.2", - "_inCache": true, - "_location": "/mississippi/through2/readable-stream/core-util-is", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "3.3.2", - "_phantomChildren": {}, - "_requested": { - "raw": "core-util-is@~1.0.0", - "scope": null, - "escapedName": "core-util-is", - "name": "core-util-is", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/through2/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_shrinkwrap": null, - "_spec": "core-util-is@~1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "dependencies": {}, - "description": "The `util.is*` functions introduced in Node v0.12.", - "devDependencies": { - "tap": "^2.3.0" - }, - "directories": {}, - "dist": { - "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "tarball": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", - "homepage": "https://github.com/isaacs/core-util-is#readme", - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "license": "MIT", - "main": "lib/util.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "core-util-is", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "scripts": { - "test": "tap test.js" - }, - "version": "1.0.2" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/test.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65ac8b5d..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/.travis.yml b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/.travis.yml deleted file mode 100644 index cc4dba29d959a2..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/Makefile b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/Makefile deleted file mode 100644 index 0ecc29c402c243..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59c6195f9..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683889015..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js deleted file mode 100644 index a57f63495943a0..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json deleted file mode 100644 index d3a2bda3c6583e..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ], - [ - { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream" - ] - ], - "_from": "isarray@~1.0.0", - "_id": "isarray@1.0.0", - "_inCache": true, - "_location": "/mississippi/through2/readable-stream/isarray", - "_nodeVersion": "5.1.0", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/through2/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_shrinkwrap": null, - "_spec": "isarray@~1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "dependencies": {}, - "description": "Array#isArray for older browsers", - "devDependencies": { - "tape": "~2.13.4" - }, - "directories": {}, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "homepage": "https://github.com/juliangruber/isarray", - "keywords": [ - "browser", - "isarray", - "array" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "name": "isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "scripts": { - "test": "tape test.js" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/test.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/test.js deleted file mode 100644 index f7f7bcd19fec56..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/isarray/test.js +++ /dev/null @@ -1,19 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml deleted file mode 100644 index 36201b10017a5e..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" - - "0.12" - - "1.7.1" - - 1 - - 2 - - 3 - - 4 - - 5 diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/index.js deleted file mode 100644 index a4f40f845faa65..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -if (!process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = nextTick; -} else { - module.exports = process.nextTick; -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/license.md b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/license.md deleted file mode 100644 index c67e3532b54245..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Calvin Metcalf - -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.** diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/package.json deleted file mode 100644 index f5d106537ad8dc..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "process-nextick-args@~1.0.6", - "scope": null, - "escapedName": "process-nextick-args", - "name": "process-nextick-args", - "rawSpec": "~1.0.6", - "spec": ">=1.0.6 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ], - [ - { - "raw": "process-nextick-args@~1.0.6", - "scope": null, - "escapedName": "process-nextick-args", - "name": "process-nextick-args", - "rawSpec": "~1.0.6", - "spec": ">=1.0.6 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream" - ] - ], - "_from": "process-nextick-args@~1.0.6", - "_id": "process-nextick-args@1.0.7", - "_inCache": true, - "_location": "/mississippi/through2/readable-stream/process-nextick-args", - "_nodeVersion": "5.11.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "raw": "process-nextick-args@~1.0.6", - "scope": null, - "escapedName": "process-nextick-args", - "name": "process-nextick-args", - "rawSpec": "~1.0.6", - "spec": ">=1.0.6 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/through2/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "_shrinkwrap": null, - "_spec": "process-nextick-args@~1.0.6", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream", - "author": "", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "dependencies": {}, - "description": "process.nextTick but always with args", - "devDependencies": { - "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - }, - "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "process-nextick-args", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.7" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/readme.md b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/readme.md deleted file mode 100644 index 78e7cfaeb7acde..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -process-nextick-args -===== - -[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) - -```bash -npm install --save process-nextick-args -``` - -Always be able to pass arguments to process.nextTick, no matter the platform - -```js -var nextTick = require('process-nextick-args'); - -nextTick(function (a, b, c) { - console.log(a, b, c); -}, 'step', 3, 'profit'); -``` diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/test.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/test.js deleted file mode 100644 index ef15721584ac99..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/process-nextick-args/test.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require("tap").test; -var nextTick = require('./'); - -test('should work', function (t) { - t.plan(5); - nextTick(function (a) { - t.ok(a); - nextTick(function (thing) { - t.equals(thing, 7); - }, 7); - }, true); - nextTick(function (a, b, c) { - t.equals(a, 'step'); - t.equals(b, 3); - t.equals(c, 'profit'); - }, 'step', 3, 'profit'); -}); - -test('correct number of arguments', function (t) { - t.plan(1); - nextTick(function () { - t.equals(2, arguments.length, 'correct number'); - }, 1, 2); -}); diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc1d21b9..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a48f5c89..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001501107..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54fb790982..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// 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 Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 36fa27f82b498b..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "string_decoder@~0.10.x", - "scope": null, - "escapedName": "string_decoder", - "name": "string_decoder", - "rawSpec": "~0.10.x", - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ], - [ - { - "raw": "string_decoder@~0.10.x", - "scope": null, - "escapedName": "string_decoder", - "name": "string_decoder", - "rawSpec": "~0.10.x", - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream" - ] - ], - "_from": "string_decoder@~0.10.x", - "_id": "string_decoder@0.10.31", - "_inCache": true, - "_location": "/mississippi/through2/readable-stream/string_decoder", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "_npmVersion": "1.4.23", - "_phantomChildren": {}, - "_requested": { - "raw": "string_decoder@~0.10.x", - "scope": null, - "escapedName": "string_decoder", - "name": "string_decoder", - "rawSpec": "~0.10.x", - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/through2/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_shrinkwrap": null, - "_spec": "string_decoder@~0.10.x", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "dependencies": {}, - "description": "The string_decoder module from Node core", - "devDependencies": { - "tap": "~0.4.8" - }, - "directories": {}, - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "name": "string_decoder", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "0.10.31" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/History.md b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/History.md deleted file mode 100644 index acc8675372e980..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/LICENSE b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c225c9ba..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/README.md b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa7c250a6..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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. diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/browser.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f065ea5a..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/node.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5ddd3fb..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/package.json b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/package.json deleted file mode 100644 index 44061da89bcdfb..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "util-deprecate@~1.0.1", - "scope": null, - "escapedName": "util-deprecate", - "name": "util-deprecate", - "rawSpec": "~1.0.1", - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream/node_modules/readable-stream" - ], - [ - { - "raw": "util-deprecate@~1.0.1", - "scope": null, - "escapedName": "util-deprecate", - "name": "util-deprecate", - "rawSpec": "~1.0.1", - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream" - ] - ], - "_from": "util-deprecate@~1.0.1", - "_id": "util-deprecate@1.0.2", - "_inCache": true, - "_location": "/mississippi/through2/readable-stream/util-deprecate", - "_nodeVersion": "4.1.2", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "raw": "util-deprecate@~1.0.1", - "scope": null, - "escapedName": "util-deprecate", - "name": "util-deprecate", - "rawSpec": "~1.0.1", - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/through2/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_shrinkwrap": null, - "_spec": "util-deprecate@~1.0.1", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "dependencies": {}, - "description": "The Node.js `util.deprecate()` function with browser support", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", - "homepage": "https://github.com/TooTallNate/util-deprecate", - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "license": "MIT", - "main": "node.js", - "maintainers": [ - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "name": "util-deprecate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.0.2" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/package.json b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index ae39f5f97d50ee..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-stream@~2.0.0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/concat-stream" - ], - [ - { - "raw": "readable-stream@~2.0.0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2" - ] - ], - "_from": "readable-stream@~2.0.0", - "_id": "readable-stream@2.0.6", - "_inCache": true, - "_location": "/mississippi/through2/readable-stream", - "_nodeVersion": "5.7.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.0.6.tgz_1457893507709_0.369257491780445" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-stream@~2.0.0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "_requiredBy": [ - "/mississippi/through2" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "_shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "_shrinkwrap": null, - "_spec": "readable-stream@~2.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/through2", - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - }, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "tap": "~0.2.6", - "tape": "~4.5.1", - "zuul": "~3.9.0" - }, - "directories": {}, - "dist": { - "shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" - }, - "gitHead": "01fb5608a970b42c900b96746cadc13d27dd9d7e", - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "readable-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "browser": "npm run write-zuul && zuul -- test/browser.js", - "test": "tap test/parallel/*.js test/ours/*.js", - "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" - }, - "version": "2.0.6" -} diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a55165f9..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/readable.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 6222a579864dd2..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,12 +0,0 @@ -var Stream = (function (){ - try { - return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify - } catch(_){} -}()); -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream || exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/transform.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f0780e993..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/writable.js b/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf3c12e9..00000000000000 --- a/deps/npm/node_modules/mississippi/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/deps/npm/node_modules/mississippi/node_modules/through2/package.json b/deps/npm/node_modules/mississippi/node_modules/through2/package.json index c7413b9f91c5df..a60bc8b192d22e 100644 --- a/deps/npm/node_modules/mississippi/node_modules/through2/package.json +++ b/deps/npm/node_modules/mississippi/node_modules/through2/package.json @@ -14,22 +14,20 @@ ] ], "_from": "through2@>=2.0.0 <3.0.0", - "_id": "through2@2.0.1", + "_id": "through2@2.0.3", "_inCache": true, "_location": "/mississippi/through2", - "_nodeVersion": "5.5.0", + "_nodeVersion": "7.2.0", "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/through2-2.0.1.tgz_1454928418348_0.7339043114334345" + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/through2-2.0.3.tgz_1480373529377_0.264686161885038" }, "_npmUser": { "name": "rvagg", "email": "rod@vagg.org" }, - "_npmVersion": "3.6.0", - "_phantomChildren": { - "inherits": "2.0.3" - }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, "_requested": { "raw": "through2@^2.0.0", "scope": null, @@ -42,8 +40,8 @@ "_requiredBy": [ "/mississippi" ], - "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", - "_shasum": "384e75314d49f32de12eebb8136b8eb6b5d59da9", + "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", "_shrinkwrap": null, "_spec": "through2@^2.0.0", "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi", @@ -56,22 +54,22 @@ "url": "https://github.com/rvagg/through2/issues" }, "dependencies": { - "readable-stream": "~2.0.0", - "xtend": "~4.0.0" + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" }, "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", "devDependencies": { - "bl": "~0.9.4", + "bl": "~1.1.2", "faucet": "0.0.1", "stream-spigot": "~3.0.5", - "tape": "~4.0.0" + "tape": "~4.6.2" }, "directories": {}, "dist": { - "shasum": "384e75314d49f32de12eebb8136b8eb6b5d59da9", - "tarball": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz" + "shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", + "tarball": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz" }, - "gitHead": "6d52a1b77db13a741f2708cd5854a198e4ae3072", + "gitHead": "4383b10b2cb6a32ae215760715b317513abe609f", "homepage": "https://github.com/rvagg/through2#readme", "keywords": [ "stream", @@ -102,5 +100,5 @@ "test": "node test/test.js | faucet", "test-local": "brtapsauce-local test/basic-test.js" }, - "version": "2.0.1" + "version": "2.0.3" } diff --git a/deps/npm/node_modules/mississippi/package.json b/deps/npm/node_modules/mississippi/package.json index 3595472180efc4..503a931104a573 100644 --- a/deps/npm/node_modules/mississippi/package.json +++ b/deps/npm/node_modules/mississippi/package.json @@ -2,50 +2,54 @@ "_args": [ [ { - "raw": "mississippi@~1.2.0", + "raw": "mississippi@1.3.0", "scope": null, "escapedName": "mississippi", "name": "mississippi", - "rawSpec": "~1.2.0", - "spec": ">=1.2.0 <1.3.0", - "type": "range" + "rawSpec": "1.3.0", + "spec": "1.3.0", + "type": "version" }, "/Users/zkat/Documents/code/npm" ] ], - "_from": "mississippi@>=1.2.0 <1.3.0", - "_id": "mississippi@1.2.0", + "_from": "mississippi@1.3.0", + "_id": "mississippi@1.3.0", "_inCache": true, "_location": "/mississippi", - "_nodeVersion": "4.2.3", + "_nodeVersion": "6.9.2", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/mississippi-1.3.0.tgz_1484780252704_0.3479328122921288" + }, "_npmUser": { "name": "maxogden", "email": "max@maxogden.com" }, - "_npmVersion": "2.14.15", + "_npmVersion": "3.10.9", "_phantomChildren": { "inherits": "2.0.3", "once": "1.4.0", - "readable-stream": "2.1.5", + "readable-stream": "2.2.2", "wrappy": "1.0.2" }, "_requested": { - "raw": "mississippi@~1.2.0", + "raw": "mississippi@1.3.0", "scope": null, "escapedName": "mississippi", "name": "mississippi", - "rawSpec": "~1.2.0", - "spec": ">=1.2.0 <1.3.0", - "type": "range" + "rawSpec": "1.3.0", + "spec": "1.3.0", + "type": "version" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.2.0.tgz", - "_shasum": "cd51bb9bbad3ddb13dee3cf60f1d0929c7a7fa4c", + "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.0.tgz", + "_shasum": "d201583eb12327e3c5c1642a404a9cacf94e34f5", "_shrinkwrap": null, - "_spec": "mississippi@~1.2.0", + "_spec": "mississippi@1.3.0", "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "max ogden" @@ -59,6 +63,7 @@ "end-of-stream": "^1.1.0", "flush-write-stream": "^1.0.0", "from2": "^2.1.0", + "parallel-transform": "^1.1.0", "pump": "^1.0.0", "pumpify": "^1.3.3", "stream-each": "^1.1.0", @@ -68,10 +73,10 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "cd51bb9bbad3ddb13dee3cf60f1d0929c7a7fa4c", - "tarball": "https://registry.npmjs.org/mississippi/-/mississippi-1.2.0.tgz" + "shasum": "d201583eb12327e3c5c1642a404a9cacf94e34f5", + "tarball": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.0.tgz" }, - "gitHead": "4aab2a2d4d98fd5e300a329048eb02a12df44c60", + "gitHead": "dd64841b932d06baf7859ee80db78d139c90b4c7", "homepage": "https://github.com/maxogden/mississippi#readme", "license": "BSD-2-Clause", "main": "index.js", @@ -91,5 +96,5 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "1.2.0" + "version": "1.3.0" } diff --git a/deps/npm/node_modules/mississippi/readme.md b/deps/npm/node_modules/mississippi/readme.md index 9013bb0dc53188..569803865c5e91 100644 --- a/deps/npm/node_modules/mississippi/readme.md +++ b/deps/npm/node_modules/mississippi/readme.md @@ -21,6 +21,7 @@ var miss = require('mississippi') - [to](#to) - [concat](#concat) - [finished](#finished) +- [parallel](#parallel) ### pipe @@ -28,13 +29,13 @@ var miss = require('mississippi') Pipes streams together and destroys all of them if one of them closes. Calls `cb` with `(error)` if there was an error in any of the streams. -When using standard `source.pipe(destination)` the source will _not_ be destroyed if the destination emits close or error. You are also not able to provide a callback to tell when then pipe has finished. +When using standard `source.pipe(destination)` the source will _not_ be destroyed if the destination emits close or error. You are also not able to provide a callback to tell when the pipe has finished. `miss.pipe` does these two things for you, ensuring you handle stream errors 100% of the time (unhandled errors are probably the most common bug in most node streams code) #### original module -`miss.pipe` is provided by [`require('pump')`](https://npmjs.org/pump) +`miss.pipe` is provided by [`require('pump')`](https://www.npmjs.com/package/pump) #### example @@ -56,13 +57,13 @@ miss.pipe(read, write, function (err) { ##### `miss.each(stream, each, [done])` -Iterate the data in `stream` one chunk at a time. Your `each` function will be called with with `(data, next)` where data is a data chunk and next is a callback. Call `next` when you are ready to consume the next chunk. +Iterate the data in `stream` one chunk at a time. Your `each` function will be called with `(data, next)` where data is a data chunk and next is a callback. Call `next` when you are ready to consume the next chunk. Optionally you can call `next` with an error to destroy the stream. You can also pass the optional third argument, `done`, which is a function that will be called with `(err)` when the stream ends. The `err` argument will be populated with an error if the stream emitted an error. #### original module -`miss.each` is provided by [`require('stream-each')`](https://npmjs.org/stream-each) +`miss.each` is provided by [`require('stream-each')`](https://www.npmjs.com/package/stream-each) #### example @@ -97,7 +98,7 @@ If any of the streams in the pipeline emits an error or gets destroyed, or you d #### original module -`miss.pipeline` is provided by [`require('pumpify')`](https://npmjs.org/pumpify) +`miss.pipeline` is provided by [`require('pumpify')`](https://www.npmjs.com/package/pumpify) #### example @@ -136,7 +137,7 @@ You can either choose to supply the writable and the readable at the time you cr #### original module -`miss.duplex` is provided by [`require('duplexify')`](https://npmjs.org/duplexify) +`miss.duplex` is provided by [`require('duplexify')`](https://www.npmjs.com/package/duplexify) #### example @@ -165,7 +166,7 @@ The `flushFunction`, with signature `(cb)`, is called just before the stream is #### original module -`miss.through` is provided by [`require('through2')`](https://npmjs.org/through2) +`miss.through` is provided by [`require('through2')`](https://www.npmjs.com/package/through2) #### example @@ -178,10 +179,10 @@ var write = fs.createWriteStream('./AWESOMECASE.TXT') // Leaving out the options object var uppercaser = miss.through( function (chunk, enc, cb) { - cb(chunk.toString().toUpperCase()) + cb(null, chunk.toString().toUpperCase()) }, function (cb) { - cb('ONE LAST BIT OF UPPERCASE') + cb(null, 'ONE LAST BIT OF UPPERCASE') } ) @@ -206,7 +207,7 @@ Returns a readable stream that calls `read(size, next)` when data is requested f #### original module -`miss.from` is provided by [`require('from2')`](https://npmjs.org/from2) +`miss.from` is provided by [`require('from2')`](https://www.npmjs.com/package/from2) #### example @@ -252,7 +253,7 @@ Returns a writable stream that calls `write(data, enc, cb)` when data is written #### original module -`miss.to` is provided by [`require('flush-write-stream')`](https://npmjs.org/flush-write-stream) +`miss.to` is provided by [`require('flush-write-stream')`](https://www.npmjs.com/package/flush-write-stream) #### example @@ -294,13 +295,13 @@ finished Returns a writable stream that concatenates all data written to the stream and calls a callback with the single result. -Calling `miss.concat(cb)` returns a writable stream. `cb` is called when the writable stream is finished, e.g. when all data is done being written to it. `cb` is called with a single argument, `(data)`, which will containe the result of concatenating all the data written to the stream. +Calling `miss.concat(cb)` returns a writable stream. `cb` is called when the writable stream is finished, e.g. when all data is done being written to it. `cb` is called with a single argument, `(data)`, which will contain the result of concatenating all the data written to the stream. Note that `miss.concat` will not handle stream errors for you. To handle errors, use `miss.pipe` or handle the `error` event manually. #### original module -`miss.concat` is provided by [`require('concat-stream')`](https://npmjs.org/concat-stream) +`miss.concat` is provided by [`require('concat-stream')`](https://www.npmjs.com/package/concat-stream) #### example @@ -335,7 +336,7 @@ This function is useful for simplifying stream handling code as it lets you hand #### original module -`miss.finished` is provided by [`require('end-of-stream')`](https://npmjs.org/end-of-stream) +`miss.finished` is provided by [`require('end-of-stream')`](https://www.npmjs.com/package/end-of-stream) #### example @@ -350,3 +351,44 @@ miss.finished(copyDest, function(err) { console.log('write success') }) ``` + +### parallel + +#####`miss.parallel(concurrency, each)` + +This works like `through` except you can process items in parallel, while still preserving the original input order. + +This is handy if you wanna take advantage of node's async I/O and process streams of items in batches. With this module you can build your very own streaming parallel job queue. + +Note that `miss.parallel` preserves input ordering, if you don't need that then you can use [through2-concurrent](https://github.com/almost/through2-concurrent) instead, which is very similar to this otherwise. + +#### original module + +`miss.parallel` is provided by [`require('parallel-transform')`](https://npmjs.org/parallel-transform) + +#### example + +This example fetches the GET HTTP headers for a stream of input URLs 5 at a time in parallel. + +```js +function getResponse (item, cb) { + var r = request(item.url) + r.on('error', function (err) { + cb(err) + }) + r.on('response', function (re) { + cb(null, {url: item.url, date: new Date(), status: re.statusCode, headers: re.headers}) + r.abort() + }) +} + +miss.pipe( + fs.createReadStream('./urls.txt'), // one url per line + split(), + miss.parallel(5, getResponse), + miss.through(function (row, enc, next) { + console.log(JSON.stringify(row)) + next() + }) +) +``` diff --git a/deps/npm/node_modules/request/node_modules/form-data/README.md b/deps/npm/node_modules/request/node_modules/form-data/README.md new file mode 100644 index 00000000000000..642a9d14a800b7 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/README.md @@ -0,0 +1,217 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.1.2.svg?label=linux:0.12-6.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.1.2.svg?label=macos:0.12-6.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.1.2.svg?label=windows:0.12-6.x)](https://ci.appveyor.com/project/alexindigo/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.1.2.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) +[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function(response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function(res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function(err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function(err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', + contentType: 'image/jpg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: {'x-test-header': 'test-header-value'} +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function(res) { + return res.json(); + }).then(function(json) { + console.log(json); + }); +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/deps/npm/package.json b/deps/npm/package.json index 4a15414a98d6b6..daed5a4747677b 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "4.1.2", + "version": "4.2.0", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -32,6 +32,7 @@ "dependencies": { "JSONStream": "~1.3.0", "abbrev": "~1.0.9", + "ansi-regex": "~2.1.1", "ansicolors": "~0.3.2", "ansistyles": "~0.1.3", "aproba": "~1.0.4", @@ -62,7 +63,7 @@ "lodash.union": "~4.6.0", "lodash.uniq": "~4.5.0", "lodash.without": "~4.4.0", - "mississippi": "~1.2.0", + "mississippi": "~1.3.0", "mkdirp": "~0.5.1", "node-gyp": "~3.5.0", "nopt": "~4.0.1", diff --git a/deps/npm/test/tap/debug-logs.js b/deps/npm/test/tap/debug-logs.js new file mode 100644 index 00000000000000..fbd244446e1f6a --- /dev/null +++ b/deps/npm/test/tap/debug-logs.js @@ -0,0 +1,101 @@ +'use strict' +var path = require('path') +var test = require('tap').test +var Tacks = require('tacks') +var glob = require('glob') +var asyncMap = require('slide').asyncMap +var File = Tacks.File +var Dir = Tacks.Dir +var extend = Object.assign || require('util')._extend +var common = require('../common-tap.js') + +var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = path.join(basedir, 'testdir') +var cachedir = path.join(basedir, 'cache') +var globaldir = path.join(basedir, 'global') +var tmpdir = path.join(basedir, 'tmp') + +var conf = { + cwd: testdir, + env: extend(extend({}, process.env), { + npm_config_cache: cachedir, + npm_config_tmp: tmpdir, + npm_config_prefix: globaldir, + npm_config_registry: common.registry, + npm_config_loglevel: 'warn' + }) +} + +var fixture = new Tacks(Dir({ + cache: Dir(), + global: Dir(), + tmp: Dir(), + testdir: Dir({ + 'package.json': File({ + name: 'debug-logs', + version: '1.0.0', + scripts: { + true: 'node -e "process.exit(0)"', + false: 'node -e "process.exit(1)"' + } + }) + }) +})) + +function setup () { + cleanup() + fixture.create(basedir) +} + +function cleanup () { + fixture.remove(basedir) +} + +test('setup', function (t) { + setup() + t.done() +}) + +test('example', function (t) { + common.npm(['run', 'false'], conf, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 1, 'command errored') + var matches = stderr.match(/Please include the following file with any support request:.*\nnpm ERR! {5,5}(.*)/) + t.ok(matches, 'debug log mentioned in error message') + if (matches) { + var logfile = matches[1] + t.matches(path.relative(cachedir, logfile), /^_logs/, 'debug log is inside the cache in _logs') + } + + // we run a bunch concurrently, this will actually create > than our limit as the check is done + // when the command starts + var todo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + asyncMap(todo, function (num, next) { + common.npm(['run', '--logs-max=10', 'false'], conf, function (err, code) { + if (err) throw err + t.is(code, 1, 'run #' + num + ' errored as expected') + next() + }) + }, function () { + // now we do one more and that should clean up the list + common.npm(['run', '--logs-max=10', 'false'], conf, function (err, code) { + if (err) throw err + t.is(code, 1, 'final run errored as expected') + var files = glob.sync(path.join(cachedir, '_logs', '*')) + t.is(files.length, 10, 'there should never be more than 10 log files') + common.npm(['run', '--logs-max=5', 'true'], conf, function (err, code) { + if (err) throw err + t.is(code, 0, 'success run is ok') + var files = glob.sync(path.join(cachedir, '_logs', '*')) + t.is(files.length, 4, 'after success there should be logs-max - 1 log files') + t.done() + }) + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) diff --git a/deps/npm/test/tap/gently-rm-overeager.js b/deps/npm/test/tap/gently-rm-overeager.js index c266f1c4dc1202..08fa72bc71c7ca 100644 --- a/deps/npm/test/tap/gently-rm-overeager.js +++ b/deps/npm/test/tap/gently-rm-overeager.js @@ -1,4 +1,4 @@ -var resolve = require('path').resolve +var path = require('path') var fs = require('graceful-fs') var test = require('tap').test var mkdirp = require('mkdirp') @@ -6,8 +6,8 @@ var rimraf = require('rimraf') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'gently-rm-overeager') -var dep = resolve(__dirname, 'test-whoops') +var pkg = path.join(__dirname, 'gently-rm-overeager') +var dep = path.join(__dirname, 'test-whoops') var EXEC_OPTS = { cwd: pkg } @@ -32,8 +32,7 @@ test('cache add', function (t) { t.ok(c, 'test-whoops install also failed') fs.readdir(pkg, function (er, files) { t.ifError(er, 'package directory is still there') - t.deepEqual(files, ['npm-debug.log'], 'only debug log remains') - + t.deepEqual(files, [], 'no files remain') t.end() }) }) @@ -53,7 +52,7 @@ function cleanup () { function setup () { mkdirp.sync(pkg) // so it doesn't try to install into npm's own node_modules - mkdirp.sync(resolve(pkg, 'node_modules')) + mkdirp.sync(path.join(pkg, 'node_modules')) mkdirp.sync(dep) - fs.writeFileSync(resolve(dep, 'package.json'), JSON.stringify(fixture)) + fs.writeFileSync(path.join(dep, 'package.json'), JSON.stringify(fixture)) } diff --git a/deps/npm/test/tap/run-script.js b/deps/npm/test/tap/run-script.js index 3892337cee9f76..4dea9b83604bf5 100644 --- a/deps/npm/test/tap/run-script.js +++ b/deps/npm/test/tap/run-script.js @@ -67,6 +67,14 @@ var preversionOnly = { } } +var exitCode = { + name: 'scripted', + version: '1.2.3', + scripts: { + 'start': 'node -e "process.exit(7)"' + } +} + function testOutput (t, command, er, code, stdout, stderr) { var lines @@ -323,6 +331,17 @@ test('npm run-script no-params (direct only)', function (t) { }) }) +test('npm run-script keep non-zero exit code', function (t) { + writeMetadata(exitCode) + + common.npm(['run-script', 'start'], opts, function (err, code, stdout, stderr) { + t.ifError(err, 'ran run-script without parameters without crashing') + t.equal(code, 7, 'got expected exit code') + t.ok(stderr, 'should generate errors') + t.end() + }) +}) + test('cleanup', function (t) { cleanup() t.end() diff --git a/deps/npm/test/tap/search.all-package-search.js b/deps/npm/test/tap/search.all-package-search.js new file mode 100644 index 00000000000000..c70f4f8e7ef074 --- /dev/null +++ b/deps/npm/test/tap/search.all-package-search.js @@ -0,0 +1,201 @@ +var path = require('path') +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var cacheFile = require('npm-cache-filename') +var test = require('tap').test +var Tacks = require('tacks') +var File = Tacks.File + +var common = require('../common-tap.js') + +var PKG_DIR = path.resolve(__dirname, 'search') +var CACHE_DIR = path.resolve(PKG_DIR, 'cache') +var cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') +var cachePath = path.join(cacheBase, '.cache.json') + +var server + +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.pass('all set up') + t.done() + }) +}) + +var searches = [ + { + term: 'cool', + description: 'non-regex search', + location: 103 + }, + { + term: '/cool/', + description: 'regex search', + location: 103 + }, + { + term: 'cool', + description: 'searches name field', + location: 103 + }, + { + term: 'ool', + description: 'excludes matches for --searchexclude', + location: 205, + inject: { + other: { name: 'other', description: 'this is a simple tool' } + }, + extraOpts: ['--searchexclude', 'cool'] + }, + { + term: 'neat lib', + description: 'searches description field', + location: 141, + inject: { + cool: { + name: 'cool', version: '5.0.0', description: 'this is a neat lib' + } + } + }, + { + term: 'foo', + description: 'skips description field with --no-description', + location: 80, + inject: { + cool: { + name: 'cool', version: '5.0.0', description: 'foo bar!' + } + }, + extraOpts: ['--no-description'] + }, + { + term: 'zkat', + description: 'searches maintainers by name', + location: 155, + inject: { + cool: { + name: 'cool', + version: '5.0.0', + maintainers: [{ + name: 'zkat' + }] + } + } + }, + { + term: '=zkat', + description: 'searches maintainers unambiguously by =name', + location: 154, + inject: { + bar: { name: 'bar', description: 'zkat thing', version: '1.0.0' }, + cool: { + name: 'cool', + version: '5.0.0', + maintainers: [{ + name: 'zkat' + }] + } + } + }, + { + term: 'github.com', + description: 'searches projects by url', + location: 205, + inject: { + bar: { + name: 'bar', + url: 'gitlab.com/bar', + // For historical reasons, `url` is only present if `versions` is there + versions: ['1.0.0'], + version: '1.0.0' + }, + cool: { + name: 'cool', + version: '5.0.0', + versions: ['1.0.0'], + url: 'github.com/cool/cool' + } + } + }, + { + term: 'monad', + description: 'searches projects by keywords', + location: 197, + inject: { + cool: { + name: 'cool', + version: '5.0.0', + keywords: ['monads'] + } + } + } +] + +// These test classic hand-matched searches +searches.forEach(function (search) { + test(search.description, function (t) { + setup() + server.get('/-/v1/search?text=' + encodeURIComponent(search.term) + '&size=20').once().reply(404, {}) + var now = Date.now() + var cacheContents = { + '_updated': now, + bar: { name: 'bar', version: '1.0.0' }, + cool: { name: 'cool', version: '5.0.0' }, + foo: { name: 'foo', version: '2.0.0' }, + other: { name: 'other', version: '1.0.0' } + } + for (var k in search.inject) { + cacheContents[k] = search.inject[k] + } + var fixture = new Tacks(File(cacheContents)) + fixture.create(cachePath) + common.npm([ + 'search', search.term, + '--registry', common.registry, + '--cache', CACHE_DIR, + '--loglevel', 'error', + '--color', 'always' + ].concat(search.extraOpts || []), + {}, + function (err, code, stdout, stderr) { + t.equal(stderr, '', 'no error output') + t.notEqual(stdout, '', 'got output') + t.equal(code, 0, 'search finished successfully') + t.ifErr(err, 'search finished successfully') + // \033 == \u001B + var markStart = '\u001B\\[[0-9][0-9]m' + var markEnd = '\u001B\\[0m' + + var re = new RegExp(markStart + '.*?' + markEnd) + + var cnt = stdout.search(re) + t.equal( + cnt, + search.location, + search.description + ' search for ' + search.term + ) + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + server.close() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(cacheBase) +} + +function cleanup () { + server.done() + process.chdir(osenv.tmpdir()) + rimraf.sync(PKG_DIR) +} diff --git a/deps/npm/test/tap/search.esearch.js b/deps/npm/test/tap/search.esearch.js new file mode 100644 index 00000000000000..d892aec95759c3 --- /dev/null +++ b/deps/npm/test/tap/search.esearch.js @@ -0,0 +1,192 @@ +var common = require('../common-tap.js') +var finished = require('mississippi').finished +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var npm = require('../../') +var osenv = require('osenv') +var path = require('path') +var rimraf = require('rimraf') +var test = require('tap').test + +var SEARCH = '/-/v1/search' +var PKG_DIR = path.resolve(__dirname, 'create-entry-update-stream') +var CACHE_DIR = path.resolve(PKG_DIR, 'cache') + +var esearch = require('../../lib/search/esearch') + +var server + +function setup () { + cleanup() + mkdirp.sync(CACHE_DIR) + process.chdir(CACHE_DIR) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(PKG_DIR) +} + +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + npm.load({ cache: CACHE_DIR, registry: common.registry }, function (err) { + t.ifError(err, 'npm loaded successfully') + server = s + t.pass('all set up') + t.done() + }) + }) +}) + +test('basic test', function (t) { + setup() + server.get(SEARCH + '?text=oo&size=1').once().reply(200, { + objects: [ + { package: { name: 'cool', version: '1.0.0' } }, + { package: { name: 'foo', version: '2.0.0' } } + ] + }) + var results = [] + var s = esearch({ + include: ['oo'], + limit: 1 + }) + t.ok(s, 'got a stream') + s.on('data', function (d) { + results.push(d) + }) + finished(s, function (err) { + if (err) { throw err } + t.ok(true, 'stream finished without error') + t.deepEquals(results, [{ + name: 'cool', + version: '1.0.0', + description: null, + maintainers: null, + keywords: null, + date: null + }, { + name: 'foo', + version: '2.0.0', + description: null, + maintainers: null, + keywords: null, + date: null + }]) + server.done() + t.done() + }) +}) + +test('only returns certain fields for each package', function (t) { + setup() + var date = new Date() + server.get(SEARCH + '?text=oo&size=1').once().reply(200, { + objects: [{ + package: { + name: 'cool', + version: '1.0.0', + description: 'desc', + maintainers: [ + {username: 'x', email: 'a@b.c'}, + {username: 'y', email: 'c@b.a'} + ], + keywords: ['a', 'b', 'c'], + date: date.toISOString(), + extra: 'lol' + } + }] + }) + var results = [] + var s = esearch({ + include: ['oo'], + limit: 1 + }) + t.ok(s, 'got a stream') + s.on('data', function (d) { + results.push(d) + }) + finished(s, function (err) { + if (err) { throw err } + t.ok(true, 'stream finished without error') + t.deepEquals(results, [{ + name: 'cool', + version: '1.0.0', + description: 'desc', + maintainers: [ + {username: 'x', email: 'a@b.c'}, + {username: 'y', email: 'c@b.a'} + ], + keywords: ['a', 'b', 'c'], + date: date + }]) + server.done() + t.done() + }) +}) + +test('accepts a limit option', function (t) { + setup() + server.get(SEARCH + '?text=oo&size=3').once().reply(200, { + objects: [ + { package: { name: 'cool', version: '1.0.0' } }, + { package: { name: 'cool', version: '1.0.0' } } + ] + }) + var results = 0 + var s = esearch({ + include: ['oo'], + limit: 3 + }) + s.on('data', function () { results++ }) + finished(s, function (err) { + if (err) { throw err } + t.ok(true, 'request sent with correct size') + t.equal(results, 2, 'behaves fine with fewer results than size') + server.done() + t.done() + }) +}) + +test('passes foo:bar syntax params directly', function (t) { + setup() + server.get(SEARCH + '?text=foo%3Abar&size=1').once().reply(200, { + objects: [] + }) + var s = esearch({ + include: ['foo:bar'], + limit: 1 + }) + s.on('data', function () {}) + finished(s, function (err) { + if (err) { throw err } + t.ok(true, 'request sent with correct params') + server.done() + t.done() + }) +}) + +test('space-separates and URI-encodes multiple search params', function (t) { + setup() + server.get(SEARCH + '?text=foo%20bar%3Abaz%20quux%3F%3D&size=1').once().reply(200, { + objects: [] + }) + var s = esearch({ + include: ['foo', 'bar:baz', 'quux?='], + limit: 1 + }) + s.on('data', function () {}) + finished(s, function (err) { + if (err) { throw err } + t.ok(true, 'request sent with correct params') + server.done() + t.done() + }) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.done() +}) diff --git a/deps/npm/test/tap/search.js b/deps/npm/test/tap/search.js index dcc46df78e3049..78436e1e29a496 100644 --- a/deps/npm/test/tap/search.js +++ b/deps/npm/test/tap/search.js @@ -1,5 +1,6 @@ var path = require('path') var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') var osenv = require('osenv') var rimraf = require('rimraf') var cacheFile = require('npm-cache-filename') @@ -14,28 +15,26 @@ var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') var cachePath = path.join(cacheBase, '.cache.json') +var server + test('setup', function (t) { - t.pass('all set up') - t.done() + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.pass('all set up') + t.done() + }) }) test('notifies when there are no results', function (t) { setup() - var now = Date.now() - var cacheContents = { - '_updated': now, - bar: { name: 'bar', version: '1.0.0' }, - cool: { name: 'cool', version: '1.0.0' }, - foo: { name: 'foo', version: '2.0.0' }, - other: { name: 'other', version: '1.0.0' } - } - var fixture = new Tacks(File(cacheContents)) - fixture.create(cachePath) + server.get('/-/v1/search?text=none&size=20').once().reply(200, { + objects: [] + }) common.npm([ - 'search', 'nomatcheswhatsoeverfromthis', + 'search', 'none', '--registry', common.registry, - '--loglevel', 'error', - '--cache', CACHE_DIR + '--loglevel', 'error' ], {}, function (err, code, stdout, stderr) { if (err) throw err t.equal(stderr, '', 'no error output') @@ -47,6 +46,8 @@ test('notifies when there are no results', function (t) { test('spits out a useful error when no cache nor network', function (t) { setup() + server.get('/-/v1/search?text=foo&size=20').once().reply(404, {}) + server.get('/-/all').many().reply(404, {}) var cacheContents = {} var fixture = new Tacks(File(cacheContents)) fixture.create(cachePath) @@ -54,6 +55,7 @@ test('spits out a useful error when no cache nor network', function (t) { 'search', 'foo', '--registry', common.registry, '--loglevel', 'silly', + '--json', '--fetch-retry-mintimeout', 0, '--fetch-retry-maxtimeout', 0, '--cache', CACHE_DIR @@ -68,16 +70,12 @@ test('spits out a useful error when no cache nor network', function (t) { test('can switch to JSON mode', function (t) { setup() - var now = Date.now() - var cacheContents = { - '_updated': now, - bar: { name: 'bar', version: '1.0.0' }, - cool: { name: 'cool', version: '1.0.0' }, - foo: { name: 'foo', version: '2.0.0' }, - other: { name: 'other', version: '1.0.0' } - } - var fixture = new Tacks(File(cacheContents)) - fixture.create(cachePath) + server.get('/-/v1/search?text=oo&size=20').once().reply(200, { + objects: [ + { package: { name: 'cool', version: '1.0.0' } }, + { package: { name: 'foo', version: '2.0.0' } } + ] + }) common.npm([ 'search', 'oo', '--json', @@ -86,30 +84,23 @@ test('can switch to JSON mode', function (t) { '--cache', CACHE_DIR ], {}, function (err, code, stdout, stderr) { if (err) throw err - t.deepEquals(JSON.parse(stdout), [ - { name: 'cool', version: '1.0.0' }, - { name: 'foo', version: '2.0.0' } - ], 'results returned as valid json') t.equal(stderr, '', 'no error output') t.equal(code, 0, 'search gives 0 error code even if no matches') + t.deepEquals(JSON.parse(stdout), [ + { name: 'cool', version: '1.0.0', date: null }, + { name: 'foo', version: '2.0.0', date: null } + ], 'results returned as valid json') t.done() }) }) test('JSON mode does not notify on empty', function (t) { setup() - var now = Date.now() - var cacheContents = { - '_updated': now, - bar: { name: 'bar', version: '1.0.0' }, - cool: { name: 'cool', version: '1.0.0' }, - foo: { name: 'foo', version: '2.0.0' }, - other: { name: 'other', version: '1.0.0' } - } - var fixture = new Tacks(File(cacheContents)) - fixture.create(cachePath) + server.get('/-/v1/search?text=oo&size=20').once().reply(200, { + objects: [] + }) common.npm([ - 'search', 'nomatcheswhatsoeverfromthis', + 'search', 'oo', '--json', '--registry', common.registry, '--loglevel', 'error', @@ -125,16 +116,12 @@ test('JSON mode does not notify on empty', function (t) { test('can switch to tab separated mode', function (t) { setup() - var now = Date.now() - var cacheContents = { - '_updated': now, - bar: { name: 'bar', version: '1.0.0' }, - cool: { name: 'cool', version: '1.0.0' }, - foo: { name: 'foo', description: 'this\thas\ttabs', version: '2.0.0' }, - other: { name: 'other', version: '1.0.0' } - } - var fixture = new Tacks(File(cacheContents)) - fixture.create(cachePath) + server.get('/-/v1/search?text=oo&size=20').once().reply(200, { + objects: [ + { package: { name: 'cool', version: '1.0.0' } }, + { package: { name: 'foo', description: 'this\thas\ttabs', version: '2.0.0' } } + ] + }) common.npm([ 'search', 'oo', '--parseable', @@ -152,18 +139,11 @@ test('can switch to tab separated mode', function (t) { test('tab mode does not notify on empty', function (t) { setup() - var now = Date.now() - var cacheContents = { - '_updated': now, - bar: { name: 'bar', version: '1.0.0' }, - cool: { name: 'cool', version: '1.0.0' }, - foo: { name: 'foo', version: '2.0.0' }, - other: { name: 'other', version: '1.0.0' } - } - var fixture = new Tacks(File(cacheContents)) - fixture.create(cachePath) + server.get('/-/v1/search?text=oo&size=20').once().reply(200, { + objects: [] + }) common.npm([ - 'search', 'nomatcheswhatsoeverfromthis', + 'search', 'oo', '--parseable', '--registry', common.registry, '--loglevel', 'error', @@ -192,163 +172,9 @@ test('no arguments provided should error', function (t) { }) }) -var searches = [ - { - term: 'cool', - description: 'non-regex search', - location: 103 - }, - { - term: '/cool/', - description: 'regex search', - location: 103 - }, - { - term: 'cool', - description: 'searches name field', - location: 103 - }, - { - term: 'ool', - description: 'excludes matches for --searchexclude', - location: 205, - inject: { - other: { name: 'other', description: 'this is a simple tool' } - }, - extraOpts: ['--searchexclude', 'cool'] - }, - { - term: 'neat lib', - description: 'searches description field', - location: 141, - inject: { - cool: { - name: 'cool', version: '5.0.0', description: 'this is a neat lib' - } - } - }, - { - term: 'foo', - description: 'skips description field with --no-description', - location: 80, - inject: { - cool: { - name: 'cool', version: '5.0.0', description: 'foo bar!' - } - }, - extraOpts: ['--no-description'] - }, - { - term: 'zkat', - description: 'searches maintainers by name', - location: 155, - inject: { - cool: { - name: 'cool', - version: '5.0.0', - maintainers: [{ - name: 'zkat' - }] - } - } - }, - { - term: '=zkat', - description: 'searches maintainers unambiguously by =name', - location: 154, - inject: { - bar: { name: 'bar', description: 'zkat thing', version: '1.0.0' }, - cool: { - name: 'cool', - version: '5.0.0', - maintainers: [{ - name: 'zkat' - }] - } - } - }, - { - term: 'github.com', - description: 'searches projects by url', - location: 205, - inject: { - bar: { - name: 'bar', - url: 'gitlab.com/bar', - // For historical reasons, `url` is only present if `versions` is there - versions: ['1.0.0'], - version: '1.0.0' - }, - cool: { - name: 'cool', - version: '5.0.0', - versions: ['1.0.0'], - url: 'github.com/cool/cool' - } - } - }, - { - term: 'monad', - description: 'searches projects by keywords', - location: 197, - inject: { - cool: { - name: 'cool', - version: '5.0.0', - keywords: ['monads'] - } - } - } -] - -searches.forEach(function (search) { - test(search.description, function (t) { - setup() - var now = Date.now() - var cacheContents = { - '_updated': now, - bar: { name: 'bar', version: '1.0.0' }, - cool: { name: 'cool', version: '5.0.0' }, - foo: { name: 'foo', version: '2.0.0' }, - other: { name: 'other', version: '1.0.0' } - } - for (var k in search.inject) { - cacheContents[k] = search.inject[k] - } - var fixture = new Tacks(File(cacheContents)) - fixture.create(cachePath) - common.npm([ - 'search', search.term, - '--registry', common.registry, - '--cache', CACHE_DIR, - '--loglevel', 'error', - '--color', 'always' - ].concat(search.extraOpts || []), - {}, - function (err, code, stdout, stderr) { - t.equal(stderr, '', 'no error output') - t.notEqual(stdout, '', 'got output') - t.equal(code, 0, 'search finished successfully') - t.ifErr(err, 'search finished successfully') - // \033 == \u001B - var markStart = '\u001B\\[[0-9][0-9]m' - var markEnd = '\u001B\\[0m' - - var re = new RegExp(markStart + '.*?' + markEnd) - - var cnt = stdout.search(re) - t.equal( - cnt, - search.location, - search.description + ' search for ' + search.term - ) - t.end() - }) - }) -}) - test('cleanup', function (t) { cleanup() + server.close() t.end() }) @@ -358,6 +184,7 @@ function setup () { } function cleanup () { + server.done() process.chdir(osenv.tmpdir()) rimraf.sync(PKG_DIR) } From 8a639bb6965658f526950ca787c8d28bca93e608 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 22 Mar 2017 16:11:58 -0700 Subject: [PATCH 200/485] doc: update collaborator email address Per email conversation with Shigeki Ohtsu, updating email address in docs. The current listed email address does not work anymore. PR-URL: https://github.com/nodejs/node/pull/11996 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Shigeki Ohtsu --- .mailmap | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index 36324c6aa2ae9b..722995b6b04b63 100644 --- a/.mailmap +++ b/.mailmap @@ -143,7 +143,7 @@ San-Tai Hsu Scott Blomquist Sergey Kryzhanovsky Shannen Saez -Shigeki Ohtsu +Shigeki Ohtsu Siddharth Mahendraker Simon Willison Stanislav Opichal diff --git a/README.md b/README.md index e2d66b90be14b4..fdbbb16f820e19 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ more information about the governance of the Node.js project, see * [rvagg](https://github.com/rvagg) - **Rod Vagg** <rod@vagg.org> * [shigeki](https://github.com/shigeki) - -**Shigeki Ohtsu** <ohtsu@iij.ad.jp> (he/him) +**Shigeki Ohtsu** <ohtsu@ohtsu.org> (he/him) * [targos](https://github.com/targos) - **Michaël Zasso** <targos@protonmail.com> (he/him) * [thefourtheye](https://github.com/thefourtheye) - From 2dff3a22feefe173c2c44574fd3cf312f79ee3b2 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Tue, 21 Mar 2017 02:58:54 +0200 Subject: [PATCH 201/485] test: do not use `more` command on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/11953 Fixes: https://github.com/nodejs/node/issues/11469 Reviewed-By: João Reis Reviewed-By: Gibson Fahnestock Reviewed-By: Michael Dawson Reviewed-By: Rich Trott --- test/README.md | 12 ---------- test/common.js | 22 ------------------- .../test-child-process-spawn-shell.js | 2 +- .../test-child-process-spawnsync-shell.js | 2 +- test/parallel/test-child-process-stdin.js | 8 ++----- .../test-child-process-stdio-inherit.js | 4 ++-- test/parallel/test-child-process-stdio.js | 3 ++- 7 files changed, 8 insertions(+), 45 deletions(-) diff --git a/test/README.md b/test/README.md index 653f78cc6d2eb5..ae549420624ccc 100644 --- a/test/README.md +++ b/test/README.md @@ -376,24 +376,12 @@ Path to the 'root' directory. either `/` or `c:\\` (windows) Logs '1..0 # Skipped: ' + `msg` -### spawnCat(options) -* `options` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) -* return [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) - -Platform normalizes the `cat` command. - ### spawnPwd(options) * `options` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) * return [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) Platform normalizes the `pwd` command. -### spawnSyncCat(options) -* `options` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) -* return [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) - -Synchronous version of `spawnCat`. - ### spawnSyncPwd(options) * `options` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) * return [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) diff --git a/test/common.js b/test/common.js index 8f19efd900abf7..eedc537d1d8ddd 100644 --- a/test/common.js +++ b/test/common.js @@ -261,28 +261,6 @@ exports.ddCommand = function(filename, kilobytes) { }; -exports.spawnCat = function(options) { - const spawn = require('child_process').spawn; - - if (exports.isWindows) { - return spawn('more', [], options); - } else { - return spawn('cat', [], options); - } -}; - - -exports.spawnSyncCat = function(options) { - const spawnSync = require('child_process').spawnSync; - - if (exports.isWindows) { - return spawnSync('more', [], options); - } else { - return spawnSync('cat', [], options); - } -}; - - exports.spawnPwd = function(options) { const spawn = require('child_process').spawn; diff --git a/test/parallel/test-child-process-spawn-shell.js b/test/parallel/test-child-process-spawn-shell.js index 444d1eb063ca4a..e9dd0e07efaa0c 100644 --- a/test/parallel/test-child-process-spawn-shell.js +++ b/test/parallel/test-child-process-spawn-shell.js @@ -34,7 +34,7 @@ echo.on('close', common.mustCall((code, signal) => { })); // Verify that shell features can be used -const cmd = common.isWindows ? 'echo bar | more' : 'echo bar | cat'; +const cmd = 'echo bar | cat'; const command = cp.spawn(cmd, { encoding: 'utf8', shell: true diff --git a/test/parallel/test-child-process-spawnsync-shell.js b/test/parallel/test-child-process-spawnsync-shell.js index 1d92767a8b5ba5..9e03ee126f087b 100644 --- a/test/parallel/test-child-process-spawnsync-shell.js +++ b/test/parallel/test-child-process-spawnsync-shell.js @@ -23,7 +23,7 @@ assert.strictEqual(echo.args[echo.args.length - 1].replace(/"/g, ''), assert.strictEqual(echo.stdout.toString().trim(), 'foo'); // Verify that shell features can be used -const cmd = common.isWindows ? 'echo bar | more' : 'echo bar | cat'; +const cmd = 'echo bar | cat'; const command = cp.spawnSync(cmd, {shell: true}); assert.strictEqual(command.stdout.toString().trim(), 'bar'); diff --git a/test/parallel/test-child-process-stdin.js b/test/parallel/test-child-process-stdin.js index 4f5352438d2da9..8a0a2bcfaeab93 100644 --- a/test/parallel/test-child-process-stdin.js +++ b/test/parallel/test-child-process-stdin.js @@ -25,7 +25,7 @@ const assert = require('assert'); const spawn = require('child_process').spawn; -const cat = spawn(common.isWindows ? 'more' : 'cat'); +const cat = spawn('cat'); cat.stdin.write('hello'); cat.stdin.write(' '); cat.stdin.write('world'); @@ -54,9 +54,5 @@ cat.on('exit', common.mustCall(function(status) { })); cat.on('close', common.mustCall(function() { - if (common.isWindows) { - assert.strictEqual('hello world\r\n', response); - } else { - assert.strictEqual('hello world', response); - } + assert.strictEqual('hello world', response); })); diff --git a/test/parallel/test-child-process-stdio-inherit.js b/test/parallel/test-child-process-stdio-inherit.js index 4318ba3ee170b1..b77391d87dca2c 100644 --- a/test/parallel/test-child-process-stdio-inherit.js +++ b/test/parallel/test-child-process-stdio-inherit.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const spawn = require('child_process').spawn; @@ -52,5 +52,5 @@ function grandparent() { function parent() { // should not immediately exit. - common.spawnCat({ stdio: 'inherit' }); + spawn('cat', [], { stdio: 'inherit' }); } diff --git a/test/parallel/test-child-process-stdio.js b/test/parallel/test-child-process-stdio.js index b7193b2f591a0f..00c002e89d6cda 100644 --- a/test/parallel/test-child-process-stdio.js +++ b/test/parallel/test-child-process-stdio.js @@ -22,6 +22,7 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); +const spawnSync = require('child_process').spawnSync; let options = {stdio: ['pipe']}; let child = common.spawnPwd(options); @@ -36,7 +37,7 @@ assert.strictEqual(child.stdout, null); assert.strictEqual(child.stderr, null); options = {stdio: 'ignore'}; -child = common.spawnSyncCat(options); +child = spawnSync('cat', [], options); assert.deepStrictEqual(options, {stdio: 'ignore'}); assert.throws(() => { From ee19e2923acc806fc37cabceb03460fb88c95def Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 20 Mar 2017 14:18:37 +0800 Subject: [PATCH 202/485] url: show input in parse error message PR-URL: https://github.com/nodejs/node/pull/11934 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Timothy Gu Reviewed-By: Anna Henningsen Reviewed-By: Daijiro Wachi --- lib/internal/url.js | 24 ++++------- src/node_url.cc | 52 ++++++++++++++---------- src/node_url.h | 10 +++++ test/parallel/test-whatwg-url-parsing.js | 31 ++++++++++---- 4 files changed, 71 insertions(+), 46 deletions(-) diff --git a/lib/internal/url.js b/lib/internal/url.js index 040771c228067e..7a6ff227ed4191 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -99,8 +99,6 @@ class TupleOrigin { function onParseComplete(flags, protocol, username, password, host, port, path, query, fragment) { - if (flags & binding.URL_FLAGS_FAILED) - throw new TypeError('Invalid URL'); var ctx = this[context]; ctx.flags = flags; ctx.scheme = protocol; @@ -118,19 +116,23 @@ function onParseComplete(flags, protocol, username, password, initSearchParams(this[searchParams], query); } +function onParseError(flags, input) { + const error = new TypeError('Invalid URL: ' + input); + error.input = input; + throw error; +} + // Reused by URL constructor and URL#href setter. function parse(url, input, base) { const base_context = base ? base[context] : undefined; url[context] = new StorageObject(); binding.parse(input.trim(), -1, base_context, undefined, - onParseComplete.bind(url)); + onParseComplete.bind(url), onParseError); } function onParseProtocolComplete(flags, protocol, username, password, host, port, path, query, fragment) { - if (flags & binding.URL_FLAGS_FAILED) - return; const newIsSpecial = (flags & binding.URL_FLAGS_SPECIAL) !== 0; const s = this[special]; const ctx = this[context]; @@ -159,8 +161,6 @@ function onParseProtocolComplete(flags, protocol, username, password, function onParseHostComplete(flags, protocol, username, password, host, port, path, query, fragment) { - if (flags & binding.URL_FLAGS_FAILED) - return; const ctx = this[context]; if (host) { ctx.host = host; @@ -174,8 +174,6 @@ function onParseHostComplete(flags, protocol, username, password, function onParseHostnameComplete(flags, protocol, username, password, host, port, path, query, fragment) { - if (flags & binding.URL_FLAGS_FAILED) - return; const ctx = this[context]; if (host) { ctx.host = host; @@ -187,15 +185,11 @@ function onParseHostnameComplete(flags, protocol, username, password, function onParsePortComplete(flags, protocol, username, password, host, port, path, query, fragment) { - if (flags & binding.URL_FLAGS_FAILED) - return; this[context].port = port; } function onParsePathComplete(flags, protocol, username, password, host, port, path, query, fragment) { - if (flags & binding.URL_FLAGS_FAILED) - return; const ctx = this[context]; if (path) { ctx.path = path; @@ -207,16 +201,12 @@ function onParsePathComplete(flags, protocol, username, password, function onParseSearchComplete(flags, protocol, username, password, host, port, path, query, fragment) { - if (flags & binding.URL_FLAGS_FAILED) - return; const ctx = this[context]; ctx.query = query; } function onParseHashComplete(flags, protocol, username, password, host, port, path, query, fragment) { - if (flags & binding.URL_FLAGS_FAILED) - return; const ctx = this[context]; if (fragment) { ctx.fragment = fragment; diff --git a/src/node_url.cc b/src/node_url.cc index ba3ceec6aca070..6cd78c2c6c04c8 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -1233,7 +1233,8 @@ namespace url { enum url_parse_state state_override, Local base_obj, Local context_obj, - Local cb) { + Local cb, + Local error_cb) { Isolate* isolate = env->isolate(); Local context = env->context(); HandleScope handle_scope(isolate); @@ -1254,20 +1255,19 @@ namespace url { // Define the return value placeholders const Local undef = Undefined(isolate); - Local argv[9] = { - undef, - undef, - undef, - undef, - undef, - undef, - undef, - undef, - undef, - }; - - argv[ARG_FLAGS] = Integer::NewFromUnsigned(isolate, url.flags); if (!(url.flags & URL_FLAGS_FAILED)) { + Local argv[9] = { + undef, + undef, + undef, + undef, + undef, + undef, + undef, + undef, + undef, + }; + argv[ARG_FLAGS] = Integer::NewFromUnsigned(isolate, url.flags); if (url.flags & URL_FLAGS_HAS_SCHEME) argv[ARG_PROTOCOL] = OneByteString(isolate, url.scheme.c_str()); if (url.flags & URL_FLAGS_HAS_USERNAME) @@ -1284,22 +1284,31 @@ namespace url { argv[ARG_PORT] = Integer::New(isolate, url.port); if (url.flags & URL_FLAGS_HAS_PATH) argv[ARG_PATH] = Copy(env, url.path); + (void)cb->Call(context, recv, arraysize(argv), argv); + } else if (error_cb->IsFunction()) { + Local argv[2] = { undef, undef }; + argv[ERR_ARG_FLAGS] = Integer::NewFromUnsigned(isolate, url.flags); + argv[ERR_ARG_INPUT] = + String::NewFromUtf8(env->isolate(), + input, + v8::NewStringType::kNormal).ToLocalChecked(); + (void)error_cb.As()->Call(context, recv, arraysize(argv), argv); } - - (void)cb->Call(context, recv, 9, argv); } static void Parse(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); CHECK_GE(args.Length(), 5); - CHECK(args[0]->IsString()); - CHECK(args[2]->IsUndefined() || + CHECK(args[0]->IsString()); // input + CHECK(args[2]->IsUndefined() || // base context args[2]->IsNull() || args[2]->IsObject()); - CHECK(args[3]->IsUndefined() || + CHECK(args[3]->IsUndefined() || // context args[3]->IsNull() || args[3]->IsObject()); - CHECK(args[4]->IsFunction()); + CHECK(args[4]->IsFunction()); // complete callback + CHECK(args[5]->IsUndefined() || args[5]->IsFunction()); // error callback + Utf8Value input(env->isolate(), args[0]); enum url_parse_state state_override = kUnknownState; if (args[1]->IsNumber()) { @@ -1312,7 +1321,8 @@ namespace url { state_override, args[2], args[3], - args[4].As()); + args[4].As(), + args[5]); } static void EncodeAuthSet(const FunctionCallbackInfo& args) { diff --git a/src/node_url.h b/src/node_url.h index 49f6de866da501..b9d91782be9e59 100644 --- a/src/node_url.h +++ b/src/node_url.h @@ -463,6 +463,10 @@ static inline void PercentDecode(const char* input, XX(ARG_QUERY) \ XX(ARG_FRAGMENT) +#define ERR_ARGS(XX) \ + XX(ERR_ARG_FLAGS) \ + XX(ERR_ARG_INPUT) \ + static const char kEOL = -1; enum url_parse_state { @@ -484,6 +488,12 @@ enum url_cb_args { #undef XX }; +enum url_error_cb_args { +#define XX(name) name, + ERR_ARGS(XX) +#undef XX +} url_error_cb_args; + static inline bool IsSpecial(std::string scheme) { #define XX(name, _) if (scheme == name) return true; SPECIALS(XX); diff --git a/test/parallel/test-whatwg-url-parsing.js b/test/parallel/test-whatwg-url-parsing.js index e4f8306ead8d87..4d04c3194e1f1a 100644 --- a/test/parallel/test-whatwg-url-parsing.js +++ b/test/parallel/test-whatwg-url-parsing.js @@ -13,15 +13,30 @@ if (!common.hasIntl) { // Tests below are not from WPT. const tests = require(path.join(common.fixturesDir, 'url-tests')); +const failureTests = tests.filter((test) => test.failure).concat([ + { input: '' }, + { input: 'test' }, + { input: undefined }, + { input: 0 }, + { input: true }, + { input: false }, + { input: null }, + { input: new Date() }, + { input: new RegExp() }, + { input: () => {} } +]); -for (const test of tests) { - if (typeof test === 'string') - continue; - - if (test.failure) { - assert.throws(() => new URL(test.input, test.base), - /^TypeError: Invalid URL$/); - } +for (const test of failureTests) { + assert.throws( + () => new URL(test.input, test.base), + (error) => { + // The input could be processed, so we don't do strict matching here + const match = (error + '').match(/^TypeError: Invalid URL: (.*)$/); + if (!match) { + return false; + } + return error.input === match[1]; + }); } const additional_tests = require( From 348cc80a3cbf0f4271ed30418c6ed661bdeede7b Mon Sep 17 00:00:00 2001 From: ghaiklor Date: Sun, 27 Mar 2016 16:09:08 +0300 Subject: [PATCH 203/485] tls: make rejectUnauthorized default to true rejectUnauthorized used to be false when the property was undefined or null, quietly allowing client connections for which certificates have been requested (requestCert is true) even when the client certificate was not authorized (signed by a trusted CA). Change this so rejectUnauthorized is always true unless it is explicitly set to false. PR-URL: https://github.com/nodejs/node/pull/5923 Reviewed-By: Sam Roberts Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig --- doc/api/tls.md | 16 +++++++++------- lib/_tls_wrap.js | 15 +++------------ test/parallel/test-https-foafssl.js | 3 ++- test/parallel/test-tls-session-cache.js | 3 ++- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index 94281dd3f00c28..468a1b4eb8ab53 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -712,7 +712,10 @@ added: v0.11.8 --> * `options` {Object} - * `rejectUnauthorized` {boolean} + * `rejectUnauthorized` {boolean} If not `false`, the server certificate is verified + against the list of supplied CAs. An `'error'` event is emitted if + verification fails; `err.code` contains the OpenSSL error code. Defaults to + `true`. * `requestCert` * `callback` {Function} A function that will be called when the renegotiation request has been completed. @@ -769,7 +772,7 @@ changes: connection/disconnection/destruction of `socket` is the user's responsibility, calling `tls.connect()` will not cause `net.connect()` to be called. - * `rejectUnauthorized` {boolean} If `true`, the server certificate is verified + * `rejectUnauthorized` {boolean} If not `false`, the server certificate is verified against the list of supplied CAs. An `'error'` event is emitted if verification fails; `err.code` contains the OpenSSL error code. Defaults to `true`. @@ -1012,9 +1015,9 @@ changes: * `requestCert` {boolean} If `true` the server will request a certificate from clients that connect and attempt to verify that certificate. Defaults to `false`. - * `rejectUnauthorized` {boolean} If `true` the server will reject any + * `rejectUnauthorized` {boolean} If not `false` the server will reject any connection which is not authorized with the list of supplied CAs. This - option only has an effect if `requestCert` is `true`. Defaults to `false`. + option only has an effect if `requestCert` is `true`. Defaults to `true`. * `NPNProtocols` {string[]|Buffer} An array of strings or a `Buffer` naming possible NPN protocols. (Protocols should be ordered by their priority.) * `ALPNProtocols` {string[]|Buffer} An array of strings or a `Buffer` naming @@ -1190,9 +1193,8 @@ changes: opened as a server. * `requestCert` {boolean} `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`. -* `rejectUnauthorized` {boolean} `true` to specify whether a server should - automatically reject clients with invalid certificates. Only applies when - `isServer` is `true`. +* `rejectUnauthorized` {boolean} If not `false` a server automatically reject clients + with invalid certificates. Only applies when `isServer` is `true`. * `options` * `secureContext`: An optional TLS context object from [`tls.createSecureContext()`][] diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index e1767c5e672370..288f82e05b3d12 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -920,17 +920,8 @@ Server.prototype.setTicketKeys = function setTicketKeys(keys) { Server.prototype.setOptions = function(options) { - if (typeof options.requestCert === 'boolean') { - this.requestCert = options.requestCert; - } else { - this.requestCert = false; - } - - if (typeof options.rejectUnauthorized === 'boolean') { - this.rejectUnauthorized = options.rejectUnauthorized; - } else { - this.rejectUnauthorized = false; - } + this.requestCert = options.requestCert === true; + this.rejectUnauthorized = options.rejectUnauthorized !== false; if (options.pfx) this.pfx = options.pfx; if (options.key) this.key = options.key; @@ -1062,7 +1053,7 @@ exports.connect = function(...args /* [port,] [host,] [options,] [cb] */) { secureContext: context, isServer: false, requestCert: true, - rejectUnauthorized: options.rejectUnauthorized, + rejectUnauthorized: options.rejectUnauthorized !== false, session: options.session, NPNProtocols: NPN.NPNProtocols, ALPNProtocols: ALPN.ALPNProtocols, diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index 8b711b81fee566..661b1961527ef5 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -42,7 +42,8 @@ const https = require('https'); const options = { key: fs.readFileSync(common.fixturesDir + '/agent.key'), cert: fs.readFileSync(common.fixturesDir + '/agent.crt'), - requestCert: true + requestCert: true, + rejectUnauthorized: false }; const modulus = 'A6F44A9C25791431214F5C87AF9E040177A8BB89AC803F7E09BBC3A5519F' + diff --git a/test/parallel/test-tls-session-cache.js b/test/parallel/test-tls-session-cache.js index f555da842bbd0c..887c36d4c5b427 100644 --- a/test/parallel/test-tls-session-cache.js +++ b/test/parallel/test-tls-session-cache.js @@ -56,7 +56,8 @@ function doTest(testOptions, callback) { key: key, cert: cert, ca: [cert], - requestCert: true + requestCert: true, + rejectUnauthorized: false }; let requestCount = 0; let resumeCount = 0; From cb6c0c14eb58fb0660bc429cce37ef7e519ad06d Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 24 Mar 2017 08:27:38 -0400 Subject: [PATCH 204/485] doc: add richardlau to collaborators PR-URL: https://github.com/nodejs/node/pull/12020 Reviewed-By: Ben Noordhuis Reviewed-By: Daniel Bevenius Reviewed-By: Evan Lucas Reviewed-By: Gibson Fahnestock Reviewed-By: Yuta Hiroto --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fdbbb16f820e19..2144742ea78cdb 100644 --- a/README.md +++ b/README.md @@ -299,6 +299,8 @@ more information about the governance of the Node.js project, see **Prince John Wesley** <princejohnwesley@gmail.com> * [qard](https://github.com/qard) - **Stephen Belanger** <admin@stephenbelanger.com> (he/him) +* [richardlau](https://github.com/richardlau) - +**Richard Lau** <riclau@uk.ibm.com> * [rlidwka](https://github.com/rlidwka) - **Alex Kocharin** <alex@kocharin.ru> * [rmg](https://github.com/rmg) - From a8a042a6d336af816461fc26fe0527a68b68f3aa Mon Sep 17 00:00:00 2001 From: Morgan Brenner Date: Wed, 22 Mar 2017 15:23:00 -0400 Subject: [PATCH 205/485] build: add lint option to vcbuild.bat help PR-URL: https://github.com/nodejs/node/pull/11992 Fixes: https://github.com/nodejs/node/issues/11971 Reviewed-By: Gibson Fahnestock Reviewed-By: Vse Mozhet Byt Reviewed-By: James M Snell Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig --- vcbuild.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcbuild.bat b/vcbuild.bat index e4c5276bf2af6e..9cbac9088fda1d 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -417,7 +417,7 @@ echo Failed to create vc project files. goto exit :help -echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-inspector/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [sign] [x86/x64] [vc2015] [download-all] [enable-vtune] +echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-inspector/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [sign] [x86/x64] [vc2015] [download-all] [enable-vtune] [lint/lint-ci] echo Examples: echo vcbuild.bat : builds release build echo vcbuild.bat debug : builds debug build From 6a09a69ec9d36b705e9bde2ac1a193566a702d96 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 18 Oct 2016 16:41:26 +0200 Subject: [PATCH 206/485] build: enable cctest to use generated objects This commit tries to make it simpler to add unit tests (cctest) for code that needs to test node core funtionality but that might not be appropriate as an addon or a JavaScript test. An example of this could be adding functionality targeted for situations when Node itself is embedded. Currently it was not as easy, or efficient, as one would have hoped to add such tests. The object output directories vary for different operating systems which we need to link to so that we don't have an additional compilation step. PR-URL: https://github.com/nodejs/node/pull/11956 Ref: https://github.com/nodejs/node/pull/9163 Reviewed-By: James M Snell --- common.gypi | 6 +- node.gyp | 431 +++++--------------------- node.gypi | 332 ++++++++++++++++++++ test/cctest/node_test_fixture.cc | 2 + test/cctest/node_test_fixture.h | 85 +++++ test/cctest/{util.cc => test_util.cc} | 4 - tools/gyp/pylib/gyp/generator/make.py | 2 +- 7 files changed, 505 insertions(+), 357 deletions(-) create mode 100644 node.gypi create mode 100644 test/cctest/node_test_fixture.cc create mode 100644 test/cctest/node_test_fixture.h rename test/cctest/{util.cc => test_util.cc} (99%) diff --git a/common.gypi b/common.gypi index 147cc70fa5d5df..224498b4310ea8 100644 --- a/common.gypi +++ b/common.gypi @@ -38,6 +38,8 @@ ['OS == "win"', { 'os_posix': 0, 'v8_postmortem_support%': 'false', + 'OBJ_DIR': '<(PRODUCT_DIR)/obj', + 'V8_BASE': '<(PRODUCT_DIR)/lib/v8_libbase.lib', }, { 'os_posix': 1, 'v8_postmortem_support%': 'true', @@ -51,8 +53,8 @@ 'OBJ_DIR': '<(PRODUCT_DIR)/obj', 'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a', }, { - 'OBJ_DIR': '<(PRODUCT_DIR)/obj.target', - 'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a', + 'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target', + 'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a', }], ], }], diff --git a/node.gyp b/node.gyp index 637a1934287841..2652ecc63b896e 100644 --- a/node.gyp +++ b/node.gyp @@ -145,6 +145,10 @@ 'node_js2c#host', ], + 'includes': [ + 'node.gypi' + ], + 'include_dirs': [ 'src', 'tools/msvs/genfiles', @@ -259,338 +263,6 @@ # Warn when using deprecated V8 APIs. 'V8_DEPRECATION_WARNINGS=1', ], - - - 'conditions': [ - [ 'node_shared=="false"', { - 'msvs_settings': { - 'VCManifestTool': { - 'EmbedManifest': 'true', - 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest' - } - }, - }, { - 'defines': [ - 'NODE_SHARED_MODE', - ], - 'conditions': [ - [ 'node_module_version!="" and OS!="win"', { - 'product_extension': '<(shlib_suffix)', - }] - ], - }], - [ 'node_enable_d8=="true"', { - 'dependencies': [ 'deps/v8/src/d8.gyp:d8' ], - }], - [ 'node_use_bundled_v8=="true"', { - 'dependencies': [ - 'deps/v8/src/v8.gyp:v8', - 'deps/v8/src/v8.gyp:v8_libplatform' - ], - }], - [ 'node_use_v8_platform=="true"', { - 'defines': [ - 'NODE_USE_V8_PLATFORM=1', - ], - }, { - 'defines': [ - 'NODE_USE_V8_PLATFORM=0', - ], - }], - [ 'node_tag!=""', { - 'defines': [ 'NODE_TAG="<(node_tag)"' ], - }], - [ 'node_v8_options!=""', { - 'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'], - }], - # No node_main.cc for anything except executable - [ 'node_target_type!="executable"', { - 'sources!': [ - 'src/node_main.cc', - ], - }], - [ 'node_release_urlbase!=""', { - 'defines': [ - 'NODE_RELEASE_URLBASE="<(node_release_urlbase)"', - ] - }], - [ 'v8_enable_i18n_support==1', { - 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ], - 'dependencies': [ - '<(icu_gyp_path):icui18n', - '<(icu_gyp_path):icuuc', - ], - 'conditions': [ - [ 'icu_small=="true"', { - 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ], - }]], - }], - [ 'node_use_bundled_v8=="true" and \ - node_enable_v8_vtunejit=="true" and (target_arch=="x64" or \ - target_arch=="ia32" or target_arch=="x32")', { - 'defines': [ 'NODE_ENABLE_VTUNE_PROFILING' ], - 'dependencies': [ - 'deps/v8/src/third_party/vtune/v8vtune.gyp:v8_vtune' - ], - }], - [ 'v8_enable_inspector==1', { - 'defines': [ - 'HAVE_INSPECTOR=1', - ], - 'sources': [ - 'src/inspector_agent.cc', - 'src/inspector_socket.cc', - 'src/inspector_socket_server.cc', - 'src/inspector_agent.h', - 'src/inspector_socket.h', - 'src/inspector_socket_server.h', - ], - 'dependencies': [ - 'v8_inspector_compress_protocol_json#host', - ], - 'include_dirs': [ - '<(SHARED_INTERMEDIATE_DIR)/include', # for inspector - '<(SHARED_INTERMEDIATE_DIR)', - ], - }, { - 'defines': [ 'HAVE_INSPECTOR=0' ] - }], - [ 'node_use_openssl=="true"', { - 'defines': [ 'HAVE_OPENSSL=1' ], - 'sources': [ - 'src/node_crypto.cc', - 'src/node_crypto_bio.cc', - 'src/node_crypto_clienthello.cc', - 'src/node_crypto.h', - 'src/node_crypto_bio.h', - 'src/node_crypto_clienthello.h', - 'src/tls_wrap.cc', - 'src/tls_wrap.h' - ], - 'conditions': [ - ['openssl_fips != ""', { - 'defines': [ 'NODE_FIPS_MODE' ], - }], - [ 'node_shared_openssl=="false"', { - 'dependencies': [ - './deps/openssl/openssl.gyp:openssl', - - # For tests - './deps/openssl/openssl.gyp:openssl-cli', - ], - # Do not let unused OpenSSL symbols to slip away - 'conditions': [ - # -force_load or --whole-archive are not applicable for - # the static library - [ 'node_target_type!="static_library"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)', - ], - }, - 'conditions': [ - ['OS in "linux freebsd" and node_shared=="false"', { - 'ldflags': [ - '-Wl,--whole-archive,' - '<(OBJ_DIR)/deps/openssl/' - '<(OPENSSL_PRODUCT)', - '-Wl,--no-whole-archive', - ], - }], - # openssl.def is based on zlib.def, zlib symbols - # are always exported. - ['use_openssl_def==1', { - 'sources': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'], - }], - ['OS=="win" and use_openssl_def==0', { - 'sources': ['deps/zlib/win32/zlib.def'], - }], - ], - }], - ], - }]] - }, { - 'defines': [ 'HAVE_OPENSSL=0' ] - }], - [ 'node_use_dtrace=="true"', { - 'defines': [ 'HAVE_DTRACE=1' ], - 'dependencies': [ - 'node_dtrace_header', - 'specialize_node_d', - ], - 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], - - # - # DTrace is supported on linux, solaris, mac, and bsd. There are - # three object files associated with DTrace support, but they're - # not all used all the time: - # - # node_dtrace.o all configurations - # node_dtrace_ustack.o not supported on mac and linux - # node_dtrace_provider.o All except OS X. "dtrace -G" is not - # used on OS X. - # - # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not - # actually exist. They're listed here to trick GYP into linking the - # corresponding object files into the final "node" executable. These - # object files are generated by "dtrace -G" using custom actions - # below, and the GYP-generated Makefiles will properly build them when - # needed. - # - 'sources': [ 'src/node_dtrace.cc' ], - 'conditions': [ - [ 'OS=="linux"', { - 'sources': [ - '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o' - ], - }], - [ 'OS!="mac" and OS!="linux"', { - 'sources': [ - 'src/node_dtrace_ustack.cc', - 'src/node_dtrace_provider.cc', - ] - } - ] ] - } ], - [ 'node_use_lttng=="true"', { - 'defines': [ 'HAVE_LTTNG=1' ], - 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], - 'libraries': [ '-llttng-ust' ], - 'sources': [ - 'src/node_lttng.cc' - ], - } ], - [ 'node_use_etw=="true"', { - 'defines': [ 'HAVE_ETW=1' ], - 'dependencies': [ 'node_etw' ], - 'sources': [ - 'src/node_win32_etw_provider.h', - 'src/node_win32_etw_provider-inl.h', - 'src/node_win32_etw_provider.cc', - 'src/node_dtrace.cc', - 'tools/msvs/genfiles/node_etw_provider.h', - 'tools/msvs/genfiles/node_etw_provider.rc', - ] - } ], - [ 'node_use_perfctr=="true"', { - 'defines': [ 'HAVE_PERFCTR=1' ], - 'dependencies': [ 'node_perfctr' ], - 'sources': [ - 'src/node_win32_perfctr_provider.h', - 'src/node_win32_perfctr_provider.cc', - 'src/node_counters.cc', - 'src/node_counters.h', - 'tools/msvs/genfiles/node_perfctr_provider.rc', - ] - } ], - [ 'node_no_browser_globals=="true"', { - 'defines': [ 'NODE_NO_BROWSER_GLOBALS' ], - } ], - [ 'node_use_bundled_v8=="true" and v8_postmortem_support=="true"', { - 'dependencies': [ 'deps/v8/src/v8.gyp:postmortem-metadata' ], - 'conditions': [ - # -force_load is not applicable for the static library - [ 'node_target_type!="static_library"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-Wl,-force_load,<(V8_BASE)', - ], - }, - }], - ], - }], - [ 'node_shared_zlib=="false"', { - 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ], - }], - - [ 'node_shared_http_parser=="false"', { - 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ], - }], - - [ 'node_shared_cares=="false"', { - 'dependencies': [ 'deps/cares/cares.gyp:cares' ], - }], - - [ 'node_shared_libuv=="false"', { - 'dependencies': [ 'deps/uv/uv.gyp:libuv' ], - }], - - [ 'OS=="win"', { - 'sources': [ - 'src/backtrace_win32.cc', - 'src/res/node.rc', - ], - 'defines!': [ - 'NODE_PLATFORM="win"', - ], - 'defines': [ - 'FD_SETSIZE=1024', - # we need to use node's preferred "win32" rather than gyp's preferred "win" - 'NODE_PLATFORM="win32"', - '_UNICODE=1', - ], - 'libraries': [ '-lpsapi.lib' ] - }, { # POSIX - 'defines': [ '__POSIX__' ], - 'sources': [ 'src/backtrace_posix.cc' ], - }], - [ 'OS=="mac"', { - # linking Corefoundation is needed since certain OSX debugging tools - # like Instruments require it for some features - 'libraries': [ '-framework CoreFoundation' ], - 'defines!': [ - 'NODE_PLATFORM="mac"', - ], - 'defines': [ - # we need to use node's preferred "darwin" rather than gyp's preferred "mac" - 'NODE_PLATFORM="darwin"', - ], - }], - [ 'OS=="freebsd"', { - 'libraries': [ - '-lutil', - '-lkvm', - ], - }], - [ 'OS=="aix"', { - 'defines': [ - '_LINUX_SOURCE_COMPAT', - ], - }], - [ 'OS=="solaris"', { - 'libraries': [ - '-lkstat', - '-lumem', - ], - 'defines!': [ - 'NODE_PLATFORM="solaris"', - ], - 'defines': [ - # we need to use node's preferred "sunos" - # rather than gyp's preferred "solaris" - 'NODE_PLATFORM="sunos"', - ], - }], - [ '(OS=="freebsd" or OS=="linux") and node_shared=="false" and coverage=="false"', { - 'ldflags': [ '-Wl,-z,noexecstack', - '-Wl,--whole-archive <(V8_BASE)', - '-Wl,--no-whole-archive' ] - }], - [ '(OS=="freebsd" or OS=="linux") and node_shared=="false" and coverage=="true"', { - 'ldflags': [ '-Wl,-z,noexecstack', - '-Wl,--whole-archive <(V8_BASE)', - '-Wl,--no-whole-archive', - '--coverage', - '-g', - '-O0' ], - 'cflags': [ '--coverage', - '-g', - '-O0' ] - }], - [ 'OS=="sunos"', { - 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ], - }], - ], }, { 'target_name': 'mkssldef', @@ -888,12 +560,70 @@ { 'target_name': 'cctest', 'type': 'executable', - 'dependencies': [ 'deps/gtest/gtest.gyp:gtest' ], + + 'dependencies': [ + '<(node_core_target_name)', + 'deps/gtest/gtest.gyp:gtest', + 'node_js2c#host', + 'node_dtrace_header', + 'node_dtrace_ustack', + 'node_dtrace_provider', + ], + + 'variables': { + 'OBJ_PATH': '<(OBJ_DIR)/node/src', + 'OBJ_GEN_PATH': '<(OBJ_DIR)/node/gen', + 'OBJ_TRACING_PATH': '<(OBJ_DIR)/node/src/tracing', + 'OBJ_SUFFIX': 'o', + 'conditions': [ + ['OS=="win"', { + 'OBJ_PATH': '<(OBJ_DIR)/node', + 'OBJ_GEN_PATH': '<(OBJ_DIR)/node', + 'OBJ_TRACING_PATH': '<(OBJ_DIR)/node', + 'OBJ_SUFFIX': 'obj', + }], + ['OS=="aix"', { + 'OBJ_PATH': '<(OBJ_DIR)/node_base/src', + 'OBJ_GEN_PATH': '<(OBJ_DIR)/node_base/gen', + 'OBJ_TRACING_PATH': '<(OBJ_DIR)/node_base/src/tracing', + }], + ], + }, + + 'includes': [ + 'node.gypi' + ], + 'include_dirs': [ 'src', + 'tools/msvs/genfiles', 'deps/v8/include', - '<(SHARED_INTERMEDIATE_DIR)' + 'deps/cares/include', + 'deps/uv/include', + '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h + ], + + 'libraries': [ + '<(OBJ_GEN_PATH)/node_javascript.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/node_debug_options.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/async-wrap.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/env.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/node.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/node_buffer.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/node_i18n.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/debug-agent.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/util.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/string_bytes.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/string_search.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/stream_base.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/node_constants.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/node_revert.<(OBJ_SUFFIX)', + '<(OBJ_TRACING_PATH)/agent.<(OBJ_SUFFIX)', + '<(OBJ_TRACING_PATH)/node_trace_buffer.<(OBJ_SUFFIX)', + '<(OBJ_TRACING_PATH)/node_trace_writer.<(OBJ_SUFFIX)', + '<(OBJ_TRACING_PATH)/trace_event.<(OBJ_SUFFIX)', ], + 'defines': [ # gtest's ASSERT macros conflict with our own. 'GTEST_DONT_DEFINE_ASSERT_EQ=1', @@ -904,24 +634,18 @@ 'GTEST_DONT_DEFINE_ASSERT_NE=1', 'NODE_WANT_INTERNALS=1', ], + 'sources': [ - 'test/cctest/util.cc', + 'test/cctest/test_util.cc', + ], + + 'sources!': [ + 'src/node_main.cc' ], 'conditions': [ ['v8_enable_inspector==1', { - 'defines': [ - 'HAVE_INSPECTOR=1', - ], - 'dependencies': [ - 'v8_inspector_compress_protocol_json#host' - ], - 'include_dirs': [ - '<(SHARED_INTERMEDIATE_DIR)' - ], 'sources': [ - 'src/inspector_socket.cc', - 'src/inspector_socket_server.cc', 'test/cctest/test_inspector_socket.cc', 'test/cctest/test_inspector_socket_server.cc' ], @@ -953,12 +677,19 @@ 'deps/v8/src/v8.gyp:v8_libplatform', ], }], - [ 'node_use_bundled_v8=="true"', { - 'dependencies': [ - 'deps/v8/src/v8.gyp:v8', - 'deps/v8/src/v8.gyp:v8_libplatform' + [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', { + 'copies': [{ + 'destination': '<(OBJ_DIR)/cctest/src', + 'files': [ + '<(OBJ_PATH)/node_dtrace_ustack.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/node_dtrace_provider.<(OBJ_SUFFIX)', + '<(OBJ_PATH)/node_dtrace.<(OBJ_SUFFIX)', + ]}, ], }], + ['OS=="solaris"', { + 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ] + }], ] } ], # end targets diff --git a/node.gypi b/node.gypi new file mode 100644 index 00000000000000..d78d24da8b39cd --- /dev/null +++ b/node.gypi @@ -0,0 +1,332 @@ +{ + 'conditions': [ + [ 'node_shared=="false"', { + 'msvs_settings': { + 'VCManifestTool': { + 'EmbedManifest': 'true', + 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest' + } + }, + }, { + 'defines': [ + 'NODE_SHARED_MODE', + ], + 'conditions': [ + [ 'node_module_version!="" and OS!="win"', { + 'product_extension': '<(shlib_suffix)', + }] + ], + }], + [ 'node_enable_d8=="true"', { + 'dependencies': [ 'deps/v8/src/d8.gyp:d8' ], + }], + [ 'node_use_bundled_v8=="true"', { + 'dependencies': [ + 'deps/v8/src/v8.gyp:v8', + 'deps/v8/src/v8.gyp:v8_libplatform' + ], + }], + [ 'node_use_v8_platform=="true"', { + 'defines': [ + 'NODE_USE_V8_PLATFORM=1', + ], + }, { + 'defines': [ + 'NODE_USE_V8_PLATFORM=0', + ], + }], + [ 'node_tag!=""', { + 'defines': [ 'NODE_TAG="<(node_tag)"' ], + }], + [ 'node_v8_options!=""', { + 'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'], + }], + # No node_main.cc for anything except executable + [ 'node_target_type!="executable"', { + 'sources!': [ + 'src/node_main.cc', + ], + }], + [ 'node_release_urlbase!=""', { + 'defines': [ + 'NODE_RELEASE_URLBASE="<(node_release_urlbase)"', + ] + }], + [ 'v8_enable_i18n_support==1', { + 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ], + 'dependencies': [ + '<(icu_gyp_path):icui18n', + '<(icu_gyp_path):icuuc', + ], + 'conditions': [ + [ 'icu_small=="true"', { + 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ], + }]], + }], + [ 'node_use_bundled_v8=="true" and \ + node_enable_v8_vtunejit=="true" and (target_arch=="x64" or \ + target_arch=="ia32" or target_arch=="x32")', { + 'defines': [ 'NODE_ENABLE_VTUNE_PROFILING' ], + 'dependencies': [ + 'deps/v8/src/third_party/vtune/v8vtune.gyp:v8_vtune' + ], + }], + [ 'v8_enable_inspector==1', { + 'defines': [ + 'HAVE_INSPECTOR=1', + ], + 'sources': [ + 'src/inspector_agent.cc', + 'src/inspector_socket.cc', + 'src/inspector_socket_server.cc', + 'src/inspector_agent.h', + 'src/inspector_socket.h', + 'src/inspector_socket_server.h', + ], + 'dependencies': [ + 'v8_inspector_compress_protocol_json#host', + ], + 'include_dirs': [ + '<(SHARED_INTERMEDIATE_DIR)/include', # for inspector + '<(SHARED_INTERMEDIATE_DIR)', + ], + }, { + 'defines': [ 'HAVE_INSPECTOR=0' ] + }], + [ 'node_use_openssl=="true"', { + 'defines': [ 'HAVE_OPENSSL=1' ], + 'sources': [ + 'src/node_crypto.cc', + 'src/node_crypto_bio.cc', + 'src/node_crypto_clienthello.cc', + 'src/node_crypto.h', + 'src/node_crypto_bio.h', + 'src/node_crypto_clienthello.h', + 'src/tls_wrap.cc', + 'src/tls_wrap.h' + ], + 'conditions': [ + ['openssl_fips != ""', { + 'defines': [ 'NODE_FIPS_MODE' ], + }], + [ 'node_shared_openssl=="false"', { + 'dependencies': [ + './deps/openssl/openssl.gyp:openssl', + + # For tests + './deps/openssl/openssl.gyp:openssl-cli', + ], + # Do not let unused OpenSSL symbols to slip away + 'conditions': [ + # -force_load or --whole-archive are not applicable for + # the static library + [ 'node_target_type!="static_library"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)', + ], + }, + 'conditions': [ + ['OS in "linux freebsd" and node_shared=="false"', { + 'ldflags': [ + '-Wl,--whole-archive,' + '<(OBJ_DIR)/deps/openssl/' + '<(OPENSSL_PRODUCT)', + '-Wl,--no-whole-archive', + ], + }], + # openssl.def is based on zlib.def, zlib symbols + # are always exported. + ['use_openssl_def==1', { + 'sources': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'], + }], + ['OS=="win" and use_openssl_def==0', { + 'sources': ['deps/zlib/win32/zlib.def'], + }], + ], + }], + ], + }]] + }, { + 'defines': [ 'HAVE_OPENSSL=0' ] + }], + [ 'node_use_dtrace=="true"', { + 'defines': [ 'HAVE_DTRACE=1' ], + 'dependencies': [ + 'node_dtrace_header', + 'specialize_node_d', + ], + 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], + + # + # DTrace is supported on linux, solaris, mac, and bsd. There are + # three object files associated with DTrace support, but they're + # not all used all the time: + # + # node_dtrace.o all configurations + # node_dtrace_ustack.o not supported on mac and linux + # node_dtrace_provider.o All except OS X. "dtrace -G" is not + # used on OS X. + # + # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not + # actually exist. They're listed here to trick GYP into linking the + # corresponding object files into the final "node" executable. These + # object files are generated by "dtrace -G" using custom actions + # below, and the GYP-generated Makefiles will properly build them when + # needed. + # + 'sources': [ 'src/node_dtrace.cc' ], + 'conditions': [ + [ 'OS=="linux"', { + 'sources': [ + '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o' + ], + }], + [ 'OS!="mac" and OS!="linux"', { + 'sources': [ + 'src/node_dtrace_ustack.cc', + 'src/node_dtrace_provider.cc', + ] + } + ] ] + } ], + [ 'node_use_lttng=="true"', { + 'defines': [ 'HAVE_LTTNG=1' ], + 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], + 'libraries': [ '-llttng-ust' ], + 'sources': [ + 'src/node_lttng.cc' + ], + } ], + [ 'node_use_etw=="true"', { + 'defines': [ 'HAVE_ETW=1' ], + 'dependencies': [ 'node_etw' ], + 'sources': [ + 'src/node_win32_etw_provider.h', + 'src/node_win32_etw_provider-inl.h', + 'src/node_win32_etw_provider.cc', + 'src/node_dtrace.cc', + 'tools/msvs/genfiles/node_etw_provider.h', + 'tools/msvs/genfiles/node_etw_provider.rc', + ] + } ], + [ 'node_use_perfctr=="true"', { + 'defines': [ 'HAVE_PERFCTR=1' ], + 'dependencies': [ 'node_perfctr' ], + 'sources': [ + 'src/node_win32_perfctr_provider.h', + 'src/node_win32_perfctr_provider.cc', + 'src/node_counters.cc', + 'src/node_counters.h', + 'tools/msvs/genfiles/node_perfctr_provider.rc', + ] + } ], + [ 'node_no_browser_globals=="true"', { + 'defines': [ 'NODE_NO_BROWSER_GLOBALS' ], + } ], + [ 'node_use_bundled_v8=="true" and v8_postmortem_support=="true"', { + 'dependencies': [ 'deps/v8/src/v8.gyp:postmortem-metadata' ], + 'conditions': [ + # -force_load is not applicable for the static library + [ 'node_target_type!="static_library"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-force_load,<(V8_BASE)', + ], + }, + }], + ], + }], + [ 'node_shared_zlib=="false"', { + 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ], + }], + + [ 'node_shared_http_parser=="false"', { + 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ], + }], + + [ 'node_shared_cares=="false"', { + 'dependencies': [ 'deps/cares/cares.gyp:cares' ], + }], + + [ 'node_shared_libuv=="false"', { + 'dependencies': [ 'deps/uv/uv.gyp:libuv' ], + }], + + [ 'OS=="win"', { + 'sources': [ + 'src/backtrace_win32.cc', + 'src/res/node.rc', + ], + 'defines!': [ + 'NODE_PLATFORM="win"', + ], + 'defines': [ + 'FD_SETSIZE=1024', + # we need to use node's preferred "win32" rather than gyp's preferred "win" + 'NODE_PLATFORM="win32"', + '_UNICODE=1', + ], + 'libraries': [ '-lpsapi.lib' ] + }, { # POSIX + 'defines': [ '__POSIX__' ], + 'sources': [ 'src/backtrace_posix.cc' ], + }], + [ 'OS=="mac"', { + # linking Corefoundation is needed since certain OSX debugging tools + # like Instruments require it for some features + 'libraries': [ '-framework CoreFoundation' ], + 'defines!': [ + 'NODE_PLATFORM="mac"', + ], + 'defines': [ + # we need to use node's preferred "darwin" rather than gyp's preferred "mac" + 'NODE_PLATFORM="darwin"', + ], + }], + [ 'OS=="freebsd"', { + 'libraries': [ + '-lutil', + '-lkvm', + ], + }], + [ 'OS=="aix"', { + 'defines': [ + '_LINUX_SOURCE_COMPAT', + ], + }], + [ 'OS=="solaris"', { + 'libraries': [ + '-lkstat', + '-lumem', + ], + 'defines!': [ + 'NODE_PLATFORM="solaris"', + ], + 'defines': [ + # we need to use node's preferred "sunos" + # rather than gyp's preferred "solaris" + 'NODE_PLATFORM="sunos"', + ], + }], + [ '(OS=="freebsd" or OS=="linux") and node_shared=="false" and coverage=="false"', { + 'ldflags': [ '-Wl,-z,noexecstack', + '-Wl,--whole-archive <(V8_BASE)', + '-Wl,--no-whole-archive' ] + }], + [ '(OS=="freebsd" or OS=="linux") and node_shared=="false" and coverage=="true"', { + 'ldflags': [ '-Wl,-z,noexecstack', + '-Wl,--whole-archive <(V8_BASE)', + '-Wl,--no-whole-archive', + '--coverage', + '-g', + '-O0' ], + 'cflags': [ '--coverage', + '-g', + '-O0' ] + }], + [ 'OS=="sunos"', { + 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ], + }], + ], +} diff --git a/test/cctest/node_test_fixture.cc b/test/cctest/node_test_fixture.cc new file mode 100644 index 00000000000000..9fc8b96445063c --- /dev/null +++ b/test/cctest/node_test_fixture.cc @@ -0,0 +1,2 @@ +#include +#include "node_test_fixture.h" diff --git a/test/cctest/node_test_fixture.h b/test/cctest/node_test_fixture.h new file mode 100644 index 00000000000000..de79b186851e79 --- /dev/null +++ b/test/cctest/node_test_fixture.h @@ -0,0 +1,85 @@ +#ifndef TEST_CCTEST_NODE_TEST_FIXTURE_H_ +#define TEST_CCTEST_NODE_TEST_FIXTURE_H_ + +#include +#include "gtest/gtest.h" +#include "node.h" +#include "env.h" +#include "v8.h" +#include "libplatform/libplatform.h" + +using node::Environment; +using node::IsolateData; +using node::CreateIsolateData; +using node::CreateEnvironment; +using node::AtExit; +using node::RunAtExit; + +class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { + public: + virtual void* Allocate(size_t length) { + return AllocateUninitialized(length); + } + + virtual void* AllocateUninitialized(size_t length) { + return calloc(length, sizeof(int)); + } + + virtual void Free(void* data, size_t) { + free(data); + } +}; + +struct Argv { + public: + Argv(const char* prog, const char* arg1, const char* arg2) { + int prog_len = strlen(prog) + 1; + int arg1_len = strlen(arg1) + 1; + int arg2_len = strlen(arg2) + 1; + argv_ = static_cast(malloc(3 * sizeof(char*))); + argv_[0] = static_cast(malloc(prog_len + arg1_len + arg2_len)); + snprintf(argv_[0], prog_len, "%s", prog); + snprintf(argv_[0] + prog_len, arg1_len, "%s", arg1); + snprintf(argv_[0] + prog_len + arg1_len, arg2_len, "%s", arg2); + argv_[1] = argv_[0] + prog_len + 1; + argv_[2] = argv_[0] + prog_len + arg1_len + 1; + } + + ~Argv() { + free(argv_[0]); + free(argv_); + } + + char** operator *() const { + return argv_; + } + + private: + char** argv_; +}; + +class NodeTestFixture : public ::testing::Test { + protected: + v8::Isolate::CreateParams params_; + ArrayBufferAllocator allocator_; + v8::Isolate* isolate_; + + virtual void SetUp() { + platform_ = v8::platform::CreateDefaultPlatform(); + v8::V8::InitializePlatform(platform_); + v8::V8::Initialize(); + params_.array_buffer_allocator = &allocator_; + isolate_ = v8::Isolate::New(params_); + } + + virtual void TearDown() { + v8::V8::ShutdownPlatform(); + delete platform_; + platform_ = nullptr; + } + + private: + v8::Platform* platform_; +}; + +#endif // TEST_CCTEST_NODE_TEST_FIXTURE_H_ diff --git a/test/cctest/util.cc b/test/cctest/test_util.cc similarity index 99% rename from test/cctest/util.cc rename to test/cctest/test_util.cc index a6ece3c6f4d377..db19d92cbd9c19 100644 --- a/test/cctest/util.cc +++ b/test/cctest/test_util.cc @@ -90,10 +90,6 @@ TEST(UtilTest, ToLower) { EXPECT_EQ('a', ToLower('A')); } -namespace node { - void LowMemoryNotification() {} -} - #define TEST_AND_FREE(expression) \ do { \ auto pointer = expression; \ diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py index 39373b9844e49e..d9adddaa9b5127 100644 --- a/tools/gyp/pylib/gyp/generator/make.py +++ b/tools/gyp/pylib/gyp/generator/make.py @@ -147,7 +147,7 @@ def CalculateGeneratorInputInfo(params): # special "figure out circular dependencies" flags around the entire # input list during linking. quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) +cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group # We support two kinds of shared objects (.so): # 1) shared_library, which is just bundling together many dependent libraries From 64af398c263105653dd0ba255a078c305b28e1e9 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 24 Mar 2017 15:45:46 +0100 Subject: [PATCH 207/485] doc: c++ unit test guide lines PR-URL: https://github.com/nodejs/node/pull/11956 Ref: https://github.com/nodejs/node/pull/9163 Reviewed-By: James M Snell --- doc/guides/writing-tests.md | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index 4f226bfdb2580c..d0a6e1a1995ebb 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -279,3 +279,65 @@ If you want to improve tests that have been imported this way, please send a PR to the upstream project first. When your proposed change is merged in the upstream project, send another PR here to update Node.js accordingly. Be sure to update the hash in the URL following `WPT Refs:`. + +## C++ Unit test +C++ code can be tested using [Google Test][]. Most features in Node.js can be +tested using the methods described previously in this document. But there are +cases where these might not be enough, for example writing code for Node.js +that will only be called when Node.js is embedded. + +### Adding a new test +The unit test should be placed in `test/cctest` and be named with the prefix +`test` followed by the name of unit being tested. For example, the code below +would be placed in `test/cctest/test_env.cc`: + +```c++ +#include "gtest/gtest.h" +#include "node_test_fixture.h" +#include "env.h" +#include "node.h" +#include "v8.h" + +static bool called_cb = false; +static void at_exit_callback(void* arg); + +class EnvTest : public NodeTestFixture { }; + +TEST_F(EnvTest, RunAtExit) { + v8::HandleScope handle_scope(isolate_); + v8::Local context = v8::Context::New(isolate_); + node::IsolateData* isolateData = node::CreateIsolateData(isolate_, uv_default_loop()); + Argv argv{"node", "-e", ";"}; + auto env = Environment:CreateEnvironment(isolateData, context, 1, *argv, 2, *argv); + node::AtExit(at_exit_callback); + node::RunAtExit(env); + EXPECT_TRUE(called_cb); +} + +static void at_exit_callback(void* arg) { + called_cb = true; +} +``` + +Next add the test to the `sources` in the `cctest` target in node.gyp: +``` +'sources': [ + 'test/cctest/test_env.cc', + ... +], +``` +The test can be executed by running the `cctest` target: +``` +$ make cctest +``` + +### Node test fixture +There is a [test fixture] named `node_test_fixture.h` which can be included by +unit tests. The fixture takes care of setting up the Node.js environment +and tearing it down after the tests have finished. + +It also contains a helper to create arguments to be passed into Node.js. It +will depend on what is being tested if this is required or not. + +[Google Test]: https://github.com/google/googletest +[Test fixture]: https://github.com/google/googletest/blob/master/googletest/docs/Primer.md#test-fixtures-using-the-same-data-configuration-for-multiple-tests From 4929d12e999aaab08b0ed90e8a6080e139ca62d1 Mon Sep 17 00:00:00 2001 From: DavidCai Date: Wed, 22 Mar 2017 22:08:02 +0800 Subject: [PATCH 208/485] test: add internal/socket_list tests PR-URL: https://github.com/nodejs/node/pull/11989 Reviewed-By: James M Snell --- .../test-internal-socket-list-receive.js | 67 ++++++++++ .../test-internal-socket-list-send.js | 114 ++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 test/parallel/test-internal-socket-list-receive.js create mode 100644 test/parallel/test-internal-socket-list-send.js diff --git a/test/parallel/test-internal-socket-list-receive.js b/test/parallel/test-internal-socket-list-receive.js new file mode 100644 index 00000000000000..5315adbfd45ba5 --- /dev/null +++ b/test/parallel/test-internal-socket-list-receive.js @@ -0,0 +1,67 @@ +// Flags: --expose-internals +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const EventEmitter = require('events'); +const SocketListReceive = require('internal/socket_list').SocketListReceive; + +const key = 'test-key'; + +// Verify that the message won't be sent when child is not connected. +{ + const child = Object.assign(new EventEmitter(), { + connected: false, + send: common.mustNotCall() + }); + + const list = new SocketListReceive(child, key); + list.child.emit('internalMessage', { key, cmd: 'NODE_SOCKET_NOTIFY_CLOSE' }); +} + +// Verify that a "NODE_SOCKET_ALL_CLOSED" message will be sent. +{ + const child = Object.assign(new EventEmitter(), { + connected: true, + send: common.mustCall((msg) => { + assert.strictEqual(msg.cmd, 'NODE_SOCKET_ALL_CLOSED'); + assert.strictEqual(msg.key, key); + }) + }); + + const list = new SocketListReceive(child, key); + list.child.emit('internalMessage', { key, cmd: 'NODE_SOCKET_NOTIFY_CLOSE' }); +} + +// Verify that a "NODE_SOCKET_COUNT" message will be sent. +{ + const child = Object.assign(new EventEmitter(), { + connected: true, + send: common.mustCall((msg) => { + assert.strictEqual(msg.cmd, 'NODE_SOCKET_COUNT'); + assert.strictEqual(msg.key, key); + assert.strictEqual(msg.count, 0); + }) + }); + + const list = new SocketListReceive(child, key); + list.child.emit('internalMessage', { key, cmd: 'NODE_SOCKET_GET_COUNT' }); +} + +// Verify that the connections count is added and an "empty" event +// will be emitted when all sockets in obj were closed. +{ + const child = new EventEmitter(); + const obj = { socket: new EventEmitter() }; + + const list = new SocketListReceive(child, key); + assert.strictEqual(list.connections, 0); + + list.add(obj); + assert.strictEqual(list.connections, 1); + + list.on('empty', common.mustCall((self) => assert.strictEqual(self, list))); + + obj.socket.emit('close'); + assert.strictEqual(list.connections, 0); +} diff --git a/test/parallel/test-internal-socket-list-send.js b/test/parallel/test-internal-socket-list-send.js new file mode 100644 index 00000000000000..a5020a431c3459 --- /dev/null +++ b/test/parallel/test-internal-socket-list-send.js @@ -0,0 +1,114 @@ +// Flags: --expose-internals +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const EventEmitter = require('events'); +const SocketListSend = require('internal/socket_list').SocketListSend; + +const key = 'test-key'; + +// Verify that an error will be received in callback when child is not +// connected. +{ + const child = Object.assign(new EventEmitter(), { connected: false }); + assert.strictEqual(child.listenerCount('internalMessage'), 0); + + const list = new SocketListSend(child, 'test'); + + list._request('msg', 'cmd', common.mustCall((err) => { + assert.strictEqual(err.message, 'child closed before reply'); + assert.strictEqual(child.listenerCount('internalMessage'), 0); + })); +} + +// Verify that the given message will be received in callback. +{ + const child = Object.assign(new EventEmitter(), { + connected: true, + send: function(msg) { + process.nextTick(() => + this.emit('internalMessage', { key, cmd: 'cmd' }) + ); + } + }); + + const list = new SocketListSend(child, key); + + list._request('msg', 'cmd', common.mustCall((err, msg) => { + assert.strictEqual(err, null); + assert.strictEqual(msg.cmd, 'cmd'); + assert.strictEqual(msg.key, key); + assert.strictEqual(child.listenerCount('internalMessage'), 0); + assert.strictEqual(child.listenerCount('disconnect'), 0); + })); +} + +// Verify that an error will be received in callback when child was +// disconnected. +{ + const child = Object.assign(new EventEmitter(), { + connected: true, + send: function(msg) { process.nextTick(() => this.emit('disconnect')); } + }); + + const list = new SocketListSend(child, key); + + list._request('msg', 'cmd', common.mustCall((err) => { + assert.strictEqual(err.message, 'child closed before reply'); + assert.strictEqual(child.listenerCount('internalMessage'), 0); + })); +} + +// Verify that a "NODE_SOCKET_ALL_CLOSED" message will be received +// in callback. +{ + const child = Object.assign(new EventEmitter(), { + connected: true, + send: function(msg) { + assert.strictEqual(msg.cmd, 'NODE_SOCKET_NOTIFY_CLOSE'); + assert.strictEqual(msg.key, key); + process.nextTick(() => + this.emit('internalMessage', { key, cmd: 'NODE_SOCKET_ALL_CLOSED' }) + ); + } + }); + + const list = new SocketListSend(child, key); + + list.close(common.mustCall((err, msg) => { + assert.strictEqual(err, null); + assert.strictEqual(msg.cmd, 'NODE_SOCKET_ALL_CLOSED'); + assert.strictEqual(msg.key, key); + assert.strictEqual(child.listenerCount('internalMessage'), 0); + assert.strictEqual(child.listenerCount('disconnect'), 0); + })); +} + +// Verify that the count of connections will be received in callback. +{ + const count = 1; + const child = Object.assign(new EventEmitter(), { + connected: true, + send: function(msg) { + assert.strictEqual(msg.cmd, 'NODE_SOCKET_GET_COUNT'); + assert.strictEqual(msg.key, key); + process.nextTick(() => + this.emit('internalMessage', { + key, + count, + cmd: 'NODE_SOCKET_COUNT' + }) + ); + } + }); + + const list = new SocketListSend(child, key); + + list.getConnections(common.mustCall((err, msg) => { + assert.strictEqual(err, null); + assert.strictEqual(msg, count); + assert.strictEqual(child.listenerCount('internalMessage'), 0); + assert.strictEqual(child.listenerCount('disconnect'), 0); + })); +} From e40ac30e05be0f086e7a0dba18435af3f6386a0f Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 22 Mar 2017 07:33:31 +0100 Subject: [PATCH 209/485] doc: document extent of crypto Uint8Array support PR-URL: https://github.com/nodejs/node/pull/11982 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- doc/api/crypto.md | 116 ++++++++++++++++++++++++---------------------- 1 file changed, 60 insertions(+), 56 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 9557273a9b7b5a..077c244c431d03 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -62,7 +62,7 @@ const cert2 = crypto.Certificate(); -- `spkac` {string | Buffer} +- `spkac` {string | Buffer | Uint8Array} - Returns {Buffer} The challenge component of the `spkac` data structure, which includes a public key and a challenge. @@ -78,7 +78,7 @@ console.log(challenge.toString('utf8')); -- `spkac` {string | Buffer} +- `spkac` {string | Buffer | Uint8Array} - Returns {Buffer} The public key component of the `spkac` data structure, which includes a public key and a challenge. @@ -94,7 +94,7 @@ console.log(publicKey); -- `spkac` {Buffer} +- `spkac` {Buffer | Uint8Array} - Returns {boolean} `true` if the given `spkac` data structure is valid, `false` otherwise. @@ -234,15 +234,15 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> -- `data` {string | Buffer} +- `data` {string | Buffer | Uint8Array} - `input_encoding` {string} - `output_encoding` {string} Updates the cipher with `data`. If the `input_encoding` argument is given, its value must be one of `'utf8'`, `'ascii'`, or `'latin1'` and the `data` argument is a string using the specified encoding. If the `input_encoding` -argument is not given, `data` must be a [`Buffer`][]. If `data` is a -[`Buffer`][] then `input_encoding` is ignored. +argument is not given, `data` must be a [`Buffer`][] or `Uint8Array`. +If `data` is a [`Buffer`][] or `Uint8Array`, then `input_encoding` is ignored. The `output_encoding` specifies the output format of the enciphered data, and can be `'latin1'`, `'base64'` or `'hex'`. If the `output_encoding` @@ -340,7 +340,7 @@ changes: pr-url: https://github.com/nodejs/node/pull/9398 description: This method now returns a reference to `decipher`. --> -- `buffer` {Buffer} +- `buffer` {Buffer | Uint8Array} - Returns the {Cipher} for method chaining. When using an authenticated encryption mode (only `GCM` is currently @@ -357,7 +357,7 @@ changes: pr-url: https://github.com/nodejs/node/pull/9398 description: This method now returns a reference to `decipher`. --> -- `buffer` {Buffer} +- `buffer` {Buffer | Uint8Array} - Returns the {Cipher} for method chaining. When using an authenticated encryption mode (only `GCM` is currently @@ -394,7 +394,7 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> -- `data` {string | Buffer} +- `data` {string | Buffer | Uint8Array} - `input_encoding` {string} - `output_encoding` {string} @@ -448,7 +448,7 @@ assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); -- `other_public_key` {string | Buffer} +- `other_public_key` {string | Buffer | Uint8Array} - `input_encoding` {string} - `output_encoding` {string} @@ -457,7 +457,7 @@ party's public key and returns the computed shared secret. The supplied key is interpreted using the specified `input_encoding`, and secret is encoded using specified `output_encoding`. Encodings can be `'latin1'`, `'hex'`, or `'base64'`. If the `input_encoding` is not -provided, `other_public_key` is expected to be a [`Buffer`][]. +provided, `other_public_key` is expected to be a [`Buffer`][] or `Uint8Array`. If `output_encoding` is given a string is returned; otherwise, a [`Buffer`][] is returned. @@ -518,25 +518,25 @@ string is returned; otherwise a [`Buffer`][] is returned. -- `private_key` {string | Buffer} +- `private_key` {string | Buffer | Uint8Array} - `encoding` {string} Sets the Diffie-Hellman private key. If the `encoding` argument is provided and is either `'latin1'`, `'hex'`, or `'base64'`, `private_key` is expected to be a string. If no `encoding` is provided, `private_key` is expected -to be a [`Buffer`][]. +to be a [`Buffer`][] or `Uint8Array`. ### diffieHellman.setPublicKey(public_key[, encoding]) -- `public_key` {string | Buffer} +- `public_key` {string | Buffer | Uint8Array} - `encoding` {string} Sets the Diffie-Hellman public key. If the `encoding` argument is provided and is either `'latin1'`, `'hex'` or `'base64'`, `public_key` is expected to be a string. If no `encoding` is provided, `public_key` is expected -to be a [`Buffer`][]. +to be a [`Buffer`][] or `Uint8Array`. ### diffieHellman.verifyError -- `other_public_key` {string | Buffer} +- `other_public_key` {string | Buffer | Uint8Array} - `input_encoding` {string} - `output_encoding` {string} @@ -602,7 +602,7 @@ party's public key and returns the computed shared secret. The supplied key is interpreted using specified `input_encoding`, and the returned secret is encoded using the specified `output_encoding`. Encodings can be `'latin1'`, `'hex'`, or `'base64'`. If the `input_encoding` is not -provided, `other_public_key` is expected to be a [`Buffer`][]. +provided, `other_public_key` is expected to be a [`Buffer`][] or `Uint8Array`. If `output_encoding` is given a string will be returned; otherwise a [`Buffer`][] is returned. @@ -658,13 +658,14 @@ returned. -- `private_key` {string | Buffer} +- `private_key` {string | Buffer | Uint8Array} - `encoding` {string} Sets the EC Diffie-Hellman private key. The `encoding` can be `'latin1'`, `'hex'` or `'base64'`. If `encoding` is provided, `private_key` is expected -to be a string; otherwise `private_key` is expected to be a [`Buffer`][]. If -`private_key` is not valid for the curve specified when the `ECDH` object was +to be a string; otherwise `private_key` is expected to be a [`Buffer`][] +or `Uint8Array`. +If `private_key` is not valid for the curve specified when the `ECDH` object was created, an error is thrown. Upon setting the private key, the associated public point (key) is also generated and set in the ECDH object. @@ -676,12 +677,12 @@ deprecated: v5.2.0 > Stability: 0 - Deprecated -- `public_key` {string | Buffer} +- `public_key` {string | Buffer | Uint8Array} - `encoding` {string} Sets the EC Diffie-Hellman public key. Key encoding can be `'latin1'`, `'hex'` or `'base64'`. If `encoding` is provided `public_key` is expected to -be a string; otherwise a [`Buffer`][] is expected. +be a string; otherwise a [`Buffer`][] or `Uint8Array` is expected. Note that there is not normally a reason to call this method because `ECDH` only requires a private key and the other party's public key to compute the @@ -794,14 +795,14 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> -- `data` {string | Buffer} +- `data` {string | Buffer | Uint8Array} - `input_encoding` {string} Updates the hash content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or `'latin1'`. If `encoding` is not provided, and the `data` is a string, an -encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] then -`input_encoding` is ignored. +encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] or `Uint8Array` +then `input_encoding` is ignored. This can be called many times with new data as it is streamed. @@ -883,14 +884,14 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> -- `data` {string | Buffer} +- `data` {string | Buffer | Uint8Array} - `input_encoding` {string} Updates the `Hmac` content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or `'latin1'`. If `encoding` is not provided, and the `data` is a string, an -encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] then -`input_encoding` is ignored. +encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] or `Uint8Array` +then `input_encoding` is ignored. This can be called many times with new data as it is streamed. @@ -994,14 +995,14 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> -- `data` {string | Buffer} +- `data` {string | Buffer | Uint8Array} - `input_encoding` {string} Updates the `Sign` content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or `'latin1'`. If `encoding` is not provided, and the `data` is a string, an -encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] then -`input_encoding` is ignored. +encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] or `Uint8Array` +then `input_encoding` is ignored. This can be called many times with new data as it is streamed. @@ -1058,14 +1059,14 @@ changes: pr-url: https://github.com/nodejs/node/pull/5522 description: The default `input_encoding` changed from `binary` to `utf8`. --> -- `data` {string | Buffer} +- `data` {string | Buffer | Uint8Array} - `input_encoding` {string} Updates the `Verify` content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or `'latin1'`. If `encoding` is not provided, and the `data` is a string, an -encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] then -`input_encoding` is ignored. +encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] or `Uint8Array` +then `input_encoding` is ignored. This can be called many times with new data as it is streamed. @@ -1074,7 +1075,7 @@ This can be called many times with new data as it is streamed. added: v0.1.92 --> - `object` {string} -- `signature` {string | Buffer} +- `signature` {string | Buffer | Uint8Array} - `signature_format` {string} Verifies the provided data using the given `object` and `signature`. @@ -1083,7 +1084,8 @@ an RSA public key, a DSA public key, or an X.509 certificate. The `signature` argument is the previously calculated signature for the data, in the `signature_format` which can be `'latin1'`, `'hex'` or `'base64'`. If a `signature_format` is specified, the `signature` is expected to be a -string; otherwise `signature` is expected to be a [`Buffer`][]. +string; otherwise `signature` is expected to be a [`Buffer`][] or +`Uint8Array`. Returns `true` or `false` depending on the validity of the signature for the data and public key. @@ -1131,7 +1133,7 @@ currently in use. Setting to true requires a FIPS build of Node.js. added: v0.1.94 --> - `algorithm` {string} -- `password` {string | Buffer} +- `password` {string | Buffer | Uint8Array} Creates and returns a `Cipher` object that uses the given `algorithm` and `password`. @@ -1141,7 +1143,8 @@ recent OpenSSL releases, `openssl list-cipher-algorithms` will display the available cipher algorithms. The `password` is used to derive the cipher key and initialization vector (IV). -The value must be either a `'latin1'` encoded string or a [`Buffer`][]. +The value must be either a `'latin1'` encoded string, a [`Buffer`][] or a +`Uint8Array`. The implementation of `crypto.createCipher()` derives keys using the OpenSSL function [`EVP_BytesToKey`][] with the digest algorithm set to MD5, one @@ -1157,8 +1160,8 @@ to create the `Cipher` object. ### crypto.createCipheriv(algorithm, key, iv) - `algorithm` {string} -- `key` {string | Buffer} -- `iv` {string | Buffer} +- `key` {string | Buffer | Uint8Array} +- `iv` {string | Buffer | Uint8Array} Creates and returns a `Cipher` object, with the given `algorithm`, `key` and initialization vector (`iv`). @@ -1168,8 +1171,8 @@ recent OpenSSL releases, `openssl list-cipher-algorithms` will display the available cipher algorithms. The `key` is the raw key used by the `algorithm` and `iv` is an -[initialization vector][]. Both arguments must be `'utf8'` encoded strings or -[buffers][`Buffer`]. +[initialization vector][]. Both arguments must be `'utf8'` encoded strings, +[Buffers][`Buffer`] or `Uint8Array`s. ### crypto.createCredentials(details) - `algorithm` {string} -- `password` {string | Buffer} +- `password` {string | Buffer | Uint8Array} Creates and returns a `Decipher` object that uses the given `algorithm` and `password` (key). @@ -1216,8 +1219,8 @@ to create the `Decipher` object. added: v0.1.94 --> - `algorithm` {string} -- `key` {string | Buffer} -- `iv` {string | Buffer} +- `key` {string | Buffer | Uint8Array} +- `iv` {string | Buffer | Uint8Array} Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`). @@ -1241,7 +1244,7 @@ changes: --> - `prime` {string | Buffer} - `prime_encoding` {string} -- `generator` {number | string | Buffer} Defaults to `2`. +- `generator` {number | string | Buffer | Uint8Array} Defaults to `2`. - `generator_encoding` {string} Creates a `DiffieHellman` key exchange object using the supplied `prime` and an @@ -1257,14 +1260,14 @@ If `prime_encoding` is specified, `prime` is expected to be a string; otherwise a [`Buffer`][] is expected. If `generator_encoding` is specified, `generator` is expected to be a string; -otherwise either a number or [`Buffer`][] is expected. +otherwise either a number or [`Buffer`][] or `Uint8Array` is expected. ### crypto.createDiffieHellman(prime_length[, generator]) - `prime_length` {number} -- `generator` {number | string | Buffer} Defaults to `2`. +- `generator` {number | string | Buffer | Uint8Array} Defaults to `2`. Creates a `DiffieHellman` key exchange object and generates a prime of `prime_length` bits using an optional specific numeric `generator`. @@ -1321,7 +1324,7 @@ input.on('readable', () => { added: v0.1.94 --> - `algorithm` {string} -- `key` {string | Buffer} +- `key` {string | Buffer | Uint8Array} Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. @@ -1560,7 +1563,7 @@ added: v0.11.14 - `padding` {crypto.constants} An optional padding value defined in `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`, `RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`. -- `buffer` {Buffer} +- `buffer` {Buffer | Uint8Array} Decrypts `buffer` with `private_key`. @@ -1577,7 +1580,7 @@ added: v1.1.0 - `padding` {crypto.constants} An optional padding value defined in `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or `RSA_PKCS1_PADDING`. -- `buffer` {Buffer} +- `buffer` {Buffer | Uint8Array} Encrypts `buffer` with `private_key`. @@ -1594,7 +1597,7 @@ added: v1.1.0 - `padding` {crypto.constants} An optional padding value defined in `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`, `RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`. -- `buffer` {Buffer} +- `buffer` {Buffer | Uint8Array} Decrypts `buffer` with `public_key`. @@ -1614,7 +1617,7 @@ added: v0.11.14 - `padding` {crypto.constants} An optional padding value defined in `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`, `RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`. -- `buffer` {Buffer} +- `buffer` {Buffer | Uint8Array} Encrypts `buffer` with `public_key`. @@ -1699,15 +1702,16 @@ is a bit field taking one of or a mix of the following flags (defined in -- `a` {Buffer} -- `b` {Buffer} +- `a` {Buffer | Uint8Array} +- `b` {Buffer | Uint8Array} Returns true if `a` is equal to `b`, without leaking timing information that would allow an attacker to guess one of the values. This is suitable for comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). -`a` and `b` must both be `Buffer`s, and they must have the same length. +`a` and `b` must both be `Buffer`s or `Uint8Array`s, and they must have the +same length. **Note**: Use of `crypto.timingSafeEqual` does not guarantee that the *surrounding* code is timing-safe. Care should be taken to ensure that the From abb0bdd53fa6d831de43119fb1d5560afc495677 Mon Sep 17 00:00:00 2001 From: Yuta Hiroto Date: Thu, 23 Mar 2017 10:57:26 +0900 Subject: [PATCH 210/485] test: add test for url PR-URL: https://github.com/nodejs/node/pull/11999 Reviewed-By: James M Snell Reviewed-By: Joyee Cheung Reviewed-By: Prince John Wesley --- test/parallel/test-url-relative.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-url-relative.js b/test/parallel/test-url-relative.js index cf379e591d6088..f40981de62201e 100644 --- a/test/parallel/test-url-relative.js +++ b/test/parallel/test-url-relative.js @@ -4,6 +4,9 @@ const assert = require('assert'); const inspect = require('util').inspect; const url = require('url'); +// when source is false +assert.strictEqual(url.resolveObject('', 'foo'), 'foo'); + /* [from, path, expected] */ From 0d000ca51f4c274a4786f28019032eca9b74146f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 21 Mar 2017 17:07:23 -0700 Subject: [PATCH 211/485] test: add minimal test for net benchmarks Currently, benchmark code is not exercised at all in CI. This adds a minimal test for net benchmarks. If this is deemed acceptable, similar minimal tests for other benchmarks can be written. Additionally, as issues and edge cases are uncovered, checks for them can be added. PR-URL: https://github.com/nodejs/node/pull/11979 Reviewed-By: James M Snell Reviewed-By: Joyee Cheung --- test/sequential/test-benchmark-net.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/sequential/test-benchmark-net.js diff --git a/test/sequential/test-benchmark-net.js b/test/sequential/test-benchmark-net.js new file mode 100644 index 00000000000000..4bb91451e9b254 --- /dev/null +++ b/test/sequential/test-benchmark-net.js @@ -0,0 +1,22 @@ +'use strict'; + +require('../common'); + +// Minimal test for net benchmarks. This makes sure the benchmarks aren't +// horribly broken but nothing more than that. + +// Because the net benchmarks use hardcoded ports, this should be in sequential +// rather than parallel to make sure it does not conflict with tests that choose +// random available ports. + +const assert = require('assert'); +const fork = require('child_process').fork; +const path = require('path'); + +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); + +const child = fork(runjs, ['--set', 'dur=0', 'net']); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +}); From 89d9c3f4a7a552caccf98ea52e4800472bff68ef Mon Sep 17 00:00:00 2001 From: Nick Peleh Date: Tue, 21 Mar 2017 19:50:05 +0200 Subject: [PATCH 212/485] test: improve test-vm-cached-data.js * verify error message by adding 2nd argument to throws in test-assert PR-URL: https://github.com/nodejs/node/pull/11974 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Daijiro Wachi Reviewed-By: Luigi Pinca --- test/parallel/test-vm-cached-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-vm-cached-data.js b/test/parallel/test-vm-cached-data.js index 3f74f398b814ca..a09a41fe986012 100644 --- a/test/parallel/test-vm-cached-data.js +++ b/test/parallel/test-vm-cached-data.js @@ -89,4 +89,4 @@ assert.throws(() => { new vm.Script('function abc() {}', { cachedData: 'ohai' }); -}); +}, /^TypeError: options.cachedData must be a Buffer instance$/); From 30f1e8ea041c97370534b9d26eef8f25da18a75c Mon Sep 17 00:00:00 2001 From: Luca Maraschi Date: Tue, 21 Mar 2017 15:47:25 +0100 Subject: [PATCH 213/485] test: invalid chars in http client path This test adds coverage for all the characters which are considered invalid in a http path. PR-URL: https://github.com/nodejs/node/pull/11964 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-http-invalid-path-chars.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/parallel/test-http-invalid-path-chars.js diff --git a/test/parallel/test-http-invalid-path-chars.js b/test/parallel/test-http-invalid-path-chars.js new file mode 100644 index 00000000000000..462e0bc12a0a3f --- /dev/null +++ b/test/parallel/test-http-invalid-path-chars.js @@ -0,0 +1,20 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const expectedError = /^TypeError: Request path contains unescaped characters$/; +const theExperimentallyDeterminedNumber = 39; + +function fail(path) { + assert.throws(() => { + http.request({ path }, common.fail); + }, expectedError); +} + +for (let i = 0; i <= theExperimentallyDeterminedNumber; i++) { + const prefix = 'a'.repeat(i); + for (let i = 0; i <= 32; i++) { + fail(prefix + String.fromCodePoint(i)); + } +} From 9ff7ed23cd822dc810ddd99d63d4e2ca68635474 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 21 Mar 2017 11:30:59 +0100 Subject: [PATCH 214/485] lib: fix event race condition with -e Commit c5b07d4 ("lib: fix beforeExit not working with -e") runs the to-be-evaluated code at a later time than before because it switches from `process.nextTick()` to `setImmediate()`. It affects `-e 'process.on("message", ...)'` because there is now a larger time gap between startup and attaching the event listener, increasing the chances of missing early messages. I'm reasonably sure `process.nextTick()` was also susceptible to that, only less pronounced. Avoid the problem altogether by evaluating the code synchronously. Harmonizes the logic with `Module.runMain()` from lib/module.js which also calls `process._tickCallback()` afterwards. PR-URL: https://github.com/nodejs/node/pull/11958 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel Reviewed-By: Michael Dawson Reviewed-By: Daijiro Wachi --- lib/internal/bootstrap_node.js | 10 ++----- test/message/eval_messages.out | 53 ++++++++++++++++++--------------- test/message/stdin_messages.out | 37 +++++++++++++---------- test/parallel/test-cli-eval.js | 19 ++++++++++++ 4 files changed, 72 insertions(+), 47 deletions(-) diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js index f29f7a647a4bd3..51b7f928cb25ec 100644 --- a/lib/internal/bootstrap_node.js +++ b/lib/internal/bootstrap_node.js @@ -400,13 +400,9 @@ 'return require("vm").runInThisContext(' + `${JSON.stringify(body)}, { filename: ` + `${JSON.stringify(name)}, displayErrors: true });\n`; - // Defer evaluation for a tick. This is a workaround for deferred - // events not firing when evaluating scripts from the command line, - // see https://github.com/nodejs/node/issues/1600. - setImmediate(function() { - const result = module._compile(script, `${name}-wrapper`); - if (process._print_eval) console.log(result); - }); + const result = module._compile(script, `${name}-wrapper`); + if (process._print_eval) console.log(result); + process._tickCallback(); } // Load preload modules diff --git a/test/message/eval_messages.out b/test/message/eval_messages.out index ba0c35431c6907..340e760dc696b7 100644 --- a/test/message/eval_messages.out +++ b/test/message/eval_messages.out @@ -3,14 +3,15 @@ with(this){__filename} ^^^^ SyntaxError: Strict mode code may not include a with statement - at createScript (vm.js:*) - at Object.runInThisContext (vm.js:*) + at createScript (vm.js:*:*) + at Object.runInThisContext (vm.js:*:*) at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at Immediate. (bootstrap_node.js:*:*) - at runCallback (timers.js:*:*) - at tryOnImmediate (timers.js:*:*) - at processImmediate [as _immediateCallback] (timers.js:*:*) + at evalScript (bootstrap_node.js:*:*) + at run (bootstrap_node.js:*:*) + at run (bootstrap_node.js:*:*) + at startup (bootstrap_node.js:*:*) + at bootstrap_node.js:*:* 42 42 [eval]:1 @@ -19,28 +20,31 @@ throw new Error("hello") Error: hello at [eval]:1:7 - at ContextifyScript.Script.runInThisContext (vm.js:*) - at Object.runInThisContext (vm.js:*) + at ContextifyScript.Script.runInThisContext (vm.js:*:*) + at Object.runInThisContext (vm.js:*:*) at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at Immediate. (bootstrap_node.js:*:*) - at runCallback (timers.js:*:*) - at tryOnImmediate (timers.js:*:*) - at processImmediate [as _immediateCallback] (timers.js:*:*) + at evalScript (bootstrap_node.js:*:*) + at run (bootstrap_node.js:*:*) + at run (bootstrap_node.js:*:*) + at startup (bootstrap_node.js:*:*) + at bootstrap_node.js:*:* + [eval]:1 throw new Error("hello") ^ Error: hello at [eval]:1:7 - at ContextifyScript.Script.runInThisContext (vm.js:*) - at Object.runInThisContext (vm.js:*) + at ContextifyScript.Script.runInThisContext (vm.js:*:*) + at Object.runInThisContext (vm.js:*:*) at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at Immediate. (bootstrap_node.js:*:*) - at runCallback (timers.js:*:*) - at tryOnImmediate (timers.js:*:*) - at processImmediate [as _immediateCallback] (timers.js:*:*) + at evalScript (bootstrap_node.js:*:*) + at run (bootstrap_node.js:*:*) + at run (bootstrap_node.js:*:*) + at startup (bootstrap_node.js:*:*) + at bootstrap_node.js:*:* 100 [eval]:1 var x = 100; y = x; @@ -48,14 +52,15 @@ var x = 100; y = x; ReferenceError: y is not defined at [eval]:1:16 - at ContextifyScript.Script.runInThisContext (vm.js:*) - at Object.runInThisContext (vm.js:*) + at ContextifyScript.Script.runInThisContext (vm.js:*:*) + at Object.runInThisContext (vm.js:*:*) at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at Immediate. (bootstrap_node.js:*:*) - at runCallback (timers.js:*:*) - at tryOnImmediate (timers.js:*:*) - at processImmediate [as _immediateCallback] (timers.js:*:*) + at evalScript (bootstrap_node.js:*:*) + at run (bootstrap_node.js:*:*) + at run (bootstrap_node.js:*:*) + at startup (bootstrap_node.js:*:*) + at bootstrap_node.js:*:* [eval]:1 var ______________________________________________; throw 10 diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out index b4c51d7ad567f0..ad1688f15d09b8 100644 --- a/test/message/stdin_messages.out +++ b/test/message/stdin_messages.out @@ -7,10 +7,12 @@ SyntaxError: Strict mode code may not include a with statement at Object.runInThisContext (vm.js:*) at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at Immediate. (bootstrap_node.js:*:*) - at runCallback (timers.js:*:*) - at tryOnImmediate (timers.js:*:*) - at processImmediate [as _immediateCallback] (timers.js:*:*) + at evalScript (bootstrap_node.js:*:*) + at Socket. (bootstrap_node.js:*:*) + at emitNone (events.js:*:*) + at Socket.emit (events.js:*:*) + at endReadableNT (_stream_readable.js:*:*) + at _combinedTickCallback (internal/process/next_tick.js:*:*) 42 42 [stdin]:1 @@ -23,10 +25,11 @@ Error: hello at Object.runInThisContext (vm.js:*) at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at Immediate. (bootstrap_node.js:*:*) - at runCallback (timers.js:*:*) - at tryOnImmediate (timers.js:*:*) - at processImmediate [as _immediateCallback] (timers.js:*:*) + at evalScript (bootstrap_node.js:*:*) + at Socket. (bootstrap_node.js:*:*) + at emitNone (events.js:*:*) + at Socket.emit (events.js:*:*) + at endReadableNT (_stream_readable.js:*:*) [stdin]:1 throw new Error("hello") ^ @@ -37,10 +40,11 @@ Error: hello at Object.runInThisContext (vm.js:*) at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at Immediate. (bootstrap_node.js:*:*) - at runCallback (timers.js:*:*) - at tryOnImmediate (timers.js:*:*) - at processImmediate [as _immediateCallback] (timers.js:*:*) + at evalScript (bootstrap_node.js:*:*) + at Socket. (bootstrap_node.js:*:*) + at emitNone (events.js:*:*) + at Socket.emit (events.js:*:*) + at endReadableNT (_stream_readable.js:*:*) 100 [stdin]:1 var x = 100; y = x; @@ -52,10 +56,11 @@ ReferenceError: y is not defined at Object.runInThisContext (vm.js:*) at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at Immediate. (bootstrap_node.js:*:*) - at runCallback (timers.js:*:*) - at tryOnImmediate (timers.js:*:*) - at processImmediate [as _immediateCallback] (timers.js:*:*) + at evalScript (bootstrap_node.js:*:*) + at Socket. (bootstrap_node.js:*:*) + at emitNone (events.js:*:*) + at Socket.emit (events.js:*:*) + at endReadableNT (_stream_readable.js:*:*) [stdin]:1 var ______________________________________________; throw 10 diff --git a/test/parallel/test-cli-eval.js b/test/parallel/test-cli-eval.js index 6d21b5d50be83c..34681bd235c743 100644 --- a/test/parallel/test-cli-eval.js +++ b/test/parallel/test-cli-eval.js @@ -171,6 +171,25 @@ child.exec(`${nodejs} --use-strict -p process.execArgv`, assert.strictEqual(proc.stdout, 'start\nbeforeExit\nexit\n'); } +// Regression test for https://github.com/nodejs/node/issues/11948. +{ + const script = ` + process.on('message', (message) => { + if (message === 'ping') process.send('pong'); + if (message === 'exit') process.disconnect(); + }); + `; + const proc = child.fork('-e', [script]); + proc.on('exit', common.mustCall((exitCode, signalCode) => { + assert.strictEqual(exitCode, 0); + assert.strictEqual(signalCode, null); + })); + proc.on('message', (message) => { + if (message === 'pong') proc.send('exit'); + }); + proc.send('ping'); +} + [ '-arg1', '-arg1 arg2 --arg3', '--', From a45c2db4b67a95f40f66852dd35e45ae9677df05 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 21 Mar 2017 21:48:21 -0700 Subject: [PATCH 215/485] test: refactor test-cluster-disconnect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace `process.once('exit', ...)` with `common.mustCall()`. Remove unneeded variable in loop declaration. PR-URL: https://github.com/nodejs/node/pull/11981 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig Reviewed-By: Santiago Gimeno Reviewed-By: Luigi Pinca --- test/parallel/test-cluster-disconnect.js | 35 ++++++------------------ 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/test/parallel/test-cluster-disconnect.js b/test/parallel/test-cluster-disconnect.js index a4772d1ad655ee..0f43b4ef59df32 100644 --- a/test/parallel/test-cluster-disconnect.js +++ b/test/parallel/test-cluster-disconnect.js @@ -42,7 +42,7 @@ if (cluster.isWorker) { const socket = net.connect(port, '127.0.0.1', () => { // buffer result let result = ''; - socket.on('data', common.mustCall((chunk) => { result += chunk; })); + socket.on('data', (chunk) => { result += chunk; }); // check result socket.on('end', common.mustCall(() => { @@ -55,7 +55,7 @@ if (cluster.isWorker) { const testCluster = function(cb) { let done = 0; - for (let i = 0, l = servers; i < l; i++) { + for (let i = 0; i < servers; i++) { testConnection(common.PORT + i, (success) => { assert.ok(success); done += 1; @@ -81,40 +81,21 @@ if (cluster.isWorker) { } }; - - const results = { - start: 0, - test: 0, - disconnect: 0 - }; - const test = function(again) { //1. start cluster - startCluster(() => { - results.start += 1; - + startCluster(common.mustCall(() => { //2. test cluster - testCluster(() => { - results.test += 1; - + testCluster(common.mustCall(() => { //3. disconnect cluster - cluster.disconnect(() => { - results.disconnect += 1; - + cluster.disconnect(common.mustCall(() => { // run test again to confirm cleanup if (again) { test(); } - }); - }); - }); + })); + })); + })); }; test(true); - - process.once('exit', () => { - assert.strictEqual(results.start, 2); - assert.strictEqual(results.test, 2); - assert.strictEqual(results.disconnect, 2); - }); } From d9b0e4c729fedfe5369ada4229fd170bd6dc7e2f Mon Sep 17 00:00:00 2001 From: Sorin Baltateanu Date: Thu, 21 Jul 2016 14:08:28 +0300 Subject: [PATCH 216/485] benchmark: repair the fs/readfile benchmark PR-URL: https://github.com/nodejs/node/pull/7818 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- benchmark/fs/readfile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benchmark/fs/readfile.js b/benchmark/fs/readfile.js index f58550fae83f96..9fc8316743e285 100644 --- a/benchmark/fs/readfile.js +++ b/benchmark/fs/readfile.js @@ -22,8 +22,10 @@ function main(conf) { data = null; var reads = 0; + var bench_ended = false; bench.start(); setTimeout(function() { + bench_ended = true; bench.end(reads); try { fs.unlinkSync(filename); } catch (e) {} process.exit(0); @@ -41,7 +43,8 @@ function main(conf) { throw new Error('wrong number of bytes returned'); reads++; - read(); + if (!bench_ended) + read(); } var cur = +conf.concurrent; From a6e69f8c08958a0909a60b53d048b21d181e90e5 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 19 Mar 2017 16:05:55 -0700 Subject: [PATCH 217/485] benchmark: add more options to map-bench PR-URL: https://github.com/nodejs/node/pull/11930 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- benchmark/es/map-bench.js | 42 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/benchmark/es/map-bench.js b/benchmark/es/map-bench.js index 047fc05abdc92f..4663d71bdd3186 100644 --- a/benchmark/es/map-bench.js +++ b/benchmark/es/map-bench.js @@ -4,7 +4,10 @@ const common = require('../common.js'); const assert = require('assert'); const bench = common.createBenchmark(main, { - method: ['object', 'nullProtoObject', 'fakeMap', 'map'], + method: [ + 'object', 'nullProtoObject', 'nullProtoLiteralObject', 'storageObject', + 'fakeMap', 'map' + ], millions: [1] }); @@ -36,6 +39,37 @@ function runNullProtoObject(n) { bench.end(n / 1e6); } +function runNullProtoLiteralObject(n) { + const m = { __proto__: null }; + var i = 0; + bench.start(); + for (; i < n; i++) { + m['i' + i] = i; + m['s' + i] = String(i); + assert.strictEqual(String(m['i' + i]), m['s' + i]); + m['i' + i] = undefined; + m['s' + i] = undefined; + } + bench.end(n / 1e6); +} + +function StorageObject() {} +StorageObject.prototype = Object.create(null); + +function runStorageObject(n) { + const m = new StorageObject(); + var i = 0; + bench.start(); + for (; i < n; i++) { + m['i' + i] = i; + m['s' + i] = String(i); + assert.strictEqual(String(m['i' + i]), m['s' + i]); + m['i' + i] = undefined; + m['s' + i] = undefined; + } + bench.end(n / 1e6); +} + function fakeMap() { const m = {}; return { @@ -84,6 +118,12 @@ function main(conf) { case 'nullProtoObject': runNullProtoObject(n); break; + case 'nullProtoLiteralObject': + runNullProtoLiteralObject(n); + break; + case 'storageObject': + runStorageObject(n); + break; case 'fakeMap': runFakeMap(n); break; From 14a91957f8bce2d614ec361f982aa56378f1c24e Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Wed, 22 Mar 2017 11:39:13 -0700 Subject: [PATCH 218/485] url: use a class for WHATWG url[context] The object is used as a structure, not as a map, which `StorageObject` was designed for. PR-URL: https://github.com/nodejs/node/pull/11930 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- lib/internal/url.js | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/lib/internal/url.js b/lib/internal/url.js index 7a6ff227ed4191..64156803d8d30e 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -3,8 +3,7 @@ const util = require('util'); const { hexTable, - isHexTable, - StorageObject + isHexTable } = require('internal/querystring'); const binding = process.binding('url'); const context = Symbol('context'); @@ -97,6 +96,26 @@ class TupleOrigin { } } +// This class provides the internal state of a URL object. An instance of this +// class is stored in every URL object and is accessed internally by setters +// and getters. It roughly corresponds to the concept of a URL record in the +// URL Standard, with a few differences. It is also the object transported to +// the C++ binding. +// Refs: https://url.spec.whatwg.org/#concept-url +class URLContext { + constructor() { + this.flags = 0; + this.scheme = undefined; + this.username = undefined; + this.password = undefined; + this.host = undefined; + this.port = undefined; + this.path = []; + this.query = undefined; + this.fragment = undefined; + } +} + function onParseComplete(flags, protocol, username, password, host, port, path, query, fragment) { var ctx = this[context]; @@ -125,7 +144,7 @@ function onParseError(flags, input) { // Reused by URL constructor and URL#href setter. function parse(url, input, base) { const base_context = base ? base[context] : undefined; - url[context] = new StorageObject(); + url[context] = new URLContext(); binding.parse(input.trim(), -1, base_context, undefined, onParseComplete.bind(url), onParseError); From cfc8422a68c92808a4a2aee374623bebc768522a Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 19 Mar 2017 16:11:10 -0700 Subject: [PATCH 219/485] lib: use Object.create(null) directly After V8 5.6, using Object.create(null) directly is now faster than using a constructor for map-like objects. PR-URL: https://github.com/nodejs/node/pull/11930 Refs: https://github.com/emberjs/ember.js/issues/15001 Refs: https://crrev.com/532c16eca071df3ec8eed394dcebb932ef584ee6 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- lib/_http_outgoing.js | 5 ++--- lib/events.js | 20 +++++++------------- lib/fs.js | 11 +++++------ lib/internal/querystring.js | 8 +------- lib/querystring.js | 3 +-- lib/url.js | 6 +++--- 6 files changed, 19 insertions(+), 34 deletions(-) diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index cdca2d4e89d1ba..a8e04d543a9f56 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -31,7 +31,6 @@ const common = require('_http_common'); const checkIsHttpToken = common._checkIsHttpToken; const checkInvalidHeaderChar = common._checkInvalidHeaderChar; const outHeadersKey = require('internal/http').outHeadersKey; -const StorageObject = require('internal/querystring').StorageObject; const CRLF = common.CRLF; const debug = common.debug; @@ -143,7 +142,7 @@ Object.defineProperty(OutgoingMessage.prototype, '_headerNames', { get: function() { const headers = this[outHeadersKey]; if (headers) { - const out = new StorageObject(); + const out = Object.create(null); const keys = Object.keys(headers); for (var i = 0; i < keys.length; ++i) { const key = keys[i]; @@ -552,7 +551,7 @@ OutgoingMessage.prototype.getHeaderNames = function getHeaderNames() { // Returns a shallow copy of the current outgoing headers. OutgoingMessage.prototype.getHeaders = function getHeaders() { const headers = this[outHeadersKey]; - const ret = new StorageObject(); + const ret = Object.create(null); if (headers) { const keys = Object.keys(headers); for (var i = 0; i < keys.length; ++i) { diff --git a/lib/events.js b/lib/events.js index a186d712578cf6..dfd0ed57d42e49 100644 --- a/lib/events.js +++ b/lib/events.js @@ -23,12 +23,6 @@ var domain; -// This constructor is used to store event handlers. Instantiating this is -// faster than explicitly calling `Object.create(null)` to get a "clean" empty -// object (tested with v8 v4.9). -function EventHandlers() {} -EventHandlers.prototype = Object.create(null); - function EventEmitter() { EventEmitter.init.call(this); } @@ -75,7 +69,7 @@ EventEmitter.init = function() { } if (!this._events || this._events === Object.getPrototypeOf(this)._events) { - this._events = new EventHandlers(); + this._events = Object.create(null); this._eventsCount = 0; } @@ -245,7 +239,7 @@ function _addListener(target, type, listener, prepend) { events = target._events; if (!events) { - events = target._events = new EventHandlers(); + events = target._events = Object.create(null); target._eventsCount = 0; } else { // To avoid recursion in the case that type === "newListener"! Before @@ -360,7 +354,7 @@ EventEmitter.prototype.removeListener = if (list === listener || list.listener === listener) { if (--this._eventsCount === 0) - this._events = new EventHandlers(); + this._events = Object.create(null); else { delete events[type]; if (events.removeListener) @@ -383,7 +377,7 @@ EventEmitter.prototype.removeListener = if (list.length === 1) { list[0] = undefined; if (--this._eventsCount === 0) { - this._events = new EventHandlers(); + this._events = Object.create(null); return this; } else { delete events[type]; @@ -412,11 +406,11 @@ EventEmitter.prototype.removeAllListeners = // not listening for removeListener, no need to emit if (!events.removeListener) { if (arguments.length === 0) { - this._events = new EventHandlers(); + this._events = Object.create(null); this._eventsCount = 0; } else if (events[type]) { if (--this._eventsCount === 0) - this._events = new EventHandlers(); + this._events = Object.create(null); else delete events[type]; } @@ -432,7 +426,7 @@ EventEmitter.prototype.removeAllListeners = this.removeAllListeners(key); } this.removeAllListeners('removeListener'); - this._events = new EventHandlers(); + this._events = Object.create(null); this._eventsCount = 0; return this; } diff --git a/lib/fs.js b/lib/fs.js index 3d65b2efa00d0f..2c2cfae5a52eac 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -43,7 +43,6 @@ const internalUtil = require('internal/util'); const assertEncoding = internalFS.assertEncoding; const stringToFlags = internalFS.stringToFlags; const getPathFromURL = internalURL.getPathFromURL; -const { StorageObject } = require('internal/querystring'); Object.defineProperty(exports, 'constants', { configurable: false, @@ -1560,7 +1559,7 @@ if (isWindows) { nextPart = function nextPart(p, i) { return p.indexOf('/', i); }; } -const emptyObj = new StorageObject(); +const emptyObj = Object.create(null); fs.realpathSync = function realpathSync(p, options) { if (!options) options = emptyObj; @@ -1580,8 +1579,8 @@ fs.realpathSync = function realpathSync(p, options) { return maybeCachedResult; } - const seenLinks = new StorageObject(); - const knownHard = new StorageObject(); + const seenLinks = Object.create(null); + const knownHard = Object.create(null); const original = p; // current character position in p @@ -1700,8 +1699,8 @@ fs.realpath = function realpath(p, options, callback) { return; p = pathModule.resolve(p); - const seenLinks = new StorageObject(); - const knownHard = new StorageObject(); + const seenLinks = Object.create(null); + const knownHard = Object.create(null); // current character position in p var pos; diff --git a/lib/internal/querystring.js b/lib/internal/querystring.js index c5dc0f63c7b30b..d1684418097100 100644 --- a/lib/internal/querystring.js +++ b/lib/internal/querystring.js @@ -23,13 +23,7 @@ const isHexTable = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // ... 256 ]; -// Instantiating this is faster than explicitly calling `Object.create(null)` -// to get a "clean" empty object (tested with v8 v4.9). -function StorageObject() {} -StorageObject.prototype = Object.create(null); - module.exports = { hexTable, - isHexTable, - StorageObject + isHexTable }; diff --git a/lib/querystring.js b/lib/querystring.js index 1533c8d87b7577..1976c8e125ad46 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -25,7 +25,6 @@ const { Buffer } = require('buffer'); const { - StorageObject, hexTable, isHexTable } = require('internal/querystring'); @@ -281,7 +280,7 @@ const defEqCodes = [61]; // = // Parse a key/val string. function parse(qs, sep, eq, options) { - const obj = new StorageObject(); + const obj = Object.create(null); if (typeof qs !== 'string' || qs.length === 0) { return obj; diff --git a/lib/url.js b/lib/url.js index 395a583cb784bc..4b2ef9b68ea756 100644 --- a/lib/url.js +++ b/lib/url.js @@ -23,7 +23,7 @@ const { toASCII } = process.binding('config').hasIntl ? process.binding('icu') : require('punycode'); -const { StorageObject, hexTable } = require('internal/querystring'); +const { hexTable } = require('internal/querystring'); const internalUrl = require('internal/url'); exports.parse = urlParse; exports.resolve = urlResolve; @@ -197,7 +197,7 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { } } else if (parseQueryString) { this.search = ''; - this.query = new StorageObject(); + this.query = Object.create(null); } return this; } @@ -390,7 +390,7 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { } else if (parseQueryString) { // no query string, but parseQueryString still requested this.search = ''; - this.query = new StorageObject(); + this.query = Object.create(null); } var firstIdx = (questionIdx !== -1 && From 2141d374527337f7e1c74c9efad217b017d945cf Mon Sep 17 00:00:00 2001 From: Chris Burkhart Date: Wed, 21 Dec 2016 09:32:21 -0800 Subject: [PATCH 220/485] events: update and clarify error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update error message that's thrown when no error listeners are attached to an emitter. PR-URL: https://github.com/nodejs/node/pull/10387 Reviewed-By: Sam Roberts Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Italo A. Casas Reviewed-By: James M Snell Reviewed-By: Michaël Zasso --- lib/events.js | 4 ++-- test/parallel/test-event-emitter-errors.js | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/events.js b/lib/events.js index dfd0ed57d42e49..eabf5c2cc7fb5c 100644 --- a/lib/events.js +++ b/lib/events.js @@ -171,7 +171,7 @@ EventEmitter.prototype.emit = function emit(type) { er = arguments[1]; if (domain) { if (!er) - er = new Error('Uncaught, unspecified "error" event'); + er = new Error('Unhandled "error" event'); if (typeof er === 'object' && er !== null) { er.domainEmitter = this; er.domain = domain; @@ -182,7 +182,7 @@ EventEmitter.prototype.emit = function emit(type) { throw er; // Unhandled 'error' event } else { // At least give some kind of context to the user - var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); + const err = new Error('Unhandled "error" event. (' + er + ')'); err.context = er; throw err; } diff --git a/test/parallel/test-event-emitter-errors.js b/test/parallel/test-event-emitter-errors.js index 2b4a93ae9808df..be4f4007f096df 100644 --- a/test/parallel/test-event-emitter-errors.js +++ b/test/parallel/test-event-emitter-errors.js @@ -5,6 +5,10 @@ const assert = require('assert'); const EE = new EventEmitter(); -assert.throws(function() { +assert.throws(() => { EE.emit('error', 'Accepts a string'); -}, /Accepts a string/); +}, /^Error: Unhandled "error" event\. \(Accepts a string\)$/); + +assert.throws(() => { + EE.emit('error', {message: 'Error!'}); +}, /^Error: Unhandled "error" event\. \(\[object Object\]\)$/); From e0bc5a7361b1d29c3ed034155fd779ce6f44fb13 Mon Sep 17 00:00:00 2001 From: Bryan English Date: Wed, 26 Oct 2016 15:21:36 -0700 Subject: [PATCH 221/485] process: maintain constructor descriptor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the original property descriptor instead of just taking the value, which would, by default, be non-writable and non-configurable. PR-URL: https://github.com/nodejs/node/pull/9306 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso --- lib/internal/bootstrap_node.js | 5 ++--- test/parallel/test-process-prototype.js | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 test/parallel/test-process-prototype.js diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js index 51b7f928cb25ec..ab3665f03dd9ad 100644 --- a/lib/internal/bootstrap_node.js +++ b/lib/internal/bootstrap_node.js @@ -13,10 +13,9 @@ const EventEmitter = NativeModule.require('events'); process._eventsCount = 0; + const origProcProto = Object.getPrototypeOf(process); Object.setPrototypeOf(process, Object.create(EventEmitter.prototype, { - constructor: { - value: process.constructor - } + constructor: Object.getOwnPropertyDescriptor(origProcProto, 'constructor') })); EventEmitter.call(process); diff --git a/test/parallel/test-process-prototype.js b/test/parallel/test-process-prototype.js new file mode 100644 index 00000000000000..0a0de8123d127d --- /dev/null +++ b/test/parallel/test-process-prototype.js @@ -0,0 +1,15 @@ +'use strict'; +require('../common'); +const assert = require('assert'); +const EventEmitter = require('events'); + +const proto = Object.getPrototypeOf(process); + +assert(proto instanceof EventEmitter); + +const desc = Object.getOwnPropertyDescriptor(proto, 'constructor'); + +assert.strictEqual(desc.value, process.constructor); +assert.strictEqual(desc.writable, true); +assert.strictEqual(desc.enumerable, false); +assert.strictEqual(desc.configurable, true); From c459d8ea5d402c702948c860d9497b2230ff7e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 21 Mar 2017 10:16:54 +0100 Subject: [PATCH 222/485] deps: update V8 to 5.7.492.69 PR-URL: https://github.com/nodejs/node/pull/11752 Reviewed-By: Ben Noordhuis Reviewed-By: Franziska Hinkelmann --- deps/v8/.clang-format | 1 + deps/v8/.gn | 31 +- deps/v8/AUTHORS | 2 + deps/v8/BUILD.gn | 197 +- deps/v8/ChangeLog | 2490 ++++++++++++ deps/v8/DEPS | 22 +- deps/v8/OWNERS | 7 + deps/v8/PRESUBMIT.py | 15 +- deps/v8/build_overrides/build.gni | 6 + deps/v8/build_overrides/v8.gni | 15 +- deps/v8/gni/isolate.gni | 5 +- deps/v8/gni/v8.gni | 26 +- deps/v8/gypfiles/all.gyp | 6 +- deps/v8/gypfiles/get_landmines.py | 1 + deps/v8/gypfiles/toolchain.gypi | 2 + .../v8/gypfiles/win/msvs_dependencies.isolate | 97 + deps/v8/include/libplatform/libplatform.h | 11 + deps/v8/include/v8-debug.h | 80 +- deps/v8/include/v8-inspector.h | 6 +- deps/v8/include/v8-version-string.h | 33 + deps/v8/include/v8-version.h | 6 +- deps/v8/include/v8.h | 465 ++- deps/v8/infra/config/cq.cfg | 1 - deps/v8/infra/mb/mb_config.pyl | 15 +- deps/v8/src/DEPS | 2 + deps/v8/src/accessors.cc | 101 +- deps/v8/src/accessors.h | 1 - deps/v8/src/allocation.cc | 17 - deps/v8/src/allocation.h | 19 +- deps/v8/src/api-arguments-inl.h | 20 + deps/v8/src/api-arguments.cc | 15 + deps/v8/src/api-arguments.h | 2 + deps/v8/src/api-experimental.cc | 3 +- deps/v8/src/api-natives.cc | 67 +- deps/v8/src/api.cc | 727 ++-- deps/v8/src/api.h | 3 +- deps/v8/src/arguments.h | 3 +- deps/v8/src/arm/assembler-arm-inl.h | 2 +- deps/v8/src/arm/assembler-arm.cc | 786 +++- deps/v8/src/arm/assembler-arm.h | 131 +- deps/v8/src/arm/code-stubs-arm.cc | 486 +-- deps/v8/src/arm/code-stubs-arm.h | 19 - deps/v8/src/arm/codegen-arm.cc | 358 +- deps/v8/src/arm/constants-arm.h | 25 +- deps/v8/src/arm/disasm-arm.cc | 379 +- deps/v8/src/arm/interface-descriptors-arm.cc | 8 +- deps/v8/src/arm/macro-assembler-arm.cc | 430 +- deps/v8/src/arm/macro-assembler-arm.h | 104 +- deps/v8/src/arm/simulator-arm.cc | 1201 +++++- deps/v8/src/arm/simulator-arm.h | 11 +- deps/v8/src/arm64/assembler-arm64.cc | 15 +- deps/v8/src/arm64/assembler-arm64.h | 3 - deps/v8/src/arm64/code-stubs-arm64.cc | 452 +-- deps/v8/src/arm64/code-stubs-arm64.h | 8 - deps/v8/src/arm64/codegen-arm64.cc | 290 +- .../src/arm64/interface-descriptors-arm64.cc | 12 +- deps/v8/src/arm64/macro-assembler-arm64.cc | 316 +- deps/v8/src/arm64/macro-assembler-arm64.h | 94 +- deps/v8/src/asmjs/OWNERS | 1 + deps/v8/src/asmjs/asm-js.cc | 129 +- deps/v8/src/asmjs/asm-js.h | 4 +- deps/v8/src/asmjs/asm-typer.cc | 407 +- deps/v8/src/asmjs/asm-typer.h | 80 +- deps/v8/src/asmjs/asm-types.cc | 1 + deps/v8/src/asmjs/asm-wasm-builder.cc | 465 ++- deps/v8/src/asmjs/asm-wasm-builder.h | 14 +- deps/v8/src/assembler-inl.h | 32 + deps/v8/src/assembler.cc | 74 +- deps/v8/src/assembler.h | 47 +- deps/v8/src/assert-scope.cc | 10 +- deps/v8/src/assert-scope.h | 23 +- deps/v8/src/ast/ast-expression-rewriter.cc | 6 +- .../ast/ast-function-literal-id-reindexer.cc | 29 + .../ast/ast-function-literal-id-reindexer.h | 36 + deps/v8/src/ast/ast-literal-reindexer.cc | 4 + deps/v8/src/ast/ast-numbering.cc | 119 +- deps/v8/src/ast/ast-numbering.h | 15 +- deps/v8/src/ast/ast-traversal-visitor.h | 8 +- deps/v8/src/ast/ast-types.cc | 7 +- deps/v8/src/ast/ast-value-factory.cc | 45 +- deps/v8/src/ast/ast-value-factory.h | 129 +- deps/v8/src/ast/ast.cc | 226 +- deps/v8/src/ast/ast.h | 353 +- deps/v8/src/ast/compile-time-value.cc | 4 +- deps/v8/src/ast/compile-time-value.h | 4 +- deps/v8/src/ast/modules.cc | 2 + deps/v8/src/ast/prettyprinter.cc | 53 +- deps/v8/src/ast/prettyprinter.h | 4 +- deps/v8/src/ast/scopes.cc | 511 ++- deps/v8/src/ast/scopes.h | 118 +- deps/v8/src/ast/variables.cc | 1 + deps/v8/src/bailout-reason.h | 9 +- deps/v8/src/base.isolate | 3 + deps/v8/src/base/cpu.cc | 10 +- deps/v8/src/base/cpu.h | 1 + deps/v8/src/base/hashmap.h | 17 +- deps/v8/src/base/iterator.h | 2 - deps/v8/src/base/logging.cc | 15 +- deps/v8/src/base/logging.h | 105 +- deps/v8/src/base/macros.h | 19 - deps/v8/src/base/platform/platform-linux.cc | 110 +- deps/v8/src/base/platform/platform-posix.cc | 23 + deps/v8/src/base/platform/platform-win32.cc | 7 + deps/v8/src/base/platform/platform.h | 8 + deps/v8/src/bit-vector.cc | 1 + deps/v8/src/bit-vector.h | 2 +- deps/v8/src/bootstrapper.cc | 981 +++-- deps/v8/src/bootstrapper.h | 1 + deps/v8/src/builtins/arm/builtins-arm.cc | 156 +- deps/v8/src/builtins/arm64/builtins-arm64.cc | 164 +- deps/v8/src/builtins/builtins-api.cc | 1 + deps/v8/src/builtins/builtins-array.cc | 1806 +++++---- deps/v8/src/builtins/builtins-boolean.cc | 29 +- deps/v8/src/builtins/builtins-constructor.cc | 772 ++++ deps/v8/src/builtins/builtins-constructor.h | 68 + deps/v8/src/builtins/builtins-conversion.cc | 321 +- deps/v8/src/builtins/builtins-date.cc | 308 +- deps/v8/src/builtins/builtins-function.cc | 208 +- deps/v8/src/builtins/builtins-generator.cc | 36 +- deps/v8/src/builtins/builtins-global.cc | 107 +- deps/v8/src/builtins/builtins-handler.cc | 239 +- deps/v8/src/builtins/builtins-ic.cc | 78 + deps/v8/src/builtins/builtins-internal.cc | 268 +- deps/v8/src/builtins/builtins-iterator.cc | 68 - deps/v8/src/builtins/builtins-math.cc | 515 ++- deps/v8/src/builtins/builtins-number.cc | 1663 ++++---- deps/v8/src/builtins/builtins-object.cc | 698 ++-- deps/v8/src/builtins/builtins-promise.cc | 1574 +++++++- deps/v8/src/builtins/builtins-promise.h | 120 + deps/v8/src/builtins/builtins-reflect.cc | 34 +- deps/v8/src/builtins/builtins-regexp.cc | 3214 ++++++++------- .../builtins/builtins-sharedarraybuffer.cc | 155 +- deps/v8/src/builtins/builtins-string.cc | 1451 +++---- deps/v8/src/builtins/builtins-symbol.cc | 76 +- deps/v8/src/builtins/builtins-typedarray.cc | 152 +- deps/v8/src/builtins/builtins-utils.h | 35 +- deps/v8/src/builtins/builtins.cc | 17 +- deps/v8/src/builtins/builtins.h | 1396 ++++--- deps/v8/src/builtins/ia32/builtins-ia32.cc | 160 +- deps/v8/src/builtins/mips/builtins-mips.cc | 171 +- .../v8/src/builtins/mips64/builtins-mips64.cc | 469 +-- deps/v8/src/builtins/ppc/builtins-ppc.cc | 174 +- deps/v8/src/builtins/s390/builtins-s390.cc | 168 +- deps/v8/src/builtins/x64/builtins-x64.cc | 175 +- deps/v8/src/builtins/x87/OWNERS | 1 + deps/v8/src/builtins/x87/builtins-x87.cc | 168 +- deps/v8/src/cancelable-task.cc | 27 +- deps/v8/src/cancelable-task.h | 16 +- deps/v8/src/code-events.h | 2 +- deps/v8/src/code-factory.cc | 144 +- deps/v8/src/code-factory.h | 25 +- deps/v8/src/code-stub-assembler.cc | 3321 ++++++---------- deps/v8/src/code-stub-assembler.h | 1469 ++++--- deps/v8/src/code-stubs-hydrogen.cc | 460 +-- deps/v8/src/code-stubs.cc | 1828 ++------- deps/v8/src/code-stubs.h | 687 +--- deps/v8/src/codegen.cc | 92 + deps/v8/src/codegen.h | 37 - deps/v8/src/compilation-info.cc | 13 +- deps/v8/src/compilation-info.h | 12 +- deps/v8/src/compilation-statistics.cc | 10 +- deps/v8/src/compilation-statistics.h | 1 + .../compiler-dispatcher-job.cc | 213 +- .../compiler-dispatcher-job.h | 28 +- .../compiler-dispatcher-tracer.cc | 34 +- .../compiler-dispatcher-tracer.h | 11 +- .../compiler-dispatcher.cc | 631 +++ .../compiler-dispatcher/compiler-dispatcher.h | 175 + deps/v8/src/compiler.cc | 415 +- deps/v8/src/compiler.h | 26 +- deps/v8/src/compiler/OWNERS | 1 + deps/v8/src/compiler/access-builder.cc | 549 +-- deps/v8/src/compiler/access-builder.h | 24 +- deps/v8/src/compiler/access-info.cc | 48 +- deps/v8/src/compiler/access-info.h | 3 +- .../v8/src/compiler/arm/code-generator-arm.cc | 276 +- .../src/compiler/arm/instruction-codes-arm.h | 23 +- .../compiler/arm/instruction-scheduler-arm.cc | 21 + .../compiler/arm/instruction-selector-arm.cc | 180 +- .../compiler/arm64/code-generator-arm64.cc | 66 +- .../arm64/instruction-selector-arm64.cc | 44 +- deps/v8/src/compiler/ast-graph-builder.cc | 1361 +------ deps/v8/src/compiler/ast-graph-builder.h | 61 +- .../compiler/ast-loop-assignment-analyzer.cc | 2 + deps/v8/src/compiler/branch-elimination.cc | 21 +- deps/v8/src/compiler/bytecode-analysis.cc | 622 +++ deps/v8/src/compiler/bytecode-analysis.h | 126 + .../src/compiler/bytecode-branch-analysis.cc | 43 - .../src/compiler/bytecode-branch-analysis.h | 65 - .../v8/src/compiler/bytecode-graph-builder.cc | 541 +-- deps/v8/src/compiler/bytecode-graph-builder.h | 57 +- deps/v8/src/compiler/bytecode-liveness-map.cc | 42 + deps/v8/src/compiler/bytecode-liveness-map.h | 119 + .../v8/src/compiler/bytecode-loop-analysis.cc | 100 - deps/v8/src/compiler/bytecode-loop-analysis.h | 67 - deps/v8/src/compiler/code-assembler.cc | 1051 ++--- deps/v8/src/compiler/code-assembler.h | 369 +- deps/v8/src/compiler/code-generator.cc | 162 +- deps/v8/src/compiler/code-generator.h | 24 +- .../src/compiler/common-operator-reducer.cc | 69 +- deps/v8/src/compiler/common-operator.cc | 301 +- deps/v8/src/compiler/common-operator.h | 136 +- deps/v8/src/compiler/control-builders.cc | 61 +- deps/v8/src/compiler/control-builders.h | 53 - deps/v8/src/compiler/dead-code-elimination.cc | 31 +- .../src/compiler/effect-control-linearizer.cc | 3526 ++++++----------- .../src/compiler/effect-control-linearizer.h | 244 +- .../src/compiler/escape-analysis-reducer.cc | 42 +- .../v8/src/compiler/escape-analysis-reducer.h | 1 + deps/v8/src/compiler/escape-analysis.cc | 74 +- deps/v8/src/compiler/escape-analysis.h | 2 +- deps/v8/src/compiler/frame-elider.cc | 35 +- deps/v8/src/compiler/frame-states.cc | 1 + deps/v8/src/compiler/frame.h | 32 +- deps/v8/src/compiler/graph-assembler.cc | 287 ++ deps/v8/src/compiler/graph-assembler.h | 449 +++ deps/v8/src/compiler/graph-reducer.cc | 43 +- deps/v8/src/compiler/graph-visualizer.cc | 6 +- .../src/compiler/ia32/code-generator-ia32.cc | 196 +- .../ia32/instruction-selector-ia32.cc | 94 +- deps/v8/src/compiler/instruction-codes.h | 9 +- .../src/compiler/instruction-selector-impl.h | 23 +- deps/v8/src/compiler/instruction-selector.cc | 261 +- deps/v8/src/compiler/instruction-selector.h | 20 +- deps/v8/src/compiler/instruction.cc | 16 +- deps/v8/src/compiler/instruction.h | 146 +- deps/v8/src/compiler/int64-lowering.cc | 10 +- deps/v8/src/compiler/js-builtin-reducer.cc | 310 +- deps/v8/src/compiler/js-builtin-reducer.h | 3 +- deps/v8/src/compiler/js-call-reducer.cc | 200 +- deps/v8/src/compiler/js-call-reducer.h | 13 +- .../src/compiler/js-context-specialization.cc | 116 +- .../src/compiler/js-context-specialization.h | 6 +- deps/v8/src/compiler/js-create-lowering.cc | 227 +- .../src/compiler/js-frame-specialization.cc | 3 + deps/v8/src/compiler/js-generic-lowering.cc | 207 +- .../js-global-object-specialization.cc | 61 +- deps/v8/src/compiler/js-graph.cc | 26 +- deps/v8/src/compiler/js-graph.h | 6 +- deps/v8/src/compiler/js-inlining-heuristic.cc | 4 +- deps/v8/src/compiler/js-inlining.cc | 87 +- deps/v8/src/compiler/js-intrinsic-lowering.cc | 31 +- deps/v8/src/compiler/js-intrinsic-lowering.h | 3 +- .../js-native-context-specialization.cc | 452 ++- .../js-native-context-specialization.h | 7 +- deps/v8/src/compiler/js-operator.cc | 196 +- deps/v8/src/compiler/js-operator.h | 90 +- deps/v8/src/compiler/js-typed-lowering.cc | 178 +- deps/v8/src/compiler/js-typed-lowering.h | 3 +- deps/v8/src/compiler/linkage.cc | 3 - deps/v8/src/compiler/load-elimination.cc | 270 +- deps/v8/src/compiler/load-elimination.h | 55 + .../v8/src/compiler/machine-graph-verifier.cc | 194 +- deps/v8/src/compiler/machine-graph-verifier.h | 3 +- .../src/compiler/machine-operator-reducer.cc | 80 +- .../src/compiler/machine-operator-reducer.h | 5 +- deps/v8/src/compiler/machine-operator.cc | 166 +- deps/v8/src/compiler/machine-operator.h | 14 +- deps/v8/src/compiler/memory-optimizer.cc | 185 +- deps/v8/src/compiler/memory-optimizer.h | 3 + .../src/compiler/mips/code-generator-mips.cc | 223 +- .../compiler/mips/instruction-codes-mips.h | 4 - .../mips/instruction-selector-mips.cc | 123 +- .../compiler/mips64/code-generator-mips64.cc | 383 +- .../mips64/instruction-codes-mips64.h | 4 - .../mips64/instruction-selector-mips64.cc | 202 +- deps/v8/src/compiler/node-marker.h | 13 +- deps/v8/src/compiler/node-properties.cc | 14 +- deps/v8/src/compiler/node-properties.h | 5 + deps/v8/src/compiler/node.cc | 6 - deps/v8/src/compiler/node.h | 167 +- deps/v8/src/compiler/opcodes.h | 67 +- deps/v8/src/compiler/operation-typer.cc | 84 +- deps/v8/src/compiler/operator-properties.cc | 3 + deps/v8/src/compiler/osr.cc | 23 +- deps/v8/src/compiler/pipeline.cc | 329 +- deps/v8/src/compiler/pipeline.h | 21 +- .../v8/src/compiler/ppc/code-generator-ppc.cc | 210 +- .../src/compiler/ppc/instruction-codes-ppc.h | 5 +- .../compiler/ppc/instruction-scheduler-ppc.cc | 3 +- .../compiler/ppc/instruction-selector-ppc.cc | 40 +- deps/v8/src/compiler/raw-machine-assembler.cc | 318 +- deps/v8/src/compiler/raw-machine-assembler.h | 64 +- .../v8/src/compiler/redundancy-elimination.cc | 58 +- deps/v8/src/compiler/redundancy-elimination.h | 3 + .../compiler/register-allocator-verifier.cc | 32 +- deps/v8/src/compiler/register-allocator.cc | 41 +- deps/v8/src/compiler/representation-change.cc | 65 +- deps/v8/src/compiler/representation-change.h | 1 + .../src/compiler/s390/code-generator-s390.cc | 176 +- .../compiler/s390/instruction-codes-s390.h | 1 - .../s390/instruction-scheduler-s390.cc | 1 - .../s390/instruction-selector-s390.cc | 139 +- deps/v8/src/compiler/schedule.cc | 2 +- deps/v8/src/compiler/simd-scalar-lowering.cc | 254 +- deps/v8/src/compiler/simd-scalar-lowering.h | 7 + deps/v8/src/compiler/simplified-lowering.cc | 185 +- .../compiler/simplified-operator-reducer.cc | 9 + deps/v8/src/compiler/simplified-operator.cc | 116 +- deps/v8/src/compiler/simplified-operator.h | 76 +- deps/v8/src/compiler/state-values-utils.cc | 323 +- deps/v8/src/compiler/state-values-utils.h | 49 +- deps/v8/src/compiler/type-cache.h | 16 +- deps/v8/src/compiler/type-hint-analyzer.cc | 128 - deps/v8/src/compiler/type-hint-analyzer.h | 57 - deps/v8/src/compiler/typed-optimization.cc | 37 +- deps/v8/src/compiler/typed-optimization.h | 1 + deps/v8/src/compiler/typer.cc | 105 +- deps/v8/src/compiler/types.cc | 27 +- deps/v8/src/compiler/types.h | 29 +- .../src/compiler/value-numbering-reducer.cc | 19 +- deps/v8/src/compiler/verifier.cc | 59 +- deps/v8/src/compiler/wasm-compiler.cc | 858 ++-- deps/v8/src/compiler/wasm-compiler.h | 81 +- deps/v8/src/compiler/wasm-linkage.cc | 28 +- .../v8/src/compiler/x64/code-generator-x64.cc | 311 +- .../src/compiler/x64/instruction-codes-x64.h | 8 +- .../compiler/x64/instruction-scheduler-x64.cc | 4 +- .../compiler/x64/instruction-selector-x64.cc | 266 +- .../v8/src/compiler/x87/code-generator-x87.cc | 8 +- .../compiler/x87/instruction-selector-x87.cc | 14 + deps/v8/src/contexts-inl.h | 7 + deps/v8/src/contexts.cc | 200 +- deps/v8/src/contexts.h | 203 +- deps/v8/src/conversions-inl.h | 54 +- deps/v8/src/conversions.cc | 144 +- deps/v8/src/conversions.h | 8 + deps/v8/src/counters-inl.h | 51 + deps/v8/src/counters.cc | 50 +- deps/v8/src/counters.h | 186 +- .../src/crankshaft/arm/lithium-codegen-arm.cc | 30 +- .../crankshaft/arm64/lithium-codegen-arm64.cc | 16 +- .../v8/src/crankshaft/hydrogen-instructions.h | 8 +- deps/v8/src/crankshaft/hydrogen-types.cc | 1 + deps/v8/src/crankshaft/hydrogen.cc | 204 +- deps/v8/src/crankshaft/hydrogen.h | 48 +- .../crankshaft/ia32/lithium-codegen-ia32.cc | 33 +- .../crankshaft/mips/lithium-codegen-mips.cc | 40 +- .../mips64/lithium-codegen-mips64.cc | 33 +- .../src/crankshaft/ppc/lithium-codegen-ppc.cc | 55 +- .../crankshaft/s390/lithium-codegen-s390.cc | 226 +- deps/v8/src/crankshaft/s390/lithium-s390.cc | 31 +- deps/v8/src/crankshaft/s390/lithium-s390.h | 16 - deps/v8/src/crankshaft/typing.cc | 1 + .../src/crankshaft/x64/lithium-codegen-x64.cc | 20 +- deps/v8/src/crankshaft/x87/OWNERS | 1 + .../src/crankshaft/x87/lithium-codegen-x87.cc | 33 +- deps/v8/src/d8.cc | 305 +- deps/v8/src/d8.h | 8 +- deps/v8/src/debug/arm/debug-arm.cc | 2 +- deps/v8/src/debug/arm64/debug-arm64.cc | 2 +- deps/v8/src/debug/debug-evaluate.cc | 316 +- deps/v8/src/debug/debug-evaluate.h | 11 +- deps/v8/src/debug/debug-frames.cc | 49 +- deps/v8/src/debug/debug-frames.h | 6 +- deps/v8/src/debug/debug-interface.h | 343 +- deps/v8/src/debug/debug-scopes.cc | 64 +- deps/v8/src/debug/debug-scopes.h | 8 +- deps/v8/src/debug/debug.cc | 571 +-- deps/v8/src/debug/debug.h | 145 +- deps/v8/src/debug/debug.js | 106 +- deps/v8/src/debug/ia32/debug-ia32.cc | 2 +- deps/v8/src/debug/interface-types.h | 75 + deps/v8/src/debug/liveedit.cc | 46 +- deps/v8/src/debug/liveedit.h | 10 +- deps/v8/src/debug/liveedit.js | 119 +- deps/v8/src/debug/mips/debug-mips.cc | 2 +- deps/v8/src/debug/mips64/debug-mips64.cc | 2 +- deps/v8/src/debug/mirrors.js | 36 +- deps/v8/src/debug/ppc/debug-ppc.cc | 2 +- deps/v8/src/debug/s390/debug-s390.cc | 2 +- deps/v8/src/debug/x64/debug-x64.cc | 2 +- deps/v8/src/debug/x87/OWNERS | 1 + deps/v8/src/debug/x87/debug-x87.cc | 2 +- deps/v8/src/deoptimizer.cc | 542 ++- deps/v8/src/deoptimizer.h | 10 +- deps/v8/src/elements-kind.cc | 1 + deps/v8/src/elements.cc | 200 +- deps/v8/src/elements.h | 3 + deps/v8/src/execution.cc | 70 +- deps/v8/src/execution.h | 33 +- .../externalize-string-extension.cc | 1 + deps/v8/src/external-reference-table.cc | 18 +- deps/v8/src/factory.cc | 247 +- deps/v8/src/factory.h | 53 +- deps/v8/src/fast-accessor-assembler.cc | 141 +- deps/v8/src/fast-accessor-assembler.h | 14 +- deps/v8/src/field-type.cc | 1 + deps/v8/src/flag-definitions.h | 119 +- deps/v8/src/frames-inl.h | 14 +- deps/v8/src/frames.cc | 471 ++- deps/v8/src/frames.h | 279 +- .../src/full-codegen/arm/full-codegen-arm.cc | 951 +---- .../full-codegen/arm64/full-codegen-arm64.cc | 954 +---- deps/v8/src/full-codegen/full-codegen.cc | 552 +-- deps/v8/src/full-codegen/full-codegen.h | 134 +- .../full-codegen/ia32/full-codegen-ia32.cc | 912 +---- .../full-codegen/mips/full-codegen-mips.cc | 937 +---- .../mips64/full-codegen-mips64.cc | 935 +---- .../src/full-codegen/ppc/full-codegen-ppc.cc | 944 +---- .../full-codegen/s390/full-codegen-s390.cc | 989 +---- .../src/full-codegen/x64/full-codegen-x64.cc | 918 +---- deps/v8/src/full-codegen/x87/OWNERS | 1 + .../src/full-codegen/x87/full-codegen-x87.cc | 912 +---- deps/v8/src/futex-emulation.cc | 1 + deps/v8/src/global-handles.cc | 31 +- deps/v8/src/global-handles.h | 11 +- deps/v8/src/globals.h | 75 +- deps/v8/src/handles.h | 9 +- deps/v8/src/heap-symbols.h | 39 +- deps/v8/src/heap/array-buffer-tracker.cc | 4 +- deps/v8/src/heap/embedder-tracing.cc | 72 + deps/v8/src/heap/embedder-tracing.h | 67 + deps/v8/src/heap/gc-idle-time-handler.cc | 1 + deps/v8/src/heap/gc-idle-time-handler.h | 2 + deps/v8/src/heap/gc-tracer.cc | 14 +- deps/v8/src/heap/gc-tracer.h | 6 + deps/v8/src/heap/heap-inl.h | 15 +- deps/v8/src/heap/heap.cc | 397 +- deps/v8/src/heap/heap.h | 129 +- deps/v8/src/heap/incremental-marking.cc | 126 +- deps/v8/src/heap/incremental-marking.h | 8 +- deps/v8/src/heap/mark-compact-inl.h | 9 +- deps/v8/src/heap/mark-compact.cc | 341 +- deps/v8/src/heap/mark-compact.h | 62 +- deps/v8/src/heap/memory-reducer.cc | 40 +- deps/v8/src/heap/memory-reducer.h | 15 +- deps/v8/src/heap/object-stats.cc | 13 +- deps/v8/src/heap/objects-visiting-inl.h | 38 +- deps/v8/src/heap/objects-visiting.cc | 2 +- deps/v8/src/heap/objects-visiting.h | 15 +- deps/v8/src/heap/remembered-set.h | 15 +- deps/v8/src/heap/scavenger.cc | 2 +- deps/v8/src/heap/slot-set.h | 12 + deps/v8/src/heap/spaces-inl.h | 67 +- deps/v8/src/heap/spaces.cc | 88 +- deps/v8/src/heap/spaces.h | 72 +- deps/v8/src/heap/store-buffer.cc | 34 +- deps/v8/src/heap/store-buffer.h | 93 +- deps/v8/src/i18n.cc | 84 +- deps/v8/src/i18n.h | 38 +- deps/v8/src/ia32/assembler-ia32.cc | 9 +- deps/v8/src/ia32/assembler-ia32.h | 3 - deps/v8/src/ia32/code-stubs-ia32.cc | 568 +-- deps/v8/src/ia32/code-stubs-ia32.h | 18 - deps/v8/src/ia32/codegen-ia32.cc | 331 +- deps/v8/src/ia32/deoptimizer-ia32.cc | 3 +- .../v8/src/ia32/interface-descriptors-ia32.cc | 9 +- deps/v8/src/ia32/macro-assembler-ia32.cc | 292 +- deps/v8/src/ia32/macro-assembler-ia32.h | 81 +- deps/v8/src/ic/accessor-assembler-impl.h | 203 + deps/v8/src/ic/accessor-assembler.cc | 1933 +++++++++ deps/v8/src/ic/accessor-assembler.h | 45 + deps/v8/src/ic/arm/handler-compiler-arm.cc | 79 - deps/v8/src/ic/arm/ic-arm.cc | 485 --- deps/v8/src/ic/arm/ic-compiler-arm.cc | 33 - deps/v8/src/ic/arm/stub-cache-arm.cc | 157 - .../v8/src/ic/arm64/handler-compiler-arm64.cc | 78 - deps/v8/src/ic/arm64/ic-arm64.cc | 450 --- deps/v8/src/ic/arm64/ic-compiler-arm64.cc | 33 - deps/v8/src/ic/arm64/stub-cache-arm64.cc | 156 - deps/v8/src/ic/handler-compiler.cc | 320 +- deps/v8/src/ic/handler-compiler.h | 43 - deps/v8/src/ic/handler-configuration-inl.h | 3 +- deps/v8/src/ic/ia32/handler-compiler-ia32.cc | 82 - deps/v8/src/ic/ia32/ic-compiler-ia32.cc | 45 - deps/v8/src/ic/ia32/ic-ia32.cc | 478 --- deps/v8/src/ic/ia32/stub-cache-ia32.cc | 185 - deps/v8/src/ic/ic-compiler.cc | 45 +- deps/v8/src/ic/ic-compiler.h | 15 +- deps/v8/src/ic/ic-inl.h | 4 +- deps/v8/src/ic/ic-state.cc | 17 + deps/v8/src/ic/ic-state.h | 8 + deps/v8/src/ic/ic-stats.cc | 144 + deps/v8/src/ic/ic-stats.h | 77 + deps/v8/src/ic/ic.cc | 523 ++- deps/v8/src/ic/ic.h | 23 +- deps/v8/src/ic/keyed-store-generic.cc | 355 +- deps/v8/src/ic/keyed-store-generic.h | 9 +- deps/v8/src/ic/mips/handler-compiler-mips.cc | 79 - deps/v8/src/ic/mips/ic-compiler-mips.cc | 33 - deps/v8/src/ic/mips/ic-mips.cc | 483 --- deps/v8/src/ic/mips/stub-cache-mips.cc | 157 - .../src/ic/mips64/handler-compiler-mips64.cc | 79 - deps/v8/src/ic/mips64/ic-compiler-mips64.cc | 33 - deps/v8/src/ic/mips64/ic-mips64.cc | 484 --- deps/v8/src/ic/mips64/stub-cache-mips64.cc | 161 - deps/v8/src/ic/ppc/handler-compiler-ppc.cc | 80 - deps/v8/src/ic/ppc/ic-compiler-ppc.cc | 31 - deps/v8/src/ic/ppc/ic-ppc.cc | 482 --- deps/v8/src/ic/ppc/stub-cache-ppc.cc | 176 - deps/v8/src/ic/s390/handler-compiler-s390.cc | 72 - deps/v8/src/ic/s390/ic-compiler-s390.cc | 29 - deps/v8/src/ic/s390/ic-s390.cc | 477 +-- deps/v8/src/ic/s390/stub-cache-s390.cc | 173 - deps/v8/src/ic/stub-cache.h | 7 - deps/v8/src/ic/x64/handler-compiler-x64.cc | 82 - deps/v8/src/ic/x64/ic-compiler-x64.cc | 39 - deps/v8/src/ic/x64/ic-x64.cc | 476 --- deps/v8/src/ic/x64/stub-cache-x64.cc | 153 - deps/v8/src/ic/x87/OWNERS | 1 + deps/v8/src/ic/x87/handler-compiler-x87.cc | 82 - deps/v8/src/ic/x87/ic-compiler-x87.cc | 45 - deps/v8/src/ic/x87/ic-x87.cc | 478 --- deps/v8/src/ic/x87/stub-cache-x87.cc | 185 - deps/v8/src/inspector/BUILD.gn | 5 +- deps/v8/src/inspector/DEPS | 1 + deps/v8/src/inspector/debugger-script.js | 74 +- .../src/inspector/debugger_script_externs.js | 51 +- .../src/inspector/injected-script-native.cc | 6 +- .../v8/src/inspector/injected-script-native.h | 3 +- .../src/inspector/injected-script-source.js | 21 +- deps/v8/src/inspector/injected-script.cc | 28 +- deps/v8/src/inspector/injected-script.h | 6 +- deps/v8/src/inspector/inspected-context.cc | 12 +- deps/v8/src/inspector/inspected-context.h | 2 + deps/v8/src/inspector/inspector.gyp | 28 - deps/v8/src/inspector/inspector.gypi | 5 +- .../inspector/inspector_protocol_config.json | 29 +- .../src/inspector/java-script-call-frame.cc | 16 +- .../v8/src/inspector/java-script-call-frame.h | 7 +- deps/v8/src/inspector/js_protocol.json | 12 +- deps/v8/src/inspector/protocol-platform.h | 21 - deps/v8/src/inspector/remote-object-id.cc | 3 +- deps/v8/src/inspector/script-breakpoint.h | 21 +- deps/v8/src/inspector/search-util.cc | 3 +- deps/v8/src/inspector/string-16.cc | 27 +- deps/v8/src/inspector/string-16.h | 2 +- deps/v8/src/inspector/string-util.cc | 16 +- deps/v8/src/inspector/string-util.h | 8 +- deps/v8/src/inspector/test-interface.cc | 18 + deps/v8/src/inspector/test-interface.h | 18 + deps/v8/src/inspector/v8-console-message.cc | 43 +- deps/v8/src/inspector/v8-console-message.h | 8 +- deps/v8/src/inspector/v8-console.cc | 23 + .../src/inspector/v8-debugger-agent-impl.cc | 202 +- .../v8/src/inspector/v8-debugger-agent-impl.h | 3 +- deps/v8/src/inspector/v8-debugger-script.cc | 230 +- deps/v8/src/inspector/v8-debugger-script.h | 60 +- deps/v8/src/inspector/v8-debugger.cc | 428 +- deps/v8/src/inspector/v8-debugger.h | 49 +- deps/v8/src/inspector/v8-function-call.cc | 3 +- .../inspector/v8-heap-profiler-agent-impl.cc | 10 +- deps/v8/src/inspector/v8-inspector-impl.cc | 137 +- deps/v8/src/inspector/v8-inspector-impl.h | 22 +- .../inspector/v8-inspector-session-impl.cc | 69 +- .../src/inspector/v8-inspector-session-impl.h | 6 +- .../src/inspector/v8-internal-value-type.cc | 1 - .../src/inspector/v8-profiler-agent-impl.cc | 4 - .../v8/src/inspector/v8-profiler-agent-impl.h | 2 - .../v8/src/inspector/v8-runtime-agent-impl.cc | 32 +- deps/v8/src/inspector/v8-stack-trace-impl.cc | 38 +- deps/v8/src/inspector/wasm-translation.cc | 309 ++ deps/v8/src/inspector/wasm-translation.h | 75 + deps/v8/src/interface-descriptors.cc | 110 +- deps/v8/src/interface-descriptors.h | 74 +- deps/v8/src/interpreter/OWNERS | 1 + .../interpreter/bytecode-array-accessor.cc | 205 + .../src/interpreter/bytecode-array-accessor.h | 76 + .../src/interpreter/bytecode-array-builder.cc | 116 +- .../src/interpreter/bytecode-array-builder.h | 51 +- .../interpreter/bytecode-array-iterator.cc | 175 +- .../src/interpreter/bytecode-array-iterator.h | 49 +- .../bytecode-array-random-iterator.cc | 37 + .../bytecode-array-random-iterator.h | 78 + .../src/interpreter/bytecode-array-writer.cc | 11 +- deps/v8/src/interpreter/bytecode-flags.cc | 8 +- deps/v8/src/interpreter/bytecode-generator.cc | 459 ++- deps/v8/src/interpreter/bytecode-generator.h | 13 +- deps/v8/src/interpreter/bytecode-label.cc | 1 + deps/v8/src/interpreter/bytecode-label.h | 4 +- deps/v8/src/interpreter/bytecode-operands.h | 55 +- .../bytecode-peephole-optimizer.cc | 73 +- .../src/interpreter/bytecode-peephole-table.h | 21 +- deps/v8/src/interpreter/bytecode-pipeline.h | 138 +- .../bytecode-register-optimizer.cc | 34 +- .../interpreter/bytecode-register-optimizer.h | 27 +- deps/v8/src/interpreter/bytecodes.h | 221 +- .../src/interpreter/constant-array-builder.cc | 34 +- .../src/interpreter/constant-array-builder.h | 5 +- .../src/interpreter/control-flow-builders.cc | 7 +- .../src/interpreter/control-flow-builders.h | 19 +- .../src/interpreter/handler-table-builder.h | 2 +- .../src/interpreter/interpreter-assembler.cc | 217 +- .../src/interpreter/interpreter-assembler.h | 50 +- .../src/interpreter/interpreter-intrinsics.cc | 33 +- .../src/interpreter/interpreter-intrinsics.h | 37 +- deps/v8/src/interpreter/interpreter.cc | 1052 +++-- deps/v8/src/interpreter/interpreter.h | 9 + deps/v8/src/interpreter/mkpeephole.cc | 22 + deps/v8/src/isolate-inl.h | 5 + deps/v8/src/isolate.cc | 563 ++- deps/v8/src/isolate.h | 93 +- deps/v8/src/js/array.js | 23 +- deps/v8/src/js/arraybuffer.js | 8 - deps/v8/src/js/async-await.js | 61 +- deps/v8/src/js/collection.js | 16 - deps/v8/src/js/i18n.js | 385 +- deps/v8/src/js/macros.py | 1 - deps/v8/src/js/prologue.js | 26 +- deps/v8/src/js/promise.js | 524 +-- deps/v8/src/js/string.js | 2 +- deps/v8/src/js/symbol.js | 68 - deps/v8/src/js/typedarray.js | 8 +- deps/v8/src/json-parser.cc | 5 +- deps/v8/src/json-stringifier.cc | 3 +- deps/v8/src/keys.cc | 7 +- deps/v8/src/layout-descriptor-inl.h | 2 +- deps/v8/src/layout-descriptor.cc | 3 +- deps/v8/src/layout-descriptor.h | 1 + deps/v8/src/libplatform/default-platform.cc | 48 +- deps/v8/src/libplatform/default-platform.h | 6 +- .../src/libplatform/tracing/trace-config.cc | 9 +- deps/v8/src/list-inl.h | 3 +- deps/v8/src/list.h | 6 +- deps/v8/src/log-utils.h | 4 +- deps/v8/src/log.cc | 55 +- deps/v8/src/lookup.cc | 41 +- deps/v8/src/lookup.h | 2 +- deps/v8/src/machine-type.h | 30 +- deps/v8/src/macro-assembler.h | 21 +- deps/v8/src/map-updater.cc | 615 +++ deps/v8/src/map-updater.h | 173 + deps/v8/src/messages.cc | 359 +- deps/v8/src/messages.h | 79 +- deps/v8/src/mips/assembler-mips.cc | 44 +- deps/v8/src/mips/assembler-mips.h | 33 +- deps/v8/src/mips/code-stubs-mips.cc | 491 +-- deps/v8/src/mips/code-stubs-mips.h | 19 - deps/v8/src/mips/codegen-mips.cc | 373 +- .../v8/src/mips/interface-descriptors-mips.cc | 8 +- deps/v8/src/mips/macro-assembler-mips.cc | 675 ++-- deps/v8/src/mips/macro-assembler-mips.h | 146 +- deps/v8/src/mips/simulator-mips.cc | 8 +- deps/v8/src/mips64/assembler-mips64.cc | 134 +- deps/v8/src/mips64/assembler-mips64.h | 19 +- deps/v8/src/mips64/code-stubs-mips64.cc | 491 +-- deps/v8/src/mips64/code-stubs-mips64.h | 19 - deps/v8/src/mips64/codegen-mips64.cc | 370 +- .../mips64/interface-descriptors-mips64.cc | 8 +- deps/v8/src/mips64/macro-assembler-mips64.cc | 666 +--- deps/v8/src/mips64/macro-assembler-mips64.h | 148 +- deps/v8/src/mips64/simulator-mips64.cc | 8 +- deps/v8/src/objects-body-descriptors-inl.h | 7 +- deps/v8/src/objects-debug.cc | 111 +- deps/v8/src/objects-inl.h | 1784 ++++----- deps/v8/src/objects-printer.cc | 300 +- deps/v8/src/objects.cc | 2428 +++++------- deps/v8/src/objects.h | 1282 +++--- deps/v8/src/objects/module-info.h | 129 + deps/v8/src/objects/object-macros-undef.h | 9 + deps/v8/src/objects/object-macros.h | 32 + .../scopeinfo.cc => objects/scope-info.cc} | 54 +- deps/v8/src/objects/scope-info.h | 345 ++ deps/v8/src/parsing/OWNERS | 1 + deps/v8/src/parsing/duplicate-finder.cc | 69 +- deps/v8/src/parsing/duplicate-finder.h | 28 +- deps/v8/src/parsing/func-name-inferrer.cc | 7 +- .../parsing/parameter-initializer-rewriter.cc | 3 +- deps/v8/src/parsing/parse-info.cc | 18 +- deps/v8/src/parsing/parse-info.h | 24 +- deps/v8/src/parsing/parser-base.h | 304 +- deps/v8/src/parsing/parser.cc | 875 ++-- deps/v8/src/parsing/parser.h | 122 +- deps/v8/src/parsing/parsing.cc | 62 + deps/v8/src/parsing/parsing.h | 34 + deps/v8/src/parsing/pattern-rewriter.cc | 15 +- deps/v8/src/parsing/preparse-data-format.h | 2 +- deps/v8/src/parsing/preparse-data.cc | 5 +- deps/v8/src/parsing/preparse-data.h | 12 +- deps/v8/src/parsing/preparser.cc | 89 +- deps/v8/src/parsing/preparser.h | 298 +- deps/v8/src/parsing/rewriter.cc | 36 +- .../src/parsing/scanner-character-streams.cc | 73 +- .../src/parsing/scanner-character-streams.h | 4 +- deps/v8/src/parsing/scanner.cc | 105 +- deps/v8/src/parsing/scanner.h | 90 +- deps/v8/src/perf-jit.cc | 98 +- deps/v8/src/ppc/assembler-ppc.cc | 56 +- deps/v8/src/ppc/assembler-ppc.h | 20 +- deps/v8/src/ppc/code-stubs-ppc.cc | 492 +-- deps/v8/src/ppc/code-stubs-ppc.h | 13 - deps/v8/src/ppc/codegen-ppc.cc | 324 +- deps/v8/src/ppc/constants-ppc.h | 53 +- deps/v8/src/ppc/disasm-ppc.cc | 45 + deps/v8/src/ppc/interface-descriptors-ppc.cc | 8 +- deps/v8/src/ppc/macro-assembler-ppc.cc | 260 +- deps/v8/src/ppc/macro-assembler-ppc.h | 76 +- deps/v8/src/ppc/simulator-ppc.cc | 128 +- deps/v8/src/ppc/simulator-ppc.h | 1 + .../profiler/heap-snapshot-generator-inl.h | 14 +- .../src/profiler/heap-snapshot-generator.cc | 33 +- .../v8/src/profiler/heap-snapshot-generator.h | 17 +- deps/v8/src/profiler/profile-generator.cc | 26 +- deps/v8/src/profiler/profiler-listener.cc | 7 +- deps/v8/src/promise-utils.cc | 75 - deps/v8/src/promise-utils.h | 32 - deps/v8/src/property-descriptor.cc | 23 +- deps/v8/src/property-details.h | 62 +- deps/v8/src/property.cc | 77 +- deps/v8/src/property.h | 75 +- deps/v8/src/prototype.h | 4 +- deps/v8/src/regexp/interpreter-irregexp.cc | 1 + deps/v8/src/regexp/jsregexp.cc | 31 +- .../regexp/regexp-macro-assembler-irregexp.cc | 3 +- .../regexp/regexp-macro-assembler-tracer.cc | 1 + deps/v8/src/regexp/regexp-parser.cc | 56 +- deps/v8/src/regexp/regexp-utils.cc | 9 +- deps/v8/src/regexp/x87/OWNERS | 1 + deps/v8/src/runtime-profiler.cc | 6 +- deps/v8/src/runtime/runtime-array.cc | 99 +- deps/v8/src/runtime/runtime-atomics.cc | 16 +- deps/v8/src/runtime/runtime-classes.cc | 182 +- deps/v8/src/runtime/runtime-collections.cc | 54 +- deps/v8/src/runtime/runtime-compiler.cc | 35 +- deps/v8/src/runtime/runtime-debug.cc | 414 +- deps/v8/src/runtime/runtime-error.cc | 2 +- deps/v8/src/runtime/runtime-function.cc | 38 +- deps/v8/src/runtime/runtime-futex.cc | 6 +- deps/v8/src/runtime/runtime-generator.cc | 83 +- deps/v8/src/runtime/runtime-i18n.cc | 453 +-- deps/v8/src/runtime/runtime-internal.cc | 166 +- deps/v8/src/runtime/runtime-interpreter.cc | 20 +- deps/v8/src/runtime/runtime-literals.cc | 38 +- deps/v8/src/runtime/runtime-liveedit.cc | 40 +- deps/v8/src/runtime/runtime-maths.cc | 2 +- deps/v8/src/runtime/runtime-module.cc | 6 +- deps/v8/src/runtime/runtime-numbers.cc | 22 +- deps/v8/src/runtime/runtime-object.cc | 172 +- deps/v8/src/runtime/runtime-promise.cc | 270 +- deps/v8/src/runtime/runtime-proxy.cc | 12 +- deps/v8/src/runtime/runtime-regexp.cc | 263 +- deps/v8/src/runtime/runtime-scopes.cc | 95 +- deps/v8/src/runtime/runtime-simd.cc | 64 +- deps/v8/src/runtime/runtime-strings.cc | 170 +- deps/v8/src/runtime/runtime-symbol.cc | 15 +- deps/v8/src/runtime/runtime-test.cc | 218 +- deps/v8/src/runtime/runtime-typedarray.cc | 22 +- deps/v8/src/runtime/runtime-utils.h | 11 +- deps/v8/src/runtime/runtime-wasm.cc | 142 +- deps/v8/src/runtime/runtime.cc | 1 + deps/v8/src/runtime/runtime.h | 146 +- deps/v8/src/s390/assembler-s390.cc | 603 +-- deps/v8/src/s390/assembler-s390.h | 354 +- deps/v8/src/s390/code-stubs-s390.cc | 495 +-- deps/v8/src/s390/code-stubs-s390.h | 13 - deps/v8/src/s390/codegen-s390.cc | 326 +- deps/v8/src/s390/constants-s390.h | 2403 +++++++---- deps/v8/src/s390/disasm-s390.cc | 36 + .../v8/src/s390/interface-descriptors-s390.cc | 8 +- deps/v8/src/s390/macro-assembler-s390.cc | 471 +-- deps/v8/src/s390/macro-assembler-s390.h | 101 +- deps/v8/src/s390/simulator-s390.cc | 244 +- deps/v8/src/s390/simulator-s390.h | 9 + deps/v8/src/snapshot/code-serializer.cc | 27 +- deps/v8/src/snapshot/deserializer.cc | 22 +- deps/v8/src/snapshot/deserializer.h | 9 +- deps/v8/src/snapshot/partial-serializer.cc | 12 +- deps/v8/src/snapshot/partial-serializer.h | 2 +- deps/v8/src/snapshot/serializer-common.cc | 12 +- deps/v8/src/snapshot/serializer-common.h | 2 + deps/v8/src/snapshot/snapshot-common.cc | 8 +- deps/v8/src/snapshot/snapshot-source-sink.cc | 2 +- deps/v8/src/snapshot/snapshot.h | 3 +- deps/v8/src/snapshot/startup-serializer.cc | 13 +- deps/v8/src/snapshot/startup-serializer.h | 1 + deps/v8/src/source-position.cc | 33 +- deps/v8/src/source-position.h | 9 +- deps/v8/src/string-case.cc | 130 + deps/v8/src/string-case.h | 17 + deps/v8/src/string-stream.cc | 56 +- deps/v8/src/string-stream.h | 116 +- deps/v8/src/tracing/traced-value.cc | 40 +- deps/v8/src/tracing/traced-value.h | 9 +- .../src/tracing/tracing-category-observer.cc | 7 + deps/v8/src/transitions.cc | 6 +- deps/v8/src/trap-handler/trap-handler.h | 26 + deps/v8/src/type-feedback-vector-inl.h | 23 +- deps/v8/src/type-feedback-vector.cc | 205 +- deps/v8/src/type-feedback-vector.h | 107 +- deps/v8/src/type-hints.cc | 51 + deps/v8/src/type-hints.h | 4 + deps/v8/src/type-info.cc | 4 + deps/v8/src/utils.h | 51 +- deps/v8/src/v8.cc | 2 +- deps/v8/src/v8.gyp | 79 +- deps/v8/src/value-serializer.cc | 70 +- deps/v8/src/value-serializer.h | 3 +- deps/v8/src/vector.h | 5 +- deps/v8/src/version.cc | 22 +- deps/v8/src/wasm/OWNERS | 1 + deps/v8/src/wasm/decoder.h | 43 +- ...st-decoder.cc => function-body-decoder.cc} | 936 ++--- ...{ast-decoder.h => function-body-decoder.h} | 166 +- deps/v8/src/wasm/module-decoder.cc | 389 +- deps/v8/src/wasm/module-decoder.h | 24 +- deps/v8/src/wasm/wasm-debug.cc | 341 +- deps/v8/src/wasm/wasm-external-refs.cc | 13 + deps/v8/src/wasm/wasm-external-refs.h | 6 + deps/v8/src/wasm/wasm-interpreter.cc | 199 +- deps/v8/src/wasm/wasm-interpreter.h | 36 +- deps/v8/src/wasm/wasm-js.cc | 719 +++- deps/v8/src/wasm/wasm-js.h | 11 +- deps/v8/src/wasm/wasm-limits.h | 45 + deps/v8/src/wasm/wasm-macro-gen.h | 62 +- deps/v8/src/wasm/wasm-module-builder.cc | 118 +- deps/v8/src/wasm/wasm-module-builder.h | 30 +- deps/v8/src/wasm/wasm-module.cc | 1913 +++++---- deps/v8/src/wasm/wasm-module.h | 234 +- deps/v8/src/wasm/wasm-objects.cc | 678 +++- deps/v8/src/wasm/wasm-objects.h | 321 +- deps/v8/src/wasm/wasm-opcodes.cc | 5 +- deps/v8/src/wasm/wasm-opcodes.h | 219 +- deps/v8/src/wasm/wasm-result.cc | 11 + deps/v8/src/wasm/wasm-result.h | 3 + deps/v8/src/wasm/wasm-text.cc | 312 ++ deps/v8/src/wasm/wasm-text.h | 38 + deps/v8/src/x64/assembler-x64-inl.h | 2 +- deps/v8/src/x64/assembler-x64.cc | 187 +- deps/v8/src/x64/assembler-x64.h | 3 - deps/v8/src/x64/code-stubs-x64.cc | 428 +- deps/v8/src/x64/code-stubs-x64.h | 17 - deps/v8/src/x64/codegen-x64.cc | 331 +- deps/v8/src/x64/interface-descriptors-x64.cc | 9 +- deps/v8/src/x64/macro-assembler-x64.cc | 282 +- deps/v8/src/x64/macro-assembler-x64.h | 85 +- deps/v8/src/x87/OWNERS | 1 + deps/v8/src/x87/assembler-x87.cc | 9 +- deps/v8/src/x87/assembler-x87.h | 3 - deps/v8/src/x87/code-stubs-x87.cc | 565 +-- deps/v8/src/x87/code-stubs-x87.h | 18 - deps/v8/src/x87/codegen-x87.cc | 296 +- deps/v8/src/x87/deoptimizer-x87.cc | 3 +- deps/v8/src/x87/interface-descriptors-x87.cc | 9 +- deps/v8/src/x87/macro-assembler-x87.cc | 290 +- deps/v8/src/x87/macro-assembler-x87.h | 80 +- deps/v8/src/zone/zone-chunk-list.h | 1 + deps/v8/src/zone/zone-containers.h | 7 + deps/v8/src/zone/zone-handle-set.h | 165 + deps/v8/src/zone/zone.cc | 1 + deps/v8/test/BUILD.gn | 6 +- deps/v8/test/cctest/BUILD.gn | 24 +- deps/v8/test/cctest/asmjs/OWNERS | 1 + deps/v8/test/cctest/asmjs/test-asm-typer.cc | 76 +- deps/v8/test/cctest/cctest.gyp | 39 +- deps/v8/test/cctest/cctest.h | 15 +- deps/v8/test/cctest/cctest.status | 100 +- .../cctest/compiler/code-assembler-tester.h | 57 +- .../test/cctest/compiler/function-tester.cc | 12 +- .../v8/test/cctest/compiler/function-tester.h | 3 +- .../cctest/compiler/test-code-assembler.cc | 312 +- .../test-js-context-specialization.cc | 472 ++- .../cctest/compiler/test-js-typed-lowering.cc | 9 +- .../compiler/test-loop-assignment-analysis.cc | 28 +- .../compiler/test-machine-operator-reducer.cc | 16 +- .../compiler/test-representation-change.cc | 2 +- .../test-run-bytecode-graph-builder.cc | 34 +- .../test/cctest/compiler/test-run-inlining.cc | 471 --- .../cctest/compiler/test-run-intrinsics.cc | 15 - .../test/cctest/compiler/test-run-jscalls.cc | 1 + .../test/cctest/compiler/test-run-machops.cc | 24 + .../cctest/compiler/test-run-native-calls.cc | 52 +- .../cctest/compiler/test-run-variables.cc | 1 + .../cctest/compiler/test-run-wasm-machops.cc | 44 +- deps/v8/test/cctest/heap/heap-tester.h | 1 + deps/v8/test/cctest/heap/heap-utils.cc | 1 + deps/v8/test/cctest/heap/test-alloc.cc | 6 +- .../cctest/heap/test-array-buffer-tracker.cc | 5 + deps/v8/test/cctest/heap/test-heap.cc | 211 +- .../cctest/heap/test-incremental-marking.cc | 28 +- deps/v8/test/cctest/heap/test-mark-compact.cc | 34 + .../test/cctest/heap/test-page-promotion.cc | 1 + .../bytecode-expectations-printer.cc | 25 +- .../ArrayLiterals.golden | 16 +- .../ArrayLiteralsWide.golden | 2 +- .../AssignmentsInBinaryExpression.golden | 42 +- .../bytecode_expectations/BasicLoops.golden | 166 +- .../BreakableBlocks.golden | 15 +- .../bytecode_expectations/CallGlobal.golden | 10 +- .../CallLookupSlot.golden | 12 +- .../bytecode_expectations/CallNew.golden | 15 +- .../bytecode_expectations/CallRuntime.golden | 4 +- .../ClassAndSuperClass.golden | 28 +- .../ClassDeclarations.golden | 177 +- .../CompoundExpressions.golden | 6 +- .../ConstVariableContextSlot.golden | 16 +- .../ContextParameters.golden | 16 +- .../ContextVariables.golden | 25 +- .../CountOperators.golden | 14 +- .../CreateRestParameter.golden | 2 +- .../DeclareGlobals.golden | 7 +- .../bytecode_expectations/Delete.golden | 4 +- .../bytecode_expectations/ForIn.golden | 8 +- .../bytecode_expectations/ForOf.golden | 199 +- .../FunctionLiterals.golden | 12 +- .../GenerateTestUndetectable.golden | 239 ++ .../bytecode_expectations/Generators.golden | 565 +-- .../GlobalCompoundExpressions.golden | 8 +- .../GlobalCountOperators.golden | 16 +- .../bytecode_expectations/GlobalDelete.golden | 12 +- .../LetVariableContextSlot.golden | 16 +- .../bytecode_expectations/LoadGlobal.golden | 20 +- .../bytecode_expectations/Modules.golden | 703 ++-- .../ObjectLiterals.golden | 98 +- .../OuterContextVariables.golden | 2 +- .../PrimitiveExpressions.golden | 40 +- .../bytecode_expectations/PropertyCall.golden | 2 +- .../RemoveRedundantLdar.golden | 6 +- .../SuperCallAndSpread.golden | 155 + .../bytecode_expectations/Switch.golden | 2 +- .../TopLevelObjectLiterals.golden | 6 +- .../bytecode_expectations/TryCatch.golden | 21 +- .../bytecode_expectations/TryFinally.golden | 45 +- .../bytecode_expectations/Typeof.golden | 5 +- .../UnaryOperators.golden | 21 +- .../cctest/interpreter/interpreter-tester.cc | 4 +- .../interpreter/test-bytecode-generator.cc | 95 +- .../test-interpreter-intrinsics.cc | 21 - .../cctest/interpreter/test-interpreter.cc | 25 +- .../interpreter/test-source-positions.cc | 4 +- .../test/cctest/libplatform/test-tracing.cc | 8 + .../cctest/parsing/test-parse-decision.cc | 107 + .../cctest/parsing/test-scanner-streams.cc | 31 +- deps/v8/test/cctest/parsing/test-scanner.cc | 37 +- deps/v8/test/cctest/test-access-checks.cc | 99 + .../v8/test/cctest/test-accessor-assembler.cc | 263 ++ deps/v8/test/cctest/test-api-accessors.cc | 31 + .../cctest/test-api-fast-accessor-builder.cc | 1 + deps/v8/test/cctest/test-api-interceptors.cc | 128 +- deps/v8/test/cctest/test-api.cc | 984 +++-- deps/v8/test/cctest/test-assembler-arm.cc | 700 +++- deps/v8/test/cctest/test-assembler-mips.cc | 6 +- deps/v8/test/cctest/test-assembler-mips64.cc | 6 +- deps/v8/test/cctest/test-assembler-s390.cc | 89 +- deps/v8/test/cctest/test-assembler-x64.cc | 183 + deps/v8/test/cctest/test-ast.cc | 48 +- .../test/cctest/test-code-stub-assembler.cc | 1534 ++++--- deps/v8/test/cctest/test-compiler.cc | 2 +- deps/v8/test/cctest/test-conversions.cc | 58 + deps/v8/test/cctest/test-cpu-profiler.cc | 12 +- deps/v8/test/cctest/test-debug.cc | 1933 +-------- deps/v8/test/cctest/test-disasm-arm.cc | 187 + deps/v8/test/cctest/test-extra.js | 3 +- deps/v8/test/cctest/test-feedback-vector.cc | 14 + .../test/cctest/test-field-type-tracking.cc | 186 +- deps/v8/test/cctest/test-flags.cc | 2 +- deps/v8/test/cctest/test-global-handles.cc | 1 + deps/v8/test/cctest/test-global-object.cc | 28 + deps/v8/test/cctest/test-heap-profiler.cc | 96 +- .../cctest/test-inobject-slack-tracking.cc | 5 +- deps/v8/test/cctest/test-javascript-arm64.cc | 1 + .../v8/test/cctest/test-js-arm64-variables.cc | 1 + deps/v8/test/cctest/test-liveedit.cc | 1 + deps/v8/test/cctest/test-lockers.cc | 4 +- deps/v8/test/cctest/test-log.cc | 1 + .../test/cctest/test-macro-assembler-arm.cc | 356 ++ .../test/cctest/test-macro-assembler-mips.cc | 609 ++- .../cctest/test-macro-assembler-mips64.cc | 791 +++- deps/v8/test/cctest/test-object.cc | 1 + deps/v8/test/cctest/test-parsing.cc | 1111 ++++-- deps/v8/test/cctest/test-profile-generator.cc | 1 + deps/v8/test/cctest/test-regexp.cc | 3 +- deps/v8/test/cctest/test-serialize.cc | 370 +- deps/v8/test/cctest/test-strings.cc | 36 + .../v8/test/cctest/test-thread-termination.cc | 5 +- deps/v8/test/cctest/test-transitions.cc | 19 - deps/v8/test/cctest/test-typedarrays.cc | 1 + deps/v8/test/cctest/test-unboxed-doubles.cc | 28 +- deps/v8/test/cctest/test-usecounters.cc | 43 + deps/v8/test/cctest/test-weakmaps.cc | 1 + deps/v8/test/cctest/wasm/OWNERS | 1 + deps/v8/test/cctest/wasm/test-run-wasm-64.cc | 473 ++- .../test/cctest/wasm/test-run-wasm-asmjs.cc | 177 +- .../cctest/wasm/test-run-wasm-interpreter.cc | 102 +- deps/v8/test/cctest/wasm/test-run-wasm-js.cc | 98 +- .../test/cctest/wasm/test-run-wasm-module.cc | 168 +- .../cctest/wasm/test-run-wasm-relocation.cc | 28 +- .../wasm/test-run-wasm-simd-lowering.cc | 262 +- .../v8/test/cctest/wasm/test-run-wasm-simd.cc | 400 +- deps/v8/test/cctest/wasm/test-run-wasm.cc | 1431 ++++--- .../test/cctest/wasm/test-wasm-breakpoints.cc | 70 + deps/v8/test/cctest/wasm/test-wasm-stack.cc | 62 +- .../cctest/wasm/test-wasm-trap-position.cc | 54 +- deps/v8/test/cctest/wasm/wasm-run-utils.h | 675 ++-- deps/v8/test/common/wasm/test-signatures.h | 48 +- .../v8/test/common/wasm/wasm-module-runner.cc | 51 +- deps/v8/test/common/wasm/wasm-module-runner.h | 15 +- .../bugs/harmony/debug-blockscopes.js | 69 +- .../debug}/compiler/debug-catch-prediction.js | 1 - .../debug/compiler/osr-typing-debug-change.js | 6 +- .../debug/debug-backtrace.js} | 71 +- .../debug}/debug-break-native.js | 2 - .../debug}/debug-breakpoints.js | 105 - .../debug/debug-clearbreakpoint.js} | 45 +- .../debug}/debug-compile-event.js | 26 +- .../debug}/debug-conditional-breakpoints.js | 23 +- .../debug-enable-disable-breakpoints.js | 47 +- .../debug}/debug-eval-scope.js | 2 +- .../debug}/debug-evaluate-bool-constructor.js | 28 +- .../debug-evaluate-locals-optimized-double.js | 3 +- .../debug}/debug-evaluate-locals.js | 12 +- .../debug-evaluate-no-side-effect-builtins.js | 79 + .../debug/debug-evaluate-no-side-effect.js | 83 + .../debug}/debug-evaluate-shadowed-context.js | 2 +- .../debugger/debug/debug-evaluate-with.js | 2 + .../debug/debug-evaluate.js} | 79 +- .../debugger/debug/debug-function-scopes.js | 191 + .../debug}/debug-liveedit-1.js | 2 - .../debug}/debug-liveedit-2.js | 3 +- .../debug}/debug-liveedit-3.js | 2 - .../debug}/debug-liveedit-4.js | 3 +- .../debug}/debug-liveedit-check-stack.js | 2 - .../debug}/debug-liveedit-compile-error.js | 2 - .../debug}/debug-liveedit-diff.js | 2 - .../debug}/debug-liveedit-double-call.js | 2 - .../debug}/debug-liveedit-exceptions.js | 1 - .../debug}/debug-liveedit-literals.js | 2 - .../debug}/debug-liveedit-newsource.js | 2 - .../debug-liveedit-patch-positions-replace.js | 2 - .../debug}/debug-liveedit-restart-frame.js | 4 +- .../debug}/debug-liveedit-stack-padding.js | 2 - .../debug}/debug-liveedit-stepin.js | 1 - .../debug}/debug-liveedit-utils.js | 2 - .../debug}/debug-multiple-breakpoints.js | 35 +- .../debug}/debug-multiple-var-decl.js | 1 - .../debug}/debug-negative-break-points.js | 29 +- .../debug}/debug-receiver.js | 6 +- .../debug}/debug-return-value.js | 46 - .../debug-scopes-suspended-generators.js | 184 +- .../debug}/debug-scopes.js | 181 +- .../debug}/debug-script.js | 15 +- .../debug}/debug-scripts-throw.js | 6 +- .../debug}/debug-set-variable-value.js | 54 - .../debug}/debug-setbreakpoint.js | 102 +- .../debug}/debug-sourceinfo.js | 12 +- deps/v8/test/debugger/debug/debug-step.js | 38 +- .../debug}/debug-stepframe-clearing.js | 1 - .../debug}/debug-stepframe.js | 1 - .../debug}/es6/debug-blockscopes.js | 70 +- .../debug-evaluate-arrow-function-receiver.js | 3 +- .../debug}/es6/debug-evaluate-blockscopes.js | 2 - .../debug-evaluate-receiver-before-super.js | 3 +- .../debug}/es6/debug-exception-generators.js | 1 - .../debug}/es6/debug-function-scopes.js | 88 +- .../debug}/es6/debug-liveedit-new-target-1.js | 1 - .../debug}/es6/debug-liveedit-new-target-2.js | 1 - .../debug}/es6/debug-liveedit-new-target-3.js | 1 - .../es6/debug-promises/async-task-event.js | 62 - .../debug-promises/promise-all-uncaught.js | 3 - .../debug-promises/promise-race-uncaught.js | 3 - .../es6/debug-promises/reject-caught-all.js | 2 - ...reject-caught-by-default-reject-handler.js | 3 - .../debug-promises/reject-in-constructor.js | 2 - .../es6/debug-promises/reject-uncaught-all.js | 3 - .../debug-promises/reject-uncaught-late.js | 3 - .../reject-uncaught-uncaught.js | 3 - .../reject-with-invalid-reject.js | 1 - .../reject-with-throw-in-reject.js | 1 - .../reject-with-undefined-reject.js | 1 - .../es6/debug-promises/throw-caught-all.js | 2 - .../throw-caught-by-default-reject-handler.js | 3 - .../throw-finally-caught-all.js | 2 - .../debug-promises/throw-in-constructor.js | 2 - .../es6/debug-promises/throw-uncaught-all.js | 3 - .../debug-promises/throw-uncaught-uncaught.js | 4 - .../throw-with-throw-in-reject.js | 2 - .../try-reject-in-constructor.js | 2 - .../try-throw-reject-in-constructor.js | 2 - .../debug-scope-default-param-with-eval.js | 1 - .../es6/debug-stepin-default-parameters.js | 1 - .../debug/es6/debug-stepin-generators.js | 6 +- .../debug}/es6/debug-stepin-microtasks.js | 7 +- .../debug}/es6/debug-stepin-proxies.js | 1 - .../es6/debug-stepin-string-template.js | 1 - .../debug}/es6/debug-stepnext-for.js | 2 +- .../debug/es6/debug-stepnext-generators.js | 48 + .../debug}/es6/default-parameters-debug.js | 4 +- .../debug}/es6/generators-debug-liveedit.js | 1 - .../debug}/es6/generators-debug-scopes.js | 83 +- .../debug}/es6/regress/regress-468661.js | 1 - .../{harmony => es8}/async-debug-basic.js | 2 - .../async-debug-caught-exception-cases.js | 7 +- .../async-debug-caught-exception-cases0.js} | 5 +- .../async-debug-caught-exception-cases1.js | 3 +- .../async-debug-caught-exception-cases2.js | 3 +- .../async-debug-caught-exception-cases3.js | 3 +- .../async-debug-caught-exception.js | 2 - .../async-debug-step-abort-at-break.js | 2 - .../async-debug-step-continue-at-break.js | 2 - .../async-debug-step-in-and-out.js | 2 - .../async-debug-step-in-out-out.js | 2 - .../{harmony => es8}/async-debug-step-in.js | 2 - .../async-debug-step-nested.js | 2 - .../async-debug-step-next-constant.js | 2 - .../{harmony => es8}/async-debug-step-next.js | 2 - .../{harmony => es8}/async-debug-step-out.js | 2 - .../es8}/async-function-debug-evaluate.js | 2 - .../debug/es8}/async-function-debug-scopes.js | 78 +- .../debug-async-break-on-stack.js | 2 - .../{harmony => es8}/debug-async-break.js | 2 - .../debug/es8}/debug-async-liveedit.js | 3 - .../debug}/function-source.js | 2 - .../debug-async-function-async-task-event.js | 97 - .../debug/harmony}/modules-debug-scopes1.js | 160 +- .../debug/harmony}/modules-debug-scopes2.js | 70 +- .../ignition/debug-step-prefix-bytecodes.js | 3 +- .../debug}/ignition/elided-instruction.js | 1 - .../debug}/ignition/optimized-debug-frame.js | 1 - .../debug}/regress-5207.js | 3 +- .../debug}/regress/regress-102153.js | 1 - .../debug}/regress/regress-1081309.js | 58 +- .../debug}/regress/regress-109195.js | 2 +- .../debug}/regress/regress-119609.js | 7 +- .../debugger/debug/regress/regress-131994.js | 2 + .../debug}/regress/regress-1639.js | 18 +- .../debug}/regress/regress-1853.js | 40 +- .../debug}/regress/regress-2296.js | 1 - .../debug}/regress/regress-3960.js | 1 - .../debug}/regress/regress-419663.js | 11 +- .../debug}/regress/regress-4309-2.js | 1 - .../debugger/debug/regress/regress-5071.js | 2 + .../debug}/regress/regress-5164.js | 1 - .../debugger/debug/regress/regress-617882.js | 2 +- .../debugger/debug/regress/regress-94873.js | 76 - .../debug}/regress/regress-crbug-119800.js | 1 - .../debug}/regress/regress-crbug-171715.js | 1 - .../debug}/regress/regress-crbug-222893.js | 4 +- .../debug}/regress/regress-crbug-424142.js | 1 - .../debug}/regress/regress-crbug-432493.js | 1 - .../debug}/regress/regress-crbug-465298.js | 5 +- .../debug}/regress/regress-crbug-481896.js | 3 +- .../debug}/regress/regress-crbug-487289.js | 1 - .../debug}/regress/regress-crbug-491943.js | 1 - .../debug}/regress/regress-crbug-517592.js | 2 +- .../debug/regress/regress-crbug-568477-1.js | 5 +- .../debug}/regress/regress-crbug-568477-2.js | 8 +- .../debug/regress/regress-crbug-568477-3.js | 5 +- .../debug/regress/regress-crbug-568477-4.js | 8 +- .../debug}/regress/regress-crbug-605581.js | 1 - .../debug}/regress/regress-crbug-621361.js | 7 +- .../regress-debug-deopt-while-recompile.js | 1 - .../regress-frame-details-null-receiver.js | 1 - .../regress-prepare-break-while-recompile.js | 1 - .../debug}/wasm/frame-inspection.js | 25 +- deps/v8/test/debugger/debugger.status | 82 +- .../regress/regress-1639-2.js | 33 +- .../regress/regress-2318.js | 2 +- deps/v8/test/debugger/regress/regress-5610.js | 2 +- deps/v8/test/debugger/test-api.js | 583 ++- deps/v8/test/debugger/testcfg.py | 3 + deps/v8/test/fuzzer/fuzzer.gyp | 8 + deps/v8/test/fuzzer/parser.cc | 6 +- deps/v8/test/fuzzer/regexp.cc | 30 +- deps/v8/test/fuzzer/wasm-call.cc | 23 +- deps/v8/test/fuzzer/wasm-code.cc | 51 +- deps/v8/test/inspector/BUILD.gn | 3 +- deps/v8/test/inspector/DEPS | 1 + ...asm-js-breakpoint-before-exec-expected.txt | 30 +- .../debugger/asm-js-breakpoint-before-exec.js | 6 +- .../async-instrumentation-expected.txt | 43 + .../debugger/async-instrumentation.js | 68 + .../async-promise-late-then-expected.txt | 16 + .../debugger/async-promise-late-then.js | 48 + .../debugger/async-set-timeout-expected.txt | 11 + .../inspector/debugger/async-set-timeout.js | 48 + .../debugger/async-stack-await-expected.txt | 42 + .../inspector/debugger/async-stack-await.js | 46 + .../async-stack-for-promise-expected.txt | 155 + .../debugger/async-stack-for-promise.js | 265 ++ .../debugger/async-stacks-limit-expected.txt | 137 + .../inspector/debugger/async-stacks-limit.js | 156 + .../debugger/eval-scopes-expected.txt | 19 + .../v8/test/inspector/debugger/eval-scopes.js | 43 + ...t-preview-internal-properties-expected.txt | 9 +- ...t-parsed-for-runtime-evaluate-expected.txt | 101 + .../script-parsed-for-runtime-evaluate.js | 49 + .../set-script-source-exception-expected.txt | 23 + .../debugger/set-script-source-exception.js | 23 + .../step-into-nested-arrow-expected.txt | 17 + .../debugger/step-into-nested-arrow.js | 23 + .../suspended-generator-scopes-expected.txt | 63 + .../debugger/suspended-generator-scopes.js | 78 + .../debugger/wasm-scripts-expected.txt | 18 + .../test/inspector/debugger/wasm-scripts.js | 71 + .../debugger/wasm-source-expected.txt | 9 + .../v8/test/inspector/debugger/wasm-source.js | 79 + .../debugger/wasm-stack-expected.txt | 6 +- deps/v8/test/inspector/debugger/wasm-stack.js | 14 +- deps/v8/test/inspector/inspector-impl.cc | 13 +- deps/v8/test/inspector/inspector-test.cc | 59 +- deps/v8/test/inspector/inspector.status | 10 + deps/v8/test/inspector/protocol-test.js | 22 +- .../runtime/await-promise-expected.txt | 12 + .../runtime/call-function-on-async.js | 2 +- .../runtime/console-assert-expected.txt | 147 + .../test/inspector/runtime/console-assert.js | 24 + .../console-messages-limits-expected.txt | 7 + .../runtime/console-messages-limits.js | 44 + .../runtime/evaluate-empty-stack-expected.txt | 10 + .../inspector/runtime/evaluate-empty-stack.js | 13 + ...valuate-with-generate-preview-expected.txt | 102 + .../runtime/evaluate-with-generate-preview.js | 76 + .../length-or-size-description-expected.txt | 17 + .../runtime/length-or-size-description.js | 23 + .../runtime/set-or-map-entries-expected.txt | 8 +- deps/v8/test/inspector/task-runner.cc | 35 +- deps/v8/test/inspector/task-runner.h | 23 +- deps/v8/test/intl/assert.js | 6 +- deps/v8/test/intl/bad-target.js | 39 + .../intl/date-format/unmodified-options.js | 17 + deps/v8/test/intl/general/case-mapping.js | 58 +- deps/v8/test/intl/general/constructor.js | 44 + deps/v8/test/intl/intl.status | 4 + deps/v8/test/intl/not-constructors.js | 34 + deps/v8/test/intl/toStringTag.js | 29 + .../AsyncAwait/baseline-babel-es2017.js | 169 + .../AsyncAwait/baseline-naive-promises.js | 52 + .../v8/test/js-perf-test/AsyncAwait/native.js | 43 + deps/v8/test/js-perf-test/AsyncAwait/run.js | 28 + .../v8/test/js-perf-test/Closures/closures.js | 43 + deps/v8/test/js-perf-test/Closures/run.js | 26 + deps/v8/test/js-perf-test/JSTests.json | 39 + deps/v8/test/js-perf-test/RegExp.json | 61 + .../test/js-perf-test/RegExp/RegExpTests.json | 61 + deps/v8/test/js-perf-test/RegExp/base.js | 43 + deps/v8/test/js-perf-test/RegExp/base_ctor.js | 55 + deps/v8/test/js-perf-test/RegExp/base_exec.js | 57 + .../v8/test/js-perf-test/RegExp/base_flags.js | 21 + .../v8/test/js-perf-test/RegExp/base_match.js | 32 + .../test/js-perf-test/RegExp/base_replace.js | 54 + .../test/js-perf-test/RegExp/base_search.js | 33 + .../v8/test/js-perf-test/RegExp/base_split.js | 56 + deps/v8/test/js-perf-test/RegExp/base_test.js | 26 + deps/v8/test/js-perf-test/RegExp/ctor.js | 8 + deps/v8/test/js-perf-test/RegExp/exec.js | 8 + deps/v8/test/js-perf-test/RegExp/flags.js | 8 + deps/v8/test/js-perf-test/RegExp/match.js | 8 + deps/v8/test/js-perf-test/RegExp/replace.js | 8 + deps/v8/test/js-perf-test/RegExp/run.js | 41 + deps/v8/test/js-perf-test/RegExp/search.js | 8 + deps/v8/test/js-perf-test/RegExp/slow_exec.js | 8 + .../v8/test/js-perf-test/RegExp/slow_flags.js | 8 + .../v8/test/js-perf-test/RegExp/slow_match.js | 8 + .../test/js-perf-test/RegExp/slow_replace.js | 8 + .../test/js-perf-test/RegExp/slow_search.js | 8 + .../v8/test/js-perf-test/RegExp/slow_split.js | 8 + deps/v8/test/js-perf-test/RegExp/slow_test.js | 8 + deps/v8/test/js-perf-test/RegExp/split.js | 8 + deps/v8/test/js-perf-test/RegExp/test.js | 8 + deps/v8/test/js-perf-test/SixSpeed.json | 28 + .../array_destructuring.js | 38 + .../SixSpeed/array_destructuring/run.js | 25 + .../object_literals/object_literals.js | 41 + .../SixSpeed/object_literals/run.js | 25 + .../v8/test/message/call-non-constructable.js | 8 + .../test/message/call-non-constructable.out | 9 + .../message/call-primitive-constructor.js | 6 + .../message/call-primitive-constructor.out | 9 + .../test/message/call-primitive-function.js | 6 + .../test/message/call-primitive-function.out | 9 + .../test/message/call-undeclared-function.js | 5 + .../test/message/call-undeclared-function.out | 9 + deps/v8/test/message/for-loop-invalid-lhs.js | 4 - deps/v8/test/message/for-loop-invalid-lhs.out | 2 +- deps/v8/test/message/message.status | 6 - .../message/regress/regress-crbug-661579.js | 12 + .../message/regress/regress-crbug-661579.out | 11 + .../message/regress/regress-crbug-669017.js | 5 + .../message/regress/regress-crbug-669017.out | 8 + deps/v8/test/message/strict-octal-string.out | 4 +- .../message/strict-octal-use-strict-after.out | 4 +- .../strict-octal-use-strict-before.out | 4 +- deps/v8/test/message/tonumber-symbol.js | 9 + deps/v8/test/message/tonumber-symbol.out | 6 + deps/v8/test/message/wasm-trap.js | 15 + deps/v8/test/message/wasm-trap.out | 5 + deps/v8/test/mjsunit/array-length.js | 27 + .../v8/test/mjsunit/array-push-hole-double.js | 23 + deps/v8/test/mjsunit/array-push11.js | 19 +- deps/v8/test/mjsunit/array-push13.js | 22 + deps/v8/test/mjsunit/array-push14.js | 18 + deps/v8/test/mjsunit/asm/asm-validation.js | 144 +- deps/v8/test/mjsunit/asm/regress-641885.js | 13 + deps/v8/test/mjsunit/asm/regress-669899.js | 27 + deps/v8/test/mjsunit/asm/regress-672045.js | 13 + deps/v8/test/mjsunit/asm/regress-676573.js | 17 + deps/v8/test/mjsunit/big-array-literal.js | 5 + .../test/mjsunit/compiler/capture-context.js | 16 + .../mjsunit/compiler/escape-analysis-11.js | 19 + .../mjsunit/compiler/escape-analysis-12.js | 17 + .../compiler/escape-analysis-deopt-6.js | 16 + ...-analysis-framestate-use-at-branchpoint.js | 19 + .../escape-analysis-replacement.js} | 26 +- .../mjsunit/compiler/inline-context-deopt.js | 18 + .../compiler/inline-omit-arguments-deopt.js | 19 + .../compiler/inline-omit-arguments-object.js | 14 + .../mjsunit/compiler/inline-omit-arguments.js | 12 + .../inline-surplus-arguments-deopt.js | 20 + .../inline-surplus-arguments-object.js | 17 + .../compiler/inline-surplus-arguments.js | 12 + .../test/mjsunit/compiler/instanceof-opt1.js | 18 + .../test/mjsunit/compiler/instanceof-opt2.js | 16 + .../test/mjsunit/compiler/instanceof-opt3.js | 17 + .../test/mjsunit/compiler/regress-664117.js | 16 + .../test/mjsunit/compiler/regress-668760.js | 28 + .../test/mjsunit/compiler/regress-669517.js | 17 + .../test/mjsunit/compiler/regress-671574.js | 21 + .../test/mjsunit/compiler/regress-674469.js | 14 + .../mjsunit/compiler/regress-uint8-deopt.js | 17 - .../test/mjsunit/compiler/regress-v8-5756.js | 31 + .../constant-fold-control-instructions.js | 3 - deps/v8/test/mjsunit/cross-realm-filtering.js | 10 + deps/v8/test/mjsunit/debug-backtrace-text.js | 150 - deps/v8/test/mjsunit/debug-backtrace.js | 271 -- .../v8/test/mjsunit/debug-changebreakpoint.js | 102 - deps/v8/test/mjsunit/debug-clearbreakpoint.js | 100 - .../mjsunit/debug-clearbreakpointgroup.js | 127 - .../debug-compile-event-newfunction.js | 68 - deps/v8/test/mjsunit/debug-constructed-by.js | 60 - deps/v8/test/mjsunit/debug-continue.js | 115 - deps/v8/test/mjsunit/debug-evaluate-nested.js | 49 - .../test/mjsunit/debug-evaluate-recursive.js | 167 - .../mjsunit/debug-evaluate-with-context.js | 145 - deps/v8/test/mjsunit/debug-evaluate.js | 156 - deps/v8/test/mjsunit/debug-function-scopes.js | 156 - deps/v8/test/mjsunit/debug-handle.js | 252 -- deps/v8/test/mjsunit/debug-is-active.js | 28 - deps/v8/test/mjsunit/debug-listbreakpoints.js | 210 - .../mjsunit/debug-liveedit-breakpoints.js | 115 - deps/v8/test/mjsunit/debug-referenced-by.js | 112 - deps/v8/test/mjsunit/debug-references.js | 120 - .../debug-script-breakpoints-closure.js | 67 - .../debug-script-breakpoints-nested.js | 82 - .../test/mjsunit/debug-script-breakpoints.js | 125 - deps/v8/test/mjsunit/debug-scripts-request.js | 112 - .../test/mjsunit/debug-set-script-source.js | 64 - .../test/mjsunit/debug-setexceptionbreak.js | 119 - deps/v8/test/mjsunit/debugPrint.js | 29 + ...agerly-parsed-lazily-compiled-functions.js | 2 - deps/v8/test/mjsunit/element-accessor.js | 12 +- .../mjsunit/es6/array-iterator-detached.js | 47 + .../es6/arrow-rest-params-lazy-parsing.js | 2 - .../es6/block-scoping-top-level-sloppy.js | 2 - .../mjsunit/es6/block-scoping-top-level.js | 1 - .../test/mjsunit/es6/classes-lazy-parsing.js | 2 - deps/v8/test/mjsunit/es6/completion.js | 22 +- .../es6/computed-property-names-classes.js | 6 +- .../es6/destructuring-assignment-lazy.js | 2 - deps/v8/test/mjsunit/es6/destructuring.js | 9 +- deps/v8/test/mjsunit/es6/function-name.js | 49 + .../mjsunit/es6/generator-destructuring.js | 9 +- deps/v8/test/mjsunit/es6/generators-mirror.js | 112 - .../v8/test/mjsunit/es6/mirror-collections.js | 165 - deps/v8/test/mjsunit/es6/mirror-iterators.js | 103 - deps/v8/test/mjsunit/es6/mirror-promises.js | 90 - deps/v8/test/mjsunit/es6/mirror-symbols.js | 38 - .../es6/promise-lookup-getter-setter.js | 76 + deps/v8/test/mjsunit/es6/regexp-sticky.js | 7 + .../test/mjsunit/es6/regress/regress-4400.js | 2 - .../mjsunit/es6/regress/regress-594084.js | 1 - deps/v8/test/mjsunit/es6/string-startswith.js | 1 + .../test/mjsunit/es6/typedarray-neutered.js | 781 ++++ deps/v8/test/mjsunit/es6/typedarray.js | 25 + .../async-arrow-lexical-arguments.js | 2 +- .../async-arrow-lexical-new.target.js | 2 +- .../async-arrow-lexical-super.js | 2 +- .../async-arrow-lexical-this.js | 2 +- .../{harmony => es8}/async-await-basic.js | 32 +- .../async-await-no-constructor.js | 4 +- .../async-await-resolve-new.js | 2 - .../{harmony => es8}/async-await-species.js | 2 +- .../{harmony => es8}/async-destructuring.js | 11 +- .../async-function-stacktrace.js | 2 - .../regress/regress-618603.js | 2 - .../regress/regress-624300.js | 2 - .../sloppy-no-duplicate-async.js | 2 - deps/v8/test/mjsunit/fast-prototype.js | 3 +- .../fixed-context-shapes-when-recompiling.js | 264 +- deps/v8/test/mjsunit/for-in.js | 26 + .../mjsunit/harmony/harmony-string-pad-end.js | 2 - .../harmony/harmony-string-pad-start.js | 2 - .../harmony/mirror-async-function-promise.js | 93 - .../mjsunit/harmony/mirror-async-function.js | 76 - .../mjsunit/harmony/object-spread-basic.js | 111 + .../mjsunit/harmony/regexp-property-blocks.js | 36 - .../harmony/regexp-property-enumerated.js | 19 +- .../harmony/regexp-property-exact-match.js | 2 +- .../regexp-property-general-category.js | 4 + .../harmony/regexp-property-invalid.js | 38 + .../regexp-property-script-extensions.js | 2821 +++++++++++++ deps/v8/test/mjsunit/ignition/regress-5768.js | 16 + deps/v8/test/mjsunit/lazy-inner-functions.js | 19 +- deps/v8/test/mjsunit/mirror-array.js | 138 - deps/v8/test/mjsunit/mirror-boolean.js | 59 - deps/v8/test/mjsunit/mirror-date.js | 77 - deps/v8/test/mjsunit/mirror-error.js | 94 - deps/v8/test/mjsunit/mirror-function.js | 91 - deps/v8/test/mjsunit/mirror-null.js | 50 - deps/v8/test/mjsunit/mirror-number.js | 77 - deps/v8/test/mjsunit/mirror-object.js | 291 -- deps/v8/test/mjsunit/mirror-regexp.js | 101 - deps/v8/test/mjsunit/mirror-script.js | 88 - deps/v8/test/mjsunit/mirror-string.js | 89 - deps/v8/test/mjsunit/mirror-undefined.js | 50 - .../mjsunit/mirror-unresolved-function.js | 81 - deps/v8/test/mjsunit/mjsunit.js | 2 +- deps/v8/test/mjsunit/mjsunit.status | 141 +- deps/v8/test/mjsunit/modules-namespace1.js | 44 +- deps/v8/test/mjsunit/modules-namespace2.js | 4 +- deps/v8/test/mjsunit/modules-preparse.js | 1 - deps/v8/test/mjsunit/noopt.js | 17 + ...9300.js => number-tostring-big-integer.js} | 28 +- deps/v8/test/mjsunit/number-tostring.js | 7 + deps/v8/test/mjsunit/object-literal.js | 41 + .../mjsunit/preparse-toplevel-strict-eval.js | 2 - deps/v8/test/mjsunit/regress/regress-2263.js | 24 + .../mjsunit/{ => regress}/regress-3456.js | 2 - .../v8/test/mjsunit/regress/regress-353551.js | 2 +- .../{regress-4399.js => regress-4399-01.js} | 0 .../regress-4399-02.js} | 0 deps/v8/test/mjsunit/regress/regress-4870.js | 10 + deps/v8/test/mjsunit/regress/regress-4962.js | 11 + .../v8/test/mjsunit/regress/regress-5295-2.js | 20 + deps/v8/test/mjsunit/regress/regress-5295.js | 18 + deps/v8/test/mjsunit/regress/regress-5405.js | 2 +- .../regress/regress-5664.js} | 6 +- deps/v8/test/mjsunit/regress/regress-5669.js | 21 + deps/v8/test/mjsunit/regress/regress-5736.js | 34 + deps/v8/test/mjsunit/regress/regress-5749.js | 23 + .../v8/test/mjsunit/regress/regress-575364.js | 2 +- deps/v8/test/mjsunit/regress/regress-5767.js | 5 + deps/v8/test/mjsunit/regress/regress-5772.js | 42 + deps/v8/test/mjsunit/regress/regress-5780.js | 16 + deps/v8/test/mjsunit/regress/regress-5783.js | 8 + deps/v8/test/mjsunit/regress/regress-5836.js | 7 + .../v8/test/mjsunit/regress/regress-585775.js | 2 +- .../mjsunit/{ => regress}/regress-587004.js | 0 deps/v8/test/mjsunit/regress/regress-5943.js | 14 + .../v8/test/mjsunit/regress/regress-599825.js | 2 +- .../mjsunit/{ => regress}/regress-604044.js | 2 - .../v8/test/mjsunit/regress/regress-613928.js | 2 +- .../v8/test/mjsunit/regress/regress-617525.js | 2 +- .../v8/test/mjsunit/regress/regress-617529.js | 2 +- .../v8/test/mjsunit/regress/regress-618608.js | 4 +- .../v8/test/mjsunit/regress/regress-648719.js | 5 + .../v8/test/mjsunit/regress/regress-667603.js | 9 + .../v8/test/mjsunit/regress/regress-669024.js | 21 + .../v8/test/mjsunit/regress/regress-670671.js | 23 + .../v8/test/mjsunit/regress/regress-670808.js | 22 + .../regress/regress-670981-array-push.js | 8 + .../v8/test/mjsunit/regress/regress-672041.js | 23 + .../v8/test/mjsunit/regress/regress-673241.js | 13 + .../v8/test/mjsunit/regress/regress-673242.js | 31 + .../v8/test/mjsunit/regress/regress-673297.js | 13 + .../v8/test/mjsunit/regress/regress-674232.js | 16 + .../v8/test/mjsunit/regress/regress-677055.js | 11 + .../v8/test/mjsunit/regress/regress-677685.js | 32 + .../v8/test/mjsunit/regress/regress-678917.js | 24 + .../v8/test/mjsunit/regress/regress-679727.js | 6 + .../test/mjsunit/regress/regress-681171-1.js | 13 + .../test/mjsunit/regress/regress-681171-2.js | 12 + .../test/mjsunit/regress/regress-681171-3.js | 11 + .../v8/test/mjsunit/regress/regress-681383.js | 19 + .../v8/test/mjsunit/regress/regress-693500.js | 5 + .../mjsunit/regress/regress-builtinbust-7.js | 2 +- .../mjsunit/regress/regress-crbug-513507.js | 2 +- .../{ => regress}/regress-crbug-528379.js | 0 .../mjsunit/regress/regress-crbug-580934.js | 2 - .../{ => regress}/regress-crbug-619476.js | 0 .../mjsunit/regress/regress-crbug-627828.js | 35 +- .../mjsunit/regress/regress-crbug-629996.js | 9 - .../mjsunit/regress/regress-crbug-648740.js | 2 - .../mjsunit/regress/regress-crbug-659915a.js | 2 +- .../mjsunit/regress/regress-crbug-659915b.js | 2 +- .../mjsunit/regress/regress-crbug-662854.js | 10 + .../mjsunit/regress/regress-crbug-662907.js | 53 + .../mjsunit/regress/regress-crbug-663340.js | 32 + .../mjsunit/regress/regress-crbug-663410.js | 8 + .../mjsunit/regress/regress-crbug-663750.js | 10 +- .../mjsunit/regress/regress-crbug-665587.js | 16 + .../mjsunit/regress/regress-crbug-665793.js | 12 + .../mjsunit/regress/regress-crbug-666308.js | 9 + .../mjsunit/regress/regress-crbug-666742.js | 15 + .../mjsunit/regress/regress-crbug-668101.js | 21 + .../mjsunit/regress/regress-crbug-668414.js | 58 + .../mjsunit/regress/regress-crbug-668795.js | 21 + .../mjsunit/regress/regress-crbug-669411.js | 11 + .../mjsunit/regress/regress-crbug-669451.js | 15 + .../mjsunit/regress/regress-crbug-669540.js | 15 + .../mjsunit/regress/regress-crbug-669850.js | 11 + .../mjsunit/regress/regress-crbug-671576.js | 13 + .../mjsunit/regress/regress-crbug-672792.js | 18 + .../mjsunit/regress/regress-crbug-677757.js | 7 + .../mjsunit/regress/regress-crbug-679378.js | 19 + .../regress/regress-crbug-679841.js} | 4 +- .../mjsunit/regress/regress-crbug-683667.js | 14 + .../mjsunit/regress/regress-crbug-686102.js | 15 + .../mjsunit/regress/regress-crbug-686427.js | 15 + .../mjsunit/regress/regress-crbug-691323.js | 35 + ...egress-keyed-store-non-strict-arguments.js | 0 .../test/mjsunit/{ => regress}/regress-ntl.js | 0 .../regress/regress-private-enumerable.js | 23 + .../regress-sync-optimized-lists.js | 0 .../test/mjsunit/regress/regress-v8-5697.js | 26 + .../regress/regress-wasm-crbug-599413.js | 2 +- .../regress/regress-wasm-crbug-618602.js | 2 +- .../mjsunit/regress/wasm/regression-5531.js | 4 +- .../mjsunit/regress/wasm/regression-5800.js | 56 + .../mjsunit/regress/wasm/regression-5884.js | 20 + .../mjsunit/regress/wasm/regression-643595.js | 11 + .../mjsunit/regress/wasm/regression-663994.js | 14 + .../mjsunit/regress/wasm/regression-666741.js | 9 + .../mjsunit/regress/wasm/regression-667745.js | 389 ++ .../mjsunit/regress/wasm/regression-670683.js | 17 + .../mjsunit/regress/wasm/regression-674447.js | 10 + .../mjsunit/regress/wasm/regression-680938.js | 8 + .../mjsunit/regress/wasm/regression-684858.js | 34 + deps/v8/test/mjsunit/stack-traces.js | 3 - deps/v8/test/mjsunit/store-dictionary.js | 26 + deps/v8/test/mjsunit/string-indexof-1.js | 68 + deps/v8/test/mjsunit/string-split.js | 8 + deps/v8/test/mjsunit/wasm/OWNERS | 1 + deps/v8/test/mjsunit/wasm/adapter-frame.js | 42 +- deps/v8/test/mjsunit/wasm/add-getters.js | 75 + .../wasm/asm-wasm-exception-in-tonumber.js | 107 + deps/v8/test/mjsunit/wasm/asm-wasm-f32.js | 14 +- deps/v8/test/mjsunit/wasm/asm-wasm-names.js | 15 + deps/v8/test/mjsunit/wasm/asm-wasm-stack.js | 94 +- deps/v8/test/mjsunit/wasm/asm-wasm-stdlib.js | 8 +- deps/v8/test/mjsunit/wasm/asm-wasm.js | 86 +- .../v8/test/mjsunit/wasm/asm-with-wasm-off.js | 20 + .../wasm/compiled-module-management.js | 10 +- .../wasm/compiled-module-serialization.js | 19 +- deps/v8/test/mjsunit/wasm/data-segments.js | 8 +- deps/v8/test/mjsunit/wasm/divrem-trap.js | 22 +- deps/v8/test/mjsunit/wasm/errors.js | 81 +- deps/v8/test/mjsunit/wasm/exceptions.js | 42 +- deps/v8/test/mjsunit/wasm/export-table.js | 78 +- deps/v8/test/mjsunit/wasm/ffi-error.js | 20 +- deps/v8/test/mjsunit/wasm/ffi.js | 136 +- .../mjsunit/wasm/float-constant-folding.js | 220 + deps/v8/test/mjsunit/wasm/function-names.js | 2 +- .../test/mjsunit/wasm/function-prototype.js | 6 +- deps/v8/test/mjsunit/wasm/gc-buffer.js | 4 +- deps/v8/test/mjsunit/wasm/gc-frame.js | 10 +- deps/v8/test/mjsunit/wasm/gc-stress.js | 4 +- deps/v8/test/mjsunit/wasm/globals.js | 60 +- deps/v8/test/mjsunit/wasm/grow-memory.js | 6 + deps/v8/test/mjsunit/wasm/import-memory.js | 208 +- deps/v8/test/mjsunit/wasm/import-table.js | 72 +- deps/v8/test/mjsunit/wasm/incrementer.wasm | Bin 45 -> 46 bytes deps/v8/test/mjsunit/wasm/indirect-calls.js | 12 +- deps/v8/test/mjsunit/wasm/indirect-tables.js | 198 +- .../mjsunit/wasm/instance-memory-gc-stress.js | 124 + .../mjsunit/wasm/instantiate-module-basic.js | 88 +- .../mjsunit/wasm/instantiate-run-basic.js | 4 +- deps/v8/test/mjsunit/wasm/js-api.js | 709 ++++ .../wasm/memory-instance-validation.js | 103 + deps/v8/test/mjsunit/wasm/memory-size.js | 1 + deps/v8/test/mjsunit/wasm/memory.js | 10 + deps/v8/test/mjsunit/wasm/module-memory.js | 21 +- deps/v8/test/mjsunit/wasm/names.js | 51 + deps/v8/test/mjsunit/wasm/params.js | 20 +- deps/v8/test/mjsunit/wasm/receiver.js | 4 +- deps/v8/test/mjsunit/wasm/stack.js | 30 +- deps/v8/test/mjsunit/wasm/stackwalk.js | 4 +- deps/v8/test/mjsunit/wasm/start-function.js | 14 +- deps/v8/test/mjsunit/wasm/table.js | 71 +- .../wasm/test-import-export-wrapper.js | 20 +- .../wasm/test-wasm-compilation-control.js | 118 + .../mjsunit/wasm/test-wasm-module-builder.js | 22 +- .../wasm/trap-location-with-trap-if.js | 81 + deps/v8/test/mjsunit/wasm/trap-location.js | 8 +- .../test/mjsunit/wasm/unicode-validation.js | 2 +- .../mjsunit/wasm/unreachable-validation.js | 130 + deps/v8/test/mjsunit/wasm/wasm-constants.js | 55 +- deps/v8/test/mjsunit/wasm/wasm-default.js | 19 + .../test/mjsunit/wasm/wasm-module-builder.js | 48 +- deps/v8/test/mozilla/mozilla.status | 4 + deps/v8/test/test262/archive.py | 1 + deps/v8/test/test262/harness-adapt.js | 18 +- deps/v8/test/test262/list.py | 3 +- .../test/intl402/DateTimeFormat/12.1.1_1.js | 42 + .../test/intl402/NumberFormat/11.1.1_1.js | 42 + deps/v8/test/test262/prune-local-tests.sh | 15 + deps/v8/test/test262/test262.status | 248 +- deps/v8/test/test262/testcfg.py | 52 +- deps/v8/test/test262/upstream-local-tests.sh | 22 + deps/v8/test/unittests/BUILD.gn | 18 +- .../unittests/api/access-check-unittest.cc | 79 + .../test/unittests/base/logging-unittest.cc | 56 +- .../unittests/cancelable-tasks-unittest.cc | 45 + .../compiler-dispatcher-helper.cc | 28 + .../compiler-dispatcher-helper.h | 23 + .../compiler-dispatcher-job-unittest.cc | 104 +- .../compiler-dispatcher-tracer-unittest.cc | 12 +- .../compiler-dispatcher-unittest.cc | 806 ++++ .../compiler/bytecode-analysis-unittest.cc | 418 ++ .../common-operator-reducer-unittest.cc | 27 + .../compiler/escape-analysis-unittest.cc | 26 +- .../test/unittests/compiler/graph-unittest.cc | 6 +- .../test/unittests/compiler/graph-unittest.h | 1 + .../compiler/instruction-selector-unittest.cc | 90 +- .../compiler/instruction-sequence-unittest.cc | 20 +- .../compiler/int64-lowering-unittest.cc | 25 +- .../compiler/js-create-lowering-unittest.cc | 29 +- .../js-intrinsic-lowering-unittest.cc | 31 - .../compiler/js-typed-lowering-unittest.cc | 78 +- .../compiler/liveness-analyzer-unittest.cc | 6 +- .../compiler/load-elimination-unittest.cc | 96 +- .../machine-operator-reducer-unittest.cc | 45 +- .../instruction-selector-mips-unittest.cc | 164 +- .../instruction-selector-mips64-unittest.cc | 203 +- .../unittests/compiler/node-test-utils.cc | 55 +- .../test/unittests/compiler/node-test-utils.h | 8 +- .../test/unittests/compiler/regalloc/OWNERS | 5 + .../{ => regalloc}/live-range-unittest.cc | 30 - .../{ => regalloc}/move-optimizer-unittest.cc | 8 - .../register-allocator-unittest.cc | 34 +- .../simplified-operator-reducer-unittest.cc | 16 + .../compiler/state-values-utils-unittest.cc | 90 +- .../test/unittests/compiler/typer-unittest.cc | 4 +- deps/v8/test/unittests/counters-unittest.cc | 310 ++ .../heap/embedder-tracing-unittest.cc | 163 + .../heap/gc-idle-time-handler-unittest.cc | 13 + deps/v8/test/unittests/heap/heap-unittest.cc | 1 + .../unittests/heap/memory-reducer-unittest.cc | 67 +- .../test/unittests/heap/unmapper-unittest.cc | 88 + .../bytecode-array-builder-unittest.cc | 69 +- .../bytecode-array-iterator-unittest.cc | 7 +- ...bytecode-array-random-iterator-unittest.cc | 1011 +++++ .../bytecode-array-writer-unittest.cc | 1 + .../interpreter/bytecode-operands-unittest.cc | 47 + .../bytecode-peephole-optimizer-unittest.cc | 24 +- .../interpreter/bytecode-pipeline-unittest.cc | 37 +- .../bytecode-register-allocator-unittest.cc | 1 + .../bytecode-register-optimizer-unittest.cc | 19 +- .../interpreter/bytecodes-unittest.cc | 120 + .../constant-array-builder-unittest.cc | 1 + .../interpreter-assembler-unittest.cc | 189 +- .../interpreter-assembler-unittest.h | 16 +- .../libplatform/default-platform-unittest.cc | 34 + deps/v8/test/unittests/object-unittest.cc | 57 + deps/v8/test/unittests/run-all-unittests.cc | 3 + deps/v8/test/unittests/unittests.gyp | 18 +- deps/v8/test/unittests/unittests.status | 9 + .../unittests/value-serializer-unittest.cc | 107 +- deps/v8/test/unittests/wasm/OWNERS | 1 + .../wasm/control-transfer-unittest.cc | 146 +- ...t.cc => function-body-decoder-unittest.cc} | 1238 +++--- .../wasm/loop-assignment-analysis-unittest.cc | 12 +- .../unittests/wasm/module-decoder-unittest.cc | 166 +- .../unittests/wasm/wasm-macro-gen-unittest.cc | 7 +- .../wasm/wasm-module-builder-unittest.cc | 4 +- .../zone/zone-chunk-list-unittest.cc | 1 - .../webkit/class-syntax-call-expected.txt | 2 +- deps/v8/test/webkit/class-syntax-call.js | 2 +- .../webkit/class-syntax-extends-expected.txt | 2 +- deps/v8/test/webkit/class-syntax-extends.js | 2 +- .../webkit/class-syntax-super-expected.txt | 4 +- deps/v8/test/webkit/class-syntax-super.js | 4 +- .../fast/js/basic-strict-mode-expected.txt | 8 +- .../webkit/fast/js/deep-recursion-test.js | 2 +- .../webkit/fast/js/kde/parse-expected.txt | 4 - deps/v8/test/webkit/fast/js/kde/parse.js | 4 - .../fast/js/number-toString-expected.txt | 58 +- ...ic-escapes-in-string-literals-expected.txt | 28 +- .../fast/js/parser-syntax-check-expected.txt | 10 - .../webkit/fast/js/parser-syntax-check.js | 6 - .../fast/js/toString-number-expected.txt | 42 +- deps/v8/test/webkit/webkit.status | 19 +- .../inspector_protocol/CodeGenerator.py | 370 +- .../third_party/inspector_protocol/README.v8 | 2 +- .../inspector_protocol/inspector_protocol.gni | 9 + .../inspector_protocol/lib/Array_h.template | 20 +- .../lib/Collections_h.template | 2 +- .../lib/DispatcherBase_cpp.template | 169 +- .../lib/DispatcherBase_h.template | 54 +- .../lib/ErrorSupport_cpp.template | 2 +- .../inspector_protocol/lib/Forward_h.template | 1 - .../lib/FrontendChannel_h.template | 10 +- .../inspector_protocol/lib/Maybe_h.template | 2 +- .../lib/Object_cpp.template | 13 +- .../inspector_protocol/lib/Object_h.template | 4 +- .../lib/Parser_cpp.template | 4 +- .../inspector_protocol/lib/Parser_h.template | 4 +- .../lib/Protocol_cpp.template | 2 +- .../lib/ValueConversions_h.template | 46 +- .../lib/Values_cpp.template | 16 +- .../inspector_protocol/lib/Values_h.template | 28 +- .../templates/Exported_h.template | 6 +- .../templates/Imported_h.template | 20 +- .../templates/TypeBuilder_cpp.template | 171 +- .../templates/TypeBuilder_h.template | 105 +- deps/v8/tools/callstats.html | 114 +- deps/v8/tools/callstats.py | 55 +- deps/v8/tools/foozzie/BUILD.gn | 18 + .../tools/foozzie/testdata/failure_output.txt | 50 + deps/v8/tools/foozzie/testdata/fuzz-123.js | 5 + deps/v8/tools/foozzie/testdata/test_d8_1.py | 14 + deps/v8/tools/foozzie/testdata/test_d8_2.py | 14 + deps/v8/tools/foozzie/testdata/test_d8_3.py | 14 + deps/v8/tools/foozzie/v8_commands.py | 64 + deps/v8/tools/foozzie/v8_foozzie.py | 299 ++ deps/v8/tools/foozzie/v8_foozzie_test.py | 111 + deps/v8/tools/foozzie/v8_mock.js | 76 + deps/v8/tools/foozzie/v8_suppressions.js | 18 + deps/v8/tools/foozzie/v8_suppressions.py | 330 ++ deps/v8/tools/fuzz-harness.sh | 2 +- deps/v8/tools/gdbinit | 18 + deps/v8/tools/gen-postmortem-metadata.py | 15 +- deps/v8/tools/ignition/linux_perf_report.py | 17 +- deps/v8/tools/jsfunfuzz/fuzz-harness.sh | 2 +- deps/v8/tools/mb/mb.py | 9 +- deps/v8/tools/parser-shell.cc | 11 +- deps/v8/tools/presubmit.py | 102 +- deps/v8/tools/release/create_release.py | 50 +- deps/v8/tools/release/test_scripts.py | 15 +- deps/v8/tools/run-deopt-fuzzer.py | 3 +- deps/v8/tools/run-tests.py | 3 +- deps/v8/tools/run_perf.py | 2 +- deps/v8/tools/testrunner/local/statusfile.py | 18 +- deps/v8/tools/testrunner/local/variants.py | 6 +- deps/v8/tools/turbolizer/node.js | 2 +- deps/v8/tools/v8heapconst.py | 501 +-- deps/v8/tools/whitespace.txt | 3 +- 1726 files changed, 100857 insertions(+), 86452 deletions(-) create mode 100644 deps/v8/gypfiles/win/msvs_dependencies.isolate create mode 100644 deps/v8/include/v8-version-string.h create mode 100644 deps/v8/src/assembler-inl.h create mode 100644 deps/v8/src/ast/ast-function-literal-id-reindexer.cc create mode 100644 deps/v8/src/ast/ast-function-literal-id-reindexer.h create mode 100644 deps/v8/src/builtins/builtins-constructor.cc create mode 100644 deps/v8/src/builtins/builtins-constructor.h create mode 100644 deps/v8/src/builtins/builtins-ic.cc delete mode 100644 deps/v8/src/builtins/builtins-iterator.cc create mode 100644 deps/v8/src/builtins/builtins-promise.h create mode 100644 deps/v8/src/compiler-dispatcher/compiler-dispatcher.cc create mode 100644 deps/v8/src/compiler-dispatcher/compiler-dispatcher.h create mode 100644 deps/v8/src/compiler/bytecode-analysis.cc create mode 100644 deps/v8/src/compiler/bytecode-analysis.h delete mode 100644 deps/v8/src/compiler/bytecode-branch-analysis.cc delete mode 100644 deps/v8/src/compiler/bytecode-branch-analysis.h create mode 100644 deps/v8/src/compiler/bytecode-liveness-map.cc create mode 100644 deps/v8/src/compiler/bytecode-liveness-map.h delete mode 100644 deps/v8/src/compiler/bytecode-loop-analysis.cc delete mode 100644 deps/v8/src/compiler/bytecode-loop-analysis.h create mode 100644 deps/v8/src/compiler/graph-assembler.cc create mode 100644 deps/v8/src/compiler/graph-assembler.h delete mode 100644 deps/v8/src/compiler/type-hint-analyzer.cc delete mode 100644 deps/v8/src/compiler/type-hint-analyzer.h create mode 100644 deps/v8/src/debug/interface-types.h create mode 100644 deps/v8/src/heap/embedder-tracing.cc create mode 100644 deps/v8/src/heap/embedder-tracing.h create mode 100644 deps/v8/src/ic/accessor-assembler-impl.h create mode 100644 deps/v8/src/ic/accessor-assembler.cc create mode 100644 deps/v8/src/ic/accessor-assembler.h delete mode 100644 deps/v8/src/ic/arm/ic-compiler-arm.cc delete mode 100644 deps/v8/src/ic/arm/stub-cache-arm.cc delete mode 100644 deps/v8/src/ic/arm64/ic-compiler-arm64.cc delete mode 100644 deps/v8/src/ic/arm64/stub-cache-arm64.cc delete mode 100644 deps/v8/src/ic/ia32/ic-compiler-ia32.cc delete mode 100644 deps/v8/src/ic/ia32/stub-cache-ia32.cc create mode 100644 deps/v8/src/ic/ic-stats.cc create mode 100644 deps/v8/src/ic/ic-stats.h delete mode 100644 deps/v8/src/ic/mips/ic-compiler-mips.cc delete mode 100644 deps/v8/src/ic/mips/stub-cache-mips.cc delete mode 100644 deps/v8/src/ic/mips64/ic-compiler-mips64.cc delete mode 100644 deps/v8/src/ic/mips64/stub-cache-mips64.cc delete mode 100644 deps/v8/src/ic/ppc/ic-compiler-ppc.cc delete mode 100644 deps/v8/src/ic/ppc/stub-cache-ppc.cc delete mode 100644 deps/v8/src/ic/s390/ic-compiler-s390.cc delete mode 100644 deps/v8/src/ic/s390/stub-cache-s390.cc delete mode 100644 deps/v8/src/ic/x64/ic-compiler-x64.cc delete mode 100644 deps/v8/src/ic/x64/stub-cache-x64.cc delete mode 100644 deps/v8/src/ic/x87/ic-compiler-x87.cc delete mode 100644 deps/v8/src/ic/x87/stub-cache-x87.cc delete mode 100644 deps/v8/src/inspector/protocol-platform.h create mode 100644 deps/v8/src/inspector/test-interface.cc create mode 100644 deps/v8/src/inspector/test-interface.h create mode 100644 deps/v8/src/inspector/wasm-translation.cc create mode 100644 deps/v8/src/inspector/wasm-translation.h create mode 100644 deps/v8/src/interpreter/bytecode-array-accessor.cc create mode 100644 deps/v8/src/interpreter/bytecode-array-accessor.h create mode 100644 deps/v8/src/interpreter/bytecode-array-random-iterator.cc create mode 100644 deps/v8/src/interpreter/bytecode-array-random-iterator.h delete mode 100644 deps/v8/src/js/symbol.js create mode 100644 deps/v8/src/map-updater.cc create mode 100644 deps/v8/src/map-updater.h create mode 100644 deps/v8/src/objects/module-info.h create mode 100644 deps/v8/src/objects/object-macros-undef.h create mode 100644 deps/v8/src/objects/object-macros.h rename deps/v8/src/{ast/scopeinfo.cc => objects/scope-info.cc} (98%) create mode 100644 deps/v8/src/objects/scope-info.h create mode 100644 deps/v8/src/parsing/parsing.cc create mode 100644 deps/v8/src/parsing/parsing.h delete mode 100644 deps/v8/src/promise-utils.cc delete mode 100644 deps/v8/src/promise-utils.h create mode 100644 deps/v8/src/string-case.cc create mode 100644 deps/v8/src/string-case.h create mode 100644 deps/v8/src/trap-handler/trap-handler.h rename deps/v8/src/wasm/{ast-decoder.cc => function-body-decoder.cc} (72%) rename deps/v8/src/wasm/{ast-decoder.h => function-body-decoder.h} (74%) create mode 100644 deps/v8/src/wasm/wasm-limits.h create mode 100644 deps/v8/src/wasm/wasm-text.cc create mode 100644 deps/v8/src/wasm/wasm-text.h create mode 100644 deps/v8/src/zone/zone-handle-set.h delete mode 100644 deps/v8/test/cctest/compiler/test-run-inlining.cc create mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/GenerateTestUndetectable.golden create mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden create mode 100644 deps/v8/test/cctest/parsing/test-parse-decision.cc create mode 100644 deps/v8/test/cctest/test-accessor-assembler.cc create mode 100644 deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc rename deps/v8/test/{mjsunit => debugger}/bugs/harmony/debug-blockscopes.js (64%) rename deps/v8/test/{mjsunit => debugger/debug}/compiler/debug-catch-prediction.js (98%) rename deps/v8/test/{mjsunit/debug-mirror-cache.js => debugger/debug/debug-backtrace.js} (59%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-break-native.js (93%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-breakpoints.js (56%) rename deps/v8/test/{mjsunit/bugs/bug-2337.js => debugger/debug/debug-clearbreakpoint.js} (68%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-compile-event.js (80%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-conditional-breakpoints.js (86%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-enable-disable-breakpoints.js (71%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-eval-scope.js (99%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-evaluate-bool-constructor.js (76%) rename deps/v8/test/debugger/{ => debug}/debug-evaluate-locals-optimized-double.js (98%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-evaluate-locals.js (93%) create mode 100644 deps/v8/test/debugger/debug/debug-evaluate-no-side-effect-builtins.js create mode 100644 deps/v8/test/debugger/debug/debug-evaluate-no-side-effect.js rename deps/v8/test/{mjsunit => debugger/debug}/debug-evaluate-shadowed-context.js (96%) rename deps/v8/test/{mjsunit/debug-suspend.js => debugger/debug/debug-evaluate.js} (60%) create mode 100644 deps/v8/test/debugger/debug/debug-function-scopes.js rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-1.js (95%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-2.js (95%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-3.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-4.js (95%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-check-stack.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-compile-error.js (95%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-diff.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-double-call.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-exceptions.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-literals.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-newsource.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-patch-positions-replace.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-restart-frame.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-stack-padding.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-stepin.js (98%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-liveedit-utils.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-multiple-breakpoints.js (80%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-multiple-var-decl.js (98%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-negative-break-points.js (77%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-receiver.js (94%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-return-value.js (77%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-scopes-suspended-generators.js (64%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-scopes.js (86%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-script.js (91%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-scripts-throw.js (61%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-set-variable-value.js (79%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-setbreakpoint.js (53%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-sourceinfo.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-stepframe-clearing.js (98%) rename deps/v8/test/{mjsunit => debugger/debug}/debug-stepframe.js (98%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-blockscopes.js (81%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-evaluate-arrow-function-receiver.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-evaluate-blockscopes.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-evaluate-receiver-before-super.js (88%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-exception-generators.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-function-scopes.js (59%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-liveedit-new-target-1.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-liveedit-new-target-2.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-liveedit-new-target-3.js (96%) delete mode 100644 deps/v8/test/debugger/debug/es6/debug-promises/async-task-event.js rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/promise-all-uncaught.js (91%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/promise-race-uncaught.js (91%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/reject-caught-all.js (93%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/reject-caught-by-default-reject-handler.js (92%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/reject-in-constructor.js (91%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/reject-uncaught-all.js (90%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/reject-uncaught-late.js (91%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/reject-uncaught-uncaught.js (90%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/reject-with-invalid-reject.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/reject-with-throw-in-reject.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/reject-with-undefined-reject.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/throw-caught-all.js (93%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/throw-caught-by-default-reject-handler.js (92%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/throw-finally-caught-all.js (93%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/throw-in-constructor.js (92%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/throw-uncaught-all.js (91%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/throw-uncaught-uncaught.js (88%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/throw-with-throw-in-reject.js (95%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/try-reject-in-constructor.js (92%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-promises/try-throw-reject-in-constructor.js (93%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-scope-default-param-with-eval.js (98%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-stepin-default-parameters.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-stepin-microtasks.js (92%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-stepin-proxies.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-stepin-string-template.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/debug-stepnext-for.js (98%) create mode 100644 deps/v8/test/debugger/debug/es6/debug-stepnext-generators.js rename deps/v8/test/{mjsunit => debugger/debug}/es6/default-parameters-debug.js (94%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/generators-debug-liveedit.js (98%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/generators-debug-scopes.js (74%) rename deps/v8/test/{mjsunit => debugger/debug}/es6/regress/regress-468661.js (98%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-basic.js (96%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-caught-exception-cases.js (96%) rename deps/v8/test/{mjsunit/wasm/no-wasm-by-default.js => debugger/debug/es8/async-debug-caught-exception-cases0.js} (63%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-caught-exception-cases1.js (62%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-caught-exception-cases2.js (62%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-caught-exception-cases3.js (62%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-caught-exception.js (99%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-step-abort-at-break.js (97%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-step-continue-at-break.js (97%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-step-in-and-out.js (97%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-step-in-out-out.js (97%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-step-in.js (97%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-step-nested.js (97%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-step-next-constant.js (96%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-step-next.js (97%) rename deps/v8/test/debugger/debug/{harmony => es8}/async-debug-step-out.js (96%) rename deps/v8/test/{mjsunit/harmony => debugger/debug/es8}/async-function-debug-evaluate.js (98%) rename deps/v8/test/{mjsunit/harmony => debugger/debug/es8}/async-function-debug-scopes.js (87%) rename deps/v8/test/debugger/debug/{harmony => es8}/debug-async-break-on-stack.js (98%) rename deps/v8/test/debugger/debug/{harmony => es8}/debug-async-break.js (98%) rename deps/v8/test/{mjsunit/harmony => debugger/debug/es8}/debug-async-liveedit.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/function-source.js (95%) delete mode 100644 deps/v8/test/debugger/debug/harmony/debug-async-function-async-task-event.js rename deps/v8/test/{mjsunit => debugger/debug/harmony}/modules-debug-scopes1.js (83%) rename deps/v8/test/{mjsunit => debugger/debug/harmony}/modules-debug-scopes2.js (65%) rename deps/v8/test/{mjsunit => debugger/debug}/ignition/debug-step-prefix-bytecodes.js (99%) rename deps/v8/test/{mjsunit => debugger/debug}/ignition/elided-instruction.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/ignition/optimized-debug-frame.js (93%) rename deps/v8/test/{mjsunit/regress => debugger/debug}/regress-5207.js (95%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-102153.js (98%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-1081309.js (64%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-109195.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-119609.js (92%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-1639.js (82%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-1853.js (82%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-2296.js (98%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-3960.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-419663.js (71%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-4309-2.js (91%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-5164.js (96%) delete mode 100644 deps/v8/test/debugger/debug/regress/regress-94873.js rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-119800.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-171715.js (99%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-222893.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-424142.js (96%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-432493.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-465298.js (87%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-481896.js (93%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-487289.js (93%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-491943.js (94%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-517592.js (93%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-568477-2.js (69%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-605581.js (95%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-crbug-621361.js (82%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-debug-deopt-while-recompile.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-frame-details-null-receiver.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/regress/regress-prepare-break-while-recompile.js (97%) rename deps/v8/test/{mjsunit => debugger/debug}/wasm/frame-inspection.js (63%) rename deps/v8/test/{mjsunit => debugger}/regress/regress-1639-2.js (76%) rename deps/v8/test/{mjsunit => debugger}/regress/regress-2318.js (98%) create mode 100644 deps/v8/test/inspector/debugger/async-instrumentation-expected.txt create mode 100644 deps/v8/test/inspector/debugger/async-instrumentation.js create mode 100644 deps/v8/test/inspector/debugger/async-promise-late-then-expected.txt create mode 100644 deps/v8/test/inspector/debugger/async-promise-late-then.js create mode 100644 deps/v8/test/inspector/debugger/async-set-timeout-expected.txt create mode 100644 deps/v8/test/inspector/debugger/async-set-timeout.js create mode 100644 deps/v8/test/inspector/debugger/async-stack-await-expected.txt create mode 100644 deps/v8/test/inspector/debugger/async-stack-await.js create mode 100644 deps/v8/test/inspector/debugger/async-stack-for-promise-expected.txt create mode 100644 deps/v8/test/inspector/debugger/async-stack-for-promise.js create mode 100644 deps/v8/test/inspector/debugger/async-stacks-limit-expected.txt create mode 100644 deps/v8/test/inspector/debugger/async-stacks-limit.js create mode 100644 deps/v8/test/inspector/debugger/eval-scopes-expected.txt create mode 100644 deps/v8/test/inspector/debugger/eval-scopes.js create mode 100644 deps/v8/test/inspector/debugger/script-parsed-for-runtime-evaluate-expected.txt create mode 100644 deps/v8/test/inspector/debugger/script-parsed-for-runtime-evaluate.js create mode 100644 deps/v8/test/inspector/debugger/set-script-source-exception-expected.txt create mode 100644 deps/v8/test/inspector/debugger/set-script-source-exception.js create mode 100644 deps/v8/test/inspector/debugger/step-into-nested-arrow-expected.txt create mode 100644 deps/v8/test/inspector/debugger/step-into-nested-arrow.js create mode 100644 deps/v8/test/inspector/debugger/suspended-generator-scopes-expected.txt create mode 100644 deps/v8/test/inspector/debugger/suspended-generator-scopes.js create mode 100644 deps/v8/test/inspector/debugger/wasm-scripts-expected.txt create mode 100644 deps/v8/test/inspector/debugger/wasm-scripts.js create mode 100644 deps/v8/test/inspector/debugger/wasm-source-expected.txt create mode 100644 deps/v8/test/inspector/debugger/wasm-source.js create mode 100644 deps/v8/test/inspector/runtime/console-assert-expected.txt create mode 100644 deps/v8/test/inspector/runtime/console-assert.js create mode 100644 deps/v8/test/inspector/runtime/console-messages-limits-expected.txt create mode 100644 deps/v8/test/inspector/runtime/console-messages-limits.js create mode 100644 deps/v8/test/inspector/runtime/evaluate-empty-stack-expected.txt create mode 100644 deps/v8/test/inspector/runtime/evaluate-empty-stack.js create mode 100644 deps/v8/test/inspector/runtime/evaluate-with-generate-preview-expected.txt create mode 100644 deps/v8/test/inspector/runtime/evaluate-with-generate-preview.js create mode 100644 deps/v8/test/inspector/runtime/length-or-size-description-expected.txt create mode 100644 deps/v8/test/inspector/runtime/length-or-size-description.js create mode 100644 deps/v8/test/intl/bad-target.js create mode 100644 deps/v8/test/intl/date-format/unmodified-options.js create mode 100644 deps/v8/test/intl/general/constructor.js create mode 100644 deps/v8/test/intl/not-constructors.js create mode 100644 deps/v8/test/intl/toStringTag.js create mode 100644 deps/v8/test/js-perf-test/AsyncAwait/baseline-babel-es2017.js create mode 100644 deps/v8/test/js-perf-test/AsyncAwait/baseline-naive-promises.js create mode 100644 deps/v8/test/js-perf-test/AsyncAwait/native.js create mode 100644 deps/v8/test/js-perf-test/AsyncAwait/run.js create mode 100644 deps/v8/test/js-perf-test/Closures/closures.js create mode 100644 deps/v8/test/js-perf-test/Closures/run.js create mode 100644 deps/v8/test/js-perf-test/RegExp.json create mode 100644 deps/v8/test/js-perf-test/RegExp/RegExpTests.json create mode 100644 deps/v8/test/js-perf-test/RegExp/base.js create mode 100644 deps/v8/test/js-perf-test/RegExp/base_ctor.js create mode 100644 deps/v8/test/js-perf-test/RegExp/base_exec.js create mode 100644 deps/v8/test/js-perf-test/RegExp/base_flags.js create mode 100644 deps/v8/test/js-perf-test/RegExp/base_match.js create mode 100644 deps/v8/test/js-perf-test/RegExp/base_replace.js create mode 100644 deps/v8/test/js-perf-test/RegExp/base_search.js create mode 100644 deps/v8/test/js-perf-test/RegExp/base_split.js create mode 100644 deps/v8/test/js-perf-test/RegExp/base_test.js create mode 100644 deps/v8/test/js-perf-test/RegExp/ctor.js create mode 100644 deps/v8/test/js-perf-test/RegExp/exec.js create mode 100644 deps/v8/test/js-perf-test/RegExp/flags.js create mode 100644 deps/v8/test/js-perf-test/RegExp/match.js create mode 100644 deps/v8/test/js-perf-test/RegExp/replace.js create mode 100644 deps/v8/test/js-perf-test/RegExp/run.js create mode 100644 deps/v8/test/js-perf-test/RegExp/search.js create mode 100644 deps/v8/test/js-perf-test/RegExp/slow_exec.js create mode 100644 deps/v8/test/js-perf-test/RegExp/slow_flags.js create mode 100644 deps/v8/test/js-perf-test/RegExp/slow_match.js create mode 100644 deps/v8/test/js-perf-test/RegExp/slow_replace.js create mode 100644 deps/v8/test/js-perf-test/RegExp/slow_search.js create mode 100644 deps/v8/test/js-perf-test/RegExp/slow_split.js create mode 100644 deps/v8/test/js-perf-test/RegExp/slow_test.js create mode 100644 deps/v8/test/js-perf-test/RegExp/split.js create mode 100644 deps/v8/test/js-perf-test/RegExp/test.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/array_destructuring/array_destructuring.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/array_destructuring/run.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/object_literals/object_literals.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/object_literals/run.js create mode 100644 deps/v8/test/message/call-non-constructable.js create mode 100644 deps/v8/test/message/call-non-constructable.out create mode 100644 deps/v8/test/message/call-primitive-constructor.js create mode 100644 deps/v8/test/message/call-primitive-constructor.out create mode 100644 deps/v8/test/message/call-primitive-function.js create mode 100644 deps/v8/test/message/call-primitive-function.out create mode 100644 deps/v8/test/message/call-undeclared-function.js create mode 100644 deps/v8/test/message/call-undeclared-function.out create mode 100644 deps/v8/test/message/regress/regress-crbug-661579.js create mode 100644 deps/v8/test/message/regress/regress-crbug-661579.out create mode 100644 deps/v8/test/message/regress/regress-crbug-669017.js create mode 100644 deps/v8/test/message/regress/regress-crbug-669017.out create mode 100644 deps/v8/test/message/tonumber-symbol.js create mode 100644 deps/v8/test/message/tonumber-symbol.out create mode 100644 deps/v8/test/message/wasm-trap.js create mode 100644 deps/v8/test/message/wasm-trap.out create mode 100644 deps/v8/test/mjsunit/array-push-hole-double.js create mode 100644 deps/v8/test/mjsunit/array-push13.js create mode 100644 deps/v8/test/mjsunit/array-push14.js create mode 100644 deps/v8/test/mjsunit/asm/regress-641885.js create mode 100644 deps/v8/test/mjsunit/asm/regress-669899.js create mode 100644 deps/v8/test/mjsunit/asm/regress-672045.js create mode 100644 deps/v8/test/mjsunit/asm/regress-676573.js create mode 100644 deps/v8/test/mjsunit/compiler/capture-context.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-11.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-12.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-deopt-6.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-framestate-use-at-branchpoint.js rename deps/v8/test/mjsunit/{debug-toggle-mirror-cache.js => compiler/escape-analysis-replacement.js} (75%) create mode 100644 deps/v8/test/mjsunit/compiler/inline-context-deopt.js create mode 100644 deps/v8/test/mjsunit/compiler/inline-omit-arguments-deopt.js create mode 100644 deps/v8/test/mjsunit/compiler/inline-omit-arguments-object.js create mode 100644 deps/v8/test/mjsunit/compiler/inline-omit-arguments.js create mode 100644 deps/v8/test/mjsunit/compiler/inline-surplus-arguments-deopt.js create mode 100644 deps/v8/test/mjsunit/compiler/inline-surplus-arguments-object.js create mode 100644 deps/v8/test/mjsunit/compiler/inline-surplus-arguments.js create mode 100644 deps/v8/test/mjsunit/compiler/instanceof-opt1.js create mode 100644 deps/v8/test/mjsunit/compiler/instanceof-opt2.js create mode 100644 deps/v8/test/mjsunit/compiler/instanceof-opt3.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-664117.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-668760.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-669517.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-671574.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-674469.js delete mode 100644 deps/v8/test/mjsunit/compiler/regress-uint8-deopt.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-v8-5756.js delete mode 100644 deps/v8/test/mjsunit/debug-backtrace-text.js delete mode 100644 deps/v8/test/mjsunit/debug-backtrace.js delete mode 100644 deps/v8/test/mjsunit/debug-changebreakpoint.js delete mode 100644 deps/v8/test/mjsunit/debug-clearbreakpoint.js delete mode 100644 deps/v8/test/mjsunit/debug-clearbreakpointgroup.js delete mode 100644 deps/v8/test/mjsunit/debug-compile-event-newfunction.js delete mode 100644 deps/v8/test/mjsunit/debug-constructed-by.js delete mode 100644 deps/v8/test/mjsunit/debug-continue.js delete mode 100644 deps/v8/test/mjsunit/debug-evaluate-nested.js delete mode 100644 deps/v8/test/mjsunit/debug-evaluate-recursive.js delete mode 100644 deps/v8/test/mjsunit/debug-evaluate-with-context.js delete mode 100644 deps/v8/test/mjsunit/debug-evaluate.js delete mode 100644 deps/v8/test/mjsunit/debug-function-scopes.js delete mode 100644 deps/v8/test/mjsunit/debug-handle.js delete mode 100644 deps/v8/test/mjsunit/debug-is-active.js delete mode 100644 deps/v8/test/mjsunit/debug-listbreakpoints.js delete mode 100644 deps/v8/test/mjsunit/debug-liveedit-breakpoints.js delete mode 100644 deps/v8/test/mjsunit/debug-referenced-by.js delete mode 100644 deps/v8/test/mjsunit/debug-references.js delete mode 100644 deps/v8/test/mjsunit/debug-script-breakpoints-closure.js delete mode 100644 deps/v8/test/mjsunit/debug-script-breakpoints-nested.js delete mode 100644 deps/v8/test/mjsunit/debug-script-breakpoints.js delete mode 100644 deps/v8/test/mjsunit/debug-scripts-request.js delete mode 100644 deps/v8/test/mjsunit/debug-set-script-source.js delete mode 100644 deps/v8/test/mjsunit/debug-setexceptionbreak.js create mode 100644 deps/v8/test/mjsunit/debugPrint.js create mode 100644 deps/v8/test/mjsunit/es6/array-iterator-detached.js delete mode 100644 deps/v8/test/mjsunit/es6/generators-mirror.js delete mode 100644 deps/v8/test/mjsunit/es6/mirror-collections.js delete mode 100644 deps/v8/test/mjsunit/es6/mirror-iterators.js delete mode 100644 deps/v8/test/mjsunit/es6/mirror-promises.js delete mode 100644 deps/v8/test/mjsunit/es6/mirror-symbols.js create mode 100644 deps/v8/test/mjsunit/es6/promise-lookup-getter-setter.js create mode 100644 deps/v8/test/mjsunit/es6/typedarray-neutered.js rename deps/v8/test/mjsunit/{harmony => es8}/async-arrow-lexical-arguments.js (95%) rename deps/v8/test/mjsunit/{harmony => es8}/async-arrow-lexical-new.target.js (95%) rename deps/v8/test/mjsunit/{harmony => es8}/async-arrow-lexical-super.js (96%) rename deps/v8/test/mjsunit/{harmony => es8}/async-arrow-lexical-this.js (95%) rename deps/v8/test/mjsunit/{harmony => es8}/async-await-basic.js (92%) rename deps/v8/test/mjsunit/{harmony => es8}/async-await-no-constructor.js (85%) rename deps/v8/test/mjsunit/{harmony => es8}/async-await-resolve-new.js (88%) rename deps/v8/test/mjsunit/{harmony => es8}/async-await-species.js (98%) rename deps/v8/test/mjsunit/{harmony => es8}/async-destructuring.js (97%) rename deps/v8/test/mjsunit/{harmony => es8}/async-function-stacktrace.js (99%) rename deps/v8/test/mjsunit/{harmony => es8}/regress/regress-618603.js (91%) rename deps/v8/test/mjsunit/{harmony => es8}/regress/regress-624300.js (88%) rename deps/v8/test/mjsunit/{harmony => es8}/sloppy-no-duplicate-async.js (95%) delete mode 100644 deps/v8/test/mjsunit/harmony/mirror-async-function-promise.js delete mode 100644 deps/v8/test/mjsunit/harmony/mirror-async-function.js create mode 100644 deps/v8/test/mjsunit/harmony/object-spread-basic.js delete mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-blocks.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-invalid.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-script-extensions.js create mode 100644 deps/v8/test/mjsunit/ignition/regress-5768.js delete mode 100644 deps/v8/test/mjsunit/mirror-array.js delete mode 100644 deps/v8/test/mjsunit/mirror-boolean.js delete mode 100644 deps/v8/test/mjsunit/mirror-date.js delete mode 100644 deps/v8/test/mjsunit/mirror-error.js delete mode 100644 deps/v8/test/mjsunit/mirror-function.js delete mode 100644 deps/v8/test/mjsunit/mirror-null.js delete mode 100644 deps/v8/test/mjsunit/mirror-number.js delete mode 100644 deps/v8/test/mjsunit/mirror-object.js delete mode 100644 deps/v8/test/mjsunit/mirror-regexp.js delete mode 100644 deps/v8/test/mjsunit/mirror-script.js delete mode 100644 deps/v8/test/mjsunit/mirror-string.js delete mode 100644 deps/v8/test/mjsunit/mirror-undefined.js delete mode 100644 deps/v8/test/mjsunit/mirror-unresolved-function.js create mode 100644 deps/v8/test/mjsunit/noopt.js rename deps/v8/test/mjsunit/{regress/regress-crbug-259300.js => number-tostring-big-integer.js} (72%) rename deps/v8/test/mjsunit/{ => regress}/regress-3456.js (94%) rename deps/v8/test/mjsunit/regress/{regress-4399.js => regress-4399-01.js} (100%) rename deps/v8/test/mjsunit/{regress-4399.js => regress/regress-4399-02.js} (100%) create mode 100644 deps/v8/test/mjsunit/regress/regress-4870.js create mode 100644 deps/v8/test/mjsunit/regress/regress-4962.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5295-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5295.js rename deps/v8/test/{debugger/debug/harmony/async-debug-caught-exception-cases0.js => mjsunit/regress/regress-5664.js} (58%) create mode 100644 deps/v8/test/mjsunit/regress/regress-5669.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5736.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5749.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5767.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5772.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5780.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5783.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5836.js rename deps/v8/test/mjsunit/{ => regress}/regress-587004.js (100%) create mode 100644 deps/v8/test/mjsunit/regress/regress-5943.js rename deps/v8/test/mjsunit/{ => regress}/regress-604044.js (85%) create mode 100644 deps/v8/test/mjsunit/regress/regress-648719.js create mode 100644 deps/v8/test/mjsunit/regress/regress-667603.js create mode 100644 deps/v8/test/mjsunit/regress/regress-669024.js create mode 100644 deps/v8/test/mjsunit/regress/regress-670671.js create mode 100644 deps/v8/test/mjsunit/regress/regress-670808.js create mode 100644 deps/v8/test/mjsunit/regress/regress-670981-array-push.js create mode 100644 deps/v8/test/mjsunit/regress/regress-672041.js create mode 100644 deps/v8/test/mjsunit/regress/regress-673241.js create mode 100644 deps/v8/test/mjsunit/regress/regress-673242.js create mode 100644 deps/v8/test/mjsunit/regress/regress-673297.js create mode 100644 deps/v8/test/mjsunit/regress/regress-674232.js create mode 100644 deps/v8/test/mjsunit/regress/regress-677055.js create mode 100644 deps/v8/test/mjsunit/regress/regress-677685.js create mode 100644 deps/v8/test/mjsunit/regress/regress-678917.js create mode 100644 deps/v8/test/mjsunit/regress/regress-679727.js create mode 100644 deps/v8/test/mjsunit/regress/regress-681171-1.js create mode 100644 deps/v8/test/mjsunit/regress/regress-681171-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-681171-3.js create mode 100644 deps/v8/test/mjsunit/regress/regress-681383.js create mode 100644 deps/v8/test/mjsunit/regress/regress-693500.js rename deps/v8/test/mjsunit/{ => regress}/regress-crbug-528379.js (100%) rename deps/v8/test/mjsunit/{ => regress}/regress-crbug-619476.js (100%) delete mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-629996.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-662854.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-662907.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-663340.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-663410.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-665587.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-665793.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-666308.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-666742.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-668101.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-668414.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-668795.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-669411.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-669451.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-669540.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-669850.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-671576.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-672792.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-677757.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-679378.js rename deps/v8/test/{debugger/debug/regress/regress-crbug-405491.js => mjsunit/regress/regress-crbug-679841.js} (53%) create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-683667.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-686102.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-686427.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-691323.js rename deps/v8/test/mjsunit/{ => regress}/regress-keyed-store-non-strict-arguments.js (100%) rename deps/v8/test/mjsunit/{ => regress}/regress-ntl.js (100%) rename deps/v8/test/mjsunit/{ => regress}/regress-sync-optimized-lists.js (100%) create mode 100644 deps/v8/test/mjsunit/regress/regress-v8-5697.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-5800.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-5884.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-643595.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-663994.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-666741.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-667745.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-670683.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-674447.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-680938.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-684858.js create mode 100644 deps/v8/test/mjsunit/wasm/add-getters.js create mode 100644 deps/v8/test/mjsunit/wasm/asm-wasm-exception-in-tonumber.js create mode 100644 deps/v8/test/mjsunit/wasm/asm-wasm-names.js create mode 100644 deps/v8/test/mjsunit/wasm/asm-with-wasm-off.js create mode 100644 deps/v8/test/mjsunit/wasm/float-constant-folding.js create mode 100644 deps/v8/test/mjsunit/wasm/instance-memory-gc-stress.js create mode 100644 deps/v8/test/mjsunit/wasm/js-api.js create mode 100644 deps/v8/test/mjsunit/wasm/memory-instance-validation.js create mode 100644 deps/v8/test/mjsunit/wasm/names.js create mode 100644 deps/v8/test/mjsunit/wasm/test-wasm-compilation-control.js create mode 100644 deps/v8/test/mjsunit/wasm/trap-location-with-trap-if.js create mode 100644 deps/v8/test/mjsunit/wasm/unreachable-validation.js create mode 100644 deps/v8/test/mjsunit/wasm/wasm-default.js create mode 100644 deps/v8/test/test262/local-tests/test/intl402/DateTimeFormat/12.1.1_1.js create mode 100644 deps/v8/test/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js create mode 100755 deps/v8/test/test262/prune-local-tests.sh create mode 100755 deps/v8/test/test262/upstream-local-tests.sh create mode 100644 deps/v8/test/unittests/api/access-check-unittest.cc create mode 100644 deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc create mode 100644 deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h create mode 100644 deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/bytecode-analysis-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/regalloc/OWNERS rename deps/v8/test/unittests/compiler/{ => regalloc}/live-range-unittest.cc (99%) rename deps/v8/test/unittests/compiler/{ => regalloc}/move-optimizer-unittest.cc (99%) rename deps/v8/test/unittests/compiler/{ => regalloc}/register-allocator-unittest.cc (99%) create mode 100644 deps/v8/test/unittests/heap/embedder-tracing-unittest.cc create mode 100644 deps/v8/test/unittests/heap/unmapper-unittest.cc create mode 100644 deps/v8/test/unittests/interpreter/bytecode-array-random-iterator-unittest.cc create mode 100644 deps/v8/test/unittests/interpreter/bytecode-operands-unittest.cc create mode 100644 deps/v8/test/unittests/object-unittest.cc rename deps/v8/test/unittests/wasm/{ast-decoder-unittest.cc => function-body-decoder-unittest.cc} (69%) create mode 100644 deps/v8/tools/foozzie/BUILD.gn create mode 100644 deps/v8/tools/foozzie/testdata/failure_output.txt create mode 100644 deps/v8/tools/foozzie/testdata/fuzz-123.js create mode 100644 deps/v8/tools/foozzie/testdata/test_d8_1.py create mode 100644 deps/v8/tools/foozzie/testdata/test_d8_2.py create mode 100644 deps/v8/tools/foozzie/testdata/test_d8_3.py create mode 100644 deps/v8/tools/foozzie/v8_commands.py create mode 100755 deps/v8/tools/foozzie/v8_foozzie.py create mode 100644 deps/v8/tools/foozzie/v8_foozzie_test.py create mode 100644 deps/v8/tools/foozzie/v8_mock.js create mode 100644 deps/v8/tools/foozzie/v8_suppressions.js create mode 100644 deps/v8/tools/foozzie/v8_suppressions.py diff --git a/deps/v8/.clang-format b/deps/v8/.clang-format index ae160a0bcc9789..55479a2f760845 100644 --- a/deps/v8/.clang-format +++ b/deps/v8/.clang-format @@ -1,4 +1,5 @@ # Defines the Google C++ style for automatic reformatting. # http://clang.llvm.org/docs/ClangFormatStyleOptions.html BasedOnStyle: Google +DerivePointerAlignment: false MaxEmptyLinesToKeep: 1 diff --git a/deps/v8/.gn b/deps/v8/.gn index aee1752d4be65e..c80980ea092d05 100644 --- a/deps/v8/.gn +++ b/deps/v8/.gn @@ -2,6 +2,8 @@ # tree and to set startup options. For documentation on the values set in this # file, run "gn help dotfile" at the command line. +import("//build/dotfile_settings.gni") + # The location of the build configuration file. buildconfig = "//build/config/BUILDCONFIG.gn" @@ -19,30 +21,5 @@ check_targets = [] # These are the list of GN files that run exec_script. This whitelist exists # to force additional review for new uses of exec_script, which is strongly # discouraged except for gypi_to_gn calls. -exec_script_whitelist = [ - "//build/config/android/BUILD.gn", - "//build/config/android/config.gni", - "//build/config/android/internal_rules.gni", - "//build/config/android/rules.gni", - "//build/config/BUILD.gn", - "//build/config/compiler/BUILD.gn", - "//build/config/gcc/gcc_version.gni", - "//build/config/ios/ios_sdk.gni", - "//build/config/linux/atk/BUILD.gn", - "//build/config/linux/BUILD.gn", - "//build/config/linux/pkg_config.gni", - "//build/config/mac/mac_sdk.gni", - "//build/config/posix/BUILD.gn", - "//build/config/sysroot.gni", - "//build/config/win/BUILD.gn", - "//build/config/win/visual_studio_version.gni", - "//build/gn_helpers.py", - "//build/gypi_to_gn.py", - "//build/toolchain/concurrent_links.gni", - "//build/toolchain/gcc_toolchain.gni", - "//build/toolchain/mac/BUILD.gn", - "//build/toolchain/win/BUILD.gn", - "//build/util/branding.gni", - "//build/util/version.gni", - "//test/test262/BUILD.gn", -] +exec_script_whitelist = + build_dotfile_settings.exec_script_whitelist + [ "//test/test262/BUILD.gn" ] diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 476d0c36328c18..35edca97e5f105 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -81,6 +81,7 @@ Julien Brianceau JunHo Seo Kang-Hao (Kenny) Lu Karl Skomski +Kevin Gibbons Luis Reis Luke Zarko Maciej Małecki @@ -104,6 +105,7 @@ Patrick Gansterer Peter Rybin Peter Varga Paul Lind +Qiuyi Zhang Rafal Krypa Refael Ackermann Rene Rebe diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 8587356ddcca34..c1fa769dc0b042 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -14,8 +14,6 @@ if (is_android) { import("gni/v8.gni") import("gni/isolate.gni") -import("//build_overrides/v8.gni") - import("snapshot_toolchain.gni") declare_args() { @@ -23,7 +21,10 @@ declare_args() { v8_android_log_stdout = false # Sets -DVERIFY_HEAP. - v8_enable_verify_heap = false + v8_enable_verify_heap = "" + + # Sets -DVERIFY_PREDICTABLE + v8_enable_verify_predictable = false # Enable compiler warnings when using V8_DEPRECATED apis. v8_deprecation_warnings = false @@ -51,7 +52,13 @@ declare_args() { v8_interpreted_regexp = false # Sets -dOBJECT_PRINT. - v8_object_print = "" + v8_enable_object_print = "" + + # Sets -dTRACE_MAPS. + v8_enable_trace_maps = "" + + # Sets -dV8_ENABLE_CHECKS. + v8_enable_v8_checks = "" # With post mortem support enabled, metadata is embedded into libv8 that # describes various parameters of the VM for use by debuggers. See @@ -89,11 +96,20 @@ if (v8_enable_gdbjit == "") { } # Derived defaults. -if (v8_object_print == "") { - v8_object_print = is_debug && !v8_optimized_debug +if (v8_enable_verify_heap == "") { + v8_enable_verify_heap = is_debug +} +if (v8_enable_object_print == "") { + v8_enable_object_print = is_debug } if (v8_enable_disassembler == "") { - v8_enable_disassembler = is_debug && !v8_optimized_debug + v8_enable_disassembler = is_debug +} +if (v8_enable_trace_maps == "") { + v8_enable_trace_maps = is_debug +} +if (v8_enable_v8_checks == "") { + v8_enable_v8_checks = is_debug } # Specifies if the target build is a simulator build. Comparing target cpu @@ -155,7 +171,7 @@ config("external_config") { defines = [ "USING_V8_SHARED" ] } include_dirs = [ "include" ] - if (v8_enable_inspector_override) { + if (v8_enable_inspector) { include_dirs += [ "$target_gen_dir/include" ] } } @@ -179,12 +195,21 @@ config("features") { if (v8_enable_gdbjit) { defines += [ "ENABLE_GDB_JIT_INTERFACE" ] } - if (v8_object_print) { + if (v8_enable_object_print) { defines += [ "OBJECT_PRINT" ] } if (v8_enable_verify_heap) { defines += [ "VERIFY_HEAP" ] } + if (v8_enable_verify_predictable) { + defines += [ "VERIFY_PREDICTABLE" ] + } + if (v8_enable_trace_maps) { + defines += [ "TRACE_MAPS" ] + } + if (v8_enable_v8_checks) { + defines += [ "V8_ENABLE_CHECKS" ] + } if (v8_interpreted_regexp) { defines += [ "V8_INTERPRETED_REGEXP" ] } @@ -348,15 +373,7 @@ config("toolchain") { ldflags += [ "-rdynamic" ] } - # TODO(jochen): Add support for different debug optimization levels. - defines += [ - "ENABLE_DISASSEMBLER", - "V8_ENABLE_CHECKS", - "OBJECT_PRINT", - "VERIFY_HEAP", - "DEBUG", - "TRACE_MAPS", - ] + defines += [ "DEBUG" ] if (v8_enable_slow_dchecks) { defines += [ "ENABLE_SLOW_DCHECKS" ] } @@ -408,7 +425,6 @@ action("js2c") { "src/js/prologue.js", "src/js/runtime.js", "src/js/v8natives.js", - "src/js/symbol.js", "src/js/array.js", "src/js/string.js", "src/js/arraybuffer.js", @@ -422,6 +438,7 @@ action("js2c") { "src/js/spread.js", "src/js/proxy.js", "src/js/async-await.js", + "src/js/harmony-string-padding.js", "src/debug/mirrors.js", "src/debug/debug.js", "src/debug/liveedit.js", @@ -466,7 +483,6 @@ action("js2c_experimental") { "src/messages.h", "src/js/harmony-atomics.js", "src/js/harmony-simd.js", - "src/js/harmony-string-padding.js", ] outputs = [ @@ -742,7 +758,7 @@ action("v8_dump_build_config") { "is_tsan=$is_tsan", "target_cpu=\"$target_cpu\"", "v8_enable_i18n_support=$v8_enable_i18n_support", - "v8_enable_inspector=$v8_enable_inspector_override", + "v8_enable_inspector=$v8_enable_inspector", "v8_target_cpu=\"$v8_target_cpu\"", "v8_use_snapshot=$v8_use_snapshot", ] @@ -848,6 +864,17 @@ if (v8_use_external_startup_data) { } } +# This is split out to be a non-code containing target that the Chromium browser +# DLL can depend upon to get only a version string. +v8_source_set("v8_version") { + configs = [ ":internal_config" ] + + sources = [ + "include/v8-version-string.h", + "include/v8-version.h", + ] +} + v8_source_set("v8_base") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -861,7 +888,6 @@ v8_source_set("v8_base") { "include/v8-profiler.h", "include/v8-testing.h", "include/v8-util.h", - "include/v8-version.h", "include/v8.h", "include/v8config.h", "src/accessors.cc", @@ -893,12 +919,15 @@ v8_source_set("v8_base") { "src/asmjs/asm-wasm-builder.h", "src/asmjs/switch-logic.cc", "src/asmjs/switch-logic.h", + "src/assembler-inl.h", "src/assembler.cc", "src/assembler.h", "src/assert-scope.cc", "src/assert-scope.h", "src/ast/ast-expression-rewriter.cc", "src/ast/ast-expression-rewriter.h", + "src/ast/ast-function-literal-id-reindexer.cc", + "src/ast/ast-function-literal-id-reindexer.h", "src/ast/ast-literal-reindexer.cc", "src/ast/ast-literal-reindexer.h", "src/ast/ast-numbering.cc", @@ -919,7 +948,6 @@ v8_source_set("v8_base") { "src/ast/modules.h", "src/ast/prettyprinter.cc", "src/ast/prettyprinter.h", - "src/ast/scopeinfo.cc", "src/ast/scopes.cc", "src/ast/scopes.h", "src/ast/variables.cc", @@ -944,6 +972,8 @@ v8_source_set("v8_base") { "src/builtins/builtins-boolean.cc", "src/builtins/builtins-call.cc", "src/builtins/builtins-callsite.cc", + "src/builtins/builtins-constructor.cc", + "src/builtins/builtins-constructor.h", "src/builtins/builtins-conversion.cc", "src/builtins/builtins-dataview.cc", "src/builtins/builtins-date.cc", @@ -953,14 +983,15 @@ v8_source_set("v8_base") { "src/builtins/builtins-generator.cc", "src/builtins/builtins-global.cc", "src/builtins/builtins-handler.cc", + "src/builtins/builtins-ic.cc", "src/builtins/builtins-internal.cc", "src/builtins/builtins-interpreter.cc", - "src/builtins/builtins-iterator.cc", "src/builtins/builtins-json.cc", "src/builtins/builtins-math.cc", "src/builtins/builtins-number.cc", "src/builtins/builtins-object.cc", "src/builtins/builtins-promise.cc", + "src/builtins/builtins-promise.h", "src/builtins/builtins-proxy.cc", "src/builtins/builtins-reflect.cc", "src/builtins/builtins-regexp.cc", @@ -1002,6 +1033,8 @@ v8_source_set("v8_base") { "src/compiler-dispatcher/compiler-dispatcher-job.h", "src/compiler-dispatcher/compiler-dispatcher-tracer.cc", "src/compiler-dispatcher/compiler-dispatcher-tracer.h", + "src/compiler-dispatcher/compiler-dispatcher.cc", + "src/compiler-dispatcher/compiler-dispatcher.h", "src/compiler-dispatcher/optimizing-compile-dispatcher.cc", "src/compiler-dispatcher/optimizing-compile-dispatcher.h", "src/compiler.cc", @@ -1020,12 +1053,12 @@ v8_source_set("v8_base") { "src/compiler/basic-block-instrumentor.h", "src/compiler/branch-elimination.cc", "src/compiler/branch-elimination.h", - "src/compiler/bytecode-branch-analysis.cc", - "src/compiler/bytecode-branch-analysis.h", + "src/compiler/bytecode-analysis.cc", + "src/compiler/bytecode-analysis.h", "src/compiler/bytecode-graph-builder.cc", "src/compiler/bytecode-graph-builder.h", - "src/compiler/bytecode-loop-analysis.cc", - "src/compiler/bytecode-loop-analysis.h", + "src/compiler/bytecode-liveness-map.cc", + "src/compiler/bytecode-liveness-map.h", "src/compiler/c-linkage.cc", "src/compiler/checkpoint-elimination.cc", "src/compiler/checkpoint-elimination.h", @@ -1065,6 +1098,8 @@ v8_source_set("v8_base") { "src/compiler/frame.h", "src/compiler/gap-resolver.cc", "src/compiler/gap-resolver.h", + "src/compiler/graph-assembler.cc", + "src/compiler/graph-assembler.h", "src/compiler/graph-reducer.cc", "src/compiler/graph-reducer.h", "src/compiler/graph-replay.cc", @@ -1196,8 +1231,6 @@ v8_source_set("v8_base") { "src/compiler/tail-call-optimization.h", "src/compiler/type-cache.cc", "src/compiler/type-cache.h", - "src/compiler/type-hint-analyzer.cc", - "src/compiler/type-hint-analyzer.h", "src/compiler/typed-optimization.cc", "src/compiler/typed-optimization.h", "src/compiler/typer.cc", @@ -1300,6 +1333,7 @@ v8_source_set("v8_base") { "src/debug/debug-scopes.h", "src/debug/debug.cc", "src/debug/debug.h", + "src/debug/interface-types.h", "src/debug/liveedit.cc", "src/debug/liveedit.h", "src/deoptimize-reason.cc", @@ -1373,6 +1407,8 @@ v8_source_set("v8_base") { "src/heap/array-buffer-tracker.h", "src/heap/code-stats.cc", "src/heap/code-stats.h", + "src/heap/embedder-tracing.cc", + "src/heap/embedder-tracing.h", "src/heap/gc-idle-time-handler.cc", "src/heap/gc-idle-time-handler.h", "src/heap/gc-tracer.cc", @@ -1414,6 +1450,9 @@ v8_source_set("v8_base") { "src/ic/access-compiler-data.h", "src/ic/access-compiler.cc", "src/ic/access-compiler.h", + "src/ic/accessor-assembler-impl.h", + "src/ic/accessor-assembler.cc", + "src/ic/accessor-assembler.h", "src/ic/call-optimization.cc", "src/ic/call-optimization.h", "src/ic/handler-compiler.cc", @@ -1425,6 +1464,8 @@ v8_source_set("v8_base") { "src/ic/ic-inl.h", "src/ic/ic-state.cc", "src/ic/ic-state.h", + "src/ic/ic-stats.cc", + "src/ic/ic-stats.h", "src/ic/ic.cc", "src/ic/ic.h", "src/ic/keyed-store-generic.cc", @@ -1437,10 +1478,14 @@ v8_source_set("v8_base") { "src/identity-map.h", "src/interface-descriptors.cc", "src/interface-descriptors.h", + "src/interpreter/bytecode-array-accessor.cc", + "src/interpreter/bytecode-array-accessor.h", "src/interpreter/bytecode-array-builder.cc", "src/interpreter/bytecode-array-builder.h", "src/interpreter/bytecode-array-iterator.cc", "src/interpreter/bytecode-array-iterator.h", + "src/interpreter/bytecode-array-random-iterator.cc", + "src/interpreter/bytecode-array-random-iterator.h", "src/interpreter/bytecode-array-writer.cc", "src/interpreter/bytecode-array-writer.h", "src/interpreter/bytecode-dead-code-optimizer.cc", @@ -1509,6 +1554,8 @@ v8_source_set("v8_base") { "src/machine-type.cc", "src/machine-type.h", "src/macro-assembler.h", + "src/map-updater.cc", + "src/map-updater.h", "src/messages.cc", "src/messages.h", "src/msan.h", @@ -1519,6 +1566,11 @@ v8_source_set("v8_base") { "src/objects-printer.cc", "src/objects.cc", "src/objects.h", + "src/objects/module-info.h", + "src/objects/object-macros-undef.h", + "src/objects/object-macros.h", + "src/objects/scope-info.cc", + "src/objects/scope-info.h", "src/ostreams.cc", "src/ostreams.h", "src/parsing/duplicate-finder.cc", @@ -1533,6 +1585,8 @@ v8_source_set("v8_base") { "src/parsing/parser-base.h", "src/parsing/parser.cc", "src/parsing/parser.h", + "src/parsing/parsing.cc", + "src/parsing/parsing.h", "src/parsing/pattern-rewriter.cc", "src/parsing/preparse-data-format.h", "src/parsing/preparse-data.cc", @@ -1578,8 +1632,6 @@ v8_source_set("v8_base") { "src/profiler/tracing-cpu-profiler.h", "src/profiler/unbound-queue-inl.h", "src/profiler/unbound-queue.h", - "src/promise-utils.cc", - "src/promise-utils.h", "src/property-descriptor.cc", "src/property-descriptor.h", "src/property-details.h", @@ -1679,6 +1731,8 @@ v8_source_set("v8_base") { "src/startup-data-util.h", "src/string-builder.cc", "src/string-builder.h", + "src/string-case.cc", + "src/string-case.h", "src/string-search.h", "src/string-stream.cc", "src/string-stream.h", @@ -1693,6 +1747,7 @@ v8_source_set("v8_base") { "src/transitions-inl.h", "src/transitions.cc", "src/transitions.h", + "src/trap-handler/trap-handler.h", "src/type-feedback-vector-inl.h", "src/type-feedback-vector.cc", "src/type-feedback-vector.h", @@ -1724,9 +1779,9 @@ v8_source_set("v8_base") { "src/version.h", "src/vm-state-inl.h", "src/vm-state.h", - "src/wasm/ast-decoder.cc", - "src/wasm/ast-decoder.h", "src/wasm/decoder.h", + "src/wasm/function-body-decoder.cc", + "src/wasm/function-body-decoder.h", "src/wasm/leb-helper.h", "src/wasm/managed.h", "src/wasm/module-decoder.cc", @@ -1740,6 +1795,7 @@ v8_source_set("v8_base") { "src/wasm/wasm-interpreter.h", "src/wasm/wasm-js.cc", "src/wasm/wasm-js.h", + "src/wasm/wasm-limits.h", "src/wasm/wasm-macro-gen.h", "src/wasm/wasm-module-builder.cc", "src/wasm/wasm-module-builder.h", @@ -1751,12 +1807,15 @@ v8_source_set("v8_base") { "src/wasm/wasm-opcodes.h", "src/wasm/wasm-result.cc", "src/wasm/wasm-result.h", + "src/wasm/wasm-text.cc", + "src/wasm/wasm-text.h", "src/zone/accounting-allocator.cc", "src/zone/accounting-allocator.h", "src/zone/zone-allocator.h", "src/zone/zone-allocator.h", "src/zone/zone-chunk-list.h", "src/zone/zone-containers.h", + "src/zone/zone-handle-set.h", "src/zone/zone-segment.cc", "src/zone/zone-segment.h", "src/zone/zone.cc", @@ -1797,9 +1856,7 @@ v8_source_set("v8_base") { "src/ia32/simulator-ia32.h", "src/ic/ia32/access-compiler-ia32.cc", "src/ic/ia32/handler-compiler-ia32.cc", - "src/ic/ia32/ic-compiler-ia32.cc", "src/ic/ia32/ic-ia32.cc", - "src/ic/ia32/stub-cache-ia32.cc", "src/regexp/ia32/regexp-macro-assembler-ia32.cc", "src/regexp/ia32/regexp-macro-assembler-ia32.h", ] @@ -1822,9 +1879,7 @@ v8_source_set("v8_base") { "src/full-codegen/x64/full-codegen-x64.cc", "src/ic/x64/access-compiler-x64.cc", "src/ic/x64/handler-compiler-x64.cc", - "src/ic/x64/ic-compiler-x64.cc", "src/ic/x64/ic-x64.cc", - "src/ic/x64/stub-cache-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.h", "src/third_party/valgrind/valgrind.h", @@ -1889,8 +1944,6 @@ v8_source_set("v8_base") { "src/ic/arm/access-compiler-arm.cc", "src/ic/arm/handler-compiler-arm.cc", "src/ic/arm/ic-arm.cc", - "src/ic/arm/ic-compiler-arm.cc", - "src/ic/arm/stub-cache-arm.cc", "src/regexp/arm/regexp-macro-assembler-arm.cc", "src/regexp/arm/regexp-macro-assembler-arm.h", ] @@ -1948,8 +2001,6 @@ v8_source_set("v8_base") { "src/ic/arm64/access-compiler-arm64.cc", "src/ic/arm64/handler-compiler-arm64.cc", "src/ic/arm64/ic-arm64.cc", - "src/ic/arm64/ic-compiler-arm64.cc", - "src/ic/arm64/stub-cache-arm64.cc", "src/regexp/arm64/regexp-macro-assembler-arm64.cc", "src/regexp/arm64/regexp-macro-assembler-arm64.h", ] @@ -1970,9 +2021,7 @@ v8_source_set("v8_base") { "src/full-codegen/mips/full-codegen-mips.cc", "src/ic/mips/access-compiler-mips.cc", "src/ic/mips/handler-compiler-mips.cc", - "src/ic/mips/ic-compiler-mips.cc", "src/ic/mips/ic-mips.cc", - "src/ic/mips/stub-cache-mips.cc", "src/mips/assembler-mips-inl.h", "src/mips/assembler-mips.cc", "src/mips/assembler-mips.h", @@ -2012,9 +2061,7 @@ v8_source_set("v8_base") { "src/full-codegen/mips64/full-codegen-mips64.cc", "src/ic/mips64/access-compiler-mips64.cc", "src/ic/mips64/handler-compiler-mips64.cc", - "src/ic/mips64/ic-compiler-mips64.cc", "src/ic/mips64/ic-mips64.cc", - "src/ic/mips64/stub-cache-mips64.cc", "src/mips64/assembler-mips64-inl.h", "src/mips64/assembler-mips64.cc", "src/mips64/assembler-mips64.h", @@ -2054,9 +2101,7 @@ v8_source_set("v8_base") { "src/full-codegen/ppc/full-codegen-ppc.cc", "src/ic/ppc/access-compiler-ppc.cc", "src/ic/ppc/handler-compiler-ppc.cc", - "src/ic/ppc/ic-compiler-ppc.cc", "src/ic/ppc/ic-ppc.cc", - "src/ic/ppc/stub-cache-ppc.cc", "src/ppc/assembler-ppc-inl.h", "src/ppc/assembler-ppc.cc", "src/ppc/assembler-ppc.h", @@ -2096,9 +2141,7 @@ v8_source_set("v8_base") { "src/full-codegen/s390/full-codegen-s390.cc", "src/ic/s390/access-compiler-s390.cc", "src/ic/s390/handler-compiler-s390.cc", - "src/ic/s390/ic-compiler-s390.cc", "src/ic/s390/ic-s390.cc", - "src/ic/s390/stub-cache-s390.cc", "src/regexp/s390/regexp-macro-assembler-s390.cc", "src/regexp/s390/regexp-macro-assembler-s390.h", "src/s390/assembler-s390-inl.h", @@ -2138,9 +2181,7 @@ v8_source_set("v8_base") { "src/full-codegen/x87/full-codegen-x87.cc", "src/ic/x87/access-compiler-x87.cc", "src/ic/x87/handler-compiler-x87.cc", - "src/ic/x87/ic-compiler-x87.cc", "src/ic/x87/ic-x87.cc", - "src/ic/x87/stub-cache-x87.cc", "src/regexp/x87/regexp-macro-assembler-x87.cc", "src/regexp/x87/regexp-macro-assembler-x87.h", "src/x87/assembler-x87-inl.h", @@ -2169,6 +2210,7 @@ v8_source_set("v8_base") { deps = [ ":v8_libbase", ":v8_libsampler", + ":v8_version", ] sources += [ v8_generated_peephole_source ] @@ -2196,7 +2238,7 @@ v8_source_set("v8_base") { deps += [ ":postmortem-metadata" ] } - if (v8_enable_inspector_override) { + if (v8_enable_inspector) { deps += [ "src/inspector:inspector" ] } } @@ -2399,14 +2441,10 @@ v8_source_set("fuzzer_support") { ":v8_libbase", ":v8_libplatform", ] -} - -v8_source_set("simple_fuzzer") { - sources = [ - "test/fuzzer/fuzzer.cc", - ] - configs = [ ":internal_config_base" ] + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + } } ############################################################################### @@ -2477,14 +2515,10 @@ group("gn_all") { deps = [ ":d8", + ":v8_fuzzers", ":v8_hello_world", ":v8_parser_shell", ":v8_sample_process", - ":v8_simple_json_fuzzer", - ":v8_simple_parser_fuzzer", - ":v8_simple_regexp_fuzzer", - ":v8_simple_wasm_asmjs_fuzzer", - ":v8_simple_wasm_fuzzer", "test:gn_all", "tools:gn_all", ] @@ -2498,6 +2532,26 @@ group("gn_all") { } } +group("v8_fuzzers") { + testonly = true + deps = [ + ":v8_simple_json_fuzzer", + ":v8_simple_parser_fuzzer", + ":v8_simple_regexp_fuzzer", + ":v8_simple_wasm_asmjs_fuzzer", + ":v8_simple_wasm_call_fuzzer", + ":v8_simple_wasm_code_fuzzer", + ":v8_simple_wasm_data_section_fuzzer", + ":v8_simple_wasm_function_sigs_section_fuzzer", + ":v8_simple_wasm_fuzzer", + ":v8_simple_wasm_globals_section_fuzzer", + ":v8_simple_wasm_imports_section_fuzzer", + ":v8_simple_wasm_memory_section_fuzzer", + ":v8_simple_wasm_names_section_fuzzer", + ":v8_simple_wasm_types_section_fuzzer", + ] +} + if (is_component_build) { v8_component("v8") { sources = [ @@ -2527,6 +2581,7 @@ if (is_component_build) { ":v8_base", ":v8_maybe_snapshot", ] + public_configs = [ ":external_config" ] } } @@ -2566,8 +2621,12 @@ v8_executable("d8") { deps += [ "//third_party/icu" ] } + if (v8_correctness_fuzzer) { + deps += [ "tools/foozzie:v8_correctness_fuzzer_resources" ] + } + defines = [] - if (v8_enable_inspector_override) { + if (v8_enable_inspector) { defines += [ "V8_INSPECTOR_ENABLED" ] } } @@ -2687,10 +2746,14 @@ template("v8_fuzzer") { v8_executable("v8_simple_" + name) { deps = [ ":" + name, - ":simple_fuzzer", + "//build/config/sanitizers:deps", "//build/win:default_exe_manifest", ] + sources = [ + "test/fuzzer/fuzzer.cc", + ] + configs = [ ":external_config" ] } } diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 2dc77568d4c9a3..1ff3b3bf8ca25c 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,2493 @@ +2017-01-17: Version 5.7.492 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.491 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.490 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.489 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.488 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.487 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.486 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.485 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.484 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.483 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.482 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.481 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.480 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.479 + + Performance and stability improvements on all platforms. + + +2017-01-17: Version 5.7.478 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.477 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.476 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.475 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.474 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.473 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.472 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.471 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.470 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.469 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.468 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.467 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.466 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.465 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.464 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.463 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.462 + + Performance and stability improvements on all platforms. + + +2017-01-16: Version 5.7.461 + + Performance and stability improvements on all platforms. + + +2017-01-15: Version 5.7.460 + + Performance and stability improvements on all platforms. + + +2017-01-15: Version 5.7.459 + + Performance and stability improvements on all platforms. + + +2017-01-15: Version 5.7.458 + + Performance and stability improvements on all platforms. + + +2017-01-15: Version 5.7.457 + + Performance and stability improvements on all platforms. + + +2017-01-14: Version 5.7.456 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.455 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.454 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.453 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.452 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.451 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.450 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.449 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.448 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.447 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.446 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.445 + + Performance and stability improvements on all platforms. + + +2017-01-13: Version 5.7.444 + + Performance and stability improvements on all platforms. + + +2017-01-12: Version 5.7.443 + + Performance and stability improvements on all platforms. + + +2017-01-12: Version 5.7.442 + + Performance and stability improvements on all platforms. + + +2017-01-11: Version 5.7.441 + + Performance and stability improvements on all platforms. + + +2017-01-11: Version 5.7.440 + + Performance and stability improvements on all platforms. + + +2017-01-11: Version 5.7.439 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.438 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.437 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.436 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.435 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.434 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.433 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.432 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.431 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.430 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.429 + + Performance and stability improvements on all platforms. + + +2017-01-10: Version 5.7.428 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.427 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.426 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.425 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.424 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.423 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.422 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.421 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.420 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.419 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.418 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.417 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.416 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.415 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.414 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.413 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.412 + + Performance and stability improvements on all platforms. + + +2017-01-09: Version 5.7.411 + + Performance and stability improvements on all platforms. + + +2017-01-08: Version 5.7.410 + + Performance and stability improvements on all platforms. + + +2017-01-06: Version 5.7.409 + + Performance and stability improvements on all platforms. + + +2017-01-06: Version 5.7.408 + + Performance and stability improvements on all platforms. + + +2017-01-06: Version 5.7.407 + + Performance and stability improvements on all platforms. + + +2017-01-06: Version 5.7.406 + + Performance and stability improvements on all platforms. + + +2017-01-06: Version 5.7.405 + + Performance and stability improvements on all platforms. + + +2017-01-06: Version 5.7.404 + + Performance and stability improvements on all platforms. + + +2017-01-06: Version 5.7.403 + + Performance and stability improvements on all platforms. + + +2017-01-05: Version 5.7.402 + + Performance and stability improvements on all platforms. + + +2017-01-05: Version 5.7.401 + + Performance and stability improvements on all platforms. + + +2017-01-05: Version 5.7.400 + + Performance and stability improvements on all platforms. + + +2017-01-05: Version 5.7.399 + + Performance and stability improvements on all platforms. + + +2017-01-05: Version 5.7.398 + + Performance and stability improvements on all platforms. + + +2017-01-04: Version 5.7.397 + + Performance and stability improvements on all platforms. + + +2017-01-04: Version 5.7.396 + + Performance and stability improvements on all platforms. + + +2017-01-04: Version 5.7.395 + + Performance and stability improvements on all platforms. + + +2017-01-04: Version 5.7.394 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.393 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.392 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.391 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.390 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.389 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.388 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.387 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.386 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.385 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.384 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.383 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.382 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.381 + + Performance and stability improvements on all platforms. + + +2017-01-03: Version 5.7.380 + + Performance and stability improvements on all platforms. + + +2017-01-02: Version 5.7.379 + + Performance and stability improvements on all platforms. + + +2017-01-02: Version 5.7.378 + + Performance and stability improvements on all platforms. + + +2017-01-02: Version 5.7.377 + + Performance and stability improvements on all platforms. + + +2017-01-02: Version 5.7.376 + + Performance and stability improvements on all platforms. + + +2017-01-02: Version 5.7.375 + + Performance and stability improvements on all platforms. + + +2017-01-02: Version 5.7.374 + + Performance and stability improvements on all platforms. + + +2017-01-02: Version 5.7.373 + + Performance and stability improvements on all platforms. + + +2017-01-02: Version 5.7.372 + + Performance and stability improvements on all platforms. + + +2017-01-02: Version 5.7.371 + + Performance and stability improvements on all platforms. + + +2016-12-30: Version 5.7.370 + + Performance and stability improvements on all platforms. + + +2016-12-30: Version 5.7.369 + + Performance and stability improvements on all platforms. + + +2016-12-30: Version 5.7.368 + + Performance and stability improvements on all platforms. + + +2016-12-30: Version 5.7.367 + + Performance and stability improvements on all platforms. + + +2016-12-30: Version 5.7.366 + + Performance and stability improvements on all platforms. + + +2016-12-28: Version 5.7.365 + + Performance and stability improvements on all platforms. + + +2016-12-28: Version 5.7.364 + + Performance and stability improvements on all platforms. + + +2016-12-28: Version 5.7.363 + + Performance and stability improvements on all platforms. + + +2016-12-28: Version 5.7.362 + + Performance and stability improvements on all platforms. + + +2016-12-28: Version 5.7.361 + + Performance and stability improvements on all platforms. + + +2016-12-27: Version 5.7.360 + + Performance and stability improvements on all platforms. + + +2016-12-27: Version 5.7.359 + + Performance and stability improvements on all platforms. + + +2016-12-27: Version 5.7.358 + + Performance and stability improvements on all platforms. + + +2016-12-27: Version 5.7.357 + + Performance and stability improvements on all platforms. + + +2016-12-27: Version 5.7.356 + + Performance and stability improvements on all platforms. + + +2016-12-27: Version 5.7.355 + + Performance and stability improvements on all platforms. + + +2016-12-27: Version 5.7.354 + + Performance and stability improvements on all platforms. + + +2016-12-27: Version 5.7.353 + + Performance and stability improvements on all platforms. + + +2016-12-26: Version 5.7.352 + + Performance and stability improvements on all platforms. + + +2016-12-24: Version 5.7.351 + + Performance and stability improvements on all platforms. + + +2016-12-24: Version 5.7.350 + + Performance and stability improvements on all platforms. + + +2016-12-24: Version 5.7.349 + + Performance and stability improvements on all platforms. + + +2016-12-23: Version 5.7.348 + + Performance and stability improvements on all platforms. + + +2016-12-23: Version 5.7.347 + + Performance and stability improvements on all platforms. + + +2016-12-23: Version 5.7.346 + + [intl] Add new semantics + compat fallback to Intl constructor (issues + 4360, 4870). + + Performance and stability improvements on all platforms. + + +2016-12-23: Version 5.7.345 + + Performance and stability improvements on all platforms. + + +2016-12-23: Version 5.7.344 + + Performance and stability improvements on all platforms. + + +2016-12-23: Version 5.7.343 + + Performance and stability improvements on all platforms. + + +2016-12-23: Version 5.7.342 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.341 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.340 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.339 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.338 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.337 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.336 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.335 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.334 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.333 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.332 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.331 + + Performance and stability improvements on all platforms. + + +2016-12-22: Version 5.7.330 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.329 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.328 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.327 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.326 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.325 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.324 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.323 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.322 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.321 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.320 + + Performance and stability improvements on all platforms. + + +2016-12-21: Version 5.7.319 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.318 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.317 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.316 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.315 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.314 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.313 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.312 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.311 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.310 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.309 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.308 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.307 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.306 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.305 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.304 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.303 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.302 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.301 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.300 + + Performance and stability improvements on all platforms. + + +2016-12-20: Version 5.7.299 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.298 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.297 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.296 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.295 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.294 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.293 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.292 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.291 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.290 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.289 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.288 + + Performance and stability improvements on all platforms. + + +2016-12-19: Version 5.7.287 + + Performance and stability improvements on all platforms. + + +2016-12-18: Version 5.7.286 + + Performance and stability improvements on all platforms. + + +2016-12-18: Version 5.7.285 + + Performance and stability improvements on all platforms. + + +2016-12-17: Version 5.7.284 + + Performance and stability improvements on all platforms. + + +2016-12-17: Version 5.7.283 + + Performance and stability improvements on all platforms. + + +2016-12-17: Version 5.7.282 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.281 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.280 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.279 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.278 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.277 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.276 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.275 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.274 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.273 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.272 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.271 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.270 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.269 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.268 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.267 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.266 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.265 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.264 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.263 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.262 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.261 + + Performance and stability improvements on all platforms. + + +2016-12-16: Version 5.7.260 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.259 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.258 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.257 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.256 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.255 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.254 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.253 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.252 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.251 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.250 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.249 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.248 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.247 + + Performance and stability improvements on all platforms. + + +2016-12-15: Version 5.7.246 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.245 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.244 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.243 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.242 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.241 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.240 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.239 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.238 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.237 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.236 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.235 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.234 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.233 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.232 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.231 + + Performance and stability improvements on all platforms. + + +2016-12-14: Version 5.7.230 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.229 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.228 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.227 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.226 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.225 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.224 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.223 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.222 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.221 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.220 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.219 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.218 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.217 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.216 + + Performance and stability improvements on all platforms. + + +2016-12-13: Version 5.7.215 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.214 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.213 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.212 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.211 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.210 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.209 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.208 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.207 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.206 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.205 + + Performance and stability improvements on all platforms. + + +2016-12-12: Version 5.7.204 + + Performance and stability improvements on all platforms. + + +2016-12-11: Version 5.7.203 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.202 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.201 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.200 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.199 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.198 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.197 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.196 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.195 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.194 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.193 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.192 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.191 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.190 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.189 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.188 + + Performance and stability improvements on all platforms. + + +2016-12-09: Version 5.7.187 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.186 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.185 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.184 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.183 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.182 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.181 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.180 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.179 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.178 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.177 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.176 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.175 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.174 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.173 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.172 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.171 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.170 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.169 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.168 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.167 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.166 + + Performance and stability improvements on all platforms. + + +2016-12-08: Version 5.7.165 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.164 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.163 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.162 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.161 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.160 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.159 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.158 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.157 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.156 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.155 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.154 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.153 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.152 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.151 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.150 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.149 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.148 + + Performance and stability improvements on all platforms. + + +2016-12-07: Version 5.7.147 + + Performance and stability improvements on all platforms. + + +2016-12-06: Version 5.7.146 + + Performance and stability improvements on all platforms. + + +2016-12-06: Version 5.7.145 + + Performance and stability improvements on all platforms. + + +2016-12-06: Version 5.7.144 + + Performance and stability improvements on all platforms. + + +2016-12-06: Version 5.7.143 + + Performance and stability improvements on all platforms. + + +2016-12-06: Version 5.7.142 + + Performance and stability improvements on all platforms. + + +2016-12-06: Version 5.7.141 + + Performance and stability improvements on all platforms. + + +2016-12-06: Version 5.7.140 + + Performance and stability improvements on all platforms. + + +2016-12-06: Version 5.7.139 + + Performance and stability improvements on all platforms. + + +2016-12-06: Version 5.7.138 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.137 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.136 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.135 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.134 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.133 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.132 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.131 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.130 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.129 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.128 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.127 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.126 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.125 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.124 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.123 + + Performance and stability improvements on all platforms. + + +2016-12-05: Version 5.7.122 + + Performance and stability improvements on all platforms. + + +2016-12-02: Version 5.7.121 + + Performance and stability improvements on all platforms. + + +2016-12-02: Version 5.7.120 + + Performance and stability improvements on all platforms. + + +2016-12-02: Version 5.7.119 + + Performance and stability improvements on all platforms. + + +2016-12-02: Version 5.7.118 + + Performance and stability improvements on all platforms. + + +2016-12-02: Version 5.7.117 + + Performance and stability improvements on all platforms. + + +2016-12-02: Version 5.7.116 + + Performance and stability improvements on all platforms. + + +2016-12-02: Version 5.7.115 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.114 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.113 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.112 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.111 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.110 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.109 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.108 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.107 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.106 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.105 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.104 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.103 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.102 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.101 + + Performance and stability improvements on all platforms. + + +2016-12-01: Version 5.7.100 + + [build] Use MSVS 2015 by default (Chromium issue 603131). + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.99 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.98 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.97 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.96 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.95 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.94 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.93 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.92 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.91 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.90 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.89 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.88 + + Performance and stability improvements on all platforms. + + +2016-11-30: Version 5.7.87 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.86 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.85 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.84 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.83 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.82 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.81 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.80 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.79 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.78 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.77 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.76 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.75 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.74 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.73 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.72 + + Performance and stability improvements on all platforms. + + +2016-11-29: Version 5.7.71 + + Performance and stability improvements on all platforms. + + +2016-11-28: Version 5.7.70 + + Performance and stability improvements on all platforms. + + +2016-11-28: Version 5.7.69 + + Performance and stability improvements on all platforms. + + +2016-11-28: Version 5.7.68 + + Performance and stability improvements on all platforms. + + +2016-11-28: Version 5.7.67 + + Performance and stability improvements on all platforms. + + +2016-11-28: Version 5.7.66 + + Performance and stability improvements on all platforms. + + +2016-11-28: Version 5.7.65 + + Performance and stability improvements on all platforms. + + +2016-11-28: Version 5.7.64 + + Performance and stability improvements on all platforms. + + +2016-11-25: Version 5.7.63 + + Performance and stability improvements on all platforms. + + +2016-11-25: Version 5.7.62 + + Performance and stability improvements on all platforms. + + +2016-11-25: Version 5.7.61 + + Performance and stability improvements on all platforms. + + +2016-11-25: Version 5.7.60 + + Performance and stability improvements on all platforms. + + +2016-11-25: Version 5.7.59 + + Performance and stability improvements on all platforms. + + +2016-11-25: Version 5.7.58 + + Performance and stability improvements on all platforms. + + +2016-11-24: Version 5.7.57 + + Performance and stability improvements on all platforms. + + +2016-11-24: Version 5.7.56 + + Performance and stability improvements on all platforms. + + +2016-11-24: Version 5.7.55 + + Performance and stability improvements on all platforms. + + +2016-11-24: Version 5.7.54 + + Performance and stability improvements on all platforms. + + +2016-11-24: Version 5.7.53 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.52 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.51 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.50 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.49 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.48 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.47 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.46 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.45 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.44 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.43 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.42 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.41 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.40 + + Performance and stability improvements on all platforms. + + +2016-11-23: Version 5.7.39 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.38 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.37 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.36 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.35 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.34 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.33 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.32 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.31 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.30 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.29 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.28 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.27 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.26 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.25 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.24 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.23 + + Performance and stability improvements on all platforms. + + +2016-11-22: Version 5.7.22 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.21 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.20 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.19 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.18 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.17 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.16 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.15 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.14 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.13 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.12 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.11 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.10 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.9 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.8 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.7 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.6 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.5 + + Performance and stability improvements on all platforms. + + +2016-11-21: Version 5.7.4 + + Performance and stability improvements on all platforms. + + +2016-11-20: Version 5.7.3 + + Performance and stability improvements on all platforms. + + +2016-11-20: Version 5.7.2 + + Performance and stability improvements on all platforms. + + +2016-11-20: Version 5.7.1 + + Performance and stability improvements on all platforms. + + +2016-11-17: Version 5.6.331 + + Performance and stability improvements on all platforms. + + +2016-11-17: Version 5.6.330 + + Performance and stability improvements on all platforms. + + +2016-11-17: Version 5.6.329 + + Performance and stability improvements on all platforms. + + +2016-11-17: Version 5.6.328 + + Performance and stability improvements on all platforms. + + +2016-11-16: Version 5.6.327 + + Performance and stability improvements on all platforms. + + 2016-11-15: Version 5.6.326 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 161015d661a8d1..6f66ac36f7ef54 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -8,15 +8,15 @@ vars = { deps = { "v8/build": - Var("chromium_url") + "/chromium/src/build.git" + "@" + "a3b623a6eff6dc9d58a03251ae22bccf92f67cb2", + Var("chromium_url") + "/chromium/src/build.git" + "@" + "f55127ddc3632dbd6fef285c71ab4cb103e08f0c", "v8/tools/gyp": Var("chromium_url") + "/external/gyp.git" + "@" + "e7079f0e0e14108ab0dba58728ff219637458563", "v8/third_party/icu": - Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "c1a237113f525a1561d4b322d7653e1083f79aaa", + Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "9cd2828740572ba6f694b9365236a8356fd06147", "v8/third_party/instrumented_libraries": - Var("chromium_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "45f5814b1543e41ea0be54c771e3840ea52cca4a", + Var("chromium_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "5b6f777da671be977f56f0e8fc3469a3ccbb4474", "v8/buildtools": - Var("chromium_url") + "/chromium/buildtools.git" + "@" + "39b1db2ab4aa4b2ccaa263c29bdf63e7c1ee28aa", + Var("chromium_url") + "/chromium/buildtools.git" + "@" + "cb12d6e8641f0c9b0fbbfa4bf17c55c6c0d3c38f", "v8/base/trace_event/common": Var("chromium_url") + "/chromium/src/base/trace_event/common.git" + "@" + "06294c8a4a6f744ef284cd63cfe54dbf61eea290", "v8/third_party/jinja2": @@ -24,7 +24,7 @@ deps = { "v8/third_party/markupsafe": Var("chromium_url") + "/chromium/src/third_party/markupsafe.git" + "@" + "484a5661041cac13bfc688a26ec5434b05d18961", "v8/tools/swarming_client": - Var('chromium_url') + '/external/swarming.client.git' + '@' + "380e32662312eb107f06fcba6409b0409f8fef72", + Var('chromium_url') + '/external/swarming.client.git' + '@' + "ebc8dab6f8b8d79ec221c94de39a921145abd404", "v8/testing/gtest": Var("chromium_url") + "/external/github.com/google/googletest.git" + "@" + "6f8a66431cb592dad629028a50b3dd418a408c87", "v8/testing/gmock": @@ -35,19 +35,19 @@ deps = { Var("chromium_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be", "v8/test/simdjs/data": Var("chromium_url") + "/external/github.com/tc39/ecmascript_simd.git" + "@" + "baf493985cb9ea7cdbd0d68704860a8156de9556", "v8/test/test262/data": - Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "fb61ab44eb1bbc2699d714fc00e33af2a19411ce", + Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "6a0f1189eb00d38ef9760cb65cbc41c066876cde", "v8/test/test262/harness": - Var("chromium_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "cbd968f54f7a95c6556d53ba852292a4c49d11d8", + Var("chromium_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "0f2acdd882c84cff43b9d60df7574a1901e2cdcd", "v8/tools/clang": - Var("chromium_url") + "/chromium/src/tools/clang.git" + "@" + "75350a858c51ad69e2aae051a8727534542da29f", + Var("chromium_url") + "/chromium/src/tools/clang.git" + "@" + "f7ce1a5678e5addc015aed5f1e7734bbd2caac7c", } deps_os = { "android": { "v8/third_party/android_tools": - Var("chromium_url") + "/android_tools.git" + "@" + "25d57ead05d3dfef26e9c19b13ed10b0a69829cf", + Var("chromium_url") + "/android_tools.git" + "@" + "b43a6a289a7588b1769814f04dd6c7d7176974cc", "v8/third_party/catapult": - Var('chromium_url') + "/external/github.com/catapult-project/catapult.git" + "@" + "6962f5c0344a79b152bf84460a93e1b2e11ea0f4", + Var('chromium_url') + "/external/github.com/catapult-project/catapult.git" + "@" + "143ba4ddeb05e6165fb8413c5f3f47d342922d24", }, "win": { "v8/third_party/cygwin": @@ -263,7 +263,7 @@ hooks = [ # Update the Windows toolchain if necessary. 'name': 'win_toolchain', 'pattern': '.', - 'action': ['python', 'v8/gypfiles/vs_toolchain.py', 'update'], + 'action': ['python', 'v8/build/vs_toolchain.py', 'update'], }, # Pull binutils for linux, enabled debug fission for faster linking / # debugging when used with clang on Ubuntu Precise. diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index 028f4ff12c5c89..e375fa65b73326 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -5,14 +5,19 @@ binji@chromium.org bmeurer@chromium.org bradnelson@chromium.org cbruni@chromium.org +clemensh@chromium.org danno@chromium.org epertoso@chromium.org +franzih@chromium.org +gsathya@chromium.org hablich@chromium.org hpayer@chromium.org ishell@chromium.org jarin@chromium.org +jgruber@chromium.org jkummerow@chromium.org jochen@chromium.org +leszeks@chromium.org littledan@chromium.org machenbach@chromium.org marja@chromium.org @@ -21,9 +26,11 @@ mstarzinger@chromium.org mtrofin@chromium.org mvstanton@chromium.org mythria@chromium.org +petermarshall@chromium.org neis@chromium.org rmcilroy@chromium.org rossberg@chromium.org +tebbi@chromium.org titzer@chromium.org ulan@chromium.org verwaest@chromium.org diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index ad218330b180a4..8321f5cedfd67e 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -67,19 +67,22 @@ def _V8PresubmitChecks(input_api, output_api): input_api.PresubmitLocalPath(), 'tools')) from presubmit import CppLintProcessor from presubmit import SourceProcessor - from presubmit import CheckAuthorizedAuthor - from presubmit import CheckStatusFiles + from presubmit import StatusFilesProcessor results = [] - if not CppLintProcessor().Run(input_api.PresubmitLocalPath()): + if not CppLintProcessor().RunOnFiles( + input_api.AffectedFiles(include_deletes=False)): results.append(output_api.PresubmitError("C++ lint check failed")) - if not SourceProcessor().Run(input_api.PresubmitLocalPath()): + if not SourceProcessor().RunOnFiles( + input_api.AffectedFiles(include_deletes=False)): results.append(output_api.PresubmitError( "Copyright header, trailing whitespaces and two empty lines " \ "between declarations check failed")) - if not CheckStatusFiles(input_api.PresubmitLocalPath()): + if not StatusFilesProcessor().RunOnFiles( + input_api.AffectedFiles(include_deletes=False)): results.append(output_api.PresubmitError("Status file check failed")) - results.extend(CheckAuthorizedAuthor(input_api, output_api)) + results.extend(input_api.canned_checks.CheckAuthorizedAuthor( + input_api, output_api)) return results diff --git a/deps/v8/build_overrides/build.gni b/deps/v8/build_overrides/build.gni index 6b8a4ff21921a1..8dcaf3a29d78f1 100644 --- a/deps/v8/build_overrides/build.gni +++ b/deps/v8/build_overrides/build.gni @@ -24,3 +24,9 @@ linux_use_bundled_binutils_override = true asan_suppressions_file = "//build/sanitizers/asan_suppressions.cc" lsan_suppressions_file = "//build/sanitizers/lsan_suppressions.cc" tsan_suppressions_file = "//build/sanitizers/tsan_suppressions.cc" + +# Skip assertions about 4GiB file size limit. +ignore_elf32_limitations = true + +# Use the system install of Xcode for tools like ibtool, libtool, etc. +use_system_xcode = true diff --git a/deps/v8/build_overrides/v8.gni b/deps/v8/build_overrides/v8.gni index df8320d5d1746d..15a50558610fa0 100644 --- a/deps/v8/build_overrides/v8.gni +++ b/deps/v8/build_overrides/v8.gni @@ -2,14 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/config/features.gni") -import("//build/config/ui.gni") import("//build/config/v8_target_cpu.gni") -import("//gni/v8.gni") - -if (is_android) { - import("//build/config/android/config.gni") -} if (((v8_current_cpu == "x86" || v8_current_cpu == "x64" || v8_current_cpu == "x87") && (is_linux || is_mac)) || @@ -24,9 +17,9 @@ v8_extra_library_files = [ "//test/cctest/test-extra.js" ] v8_experimental_extra_library_files = [ "//test/cctest/test-experimental-extra.js" ] +v8_enable_inspector_override = true + declare_args() { - # Enable inspector. See include/v8-inspector.h. - v8_enable_inspector = true + # Use static libraries instead of source_sets. + v8_static_library = false } - -v8_enable_inspector_override = v8_enable_inspector diff --git a/deps/v8/gni/isolate.gni b/deps/v8/gni/isolate.gni index 1cc3a38770439f..3906cf60ef9345 100644 --- a/deps/v8/gni/isolate.gni +++ b/deps/v8/gni/isolate.gni @@ -3,7 +3,6 @@ # found in the LICENSE file. import("//build/config/sanitizers/sanitizers.gni") -import("//build_overrides/v8.gni") import("//third_party/icu/config.gni") import("v8.gni") @@ -97,7 +96,7 @@ template("v8_isolate_run") { } else { icu_use_data_file_flag = "0" } - if (v8_enable_inspector_override) { + if (v8_enable_inspector) { enable_inspector = "1" } else { enable_inspector = "0" @@ -181,7 +180,7 @@ template("v8_isolate_run") { if (is_win) { args += [ "--config-variable", - "msvs_version=2013", + "msvs_version=2015", ] } else { args += [ diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index 3759572b935157..cb2bdf2cf5d9a5 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -4,8 +4,12 @@ import("//build/config/sanitizers/sanitizers.gni") import("//build/config/v8_target_cpu.gni") +import("//build_overrides/v8.gni") declare_args() { + # Includes files needed for correctness fuzzing. + v8_correctness_fuzzer = false + # Indicate if valgrind was fetched as a custom deps to make it available on # swarming. v8_has_valgrind = false @@ -30,6 +34,9 @@ declare_args() { # Enable ECMAScript Internationalization API. Enabling this feature will # add a dependency on the ICU library. v8_enable_i18n_support = true + + # Enable inspector. See include/v8-inspector.h. + v8_enable_inspector = v8_enable_inspector_override } if (v8_use_external_startup_data == "") { @@ -83,11 +90,20 @@ if (is_posix && v8_enable_backtrace) { # All templates should be kept in sync. template("v8_source_set") { - source_set(target_name) { - forward_variables_from(invoker, "*", [ "configs" ]) - configs += invoker.configs - configs -= v8_remove_configs - configs += v8_add_configs + if (defined(v8_static_library) && v8_static_library) { + static_library(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + configs += invoker.configs + configs -= v8_remove_configs + configs += v8_add_configs + } + } else { + source_set(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + configs += invoker.configs + configs -= v8_remove_configs + configs += v8_add_configs + } } } diff --git a/deps/v8/gypfiles/all.gyp b/deps/v8/gypfiles/all.gyp index a3f2eedc77d3bd..12e1fdadb76936 100644 --- a/deps/v8/gypfiles/all.gyp +++ b/deps/v8/gypfiles/all.gyp @@ -27,10 +27,14 @@ }], ['v8_enable_inspector==1', { 'dependencies': [ - '../test/debugger/debugger.gyp:*', '../test/inspector/inspector.gyp:*', ], }], + ['v8_enable_inspector==1 and test_isolation_mode != "noop"', { + 'dependencies': [ + '../test/debugger/debugger.gyp:*', + ], + }], ['test_isolation_mode != "noop"', { 'dependencies': [ '../test/bot_default.gyp:*', diff --git a/deps/v8/gypfiles/get_landmines.py b/deps/v8/gypfiles/get_landmines.py index e6b6da6c48db4b..6137648e6dc991 100755 --- a/deps/v8/gypfiles/get_landmines.py +++ b/deps/v8/gypfiles/get_landmines.py @@ -31,6 +31,7 @@ def main(): print 'Clober to fix windows build problems.' print 'Clober again to fix windows build problems.' print 'Clobber to possibly resolve failure on win-32 bot.' + print 'Clobber for http://crbug.com/668958.' return 0 diff --git a/deps/v8/gypfiles/toolchain.gypi b/deps/v8/gypfiles/toolchain.gypi index 5105fff0700199..95eb1d99cbff3f 100644 --- a/deps/v8/gypfiles/toolchain.gypi +++ b/deps/v8/gypfiles/toolchain.gypi @@ -989,6 +989,8 @@ # present in VS 2003 and earlier. 'msvs_disabled_warnings': [4351], 'msvs_configuration_attributes': { + 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)', + 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', 'CharacterSet': '1', }, }], diff --git a/deps/v8/gypfiles/win/msvs_dependencies.isolate b/deps/v8/gypfiles/win/msvs_dependencies.isolate new file mode 100644 index 00000000000000..79ae11a1ae9596 --- /dev/null +++ b/deps/v8/gypfiles/win/msvs_dependencies.isolate @@ -0,0 +1,97 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO(machenbach): Remove this when crbug.com/669910 is resolved. +{ + 'conditions': [ + # Copy the VS runtime DLLs into the isolate so that they + # don't have to be preinstalled on the target machine. + # + # VS2013 runtimes + ['OS=="win" and msvs_version==2013 and component=="shared_library" and (CONFIGURATION_NAME=="Debug" or CONFIGURATION_NAME=="Debug_x64")', { + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/msvcp120d.dll', + '<(PRODUCT_DIR)/msvcr120d.dll', + ], + }, + }], + ['OS=="win" and msvs_version==2013 and component=="shared_library" and (CONFIGURATION_NAME=="Release" or CONFIGURATION_NAME=="Release_x64")', { + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/msvcp120.dll', + '<(PRODUCT_DIR)/msvcr120.dll', + ], + }, + }], + # VS2015 runtimes + ['OS=="win" and msvs_version==2015 and component=="shared_library" and (CONFIGURATION_NAME=="Debug" or CONFIGURATION_NAME=="Debug_x64")', { + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/msvcp140d.dll', + '<(PRODUCT_DIR)/vccorlib140d.dll', + '<(PRODUCT_DIR)/vcruntime140d.dll', + '<(PRODUCT_DIR)/ucrtbased.dll', + ], + }, + }], + ['OS=="win" and msvs_version==2015 and component=="shared_library" and (CONFIGURATION_NAME=="Release" or CONFIGURATION_NAME=="Release_x64")', { + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/msvcp140.dll', + '<(PRODUCT_DIR)/vccorlib140.dll', + '<(PRODUCT_DIR)/vcruntime140.dll', + '<(PRODUCT_DIR)/ucrtbase.dll', + ], + }, + }], + ['OS=="win" and msvs_version==2015 and component=="shared_library"', { + # Windows 10 Universal C Runtime binaries. + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/api-ms-win-core-console-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-datetime-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-debug-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-errorhandling-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-file-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-file-l1-2-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-file-l2-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-handle-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-heap-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-interlocked-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-libraryloader-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-localization-l1-2-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-memory-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-namedpipe-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-processenvironment-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-processthreads-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-processthreads-l1-1-1.dll', + '<(PRODUCT_DIR)/api-ms-win-core-profile-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-rtlsupport-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-string-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-synch-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-synch-l1-2-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-sysinfo-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-timezone-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-core-util-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-conio-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-convert-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-environment-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-filesystem-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-heap-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-locale-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-math-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-multibyte-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-private-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-process-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-runtime-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-stdio-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-string-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-time-l1-1-0.dll', + '<(PRODUCT_DIR)/api-ms-win-crt-utility-l1-1-0.dll', + ], + }, + }], + ], +} diff --git a/deps/v8/include/libplatform/libplatform.h b/deps/v8/include/libplatform/libplatform.h index 40f3f668927f4e..cab467fd50704f 100644 --- a/deps/v8/include/libplatform/libplatform.h +++ b/deps/v8/include/libplatform/libplatform.h @@ -34,6 +34,17 @@ V8_PLATFORM_EXPORT v8::Platform* CreateDefaultPlatform( V8_PLATFORM_EXPORT bool PumpMessageLoop(v8::Platform* platform, v8::Isolate* isolate); +/** + * Runs pending idle tasks for at most |idle_time_in_seconds| seconds. + * + * The caller has to make sure that this is called from the right thread. + * This call does not block if no task is pending. The |platform| has to be + * created using |CreateDefaultPlatform|. + */ +V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform* platform, + v8::Isolate* isolate, + double idle_time_in_seconds); + /** * Attempts to set the tracing controller for the given platform. * diff --git a/deps/v8/include/v8-debug.h b/deps/v8/include/v8-debug.h index 6385a31d85e80f..777b8aaa3e645a 100644 --- a/deps/v8/include/v8-debug.h +++ b/deps/v8/include/v8-debug.h @@ -16,11 +16,9 @@ namespace v8 { enum DebugEvent { Break = 1, Exception = 2, - NewFunction = 3, - BeforeCompile = 4, - AfterCompile = 5, - CompileError = 6, - AsyncTaskEvent = 7, + AfterCompile = 3, + CompileError = 4, + AsyncTaskEvent = 5, }; class V8_EXPORT Debug { @@ -87,7 +85,6 @@ class V8_EXPORT Debug { virtual ~Message() {} }; - /** * An event details object passed to the debug event listener. */ @@ -145,7 +142,7 @@ class V8_EXPORT Debug { * * \param message the debug message handler message object * - * A MessageHandler2 does not take possession of the message data, + * A MessageHandler does not take possession of the message data, * and must not rely on the data persisting after the handler returns. */ typedef void (*MessageHandler)(const Message& message); @@ -167,33 +164,37 @@ class V8_EXPORT Debug { static void CancelDebugBreak(Isolate* isolate); // Check if a debugger break is scheduled in the given isolate. - static bool CheckDebugBreak(Isolate* isolate); + V8_DEPRECATED("No longer supported", + static bool CheckDebugBreak(Isolate* isolate)); // Message based interface. The message protocol is JSON. - static void SetMessageHandler(Isolate* isolate, MessageHandler handler); - - static void SendCommand(Isolate* isolate, - const uint16_t* command, int length, - ClientData* client_data = NULL); - - /** - * Run a JavaScript function in the debugger. - * \param fun the function to call - * \param data passed as second argument to the function - * With this call the debugger is entered and the function specified is called - * with the execution state as the first argument. This makes it possible to - * get access to information otherwise not available during normal JavaScript - * execution e.g. details on stack frames. Receiver of the function call will - * be the debugger context global object, however this is a subject to change. - * The following example shows a JavaScript function which when passed to - * v8::Debug::Call will return the current line of JavaScript execution. - * - * \code - * function frame_source_line(exec_state) { - * return exec_state.frame(0).sourceLine(); - * } - * \endcode - */ + V8_DEPRECATED("No longer supported", + static void SetMessageHandler(Isolate* isolate, + MessageHandler handler)); + + V8_DEPRECATED("No longer supported", + static void SendCommand(Isolate* isolate, + const uint16_t* command, int length, + ClientData* client_data = NULL)); + + /** + * Run a JavaScript function in the debugger. + * \param fun the function to call + * \param data passed as second argument to the function + * With this call the debugger is entered and the function specified is called + * with the execution state as the first argument. This makes it possible to + * get access to information otherwise not available during normal JavaScript + * execution e.g. details on stack frames. Receiver of the function call will + * be the debugger context global object, however this is a subject to change. + * The following example shows a JavaScript function which when passed to + * v8::Debug::Call will return the current line of JavaScript execution. + * + * \code + * function frame_source_line(exec_state) { + * return exec_state.frame(0).sourceLine(); + * } + * \endcode + */ // TODO(dcarney): data arg should be a MaybeLocal static MaybeLocal Call(Local context, v8::Local fun, @@ -202,8 +203,9 @@ class V8_EXPORT Debug { /** * Returns a mirror object for the given object. */ - static MaybeLocal GetMirror(Local context, - v8::Local obj); + V8_DEPRECATED("No longer supported", + static MaybeLocal GetMirror(Local context, + v8::Local obj)); /** * Makes V8 process all pending debug messages. @@ -236,7 +238,8 @@ class V8_EXPORT Debug { * "Evaluate" debug command behavior currently is not specified in scope * of this method. */ - static void ProcessDebugMessages(Isolate* isolate); + V8_DEPRECATED("No longer supported", + static void ProcessDebugMessages(Isolate* isolate)); /** * Debugger is running in its own context which is entered while debugger @@ -245,13 +248,16 @@ class V8_EXPORT Debug { * to change. The Context exists only when the debugger is active, i.e. at * least one DebugEventListener or MessageHandler is set. */ - static Local GetDebugContext(Isolate* isolate); + V8_DEPRECATED("Use v8-inspector", + static Local GetDebugContext(Isolate* isolate)); /** * While in the debug context, this method returns the top-most non-debug * context, if it exists. */ - static MaybeLocal GetDebuggedContext(Isolate* isolate); + V8_DEPRECATED( + "No longer supported", + static MaybeLocal GetDebuggedContext(Isolate* isolate)); /** * Enable/disable LiveEdit functionality for the given Isolate diff --git a/deps/v8/include/v8-inspector.h b/deps/v8/include/v8-inspector.h index 0855ac101b74ef..d0925adba0460c 100644 --- a/deps/v8/include/v8-inspector.h +++ b/deps/v8/include/v8-inspector.h @@ -248,9 +248,9 @@ class V8_EXPORT V8Inspector { class V8_EXPORT Channel { public: virtual ~Channel() {} - virtual void sendProtocolResponse(int callId, - const StringView& message) = 0; - virtual void sendProtocolNotification(const StringView& message) = 0; + virtual void sendResponse(int callId, + std::unique_ptr message) = 0; + virtual void sendNotification(std::unique_ptr message) = 0; virtual void flushProtocolNotifications() = 0; }; virtual std::unique_ptr connect( diff --git a/deps/v8/include/v8-version-string.h b/deps/v8/include/v8-version-string.h new file mode 100644 index 00000000000000..075282de4ca0e2 --- /dev/null +++ b/deps/v8/include/v8-version-string.h @@ -0,0 +1,33 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef V8_VERSION_STRING_H_ +#define V8_VERSION_STRING_H_ + +#include "v8-version.h" // NOLINT(build/include) + +// This is here rather than v8-version.h to keep that file simple and +// machine-processable. + +#if V8_IS_CANDIDATE_VERSION +#define V8_CANDIDATE_STRING " (candidate)" +#else +#define V8_CANDIDATE_STRING "" +#endif + +#define V8_SX(x) #x +#define V8_S(x) V8_SX(x) + +#if V8_PATCH_LEVEL > 0 +#define V8_VERSION_STRING \ + V8_S(V8_MAJOR_VERSION) \ + "." V8_S(V8_MINOR_VERSION) "." V8_S(V8_BUILD_NUMBER) "." V8_S( \ + V8_PATCH_LEVEL) V8_CANDIDATE_STRING +#else +#define V8_VERSION_STRING \ + V8_S(V8_MAJOR_VERSION) \ + "." V8_S(V8_MINOR_VERSION) "." V8_S(V8_BUILD_NUMBER) V8_CANDIDATE_STRING +#endif + +#endif // V8_VERSION_STRING_H_ diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 663964616f63e7..2301f219b36198 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 5 -#define V8_MINOR_VERSION 6 -#define V8_BUILD_NUMBER 326 -#define V8_PATCH_LEVEL 57 +#define V8_MINOR_VERSION 7 +#define V8_BUILD_NUMBER 492 +#define V8_PATCH_LEVEL 69 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 5348ba7e48b32b..b513c7f1f3741b 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -666,7 +666,7 @@ struct CopyablePersistentTraits { /** * A PersistentBase which allows copy and assignment. * - * Copy, assignment and destructor bevavior is controlled by the traits + * Copy, assignment and destructor behavior is controlled by the traits * class M. * * Note: Persistent class hierarchy is subject to future changes. @@ -867,8 +867,8 @@ class V8_EXPORT HandleScope { HandleScope(const HandleScope&) = delete; void operator=(const HandleScope&) = delete; - void* operator new(size_t size) = delete; - void operator delete(void*, size_t) = delete; + void* operator new(size_t size); + void operator delete(void*, size_t); protected: V8_INLINE HandleScope() {} @@ -919,8 +919,8 @@ class V8_EXPORT EscapableHandleScope : public HandleScope { EscapableHandleScope(const EscapableHandleScope&) = delete; void operator=(const EscapableHandleScope&) = delete; - void* operator new(size_t size) = delete; - void operator delete(void*, size_t) = delete; + void* operator new(size_t size); + void operator delete(void*, size_t); private: internal::Object** Escape(internal::Object** escape_value); @@ -934,8 +934,8 @@ class V8_EXPORT SealHandleScope { SealHandleScope(const SealHandleScope&) = delete; void operator=(const SealHandleScope&) = delete; - void* operator new(size_t size) = delete; - void operator delete(void*, size_t) = delete; + void* operator new(size_t size); + void operator delete(void*, size_t); private: internal::Isolate* const isolate_; @@ -961,30 +961,21 @@ class V8_EXPORT Data { */ class ScriptOriginOptions { public: - V8_INLINE ScriptOriginOptions(bool is_embedder_debug_script = false, - bool is_shared_cross_origin = false, - bool is_opaque = false) - : flags_((is_embedder_debug_script ? kIsEmbedderDebugScript : 0) | - (is_shared_cross_origin ? kIsSharedCrossOrigin : 0) | - (is_opaque ? kIsOpaque : 0)) {} + V8_INLINE ScriptOriginOptions(bool is_shared_cross_origin = false, + bool is_opaque = false, bool is_wasm = false) + : flags_((is_shared_cross_origin ? kIsSharedCrossOrigin : 0) | + (is_wasm ? kIsWasm : 0) | (is_opaque ? kIsOpaque : 0)) {} V8_INLINE ScriptOriginOptions(int flags) - : flags_(flags & - (kIsEmbedderDebugScript | kIsSharedCrossOrigin | kIsOpaque)) {} - bool IsEmbedderDebugScript() const { - return (flags_ & kIsEmbedderDebugScript) != 0; - } + : flags_(flags & (kIsSharedCrossOrigin | kIsOpaque | kIsWasm)) {} bool IsSharedCrossOrigin() const { return (flags_ & kIsSharedCrossOrigin) != 0; } bool IsOpaque() const { return (flags_ & kIsOpaque) != 0; } + bool IsWasm() const { return (flags_ & kIsWasm) != 0; } int Flags() const { return flags_; } private: - enum { - kIsEmbedderDebugScript = 1, - kIsSharedCrossOrigin = 1 << 1, - kIsOpaque = 1 << 2 - }; + enum { kIsSharedCrossOrigin = 1, kIsOpaque = 1 << 1, kIsWasm = 1 << 2 }; const int flags_; }; @@ -999,9 +990,10 @@ class ScriptOrigin { Local resource_column_offset = Local(), Local resource_is_shared_cross_origin = Local(), Local script_id = Local(), - Local resource_is_embedder_debug_script = Local(), Local source_map_url = Local(), - Local resource_is_opaque = Local()); + Local resource_is_opaque = Local(), + Local is_wasm = Local()); + V8_INLINE Local ResourceName() const; V8_INLINE Local ResourceLineOffset() const; V8_INLINE Local ResourceColumnOffset() const; @@ -1485,6 +1477,11 @@ class V8_EXPORT Message { */ int GetEndPosition() const; + /** + * Returns the error level of the message. + */ + int ErrorLevel() const; + /** * Returns the index within the line of the first character where * the error occurred. @@ -1712,6 +1709,19 @@ class V8_EXPORT ValueSerializer { */ virtual Maybe WriteHostObject(Isolate* isolate, Local object); + /* + * Called when the ValueSerializer is going to serialize a + * SharedArrayBuffer object. The embedder must return an ID for the + * object, using the same ID if this SharedArrayBuffer has already been + * serialized in this buffer. When deserializing, this ID will be passed to + * ValueDeserializer::TransferSharedArrayBuffer as |transfer_id|. + * + * If the object cannot be serialized, an + * exception should be thrown and Nothing() returned. + */ + virtual Maybe GetSharedArrayBufferId( + Isolate* isolate, Local shared_array_buffer); + /* * Allocates memory for the buffer of at least the size provided. The actual * size (which may be greater or equal) is written to |actual_size|. If no @@ -1766,8 +1776,10 @@ class V8_EXPORT ValueSerializer { /* * Similar to TransferArrayBuffer, but for SharedArrayBuffer. */ - void TransferSharedArrayBuffer(uint32_t transfer_id, - Local shared_array_buffer); + V8_DEPRECATE_SOON("Use Delegate::GetSharedArrayBufferId", + void TransferSharedArrayBuffer( + uint32_t transfer_id, + Local shared_array_buffer)); /* * Write raw data in various common formats to the buffer. @@ -1834,9 +1846,10 @@ class V8_EXPORT ValueDeserializer { /* * Similar to TransferArrayBuffer, but for SharedArrayBuffer. - * transfer_id exists in the same namespace as unshared ArrayBuffer objects. + * The id is not necessarily in the same namespace as unshared ArrayBuffer + * objects. */ - void TransferSharedArrayBuffer(uint32_t transfer_id, + void TransferSharedArrayBuffer(uint32_t id, Local shared_array_buffer); /* @@ -1908,9 +1921,16 @@ class V8_EXPORT Value : public Data { */ V8_INLINE bool IsNull() const; - /** - * Returns true if this value is true. + /** + * Returns true if this value is either the null or the undefined value. + * See ECMA-262 + * 4.3.11. and 4.3.12 */ + V8_INLINE bool IsNullOrUndefined() const; + + /** + * Returns true if this value is true. + */ bool IsTrue() const; /** @@ -1920,7 +1940,6 @@ class V8_EXPORT Value : public Data { /** * Returns true if this value is a symbol or a string. - * This is an experimental feature. */ bool IsName() const; @@ -1932,7 +1951,6 @@ class V8_EXPORT Value : public Data { /** * Returns true if this value is a symbol. - * This is an experimental feature. */ bool IsSymbol() const; @@ -2004,7 +2022,6 @@ class V8_EXPORT Value : public Data { /** * Returns true if this value is a Symbol object. - * This is an experimental feature. */ bool IsSymbolObject() const; @@ -2025,19 +2042,16 @@ class V8_EXPORT Value : public Data { /** * Returns true if this value is a Generator function. - * This is an experimental feature. */ bool IsGeneratorFunction() const; /** * Returns true if this value is a Generator object (iterator). - * This is an experimental feature. */ bool IsGeneratorObject() const; /** * Returns true if this value is a Promise. - * This is an experimental feature. */ bool IsPromise() const; @@ -2073,73 +2087,61 @@ class V8_EXPORT Value : public Data { /** * Returns true if this value is an ArrayBuffer. - * This is an experimental feature. */ bool IsArrayBuffer() const; /** * Returns true if this value is an ArrayBufferView. - * This is an experimental feature. */ bool IsArrayBufferView() const; /** * Returns true if this value is one of TypedArrays. - * This is an experimental feature. */ bool IsTypedArray() const; /** * Returns true if this value is an Uint8Array. - * This is an experimental feature. */ bool IsUint8Array() const; /** * Returns true if this value is an Uint8ClampedArray. - * This is an experimental feature. */ bool IsUint8ClampedArray() const; /** * Returns true if this value is an Int8Array. - * This is an experimental feature. */ bool IsInt8Array() const; /** * Returns true if this value is an Uint16Array. - * This is an experimental feature. */ bool IsUint16Array() const; /** * Returns true if this value is an Int16Array. - * This is an experimental feature. */ bool IsInt16Array() const; /** * Returns true if this value is an Uint32Array. - * This is an experimental feature. */ bool IsUint32Array() const; /** * Returns true if this value is an Int32Array. - * This is an experimental feature. */ bool IsInt32Array() const; /** * Returns true if this value is a Float32Array. - * This is an experimental feature. */ bool IsFloat32Array() const; /** * Returns true if this value is a Float64Array. - * This is an experimental feature. */ bool IsFloat64Array() const; @@ -2151,7 +2153,6 @@ class V8_EXPORT Value : public Data { /** * Returns true if this value is a DataView. - * This is an experimental feature. */ bool IsDataView() const; @@ -2244,11 +2245,12 @@ class V8_EXPORT Value : public Data { template V8_INLINE static Value* Cast(T* value); - Local TypeOf(v8::Isolate*); + Local TypeOf(Isolate*); private: V8_INLINE bool QuickIsUndefined() const; V8_INLINE bool QuickIsNull() const; + V8_INLINE bool QuickIsNullOrUndefined() const; V8_INLINE bool QuickIsString() const; bool FullIsUndefined() const; bool FullIsNull() const; @@ -2291,9 +2293,10 @@ class V8_EXPORT Name : public Primitive { */ int GetIdentityHash(); - V8_INLINE static Name* Cast(v8::Value* obj); + V8_INLINE static Name* Cast(Value* obj); + private: - static void CheckCast(v8::Value* obj); + static void CheckCast(Value* obj); }; @@ -2391,7 +2394,7 @@ class V8_EXPORT String : public Name { /** * A zero length string. */ - V8_INLINE static v8::Local Empty(Isolate* isolate); + V8_INLINE static Local Empty(Isolate* isolate); /** * Returns true if the string is external @@ -2425,7 +2428,7 @@ class V8_EXPORT String : public Name { void operator=(const ExternalStringResourceBase&) = delete; private: - friend class v8::internal::Heap; + friend class internal::Heap; }; /** @@ -2669,8 +2672,6 @@ class V8_EXPORT String : public Name { /** * A JavaScript symbol (ECMA-262 edition 6) - * - * This is an experimental feature. Use at your own risk. */ class V8_EXPORT Symbol : public Name { public: @@ -2695,14 +2696,15 @@ class V8_EXPORT Symbol : public Name { // Well-known symbols static Local GetIterator(Isolate* isolate); static Local GetUnscopables(Isolate* isolate); + static Local GetToPrimitive(Isolate* isolate); static Local GetToStringTag(Isolate* isolate); static Local GetIsConcatSpreadable(Isolate* isolate); - V8_INLINE static Symbol* Cast(v8::Value* obj); + V8_INLINE static Symbol* Cast(Value* obj); private: Symbol(); - static void CheckCast(v8::Value* obj); + static void CheckCast(Value* obj); }; @@ -3695,7 +3697,7 @@ class V8_EXPORT Function : public Object { /** * Tells whether this function is builtin. */ - bool IsBuiltin() const; + V8_DEPRECATED("this should no longer be used.", bool IsBuiltin() const); /** * Returns scriptId. @@ -3720,10 +3722,15 @@ class V8_EXPORT Function : public Object { /** * An instance of the built-in Promise constructor (ES6 draft). - * This API is experimental. Only works with --harmony flag. */ class V8_EXPORT Promise : public Object { public: + /** + * State of the promise. Each value corresponds to one of the possible values + * of the [[PromiseState]] field. + */ + enum PromiseState { kPending, kFulfilled, kRejected }; + class V8_EXPORT Resolver : public Object { public: /** @@ -3780,6 +3787,17 @@ class V8_EXPORT Promise : public Object { */ bool HasHandler(); + /** + * Returns the content of the [[PromiseResult]] field. The Promise must not + * be pending. + */ + Local Result(); + + /** + * Returns the value of the [[PromiseState]] field. + */ + PromiseState State(); + V8_INLINE static Promise* Cast(Value* obj); private: @@ -3926,7 +3944,6 @@ enum class ArrayBufferCreationMode { kInternalized, kExternalized }; /** * An instance of the built-in ArrayBuffer constructor (ES6 draft 15.13.5). - * This API is experimental and may change significantly. */ class V8_EXPORT ArrayBuffer : public Object { public: @@ -3982,8 +3999,6 @@ class V8_EXPORT ArrayBuffer : public Object { * * The Data pointer of ArrayBuffer::Contents is always allocated with * Allocator::Allocate that is set via Isolate::CreateParams. - * - * This API is experimental and may change significantly. */ class V8_EXPORT Contents { // NOLINT public: @@ -4084,8 +4099,6 @@ class V8_EXPORT ArrayBuffer : public Object { /** * A base class for an instance of one of "views" over ArrayBuffer, * including TypedArrays and DataView (ES6 draft 15.13). - * - * This API is experimental and may change significantly. */ class V8_EXPORT ArrayBufferView : public Object { public: @@ -4133,7 +4146,6 @@ class V8_EXPORT ArrayBufferView : public Object { /** * A base class for an instance of TypedArray series of constructors * (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT TypedArray : public ArrayBufferView { public: @@ -4153,7 +4165,6 @@ class V8_EXPORT TypedArray : public ArrayBufferView { /** * An instance of Uint8Array constructor (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT Uint8Array : public TypedArray { public: @@ -4171,7 +4182,6 @@ class V8_EXPORT Uint8Array : public TypedArray { /** * An instance of Uint8ClampedArray constructor (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT Uint8ClampedArray : public TypedArray { public: @@ -4189,7 +4199,6 @@ class V8_EXPORT Uint8ClampedArray : public TypedArray { /** * An instance of Int8Array constructor (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT Int8Array : public TypedArray { public: @@ -4207,7 +4216,6 @@ class V8_EXPORT Int8Array : public TypedArray { /** * An instance of Uint16Array constructor (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT Uint16Array : public TypedArray { public: @@ -4225,7 +4233,6 @@ class V8_EXPORT Uint16Array : public TypedArray { /** * An instance of Int16Array constructor (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT Int16Array : public TypedArray { public: @@ -4243,7 +4250,6 @@ class V8_EXPORT Int16Array : public TypedArray { /** * An instance of Uint32Array constructor (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT Uint32Array : public TypedArray { public: @@ -4261,7 +4267,6 @@ class V8_EXPORT Uint32Array : public TypedArray { /** * An instance of Int32Array constructor (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT Int32Array : public TypedArray { public: @@ -4279,7 +4284,6 @@ class V8_EXPORT Int32Array : public TypedArray { /** * An instance of Float32Array constructor (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT Float32Array : public TypedArray { public: @@ -4297,7 +4301,6 @@ class V8_EXPORT Float32Array : public TypedArray { /** * An instance of Float64Array constructor (ES6 draft 15.13.6). - * This API is experimental and may change significantly. */ class V8_EXPORT Float64Array : public TypedArray { public: @@ -4315,7 +4318,6 @@ class V8_EXPORT Float64Array : public TypedArray { /** * An instance of DataView constructor (ES6 draft 15.13.7). - * This API is experimental and may change significantly. */ class V8_EXPORT DataView : public ArrayBufferView { public: @@ -4446,7 +4448,7 @@ class V8_EXPORT Date : public Object { */ double ValueOf() const; - V8_INLINE static Date* Cast(v8::Value* obj); + V8_INLINE static Date* Cast(Value* obj); /** * Notification that the embedder has changed the time zone, @@ -4463,7 +4465,7 @@ class V8_EXPORT Date : public Object { static void DateTimeConfigurationChangeNotification(Isolate* isolate); private: - static void CheckCast(v8::Value* obj); + static void CheckCast(Value* obj); }; @@ -4476,10 +4478,10 @@ class V8_EXPORT NumberObject : public Object { double ValueOf() const; - V8_INLINE static NumberObject* Cast(v8::Value* obj); + V8_INLINE static NumberObject* Cast(Value* obj); private: - static void CheckCast(v8::Value* obj); + static void CheckCast(Value* obj); }; @@ -4493,10 +4495,10 @@ class V8_EXPORT BooleanObject : public Object { bool ValueOf() const; - V8_INLINE static BooleanObject* Cast(v8::Value* obj); + V8_INLINE static BooleanObject* Cast(Value* obj); private: - static void CheckCast(v8::Value* obj); + static void CheckCast(Value* obj); }; @@ -4509,17 +4511,15 @@ class V8_EXPORT StringObject : public Object { Local ValueOf() const; - V8_INLINE static StringObject* Cast(v8::Value* obj); + V8_INLINE static StringObject* Cast(Value* obj); private: - static void CheckCast(v8::Value* obj); + static void CheckCast(Value* obj); }; /** * A Symbol object (ECMA-262 edition 6). - * - * This is an experimental feature. Use at your own risk. */ class V8_EXPORT SymbolObject : public Object { public: @@ -4527,10 +4527,10 @@ class V8_EXPORT SymbolObject : public Object { Local ValueOf() const; - V8_INLINE static SymbolObject* Cast(v8::Value* obj); + V8_INLINE static SymbolObject* Cast(Value* obj); private: - static void CheckCast(v8::Value* obj); + static void CheckCast(Value* obj); }; @@ -4580,10 +4580,10 @@ class V8_EXPORT RegExp : public Object { */ Flags GetFlags() const; - V8_INLINE static RegExp* Cast(v8::Value* obj); + V8_INLINE static RegExp* Cast(Value* obj); private: - static void CheckCast(v8::Value* obj); + static void CheckCast(Value* obj); }; @@ -5144,7 +5144,11 @@ class V8_EXPORT FunctionTemplate : public Template { /** Get the InstanceTemplate. */ Local InstanceTemplate(); - /** Causes the function template to inherit from a parent function template.*/ + /** + * Causes the function template to inherit from a parent function template. + * This means the the function's prototype.__proto__ is set to the parent + * function's prototype. + **/ void Inherit(Local parent); /** @@ -5153,6 +5157,14 @@ class V8_EXPORT FunctionTemplate : public Template { */ Local PrototypeTemplate(); + /** + * A PrototypeProviderTemplate is another function template whose prototype + * property is used for this template. This is mutually exclusive with setting + * a prototype template indirectly by calling PrototypeTemplate() or using + * Inherit(). + **/ + void SetPrototypeProviderTemplate(Local prototype_provider); + /** * Set the class name of the FunctionTemplate. This is used for * printing objects created with the function created from the @@ -5611,9 +5623,9 @@ class V8_EXPORT Extension { // NOLINT const char** deps = 0, int source_length = -1); virtual ~Extension() { } - virtual v8::Local GetNativeFunctionTemplate( - v8::Isolate* isolate, v8::Local name) { - return v8::Local(); + virtual Local GetNativeFunctionTemplate( + Isolate* isolate, Local name) { + return Local(); } const char* name() const { return name_; } @@ -5718,7 +5730,7 @@ typedef void (*FatalErrorCallback)(const char* location, const char* message); typedef void (*OOMErrorCallback)(const char* location, bool is_heap_oom); -typedef void (*MessageCallback)(Local message, Local error); +typedef void (*MessageCallback)(Local message, Local data); // --- Tracing --- @@ -5787,6 +5799,27 @@ typedef void (*BeforeCallEnteredCallback)(Isolate*); typedef void (*CallCompletedCallback)(Isolate*); typedef void (*DeprecatedCallCompletedCallback)(); +/** + * PromiseHook with type kInit is called when a new promise is + * created. When a new promise is created as part of the chain in the + * case of Promise.then or in the intermediate promises created by + * Promise.{race, all}/AsyncFunctionAwait, we pass the parent promise + * otherwise we pass undefined. + * + * PromiseHook with type kResolve is called at the beginning of + * resolve or reject function defined by CreateResolvingFunctions. + * + * PromiseHook with type kBefore is called at the beginning of the + * PromiseReactionJob. + * + * PromiseHook with type kAfter is called right at the end of the + * PromiseReactionJob. + */ +enum class PromiseHookType { kInit, kResolve, kBefore, kAfter }; + +typedef void (*PromiseHook)(PromiseHookType type, Local promise, + Local parent); + // --- Promise Reject Callback --- enum PromiseRejectEvent { kPromiseRejectWithNoHandler = 0, @@ -5889,6 +5922,21 @@ typedef void (*FailedAccessCheckCallback)(Local target, */ typedef bool (*AllowCodeGenerationFromStringsCallback)(Local context); +// --- WASM compilation callbacks --- + +/** + * Callback to check if a buffer source may be compiled to WASM, given + * the compilation is attempted as a promise or not. + */ + +typedef bool (*AllowWasmCompileCallback)(Isolate* isolate, Local source, + bool as_promise); + +typedef bool (*AllowWasmInstantiateCallback)(Isolate* isolate, + Local module_or_bytes, + MaybeLocal ffi, + bool as_promise); + // --- Garbage Collection Callbacks --- /** @@ -6249,17 +6297,33 @@ class V8_EXPORT EmbedderHeapTracer { }; /** - * Callback to the embedder used in SnapshotCreator to handle internal fields. + * Callback and supporting data used in SnapshotCreator to implement embedder + * logic to serialize internal fields. */ -typedef StartupData (*SerializeInternalFieldsCallback)(Local holder, - int index); +struct SerializeInternalFieldsCallback { + typedef StartupData (*CallbackFunction)(Local holder, int index, + void* data); + SerializeInternalFieldsCallback(CallbackFunction function = nullptr, + void* data_arg = nullptr) + : callback(function), data(data_arg) {} + CallbackFunction callback; + void* data; +}; /** - * Callback to the embedder used to deserialize internal fields. + * Callback and supporting data used to implement embedder logic to deserialize + * internal fields. */ -typedef void (*DeserializeInternalFieldsCallback)(Local holder, - int index, - StartupData payload); +struct DeserializeInternalFieldsCallback { + typedef void (*CallbackFunction)(Local holder, int index, + StartupData payload, void* data); + DeserializeInternalFieldsCallback(CallbackFunction function = nullptr, + void* data_arg = nullptr) + : callback(function), data(data_arg) {} + void (*callback)(Local holder, int index, StartupData payload, + void* data); + void* data; +}; /** * Isolate represents an isolated instance of the V8 engine. V8 isolates have @@ -6283,8 +6347,7 @@ class V8_EXPORT Isolate { create_histogram_callback(nullptr), add_histogram_sample_callback(nullptr), array_buffer_allocator(nullptr), - external_references(nullptr), - deserialize_internal_fields_callback(nullptr) {} + external_references(nullptr) {} /** * The optional entry_hook allows the host application to provide the @@ -6340,12 +6403,6 @@ class V8_EXPORT Isolate { * entire lifetime of the isolate. */ intptr_t* external_references; - - /** - * Specifies an optional callback to deserialize internal fields. It - * should match the SerializeInternalFieldCallback used to serialize. - */ - DeserializeInternalFieldsCallback deserialize_internal_fields_callback; }; @@ -6481,12 +6538,25 @@ class V8_EXPORT Isolate { kLegacyDateParser = 33, kDefineGetterOrSetterWouldThrow = 34, kFunctionConstructorReturnedUndefined = 35, + kAssigmentExpressionLHSIsCallInSloppy = 36, + kAssigmentExpressionLHSIsCallInStrict = 37, + kPromiseConstructorReturnedUndefined = 38, // If you add new values here, you'll also need to update Chromium's: // UseCounter.h, V8PerIsolateData.cpp, histograms.xml kUseCounterFeatureCount // This enum value must be last. }; + enum MessageErrorLevel { + kMessageLog = (1 << 0), + kMessageDebug = (1 << 1), + kMessageInfo = (1 << 2), + kMessageError = (1 << 3), + kMessageWarning = (1 << 4), + kMessageAll = kMessageLog | kMessageDebug | kMessageInfo | kMessageError | + kMessageWarning, + }; + typedef void (*UseCounterCallback)(Isolate* isolate, UseCounterFeature feature); @@ -6725,8 +6795,10 @@ class V8_EXPORT Isolate { * garbage collection types it is sufficient to provide object groups * for partially dependent handles only. */ - template void SetObjectGroupId(const Persistent& object, - UniqueId id); + template + V8_DEPRECATE_SOON("Use EmbedderHeapTracer", + void SetObjectGroupId(const Persistent& object, + UniqueId id)); /** * Allows the host application to declare implicit references from an object @@ -6735,8 +6807,10 @@ class V8_EXPORT Isolate { * are removed. It is intended to be used in the before-garbage-collection * callback function. */ - template void SetReferenceFromGroup(UniqueId id, - const Persistent& child); + template + V8_DEPRECATE_SOON("Use EmbedderHeapTracer", + void SetReferenceFromGroup(UniqueId id, + const Persistent& child)); /** * Allows the host application to declare implicit references from an object @@ -6744,8 +6818,10 @@ class V8_EXPORT Isolate { * too. After each garbage collection, all implicit references are removed. It * is intended to be used in the before-garbage-collection callback function. */ - template - void SetReference(const Persistent& parent, const Persistent& child); + template + V8_DEPRECATE_SOON("Use EmbedderHeapTracer", + void SetReference(const Persistent& parent, + const Persistent& child)); typedef void (*GCCallback)(Isolate* isolate, GCType type, GCCallbackFlags flags); @@ -6887,6 +6963,12 @@ class V8_EXPORT Isolate { void RemoveCallCompletedCallback( DeprecatedCallCompletedCallback callback)); + /** + * Experimental: Set the PromiseHook callback for various promise + * lifecycle events. + */ + void SetPromiseHook(PromiseHook hook); + /** * Set callback to notify about promise reject with no handler, or * revocation of such a previous notification once the handler is added. @@ -7020,6 +7102,23 @@ class V8_EXPORT Isolate { */ void SetRAILMode(RAILMode rail_mode); + /** + * Optional notification to tell V8 the current isolate is used for debugging + * and requires higher heap limit. + */ + void IncreaseHeapLimitForDebugging(); + + /** + * Restores the original heap limit after IncreaseHeapLimitForDebugging(). + */ + void RestoreOriginalHeapLimit(); + + /** + * Returns true if the heap limit was increased for debugging and the + * original heap limit was not restored yet. + */ + bool IsHeapLimitIncreasedForDebugging(); + /** * Allows the host application to provide the address of a function that is * notified each time code is added, moved or removed. @@ -7084,6 +7183,16 @@ class V8_EXPORT Isolate { void SetAllowCodeGenerationFromStringsCallback( AllowCodeGenerationFromStringsCallback callback); + /** + * Set the callback to invoke to check if wasm compilation from + * the specified object is allowed. By default, wasm compilation + * is allowed. + * + * Similar for instantiate. + */ + void SetAllowWasmCompileCallback(AllowWasmCompileCallback callback); + void SetAllowWasmInstantiateCallback(AllowWasmInstantiateCallback callback); + /** * Check if V8 is dead and therefore unusable. This is the case after * fatal errors such as out-of-memory situations. @@ -7091,7 +7200,7 @@ class V8_EXPORT Isolate { bool IsDead(); /** - * Adds a message listener. + * Adds a message listener (errors only). * * The same message listener can be added more than once and in that * case it will be called more than once for each message. @@ -7102,6 +7211,21 @@ class V8_EXPORT Isolate { bool AddMessageListener(MessageCallback that, Local data = Local()); + /** + * Adds a message listener. + * + * The same message listener can be added more than once and in that + * case it will be called more than once for each message. + * + * If data is specified, it will be passed to the callback when it is called. + * Otherwise, the exception object will be passed to the callback instead. + * + * A listener can listen for particular error levels by providing a mask. + */ + bool AddMessageListenerWithErrorLevel(MessageCallback that, + int message_levels, + Local data = Local()); + /** * Remove all message listeners from the specified callback function. */ @@ -7598,10 +7722,23 @@ class V8_EXPORT SnapshotCreator { Isolate* GetIsolate(); /** - * Add a context to be included in the snapshot blob. + * Set the default context to be included in the snapshot blob. + * The snapshot will not contain the global proxy, and we expect one or a + * global object template to create one, to be provided upon deserialization. + */ + void SetDefaultContext(Local context); + + /** + * Add additional context to be included in the snapshot blob. + * The snapshot will include the global proxy. + * + * \param callback optional callback to serialize internal fields. + * * \returns the index of the context in the snapshot blob. */ - size_t AddContext(Local context); + size_t AddContext(Local context, + SerializeInternalFieldsCallback callback = + SerializeInternalFieldsCallback()); /** * Add a template to be included in the snapshot blob. @@ -7614,12 +7751,10 @@ class V8_EXPORT SnapshotCreator { * This must not be called from within a handle scope. * \param function_code_handling whether to include compiled function code * in the snapshot. - * \param callback to serialize embedder-set internal fields. * \returns { nullptr, 0 } on failure, and a startup snapshot on success. The * caller acquires ownership of the data array in the return value. */ - StartupData CreateBlob(FunctionCodeHandling function_code_handling, - SerializeInternalFieldsCallback callback = nullptr); + StartupData CreateBlob(FunctionCodeHandling function_code_handling); // Disallow copying and assigning. SnapshotCreator(const SnapshotCreator&) = delete; @@ -7825,21 +7960,21 @@ class V8_EXPORT TryCatch { * UseAfterReturn is enabled, then the address returned will be the address * of the C++ try catch handler itself. */ - static void* JSStackComparableAddress(v8::TryCatch* handler) { + static void* JSStackComparableAddress(TryCatch* handler) { if (handler == NULL) return NULL; return handler->js_stack_comparable_address_; } TryCatch(const TryCatch&) = delete; void operator=(const TryCatch&) = delete; - void* operator new(size_t size) = delete; - void operator delete(void*, size_t) = delete; + void* operator new(size_t size); + void operator delete(void*, size_t); private: void ResetInternal(); - v8::internal::Isolate* isolate_; - v8::TryCatch* next_; + internal::Isolate* isolate_; + TryCatch* next_; void* exception_; void* message_obj_; void* js_stack_comparable_address_; @@ -7849,7 +7984,7 @@ class V8_EXPORT TryCatch { bool rethrow_ : 1; bool has_terminated_ : 1; - friend class v8::internal::Isolate; + friend class internal::Isolate; }; @@ -7922,10 +8057,30 @@ class V8_EXPORT Context { MaybeLocal global_template = MaybeLocal(), MaybeLocal global_object = MaybeLocal()); + /** + * Create a new context from a (non-default) context snapshot. There + * is no way to provide a global object template since we do not create + * a new global object from template, but we can reuse a global object. + * + * \param isolate See v8::Context::New. + * + * \param context_snapshot_index The index of the context snapshot to + * deserialize from. Use v8::Context::New for the default snapshot. + * + * \param internal_fields_deserializer Optional callback to deserialize + * internal fields. It should match the SerializeInternalFieldCallback used + * to serialize. + * + * \param extensions See v8::Context::New. + * + * \param global_object See v8::Context::New. + */ + static MaybeLocal FromSnapshot( Isolate* isolate, size_t context_snapshot_index, + DeserializeInternalFieldsCallback internal_fields_deserializer = + DeserializeInternalFieldsCallback(), ExtensionConfiguration* extensions = nullptr, - MaybeLocal global_template = MaybeLocal(), MaybeLocal global_object = MaybeLocal()); /** @@ -7976,7 +8131,7 @@ class V8_EXPORT Context { void Exit(); /** Returns an isolate associated with a current context. */ - v8::Isolate* GetIsolate(); + Isolate* GetIsolate(); /** * The field at kDebugIdIndex is reserved for V8 debugger implementation. @@ -8336,8 +8491,8 @@ class Internals { static const int kNodeIsIndependentShift = 3; static const int kNodeIsActiveShift = 4; - static const int kJSObjectType = 0xbc; static const int kJSApiObjectType = 0xbb; + static const int kJSObjectType = 0xbc; static const int kFirstNonstringType = 0x80; static const int kOddballType = 0x83; static const int kForeignType = 0x87; @@ -8856,17 +9011,16 @@ ScriptOrigin::ScriptOrigin(Local resource_name, Local resource_column_offset, Local resource_is_shared_cross_origin, Local script_id, - Local resource_is_embedder_debug_script, Local source_map_url, - Local resource_is_opaque) + Local resource_is_opaque, + Local is_wasm) : resource_name_(resource_name), resource_line_offset_(resource_line_offset), resource_column_offset_(resource_column_offset), - options_(!resource_is_embedder_debug_script.IsEmpty() && - resource_is_embedder_debug_script->IsTrue(), - !resource_is_shared_cross_origin.IsEmpty() && + options_(!resource_is_shared_cross_origin.IsEmpty() && resource_is_shared_cross_origin->IsTrue(), - !resource_is_opaque.IsEmpty() && resource_is_opaque->IsTrue()), + !resource_is_opaque.IsEmpty() && resource_is_opaque->IsTrue(), + !is_wasm.IsEmpty() && is_wasm->IsTrue()), script_id_(script_id), source_map_url_(source_map_url) {} @@ -8920,9 +9074,8 @@ Local Boolean::New(Isolate* isolate, bool value) { return value ? True(isolate) : False(isolate); } - -void Template::Set(Isolate* isolate, const char* name, v8::Local value) { - Set(v8::String::NewFromUtf8(isolate, name, NewStringType::kNormal) +void Template::Set(Isolate* isolate, const char* name, Local value) { + Set(String::NewFromUtf8(isolate, name, NewStringType::kNormal) .ToLocalChecked(), value); } @@ -9056,6 +9209,23 @@ bool Value::QuickIsNull() const { return (I::GetOddballKind(obj) == I::kNullOddballKind); } +bool Value::IsNullOrUndefined() const { +#ifdef V8_ENABLE_CHECKS + return FullIsNull() || FullIsUndefined(); +#else + return QuickIsNullOrUndefined(); +#endif +} + +bool Value::QuickIsNullOrUndefined() const { + typedef internal::Object O; + typedef internal::Internals I; + O* obj = *reinterpret_cast(this); + if (!I::HasHeapObjectTag(obj)) return false; + if (I::GetInstanceType(obj) != I::kOddballType) return false; + int kind = I::GetOddballKind(obj); + return kind == I::kNullOddballKind || kind == I::kUndefinedOddballKind; +} bool Value::IsString() const { #ifdef V8_ENABLE_CHECKS @@ -9531,7 +9701,7 @@ template void Isolate::SetObjectGroupId(const Persistent& object, UniqueId id) { TYPE_CHECK(Value, T); - SetObjectGroupId(reinterpret_cast(object.val_), id); + SetObjectGroupId(reinterpret_cast(object.val_), id); } @@ -9539,8 +9709,7 @@ template void Isolate::SetReferenceFromGroup(UniqueId id, const Persistent& object) { TYPE_CHECK(Value, T); - SetReferenceFromGroup(id, - reinterpret_cast(object.val_)); + SetReferenceFromGroup(id, reinterpret_cast(object.val_)); } @@ -9549,8 +9718,8 @@ void Isolate::SetReference(const Persistent& parent, const Persistent& child) { TYPE_CHECK(Object, T); TYPE_CHECK(Value, S); - SetReference(reinterpret_cast(parent.val_), - reinterpret_cast(child.val_)); + SetReference(reinterpret_cast(parent.val_), + reinterpret_cast(child.val_)); } @@ -9627,14 +9796,14 @@ void V8::SetFatalErrorHandler(FatalErrorCallback callback) { void V8::RemoveGCPrologueCallback(GCCallback callback) { Isolate* isolate = Isolate::GetCurrent(); isolate->RemoveGCPrologueCallback( - reinterpret_cast(callback)); + reinterpret_cast(callback)); } void V8::RemoveGCEpilogueCallback(GCCallback callback) { Isolate* isolate = Isolate::GetCurrent(); isolate->RemoveGCEpilogueCallback( - reinterpret_cast(callback)); + reinterpret_cast(callback)); } void V8::TerminateExecution(Isolate* isolate) { isolate->TerminateExecution(); } diff --git a/deps/v8/infra/config/cq.cfg b/deps/v8/infra/config/cq.cfg index e93895f3826335..6e6c725e6d53a4 100644 --- a/deps/v8/infra/config/cq.cfg +++ b/deps/v8/infra/config/cq.cfg @@ -4,7 +4,6 @@ version: 1 cq_name: "v8" cq_status_url: "https://chromium-cq-status.appspot.com" -hide_ref_in_committed_msg: true commit_burst_delay: 60 max_commit_burst: 1 target_ref: "refs/pending/heads/master" diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index d6a2a2dc4abe50..2ac80d00f579a6 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -66,6 +66,7 @@ 'V8 Linux64 TSAN': 'gn_release_x64_tsan', 'V8 Linux - arm64 - sim - MSAN': 'gn_release_simulate_arm64_msan', # Clusterfuzz. + 'V8 Linux64 - release builder': 'gn_release_x64_correctness_fuzzer', 'V8 Linux64 ASAN no inline - release builder': 'gn_release_x64_asan_symbolized_edge_verify_heap', 'V8 Linux64 ASAN - debug builder': 'gn_debug_x64_asan_edge', @@ -116,8 +117,7 @@ 'V8 Linux - s390 - sim': 'gyp_release_simulate_s390', 'V8 Linux - s390x - sim': 'gyp_release_simulate_s390x', # X87. - 'V8 Linux - x87 - nosnap - debug builder': - 'gyp_debug_simulate_x87_no_snap', + 'V8 Linux - x87 - nosnap - debug builder': 'gyp_debug_simulate_x87', }, 'client.v8.branches': { 'V8 Linux - beta branch': 'gn_release_x86', @@ -286,6 +286,8 @@ 'v8_verify_heap'], 'gn_release_x64_clang': [ 'gn', 'release_bot', 'x64', 'clang', 'swarming'], + 'gn_release_x64_correctness_fuzzer' : [ + 'gn', 'release_bot', 'x64', 'v8_correctness_fuzzer'], 'gn_release_x64_internal': [ 'gn', 'release_bot', 'x64', 'swarming', 'v8_snapshot_internal'], 'gn_release_x64_minimal_symbols': [ @@ -359,9 +361,8 @@ 'gn', 'release_trybot', 'x86', 'swarming'], # Gyp debug configs for simulators. - 'gyp_debug_simulate_x87_no_snap': [ - 'gyp', 'debug_bot_static', 'simulate_x87', 'swarming', - 'v8_snapshot_none'], + 'gyp_debug_simulate_x87': [ + 'gyp', 'debug_bot_static', 'simulate_x87', 'swarming'], # Gyp debug configs for x86. 'gyp_debug_x86': [ @@ -626,6 +627,10 @@ 'gyp_defines': 'v8_enable_i18n_support=0 icu_use_data_file_flag=0', }, + 'v8_correctness_fuzzer': { + 'gn_args': 'v8_correctness_fuzzer=true', + }, + 'v8_disable_inspector': { 'gn_args': 'v8_enable_inspector=false', 'gyp_defines': 'v8_enable_inspector=0 ', diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index 9114669a6d5e77..e9026b130d6bf3 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -10,7 +10,9 @@ include_rules = [ "+src/heap/heap-inl.h", "-src/inspector", "-src/interpreter", + "+src/interpreter/bytecode-array-accessor.h", "+src/interpreter/bytecode-array-iterator.h", + "+src/interpreter/bytecode-array-random-iterator.h", "+src/interpreter/bytecode-decoder.h", "+src/interpreter/bytecode-flags.h", "+src/interpreter/bytecode-register.h", diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index 9ec24b84c7c586..1f2ce97240f5d1 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -167,16 +167,38 @@ void Accessors::ArrayLengthSetter( i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); HandleScope scope(isolate); + DCHECK(Utils::OpenHandle(*name)->SameValue(isolate->heap()->length_string())); + Handle object = Utils::OpenHandle(*info.Holder()); Handle array = Handle::cast(object); Handle length_obj = Utils::OpenHandle(*val); + bool was_readonly = JSArray::HasReadOnlyLength(array); + uint32_t length = 0; if (!JSArray::AnythingToArrayLength(isolate, length_obj, &length)) { isolate->OptionalRescheduleException(false); return; } + if (!was_readonly && V8_UNLIKELY(JSArray::HasReadOnlyLength(array)) && + length != array->length()->Number()) { + // AnythingToArrayLength() may have called setter re-entrantly and modified + // its property descriptor. Don't perform this check if "length" was + // previously readonly, as this may have been called during + // DefineOwnPropertyIgnoreAttributes(). + if (info.ShouldThrowOnError()) { + Factory* factory = isolate->factory(); + isolate->Throw(*factory->NewTypeError( + MessageTemplate::kStrictReadOnlyProperty, Utils::OpenHandle(*name), + i::Object::TypeOf(isolate, object), object)); + isolate->OptionalRescheduleException(false); + } else { + info.GetReturnValue().Set(false); + } + return; + } + JSArray::SetLength(array, length); uint32_t actual_new_len = 0; @@ -517,34 +539,6 @@ Handle Accessors::ScriptSourceMappingUrlInfo( } -// -// Accessors::ScriptIsEmbedderDebugScript -// - - -void Accessors::ScriptIsEmbedderDebugScriptGetter( - v8::Local name, const v8::PropertyCallbackInfo& info) { - i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); - DisallowHeapAllocation no_allocation; - HandleScope scope(isolate); - Object* object = *Utils::OpenHandle(*info.Holder()); - bool is_embedder_debug_script = Script::cast(JSValue::cast(object)->value()) - ->origin_options() - .IsEmbedderDebugScript(); - Object* res = *isolate->factory()->ToBoolean(is_embedder_debug_script); - info.GetReturnValue().Set(Utils::ToLocal(Handle(res, isolate))); -} - - -Handle Accessors::ScriptIsEmbedderDebugScriptInfo( - Isolate* isolate, PropertyAttributes attributes) { - Handle name(isolate->factory()->InternalizeOneByteString( - STATIC_CHAR_VECTOR("is_debugger_script"))); - return MakeAccessor(isolate, name, &ScriptIsEmbedderDebugScriptGetter, - nullptr, attributes); -} - - // // Accessors::ScriptGetContextData // @@ -829,8 +823,8 @@ static Handle ArgumentsForInlinedFunction( Handle array = factory->NewFixedArray(argument_count); bool should_deoptimize = false; for (int i = 0; i < argument_count; ++i) { - // If we materialize any object, we should deopt because we might alias - // an object that was eliminated by escape analysis. + // If we materialize any object, we should deoptimize the frame because we + // might alias an object that was eliminated by escape analysis. should_deoptimize = should_deoptimize || iter->IsMaterializedObject(); Handle value = iter->GetValue(); array->set(i, *value); @@ -839,7 +833,7 @@ static Handle ArgumentsForInlinedFunction( arguments->set_elements(*array); if (should_deoptimize) { - translated_values.StoreMaterializedValuesAndDeopt(); + translated_values.StoreMaterializedValuesAndDeopt(frame); } // Return the freshly allocated arguments object. @@ -850,10 +844,10 @@ static Handle ArgumentsForInlinedFunction( static int FindFunctionInFrame(JavaScriptFrame* frame, Handle function) { DisallowHeapAllocation no_allocation; - List functions(2); - frame->GetFunctions(&functions); - for (int i = functions.length() - 1; i >= 0; i--) { - if (functions[i] == *function) return i; + List frames(2); + frame->Summarize(&frames); + for (int i = frames.length() - 1; i >= 0; i--) { + if (*frames[i].AsJavaScript().function() == *function) return i; } return -1; } @@ -957,19 +951,16 @@ static inline bool AllowAccessToFunction(Context* current_context, class FrameFunctionIterator { public: FrameFunctionIterator(Isolate* isolate, const DisallowHeapAllocation& promise) - : isolate_(isolate), - frame_iterator_(isolate), - functions_(2), - index_(0) { - GetFunctions(); + : isolate_(isolate), frame_iterator_(isolate), frames_(2), index_(0) { + GetFrames(); } JSFunction* next() { while (true) { - if (functions_.length() == 0) return NULL; - JSFunction* next_function = functions_[index_]; + if (frames_.length() == 0) return NULL; + JSFunction* next_function = *frames_[index_].AsJavaScript().function(); index_--; if (index_ < 0) { - GetFunctions(); + GetFrames(); } // Skip functions from other origins. if (!AllowAccessToFunction(isolate_->context(), next_function)) continue; @@ -990,18 +981,18 @@ class FrameFunctionIterator { } private: - void GetFunctions() { - functions_.Rewind(0); + void GetFrames() { + frames_.Rewind(0); if (frame_iterator_.done()) return; JavaScriptFrame* frame = frame_iterator_.frame(); - frame->GetFunctions(&functions_); - DCHECK(functions_.length() > 0); + frame->Summarize(&frames_); + DCHECK(frames_.length() > 0); frame_iterator_.Advance(); - index_ = functions_.length() - 1; + index_ = frames_.length() - 1; } Isolate* isolate_; JavaScriptFrameIterator frame_iterator_; - List functions_; + List frames_; int index_; }; @@ -1025,10 +1016,11 @@ MaybeHandle FindCaller(Isolate* isolate, if (caller == NULL) return MaybeHandle(); } while (caller->shared()->is_toplevel()); - // If caller is a built-in function and caller's caller is also built-in, + // If caller is not user code and caller's caller is also not user code, // use that instead. JSFunction* potential_caller = caller; - while (potential_caller != NULL && potential_caller->shared()->IsBuiltin()) { + while (potential_caller != NULL && + !potential_caller->shared()->IsUserJavaScript()) { caller = potential_caller; potential_caller = it.next(); } @@ -1210,7 +1202,8 @@ void Accessors::ErrorStackGetter( // If stack is still an accessor (this could have changed in the meantime // since FormatStackTrace can execute arbitrary JS), replace it with a data // property. - Handle receiver = Utils::OpenHandle(*info.This()); + Handle receiver = + Utils::OpenHandle(*v8::Local(info.This())); Handle name = Utils::OpenHandle(*key); if (IsAccessor(receiver, name, holder)) { result = ReplaceAccessorWithDataProperty(isolate, receiver, holder, name, @@ -1236,8 +1229,8 @@ void Accessors::ErrorStackSetter( const v8::PropertyCallbackInfo& info) { i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); HandleScope scope(isolate); - Handle obj = - Handle::cast(Utils::OpenHandle(*info.This())); + Handle obj = Handle::cast( + Utils::OpenHandle(*v8::Local(info.This()))); // Clear internal properties to avoid memory leaks. Handle stack_trace_symbol = isolate->factory()->stack_trace_symbol(); diff --git a/deps/v8/src/accessors.h b/deps/v8/src/accessors.h index f53d30986cf73a..218fb3572ff75e 100644 --- a/deps/v8/src/accessors.h +++ b/deps/v8/src/accessors.h @@ -43,7 +43,6 @@ class AccessorInfo; V(ScriptType) \ V(ScriptSourceUrl) \ V(ScriptSourceMappingUrl) \ - V(ScriptIsEmbedderDebugScript) \ V(StringLength) #define ACCESSOR_SETTER_LIST(V) \ diff --git a/deps/v8/src/allocation.cc b/deps/v8/src/allocation.cc index 195a5443c8ad51..fde01f6447b41f 100644 --- a/deps/v8/src/allocation.cc +++ b/deps/v8/src/allocation.cc @@ -32,23 +32,6 @@ void Malloced::Delete(void* p) { } -#ifdef DEBUG - -static void* invalid = static_cast(NULL); - -void* Embedded::operator new(size_t size) { - UNREACHABLE(); - return invalid; -} - - -void Embedded::operator delete(void* p) { - UNREACHABLE(); -} - -#endif - - char* StrDup(const char* str) { int length = StrLength(str); char* result = NewArray(length + 1); diff --git a/deps/v8/src/allocation.h b/deps/v8/src/allocation.h index e87a3f1b1c18ce..36019d9ab304df 100644 --- a/deps/v8/src/allocation.h +++ b/deps/v8/src/allocation.h @@ -26,24 +26,9 @@ class V8_EXPORT_PRIVATE Malloced { static void Delete(void* p); }; - -// A macro is used for defining the base class used for embedded instances. -// The reason is some compilers allocate a minimum of one word for the -// superclass. The macro prevents the use of new & delete in debug mode. -// In release mode we are not willing to pay this overhead. - -#ifdef DEBUG -// Superclass for classes with instances allocated inside stack -// activations or inside other objects. -class Embedded { - public: - void* operator new(size_t size); - void operator delete(void* p); -}; -#define BASE_EMBEDDED : public NON_EXPORTED_BASE(Embedded) -#else +// DEPRECATED +// TODO(leszeks): Delete this during a quiet period #define BASE_EMBEDDED -#endif // Superclass for classes only using static method functions. diff --git a/deps/v8/src/api-arguments-inl.h b/deps/v8/src/api-arguments-inl.h index bf72fc4e6f44f5..91ac2533960346 100644 --- a/deps/v8/src/api-arguments-inl.h +++ b/deps/v8/src/api-arguments-inl.h @@ -10,6 +10,14 @@ namespace v8 { namespace internal { +#define SIDE_EFFECT_CHECK(ISOLATE, F, RETURN_TYPE) \ + do { \ + if (ISOLATE->needs_side_effect_check() && \ + !PerformSideEffectCheck(ISOLATE, FUNCTION_ADDR(F))) { \ + return Handle(); \ + } \ + } while (false) + #define FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME(F) \ F(AccessorNameGetterCallback, "get", v8::Value, Object) \ F(GenericNamedPropertyQueryCallback, "has", v8::Integer, Object) \ @@ -19,6 +27,7 @@ namespace internal { Handle PropertyCallbackArguments::Call(Function f, \ Handle name) { \ Isolate* isolate = this->isolate(); \ + SIDE_EFFECT_CHECK(isolate, f, InternalReturn); \ RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::Function); \ VMState state(isolate); \ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ @@ -43,6 +52,7 @@ FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME(WRITE_CALL_1_NAME) Handle PropertyCallbackArguments::Call(Function f, \ uint32_t index) { \ Isolate* isolate = this->isolate(); \ + SIDE_EFFECT_CHECK(isolate, f, InternalReturn); \ RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::Function); \ VMState state(isolate); \ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ @@ -62,6 +72,7 @@ Handle PropertyCallbackArguments::Call( GenericNamedPropertySetterCallback f, Handle name, Handle value) { Isolate* isolate = this->isolate(); + SIDE_EFFECT_CHECK(isolate, f, Object); RuntimeCallTimerScope timer( isolate, &RuntimeCallStats::GenericNamedPropertySetterCallback); VMState state(isolate); @@ -77,6 +88,7 @@ Handle PropertyCallbackArguments::Call( GenericNamedPropertyDefinerCallback f, Handle name, const v8::PropertyDescriptor& desc) { Isolate* isolate = this->isolate(); + SIDE_EFFECT_CHECK(isolate, f, Object); RuntimeCallTimerScope timer( isolate, &RuntimeCallStats::GenericNamedPropertyDefinerCallback); VMState state(isolate); @@ -92,6 +104,7 @@ Handle PropertyCallbackArguments::Call(IndexedPropertySetterCallback f, uint32_t index, Handle value) { Isolate* isolate = this->isolate(); + SIDE_EFFECT_CHECK(isolate, f, Object); RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::IndexedPropertySetterCallback); VMState state(isolate); @@ -107,6 +120,7 @@ Handle PropertyCallbackArguments::Call( IndexedPropertyDefinerCallback f, uint32_t index, const v8::PropertyDescriptor& desc) { Isolate* isolate = this->isolate(); + SIDE_EFFECT_CHECK(isolate, f, Object); RuntimeCallTimerScope timer( isolate, &RuntimeCallStats::IndexedPropertyDefinerCallback); VMState state(isolate); @@ -121,6 +135,10 @@ Handle PropertyCallbackArguments::Call( void PropertyCallbackArguments::Call(AccessorNameSetterCallback f, Handle name, Handle value) { Isolate* isolate = this->isolate(); + if (isolate->needs_side_effect_check() && + !PerformSideEffectCheck(isolate, FUNCTION_ADDR(f))) { + return; + } RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::AccessorNameSetterCallback); VMState state(isolate); @@ -131,5 +149,7 @@ void PropertyCallbackArguments::Call(AccessorNameSetterCallback f, f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info); } +#undef SIDE_EFFECT_CHECK + } // namespace internal } // namespace v8 diff --git a/deps/v8/src/api-arguments.cc b/deps/v8/src/api-arguments.cc index f8d6c8fcc3ddda..c7c54e5de1c37f 100644 --- a/deps/v8/src/api-arguments.cc +++ b/deps/v8/src/api-arguments.cc @@ -4,6 +4,8 @@ #include "src/api-arguments.h" +#include "src/debug/debug.h" +#include "src/objects-inl.h" #include "src/tracing/trace-event.h" #include "src/vm-state-inl.h" @@ -12,6 +14,10 @@ namespace internal { Handle FunctionCallbackArguments::Call(FunctionCallback f) { Isolate* isolate = this->isolate(); + if (isolate->needs_side_effect_check() && + !isolate->debug()->PerformSideEffectCheckForCallback(FUNCTION_ADDR(f))) { + return Handle(); + } RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::FunctionCallback); VMState state(isolate); ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); @@ -23,6 +29,10 @@ Handle FunctionCallbackArguments::Call(FunctionCallback f) { Handle PropertyCallbackArguments::Call( IndexedPropertyEnumeratorCallback f) { Isolate* isolate = this->isolate(); + if (isolate->needs_side_effect_check() && + !isolate->debug()->PerformSideEffectCheckForCallback(FUNCTION_ADDR(f))) { + return Handle(); + } RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::PropertyCallback); VMState state(isolate); ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); @@ -31,5 +41,10 @@ Handle PropertyCallbackArguments::Call( return GetReturnValue(isolate); } +bool PropertyCallbackArguments::PerformSideEffectCheck(Isolate* isolate, + Address function) { + return isolate->debug()->PerformSideEffectCheckForCallback(function); +} + } // namespace internal } // namespace v8 diff --git a/deps/v8/src/api-arguments.h b/deps/v8/src/api-arguments.h index d6d1b951aff278..6c9ad7ad6b93f2 100644 --- a/deps/v8/src/api-arguments.h +++ b/deps/v8/src/api-arguments.h @@ -136,6 +136,8 @@ class PropertyCallbackArguments inline JSObject* holder() { return JSObject::cast(this->begin()[T::kHolderIndex]); } + + bool PerformSideEffectCheck(Isolate* isolate, Address function); }; class FunctionCallbackArguments diff --git a/deps/v8/src/api-experimental.cc b/deps/v8/src/api-experimental.cc index 934b27aa5d8f96..a9b5bd043b8997 100644 --- a/deps/v8/src/api-experimental.cc +++ b/deps/v8/src/api-experimental.cc @@ -8,10 +8,11 @@ #include "src/api-experimental.h" -#include "include/v8.h" #include "include/v8-experimental.h" +#include "include/v8.h" #include "src/api.h" #include "src/fast-accessor-assembler.h" +#include "src/objects-inl.h" namespace { diff --git a/deps/v8/src/api-natives.cc b/deps/v8/src/api-natives.cc index 3fe59e293d3ff2..87138bd5cf7d2c 100644 --- a/deps/v8/src/api-natives.cc +++ b/deps/v8/src/api-natives.cc @@ -395,6 +395,28 @@ MaybeHandle InstantiateObject(Isolate* isolate, return result; } +namespace { +MaybeHandle GetInstancePrototype(Isolate* isolate, + Object* function_template) { + // Enter a new scope. Recursion could otherwise create a lot of handles. + HandleScope scope(isolate); + Handle parent_instance; + ASSIGN_RETURN_ON_EXCEPTION( + isolate, parent_instance, + InstantiateFunction( + isolate, + handle(FunctionTemplateInfo::cast(function_template), isolate)), + JSFunction); + Handle instance_prototype; + // TODO(cbruni): decide what to do here. + ASSIGN_RETURN_ON_EXCEPTION( + isolate, instance_prototype, + JSObject::GetProperty(parent_instance, + isolate->factory()->prototype_string()), + JSFunction); + return scope.CloseAndEscape(instance_prototype); +} +} // namespace MaybeHandle InstantiateFunction(Isolate* isolate, Handle data, @@ -406,11 +428,18 @@ MaybeHandle InstantiateFunction(Isolate* isolate, return Handle::cast(result); } } - Handle prototype; + Handle prototype; if (!data->remove_prototype()) { Object* prototype_templ = data->prototype_template(); if (prototype_templ->IsUndefined(isolate)) { - prototype = isolate->factory()->NewJSObject(isolate->object_function()); + Object* protoype_provider_templ = data->prototype_provider_template(); + if (protoype_provider_templ->IsUndefined(isolate)) { + prototype = isolate->factory()->NewJSObject(isolate->object_function()); + } else { + ASSIGN_RETURN_ON_EXCEPTION( + isolate, prototype, + GetInstancePrototype(isolate, protoype_provider_templ), JSFunction); + } } else { ASSIGN_RETURN_ON_EXCEPTION( isolate, prototype, @@ -422,22 +451,12 @@ MaybeHandle InstantiateFunction(Isolate* isolate, } Object* parent = data->parent_template(); if (!parent->IsUndefined(isolate)) { - // Enter a new scope. Recursion could otherwise create a lot of handles. - HandleScope scope(isolate); - Handle parent_instance; - ASSIGN_RETURN_ON_EXCEPTION( - isolate, parent_instance, - InstantiateFunction( - isolate, handle(FunctionTemplateInfo::cast(parent), isolate)), - JSFunction); - // TODO(dcarney): decide what to do here. Handle parent_prototype; - ASSIGN_RETURN_ON_EXCEPTION( - isolate, parent_prototype, - JSObject::GetProperty(parent_instance, - isolate->factory()->prototype_string()), - JSFunction); - JSObject::ForceSetPrototype(prototype, parent_prototype); + ASSIGN_RETURN_ON_EXCEPTION(isolate, parent_prototype, + GetInstancePrototype(isolate, parent), + JSFunction); + JSObject::ForceSetPrototype(Handle::cast(prototype), + parent_prototype); } } Handle function = ApiNatives::CreateApiFunction( @@ -531,7 +550,7 @@ MaybeHandle ApiNatives::InstantiateRemoteObject( void ApiNatives::AddDataProperty(Isolate* isolate, Handle info, Handle name, Handle value, PropertyAttributes attributes) { - PropertyDetails details(attributes, DATA, 0, PropertyCellType::kNoCell); + PropertyDetails details(kData, attributes, 0, PropertyCellType::kNoCell); auto details_handle = handle(details.AsSmi(), isolate); Handle data[] = {name, details_handle, value}; AddPropertyToPropertyList(isolate, info, arraysize(data), data); @@ -543,7 +562,7 @@ void ApiNatives::AddDataProperty(Isolate* isolate, Handle info, PropertyAttributes attributes) { auto value = handle(Smi::FromInt(intrinsic), isolate); auto intrinsic_marker = isolate->factory()->true_value(); - PropertyDetails details(attributes, DATA, 0, PropertyCellType::kNoCell); + PropertyDetails details(kData, attributes, 0, PropertyCellType::kNoCell); auto details_handle = handle(details.AsSmi(), isolate); Handle data[] = {name, intrinsic_marker, details_handle, value}; AddPropertyToPropertyList(isolate, info, arraysize(data), data); @@ -556,7 +575,7 @@ void ApiNatives::AddAccessorProperty(Isolate* isolate, Handle getter, Handle setter, PropertyAttributes attributes) { - PropertyDetails details(attributes, ACCESSOR, 0, PropertyCellType::kNoCell); + PropertyDetails details(kAccessor, attributes, 0, PropertyCellType::kNoCell); auto details_handle = handle(details.AsSmi(), isolate); Handle data[] = {name, details_handle, getter, setter}; AddPropertyToPropertyList(isolate, info, arraysize(data), data); @@ -606,7 +625,7 @@ Handle ApiNatives::CreateApiFunction( if (prototype->IsTheHole(isolate)) { prototype = isolate->factory()->NewFunctionPrototype(result); - } else { + } else if (obj->prototype_provider_template()->IsUndefined(isolate)) { JSObject::AddProperty(Handle::cast(prototype), isolate->factory()->constructor_string(), result, DONT_ENUM); @@ -656,6 +675,12 @@ Handle ApiNatives::CreateApiFunction( // Mark as undetectable if needed. if (obj->undetectable()) { + // We only allow callable undetectable receivers here, since this whole + // undetectable business is only to support document.all, which is both + // undetectable and callable. If we ever see the need to have an object + // that is undetectable but not callable, we need to update the types.h + // to allow encoding this. + CHECK(!obj->instance_call_handler()->IsUndefined(isolate)); map->set_is_undetectable(); } diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index da7f2ef4141460..04ba55c1ddecd7 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -29,6 +29,7 @@ #include "src/bootstrapper.h" #include "src/char-predicates-inl.h" #include "src/code-stubs.h" +#include "src/compiler-dispatcher/compiler-dispatcher.h" #include "src/compiler.h" #include "src/context-measure.h" #include "src/contexts.h" @@ -97,6 +98,15 @@ namespace v8 { ENTER_V8(isolate); \ bool has_pending_exception = false +#define PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(isolate, T) \ + if (IsExecutionTerminatingCheck(isolate)) { \ + return MaybeLocal(); \ + } \ + InternalEscapableScope handle_scope(isolate); \ + CallDepthScope call_depth_scope(isolate, v8::Local()); \ + ENTER_V8(isolate); \ + bool has_pending_exception = false + #define PREPARE_FOR_EXECUTION_WITH_CONTEXT(context, class_name, function_name, \ bailout_value, HandleScopeClass, \ do_callback) \ @@ -141,6 +151,23 @@ namespace v8 { PREPARE_FOR_EXECUTION_WITH_CONTEXT(context, class_name, function_name, \ false, i::HandleScope, false) +#ifdef DEBUG +#define ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate) \ + i::VMState __state__((isolate)); \ + i::DisallowJavascriptExecutionDebugOnly __no_script__((isolate)); \ + i::DisallowExceptions __no_exceptions__((isolate)) + +#define ENTER_V8_FOR_NEW_CONTEXT(isolate) \ + i::VMState __state__((isolate)); \ + i::DisallowExceptions __no_exceptions__((isolate)) +#else +#define ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate) \ + i::VMState __state__((isolate)); + +#define ENTER_V8_FOR_NEW_CONTEXT(isolate) \ + i::VMState __state__((isolate)); +#endif // DEBUG + #define EXCEPTION_BAILOUT_CHECK_SCOPED(isolate, value) \ do { \ if (has_pending_exception) { \ @@ -243,7 +270,7 @@ class CallDepthScope { static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate, i::Handle script) { - i::Handle scriptName(i::Script::GetNameOrSourceURL(script)); + i::Handle scriptName(script->GetNameOrSourceURL(), isolate); i::Handle source_map_url(script->source_mapping_url(), isolate); v8::Isolate* v8_isolate = reinterpret_cast(script->GetIsolate()); @@ -254,9 +281,9 @@ static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate, v8::Integer::New(v8_isolate, script->column_offset()), v8::Boolean::New(v8_isolate, options.IsSharedCrossOrigin()), v8::Integer::New(v8_isolate, script->id()), - v8::Boolean::New(v8_isolate, options.IsEmbedderDebugScript()), Utils::ToLocal(source_map_url), - v8::Boolean::New(v8_isolate, options.IsOpaque())); + v8::Boolean::New(v8_isolate, options.IsOpaque()), + v8::Boolean::New(v8_isolate, script->type() == i::Script::TYPE_WASM)); return origin; } @@ -452,6 +479,7 @@ bool RunExtraCode(Isolate* isolate, Local context, struct SnapshotCreatorData { explicit SnapshotCreatorData(Isolate* isolate) : isolate_(isolate), + default_context_(), contexts_(isolate), templates_(isolate), created_(false) {} @@ -462,8 +490,10 @@ struct SnapshotCreatorData { ArrayBufferAllocator allocator_; Isolate* isolate_; + Persistent default_context_; PersistentValueVector contexts_; PersistentValueVector