diff --git a/.gitignore b/.gitignore index 065c0438da279..efd010de30823 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ npm-debug.log .jshintrc .eslintrc .nyc_output +/test/npm_cache* +/node_modules/.cache diff --git a/package-lock.json b/package-lock.json index c99c3fe58c2d2..b8cb1602093c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,171 +4,6 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/generator": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.3.tgz", - "integrity": "sha512-aEADYwRRZjJyMnKN7llGIlircxTCofm3dtV5pmY6ob18MSIuipHpA2yZWkPlycwu5HJcx/pADS3zssd8eY7/6A==", - "dev": true, - "requires": { - "@babel/types": "^7.3.3", - "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", - "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - } - } - }, - "@babel/parser": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.3.tgz", - "integrity": "sha512-xsH1CJoln2r74hR+y7cg2B5JCPaTh+Hd+EbBRk9nWGSNspuo6krjhX0Om6RnRQuIvFq8wVXCLKH3kwKDYhanSg==", - "dev": true - }, - "@babel/template": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", - "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.2.2", - "@babel/types": "^7.2.2" - } - }, - "@babel/traverse": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", - "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.2.2", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.2.3", - "@babel/types": "^7.2.2", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.10" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "@babel/types": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.3.tgz", - "integrity": "sha512-2tACZ80Wg09UnPg5uGAOUvvInaqLk3l/IAhQzlxLQOIXacr6bMsra5SH6AWw/hIDRCSbCdHP2KzSOD+cT7TzMQ==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - } - }, - "@types/caseless": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", - "integrity": "sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A==", - "dev": true - }, - "@types/form-data": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", - "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/node": { - "version": "10.12.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", - "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", - "dev": true - }, - "@types/request": { - "version": "2.48.1", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.1.tgz", - "integrity": "sha512-ZgEZ1TiD+KGA9LiAAPPJL68Id2UWfeSO62ijSXZjFJArVV+2pKcsVHmrcu+1oiE3q6eDGiFiSolRc4JHoerBBg==", - "dev": true, - "requires": { - "@types/caseless": "*", - "@types/form-data": "*", - "@types/node": "*", - "@types/tough-cookie": "*" - } - }, - "@types/tough-cookie": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.5.tgz", - "integrity": "sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==", - "dev": true - }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -319,12 +154,6 @@ } } }, - "arg": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", - "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", - "dev": true - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -455,12 +284,6 @@ "write-file-atomic": "^2.3.0" } }, - "bind-obj-methods": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-2.0.0.tgz", - "integrity": "sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw==", - "dev": true - }, "bl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", @@ -533,18 +356,6 @@ "concat-map": "0.0.1" } }, - "browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true - }, - "browser-request": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", - "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=", - "dev": true - }, "buffer-from": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", @@ -701,12 +512,6 @@ "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", "dev": true }, - "clean-yaml-object": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", - "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", - "dev": true - }, "cli-boxes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", @@ -776,28 +581,6 @@ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" }, - "cloudant-follow": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.1.tgz", - "integrity": "sha512-hflb0VlRrHcSkkvsvCZt6UdjbsGnKjy3d6BA3VV3e+WIXZP63HO6mVtOUd+df5W25OkkaqFM191MqQDW2Y7Ikw==", - "dev": true, - "requires": { - "browser-request": "~0.3.0", - "debug": "^4.0.1", - "request": "^2.88.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, "cmd-shim": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz", @@ -817,12 +600,6 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, - "coffee-script": { - "version": "1.12.7", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", - "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", - "dev": true - }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", @@ -836,12 +613,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, "colors": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", @@ -927,35 +698,6 @@ "xdg-basedir": "^3.0.0" } }, - "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", - "dev": true, - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", - "utils-merge": "1.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", @@ -1006,43 +748,6 @@ "spdx-expression-validate": "^2.0.0" } }, - "couchapp": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/couchapp/-/couchapp-0.11.0.tgz", - "integrity": "sha1-8J3DFdYQ9vbnn9DK9eXWJLDMeD4=", - "dev": true, - "requires": { - "coffee-script": "*", - "connect": "*", - "http-proxy": "0.8.7", - "nano": "*", - "request": "*", - "url": "*", - "watch": "~0.8.0" - } - }, - "coveralls": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.2.tgz", - "integrity": "sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw==", - "dev": true, - "requires": { - "growl": "~> 1.10.0", - "js-yaml": "^3.11.0", - "lcov-parse": "^0.0.10", - "log-driver": "^1.2.7", - "minimist": "^1.2.0", - "request": "^2.85.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, "create-error-class": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", @@ -1192,12 +897,6 @@ "wrappy": "1" } }, - "diff": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", - "dev": true - }, "docopt": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/docopt/-/docopt-0.6.2.tgz", @@ -1213,12 +912,6 @@ "esutils": "^2.0.2" } }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", @@ -1287,18 +980,6 @@ "resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz", "integrity": "sha1-YMf4e9YrzGqJT6jM1q+3gjok90I=" }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -1337,12 +1018,6 @@ "is-arrayish": "^0.2.1" } }, - "errs": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", - "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=", - "dev": true - }, "es-abstract": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", @@ -1380,12 +1055,6 @@ "es6-promise": "^4.0.3" } }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1616,12 +1285,6 @@ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, - "esm": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.5.tgz", - "integrity": "sha512-rukU6Nd3agbHQCJWV4rrlZxqpbO3ix8qhUxK1BhKALGS2E465O0BFwgCOqJjNnYfO/I2MwpUBmPsW8DXoe8tcA==", - "dev": true - }, "espree": { "version": "3.5.4", "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", @@ -1668,12 +1331,6 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "events-to-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", - "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=", - "dev": true - }, "execa": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", @@ -1756,38 +1413,6 @@ "object-assign": "^4.0.1" } }, - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "find-npm-prefix": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz", @@ -1852,28 +1477,6 @@ } } }, - "foreground-child": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - } - } - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1937,12 +1540,6 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true }, - "fs-exists-cached": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", - "integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84=", - "dev": true - }, "fs-minipass": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", @@ -2023,12 +1620,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "function-loop": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.1.tgz", - "integrity": "sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw=", - "dev": true - }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -2183,12 +1774,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2264,25 +1849,6 @@ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==" }, - "http-proxy": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-0.8.7.tgz", - "integrity": "sha1-p7xThhgJLNJu0ZHkYlkzuu9t6A4=", - "dev": true, - "requires": { - "colors": "0.x.x", - "optimist": "0.3.x", - "pkginfo": "0.2.x" - }, - "dependencies": { - "colors": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=", - "dev": true - } - } - }, "http-proxy-agent": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", @@ -2585,27 +2151,6 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, - "istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", - "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", - "dev": true, - "requires": { - "@babel/generator": "^7.0.0", - "@babel/parser": "^7.0.0", - "@babel/template": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "istanbul-lib-coverage": "^2.0.3", - "semver": "^5.5.0" - } - }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", @@ -2628,18 +2173,6 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/json/-/json-9.0.6.tgz", - "integrity": "sha1-eXLCpaSKQmeNsnMMfCxO5uTiRYU=", - "dev": true - }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -2718,12 +2251,6 @@ "invert-kv": "^1.0.0" } }, - "lcov-parse": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", - "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", - "dev": true - }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -3062,12 +2589,6 @@ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, - "lodash.isempty": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", - "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=", - "dev": true - }, "lodash.restparam": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", @@ -3088,12 +2609,6 @@ "resolved": "https://registry.npmjs.org/lodash.without/-/lodash.without-4.4.0.tgz", "integrity": "sha1-PNRXSgC2e643OpS3SHcmQFB7eqw=" }, - "log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true - }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -3125,12 +2640,6 @@ "pify": "^3.0.0" } }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, "make-fetch-happen": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz", @@ -3295,47 +2804,16 @@ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, - "nano": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/nano/-/nano-8.0.0.tgz", - "integrity": "sha512-NpBzSEkfQ6Amc1n0ySa8OiOtz7Q6F/kT9YUARmcJFwSiX8scKU4V6riP8Q80lQR5A8VT5h3Mk2+YZJHQ65IfxA==", - "dev": true, - "requires": { - "@types/request": "^2.47.1", - "cloudant-follow": "^0.18.0", - "debug": "^2.2.0", - "errs": "^0.3.2", - "lodash.isempty": "^4.4.0", - "request": "^2.85.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "node-fetch-npm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", - "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node-fetch-npm": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", + "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", "requires": { "encoding": "^0.1.11", "json-parse-better-errors": "^1.0.0", @@ -3387,1239 +2865,186 @@ } }, "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "npm-audit-report": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.2.tgz", - "integrity": "sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw==", - "requires": { - "cli-table3": "^0.5.0", - "console-control-strings": "^1.1.0" - } - }, - "npm-bundled": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", - "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==" - }, - "npm-cache-filename": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz", - "integrity": "sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE=" - }, - "npm-install-checks": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-3.0.0.tgz", - "integrity": "sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc=", - "requires": { - "semver": "^2.3.0 || 3.x || 4 || 5" - } - }, - "npm-license-corrections": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/npm-license-corrections/-/npm-license-corrections-1.3.0.tgz", - "integrity": "sha512-YnHOE4v9LCzRLC5IIsaatKjmqcGh10ksuUYTlU/v6DD5GzxHWCPZWJ+jqZquxxRDFKa7Jka61OD5hDbI1Iq7Ww==", - "dev": true - }, - "npm-lifecycle": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-2.1.0.tgz", - "integrity": "sha512-QbBfLlGBKsktwBZLj6AviHC6Q9Y3R/AY4a2PYSIRhSKSS0/CxRyD/PfxEX6tPeOCXQgMSNdwGeECacstgptc+g==", - "requires": { - "byline": "^5.0.0", - "graceful-fs": "^4.1.11", - "node-gyp": "^3.8.0", - "resolve-from": "^4.0.0", - "slide": "^1.1.6", - "uid-number": "0.0.6", - "umask": "^1.1.0", - "which": "^1.3.1" - } - }, - "npm-logical-tree": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz", - "integrity": "sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg==" - }, - "npm-package-arg": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", - "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", - "requires": { - "hosted-git-info": "^2.6.0", - "osenv": "^0.1.5", - "semver": "^5.5.0", - "validate-npm-package-name": "^3.0.0" - } - }, - "npm-packlist": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npm-pick-manifest": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz", - "integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==", - "requires": { - "figgy-pudding": "^3.5.1", - "npm-package-arg": "^6.0.0", - "semver": "^5.4.1" - } - }, - "npm-profile": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-4.0.1.tgz", - "integrity": "sha512-NQ1I/1Q7YRtHZXkcuU1/IyHeLy6pd+ScKg4+DQHdfsm769TGq6HPrkbuNJVJS4zwE+0mvvmeULzQdWn2L2EsVA==", - "requires": { - "aproba": "^1.1.2 || 2", - "figgy-pudding": "^3.4.1", - "npm-registry-fetch": "^3.8.0" - } - }, - "npm-registry-couchapp": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/npm-registry-couchapp/-/npm-registry-couchapp-2.7.1.tgz", - "integrity": "sha512-NEU0/Sk0RglsfrnftOpuvmTIq0g0GwjGqXEBD7QkwKZRnMlw06/UxfBQuDaRD5nFxEgnOu150aP6sW/qdyi60w==", - "dev": true, - "requires": { - "couchapp": "~0.11.0", - "json": "~9.0.2", - "semver": "4" - }, - "dependencies": { - "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", - "dev": true - } - } - }, - "npm-registry-fetch": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.9.0.tgz", - "integrity": "sha512-srwmt8YhNajAoSAaDWndmZgx89lJwIZ1GWxOuckH4Coek4uHv5S+o/l9FLQe/awA+JwTnj4FJHldxhlXdZEBmw==", - "requires": { - "JSONStream": "^1.3.4", - "bluebird": "^3.5.1", - "figgy-pudding": "^3.4.1", - "lru-cache": "^4.1.3", - "make-fetch-happen": "^4.0.1", - "npm-package-arg": "^6.1.0" - } - }, - "npm-registry-mock": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/npm-registry-mock/-/npm-registry-mock-1.1.0.tgz", - "integrity": "sha1-bkKiQixLK9AqaChfVr5wIiDGRMw=", - "dev": true, - "requires": { - "hock": "~0.2.5", - "util-extend": "~1.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "^2.0.0" - } - }, - "npm-user-validate": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-1.0.0.tgz", - "integrity": "sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE=" - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "nyc": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.3.0.tgz", - "integrity": "sha512-P+FwIuro2aFG6B0Esd9ZDWUd51uZrAEoGutqZxzrVmYl3qSfkLgcQpBPBjtDFsUQLFY1dvTQJPOyeqr8S9GF8w==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^3.0.1", - "convert-source-map": "^1.6.0", - "find-cache-dir": "^2.0.0", - "find-up": "^3.0.0", - "foreground-child": "^1.5.6", - "glob": "^7.1.3", - "istanbul-lib-coverage": "^2.0.3", - "istanbul-lib-hook": "^2.0.3", - "istanbul-lib-instrument": "^3.1.0", - "istanbul-lib-report": "^2.0.4", - "istanbul-lib-source-maps": "^3.0.2", - "istanbul-reports": "^2.1.1", - "make-dir": "^1.3.0", - "merge-source-map": "^1.1.0", - "resolve-from": "^4.0.0", - "rimraf": "^2.6.3", - "signal-exit": "^3.0.2", - "spawn-wrap": "^1.4.2", - "test-exclude": "^5.1.0", - "uuid": "^3.3.2", - "yargs": "^12.0.5", - "yargs-parser": "^11.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "async": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "caching-transform": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "hasha": "^3.0.0", - "make-dir": "^1.3.0", - "package-hash": "^3.0.0", - "write-file-atomic": "^2.3.0" - } - }, - "camelcase": { - "version": "5.0.0", - "bundled": true, - "dev": true - }, - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "commander": { - "version": "2.17.1", - "bundled": true, - "dev": true, - "optional": true - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - } - }, - "end-of-stream": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "error-ex": { - "version": "1.3.2", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es6-error": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "execa": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "bundled": true, - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "find-cache-dir": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.15", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "async": "^2.5.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "has-flag": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "hasha": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-stream": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invert-kv": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "istanbul-lib-coverage": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-report": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^2.0.3", - "make-dir": "^1.3.0", - "supports-color": "^6.0.0" - }, - "dependencies": { - "supports-color": { - "version": "6.1.0", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.3", - "make-dir": "^1.3.0", - "rimraf": "^2.6.2", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "istanbul-reports": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.1.0" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "lcid": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.11", - "bundled": true, - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "bundled": true, - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "mem": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^1.0.0", - "p-is-promise": "^2.0.0" - } - }, - "merge-source-map": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.10", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - } - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-is-promise": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "package-hash": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^3.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "pump": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "read-pkg": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - }, - "release-zalgo": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve": { - "version": "1.10.0", - "bundled": true, - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.6.0", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "bundled": true, - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.3", - "bundled": true, - "dev": true - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^1.0.1" - } - }, - "uglify-js": { - "version": "3.4.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "uuid": { - "version": "3.3.2", - "bundled": true, - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "write-file-atomic": { - "version": "2.4.2", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "y18n": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, - "dev": true - }, - "yargs": { - "version": "12.0.5", - "bundled": true, - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "bundled": true, - "dev": true, + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "path-parse": "^1.0.6" } } } }, + "npm-audit-report": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.2.tgz", + "integrity": "sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw==", + "requires": { + "cli-table3": "^0.5.0", + "console-control-strings": "^1.1.0" + } + }, + "npm-bundled": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==" + }, + "npm-cache-filename": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz", + "integrity": "sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE=" + }, + "npm-install-checks": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-3.0.0.tgz", + "integrity": "sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc=", + "requires": { + "semver": "^2.3.0 || 3.x || 4 || 5" + } + }, + "npm-license-corrections": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/npm-license-corrections/-/npm-license-corrections-1.3.0.tgz", + "integrity": "sha512-YnHOE4v9LCzRLC5IIsaatKjmqcGh10ksuUYTlU/v6DD5GzxHWCPZWJ+jqZquxxRDFKa7Jka61OD5hDbI1Iq7Ww==", + "dev": true + }, + "npm-lifecycle": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-2.1.0.tgz", + "integrity": "sha512-QbBfLlGBKsktwBZLj6AviHC6Q9Y3R/AY4a2PYSIRhSKSS0/CxRyD/PfxEX6tPeOCXQgMSNdwGeECacstgptc+g==", + "requires": { + "byline": "^5.0.0", + "graceful-fs": "^4.1.11", + "node-gyp": "^3.8.0", + "resolve-from": "^4.0.0", + "slide": "^1.1.6", + "uid-number": "0.0.6", + "umask": "^1.1.0", + "which": "^1.3.1" + } + }, + "npm-logical-tree": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz", + "integrity": "sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg==" + }, + "npm-package-arg": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", + "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", + "requires": { + "hosted-git-info": "^2.6.0", + "osenv": "^0.1.5", + "semver": "^5.5.0", + "validate-npm-package-name": "^3.0.0" + } + }, + "npm-packlist": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npm-pick-manifest": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz", + "integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==", + "requires": { + "figgy-pudding": "^3.5.1", + "npm-package-arg": "^6.0.0", + "semver": "^5.4.1" + } + }, + "npm-profile": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-4.0.1.tgz", + "integrity": "sha512-NQ1I/1Q7YRtHZXkcuU1/IyHeLy6pd+ScKg4+DQHdfsm769TGq6HPrkbuNJVJS4zwE+0mvvmeULzQdWn2L2EsVA==", + "requires": { + "aproba": "^1.1.2 || 2", + "figgy-pudding": "^3.4.1", + "npm-registry-fetch": "^3.8.0" + } + }, + "npm-registry-fetch": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.9.0.tgz", + "integrity": "sha512-srwmt8YhNajAoSAaDWndmZgx89lJwIZ1GWxOuckH4Coek4uHv5S+o/l9FLQe/awA+JwTnj4FJHldxhlXdZEBmw==", + "requires": { + "JSONStream": "^1.3.4", + "bluebird": "^3.5.1", + "figgy-pudding": "^3.4.1", + "lru-cache": "^4.1.3", + "make-fetch-happen": "^4.0.1", + "npm-package-arg": "^6.1.0" + } + }, + "npm-registry-mock": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/npm-registry-mock/-/npm-registry-mock-1.1.0.tgz", + "integrity": "sha1-bkKiQixLK9AqaChfVr5wIiDGRMw=", + "dev": true, + "requires": { + "hock": "~0.2.5", + "util-extend": "~1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, + "npm-user-validate": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-1.0.0.tgz", + "integrity": "sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE=" + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "null-check": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -4636,15 +3061,6 @@ "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", "dev": true }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4667,23 +3083,6 @@ "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==" }, - "optimist": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", - "dev": true, - "requires": { - "wordwrap": "~0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", @@ -4727,21 +3126,6 @@ "os-tmpdir": "^1.0.0" } }, - "own-or": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", - "integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=", - "dev": true - }, - "own-or-env": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.1.tgz", - "integrity": "sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==", - "dev": true, - "requires": { - "own-or": "^1.0.0" - } - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -4880,12 +3264,6 @@ "error-ex": "^1.2.0" } }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -5028,12 +3406,6 @@ } } }, - "pkginfo": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.2.3.tgz", - "integrity": "sha1-cjnEKl72wwuPMoQ52bn/cQQkkPg=", - "dev": true - }, "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", @@ -5183,12 +3555,6 @@ "strict-uri-encode": "^2.0.0" } }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, "qw": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/qw/-/qw-1.0.1.tgz", @@ -5652,30 +4018,6 @@ } } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-support": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, "spdx-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz", @@ -5771,12 +4113,6 @@ "figgy-pudding": "^3.5.1" } }, - "stack-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", - "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==", - "dev": true - }, "standard": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/standard/-/standard-11.0.1.tgz", @@ -5814,12 +4150,6 @@ } } }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - }, "stream-each": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", @@ -6085,9 +4415,9 @@ } }, "tap": { - "version": "12.5.3", - "resolved": "https://registry.npmjs.org/tap/-/tap-12.5.3.tgz", - "integrity": "sha512-st6Tkj4iL2dqucFngl82IK+mUrY/FQETNCWMN2Kfred38vznzjDTUXrpivE1RegzwwyXetJLCHgdycpSVTiMsw==", + "version": "12.7.0", + "resolved": "https://registry.npmjs.org/tap/-/tap-12.7.0.tgz", + "integrity": "sha512-SjglJmRv0pqrQQ7d5ZBEY8ZOqv3nYDBXEX51oyycOH7piuhn82JKT/yDNewwmOsodTD/RZL9MccA96EjDgK+Eg==", "dev": true, "requires": { "bind-obj-methods": "^2.0.0", @@ -6097,16 +4427,16 @@ "color-support": "^1.1.0", "coveralls": "^3.0.2", "domain-browser": "^1.2.0", - "esm": "^3.2.3", + "esm": "^3.2.5", "foreground-child": "^1.3.3", "fs-exists-cached": "^1.0.0", "function-loop": "^1.0.1", "glob": "^7.1.3", "isexe": "^2.0.0", - "js-yaml": "^3.12.1", + "js-yaml": "^3.13.1", "minipass": "^2.3.5", "mkdirp": "^0.5.1", - "nyc": "^13.3.0", + "nyc": "^14.0.0", "opener": "^1.5.1", "os-homedir": "^1.0.2", "own-or": "^1.0.0", @@ -6115,7 +4445,7 @@ "signal-exit": "^3.0.0", "source-map-support": "^0.5.10", "stack-utils": "^1.0.2", - "tap-mocha-reporter": "^3.0.7", + "tap-mocha-reporter": "^3.0.9", "tap-parser": "^7.0.0", "tmatch": "^4.0.0", "trivial-deferred": "^1.0.1", @@ -6126,10 +4456,120 @@ "yapool": "^1.0.0" }, "dependencies": { + "bind-obj-methods": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-2.0.0.tgz", + "integrity": "sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw==", + "dev": true + }, + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true + }, + "clean-yaml-object": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", + "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", + "dev": true + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "coveralls": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.3.tgz", + "integrity": "sha512-viNfeGlda2zJr8Gj1zqXpDMRjw9uM54p7wzZdvLRyOgnAfCe974Dq4veZkjJdxQXbmdppu6flEajFYseHYaUhg==", + "dev": true, + "requires": { + "growl": "~> 1.10.0", + "js-yaml": "^3.11.0", + "lcov-parse": "^0.0.10", + "log-driver": "^1.2.7", + "minimist": "^1.2.0", + "request": "^2.86.0" + }, + "dependencies": { + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "lcov-parse": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", + "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", + "dev": true + }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "dev": true + }, + "foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + } + } + }, + "fs-exists-cached": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", + "integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84=", + "dev": true + }, + "function-loop": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.2.tgz", + "integrity": "sha512-Iw4MzMfS3udk/rqxTiDDCllhGwlOrsr50zViTOO/W6lS/9y6B1J0BD2VZzrnWUYBJsl3aeqjgR5v7bWWhZSYbA==", + "dev": true + }, "js-yaml": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", - "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -6144,98 +4584,1202 @@ "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" + }, + "dependencies": { + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true + } } }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true - } - } - }, - "tap-mocha-reporter": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.9.tgz", - "integrity": "sha512-VO07vhC9EG27EZdOe7bWBj1ldbK+DL9TnRadOgdQmiQOVZjFpUEQuuqO7+rNSO2kfmkq5hWeluYXDWNG/ytXTQ==", - "dev": true, - "requires": { - "color-support": "^1.1.0", - "debug": "^2.1.3", - "diff": "^1.3.2", - "escape-string-regexp": "^1.0.3", - "glob": "^7.0.5", - "js-yaml": "^3.3.1", - "readable-stream": "^2.1.5", - "tap-parser": "^5.1.0", - "unicode-length": "^1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "nyc": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", + "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", "dev": true, "requires": { - "ms": "2.0.0" + "archy": "^1.0.0", + "caching-transform": "^3.0.2", + "convert-source-map": "^1.6.0", + "cp-file": "^6.2.0", + "find-cache-dir": "^2.1.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.3", + "istanbul-lib-coverage": "^2.0.5", + "istanbul-lib-hook": "^2.0.7", + "istanbul-lib-instrument": "^3.3.0", + "istanbul-lib-report": "^2.0.8", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^2.2.4", + "js-yaml": "^3.13.1", + "make-dir": "^2.1.0", + "merge-source-map": "^1.1.0", + "resolve-from": "^4.0.0", + "rimraf": "^2.6.3", + "signal-exit": "^3.0.2", + "spawn-wrap": "^1.4.2", + "test-exclude": "^5.2.3", + "uuid": "^3.3.2", + "yargs": "^13.2.2", + "yargs-parser": "^13.0.0" + }, + "dependencies": { + "caching-transform": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", + "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", + "dev": true, + "requires": { + "hasha": "^3.0.0", + "make-dir": "^2.0.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.4.2" + }, + "dependencies": { + "hasha": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", + "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "dev": true, + "requires": { + "is-stream": "^1.0.1" + } + }, + "package-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", + "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "dependencies": { + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + }, + "dependencies": { + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + } + } + } + } + } + } + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cp-file": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", + "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "make-dir": "^2.0.0", + "nested-error-stacks": "^2.0.0", + "pify": "^4.0.1", + "safe-buffer": "^5.0.1" + }, + "dependencies": { + "nested-error-stacks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", + "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "dependencies": { + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + } + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + }, + "dependencies": { + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + }, + "dependencies": { + "p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + }, + "dependencies": { + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + } + } + } + } + } + } + } + } + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", + "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + }, + "dependencies": { + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + }, + "dependencies": { + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + } + } + } + } + }, + "istanbul-lib-instrument": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", + "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "dev": true, + "requires": { + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "istanbul-lib-coverage": "^2.0.5", + "semver": "^6.0.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", + "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + } + } + }, + "@babel/parser": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", + "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==", + "dev": true + }, + "@babel/template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + }, + "dependencies": { + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + } + } + } + } + } + } + }, + "@babel/traverse": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", + "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.4", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.4.5", + "@babel/types": "^7.4.4", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + }, + "dependencies": { + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + } + } + } + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + }, + "dependencies": { + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + } + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@babel/types": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", + "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } + } + }, + "semver": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.0.tgz", + "integrity": "sha512-kCqEOOHoBcFs/2Ccuk4Xarm/KiWRSLEX9CAZF8xkJ6ZPlIoTZ8V5f7J16vYLJqDbR7KrxTJpR2lqjIEm2Qx9cQ==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", + "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "dev": true, + "requires": { + "handlebars": "^4.1.2" + }, + "dependencies": { + "handlebars": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", + "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "dev": true, + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "uglify-js": { + "version": "3.5.15", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.15.tgz", + "integrity": "sha512-fe7aYFotptIddkwcm6YuA0HmknBZ52ZzOsUxZEdhhkSsz7RfjHDX2QDxwKTiv4JQ5t5NhfmpgAK+J7LiDhKSqg==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.20.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true, + "optional": true + } + } + } + } + } + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "spawn-wrap": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz", + "integrity": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==", + "dev": true, + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + } + }, + "test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "dev": true, + "requires": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" + }, + "dependencies": { + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + }, + "dependencies": { + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + } + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + } + } + } + } + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + } + } + }, + "yargs": { + "version": "13.2.4", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", + "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.0" + }, + "dependencies": { + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + } + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + }, + "dependencies": { + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + } + } + } + } + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + }, + "dependencies": { + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + } + } + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "dependencies": { + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + }, + "dependencies": { + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + } + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true + } + } + } + } + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + } + } + } + } + }, + "yargs-parser": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.0.tgz", + "integrity": "sha512-Yq+32PrijHRri0vVKQEm+ys8mbqWjLiwQkMFNXEENutzLPP0bE4Lcd4iA3OQY5HF+GD3xXxf0MEHb8E4/SA3AA==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } + } + } } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "own-or": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", + "integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=", "dev": true }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "own-or-env": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.1.tgz", + "integrity": "sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==", "dev": true, - "optional": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "own-or": "^1.0.0" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "source-map-support": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", "dev": true, - "optional": true, "requires": { - "safe-buffer": "~5.1.0" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "stack-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", + "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==", + "dev": true + }, + "tap-mocha-reporter": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.9.tgz", + "integrity": "sha512-VO07vhC9EG27EZdOe7bWBj1ldbK+DL9TnRadOgdQmiQOVZjFpUEQuuqO7+rNSO2kfmkq5hWeluYXDWNG/ytXTQ==", + "dev": true, + "requires": { + "color-support": "^1.1.0", + "debug": "^2.1.3", + "diff": "^1.3.2", + "escape-string-regexp": "^1.0.3", + "glob": "^7.0.5", + "js-yaml": "^3.3.1", + "readable-stream": "^2.1.5", + "tap-parser": "^5.1.0", + "unicode-length": "^1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "diff": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", + "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "tap-parser": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-5.4.0.tgz", + "integrity": "sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA==", + "dev": true, + "requires": { + "events-to-array": "^1.0.1", + "js-yaml": "^3.2.7", + "readable-stream": "^2" + }, + "dependencies": { + "events-to-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", + "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=", + "dev": true + } + } + }, + "unicode-length": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz", + "integrity": "sha1-Wtp6f+1RhBpBijKM8UlHisg1irs=", + "dev": true, + "requires": { + "punycode": "^1.3.2", + "strip-ansi": "^3.0.1" + } + } } }, "tap-parser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-5.4.0.tgz", - "integrity": "sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-7.0.0.tgz", + "integrity": "sha512-05G8/LrzqOOFvZhhAk32wsGiPZ1lfUrl+iV7+OkKgfofZxiceZWMHkKmow71YsyVQ8IvGBP2EjcIjE5gL4l5lA==", "dev": true, "requires": { "events-to-array": "^1.0.1", "js-yaml": "^3.2.7", - "readable-stream": "^2" + "minipass": "^2.2.0" + }, + "dependencies": { + "events-to-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", + "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=", + "dev": true + } + } + }, + "tmatch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tmatch/-/tmatch-4.0.0.tgz", + "integrity": "sha512-Ynn2Gsp+oCvYScQXeV+cCs7citRDilq0qDXA6tuvFwDgiYyyaq7D5vKUlAPezzZR5NDobc/QMeN6e5guOYmvxg==", + "dev": true + }, + "trivial-deferred": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", + "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=", + "dev": true + }, + "ts-node": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.1.0.tgz", + "integrity": "sha512-34jpuOrxDuf+O6iW1JpgTRDFynUZ1iEqtYruBqh35gICNjN8x+LpVcPAcwzLPi9VU6mdA3ym+x233nZmZp445A==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "source-map-support": "^0.5.6", + "yn": "^3.0.0" + }, + "dependencies": { + "arg": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", + "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "dev": true + }, + "yn": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz", + "integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==", + "dev": true + } } + }, + "tsame": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tsame/-/tsame-2.0.1.tgz", + "integrity": "sha512-jxyxgKVKa4Bh5dPcO42TJL22lIvfd9LOVJwdovKOnJa4TLLrHxquK+DlGm4rkGmrcur+GRx+x4oW00O2pY/fFw==", + "dev": true + }, + "typescript": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", + "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==", + "dev": true + }, + "yapool": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz", + "integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=", + "dev": true } } }, - "tap-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-7.0.0.tgz", - "integrity": "sha512-05G8/LrzqOOFvZhhAk32wsGiPZ1lfUrl+iV7+OkKgfofZxiceZWMHkKmow71YsyVQ8IvGBP2EjcIjE5gL4l5lA==", - "dev": true, - "requires": { - "events-to-array": "^1.0.1", - "js-yaml": "^3.2.7", - "minipass": "^2.2.0" - } - }, "tar": { "version": "4.4.8", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", @@ -6345,12 +5889,6 @@ "resolved": "https://registry.npmjs.org/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz", "integrity": "sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A==" }, - "tmatch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tmatch/-/tmatch-4.0.0.tgz", - "integrity": "sha512-Ynn2Gsp+oCvYScQXeV+cCs7citRDilq0qDXA6tuvFwDgiYyyaq7D5vKUlAPezzZR5NDobc/QMeN6e5guOYmvxg==", - "dev": true - }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -6360,12 +5898,6 @@ "os-tmpdir": "~1.0.2" } }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -6375,45 +5907,6 @@ "punycode": "^1.4.1" } }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "trivial-deferred": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", - "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=", - "dev": true - }, - "ts-node": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", - "integrity": "sha512-MosTrinKmaAcWgO8tqMjMJB22h+sp3Rd1i4fdoWY4mhBDekOwIAKI/bzmRi7IcbCmjquccYg2gcF6NBkLgr0Tw==", - "dev": true, - "requires": { - "arg": "^4.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "^3.0.0" - }, - "dependencies": { - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - } - } - }, - "tsame": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tsame/-/tsame-2.0.1.tgz", - "integrity": "sha512-jxyxgKVKa4Bh5dPcO42TJL22lIvfd9LOVJwdovKOnJa4TLLrHxquK+DlGm4rkGmrcur+GRx+x4oW00O2pY/fFw==", - "dev": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -6442,12 +5935,6 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, - "typescript": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.3.tgz", - "integrity": "sha512-Y21Xqe54TBVp+VDSNbuDYdGw0BpoR/Q6wo/+35M8PAU0vipahnyduJWirxxdxjsAkS7hue53x2zp8gz7F05u0A==", - "dev": true - }, "uid-number": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", @@ -6458,16 +5945,6 @@ "resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz", "integrity": "sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0=" }, - "unicode-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz", - "integrity": "sha1-Wtp6f+1RhBpBijKM8UlHisg1irs=", - "dev": true, - "requires": { - "punycode": "^1.3.2", - "strip-ansi": "^3.0.1" - } - }, "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", @@ -6525,24 +6002,6 @@ "xdg-basedir": "^3.0.0" } }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", @@ -6561,12 +6020,6 @@ "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=" }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -6599,12 +6052,6 @@ "extsprintf": "^1.2.0" } }, - "watch": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/watch/-/watch-0.8.0.tgz", - "integrity": "sha1-G7DupT3v5uYh6cjGPANYAH7L28w=", - "dev": true - }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -6733,12 +6180,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, - "yapool": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz", - "integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=", - "dev": true - }, "yargs": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", @@ -6772,12 +6213,6 @@ "requires": { "camelcase": "^4.1.0" } - }, - "yn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.0.0.tgz", - "integrity": "sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==", - "dev": true } } } diff --git a/package.json b/package.json index 66239a4512e5a..f02272077dd14 100644 --- a/package.json +++ b/package.json @@ -272,13 +272,12 @@ "licensee": "^6.1.0", "marked": "^0.6.0", "marked-man": "^0.2.1", - "npm-registry-couchapp": "^2.7.1", "npm-registry-mock": "^1.1.0", "require-inject": "^1.4.4", "sprintf-js": "^1.1.2", "standard": "^11.0.1", "tacks": "^1.2.7", - "tap": "^12.5.3", + "tap": "~12.7.0", "tar-stream": "^2.0.0" }, "scripts": { @@ -286,8 +285,8 @@ "prepare": "node bin/npm-cli.js rebuild && node bin/npm-cli.js --no-audit --no-timing prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc", "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", "licenses": "licensee --production --errors-only", - "tap": "tap --reporter=classic --timeout 300", - "tap-cover": "tap --reporter=classic --nyc-arg='--cache' --coverage --timeout 600", + "tap": "tap -J --timeout 300", + "tap-cover": "tap -J --nyc-arg=--cache --coverage --timeout 600", "test": "standard && npm run test-tap", "test-coverage": "npm run tap-cover -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", "test-tap": "npm run tap -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", diff --git a/test/tap/00-config-setup.js b/test/common-config.js similarity index 73% rename from test/tap/00-config-setup.js rename to test/common-config.js index 448453eded4fd..003150335483a 100644 --- a/test/tap/00-config-setup.js +++ b/test/common-config.js @@ -1,10 +1,28 @@ +if (module === require.main) { + console.log('1..1') + console.log('ok 1 setup done') + process.exit(0) +} + var fs = require('graceful-fs') var path = require('path') -var userconfigSrc = path.resolve(__dirname, '..', 'fixtures', 'config', 'userconfig') +var userconfigSrc = path.resolve(__dirname, 'fixtures', 'config', 'userconfig') exports.userconfig = userconfigSrc + '-with-gc' -exports.globalconfig = path.resolve(__dirname, '..', 'fixtures', 'config', 'globalconfig') -exports.builtin = path.resolve(__dirname, '..', 'fixtures', 'config', 'builtin') -exports.malformed = path.resolve(__dirname, '..', 'fixtures', 'config', 'malformed') +exports.globalconfig = path.resolve(__dirname, 'fixtures', 'config', 'globalconfig') + +// if this hasn't been written yet, then do it now. +try { + fs.statSync(exports.userconfig) +} catch (er) { + var uc = fs.readFileSync(userconfigSrc) + var gcini = 'globalconfig = ' + exports.globalconfig + '\n' + // atomic! + fs.writeFileSync(exports.userconfig + '.' + process.pid, gcini + uc) + fs.renameSync(exports.userconfig + '.' + process.pid, exports.userconfig) +} + +exports.builtin = path.resolve(__dirname, 'fixtures', 'config', 'builtin') +exports.malformed = path.resolve(__dirname, 'fixtures', 'config', 'malformed') exports.ucData = { globalconfig: exports.globalconfig, email: 'i@izs.me', @@ -55,31 +73,18 @@ exports.envDataFix = { 'other-env-thing': 1000 } -var projectConf = path.resolve(__dirname, '..', '..', '.npmrc') +var projectConf = path.resolve(__dirname, '..', '.npmrc') try { fs.statSync(projectConf) } catch (er) { // project conf not found, probably working with packed npm - fs.writeFileSync(projectConf, function () { /* -save-prefix = ~ -legacy-bundling = true - */ }.toString().split('\n').slice(1, -1).join('\n')) + fs.writeFileSync(projectConf, '') } -var projectRc = path.join(__dirname, '..', 'fixtures', 'config', '.npmrc') +var projectRc = path.join(__dirname, 'fixtures', 'config', '.npmrc') try { fs.statSync(projectRc) } catch (er) { // project conf not found, probably working with packed npm fs.writeFileSync(projectRc, 'just = testing') } - -if (module === require.main) { - // set the globalconfig in the userconfig - var uc = fs.readFileSync(userconfigSrc) - var gcini = 'globalconfig = ' + exports.globalconfig + '\n' - fs.writeFileSync(exports.userconfig, gcini + uc) - - console.log('1..1') - console.log('ok 1 setup done') -} diff --git a/test/common-tap.js b/test/common-tap.js index 37d5efe9f86c8..e02e8c2b98ce8 100644 --- a/test/common-tap.js +++ b/test/common-tap.js @@ -1,6 +1,7 @@ 'use strict' /* eslint-disable camelcase */ +const configCommon = require('./common-config.js') var fs = require('graceful-fs') var readCmdShim = require('read-cmd-shim') var isWindows = require('../lib/utils/is-windows.js') @@ -17,9 +18,32 @@ if (!global.setImmediate || !require('timers').setImmediate) { var spawn = require('child_process').spawn var path = require('path') -var port = exports.port = 1337 +// provide a working dir unique to each test +const main = require.main.filename +exports.pkg = path.resolve(path.dirname(main), path.basename(main, '.js')) +const mkdirp = require('mkdirp') +const rimraf = require('rimraf') +mkdirp.sync(exports.pkg) +require('tap').teardown(() => { + try { + rimraf.sync(exports.pkg) + } catch (e) { + if (process.platform !== 'win32') { + throw e + } + } +}) + +// space these out to help prevent collisions +const testId = 3 * (+process.env.TAP_CHILD_ID || 0) + +var port = exports.port = 15443 + testId exports.registry = 'http://localhost:' + port +exports.altPort = 7331 + testId + +exports.gitPort = 4321 + testId + var fakeRegistry = require('./fake-registry.js') exports.fakeRegistry = fakeRegistry @@ -29,10 +53,10 @@ ourenv.npm_config_progress = 'false' ourenv.npm_config_metrics = 'false' ourenv.npm_config_audit = 'false' -var npm_config_cache = path.resolve(__dirname, 'npm_cache') +var npm_config_cache = path.resolve(__dirname, 'npm_cache_' + testId) ourenv.npm_config_cache = exports.npm_config_cache = npm_config_cache -ourenv.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') -ourenv.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') +ourenv.npm_config_userconfig = exports.npm_config_userconfig = configCommon.userconfig +ourenv.npm_config_globalconfig = exports.npm_config_globalconfig = configCommon.globalconfig ourenv.npm_config_global_style = 'false' ourenv.npm_config_legacy_bundling = 'false' ourenv.npm_config_fetch_retries = '0' diff --git a/test/fake-registry.js b/test/fake-registry.js index 7566443e64cf1..f9c6c3f3542e6 100644 --- a/test/fake-registry.js +++ b/test/fake-registry.js @@ -1,7 +1,14 @@ 'use strict' const common = require('./common-tap.js') const Bluebird = require('bluebird') -const log = require('npmlog') +const silentLogger = { + http: () => {}, + silly: () => {}, +} + +const log = process.env.TAP_CHILD_ID + ? silentLogger + : require('npmlog') const http = require('http') const EventEmitter = require('events') diff --git a/test/need-npm5-update/ignore-shrinkwrap.js b/test/need-npm5-update/ignore-shrinkwrap.js index 9468162eeef86..4980b659fd23f 100644 --- a/test/need-npm5-update/ignore-shrinkwrap.js +++ b/test/need-npm5-update/ignore-shrinkwrap.js @@ -24,7 +24,7 @@ var json = { name: 'ignore-shrinkwrap', version: '0.0.0', dependencies: { - 'npm-test-ignore-shrinkwrap-file': 'http://localhost:1337/package.js' + 'npm-test-ignore-shrinkwrap-file': 'http://localhost:' + common.port + '/package.js' } } @@ -34,8 +34,8 @@ var shrinkwrap = { dependencies: { 'npm-test-ignore-shrinkwrap-file': { version: '1.2.3', - from: 'http://localhost:1337/shrinkwrap.js', - resolved: 'http://localhost:1337/shrinkwrap.js', + from: 'http://localhost:' + common.port + '/shrinkwrap.js', + resolved: 'http://localhost:' + common.port + '/shrinkwrap.js', dependencies: { opener: { version: '1.3.0', diff --git a/test/need-npm5-update/peer-deps-invalid.js b/test/need-npm5-update/peer-deps-invalid.js index 39ad612e5a9be..15fda253ecc48 100644 --- a/test/need-npm5-update/peer-deps-invalid.js +++ b/test/need-npm5-update/peer-deps-invalid.js @@ -18,8 +18,8 @@ var json = { name: 'peer-deps-invalid', version: '0.0.0', dependencies: { - 'npm-test-peer-deps-file': 'http://localhost:1337/ok.js', - 'npm-test-peer-deps-file-invalid': 'http://localhost:1337/invalid.js' + 'npm-test-peer-deps-file': 'http://localhost:' + common.port + '/ok.js', + 'npm-test-peer-deps-file-invalid': 'http://localhost:' + common.port + '/invalid.js' } } diff --git a/test/network/registry.js b/test/network/registry.js deleted file mode 100644 index 3dbe23ffd25bd..0000000000000 --- a/test/network/registry.js +++ /dev/null @@ -1,72 +0,0 @@ -// Run all the tests in the `npm-registry-couchapp` suite -// This verifies that the server-side stuff still works. - -var common = require('../common-tap') -var test = require('tap').test - -var npmExec = require.resolve('../../bin/npm-cli.js') -var path = require('path') -var ca = path.resolve(__dirname, '../../node_modules/npm-registry-couchapp') - -var which = require('which') - -var v = process.versions.node.split('.').map(function (n) { return parseInt(n, 10) }) -if (v[0] === 0 && v[1] < 10) { - console.error( - 'WARNING: need a recent Node for npm-registry-couchapp tests to run, have', - process.versions.node - ) -} else { - which('couchdb', function (er) { - if (er) { - console.error('WARNING: need couch to run test: ' + er.message) - } else { - runTests() - } - }) -} - -function runTests () { - var env = Object.assign({ TAP: 1 }, process.env) - env.npm = npmExec - // TODO: fix tap and / or nyc to handle nested invocations properly - env.COVERALLS_REPO_TOKEN = '' - - var opts = { - cwd: ca, - stdio: 'inherit' - } - common.npm(['install'], opts, function (err, code) { - if (err) { throw err } - if (code) { - return test('need install to work', function (t) { - t.fail('install failed with: ' + code) - t.end() - }) - } else { - opts = { - cwd: ca, - env: env, - stdio: 'inherit' - } - common.npm(['test', '--', '-Rtap', '--no-coverage'], opts, function (err, code) { - if (err) { throw err } - if (code) { - return test('need test to work', function (t) { - t.fail('test failed with: ' + code) - t.end() - }) - } - opts = { - cwd: ca, - env: env, - stdio: 'inherit' - } - common.npm(['prune', '--production'], opts, function (err, code) { - if (err) { throw err } - process.exit(code || 0) - }) - }) - } - }) -} diff --git a/test/tap/404-parent.js b/test/tap/404-parent.js index 67835efc1df10..539ead7a45e0e 100644 --- a/test/tap/404-parent.js +++ b/test/tap/404-parent.js @@ -6,7 +6,7 @@ var path = require('path') var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, '404-parent') +const pkg = common.pkg var mr = require('npm-registry-mock') test('404-parent: if parent exists, specify parent in error message', function (t) { @@ -42,6 +42,9 @@ function setup () { function performInstall (cb) { mr({port: common.port}, function (er, s) { // create mock registry. + if (er) { + return cb(er) + } s.get('/test-npm-404-parent-test') .many().reply(404, {'error': 'version not found'}) npm.load({ diff --git a/test/tap/404-private-registry-scoped.js b/test/tap/404-private-registry-scoped.js index f8a8c5b05a572..5565f7a404e9c 100644 --- a/test/tap/404-private-registry-scoped.js +++ b/test/tap/404-private-registry-scoped.js @@ -1,12 +1,11 @@ var test = require('tap').test -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') var mr = common.fakeRegistry.compat var server -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg function setup () { cleanup() diff --git a/test/tap/404-private-registry.js b/test/tap/404-private-registry.js index da6e446918f92..869125eba18f0 100644 --- a/test/tap/404-private-registry.js +++ b/test/tap/404-private-registry.js @@ -7,7 +7,7 @@ var mr = common.fakeRegistry.compat var server var packageName = path.basename(__filename, '.js') -var testdir = path.join(__dirname, packageName) +var testdir = common.pkg function setup () { cleanup() diff --git a/test/tap/404.js b/test/tap/404.js index 710780ad26e60..450b0c2816fba 100644 --- a/test/tap/404.js +++ b/test/tap/404.js @@ -9,7 +9,7 @@ const common = require('../common-tap.js') const e404 = /test-npm-404@latest' is not in the npm registry/ const invalidPackage = /Your package name is not valid, because[\s\S]+1\. name can only contain URL-friendly characters/ -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/access.js b/test/tap/access.js index d400b4d33b134..db03cbfc9e80b 100644 --- a/test/tap/access.js +++ b/test/tap/access.js @@ -9,7 +9,8 @@ const mr = require('npm-registry-mock') const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.resolve(__dirname, 'access') +const pkg = common.pkg + let server const scoped = { @@ -63,7 +64,7 @@ test('npm access public on current package', function (t) { test('npm access public when no package passed and no package.json', function (t) { // need to simulate a missing package.json - var missing = path.join(__dirname, 'access-public-missing-guard') + var missing = path.join(pkg, 'access-public-missing-guard') mkdirp.sync(path.join(missing, 'node_modules')) common.npm([ @@ -83,7 +84,7 @@ test('npm access public when no package passed and no package.json', function (t test('npm access public when no package passed and invalid package.json', function (t) { // need to simulate a missing package.json - var invalid = path.join(__dirname, 'access-public-invalid-package') + var invalid = path.join(pkg, 'access-public-invalid-package') mkdirp.sync(path.join(invalid, 'node_modules')) // it's hard to force `read-package-json` to break w/o ENOENT, but this will do it fs.writeFileSync(path.join(invalid, 'package.json'), '{\n') @@ -380,7 +381,7 @@ test('npm access ls-packages on user', function (t) { test('npm access ls-packages with no package specified or package.json', function (t) { // need to simulate a missing package.json - var missing = path.join(__dirname, 'access-missing-guard') + var missing = path.join(pkg, 'access-missing-guard') mkdirp.sync(path.join(missing, 'node_modules')) var serverPackages = { diff --git a/test/tap/add-named-update-protocol-port.js b/test/tap/add-named-update-protocol-port.js index 37851e10686a1..2876b6cdbc480 100644 --- a/test/tap/add-named-update-protocol-port.js +++ b/test/tap/add-named-update-protocol-port.js @@ -15,7 +15,7 @@ var fooPkg = { name: packageName, version: '0.0.0', dist: { - tarball: 'https://localhost:1338/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz', + tarball: 'https://localhost:' + common.altPort + '/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz', shasum: '356a192b7913b04c54574d18c28d46e6395428ab' } } @@ -30,7 +30,7 @@ var fooiPkg = { name: iPackageName, version: '0.0.0', dist: { - tarball: 'http://127.0.0.1:1338/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz', + tarball: 'http://127.0.0.1:' + common.altPort + '/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz', shasum: '356a192b7913b04c54574d18c28d46e6395428ab' } } @@ -39,13 +39,13 @@ var fooiPkg = { test('setup', function (t) { mr({ - port: 1337, + port: common.port, throwOnUnmatched: true }, function (err, s) { t.ifError(err, 'registry mocked successfully') server1 = s mr({ - port: 1338, + port: common.altPort, throwOnUnmatched: true }, function (err, s) { t.ifError(err, 'registry mocked successfully') @@ -67,7 +67,7 @@ test('tarball paths should update port if updating protocol', function (t) { 'add', packageName + '@0.0.0', '--registry', - 'http://localhost:1337/registry' + 'http://localhost:' + common.port + '/registry' ], {}, function (er, code, stdout, stderr) { @@ -92,7 +92,7 @@ test('tarball paths should NOT update if different hostname', function (t) { 'add', iPackageName + '@0.0.0', '--registry', - 'http://localhost:1337/registry' + 'http://localhost:' + common.port + '/registry' ], {}, function (er, code, stdout, stderr) { diff --git a/test/tap/add-remote-git-file.js b/test/tap/add-remote-git-file.js index 20392af8770be..7d64609072dda 100644 --- a/test/tap/add-remote-git-file.js +++ b/test/tap/add-remote-git-file.js @@ -13,8 +13,8 @@ var npm = require('../../lib/npm.js') var fetchPackageMetadata = require('../../lib/fetch-package-metadata.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-file') -var repo = resolve(__dirname, 'add-remote-git-file-repo') +var pkg = common.pkg +var repo = common.pkg + '-repo' var git var cloneURL = 'git+file://' + resolve(pkg, 'child.git') diff --git a/test/tap/add-remote-git-shrinkwrap.js b/test/tap/add-remote-git-shrinkwrap.js index c7fb2f9b961aa..0daf2922e7645 100644 --- a/test/tap/add-remote-git-shrinkwrap.js +++ b/test/tap/add-remote-git-shrinkwrap.js @@ -9,8 +9,8 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-shrinkwrap') -var repo = resolve(__dirname, 'add-remote-git-shrinkwrap-repo') +var pkg = common.pkg +var repo = pkg + '-repo' var daemon var daemonPID @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git#master' + 'child': 'git://localhost:' + common.gitPort + '/child.git#master' } }, null, 2) + '\n' @@ -73,7 +73,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) { t.notOk(stderr, 'no error output') var treeish = stdout.trim() - t.like(shrinkwrap, {dependencies: {child: {version: 'git://localhost:1234/child.git#' + treeish}}}, + t.like(shrinkwrap, {dependencies: {child: {version: 'git://localhost:' + common.gitPort + '/child.git#' + treeish}}}, 'npm shrinkwrapped resolved correctly' ) @@ -114,7 +114,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, diff --git a/test/tap/add-remote-git-submodule.js b/test/tap/add-remote-git-submodule.js index 6e26712c56177..43b30f7a65bcb 100644 --- a/test/tap/add-remote-git-submodule.js +++ b/test/tap/add-remote-git-submodule.js @@ -9,12 +9,12 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-submodule') -var repos = resolve(__dirname, 'add-remote-git-submodule-repos') +var pkg = common.pkg +var repos = pkg + '-repos' var subwt = resolve(repos, 'subwt') var topwt = resolve(repos, 'topwt') -var suburl = 'git://localhost:1234/sub.git' -var topurl = 'git://localhost:1234/top.git' +var suburl = 'git://localhost:' + common.gitPort + '/sub.git' +var topurl = 'git://localhost:' + common.gitPort + '/top.git' var daemon var daemonPID @@ -97,7 +97,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: repos, diff --git a/test/tap/add-remote-git.js b/test/tap/add-remote-git.js index 24abf33a773fd..44294924f15a7 100644 --- a/test/tap/add-remote-git.js +++ b/test/tap/add-remote-git.js @@ -9,8 +9,8 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git') -var repo = resolve(__dirname, 'add-remote-git-repo') +var pkg = common.pkg +var repo = pkg + '-repo' var daemon var daemonPID @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - child: 'git://localhost:1234/child.git' + child: 'git://localhost:' + common.gitPort + '/child.git' } }, null, 2) + '\n' @@ -61,6 +61,7 @@ test('clean', function (t) { }) function bootstrap () { + cleanup() mkdirp.sync(pkg) fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) } @@ -81,12 +82,12 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, env: process.env, - stdio: ['pipe', 'pipe', 'pipe'] + stdio: ['pipe', 1, 'pipe'] } ) d.stderr.on('data', childFinder) diff --git a/test/tap/adduser-always-auth.js b/test/tap/adduser-always-auth.js index d327e35a9e547..26541eebbc7b6 100644 --- a/test/tap/adduser-always-auth.js +++ b/test/tap/adduser-always-auth.js @@ -6,8 +6,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = {cwd: __dirname} -var outfile = path.resolve(__dirname, '_npmrc') +var opts = { cwd: common.pkg } +var outfile = path.resolve(common.pkg, '_npmrc') var responses = { 'Username': 'u\n', 'Password': 'p\n', @@ -98,7 +98,7 @@ test('npm login --scope uses :registry as its URI', function (t) ], opts, function (err, code) { - t.notOk(code, 'exited OK') + t.equal(code, 0, 'exited OK') t.notOk(err, 'no error output') var config = fs.readFileSync(outfile, 'utf8') t.like(config, new RegExp(scope + ':registry=' + uri), 'scope:registry is set') diff --git a/test/tap/adduser-legacy-auth.js b/test/tap/adduser-legacy-auth.js index 49015878f7d8e..e46901c2b95fe 100644 --- a/test/tap/adduser-legacy-auth.js +++ b/test/tap/adduser-legacy-auth.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-legacy-auth') +var opts = { cwd: common.pkg } +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var contents = '_auth=' + Buffer.from('u:x').toString('base64') + '\n' + @@ -42,6 +42,7 @@ function mocks (server) { } test('setup', function (t) { + rimraf.sync(pkg) mkdirp(pkg, function (er) { t.ifError(er, pkg + ' made successfully') @@ -65,8 +66,8 @@ test('npm login', function (t) { opts, function (err, code, stdout, stderr) { if (err) throw err - t.is(code, 0, 'exited OK') t.is(stderr, '', 'no error output') + t.is(code, 0, 'exited OK') var config = fs.readFileSync(outfile, 'utf8') t.like(config, /:always-auth=false/, 'always-auth is scoped and false (by default)') s.close() diff --git a/test/tap/adduser-oauth.js b/test/tap/adduser-oauth.js index 04065048c425b..241fef2a2ed7f 100644 --- a/test/tap/adduser-oauth.js +++ b/test/tap/adduser-oauth.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-oauth') +var opts = { cwd: common.pkg } +var pkg = common.pkg var fakeBrowser = path.resolve(pkg, '_script.sh') var configfile = path.resolve(pkg, '_npmrc') var outfile = path.resolve(pkg, '_outfile') diff --git a/test/tap/adduser-saml.js b/test/tap/adduser-saml.js index 530ebb52b3c0e..17a1a9f7b3de6 100644 --- a/test/tap/adduser-saml.js +++ b/test/tap/adduser-saml.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-saml') +var opts = { cwd: common.pkg } +var pkg = common.pkg var fakeBrowser = path.resolve(pkg, '_script.sh') var configfile = path.resolve(pkg, '_npmrc') var outfile = path.resolve(pkg, '_outfile') diff --git a/test/tap/aliases.js b/test/tap/aliases.js index 19f0b1293e935..0a0a9dfd953b1 100644 --- a/test/tap/aliases.js +++ b/test/tap/aliases.js @@ -15,7 +15,7 @@ const { Dir, File } = Tacks const readdirAsync = BB.promisify(fs.readdir) const readFileAsync = BB.promisify(fs.readFile) -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg let server test('setup', t => { @@ -98,12 +98,12 @@ test('installs an npm: protocol alias package', t => { bar: { version: '1.2.3', from: 'bar@npm:foo@1.2.3', - resolved: 'http://localhost:1337/foo/-/foo-1.2.3.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.3.tgz' }, foo: { version: '1.2.3', from: 'foo@1.2.3', - resolved: 'http://localhost:1337/foo/-/foo-1.2.3.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.3.tgz' } } }, 'both dependencies listed correctly') @@ -149,12 +149,12 @@ test('installs an npm: protocol alias package', t => { bar: { version: '1.2.4', from: 'bar@npm:foo@1.2.4', - resolved: 'http://localhost:1337/foo/-/foo-1.2.4.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.4.tgz' }, foo: { version: '1.2.4', from: 'foo@1.2.4', - resolved: 'http://localhost:1337/foo/-/foo-1.2.4.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.4.tgz' } } }, 'ls shows updated packages') diff --git a/test/tap/all-package-metadata-cache-stream-unit.js b/test/tap/all-package-metadata-cache-stream-unit.js index 0b4dd0e26d5ce..9c1babd59c96c 100644 --- a/test/tap/all-package-metadata-cache-stream-unit.js +++ b/test/tap/all-package-metadata-cache-stream-unit.js @@ -1,6 +1,6 @@ 'use strict' -require('../common-tap.js') +const common = require('../common-tap.js') const getStream = require('get-stream') const mkdirp = require('mkdirp') @@ -13,7 +13,7 @@ const {File} = Tacks const _createCacheEntryStream = require('../../lib/search/all-package-metadata.js')._createCacheEntryStream -const PKG_DIR = path.resolve(__dirname, 'create-cache-entry-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') function setup () { diff --git a/test/tap/all-package-metadata-entry-stream-unit.js b/test/tap/all-package-metadata-entry-stream-unit.js index 4e916229cd852..e693e6b33d76e 100644 --- a/test/tap/all-package-metadata-entry-stream-unit.js +++ b/test/tap/all-package-metadata-entry-stream-unit.js @@ -14,7 +14,7 @@ const {File} = Tacks const _createEntryStream = require('../../lib/search/all-package-metadata.js')._createEntryStream -const PKG_DIR = path.resolve(__dirname, 'create-entry-update-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') let server diff --git a/test/tap/all-package-metadata-update-stream-unit.js b/test/tap/all-package-metadata-update-stream-unit.js index 2c08ac347ed69..782bdf231c88d 100644 --- a/test/tap/all-package-metadata-update-stream-unit.js +++ b/test/tap/all-package-metadata-update-stream-unit.js @@ -11,7 +11,7 @@ const mr = require('npm-registry-mock') var _createEntryUpdateStream = require('../../lib/search/all-package-metadata.js')._createEntryUpdateStream -var PKG_DIR = path.resolve(__dirname, 'create-entry-update-stream') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var server diff --git a/test/tap/all-package-metadata-write-stream-unit.js b/test/tap/all-package-metadata-write-stream-unit.js index 94bb7413f1b32..b258b40dfe666 100644 --- a/test/tap/all-package-metadata-write-stream-unit.js +++ b/test/tap/all-package-metadata-write-stream-unit.js @@ -12,7 +12,7 @@ const ms = require('mississippi') const _createCacheWriteStream = require('../../lib/search/all-package-metadata.js')._createCacheWriteStream -const PKG_DIR = path.resolve(__dirname, 'create-cache-write-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') function setup () { diff --git a/test/tap/all-package-metadata.js b/test/tap/all-package-metadata.js index 99d3fa26c52b8..ec605c3486bb9 100644 --- a/test/tap/all-package-metadata.js +++ b/test/tap/all-package-metadata.js @@ -15,7 +15,7 @@ const File = Tacks.File const allPackageMetadata = require('../../lib/search/all-package-metadata.js') -const PKG_DIR = path.resolve(__dirname, path.basename(__filename, '.js'), 'update-index') +const PKG_DIR = path.resolve(common.pkg, 'update-index') const CACHE_DIR = path.resolve(PKG_DIR, 'cache', '_cacache') let cacheBase let cachePath diff --git a/test/tap/anon-cli-metrics.js b/test/tap/anon-cli-metrics.js index 100ca526cf168..d021cf62bc92f 100644 --- a/test/tap/anon-cli-metrics.js +++ b/test/tap/anon-cli-metrics.js @@ -9,7 +9,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/audit-fix.js b/test/tap/audit-fix.js index 7e95568289005..a832078ae9369 100644 --- a/test/tap/audit-fix.js +++ b/test/tap/audit-fix.js @@ -13,7 +13,7 @@ const test = tap.test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } diff --git a/test/tap/audit.js b/test/tap/audit.js index 3384579f77ba7..69406041a45e6 100644 --- a/test/tap/audit.js +++ b/test/tap/audit.js @@ -12,21 +12,10 @@ const test = tap.test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } -tap.tearDown(function () { - process.chdir(__dirname) - try { - rimraf.sync(testDir) - } catch (e) { - if (process.platform !== 'win32') { - throw e - } - } -}) - function tmock (t) { return mr({port: common.port}).then(s => { t.tearDown(function () { diff --git a/test/tap/auto-prune.js b/test/tap/auto-prune.js index 3fa5d5d05b360..8d129c4a83b21 100644 --- a/test/tap/auto-prune.js +++ b/test/tap/auto-prune.js @@ -7,7 +7,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/bearer-token-check.js b/test/tap/bearer-token-check.js index e3af793e602e5..21c6b0beb2c2f 100644 --- a/test/tap/bearer-token-check.js +++ b/test/tap/bearer-token-check.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var toNerfDart = require('../../lib/config/nerf-dart.js') -var pkg = resolve(__dirname, 'install-bearer-check') +var pkg = common.pkg var outfile = resolve(pkg, '_npmrc') var modules = resolve(pkg, 'node_modules') var tarballPath = '/scoped-underscore/-/scoped-underscore-1.3.1.tgz' diff --git a/test/tap/bin.js b/test/tap/bin.js index 33320bc21f59a..bf2397777ce40 100644 --- a/test/tap/bin.js +++ b/test/tap/bin.js @@ -2,12 +2,12 @@ var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var binDir = '../../node_modules/.bin' -var fixture = path.resolve(__dirname, binDir) +var opts = { cwd: common.pkg } +var binDir = '../../../node_modules/.bin' +var fixture = path.resolve(common.pkg, binDir) test('setup', function (t) { - rimraf.sync(path.join(__dirname, 'node_modules')) + rimraf.sync(path.join(common.pkg, 'node_modules')) t.end() }) diff --git a/test/tap/bitbucket-https-url-with-creds-package.js b/test/tap/bitbucket-https-url-with-creds-package.js index ce65f15b28fba..4177d5f89fcb7 100644 --- a/test/tap/bitbucket-https-url-with-creds-package.js +++ b/test/tap/bitbucket-https-url-with-creds-package.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds-package') +var pkg = common.pkg var json = { name: 'bitbucket-https-url-with-creds-package', diff --git a/test/tap/bitbucket-https-url-with-creds.js b/test/tap/bitbucket-https-url-with-creds.js index ae87d85848752..09f7e0e8e5488 100644 --- a/test/tap/bitbucket-https-url-with-creds.js +++ b/test/tap/bitbucket-https-url-with-creds.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds') +var pkg = common.pkg var json = { name: 'bitbucket-https-url-with-creds', diff --git a/test/tap/bitbucket-shortcut-package.js b/test/tap/bitbucket-shortcut-package.js index 8c418d37dcd0a..bf1a39068ec87 100644 --- a/test/tap/bitbucket-shortcut-package.js +++ b/test/tap/bitbucket-shortcut-package.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-shortcut-package') +var pkg = common.pkg var json = { name: 'bitbucket-shortcut-package', diff --git a/test/tap/bitbucket-shortcut.js b/test/tap/bitbucket-shortcut.js index f8167fdd2dce2..c81554e2d9d20 100644 --- a/test/tap/bitbucket-shortcut.js +++ b/test/tap/bitbucket-shortcut.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-shortcut') +var pkg = common.pkg var json = { name: 'bitbucket-shortcut', diff --git a/test/tap/bugs.js b/test/tap/bugs.js index 4d2ee37e132d1..8e2685220dd93 100644 --- a/test/tap/bugs.js +++ b/test/tap/bugs.js @@ -8,15 +8,15 @@ var rimraf = require('rimraf') var fs = require('fs') var path = require('path') var join = path.join -var outFile = path.join(__dirname, '/_output') +var outFile = path.join(common.pkg, '/_output') -var opts = { cwd: __dirname } +var opts = { cwd: common.pkg } test('setup', function (t) { var s = '#!/usr/bin/env bash\n' + - 'echo "$@" > ' + JSON.stringify(__dirname) + '/_output\n' - fs.writeFileSync(join(__dirname, '/_script.sh'), s, 'ascii') - fs.chmodSync(join(__dirname, '/_script.sh'), '0755') + 'echo "$@" > ' + JSON.stringify(common.pkg) + '/_output\n' + fs.writeFileSync(join(common.pkg, '/_script.sh'), s, 'ascii') + fs.chmodSync(join(common.pkg, '/_script.sh'), '0755') t.pass('made script') t.end() }) @@ -28,7 +28,7 @@ test('npm bugs underscore', function (t) { 'bugs', 'underscore', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -52,7 +52,7 @@ test('npm bugs optimist - github (https://)', function (t) { 'bugs', 'optimist', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -76,7 +76,7 @@ test('npm bugs npm-test-peer-deps - no repo', function (t) { 'bugs', 'npm-test-peer-deps', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -100,7 +100,7 @@ test('npm bugs test-repo-url-http - non-github (http://)', function (t) { 'bugs', 'test-repo-url-http', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -124,7 +124,7 @@ test('npm bugs test-repo-url-https - gitlab (https://)', function (t) { 'bugs', 'test-repo-url-https', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -148,7 +148,7 @@ test('npm bugs test-repo-url-ssh - gitlab (ssh://)', function (t) { 'bugs', 'test-repo-url-ssh', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -166,7 +166,7 @@ test('npm bugs test-repo-url-ssh - gitlab (ssh://)', function (t) { }) test('cleanup', function (t) { - fs.unlinkSync(join(__dirname, '/_script.sh')) + rimraf.sync(common.pkg) t.pass('cleaned up') t.end() }) diff --git a/test/tap/build-already-built.js b/test/tap/build-already-built.js index 8a66f66e69f93..1e7359a558fa3 100644 --- a/test/tap/build-already-built.js +++ b/test/tap/build-already-built.js @@ -10,7 +10,8 @@ var requireInject = require('require-inject') var npm = require('../../lib/npm.js') -var PKG_DIR = path.resolve(__dirname, 'build-already-built') +const common = require('../common-tap.js') +var PKG_DIR = common.pkg var fakePkg = 'foo' test('setup', function (t) { diff --git a/test/tap/builtin-config.js b/test/tap/builtin-config.js index b960ed0383b7b..dddd40565101a 100644 --- a/test/tap/builtin-config.js +++ b/test/tap/builtin-config.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var folder = path.resolve(__dirname, 'builtin-config') +var folder = common.pkg var test = require('tap').test var npm = path.resolve(__dirname, '../..') var spawn = require('child_process').spawn diff --git a/test/tap/bundled-dependencies-nonarray.js b/test/tap/bundled-dependencies-nonarray.js index 924e1b27b60a3..fdc32c2883af1 100644 --- a/test/tap/bundled-dependencies-nonarray.js +++ b/test/tap/bundled-dependencies-nonarray.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var dir = path.resolve(__dirname, path.basename(__filename, '.js')) +var dir = common.pkg var pkg = path.resolve(dir, 'pkg-with-bundled') var dep = path.resolve(dir, 'a-bundled-dep') diff --git a/test/tap/bundled-dependencies.js b/test/tap/bundled-dependencies.js index c6d67e3c503a5..6dbfa8cb08d74 100644 --- a/test/tap/bundled-dependencies.js +++ b/test/tap/bundled-dependencies.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var fs = require('graceful-fs') var tar = require('tar') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-bundled-deps') var targetpath = path.resolve(basepath, 'target') var Tacks = require('tacks') diff --git a/test/tap/bundled-transitive-deps.js b/test/tap/bundled-transitive-deps.js index fe59149062636..d3f296ab1612f 100644 --- a/test/tap/bundled-transitive-deps.js +++ b/test/tap/bundled-transitive-deps.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var npm = require('../../lib/npm.js') var tar = require('tar') var mkdirp = require('mkdirp') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var packed = path.join(testdir, 'packed') var fixture = new Tacks( diff --git a/test/tap/cache-add-unpublished.js b/test/tap/cache-add-unpublished.js index 0e8a9de8bfa67..08592a50deebb 100644 --- a/test/tap/cache-add-unpublished.js +++ b/test/tap/cache-add-unpublished.js @@ -11,7 +11,7 @@ test('cache add', function (t) { 'cache', 'add', 'superfoo', - '--registry=http://localhost:1337/' + '--registry=http://localhost:' + common.port + '/' ], {}, function (er, c, so, se) { @@ -31,7 +31,7 @@ function setup (cb) { res.statusCode = 404 res.end('{"error":"not_found"}\n') }) - s.listen(1337, function () { + s.listen(common.port, function () { cb(null, s) }) } diff --git a/test/tap/cache-shasum-fork.js b/test/tap/cache-shasum-fork.js index 1e92d437560d7..3bc2a5d2a59ae 100644 --- a/test/tap/cache-shasum-fork.js +++ b/test/tap/cache-shasum-fork.js @@ -14,7 +14,7 @@ var common = require('../common-tap.js') var forkPath = path.resolve( __dirname, '..', 'fixtures', 'forked-underscore-1.5.1.tgz' ) -var pkg = path.resolve(__dirname, 'cache-shasum-fork') +var pkg = common.pkg var cache = path.join(pkg, 'cache') var server diff --git a/test/tap/check-cpu-reqs.js b/test/tap/check-cpu-reqs.js index 4d8c3dc6551c4..0a36492430bad 100644 --- a/test/tap/check-cpu-reqs.js +++ b/test/tap/check-cpu-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/test/tap/check-engine-reqs.js b/test/tap/check-engine-reqs.js index 8dd9b8231fb5e..7cbbcd354f997 100644 --- a/test/tap/check-engine-reqs.js +++ b/test/tap/check-engine-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/test/tap/check-install-self.js b/test/tap/check-install-self.js index 2cde1606a91e0..e7591b55e0939 100644 --- a/test/tap/check-install-self.js +++ b/test/tap/check-install-self.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/test/tap/check-os-reqs.js b/test/tap/check-os-reqs.js index 5d0c1ecf78b07..6c43fa61aa637 100644 --- a/test/tap/check-os-reqs.js +++ b/test/tap/check-os-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/test/tap/check-permissions.js b/test/tap/check-permissions.js index 0a5f2e038adf1..74e49fb65fb6c 100644 --- a/test/tap/check-permissions.js +++ b/test/tap/check-permissions.js @@ -8,7 +8,8 @@ var writableFallback = require('../../lib/install/writable.js').fsOpenImplementa var exists = require('../../lib/install/exists.js').fsAccessImplementation var existsFallback = require('../../lib/install/exists.js').fsStatImplementation -var testBase = path.resolve(__dirname, 'check-permissions') +const common = require('../common-tap.js') +var testBase = common.pkg var existingDir = path.resolve(testBase, 'exists') var nonExistingDir = path.resolve(testBase, 'does-not-exist') var writableDir = path.resolve(testBase, 'writable') diff --git a/test/tap/ci-header.js b/test/tap/ci-header.js index dc20cc53c305a..530da3bf3a72a 100644 --- a/test/tap/ci-header.js +++ b/test/tap/ci-header.js @@ -8,7 +8,7 @@ var Dir = Tacks.Dir var chain = require('slide').chain var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/ci.js b/test/tap/ci.js index 9d69e3e5eb524..9150f26efeedc 100644 --- a/test/tap/ci.js +++ b/test/tap/ci.js @@ -12,7 +12,7 @@ const test = require('tap').test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, 'ci') +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } @@ -44,25 +44,27 @@ test('setup', () => { const fixture = new Tacks(Dir({ 'package.json': File(PKG) })) - fixture.create(testDir) - return mr({port: common.port}) + return rimraf(testDir).then(() => { + fixture.create(testDir) + return mr({port: common.port}) + }) .then((server) => { SERVER = server return common.npm([ 'install', '--registry', common.registry ], EXEC_OPTS) - .then(() => fs.readFileAsync( - path.join(testDir, 'package-lock.json'), - 'utf8') - ) - .then((lock) => { - RAW_LOCKFILE = lock - }) - .then(() => common.npm(['ls', '--json'], EXEC_OPTS)) - .then((ret) => { - TREE = scrubFrom(JSON.parse(ret[1])) - }) + }) + .then(() => fs.readFileAsync( + path.join(testDir, 'package-lock.json'), + 'utf8') + ) + .then((lock) => { + RAW_LOCKFILE = lock + }) + .then(() => common.npm(['ls', '--json'], EXEC_OPTS)) + .then((ret) => { + TREE = scrubFrom(JSON.parse(ret[1])) }) }) diff --git a/test/tap/circular-dep.js b/test/tap/circular-dep.js index d7f66eacef1ac..a08c41bf4a9af 100644 --- a/test/tap/circular-dep.js +++ b/test/tap/circular-dep.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'circular-dep') +var pkg = common.pkg var minimist = path.join(pkg, 'minimist') var EXEC_OPTS = { diff --git a/test/tap/config-basic.js b/test/tap/config-basic.js index 0483695cf5f25..a95e94db29fd6 100644 --- a/test/tap/config-basic.js +++ b/test/tap/config-basic.js @@ -1,6 +1,6 @@ var test = require('tap').test +var common = require('../common-config.js') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') var path = require('path') var projectData = { @@ -58,15 +58,7 @@ var expectSources = { } function isDeeplyDetails (t, aa, bb, msg, seen) { - if (aa == null && bb == null) return t.pass(msg) - if (typeof bb !== 'object') return t.is(aa, bb, msg) - if (!seen) seen = [] - for (var kk in seen) if (seen[kk] === aa || seen[kk] === bb) return - seen.push(aa, bb) - t.is(Object.keys(aa).length, Object.keys(bb).length, msg + ': # of elements') - Object.keys(bb).forEach(function (key) { - isDeeplyDetails(t, aa[key], bb[key], msg + ' -> ' + key, seen) - }) + return t.same(aa, bb, msg) } test('no builtin', function (t) { diff --git a/test/tap/config-builtin.js b/test/tap/config-builtin.js index 885d099a1fc30..713522d6ccfa2 100644 --- a/test/tap/config-builtin.js +++ b/test/tap/config-builtin.js @@ -1,6 +1,6 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var path = require('path') var ucData = common.ucData diff --git a/test/tap/config-certfile.js b/test/tap/config-certfile.js index 4b960672ad79e..904a8c0147718 100644 --- a/test/tap/config-certfile.js +++ b/test/tap/config-certfile.js @@ -1,4 +1,4 @@ -require('./00-config-setup.js') +require('../common-config.js') var path = require('path') var fs = require('fs') diff --git a/test/tap/config-credentials.js b/test/tap/config-credentials.js index f6f00ee0e6518..d8f6770666e2d 100644 --- a/test/tap/config-credentials.js +++ b/test/tap/config-credentials.js @@ -1,7 +1,7 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var URI = 'https://registry.lvh.me:8661/' diff --git a/test/tap/config-edit.js b/test/tap/config-edit.js index 7d6eb2588d48b..a4f78a262c8b9 100644 --- a/test/tap/config-edit.js +++ b/test/tap/config-edit.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'npm-global-edit') +var pkg = common.pkg var editorSrc = function () { /* #!/usr/bin/env node diff --git a/test/tap/config-envReplace.js b/test/tap/config-envReplace.js index 0b4f628d67339..f65609f050f75 100644 --- a/test/tap/config-envReplace.js +++ b/test/tap/config-envReplace.js @@ -8,7 +8,8 @@ const ini = require('ini') const test = require('tap').test const npmconf = require('../../lib/config/core.js') -const packagePath = path.resolve(__dirname, 'config-envReplace') +const common = require('../common-tap.js') +const packagePath = common.pkg const packageJsonFile = JSON.stringify({ name: 'config-envReplace' diff --git a/test/tap/config-list.js b/test/tap/config-list.js index 05402d4bbe6ee..7559214a727a5 100644 --- a/test/tap/config-list.js +++ b/test/tap/config-list.js @@ -5,7 +5,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'config-list') +var pkg = common.pkg var opts = { cwd: pkg, env: common.emptyEnv() } var npmrc = path.resolve(pkg, '.npmrc') var npmrcContents = ` diff --git a/test/tap/config-malformed.js b/test/tap/config-malformed.js index 4f74ea5387e59..0d859e00340f3 100644 --- a/test/tap/config-malformed.js +++ b/test/tap/config-malformed.js @@ -1,7 +1,7 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') test('with malformed', function (t) { npmconf.load({}, common.malformed, function (er, conf) { diff --git a/test/tap/config-new-cafile.js b/test/tap/config-new-cafile.js index 9cffb19008ed4..553bde6053042 100644 --- a/test/tap/config-new-cafile.js +++ b/test/tap/config-new-cafile.js @@ -1,4 +1,4 @@ -require('./00-config-setup.js') +const common = require('../common-tap.js') var path = require('path') var fs = require('graceful-fs') @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var osenv = require('osenv') var npmconf = require('../../lib/config/core.js') -var dir = path.resolve(__dirname, 'config-new-cafile') +var dir = common.pkg var beep = path.resolve(dir, 'beep.pem') test('setup', function (t) { diff --git a/test/tap/config-private.js b/test/tap/config-private.js index 91582921e6dff..e6bf9d2e83cee 100644 --- a/test/tap/config-private.js +++ b/test/tap/config-private.js @@ -5,7 +5,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'config-private') +var pkg = common.pkg var opts = { cwd: pkg } test('setup', function (t) { diff --git a/test/tap/config-project.js b/test/tap/config-project.js index b9e8b7ac04a2e..7e43e8f0eee2b 100644 --- a/test/tap/config-project.js +++ b/test/tap/config-project.js @@ -3,11 +3,12 @@ var path = require('path') var fix = path.resolve(__dirname, '..', 'fixtures', 'config') var projectRc = path.resolve(fix, '.npmrc') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var projectData = { just: 'testing' } var ucData = common.ucData +ucData['env-thing'] = 'foo' var envData = common.envData var envDataFix = common.envDataFix diff --git a/test/tap/config-save.js b/test/tap/config-save.js index a7f85d6015e4b..23dc7b5960785 100644 --- a/test/tap/config-save.js +++ b/test/tap/config-save.js @@ -1,13 +1,15 @@ var fs = require('fs') var ini = require('ini') -var test = require('tap').test +var t = require('tap') +const test = t.test +var common = require('../common-config.js') +var commonTap = require('../common-tap.js') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') var expectConf = [ 'globalconfig = ' + common.globalconfig, 'email = i@izs.me', - 'env-thing = asdf', + 'env-thing = foo', 'init.author.name = Isaac Z. Schlueter', 'init.author.email = i@izs.me', 'init.author.url = http://blog.izs.me/', @@ -32,7 +34,7 @@ var expectConf = [ var expectFile = [ 'globalconfig = ' + common.globalconfig, 'email = i@izs.me', - 'env-thing = asdf', + 'env-thing = foo', 'init.author.name = Isaac Z. Schlueter', 'init.author.email = i@izs.me', 'init.author.url = http://blog.izs.me/', @@ -54,6 +56,10 @@ var expectFile = [ '' ].join('\n') +const userconfig = commonTap.pkg + '/userconfig' +fs.writeFileSync(userconfig, fs.readFileSync(common.userconfig)) +process.env.npm_config_userconfig = userconfig + test('saving configs', function (t) { npmconf.load(function (er, conf) { if (er) throw er diff --git a/test/tap/correct-mkdir.js b/test/tap/correct-mkdir.js index 2c93f943ad5c4..c69f8b00b55d5 100644 --- a/test/tap/correct-mkdir.js +++ b/test/tap/correct-mkdir.js @@ -1,9 +1,9 @@ /* eslint-disable camelcase */ var test = require('tap').test var assert = require('assert') -var path = require('path') var requireInject = require('require-inject') -var cache_dir = path.resolve(__dirname, 'correct-mkdir') +const common = require('../common-tap.js') +var cache_dir = common.pkg test('correct-mkdir: no race conditions', function (t) { var mock_fs = {} diff --git a/test/tap/cruft-test.js b/test/tap/cruft-test.js index 0cbcc6f56c61d..4f2ed6c0d0a71 100644 --- a/test/tap/cruft-test.js +++ b/test/tap/cruft-test.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var cruft = path.join(base, 'node_modules', 'cruuuft') var pkg = { name: 'example', diff --git a/test/tap/debug-logs.js b/test/tap/debug-logs.js index a6997352636fe..8eb6c78049ea5 100644 --- a/test/tap/debug-logs.js +++ b/test/tap/debug-logs.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/dedupe-git-semver.js b/test/tap/dedupe-git-semver.js index 21e372e24b0d0..35bb2c87d80e7 100644 --- a/test/tap/dedupe-git-semver.js +++ b/test/tap/dedupe-git-semver.js @@ -36,7 +36,8 @@ const npm = requireInject.installGlobally('../../lib/npm.js', { } }) -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const common = require('../common-tap.js') +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const tmpdir = path.join(basedir, 'tmp') diff --git a/test/tap/dedupe-scoped.js b/test/tap/dedupe-scoped.js index 9d5ff9ac4c003..957f67e141c40 100644 --- a/test/tap/dedupe-scoped.js +++ b/test/tap/dedupe-scoped.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = join(__dirname, 'dedupe-scoped') +var pkg = common.pkg var modules = join(pkg, 'node_modules') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/dedupe.js b/test/tap/dedupe.js index b6c601cbad37e..109f81656237b 100644 --- a/test/tap/dedupe.js +++ b/test/tap/dedupe.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'dedupe') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/dist-tag.js b/test/tap/dist-tag.js index 3631a598e9c68..0567964d35a23 100644 --- a/test/tap/dist-tag.js +++ b/test/tap/dist-tag.js @@ -7,7 +7,7 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'dist-tag') +var pkg = common.pkg var server var scoped = { diff --git a/test/tap/do-not-remove-other-bins.js b/test/tap/do-not-remove-other-bins.js index 6fec728d43bcc..4e6b0d27b2f53 100644 --- a/test/tap/do-not-remove-other-bins.js +++ b/test/tap/do-not-remove-other-bins.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installPath = path.resolve(base, 'install') var installBin = path.resolve(installPath, 'node_modules', '.bin') var packageApath = path.resolve(base, 'packageA') diff --git a/test/tap/doctor.js b/test/tap/doctor.js index 26c74833e2bfc..6ee05746960d6 100644 --- a/test/tap/doctor.js +++ b/test/tap/doctor.js @@ -13,7 +13,7 @@ const which = require('which') const Dir = Tacks.Dir const File = Tacks.File -const ROOT = path.join(__dirname, path.basename(__filename, '.js')) +const ROOT = common.pkg const CACHE = path.join(ROOT, 'cache') const TMP = path.join(ROOT, 'tmp') const PREFIX = path.join(ROOT, 'global-prefix') diff --git a/test/tap/extraneous-dep-cycle-ls-ok.js b/test/tap/extraneous-dep-cycle-ls-ok.js index d483b3e22ac33..11f52209ed835 100644 --- a/test/tap/extraneous-dep-cycle-ls-ok.js +++ b/test/tap/extraneous-dep-cycle-ls-ok.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var pathModA = path.join(pkg, 'node_modules', 'moduleA') var pathModB = path.join(pkg, 'node_modules', 'moduleB') diff --git a/test/tap/false-name.js b/test/tap/false-name.js index 1e2a4d43ddbb9..301be4fc8ef94 100644 --- a/test/tap/false-name.js +++ b/test/tap/false-name.js @@ -18,7 +18,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'false-name') +var pkg = common.pkg var cache = path.join(pkg, 'cache') var server diff --git a/test/tap/fetch-package-metadata.js b/test/tap/fetch-package-metadata.js index 2fc501369e52f..9a45fb57a92de 100644 --- a/test/tap/fetch-package-metadata.js +++ b/test/tap/fetch-package-metadata.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg function setup (cb) { cleanup() @@ -56,7 +56,7 @@ test('fetch-package-metadata provides resolved metadata', function (t) { function thenVerifyMetadata (err, pkg) { t.ifError(err, 'fetched metadata') - t.equals(pkg._resolved, 'http://localhost:1337/test-package/-/test-package-0.0.0.tgz', '_resolved') + t.equals(pkg._resolved, 'http://localhost:' + common.port + '/test-package/-/test-package-0.0.0.tgz', '_resolved') t.equals(pkg._integrity, 'sha1-sNMrbEXCWcV4uiADdisgUTG9+9E=', '_integrity') server.close() t.end() diff --git a/test/tap/full-warning-messages.js b/test/tap/full-warning-messages.js index c986695d67e99..945cf66a629dd 100644 --- a/test/tap/full-warning-messages.js +++ b/test/tap/full-warning-messages.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var fs = require('graceful-fs') var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var modA = path.resolve(base, 'modA') var modB = path.resolve(base, 'modB') diff --git a/test/tap/gently-rm-cmdshims.js b/test/tap/gently-rm-cmdshims.js index 304c6956bdfd6..6726fe76d8dba 100644 --- a/test/tap/gently-rm-cmdshims.js +++ b/test/tap/gently-rm-cmdshims.js @@ -7,7 +7,8 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var npm = require('../../lib/npm.js') -var work = path.join(__dirname, path.basename(__filename, '.js')) +const common = require('../common-tap.js') +var work = common.pkg var doremove = path.join(work, 'doremove') var dontremove = path.join(work, 'dontremove') var example_json = { diff --git a/test/tap/gently-rm-linked-module.js b/test/tap/gently-rm-linked-module.js index 877c683c9f04e..ab595e10c740f 100644 --- a/test/tap/gently-rm-linked-module.js +++ b/test/tap/gently-rm-linked-module.js @@ -1,6 +1,5 @@ var common = require('../common-tap.js') -var basename = require('path').basename var resolve = require('path').resolve var fs = require('graceful-fs') var test = require('tap').test @@ -11,7 +10,7 @@ var Dir = Tacks.Dir var Symlink = Tacks.Symlink var isWindows = require('../../lib/utils/is-windows.js') -var base = resolve(__dirname, basename(__filename, '.js')) +var base = common.pkg var fixture = new Tacks(Dir({ 'working-dir': Dir({ 'node_modules': Dir({}) // so it doesn't try to install into npm's own node_modules diff --git a/test/tap/gently-rm-overeager.js b/test/tap/gently-rm-overeager.js index 7299b2c3f4ce1..91a3768aff705 100644 --- a/test/tap/gently-rm-overeager.js +++ b/test/tap/gently-rm-overeager.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var pkg = path.join(testdir, 'gently-rm-overeager') var dep = path.join(testdir, 'test-whoops') diff --git a/test/tap/gently-rm-symlinked-global-dir.js b/test/tap/gently-rm-symlinked-global-dir.js index 8ac290091ca5c..0a27dae5c5e95 100644 --- a/test/tap/gently-rm-symlinked-global-dir.js +++ b/test/tap/gently-rm-symlinked-global-dir.js @@ -7,10 +7,10 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var isWindows = require('../../lib/utils/is-windows.js') -var pkg = resolve(__dirname, 'gently-rm-linked') -var dep = resolve(__dirname, 'test-linked') -var glb = resolve(__dirname, 'test-global') -var lnk = resolve(__dirname, 'test-global-link') +var pkg = resolve(common.pkg, 'package') +var dep = resolve(common.pkg, 'test-linked') +var glb = resolve(common.pkg, 'test-global') +var lnk = resolve(common.pkg, 'test-global-link') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/gist-short-shortcut-package.js b/test/tap/gist-short-shortcut-package.js index 4074995ee5cc4..d7c70b16b029f 100644 --- a/test/tap/gist-short-shortcut-package.js +++ b/test/tap/gist-short-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-short-shortcut-package') +var pkg = common.pkg var json = { name: 'gist-short-shortcut-package', diff --git a/test/tap/gist-short-shortcut.js b/test/tap/gist-short-shortcut.js index 875c30e036512..04bf5bd42a985 100644 --- a/test/tap/gist-short-shortcut.js +++ b/test/tap/gist-short-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-short-shortcut') +var pkg = common.pkg var json = { name: 'gist-short-shortcut', diff --git a/test/tap/gist-shortcut-package.js b/test/tap/gist-shortcut-package.js index dd6f41359e9ed..9851e80b0e07a 100644 --- a/test/tap/gist-shortcut-package.js +++ b/test/tap/gist-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-shortcut-package') +var pkg = common.pkg var json = { name: 'gist-shortcut-package', diff --git a/test/tap/gist-shortcut.js b/test/tap/gist-shortcut.js index 8ad5ef001ce23..9958a996e076c 100644 --- a/test/tap/gist-shortcut.js +++ b/test/tap/gist-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-shortcut') +var pkg = common.pkg var json = { name: 'gist-shortcut', diff --git a/test/tap/git-dependency-install-link.js b/test/tap/git-dependency-install-link.js index 1bf839f302891..462df8973fead 100644 --- a/test/tap/git-dependency-install-link.js +++ b/test/tap/git-dependency-install-link.js @@ -11,9 +11,9 @@ var mr = require('npm-registry-mock') var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'git-dependency-install-link') -var repo = resolve(__dirname, 'git-dependency-install-link-repo') -var prefix = resolve(__dirname, 'git-dependency-install-link-prefix') +var pkg = common.pkg +var repo = pkg + '-repo' +var prefix = pkg + '-prefix' var cache = resolve(pkg, 'cache') var daemon @@ -32,7 +32,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git' + 'child': 'git://localhost:' + common.gitPort + '/child.git' } }, null, 2) + '\n' @@ -139,7 +139,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, diff --git a/test/tap/git-npmignore.js b/test/tap/git-npmignore.js index 19d014c3d9a92..42c1637b18013 100644 --- a/test/tap/git-npmignore.js +++ b/test/tap/git-npmignore.js @@ -1,7 +1,6 @@ /* eslint-disable camelcase */ var child_process = require('child_process') var readdir = require('graceful-fs').readdirSync -var path = require('path') var resolve = require('path').resolve var rimraf = require('rimraf') @@ -42,7 +41,7 @@ var fixture = new Tacks(Dir({ }) })) -var testdir = resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = resolve(testdir, 'cache') var dep = resolve(testdir, 'deps', 'gitch') var packname = 'gitch-1.0.0.tgz' diff --git a/test/tap/git-prepare.js b/test/tap/git-prepare.js index 1a61056b4beda..9112828ce40cd 100644 --- a/test/tap/git-prepare.js +++ b/test/tap/git-prepare.js @@ -11,7 +11,7 @@ const mr = require('npm-registry-mock') const npm = require('../../lib/npm.js') const common = require('../common-tap.js') -const testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +const testdir = common.pkg const repo = path.join(testdir, 'repo') const prefix = path.join(testdir, 'prefix') const cache = path.join(testdir, 'cache') @@ -37,7 +37,7 @@ const fixture = new Tacks(Dir({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git' + 'child': 'git://localhost:' + common.gitPort + '/child.git' } }) }), @@ -144,7 +144,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: repo, diff --git a/test/tap/github-shortcut-package.js b/test/tap/github-shortcut-package.js index 73385436b7893..a084479e1791e 100644 --- a/test/tap/github-shortcut-package.js +++ b/test/tap/github-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'github-shortcut-package') +var pkg = common.pkg var json = { name: 'github-shortcut-package', diff --git a/test/tap/github-shortcut.js b/test/tap/github-shortcut.js index 641d64f3b92fe..90f4655149bb9 100644 --- a/test/tap/github-shortcut.js +++ b/test/tap/github-shortcut.js @@ -13,7 +13,7 @@ const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.resolve(__dirname, 'github-shortcut') +const pkg = common.pkg const json = { name: 'github-shortcut', diff --git a/test/tap/gitlab-shortcut-package.js b/test/tap/gitlab-shortcut-package.js index 1dd1ba99fbd29..54632f8370403 100644 --- a/test/tap/gitlab-shortcut-package.js +++ b/test/tap/gitlab-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gitlab-shortcut-package') +var pkg = common.pkg var json = { name: 'gitlab-shortcut-package', diff --git a/test/tap/gitlab-shortcut.js b/test/tap/gitlab-shortcut.js index 6b2bfbc3edd86..724178867aede 100644 --- a/test/tap/gitlab-shortcut.js +++ b/test/tap/gitlab-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gitlab-shortcut') +var pkg = common.pkg var json = { name: 'gitlab-shortcut', diff --git a/test/tap/graceful-restart.js b/test/tap/graceful-restart.js index 56513fbf7ebbb..740561bd79efa 100644 --- a/test/tap/graceful-restart.js +++ b/test/tap/graceful-restart.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'graceful-restart') +var pkg = common.pkg var outGraceless = [ 'prerestart', diff --git a/test/tap/ignore-install-link.js b/test/tap/ignore-install-link.js index 684c6a05b24c0..129df3c2717ca 100644 --- a/test/tap/ignore-install-link.js +++ b/test/tap/ignore-install-link.js @@ -9,7 +9,7 @@ var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var root = path.resolve(__dirname, 'ignore-install-link') +var root = common.pkg var pkg = path.resolve(root, 'pkg') var dep = path.resolve(root, 'dep') var target = path.resolve(pkg, 'node_modules', 'dep') diff --git a/test/tap/ignore-scripts.js b/test/tap/ignore-scripts.js index 785921d7eb2d6..f5af4553c26c0 100644 --- a/test/tap/ignore-scripts.js +++ b/test/tap/ignore-scripts.js @@ -9,7 +9,7 @@ var common = require('../common-tap') // ignore-scripts/package.json has scripts that always exit with non-zero error // codes. -var pkg = path.resolve(__dirname, 'ignore-scripts') +var pkg = common.pkg var gypfile = 'bad_binding_file\n' var json = { diff --git a/test/tap/init-interrupt.js b/test/tap/init-interrupt.js index b0c7643ddf044..114bb2bacba27 100644 --- a/test/tap/init-interrupt.js +++ b/test/tap/init-interrupt.js @@ -2,7 +2,6 @@ // if 'npm init' is interrupted with ^C, don't report // 'init written successfully' var test = require('tap').test -var path = require('path') var osenv = require('osenv') var rimraf = require('rimraf') var npmlog = require('npmlog') @@ -10,7 +9,8 @@ var requireInject = require('require-inject') var npm = require('../../lib/npm.js') -var PKG_DIR = path.resolve(__dirname, 'init-interrupt') +const common = require('../common-tap.js') +var PKG_DIR = common.pkg test('setup', function (t) { cleanup() diff --git a/test/tap/install-at-locally.js b/test/tap/install-at-locally.js index fa0190ceb3ee2..705c2df119642 100644 --- a/test/tap/install-at-locally.js +++ b/test/tap/install-at-locally.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-at-locally') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/test/tap/install-at-sub-path-locally.js b/test/tap/install-at-sub-path-locally.js index e16b75179ebaf..08b64746af678 100644 --- a/test/tap/install-at-sub-path-locally.js +++ b/test/tap/install-at-sub-path-locally.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-at-sub-path-locally') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/test/tap/install-bad-dep-format.js b/test/tap/install-bad-dep-format.js index 94c7d175fde45..d01996f155212 100644 --- a/test/tap/install-bad-dep-format.js +++ b/test/tap/install-bad-dep-format.js @@ -21,7 +21,7 @@ test('invalid url format returns appropriate error', function (t) { setup(json) common.npm(['install'], {}, function (err, code, stdout, stderr) { t.ifError(err, 'install ran without error') - t.equals(code, 1, 'inall exited with code 1') + t.equals(code, 1, 'install exited with code 1') t.match(stderr, /ERR.*Unsupported URL Type/, 'Error should report that invalid url-style formats are used') @@ -43,12 +43,12 @@ function cleanup () { process.chdir(osenv.tmpdir()) var pkgs = [json] pkgs.forEach(function (json) { - rimraf.sync(path.resolve(__dirname, json.name)) + rimraf.sync(path.resolve(common.pkg, json.name)) }) } function mkPkg (json) { - var pkgPath = path.resolve(__dirname, json.name) + var pkgPath = path.resolve(common.pkg, json.name) mkdirp.sync(pkgPath) fs.writeFileSync( path.join(pkgPath, 'package.json'), diff --git a/test/tap/install-bad-man.js b/test/tap/install-bad-man.js index 226d0b24fc06d..98c8e9a7e0453 100644 --- a/test/tap/install-bad-man.js +++ b/test/tap/install-bad-man.js @@ -8,8 +8,8 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-bad-man') -var target = resolve(__dirname, 'install-bad-man-target') +var pkg = common.pkg +var target = pkg + '-target' var EXEC_OPTS = { cwd: target diff --git a/test/tap/install-before.js b/test/tap/install-before.js index c99b996c43029..05a254a1ef1ce 100644 --- a/test/tap/install-before.js +++ b/test/tap/install-before.js @@ -12,7 +12,7 @@ const { test } = require('tap') const { Dir, File } = Tacks -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg let server test('setup', t => { diff --git a/test/tap/install-bin-null.js b/test/tap/install-bin-null.js index f45528a75acf4..7a87a2e0bbc27 100644 --- a/test/tap/install-bin-null.js +++ b/test/tap/install-bin-null.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-bin-null') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-only-development.js b/test/tap/install-cli-only-development.js index ff9d05f547f26..a68c0f8aac0a2 100644 --- a/test/tap/install-cli-only-development.js +++ b/test/tap/install-cli-only-development.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-development') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-only-production.js b/test/tap/install-cli-only-production.js index 40328d773539f..e43692d3d7c9c 100644 --- a/test/tap/install-cli-only-production.js +++ b/test/tap/install-cli-only-production.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-only-production') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-only-shrinkwrap.js b/test/tap/install-cli-only-shrinkwrap.js index aa731909d3539..e3a4685d9c459 100644 --- a/test/tap/install-cli-only-shrinkwrap.js +++ b/test/tap/install-cli-only-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-production-nosave.js b/test/tap/install-cli-production-nosave.js index cf69ad3fae05d..46b3460b7232c 100644 --- a/test/tap/install-cli-production-nosave.js +++ b/test/tap/install-cli-production-nosave.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-cli-production-nosave') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-production.js b/test/tap/install-cli-production.js index a1fdac6e880d5..4c88add92fffc 100644 --- a/test/tap/install-cli-production.js +++ b/test/tap/install-cli-production.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-production') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-unicode.js b/test/tap/install-cli-unicode.js index 01a5f4a471dc0..2691db96d0677 100644 --- a/test/tap/install-cli-unicode.js +++ b/test/tap/install-cli-unicode.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'install-cli-unicode') +var pkg = common.pkg function hasOnlyAscii (s) { return /^[\000-\177]*$/.test(s) diff --git a/test/tap/install-contributors-count.js b/test/tap/install-contributors-count.js index 52fba0fd24999..ead925081330b 100644 --- a/test/tap/install-contributors-count.js +++ b/test/tap/install-contributors-count.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ node_modules: Dir({ a: Dir({ diff --git a/test/tap/install-dep-classification.js b/test/tap/install-dep-classification.js index 153a7f3927ec1..3c65459d345fb 100644 --- a/test/tap/install-dep-classification.js +++ b/test/tap/install-dep-classification.js @@ -7,7 +7,7 @@ const Dir = Tacks.Dir const common = require('../common-tap.js') const fs = require('fs') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/install-duplicate-deps-warning.js b/test/tap/install-duplicate-deps-warning.js index 017a5cdfe117c..2b10d8aa31964 100644 --- a/test/tap/install-duplicate-deps-warning.js +++ b/test/tap/install-duplicate-deps-warning.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var json = { dependencies: { diff --git a/test/tap/install-from-local.js b/test/tap/install-from-local.js index 3cac382a70d38..a3e63b359dbea 100644 --- a/test/tap/install-from-local.js +++ b/test/tap/install-from-local.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var root = path.join(__dirname, 'install-from-local') +var root = common.pkg var pkg = path.join(root, 'package-with-local-paths') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-into-likenamed-folder.js b/test/tap/install-into-likenamed-folder.js index 187d5fbf11bca..c7bc86f3baaf4 100644 --- a/test/tap/install-into-likenamed-folder.js +++ b/test/tap/install-into-likenamed-folder.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var moduleDir = path.join(base, 'example-src') var destDir = path.join(base, 'example') var moduleJson = { diff --git a/test/tap/install-link-scripts.js b/test/tap/install-link-scripts.js index acc88b4b2ccdc..bff4dd5ef0106 100644 --- a/test/tap/install-link-scripts.js +++ b/test/tap/install-link-scripts.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-link-scripts') +var pkg = common.pkg var tmp = path.join(pkg, 'tmp') var dep = path.join(pkg, 'dep') diff --git a/test/tap/install-local-dep-cycle.js b/test/tap/install-local-dep-cycle.js index 1f76ad9598a2d..a66f04bce4715 100644 --- a/test/tap/install-local-dep-cycle.js +++ b/test/tap/install-local-dep-cycle.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var baseJSON = { name: 'base', diff --git a/test/tap/install-man.js b/test/tap/install-man.js index d24819ca7887d..720b4c217b375 100644 --- a/test/tap/install-man.js +++ b/test/tap/install-man.js @@ -8,8 +8,8 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-man') -var target = resolve(__dirname, 'install-man-target') +var pkg = common.pkg +var target = pkg + '-target' common.pendIfWindows('man pages do not get installed on Windows') diff --git a/test/tap/install-noargs-dev.js b/test/tap/install-noargs-dev.js index ec9c7e3687eef..4716dc2243b53 100644 --- a/test/tap/install-noargs-dev.js +++ b/test/tap/install-noargs-dev.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-noargs-dev') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-package-json-order.js b/test/tap/install-package-json-order.js index 93977c6c3dc44..ae000ff6738df 100644 --- a/test/tap/install-package-json-order.js +++ b/test/tap/install-package-json-order.js @@ -5,7 +5,8 @@ var mkdirp = require('mkdirp') var spawn = require('child_process').spawn var npm = require.resolve('../../bin/npm-cli.js') var node = process.execPath -var pkg = path.resolve(__dirname, 'install-package-json-order') +const common = require('../common-tap.js') +var pkg = common.pkg var workdir = path.join(pkg, 'workdir') var tmp = path.join(pkg, 'tmp') var cache = path.join(pkg, 'cache') diff --git a/test/tap/install-package-lock-only.js b/test/tap/install-package-lock-only.js index 1610988851c12..6e98f27b30021 100644 --- a/test/tap/install-package-lock-only.js +++ b/test/tap/install-package-lock-only.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/install-parse-error.js b/test/tap/install-parse-error.js index 1330195ead9f0..1a72c336de071 100644 --- a/test/tap/install-parse-error.js +++ b/test/tap/install-parse-error.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ 'package.json': File( diff --git a/test/tap/install-property-conflicts.js b/test/tap/install-property-conflicts.js index 8f293885abf40..c8f58e139fbcc 100644 --- a/test/tap/install-property-conflicts.js +++ b/test/tap/install-property-conflicts.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-property-conflicts') +var pkg = common.pkg var target = resolve(pkg, '_target') var EXEC_OPTS = { diff --git a/test/tap/install-report-just-installed.js b/test/tap/install-report-just-installed.js index 0a2cde2562ac7..23b373b269405 100644 --- a/test/tap/install-report-just-installed.js +++ b/test/tap/install-report-just-installed.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ node_modules: Dir({ a: Dir({ diff --git a/test/tap/install-save-consistent-newlines.js b/test/tap/install-save-consistent-newlines.js index 6250377445a79..acea57c987bfb 100644 --- a/test/tap/install-save-consistent-newlines.js +++ b/test/tap/install-save-consistent-newlines.js @@ -11,7 +11,7 @@ const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.join(__dirname, 'install-save-consistent-newlines') +const pkg = common.pkg const EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-save-exact.js b/test/tap/install-save-exact.js index 14e32f0f84b62..3d57ead361be8 100644 --- a/test/tap/install-save-exact.js +++ b/test/tap/install-save-exact.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-save-exact') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-save-local.js b/test/tap/install-save-local.js index 5965281bf2967..8f4f5ecb0023e 100644 --- a/test/tap/install-save-local.js +++ b/test/tap/install-save-local.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var root = path.join(__dirname, 'install-save-local') +var root = common.pkg var pkg = path.join(root, 'package') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-save-prefix.js b/test/tap/install-save-prefix.js index b669c5fb7ef70..001e24d873558 100644 --- a/test/tap/install-save-prefix.js +++ b/test/tap/install-save-prefix.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-save-prefix') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-scoped-already-installed.js b/test/tap/install-scoped-already-installed.js index 58966b047c430..707d82a44353e 100644 --- a/test/tap/install-scoped-already-installed.js +++ b/test/tap/install-scoped-already-installed.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var root = path.join(__dirname, 'install-scoped-already-installed') +var root = common.pkg var pkg = path.join(root, 'package-with-scoped-paths') var modules = path.join(pkg, 'node_modules') diff --git a/test/tap/install-scoped-link.js b/test/tap/install-scoped-link.js index 9171b8f46f439..920e7e3d4531a 100644 --- a/test/tap/install-scoped-link.js +++ b/test/tap/install-scoped-link.js @@ -12,8 +12,8 @@ var escapeExecPath = require('../../lib/utils/escape-exec-path') var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-scoped-link') -var work = path.join(__dirname, 'install-scoped-link-TEST') +var pkg = common.pkg +var work = pkg + '-TEST' var modules = path.join(work, 'node_modules') var EXEC_OPTS = { cwd: work } diff --git a/test/tap/install-scoped-with-bundled-dependency.js b/test/tap/install-scoped-with-bundled-dependency.js index bd197ae036591..76f440dc6c158 100644 --- a/test/tap/install-scoped-with-bundled-dependency.js +++ b/test/tap/install-scoped-with-bundled-dependency.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/install-scoped-with-peer-dependency.js b/test/tap/install-scoped-with-peer-dependency.js index 7f60c73221092..477a04a1055dd 100644 --- a/test/tap/install-scoped-with-peer-dependency.js +++ b/test/tap/install-scoped-with-peer-dependency.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-scoped-with-peer-dependency') +var pkg = common.pkg var local = path.join(pkg, 'package') var EXEC_OPTS = { } diff --git a/test/tap/install-shrinkwrapped-git.js b/test/tap/install-shrinkwrapped-git.js index 7bbb4f6e5fb75..7e50aa713d570 100644 --- a/test/tap/install-shrinkwrapped-git.js +++ b/test/tap/install-shrinkwrapped-git.js @@ -11,7 +11,7 @@ var npm = require('../../lib/npm') var common = require('../common-tap') var chain = require('slide').chain -var mockPath = resolve(__dirname, 'install-shrinkwrapped') +var mockPath = common.pkg var parentPath = resolve(mockPath, 'parent') var parentNodeModulesPath = path.join(parentPath, 'node_modules') var outdatedNodeModulesPath = resolve(mockPath, 'node-modules-backup') @@ -53,11 +53,11 @@ test('shrinkwrapped git dependency got updated', function (t) { if (err) { throw err } chain([ // Install & shrinkwrap child package's first commit - [npm.commands.install, ['git://localhost:1234/child.git#' + refs[0]]], + [npm.commands.install, ['git://localhost:' + common.gitPort + '/child.git#' + refs[0]]], // Backup node_modules with the first commit [fs.rename, parentNodeModulesPath, outdatedNodeModulesPath], // Install & shrinkwrap child package's latest commit - [npm.commands.install, ['git://localhost:1234/child.git#' + refs[1].substr(0, 8)]], + [npm.commands.install, ['git://localhost:' + common.gitPort + '/child.git#' + refs[1].substr(0, 8)]], // Restore node_modules with the first commit [rimraf, parentNodeModulesPath], [fs.rename, outdatedNodeModulesPath, parentNodeModulesPath], @@ -68,15 +68,15 @@ test('shrinkwrapped git dependency got updated', function (t) { t.similar(pkglock, { dependencies: { child: { - version: `git://localhost:1234/child.git#${refs[1]}`, - from: `git://localhost:1234/child.git#${refs[1].substr(0, 8)}` + version: `git://localhost:${common.gitPort}/child.git#${refs[1]}`, + from: `git://localhost:${common.gitPort}/child.git#${refs[1].substr(0, 8)}` } } }, 'version and from fields are correct in git-based pkglock dep') var childPackageJSON = require(path.join(parentNodeModulesPath, 'child', 'package.json')) t.equal( childPackageJSON._resolved, - 'git://localhost:1234/child.git#' + refs[1], + 'git://localhost:' + common.gitPort + '/child.git#' + refs[1], "Child package wasn't updated" ) t.end() @@ -153,7 +153,7 @@ function startGitDaemon (cb) { '--export-all', '--base-path=' + mockPath, // Path to the dir that contains child.git '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: parentPath, diff --git a/test/tap/install-test-cli-without-package-lock.js b/test/tap/install-test-cli-without-package-lock.js index ea3d75feb6af8..468277d74d209 100644 --- a/test/tap/install-test-cli-without-package-lock.js +++ b/test/tap/install-test-cli-without-package-lock.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-windows-newlines.js b/test/tap/install-windows-newlines.js index 1c69b204ad02b..b56c7645ebf42 100644 --- a/test/tap/install-windows-newlines.js +++ b/test/tap/install-windows-newlines.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-windows-newlines') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/test/tap/install-with-dev-dep-duplicate.js b/test/tap/install-with-dev-dep-duplicate.js index 2d31b8fad7abd..b3a58987631b4 100644 --- a/test/tap/install-with-dev-dep-duplicate.js +++ b/test/tap/install-with-dev-dep-duplicate.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'dev-dep-duplicate') +var pkg = common.pkg var json = { author: 'Anders Janmyr', diff --git a/test/tap/invalid-dep-version-filtering.js b/test/tap/invalid-dep-version-filtering.js index 19ab5d209dd5c..502610f231ce4 100644 --- a/test/tap/invalid-dep-version-filtering.js +++ b/test/tap/invalid-dep-version-filtering.js @@ -7,7 +7,7 @@ var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = path.join(testdir, 'cache') var fixture = new Tacks(Dir({ diff --git a/test/tap/it.js b/test/tap/it.js index b0dddb8f919de..9b716139a3814 100644 --- a/test/tap/it.js +++ b/test/tap/it.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = join(__dirname, 'run-script') +var pkg = common.pkg var installed = join(pkg, 'node_modules', 'underscore', 'package.json') var json = { diff --git a/test/tap/legacy-ignore-nested-nm.js b/test/tap/legacy-ignore-nested-nm.js index 095c41efa146b..6a57b72b60488 100644 --- a/test/tap/legacy-ignore-nested-nm.js +++ b/test/tap/legacy-ignore-nested-nm.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-ignore-nested-nm') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-ignore-nested-nm') diff --git a/test/tap/legacy-missing-bindir.js b/test/tap/legacy-missing-bindir.js index 2285f8d2a7556..398ef0e7acc51 100644 --- a/test/tap/legacy-missing-bindir.js +++ b/test/tap/legacy-missing-bindir.js @@ -5,7 +5,7 @@ var test = require('tap').test var common = require('../common-tap.js') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-missing-bindir') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-missing-bindir') diff --git a/test/tap/legacy-no-auth-leak.js b/test/tap/legacy-no-auth-leak.js index f837239250222..ce1adaeca756a 100644 --- a/test/tap/legacy-no-auth-leak.js +++ b/test/tap/legacy-no-auth-leak.js @@ -1,8 +1,7 @@ 'use strict' var test = require('tap').test var common = require('../common-tap.js') -var path = require('path') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir diff --git a/test/tap/legacy-platform-all.js b/test/tap/legacy-platform-all.js index 2bfb19a45782b..4c25eb4083d97 100644 --- a/test/tap/legacy-platform-all.js +++ b/test/tap/legacy-platform-all.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-platform-all') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/test/tap/legacy-platform.js b/test/tap/legacy-platform.js index 4e94148b21309..619d2e4330c59 100644 --- a/test/tap/legacy-platform.js +++ b/test/tap/legacy-platform.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-platform') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/test/tap/legacy-private.js b/test/tap/legacy-private.js index 5e7817bf6a13a..44a1094cd0cc6 100644 --- a/test/tap/legacy-private.js +++ b/test/tap/legacy-private.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-private') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/test/tap/legacy-test-package.js b/test/tap/legacy-test-package.js index d94666b43e2e4..3c807e50491c7 100644 --- a/test/tap/legacy-test-package.js +++ b/test/tap/legacy-test-package.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-test-package') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-test-package') diff --git a/test/tap/lifecycle-INIT_CWD.js b/test/tap/lifecycle-INIT_CWD.js index eec5c266eec98..e035cf86d4033 100644 --- a/test/tap/lifecycle-INIT_CWD.js +++ b/test/tap/lifecycle-INIT_CWD.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'lifecycle-initcwd') +var pkg = common.pkg var subdir = path.resolve(pkg, 'subdir') var json = { diff --git a/test/tap/lifecycle-order.js b/test/tap/lifecycle-order.js index 903e1945d1e91..8f2b2ba4a70b8 100644 --- a/test/tap/lifecycle-order.js +++ b/test/tap/lifecycle-order.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var json = { name: 'lifecycle-order', diff --git a/test/tap/link.js b/test/tap/link.js index 88f3caed791fc..f0339194a2626 100644 --- a/test/tap/link.js +++ b/test/tap/link.js @@ -8,11 +8,11 @@ var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var link = path.join(__dirname, 'link') -var linkScoped = path.join(__dirname, 'link-scoped') -var linkInstall = path.join(__dirname, 'link-install') +var link = path.join(common.pkg, 'link') +var linkScoped = path.join(common.pkg, 'link-scoped') +var linkInstall = path.join(common.pkg, 'link-install') var linkInside = path.join(linkInstall, 'node_modules', 'inside') -var linkRoot = path.join(__dirname, 'link-root') +var linkRoot = path.join(common.pkg, 'link-root') var config = 'prefix = ' + linkRoot var configPath = path.join(link, '_npmrc') diff --git a/test/tap/local-args-relative-to-cwd.js b/test/tap/local-args-relative-to-cwd.js index 6c424bf67f123..de95516e2893e 100644 --- a/test/tap/local-args-relative-to-cwd.js +++ b/test/tap/local-args-relative-to-cwd.js @@ -6,7 +6,7 @@ var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/test/tap/locker.js b/test/tap/locker.js index 8c548095f7f54..5ee64196fe980 100644 --- a/test/tap/locker.js +++ b/test/tap/locker.js @@ -10,7 +10,8 @@ var locker = require('../../lib/utils/locker.js') var lock = locker.lock var unlock = locker.unlock -var pkg = path.join(__dirname, '/locker') +const common = require('../common-tap.js') +var pkg = common.pkg var cache = path.join(pkg, '/cache') var tmp = path.join(pkg, '/tmp') var nm = path.join(pkg, '/node_modules') diff --git a/test/tap/lockfile-http-deps.js b/test/tap/lockfile-http-deps.js index a614daf139d22..aaa47f5de6d3e 100644 --- a/test/tap/lockfile-http-deps.js +++ b/test/tap/lockfile-http-deps.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/logout-scoped.js b/test/tap/logout-scoped.js index db993204789f3..114cc09da7382 100644 --- a/test/tap/logout-scoped.js +++ b/test/tap/logout-scoped.js @@ -8,15 +8,14 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'logout') +var pkg = common.pkg var outfile = path.join(pkg, '_npmrc') var opts = { cwd: pkg } -var contents = function () { /* -foo=boo -@bar:registry=http://localhost:1337 -//localhost:1337/:_authToken=glarb -*/ }.toString().split('\n').slice(1, -1).join('\n') +var contents = `foo=boo +@bar:registry=http://localhost:${common.port} +//localhost:${common.port}/:_authToken=glarb +` function mocks (server) { server.delete('/-/user/token/glarb') diff --git a/test/tap/logout.js b/test/tap/logout.js index d62cb4fffc28b..9218b4bf6f1ca 100644 --- a/test/tap/logout.js +++ b/test/tap/logout.js @@ -8,14 +8,13 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'logout') +var pkg = common.pkg var outfile = path.join(pkg, '_npmrc') var opts = { cwd: pkg } -var contents = function () { /* -foo=boo -//localhost:1337/:_authToken=glarb -*/ }.toString().split('\n').slice(1, -1).join('\n') +var contents = `foo=boo +//localhost:${common.port}/:_authToken=glarb +` function mocks (server) { server.delete('/-/user/token/glarb') diff --git a/test/tap/ls-depth-cli.js b/test/tap/ls-depth-cli.js index 7fd4a467d612f..6bb2f3cd124f7 100644 --- a/test/tap/ls-depth-cli.js +++ b/test/tap/ls-depth-cli.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth-cli') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, @@ -117,7 +117,7 @@ test('npm ls --depth=0 --json', function (t) { 'dependencies': { 'test-package-with-one-dep': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz' + 'resolved': 'http://localhost:' + common.port + '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz' } } }) @@ -141,11 +141,11 @@ test('npm ls --depth=Infinity --json', function (t) { 'dependencies': { 'test-package-with-one-dep': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz', + 'resolved': 'http://localhost:' + common.port + '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz', 'dependencies': { 'test-package': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package/-/test-package-0.0.0.tgz' + 'resolved': 'http://localhost:' + common.port + '/test-package/-/test-package-0.0.0.tgz' } } } diff --git a/test/tap/ls-depth-unmet.js b/test/tap/ls-depth-unmet.js index 4fd6740d6a58c..7a2ed4dacc2a2 100644 --- a/test/tap/ls-depth-unmet.js +++ b/test/tap/ls-depth-unmet.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth-unmet') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/ls-env.js b/test/tap/ls-env.js index 29058d9245836..e3fbece3b04a1 100644 --- a/test/tap/ls-env.js +++ b/test/tap/ls-env.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/ls-l-depth-0.js b/test/tap/ls-l-depth-0.js index e9c2374aad1d7..8459bd52032cb 100644 --- a/test/tap/ls-l-depth-0.js +++ b/test/tap/ls-l-depth-0.js @@ -10,7 +10,7 @@ var tmpdir = require('osenv').tmpdir var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'ls-l-depth-0') +var pkg = common.pkg var dep = resolve(pkg, 'deps', 'glock') var modules = resolve(pkg, 'node_modules') diff --git a/test/tap/ls-peer.js b/test/tap/ls-peer.js index 826380932a147..fd53d37be62ec 100644 --- a/test/tap/ls-peer.js +++ b/test/tap/ls-peer.js @@ -6,7 +6,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/ls-production-and-dev.js b/test/tap/ls-production-and-dev.js index 5fc0b776e3337..a39e643786f09 100644 --- a/test/tap/ls-production-and-dev.js +++ b/test/tap/ls-production-and-dev.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/ls-top-errors.js b/test/tap/ls-top-errors.js index 69b8b299c8171..79a466fb127a4 100644 --- a/test/tap/ls-top-errors.js +++ b/test/tap/ls-top-errors.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var pathModA = path.join(pkg, 'node_modules', 'moduleA') var pathModB = path.join(pkg, 'node_modules', 'moduleB') diff --git a/test/tap/ls.js b/test/tap/ls.js index acec723afbae0..b3bdbc613cbc8 100644 --- a/test/tap/ls.js +++ b/test/tap/ls.js @@ -3,7 +3,7 @@ var test = require('tap').test var path = require('path') var rimraf = require('rimraf') var common = require('../common-tap.js') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-files') var pkgpath = path.resolve(fixturepath, 'npm-test-ls') var Tacks = require('tacks') diff --git a/test/tap/nested-extraneous.js b/test/tap/nested-extraneous.js index 99d4bea5b9b1c..1764a41c75279 100644 --- a/test/tap/nested-extraneous.js +++ b/test/tap/nested-extraneous.js @@ -5,7 +5,7 @@ var fs = require('fs') var rimraf = require('rimraf') var path = require('path') -var pkg = path.resolve(__dirname, 'nested-extraneous') +var pkg = common.pkg var pj = { name: 'nested-extraneous', version: '1.2.3' diff --git a/test/tap/no-global-warns.js b/test/tap/no-global-warns.js index 304cf5bf54388..538ab8b359daf 100644 --- a/test/tap/no-global-warns.js +++ b/test/tap/no-global-warns.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var mockGlobal = path.join(base, 'global') var toInstall = path.join(base, 'to-install') diff --git a/test/tap/no-scan-full-global-dir.js b/test/tap/no-scan-full-global-dir.js index 6a9349d54d962..4ec403ddcaa44 100644 --- a/test/tap/no-scan-full-global-dir.js +++ b/test/tap/no-scan-full-global-dir.js @@ -6,12 +6,14 @@ var requireInject = require('require-inject') var osenv = require('osenv') var npm = require('../../lib/npm.js') +const common = require('../common-tap.js') +const pkg = common.pkg var packages = { - test: {package: {name: 'test'}, path: __dirname, children: ['abc', 'def', 'ghi', 'jkl']}, - abc: {package: {name: 'abc'}, path: path.join(__dirname, 'node_modules', 'abc')}, - def: {package: {name: 'def'}, path: path.join(__dirname, 'node_modules', 'def')}, - ghi: {package: {name: 'ghi'}, path: path.join(__dirname, 'node_modules', 'ghi')}, - jkl: {package: {name: 'jkl'}, path: path.join(__dirname, 'node_modules', 'jkl')} + test: {package: {name: 'test'}, path: pkg, children: ['abc', 'def', 'ghi', 'jkl']}, + abc: {package: {name: 'abc'}, path: path.join(pkg, 'node_modules', 'abc')}, + def: {package: {name: 'def'}, path: path.join(pkg, 'node_modules', 'def')}, + ghi: {package: {name: 'ghi'}, path: path.join(pkg, 'node_modules', 'ghi')}, + jkl: {package: {name: 'jkl'}, path: path.join(pkg, 'node_modules', 'jkl')} } var dirs = {} var files = {} @@ -67,7 +69,7 @@ test('installer', function (t) { } } - var inst = new TestInstaller(__dirname, false, ['def', 'abc']) + var inst = new TestInstaller(pkg, false, ['def', 'abc']) inst.loadCurrentTree(function () { var kids = inst.currentTree.children.map(function (child) { return child.package.name }) t.isDeeply(kids, ['abc', 'def']) @@ -92,7 +94,7 @@ test('uninstaller', function (t) { } } - var uninst = new TestUninstaller(__dirname, false, ['ghi', 'jkl']) + var uninst = new TestUninstaller(pkg, false, ['ghi', 'jkl']) uninst.loadCurrentTree(function () { var kids = uninst.currentTree.children.map(function (child) { return child.package.name }) t.isDeeply(kids, ['ghi', 'jkl']) diff --git a/test/tap/noargs-install-config-save.js b/test/tap/noargs-install-config-save.js index 12ccf86804b37..cb1af408abb5c 100644 --- a/test/tap/noargs-install-config-save.js +++ b/test/tap/noargs-install-config-save.js @@ -1,14 +1,12 @@ var common = require('../common-tap.js') var test = require('tap').test -var path = require('path') var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var mr = require('npm-registry-mock') -var pkg = path.resolve(process.env.npm_config_tmp || '/tmp', - 'noargs-install-config-save') +var pkg = common.pkg function writePackageJson () { rimraf.sync(pkg) @@ -73,6 +71,6 @@ test('updates the package.json (adds dependencies) with an argument', function ( }) test('cleanup', function (t) { - rimraf.sync(pkg + '/cache') + rimraf.sync(pkg) t.end() }) diff --git a/test/tap/node-modules-path-munge.js b/test/tap/node-modules-path-munge.js index fdca0393cc1d1..fb116806c8cbc 100644 --- a/test/tap/node-modules-path-munge.js +++ b/test/tap/node-modules-path-munge.js @@ -4,7 +4,7 @@ var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var path = require('path') -var dir = path.join(__dirname, 'my_node_modules') +var dir = path.join(common.pkg, 'my_node_modules') var script = process.platform === 'win32' ? 'echo %PATH%' : 'echo $PATH' t.test('setup', function (t) { diff --git a/test/tap/npm-api-not-loaded-error.js b/test/tap/npm-api-not-loaded-error.js index 48b71e5213a7c..8bf263503874e 100644 --- a/test/tap/npm-api-not-loaded-error.js +++ b/test/tap/npm-api-not-loaded-error.js @@ -1,8 +1,9 @@ var test = require('tap').test +const common = require('../common-tap.js') var npm = require('../..') var path = require('path') var rimraf = require('rimraf') -var npmrc = path.join(__dirname, 'npmrc') +var npmrc = path.join(common.pkg, 'npmrc') var fs = require('fs') test('setup', function (t) { diff --git a/test/tap/onload.js b/test/tap/onload.js index 8d2b6c743bab8..4750fa6f88c2a 100644 --- a/test/tap/onload.js +++ b/test/tap/onload.js @@ -2,13 +2,13 @@ var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var common = require('../common-tap.js') -var opts = { cwd: __dirname } +var opts = { cwd: common.pkg } var binDir = '../../node_modules/.bin' var fixture = path.resolve(__dirname, binDir) var onload = path.resolve(__dirname, '../fixtures/onload.js') test('setup', function (t) { - rimraf.sync(path.join(__dirname, 'node_modules')) + rimraf.sync(path.join(common.pkg, 'node_modules')) t.end() }) diff --git a/test/tap/optional-metadep-rollback-collision.js b/test/tap/optional-metadep-rollback-collision.js index 1c05d1ba5860e..51cc6367dded7 100644 --- a/test/tap/optional-metadep-rollback-collision.js +++ b/test/tap/optional-metadep-rollback-collision.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'optional-metadep-rollback-collision') +var pkg = common.pkg var deps = path.resolve(pkg, 'deps') var opdep = path.resolve(pkg, 'node_modules', 'opdep') var cache = path.resolve(pkg, 'cache') diff --git a/test/tap/outdated-color.js b/test/tap/outdated-color.js index 3a81d05a821b4..11c967650f3b0 100644 --- a/test/tap/outdated-color.js +++ b/test/tap/outdated-color.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'outdated-color') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/outdated-depth.js b/test/tap/outdated-depth.js index 91523405e89ad..5cf7c7edac9c4 100644 --- a/test/tap/outdated-depth.js +++ b/test/tap/outdated-depth.js @@ -10,7 +10,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'outdated-depth') +var pkg = common.pkg var json = { name: 'outdated-depth', diff --git a/test/tap/outdated-git.js b/test/tap/outdated-git.js index 2a595e5288934..3932330c99f34 100644 --- a/test/tap/outdated-git.js +++ b/test/tap/outdated-git.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var npm = require('../../') // config -var pkg = path.resolve(__dirname, 'outdated-git') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { name: 'outdated-git', diff --git a/test/tap/outdated-json.js b/test/tap/outdated-json.js index 39d54fb196c5b..e0040d0285f2f 100644 --- a/test/tap/outdated-json.js +++ b/test/tap/outdated-json.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'outdated-json') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/outdated-latest.js b/test/tap/outdated-latest.js index d72fd87176f16..e0b432a2105cd 100644 --- a/test/tap/outdated-latest.js +++ b/test/tap/outdated-latest.js @@ -7,7 +7,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/outdated-long.js b/test/tap/outdated-long.js index 976d416a13bb5..474df8031a50a 100644 --- a/test/tap/outdated-long.js +++ b/test/tap/outdated-long.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var npm = require('../../') // config -var pkg = path.resolve(__dirname, 'outdated-long') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/test/tap/outdated-symlink.js b/test/tap/outdated-symlink.js index 96d6f660e2100..86128338a7be7 100644 --- a/test/tap/outdated-symlink.js +++ b/test/tap/outdated-symlink.js @@ -8,7 +8,7 @@ const Symlink = Tacks.Symlink const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/outdated.js b/test/tap/outdated.js index 8b1907d95f942..1acb0ed687b5a 100644 --- a/test/tap/outdated.js +++ b/test/tap/outdated.js @@ -10,7 +10,7 @@ var npm = require('../../') var common = require('../common-tap.js') // config -var pkg = path.resolve(__dirname, 'outdated') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var originalLog diff --git a/test/tap/override-bundled.js b/test/tap/override-bundled.js index 493ebf4a5d7e5..7f87c0999fe06 100644 --- a/test/tap/override-bundled.js +++ b/test/tap/override-bundled.js @@ -8,7 +8,7 @@ var path = require('path') var common = require('../common-tap.js') var testname = path.basename(__filename, '.js') -var testdir = path.resolve(__dirname, testname) +var testdir = common.pkg var testmod = path.resolve(testdir, 'top-test') var testtgz = testmod + '-1.0.0.tgz' diff --git a/test/tap/owner.js b/test/tap/owner.js index 0be88284d9750..b4da383ee1023 100644 --- a/test/tap/owner.js +++ b/test/tap/owner.js @@ -5,7 +5,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var cachedir = path.join(basedir, 'cache') var server diff --git a/test/tap/pack-files-and-ignores.js b/test/tap/pack-files-and-ignores.js index 3bcb22c7fcbc9..4ef41cea64ce8 100644 --- a/test/tap/pack-files-and-ignores.js +++ b/test/tap/pack-files-and-ignores.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var fs = require('graceful-fs') var tar = require('tar') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-files') var targetpath = path.resolve(basepath, 'target') var Tacks = require('tacks') diff --git a/test/tap/pack-scoped.js b/test/tap/pack-scoped.js index 05b9d12a83319..29d9aab478b8f 100644 --- a/test/tap/pack-scoped.js +++ b/test/tap/pack-scoped.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'scoped_package') +var pkg = common.pkg var manifest = join(pkg, 'package.json') var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/test/tap/pack.js b/test/tap/pack.js index 1813f47bf46a5..7aa42d48370a9 100644 --- a/test/tap/pack.js +++ b/test/tap/pack.js @@ -12,7 +12,7 @@ const Tacks = require('tacks') const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, 'pkg') +const testDir = common.pkg const tmp = path.join(testDir, 'tmp') const cache = path.join(testDir, 'cache') diff --git a/test/tap/peer-deps.js b/test/tap/peer-deps.js index b516818da1f39..20cbf5d1ded04 100644 --- a/test/tap/peer-deps.js +++ b/test/tap/peer-deps.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'peer-deps') +var pkg = common.pkg var expected = [ 'peer dep missing: request@0.9.x, required by npm-test-peer-deps@0.0.0' ] diff --git a/test/tap/ping.js b/test/tap/ping.js index 3562f25a3be97..3687b05bd4518 100644 --- a/test/tap/ping.js +++ b/test/tap/ping.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'ping') +var pkg = common.pkg var opts = { cwd: pkg } var outfile = path.join(pkg, '_npmrc') diff --git a/test/tap/prepare.js b/test/tap/prepare.js index f179c5267275a..54edf7cb19bc8 100644 --- a/test/tap/prepare.js +++ b/test/tap/prepare.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'prepare_package') +var pkg = common.pkg var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/test/tap/prepublish-only.js b/test/tap/prepublish-only.js index 0d2d31589d7b5..9996479da442a 100644 --- a/test/tap/prepublish-only.js +++ b/test/tap/prepublish-only.js @@ -10,7 +10,7 @@ var path = require('path') var common = require('../common-tap') -var pkg = join(__dirname, 'prepublish_package') +var pkg = common.pkg var cachedir = join(pkg, 'cache') var tmpdir = join(pkg, 'tmp') diff --git a/test/tap/prepublish.js b/test/tap/prepublish.js index c71455a2480cc..5628f94db3884 100644 --- a/test/tap/prepublish.js +++ b/test/tap/prepublish.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'prepublish_package') +var pkg = common.pkg var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/test/tap/progress-config.js b/test/tap/progress-config.js index 94d9b15f1b389..1f1e1a0c225ed 100644 --- a/test/tap/progress-config.js +++ b/test/tap/progress-config.js @@ -1,9 +1,9 @@ 'use strict' -var path = require('path') var test = require('tap').test var log = require('npmlog') var fs = require('graceful-fs') -var configName = path.join(__dirname, path.basename(__filename, '.js')) + '-npmrc' +const common = require('../common-tap.js') +var configName = common.pkg + '-npmrc' // We use requireInject to get a fresh copy of // the npm singleton each time we require it. diff --git a/test/tap/prune-dev-dep-cycle.js b/test/tap/prune-dev-dep-cycle.js index 5ccabdc1c95f0..e226ac6d32f68 100644 --- a/test/tap/prune-dev-dep-cycle.js +++ b/test/tap/prune-dev-dep-cycle.js @@ -1,12 +1,11 @@ 'use strict' var fs = require('fs') -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/test/tap/prune-dev-dep-with-bins.js b/test/tap/prune-dev-dep-with-bins.js index 686b5d8d6da4c..a75652f9a177c 100644 --- a/test/tap/prune-dev-dep-with-bins.js +++ b/test/tap/prune-dev-dep-with-bins.js @@ -1,12 +1,11 @@ 'use strict' var fs = require('fs') -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/test/tap/prune-with-dev-dep-duplicate.js b/test/tap/prune-with-dev-dep-duplicate.js index bfe902b1d3c5b..7efea5c01e619 100644 --- a/test/tap/prune-with-dev-dep-duplicate.js +++ b/test/tap/prune-with-dev-dep-duplicate.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'prune') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/test/tap/prune-with-only-dev-deps.js b/test/tap/prune-with-only-dev-deps.js index dce9497e517ff..c8e87a53569a9 100644 --- a/test/tap/prune-with-only-dev-deps.js +++ b/test/tap/prune-with-only-dev-deps.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'prune') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/test/tap/prune.js b/test/tap/prune.js index 4fe586359e054..6e033ceae00f2 100644 --- a/test/tap/prune.js +++ b/test/tap/prune.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/test/tap/publish-access-scoped.js b/test/tap/publish-access-scoped.js index 17339cedfda33..31b1bed26c830 100644 --- a/test/tap/publish-access-scoped.js +++ b/test/tap/publish-access-scoped.js @@ -8,7 +8,7 @@ var mr = require('npm-registry-mock') var common = require('../common-tap') var server -var pkg = path.join(__dirname, 'publish-access') +var pkg = common.pkg test('setup', function (t) { mr({port: common.port, throwOnUnmatched: true}, function (err, s) { diff --git a/test/tap/publish-access-unscoped-restricted-fails.js b/test/tap/publish-access-unscoped-restricted-fails.js index 660d0f48d7d5a..f615fa60f2450 100644 --- a/test/tap/publish-access-unscoped-restricted-fails.js +++ b/test/tap/publish-access-unscoped-restricted-fails.js @@ -6,7 +6,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'publish-access-unscoped') +var pkg = common.pkg test('setup', function (t) { mkdirp.sync(pkg) diff --git a/test/tap/publish-access-unscoped.js b/test/tap/publish-access-unscoped.js index 1766f61f4f93d..a2489e2bcaf4b 100644 --- a/test/tap/publish-access-unscoped.js +++ b/test/tap/publish-access-unscoped.js @@ -8,7 +8,7 @@ var mr = require('npm-registry-mock') var common = require('../common-tap') var server -var pkg = path.join(__dirname, 'publish-access-unscoped') +var pkg = common.pkg test('setup', function (t) { mr({port: common.port, throwOnUnmatched: true}, function (err, s) { diff --git a/test/tap/publish-config.js b/test/tap/publish-config.js index 14fd40311a7c0..705ef7ae7a2ca 100644 --- a/test/tap/publish-config.js +++ b/test/tap/publish-config.js @@ -17,9 +17,9 @@ fs.writeFileSync(pkg + '/package.json', JSON.stringify({ }), 'utf8') fs.writeFileSync(pkg + '/fixture_npmrc', - '//localhost:1337/:email = fancy@feast.net\n' + - '//localhost:1337/:username = fancy\n' + - '//localhost:1337/:_password = ' + Buffer.from('feast').toString('base64')) + '//localhost:' + common.port + '/:email = fancy@feast.net\n' + + '//localhost:' + common.port + '/:username = fancy\n' + + '//localhost:' + common.port + '/:_password = ' + Buffer.from('feast').toString('base64')) test(function (t) { let child diff --git a/test/tap/publish-invalid-semver-tag.js b/test/tap/publish-invalid-semver-tag.js index 21543869a5ca6..400030908b21c 100644 --- a/test/tap/publish-invalid-semver-tag.js +++ b/test/tap/publish-invalid-semver-tag.js @@ -9,7 +9,7 @@ var mr = require('npm-registry-mock') var osenv = require('osenv') -var PKG_DIR = path.resolve(__dirname, 'publish-invalid-semver-tag') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var DEFAULT_PKG = { diff --git a/test/tap/publish-scoped.js b/test/tap/publish-scoped.js index b8fe0ae2f6902..efa86c85391d0 100644 --- a/test/tap/publish-scoped.js +++ b/test/tap/publish-scoped.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') var mr = require('npm-registry-mock') -var pkg = path.join(__dirname, 'prepublish_package') +var pkg = common.pkg var server @@ -42,9 +42,9 @@ test('npm publish should honor scoping', function (t) { 'progress=false', 'cache=' + path.join(pkg, 'cache'), 'registry=http://nonexistent.lvh.me', - '//localhost:1337/:username=username', - '//localhost:1337/:_password=' + Buffer.from('password').toString('base64'), - '//localhost:1337/:email=' + 'ogd@aoaioxxysz.net', + '//localhost:' + common.port + '/:username=username', + '//localhost:' + common.port + '/:_password=' + Buffer.from('password').toString('base64'), + '//localhost:' + common.port + '/:email=' + 'ogd@aoaioxxysz.net', '@bigco:registry=' + common.registry ] var configFile = path.join(pkg, '.npmrc') diff --git a/test/tap/publish.js b/test/tap/publish.js index 765cfb07c6c82..39000faeac591 100644 --- a/test/tap/publish.js +++ b/test/tap/publish.js @@ -10,7 +10,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const testDir = path.join(__dirname, 'publish_test_package') +const testDir = common.pkg function setup () { cleanup() diff --git a/test/tap/repo.js b/test/tap/repo.js index 54907f620c77e..0ee50af192cb1 100644 --- a/test/tap/repo.js +++ b/test/tap/repo.js @@ -5,16 +5,17 @@ var test = require('tap').test var rimraf = require('rimraf') var fs = require('fs') var path = require('path') -var fakeBrowser = path.join(__dirname, '_script.sh') -var outFile = path.join(__dirname, '/_output') - -var opts = { cwd: __dirname } +var fakeBrowser = path.join(common.pkg, '_script.sh') +var outFile = path.join(common.pkg, '_output') +var opts = { cwd: common.pkg } +var mkdirp = require('mkdirp') common.pendIfWindows('This is trickier to convert without opening new shells') test('setup', function (t) { + mkdirp.sync(common.pkg) var s = '#!/usr/bin/env bash\n' + - 'echo "$@" > ' + JSON.stringify(__dirname) + '/_output\n' + 'echo "$@" > ' + JSON.stringify(common.pkg) + '/_output\n' fs.writeFileSync(fakeBrowser, s, 'ascii') fs.chmodSync(fakeBrowser, '0755') t.pass('made script') diff --git a/test/tap/retry-on-stale-cache.js b/test/tap/retry-on-stale-cache.js index 8aec35ed4f44d..129c52c160d0e 100644 --- a/test/tap/retry-on-stale-cache.js +++ b/test/tap/retry-on-stale-cache.js @@ -7,7 +7,7 @@ var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File -var workdir = path.join(__dirname, path.basename(__filename, '.js')) +var workdir = common.pkg var cachedir = path.join(workdir, 'cache') var modulesdir = path.join(workdir, 'modules') var oldModule = path.join(modulesdir, 'good-night-0.1.0.tgz') diff --git a/test/tap/run-script-filter-private.js b/test/tap/run-script-filter-private.js index 631759c13a733..31f1912fd103a 100644 --- a/test/tap/run-script-filter-private.js +++ b/test/tap/run-script-filter-private.js @@ -7,7 +7,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'run-script-filter-private') +var pkg = common.pkg var opts = { cwd: pkg } diff --git a/test/tap/run-script.js b/test/tap/run-script.js index f50a9632851a0..a937abadf2c1a 100644 --- a/test/tap/run-script.js +++ b/test/tap/run-script.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'run-script') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var tmp = path.resolve(pkg, 'tmp') diff --git a/test/tap/save-optional.js b/test/tap/save-optional.js index 66e430dc78b71..c293401f527cb 100644 --- a/test/tap/save-optional.js +++ b/test/tap/save-optional.js @@ -8,7 +8,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/scope-header.js b/test/tap/scope-header.js index 3eb70f132e669..f291b3a500964 100644 --- a/test/tap/scope-header.js +++ b/test/tap/scope-header.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var withScope = path.join(testdir, 'with-scope') var withoutScope = path.join(testdir, 'without-scope') diff --git a/test/tap/scripts-whitespace-windows.js b/test/tap/scripts-whitespace-windows.js index 4d1e53a8f5a5d..9378564bb52bc 100644 --- a/test/tap/scripts-whitespace-windows.js +++ b/test/tap/scripts-whitespace-windows.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'scripts-whitespace-windows') +var pkg = common.pkg var tmp = path.resolve(pkg, 'tmp') var cache = path.resolve(pkg, 'cache') var dep = path.resolve(pkg, 'dep') diff --git a/test/tap/search.all-package-search.js b/test/tap/search.all-package-search.js index 51c1ffcf90157..419e4fdeed691 100644 --- a/test/tap/search.all-package-search.js +++ b/test/tap/search.all-package-search.js @@ -14,7 +14,7 @@ const {File} = Tacks const common = require('../common-tap.js') -const PKG_DIR = path.resolve(__dirname, 'search') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') const cachePath = path.join(cacheBase, '.cache.json') diff --git a/test/tap/search.js b/test/tap/search.js index bbd293c3a1a3f..70d17e5469d47 100644 --- a/test/tap/search.js +++ b/test/tap/search.js @@ -14,7 +14,7 @@ const File = Tacks.File const common = require('../common-tap.js') -const PKG_DIR = path.resolve(__dirname, 'search') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') const cachePath = path.join(cacheBase, '.cache.json') diff --git a/test/tap/shared-linked.js b/test/tap/shared-linked.js index 3ee00e063d4c8..bb2d9bd459aa3 100644 --- a/test/tap/shared-linked.js +++ b/test/tap/shared-linked.js @@ -8,7 +8,7 @@ var Dir = Tacks.Dir var common = require('../common-tap.js') var mr = require('npm-registry-mock') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var bugdir = path.join(testdir, 'modules', 'bug') // This is an absolutely minimal version of the optimist included with diff --git a/test/tap/shrinkwrap-_auth.js b/test/tap/shrinkwrap-_auth.js index 5aff86fb08f80..156bd9667cb83 100644 --- a/test/tap/shrinkwrap-_auth.js +++ b/test/tap/shrinkwrap-_auth.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') diff --git a/test/tap/shrinkwrap-default-dev.js b/test/tap/shrinkwrap-default-dev.js index 48f9f2a90af90..9ff998fa4846f 100644 --- a/test/tap/shrinkwrap-default-dev.js +++ b/test/tap/shrinkwrap-default-dev.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/shrinkwrap-dev-dependency.js b/test/tap/shrinkwrap-dev-dependency.js index 79d3b7cd0fe46..8006aa9ea8a81 100644 --- a/test/tap/shrinkwrap-dev-dependency.js +++ b/test/tap/shrinkwrap-dev-dependency.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-dev-dependency') +var pkg = common.pkg var opts = [ '--cache', path.resolve(pkg, 'cache'), diff --git a/test/tap/shrinkwrap-empty-deps.js b/test/tap/shrinkwrap-empty-deps.js index eeb5e656ef20c..af9b4810afaf6 100644 --- a/test/tap/shrinkwrap-empty-deps.js +++ b/test/tap/shrinkwrap-empty-deps.js @@ -9,7 +9,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const pkg = path.resolve(__dirname, 'shrinkwrap-empty-deps') +const pkg = common.pkg const EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/shrinkwrap-extra-metadata.js b/test/tap/shrinkwrap-extra-metadata.js index dd7f85ee827ed..a5ff721a7a816 100644 --- a/test/tap/shrinkwrap-extra-metadata.js +++ b/test/tap/shrinkwrap-extra-metadata.js @@ -10,7 +10,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const pkg = path.join(__dirname, path.basename(__filename, '.js')) +const pkg = common.pkg const json = { author: 'Rockbert', diff --git a/test/tap/shrinkwrap-global-auth.js b/test/tap/shrinkwrap-global-auth.js index 76fa0a4662bf5..e860abd2fe1a8 100644 --- a/test/tap/shrinkwrap-global-auth.js +++ b/test/tap/shrinkwrap-global-auth.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') diff --git a/test/tap/shrinkwrap-lifecycle-cwd.js b/test/tap/shrinkwrap-lifecycle-cwd.js index bc9ab9cf11d5b..203c2165ebe60 100644 --- a/test/tap/shrinkwrap-lifecycle-cwd.js +++ b/test/tap/shrinkwrap-lifecycle-cwd.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/shrinkwrap-lifecycle.js b/test/tap/shrinkwrap-lifecycle.js index 8c0f36e3bb84f..5ed35e186843b 100644 --- a/test/tap/shrinkwrap-lifecycle.js +++ b/test/tap/shrinkwrap-lifecycle.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-lifecycle') +var pkg = common.pkg test('npm shrinkwrap execution order', function (t) { setup() diff --git a/test/tap/shrinkwrap-local-dependency.js b/test/tap/shrinkwrap-local-dependency.js index d1c33b99a5a0b..d737b10bb6b97 100644 --- a/test/tap/shrinkwrap-local-dependency.js +++ b/test/tap/shrinkwrap-local-dependency.js @@ -8,7 +8,7 @@ var unixFormatPath = require('../../lib/utils/unix-format-path.js') var File = Tacks.File var Dir = Tacks.Dir -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = path.resolve(testdir, 'cache') var config = ['--cache=' + cachedir, '--loglevel=error'] diff --git a/test/tap/shrinkwrap-nested.js b/test/tap/shrinkwrap-nested.js index 44d0cb0b2fb34..bace44d01aa42 100644 --- a/test/tap/shrinkwrap-nested.js +++ b/test/tap/shrinkwrap-nested.js @@ -8,7 +8,7 @@ var fs = require('fs') var path = require('path') var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var modAtgz = path.resolve(testdir, 'modA') + '-1.0.0.tgz' var modB1tgz = path.resolve(testdir, 'modB') + '-1.0.0.tgz' var modB2tgz = path.resolve(testdir, 'modB') + '-2.0.0.tgz' diff --git a/test/tap/shrinkwrap-optional-dependency.js b/test/tap/shrinkwrap-optional-dependency.js index 5085dd0cbb49c..f2c853ac4b9a7 100644 --- a/test/tap/shrinkwrap-optional-dependency.js +++ b/test/tap/shrinkwrap-optional-dependency.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'shrinkwrap-optional-dependency') +var pkg = common.pkg test('shrinkwrap does not fail on missing optional dependency', function (t) { t.plan(1) diff --git a/test/tap/shrinkwrap-optional-platform.js b/test/tap/shrinkwrap-optional-platform.js index b109d89578150..d6a3c41b516f1 100644 --- a/test/tap/shrinkwrap-optional-platform.js +++ b/test/tap/shrinkwrap-optional-platform.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/shrinkwrap-optional-property.js b/test/tap/shrinkwrap-optional-property.js index ccff5a93e2e38..84bc5cb258281 100644 --- a/test/tap/shrinkwrap-optional-property.js +++ b/test/tap/shrinkwrap-optional-property.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'shrinkwrap-optional-dependency') +var pkg = common.pkg test('shrinkwrap adds optional property when optional dependency', function (t) { t.plan(1) @@ -58,7 +58,7 @@ var desired = { }, 'underscore': { version: '1.3.3', - resolved: 'http://localhost:1337/underscore/-/underscore-1.3.3.tgz', + resolved: 'http://localhost:' + common.port + '/underscore/-/underscore-1.3.3.tgz', optional: true, integrity: 'sha1-R6xTaD2vgyv6lS4XdEF9pHgXrkI=' } diff --git a/test/tap/shrinkwrap-prod-dependency-also.js b/test/tap/shrinkwrap-prod-dependency-also.js index 6cc388946e406..94f3c4ac9012a 100644 --- a/test/tap/shrinkwrap-prod-dependency-also.js +++ b/test/tap/shrinkwrap-prod-dependency-also.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var opts = [ '--cache=' + path.resolve(pkg, 'cache'), '--registry=' + common.registry diff --git a/test/tap/shrinkwrap-prod-dependency.js b/test/tap/shrinkwrap-prod-dependency.js index 34e30d7c7a987..eb04db9ca138c 100644 --- a/test/tap/shrinkwrap-prod-dependency.js +++ b/test/tap/shrinkwrap-prod-dependency.js @@ -10,7 +10,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-prod-dependency') +var pkg = common.pkg test("shrinkwrap --dev doesn't strip out prod dependencies", function (t) { t.plan(1) diff --git a/test/tap/shrinkwrap-resolve-conflict.js b/test/tap/shrinkwrap-resolve-conflict.js index 146d1191bf5ae..d1f63f7e62661 100644 --- a/test/tap/shrinkwrap-resolve-conflict.js +++ b/test/tap/shrinkwrap-resolve-conflict.js @@ -12,7 +12,7 @@ const Tacks = require('tacks') const File = Tacks.File const Dir = Tacks.Dir -const testDir = path.resolve(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const modAdir = path.resolve(testDir, 'modA') const modBdir = path.resolve(testDir, 'modB') const modCdir = path.resolve(testDir, 'modC') diff --git a/test/tap/shrinkwrap-save-dev-with-existing-deps.js b/test/tap/shrinkwrap-save-dev-with-existing-deps.js index 5934a758da27a..a71408e54f5ab 100644 --- a/test/tap/shrinkwrap-save-dev-with-existing-deps.js +++ b/test/tap/shrinkwrap-save-dev-with-existing-deps.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installme = path.join(base, 'installme') var installme_pkg = path.join(installme, 'package.json') var example = path.join(base, 'example') diff --git a/test/tap/shrinkwrap-save-with-existing-dev-deps.js b/test/tap/shrinkwrap-save-with-existing-dev-deps.js index 5f0eb07962276..fcbbeeffddf4d 100644 --- a/test/tap/shrinkwrap-save-with-existing-dev-deps.js +++ b/test/tap/shrinkwrap-save-with-existing-dev-deps.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installme = path.join(base, 'installme') var installme_pkg = path.join(installme, 'package.json') var example = path.join(base, 'example') diff --git a/test/tap/shrinkwrap-scoped-auth.js b/test/tap/shrinkwrap-scoped-auth.js index 72c3b5119853a..3098b8aa12e93 100644 --- a/test/tap/shrinkwrap-scoped-auth.js +++ b/test/tap/shrinkwrap-scoped-auth.js @@ -14,7 +14,7 @@ var test = require('tap').test var common = require('../common-tap.js') var toNerfDart = require('../../lib/config/nerf-dart.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') var tarballPath = '/scoped-underscore/-/scoped-underscore-1.3.1.tgz' diff --git a/test/tap/shrinkwrap-shared-dev-dependency.js b/test/tap/shrinkwrap-shared-dev-dependency.js index 8960c0926154c..6a4ceb1970ece 100644 --- a/test/tap/shrinkwrap-shared-dev-dependency.js +++ b/test/tap/shrinkwrap-shared-dev-dependency.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var opts = { env: common.newEnv().extend({ diff --git a/test/tap/shrinkwrap-version-match.js b/test/tap/shrinkwrap-version-match.js index 57906528f7be7..e579f84d4b3bd 100644 --- a/test/tap/shrinkwrap-version-match.js +++ b/test/tap/shrinkwrap-version-match.js @@ -7,7 +7,7 @@ var fs = require('fs') var path = require('path') var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var modAdir = path.resolve(testdir, 'modA') var modB1dir = path.resolve(testdir, 'modB@1') var modB2dir = path.resolve(testdir, 'modB@2') diff --git a/test/tap/sorted-package-json.js b/test/tap/sorted-package-json.js index 557f3dc53d272..d67b729f683e9 100644 --- a/test/tap/sorted-package-json.js +++ b/test/tap/sorted-package-json.js @@ -2,11 +2,11 @@ var test = require('tap').test var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, 'sorted-package-json') +var common = require('../common-tap.js') +var pkg = common.pkg var tmp = path.join(pkg, 'tmp') var cache = path.join(pkg, 'cache') var fs = require('fs') -var common = require('../common-tap.js') var mr = require('npm-registry-mock') var osenv = require('osenv') var packageJson = path.resolve(pkg, 'package.json') diff --git a/test/tap/spawn-enoent-help.js b/test/tap/spawn-enoent-help.js index d4a6fcdd832ad..cb7c942be8e7b 100644 --- a/test/tap/spawn-enoent-help.js +++ b/test/tap/spawn-enoent-help.js @@ -1,10 +1,9 @@ -var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'spawn-enoent-help') +var pkg = common.pkg common.pendIfWindows('man pages are not built on Windows') diff --git a/test/tap/spawn-enoent.js b/test/tap/spawn-enoent.js index c81460fdcff82..78153572eeb70 100644 --- a/test/tap/spawn-enoent.js +++ b/test/tap/spawn-enoent.js @@ -1,11 +1,10 @@ -var path = require('path') var test = require('tap').test var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'spawn-enoent') +var pkg = common.pkg var pj = JSON.stringify({ name: 'x', version: '1.2.3', diff --git a/test/tap/spec-local-specifiers.js b/test/tap/spec-local-specifiers.js index 3601eee5f3c5f..7b6cacf12cb69 100644 --- a/test/tap/spec-local-specifiers.js +++ b/test/tap/spec-local-specifiers.js @@ -11,7 +11,7 @@ var Dir = Tacks.Dir var common = require('../common-tap.js') var isWindows = require('../../lib/utils/is-windows.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/splat-with-only-prerelease-to-latest.js b/test/tap/splat-with-only-prerelease-to-latest.js index cf5aac110bd94..5720a2cdcedf4 100644 --- a/test/tap/splat-with-only-prerelease-to-latest.js +++ b/test/tap/splat-with-only-prerelease-to-latest.js @@ -8,7 +8,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const testdir = path.join(__dirname, path.basename(__filename, '.js')) +const testdir = common.pkg const moduleName = 'xyzzy-wibble' const testModule = { diff --git a/test/tap/startstop.js b/test/tap/startstop.js index 0e9d2d94020b2..3491441821d92 100644 --- a/test/tap/startstop.js +++ b/test/tap/startstop.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'startstop') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/symlink-cycle.js b/test/tap/symlink-cycle.js index 5bee2c5569ab6..d59a2763bd19c 100644 --- a/test/tap/symlink-cycle.js +++ b/test/tap/symlink-cycle.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var cycle = path.join(base, 'cycle') var cycleJSON = { diff --git a/test/tap/tag-version-prefix.js b/test/tap/tag-version-prefix.js index 555de1af16518..b72255a226152 100644 --- a/test/tap/tag-version-prefix.js +++ b/test/tap/tag-version-prefix.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-message-config') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') diff --git a/test/tap/tagged-version-matching.js b/test/tap/tagged-version-matching.js index 55dfb7b7c4b1c..64522745c80e2 100644 --- a/test/tap/tagged-version-matching.js +++ b/test/tap/tagged-version-matching.js @@ -7,7 +7,7 @@ var Dir = Tacks.Dir var Symlink = Tacks.Symlink var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/tree-style.js b/test/tap/tree-style.js index 12fdb0bbd9ac4..5d8abef3698b2 100644 --- a/test/tap/tree-style.js +++ b/test/tap/tree-style.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var fs = require('graceful-fs') var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var modA = path.resolve(base, 'modA') var modB = path.resolve(base, 'modB') var modC = path.resolve(base, 'modC') diff --git a/test/tap/umask-lifecycle.js b/test/tap/umask-lifecycle.js index c4c323363775e..8b365d62335d7 100644 --- a/test/tap/umask-lifecycle.js +++ b/test/tap/umask-lifecycle.js @@ -1,5 +1,4 @@ var fs = require('fs') -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') @@ -9,7 +8,7 @@ var sprintf = require('sprintf-js').sprintf var escapeExecPath = require('../../lib/utils/escape-exec-path.js') var escapeArg = require('../../lib/utils/escape-arg.js') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'umask-lifecycle') +var pkg = common.pkg var nodeCmd = escapeExecPath(common.nodeBin) var npmCmd = nodeCmd + ' ' + escapeArg(common.bin) @@ -24,7 +23,7 @@ var pj = JSON.stringify({ var umask = process.umask() var expected = [ '', - '> x@1.2.3 umask ' + path.join(__dirname, 'umask-lifecycle'), + '> x@1.2.3 umask ' + pkg, '> ' + umaskScript, '', sprintf('%04o', umask), diff --git a/test/tap/uninstall-link-clean.js b/test/tap/uninstall-link-clean.js index 2b1d244d00fde..e21c370f603b7 100644 --- a/test/tap/uninstall-link-clean.js +++ b/test/tap/uninstall-link-clean.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var pkg = path.join(testdir, 'pkg') var dep = path.join(testdir, 'dep') var work = path.join(testdir, 'uninstall-link-clean-TEST') diff --git a/test/tap/uninstall-package.js b/test/tap/uninstall-package.js index 7cc7b1da1f8a8..56df2e17e41cb 100644 --- a/test/tap/uninstall-package.js +++ b/test/tap/uninstall-package.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'uninstall-package') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 'pipe', 2] } diff --git a/test/tap/uninstall-save.js b/test/tap/uninstall-save.js index 9bf342d7cf955..0605616e07f03 100644 --- a/test/tap/uninstall-save.js +++ b/test/tap/uninstall-save.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 'ignore', 2] } diff --git a/test/tap/unpack-foreign-tarball.js b/test/tap/unpack-foreign-tarball.js index d128e94d8c37d..a1649c24bd23f 100644 --- a/test/tap/unpack-foreign-tarball.js +++ b/test/tap/unpack-foreign-tarball.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var fixtures = path.resolve(__dirname, '..', 'fixtures') -var pkg = path.resolve(__dirname, 'unpack-foreign-tarball') +var pkg = common.pkg var nm = path.resolve(pkg, 'node_modules') var target = path.resolve(nm, 'npm-test-gitignore') var cache = path.resolve(pkg, 'cache') diff --git a/test/tap/unpublish-config.js b/test/tap/unpublish-config.js index f5d391d8c29b8..f358835561eee 100644 --- a/test/tap/unpublish-config.js +++ b/test/tap/unpublish-config.js @@ -7,10 +7,9 @@ var osenv = require('osenv') var rimraf = require('rimraf') var test = require('tap').test -var pkg = path.join(__dirname, 'npm-test-unpublish-config') -var fixturePath = path.join(pkg, 'fixture_npmrc') - var common = require('../common-tap.js') +var pkg = common.pkg +var fixturePath = path.join(pkg, 'fixture_npmrc') var json = { name: 'npm-test-unpublish-config', @@ -27,7 +26,7 @@ test('setup', function (t) { ) fs.writeFileSync( fixturePath, - '//localhost:1337/:_authToken = beeeeeeeeeeeeef\n' + + '//localhost:' + common.port + '/:_authToken = beeeeeeeeeeeeef\n' + 'registry = http://lvh.me:4321/registry/path\n' ) diff --git a/test/tap/update-examples.js b/test/tap/update-examples.js index 8369d002fab29..f0a7a6271dae9 100644 --- a/test/tap/update-examples.js +++ b/test/tap/update-examples.js @@ -9,7 +9,7 @@ var osenv = require('osenv') var requireInject = require('require-inject') -var PKG_DIR = path.resolve(__dirname, 'update-examples') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') // ** constant templates for mocks ** diff --git a/test/tap/update-symlink.js b/test/tap/update-symlink.js index 79139d306f5fd..a21a68267b542 100644 --- a/test/tap/update-symlink.js +++ b/test/tap/update-symlink.js @@ -8,7 +8,7 @@ const Symlink = Tacks.Symlink const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/upgrade-lifecycles.js b/test/tap/upgrade-lifecycles.js index 0d0b8da616f67..3adea06d71375 100644 --- a/test/tap/upgrade-lifecycles.js +++ b/test/tap/upgrade-lifecycles.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/url-dependencies.js b/test/tap/url-dependencies.js index 66b3e1a63b47c..2017151568e09 100644 --- a/test/tap/url-dependencies.js +++ b/test/tap/url-dependencies.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'url-dependencies') +var pkg = common.pkg var json = { author: 'Steve Mason', diff --git a/test/tap/verify-no-lifecycle-on-repo.js b/test/tap/verify-no-lifecycle-on-repo.js index babdfb7dace23..c9232715a7079 100644 --- a/test/tap/verify-no-lifecycle-on-repo.js +++ b/test/tap/verify-no-lifecycle-on-repo.js @@ -5,9 +5,9 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var test = require('tap').test var requireInject = require('require-inject') -require('../common-tap.js') +const common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var baseJSON = { name: 'base', diff --git a/test/tap/version-allow-same-version.js b/test/tap/version-allow-same-version.js index 66f568dec9721..fdd68032bc6b9 100644 --- a/test/tap/version-allow-same-version.js +++ b/test/tap/version-allow-same-version.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'version-allow-same-version') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-tag=false\n' diff --git a/test/tap/version-commit-hooks.js b/test/tap/version-commit-hooks.js index 4791fc3f3c4d2..568c82b46b039 100644 --- a/test/tap/version-commit-hooks.js +++ b/test/tap/version-commit-hooks.js @@ -3,7 +3,8 @@ var path = require('path') var osenv = require('osenv') var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = path.resolve(__dirname, 'version-commit-hooks') +const common = require('../common-tap.js') +var pkg = common.pkg var test = require('tap').test var npm = require('../../') diff --git a/test/tap/version-consistent-newlines.js b/test/tap/version-consistent-newlines.js index 11020b2a7004e..56b16afcf4b48 100644 --- a/test/tap/version-consistent-newlines.js +++ b/test/tap/version-consistent-newlines.js @@ -10,7 +10,7 @@ const mkdirp = require('mkdirp') const rimraf = require('rimraf') const requireInject = require('require-inject') -const pkg = path.resolve(__dirname, 'version-no-git') +const pkg = common.pkg const cache = path.resolve(pkg, 'cache') const gitDir = path.resolve(pkg, '.git') diff --git a/test/tap/version-from-git.js b/test/tap/version-from-git.js index 1dc649beb4212..759396a782191 100644 --- a/test/tap/version-from-git.js +++ b/test/tap/version-from-git.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-from-git') +var pkg = common.pkg var packagePath = path.resolve(pkg, 'package.json') var cache = path.resolve(pkg, 'cache') diff --git a/test/tap/version-git-not-clean.js b/test/tap/version-git-not-clean.js index 43e2549ceb280..b387c00e64de3 100644 --- a/test/tap/version-git-not-clean.js +++ b/test/tap/version-git-not-clean.js @@ -9,7 +9,7 @@ var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn -var pkg = path.resolve(__dirname, 'version-git-not-clean') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version with working directory not clean', function (t) { diff --git a/test/tap/version-lifecycle.js b/test/tap/version-lifecycle.js index e7a7793b44507..98c96b6826d4d 100644 --- a/test/tap/version-lifecycle.js +++ b/test/tap/version-lifecycle.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'version-lifecycle') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-commit=false\nsign-git-tag=false\n' diff --git a/test/tap/version-message-config.js b/test/tap/version-message-config.js index 12cb6eb59912d..db45809879733 100644 --- a/test/tap/version-message-config.js +++ b/test/tap/version-message-config.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-message-config') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') diff --git a/test/tap/version-no-git.js b/test/tap/version-no-git.js index 0a859c7af2170..dc1ee05662ff6 100644 --- a/test/tap/version-no-git.js +++ b/test/tap/version-no-git.js @@ -8,7 +8,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var requireInject = require('require-inject') -var pkg = path.resolve(__dirname, 'version-no-git') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var gitDir = path.resolve(pkg, '.git') diff --git a/test/tap/version-no-package.js b/test/tap/version-no-package.js index e4eeda0eebda0..1b16c9f758c8d 100644 --- a/test/tap/version-no-package.js +++ b/test/tap/version-no-package.js @@ -1,11 +1,10 @@ var common = require('../common-tap.js') var test = require('tap').test var osenv = require('osenv') -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = path.resolve(__dirname, 'version-no-package') +var pkg = common.pkg test('setup', function (t) { setup() diff --git a/test/tap/version-no-tags.js b/test/tap/version-no-tags.js index 755e640c0b31e..9e7b08c61fa12 100644 --- a/test/tap/version-no-tags.js +++ b/test/tap/version-no-tags.js @@ -9,7 +9,7 @@ var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn -var pkg = path.resolve(__dirname, 'version-no-tags') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version without git tag', function (t) { diff --git a/test/tap/version-prerelease-id.js b/test/tap/version-prerelease-id.js index 1a206aa116649..5e342667cdba2 100644 --- a/test/tap/version-prerelease-id.js +++ b/test/tap/version-prerelease-id.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'version-shrinkwrap') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/version-sub-directory-shrinkwrap.js b/test/tap/version-sub-directory-shrinkwrap.js index 0455b62ab7536..c6e607d7c5767 100644 --- a/test/tap/version-sub-directory-shrinkwrap.js +++ b/test/tap/version-sub-directory-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-sub-directory') +var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') var shrinkwrapPath = path.resolve(pkg, 'npm-shrinkwrap.json') diff --git a/test/tap/version-sub-directory.js b/test/tap/version-sub-directory.js index 71c96121ca7d7..a7eb8f1042089 100644 --- a/test/tap/version-sub-directory.js +++ b/test/tap/version-sub-directory.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-sub-directory') +var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') var cache = path.resolve(pkg, 'cache') diff --git a/test/tap/version-update-shrinkwrap.js b/test/tap/version-update-shrinkwrap.js index 58264e9926c03..47822f646ec7f 100644 --- a/test/tap/version-update-shrinkwrap.js +++ b/test/tap/version-update-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'version-shrinkwrap') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version updates shrinkwrap - no git', function (t) {