From e944109acbed6423a480f307e761b7d51b4e9f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Fri, 1 Dec 2017 16:45:03 -0800 Subject: [PATCH 01/16] Add eslint as a dev dependency --- package-lock.json | 1035 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 2 files changed, 1035 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 136640c..33602ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,139 @@ { "name": "tmp", - "version": "0.0.33", + "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { + "acorn": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz", + "integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "3.3.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "ajv": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.0.tgz", + "integrity": "sha1-6yhAdG6dxIvV4GOjbj/UAMXqtak=", + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "dev": true + }, + "ansi-escapes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -26,6 +156,106 @@ "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", "dev": true }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "commander": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", @@ -41,6 +271,34 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, "debug": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz", @@ -50,24 +308,253 @@ "ms": "0.7.2" } }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + } + }, "diff": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", "dev": true }, + "doctrine": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.2.tgz", + "integrity": "sha512-y0tm5Pq6ywp3qSTZ1vPgVdAnbDEoeoc5wlOHXoY1c4Wug/a7JvqHIl7BTvwodaHmejWkK/9dSb3sCYfyo/om8A==", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.12.1.tgz", + "integrity": "sha512-28hOYej+NZ/R5H1yMvyKa1+bPlu+fnsIAQffK6hxXgvmXnImos2bA5XfCn5dYv2k2mrKj+/U/Z4L5ICWxC7TQw==", + "dev": true, + "requires": { + "ajv": "5.5.0", + "babel-code-frame": "6.26.0", + "chalk": "2.3.0", + "concat-stream": "1.6.0", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.0.2", + "eslint-scope": "3.7.1", + "espree": "3.5.2", + "esquery": "1.0.0", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.0.1", + "ignore": "3.3.7", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.0.0", + "js-yaml": "3.10.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "require-uncached": "1.0.3", + "semver": "5.4.1", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.2", + "text-table": "0.2.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + } + }, + "espree": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.2.tgz", + "integrity": "sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ==", + "dev": true, + "requires": { + "acorn": "5.2.1", + "acorn-jsx": "3.0.1" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "esquery": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", + "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "dev": true, + "requires": { + "estraverse": "4.2.0", + "object-assign": "4.1.1" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "external-editor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", + "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", + "dev": true, + "requires": { + "chardet": "0.4.2", + "iconv-lite": "0.4.19", + "tmp": "0.0.33" + } + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "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", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", @@ -82,6 +569,32 @@ "path-is-absolute": "1.0.1" } }, + "globals": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.0.1.tgz", + "integrity": "sha1-Eqh7sBDlFUOWrMU14eQ/x1Ow5eg=", + "dev": true + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, "graceful-readlink": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", @@ -94,12 +607,39 @@ "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", "dev": true }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, "has-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -116,12 +656,135 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "requires": { + "ansi-escapes": "3.0.0", + "chalk": "2.3.0", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.1.0", + "figures": "2.0.0", + "lodash": "4.17.4", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + } + }, + "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 + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "1.0.1" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-resolvable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", + "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", + "dev": true, + "requires": { + "tryit": "1.0.3" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + } + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json3": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", "dev": true }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, "lodash._baseassign": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", @@ -190,6 +853,22 @@ "lodash.isarray": "3.0.4" } }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -239,6 +918,24 @@ "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", "dev": true }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "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 + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -248,6 +945,29 @@ "wrappy": "1.0.2" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "1.1.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + } + }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -259,6 +979,227 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "2.1.0" + } + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "4.0.8" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + } + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "supports-color": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", @@ -268,11 +1209,103 @@ "has-flag": "1.0.0" } }, + "table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "dev": true, + "requires": { + "ajv": "5.5.0", + "ajv-keywords": "2.1.1", + "chalk": "2.3.0", + "lodash": "4.17.4", + "slice-ansi": "1.0.0", + "string-width": "2.1.1" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "tryit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", + "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } } diff --git a/package.json b/package.json index 505dc51..277d0d4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "os-tmpdir": "~1.0.2" }, "devDependencies": { + "eslint": "^4.12.1", "mocha": "~3.4.2" }, "main": "lib/tmp.js", From 87d10be35135127e300a8f6a212a2ff194be4ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Fri, 1 Dec 2017 17:00:36 -0800 Subject: [PATCH 02/16] Add eslint-plugin-mocha --- .eslintrc.js | 3 +++ package-lock.json | 15 +++++++++++++++ package.json | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 02c4bd6..45d1d61 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,6 +3,9 @@ module.exports = { "es6": true, "node": true }, + "plugins": [ + "mocha" + ], "extends": "eslint:recommended", "rules": { "indent": [ diff --git a/package-lock.json b/package-lock.json index 33602ff..37ea1a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -426,6 +426,15 @@ } } }, + "eslint-plugin-mocha": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-4.11.0.tgz", + "integrity": "sha1-kRk6L1XiCl41l0BUoAidMBmO5Xg=", + "dev": true, + "requires": { + "ramda": "0.24.1" + } + }, "eslint-scope": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", @@ -1036,6 +1045,12 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "ramda": { + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz", + "integrity": "sha1-w7d1UZfzW43DUCIoJixMkd22uFc=", + "dev": true + }, "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", diff --git a/package.json b/package.json index 277d0d4..0bc7fdd 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ }, "devDependencies": { "eslint": "^4.12.1", + "eslint-plugin-mocha": "^4.11.0", "mocha": "~3.4.2" }, "main": "lib/tmp.js", @@ -33,7 +34,7 @@ "lib/" ], "scripts": { - "lint": "eslint lib test", + "lint": "eslint lib --env mocha test", "test": "mocha test/*-test.js", "doc": "jsdoc -c .jsdoc.json" } From 8d3f29bd16baf02f8db9d957336c6990709495ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Fri, 1 Dec 2017 17:01:05 -0800 Subject: [PATCH 03/16] Remove unused variable --- lib/tmp.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/tmp.js b/lib/tmp.js index 1175a4f..c475806 100644 --- a/lib/tmp.js +++ b/lib/tmp.js @@ -521,10 +521,6 @@ function setGracefulCleanup() { _gracefulCleanup = true; } -const version = process.versions.node.split('.').map(function (value) { - return parseInt(value, 10); -}); - /** * If there are multiple different versions of tmp in place, make sure that * we recognize the old listeners. From 39014329880baa1983d0d63dd6a180bdfff86b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Fri, 1 Dec 2017 17:01:39 -0800 Subject: [PATCH 04/16] Fix eslint issues in tests --- test/child-process.js | 2 +- test/inband-standard.js | 5 ++--- test/issue129-test.js | 4 ++-- test/name-inband-standard.js | 8 ++------ test/outband/graceful.js | 2 +- test/outband/issue115.js | 2 +- test/outband/issue129.js | 26 +++++++++++--------------- test/outband/issue62.js | 8 +++----- test/outband/keep.js | 2 +- test/outband/unlink.js | 2 +- test/outband/unsafe.js | 2 +- test/spawn.js | 4 ---- test/util.js | 2 +- 13 files changed, 27 insertions(+), 42 deletions(-) diff --git a/test/child-process.js b/test/child-process.js index 20c6c02..d652110 100644 --- a/test/child-process.js +++ b/test/child-process.js @@ -29,7 +29,7 @@ module.exports.childProcess = function spawnChildProcess(configFile, cb) { return cb(new Error('ENOENT: configFile ' + configFilePath + ' does not exist')); _do_spawn(command_args, cb); -} +}; function _do_spawn(command_args, cb) { var diff --git a/test/inband-standard.js b/test/inband-standard.js index 7a99b80..ef749af 100644 --- a/test/inband-standard.js +++ b/test/inband-standard.js @@ -33,7 +33,7 @@ function inbandStandardTests(testOpts, opts, isFile, beforeHook) { testOpts = testOpts || {}; // topic reference will be created by the beforeHook - topic = { topic: null, opts: opts }; + const topic = { topic: null, opts: opts }; // bind everything to topic so we avoid global before(beforeHook.bind(topic)); @@ -77,5 +77,4 @@ function inbandStandardTests(testOpts, opts, isFile, beforeHook) { assert.ok(!existsSync(this.topic.name)); }.bind(topic)); }; -}; - +} diff --git a/test/issue129-test.js b/test/issue129-test.js index 4380f0f..14a6679 100644 --- a/test/issue129-test.js +++ b/test/issue129-test.js @@ -9,7 +9,7 @@ var describe('tmp', function () { describe('issue129: safely install listeners', function () { it('when simulating sandboxed behavior', function (done) { - childProcess('issue129.json', function (err, stderr, stdout) { + childProcess('issue129.json', function (err, stderr) { if (err) return done(err); else if (stderr) { assertions.assertDoesNotStartWith(stderr, 'EEXISTS:LEGACY:EXIT'); @@ -20,9 +20,9 @@ describe('tmp', function () { assertions.assertDoesNotStartWith(stderr, 'ENOAVAIL:NEWSTYLE'); assert.equal(stderr, 'EOK', 'existing listeners should have been removed and called'); } + done(); }); }); }); }); - diff --git a/test/name-inband-standard.js b/test/name-inband-standard.js index 4445151..4d4cbb3 100644 --- a/test/name-inband-standard.js +++ b/test/name-inband-standard.js @@ -2,10 +2,7 @@ // vim: expandtab:ts=2:sw=2 var - assert = require('assert'), - fs = require('fs'), path = require('path'), - existsSync = fs.existsSync || path.existsSync, assertions = require('./assertions'), tmp = require('../lib/tmp'); @@ -24,7 +21,7 @@ function inbandStandardTests(testOpts, opts, beforeHook) { return function () { opts = opts || {}; testOpts = testOpts || {}; - topic = { topic: null, opts: opts }; + const topic = { topic: null, opts: opts }; // bind everything to topic so we avoid global before(beforeHook.bind(topic)); @@ -51,5 +48,4 @@ function inbandStandardTests(testOpts, opts, beforeHook) { }.bind(topic)); } }; -}; - +} diff --git a/test/outband/graceful.js b/test/outband/graceful.js index cd34818..f86bfd1 100644 --- a/test/outband/graceful.js +++ b/test/outband/graceful.js @@ -1,4 +1,4 @@ -module.exports = function (result, tmp) { +module.exports = function (result) { this.out(result.name, function () { throw new Error('(non-)graceful cleanup testing'); }); diff --git a/test/outband/issue115.js b/test/outband/issue115.js index f158d38..427f6ad 100644 --- a/test/outband/issue115.js +++ b/test/outband/issue115.js @@ -1,6 +1,6 @@ var fs = require('fs'); -module.exports = function (result, tmp) { +module.exports = function (result) { // creates a tmp file and then closes the file descriptor as per issue 115 // https://github.com/raszi/node-tmp/issues/115 fs.closeSync(result.fd); diff --git a/test/outband/issue129.js b/test/outband/issue129.js index 653e9a1..0d65547 100644 --- a/test/outband/issue129.js +++ b/test/outband/issue129.js @@ -1,18 +1,15 @@ /* eslint-disable no-octal */ // vim: expandtab:ts=2:sw=2 -var fs = require('fs'); - // https://github.com/raszi/node-tmp/issues/129 module.exports = function () { + // dup from lib/tmp.js + function _is_legacy_listener(listener) { + return (listener.name == '_exit' || listener.name == '_uncaughtExceptionThrown') + && listener.toString().indexOf('_garbageCollector();') != -1; + } -// dup from lib/tmp.js -function _is_legacy_listener(listener) { - return (listener.name == '_exit' || listener.name == '_uncaughtExceptionThrown') - && listener.toString().indexOf('_garbageCollector();') != -1; -} - -function _garbageCollector() {} + function _garbageCollector() {} var callState = { newStyleListener : false, @@ -22,7 +19,7 @@ function _garbageCollector() {} // simulate the new exit listener var listener1 = (function (callState) { - return function _tmp$safe_listener(data) { + return function _tmp$safe_listener() { _garbageCollector(); callState.newStyleListener = true; }; @@ -30,7 +27,7 @@ function _garbageCollector() {} // simulate the legacy _exit listener var listener2 = (function (callState) { - return function _exit(code) { + return function _exit() { _garbageCollector(); callState.legacyExitListener = true; }; @@ -38,18 +35,18 @@ function _garbageCollector() {} // simulate the legacy _uncaughtExceptionThrown listener var listener3 = (function (callState) { - return function _uncaughtExceptionThrown(err) { + return function _uncaughtExceptionThrown() { _garbageCollector(); callState.legacyUncaughtListener = true; }; })(callState); - process.addListener('exit', listener1); + process.addListener('exit', listener1); process.addListener('exit', listener2); process.addListener('exit', listener3); // now let tmp install its listener safely - var tmp = require('../../lib/tmp'); + require('../../lib/tmp'); var legacyExitListener = null; var legacyUncaughtListener = null; @@ -77,4 +74,3 @@ function _garbageCollector() {} if (!callState.newStyleListener) this.fail('ENOAVAIL:NEWSTYLE: existing new style listener was not called', this.exit); this.out('EOK', this.exit); }; - diff --git a/test/outband/issue62.js b/test/outband/issue62.js index 54fb944..3dffd60 100644 --- a/test/outband/issue62.js +++ b/test/outband/issue62.js @@ -1,8 +1,7 @@ -var - fs = require('fs'), - join = require('path').join; +var fs = require('fs'); +var join = require('path').join; -module.exports = function (result, tmp) { +module.exports = function (result) { // creates structure from issue 62 // https://github.com/raszi/node-tmp/issues/62 @@ -15,4 +14,3 @@ module.exports = function (result, tmp) { this.out(result.name, this.exit); }; - diff --git a/test/outband/keep.js b/test/outband/keep.js index 861458f..75dccea 100644 --- a/test/outband/keep.js +++ b/test/outband/keep.js @@ -1,3 +1,3 @@ -module.exports = function (result, tmp) { +module.exports = function (result) { this.out(result.name); }; diff --git a/test/outband/unlink.js b/test/outband/unlink.js index bda80d1..83efe58 100644 --- a/test/outband/unlink.js +++ b/test/outband/unlink.js @@ -1,6 +1,6 @@ const fs = require('fs'); -module.exports = function (result, tmp) { +module.exports = function (result) { const stat = fs.statSync(result.name); if (stat.isFile()) { fs.unlinkSync(result.name); diff --git a/test/outband/unsafe.js b/test/outband/unsafe.js index f37c4df..a4ed7e0 100644 --- a/test/outband/unsafe.js +++ b/test/outband/unsafe.js @@ -2,7 +2,7 @@ var fs = require('fs'), join = require('path').join; -module.exports = function (result, tmp) { +module.exports = function (result) { // file that should be removed var fd = fs.openSync(join(result.name, 'should-be-removed.file'), 'w'); fs.closeSync(fd); diff --git a/test/spawn.js b/test/spawn.js index 9635e94..5dfd87e 100644 --- a/test/spawn.js +++ b/test/spawn.js @@ -1,9 +1,5 @@ // vim: expandtab:ts=2:sw=2 -var - fs = require('fs'), - path = require('path'); - function _writeSync(stream, str, cb) { var flushed = stream.write(str); if (flushed) { diff --git a/test/util.js b/test/util.js index 0d399df..478148c 100644 --- a/test/util.js +++ b/test/util.js @@ -6,4 +6,4 @@ var module.exports.readJsonConfig = function readJsonConfig(path) { var contents = fs.readFileSync(path); return JSON.parse(contents); -} +}; From 30f970d873523ca1679a5a307f1dad537dc13168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Fri, 1 Dec 2017 17:03:31 -0800 Subject: [PATCH 05/16] Make sure that linter runs before the tests --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0bc7fdd..dc01748 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ ], "scripts": { "lint": "eslint lib --env mocha test", - "test": "mocha test/*-test.js", + "test": "npm run lint && mocha test/*-test.js", "doc": "jsdoc -c .jsdoc.json" } } From 2613f133d36ca9ce107ca0cab93d387b4cb0ba54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Fri, 1 Dec 2017 22:10:58 -0800 Subject: [PATCH 06/16] Remove linting on test run --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dc01748..0bc7fdd 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ ], "scripts": { "lint": "eslint lib --env mocha test", - "test": "npm run lint && mocha test/*-test.js", + "test": "mocha test/*-test.js", "doc": "jsdoc -c .jsdoc.json" } } From cb1724014a34fa1ac914c3c3b34d9e913d2215e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 11:01:15 +0100 Subject: [PATCH 07/16] Remove unnecessary comments --- test/dir-sync-test.js | 6 ------ test/dir-test.js | 5 ----- test/file-sync-test.js | 6 ------ test/file-test.js | 6 ------ test/name-sync-test.js | 6 ------ test/name-test.js | 6 ------ 6 files changed, 35 deletions(-) diff --git a/test/dir-sync-test.js b/test/dir-sync-test.js index 91e13b1..1908296 100644 --- a/test/dir-sync-test.js +++ b/test/dir-sync-test.js @@ -17,7 +17,6 @@ tmp.setGracefulCleanup(); describe('tmp', function () { describe('#dirSync()', function () { - // API call standard inband tests describe('when running inband standard tests', function () { inbandStandardTests(false, function before() { @@ -46,12 +45,9 @@ describe('tmp', function () { }); }); - // API call issue specific inband tests describe('when running issue specific inband tests', function () { - // add your issue specific tests here }); - // API call standard outband tests describe('when running standard outband tests', function () { it('on graceful cleanup', function (done) { childProcess('graceful-dir-sync.json', function (err, stderr, stdout) { @@ -124,9 +120,7 @@ describe('tmp', function () { }); }); - // API call issue specific outband tests describe('when running issue specific outband tests', function () { - // add your issue specific tests here it('on issue #62', function (done) { childProcess('issue62-sync.json', function (err, stderr, stdout) { if (err) return done(err); diff --git a/test/dir-test.js b/test/dir-test.js index 74ce178..3f7ef29 100644 --- a/test/dir-test.js +++ b/test/dir-test.js @@ -17,7 +17,6 @@ tmp.setGracefulCleanup(); describe('tmp', function () { describe('#dir()', function () { - // API call standard inband tests describe('when running inband standard tests', function () { inbandStandardTests(false, function before(done) { @@ -47,12 +46,10 @@ describe('tmp', function () { }); }); - // API call issue specific inband tests describe('when running issue specific inband tests', function () { // add your issue specific tests here }); - // API call standard outband tests describe('when running standard outband tests', function () { it('on graceful cleanup', function (done) { childProcess('graceful-dir.json', function (err, stderr, stdout) { @@ -125,9 +122,7 @@ describe('tmp', function () { }); }); - // API call issue specific outband tests describe('when running issue specific outband tests', function () { - // add your issue specific tests here it('on issue #62', function (done) { childProcess('issue62.json', function (err, stderr, stdout) { if (err) return done(err); diff --git a/test/file-sync-test.js b/test/file-sync-test.js index d418b53..a286b6a 100644 --- a/test/file-sync-test.js +++ b/test/file-sync-test.js @@ -16,7 +16,6 @@ tmp.setGracefulCleanup(); describe('tmp', function () { describe('#fileSync()', function () { - // API call standard inband tests describe('when running inband standard tests', function () { inbandStandardTests(true, function before() { @@ -43,12 +42,9 @@ describe('tmp', function () { }); }); - // API call issue specific inband tests describe('when running issue specific inband tests', function () { - // add your issue specific tests here }); - // API call standard outband tests describe('when running standard outband tests', function () { it('on graceful', function (done) { childProcess('graceful-file-sync.json', function (err, stderr, stdout) { @@ -90,9 +86,7 @@ describe('tmp', function () { }); }); - // API call issue specific outband tests describe('when running issue specific outband tests', function () { - // add your issue specific tests here it('on issue #115', function (done) { childProcess('issue115-sync.json', function (err, stderr, stdout) { if (err) return done(err); diff --git a/test/file-test.js b/test/file-test.js index a07899c..5933e45 100644 --- a/test/file-test.js +++ b/test/file-test.js @@ -16,7 +16,6 @@ tmp.setGracefulCleanup(); describe('tmp', function () { describe('#file()', function () { - // API call standard inband tests describe('when running inband standard tests', function () { inbandStandardTests(true, function before(done) { @@ -46,12 +45,9 @@ describe('tmp', function () { }); }); - // API call issue specific inband tests describe('when running issue specific inband tests', function () { - // add your issue specific tests here }); - // API call standard outband tests describe('when running standard outband tests', function () { it('on graceful', function (done) { childProcess('graceful-file.json', function (err, stderr, stdout) { @@ -93,9 +89,7 @@ describe('tmp', function () { }); }); - // API call issue specific outband tests describe('when running issue specific outband tests', function () { - // add your issue specific tests here it('on issue #115', function (done) { childProcess('issue115.json', function (err, stderr, stdout) { if (err) return done(err); diff --git a/test/name-sync-test.js b/test/name-sync-test.js index 07dcb1b..7362898 100644 --- a/test/name-sync-test.js +++ b/test/name-sync-test.js @@ -9,7 +9,6 @@ var describe('tmp', function () { describe('#tmpNameSync()', function () { - // API call standard inband tests describe('when running inband standard tests', function () { inbandStandardTests(function before() { @@ -36,18 +35,13 @@ describe('tmp', function () { }); }); - // API call issue specific inband tests describe('when running issue specific inband tests', function () { - // add your issue specific tests here }); - // API call standard outband tests describe('when running standard outband tests', function () { }); - // API call issue specific outband tests describe('when running issue specific outband tests', function () { - // add your issue specific tests here }); }); }); diff --git a/test/name-test.js b/test/name-test.js index e8d680d..7b41e27 100644 --- a/test/name-test.js +++ b/test/name-test.js @@ -9,7 +9,6 @@ var describe('tmp', function () { describe('#tmpName()', function () { - // API call standard inband tests describe('when running inband standard tests', function () { inbandStandardTests(function before(done) { @@ -39,18 +38,13 @@ describe('tmp', function () { }); }); - // API call issue specific inband tests describe('when running issue specific inband tests', function () { - // add your issue specific tests here }); - // API call standard outband tests describe('when running standard outband tests', function () { }); - // API call issue specific outband tests describe('when running issue specific outband tests', function () { - // add your issue specific tests here }); }); }); From 9bc7f7bab6427266379f189c8103945fbbe308ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 11:01:39 +0100 Subject: [PATCH 08/16] Whitespace fixes for readability --- test/dir-sync-test.js | 9 ++++++--- test/dir-test.js | 7 ++++++- test/file-sync-test.js | 6 ++++-- test/file-test.js | 6 +++++- test/name-sync-test.js | 1 - test/name-test.js | 2 +- 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/test/dir-sync-test.js b/test/dir-sync-test.js index 1908296..8b479f0 100644 --- a/test/dir-sync-test.js +++ b/test/dir-sync-test.js @@ -14,17 +14,14 @@ var // make sure that everything gets cleaned up tmp.setGracefulCleanup(); - describe('tmp', function () { describe('#dirSync()', function () { describe('when running inband standard tests', function () { - inbandStandardTests(false, function before() { this.topic = tmp.dirSync(this.opts); }); describe('with invalid tries', function () { - it('should result in an error on negative tries', function () { try { tmp.dirSync({ tries: -1 }); @@ -33,6 +30,7 @@ describe('tmp', function () { assert.ok(err instanceof Error); } }); + it('should result in an error on non numeric tries', function () { try { tmp.dirSync({ tries: 'nan' }); @@ -57,6 +55,7 @@ describe('tmp', function () { done(); }); }); + it('on non graceful cleanup', function (done) { childProcess('non-graceful-dir-sync.json', function (err, stderr, stdout) { if (err) return done(err); @@ -68,6 +67,7 @@ describe('tmp', function () { done(); }); }); + it('on keep', function (done) { childProcess('keep-dir-sync.json', function (err, stderr, stdout) { if (err) return done(err); @@ -79,6 +79,7 @@ describe('tmp', function () { done(); }); }); + it('on unlink (keep == false)', function (done) { childProcess('unlink-dir-sync.json', function (err, stderr, stdout) { if (err) return done(err); @@ -87,6 +88,7 @@ describe('tmp', function () { done(); }); }); + it('on unsafe cleanup', function (done) { childProcess('unsafe-sync.json', function (err, stderr, stdout) { if (err) return done(err); @@ -100,6 +102,7 @@ describe('tmp', function () { done(); }); }); + it('on non unsafe cleanup', function (done) { childProcess('non-unsafe-sync.json', function (err, stderr, stdout) { if (err) return done(err); diff --git a/test/dir-test.js b/test/dir-test.js index 3f7ef29..381e628 100644 --- a/test/dir-test.js +++ b/test/dir-test.js @@ -18,7 +18,6 @@ tmp.setGracefulCleanup(); describe('tmp', function () { describe('#dir()', function () { describe('when running inband standard tests', function () { - inbandStandardTests(false, function before(done) { var that = this; tmp.dir(this.opts, function (err, name, removeCallback) { @@ -37,6 +36,7 @@ describe('tmp', function () { done(); }); }); + it('should result in an error on non numeric tries', function (done) { tmp.dir({ tries: 'nan' }, function (err) { assert.ok(err instanceof Error, 'should have failed'); @@ -59,6 +59,7 @@ describe('tmp', function () { done(); }); }); + it('on non graceful cleanup', function (done) { childProcess('non-graceful-dir.json', function (err, stderr, stdout) { if (err) return done(err); @@ -70,6 +71,7 @@ describe('tmp', function () { done(); }); }); + it('on keep', function (done) { childProcess('keep-dir.json', function (err, stderr, stdout) { if (err) return done(err); @@ -81,6 +83,7 @@ describe('tmp', function () { done(); }); }); + it('on unlink (keep == false)', function (done) { childProcess('unlink-dir.json', function (err, stderr, stdout) { if (err) return done(err); @@ -89,6 +92,7 @@ describe('tmp', function () { done(); }); }); + it('on unsafe cleanup', function (done) { childProcess('unsafe.json', function (err, stderr, stdout) { if (err) return done(err); @@ -102,6 +106,7 @@ describe('tmp', function () { done(); }); }); + it('on non unsafe cleanup', function (done) { childProcess('non-unsafe.json', function (err, stderr, stdout) { if (err) return done(err); diff --git a/test/file-sync-test.js b/test/file-sync-test.js index a286b6a..be997c3 100644 --- a/test/file-sync-test.js +++ b/test/file-sync-test.js @@ -17,7 +17,6 @@ tmp.setGracefulCleanup(); describe('tmp', function () { describe('#fileSync()', function () { describe('when running inband standard tests', function () { - inbandStandardTests(true, function before() { this.topic = tmp.fileSync(this.opts); }); @@ -31,6 +30,7 @@ describe('tmp', function () { assert.ok(err instanceof Error); } }); + it('should result in an error on non numeric tries', function () { try { tmp.fileSync({ tries: 'nan' }); @@ -54,6 +54,7 @@ describe('tmp', function () { done(); }); }); + it('on non graceful', function (done) { childProcess('non-graceful-file-sync.json', function (err, stderr, stdout) { if (err) return done(err); @@ -65,6 +66,7 @@ describe('tmp', function () { done(); }); }); + it('on keep', function (done) { childProcess('keep-file-sync.json', function (err, stderr, stdout) { if (err) return done(err); @@ -76,6 +78,7 @@ describe('tmp', function () { done(); }); }); + it('on unlink (keep == false)', function (done) { childProcess('unlink-file-sync.json', function (err, stderr, stdout) { if (err) return done(err); @@ -98,4 +101,3 @@ describe('tmp', function () { }); }); }); - diff --git a/test/file-test.js b/test/file-test.js index 5933e45..f50095f 100644 --- a/test/file-test.js +++ b/test/file-test.js @@ -13,13 +13,13 @@ var // make sure that everything gets cleaned up tmp.setGracefulCleanup(); - describe('tmp', function () { describe('#file()', function () { describe('when running inband standard tests', function () { inbandStandardTests(true, function before(done) { var that = this; + tmp.file(this.opts, function (err, name, fd, removeCallback) { if (err) done(err); else { @@ -36,6 +36,7 @@ describe('tmp', function () { done(); }); }); + it('should result in an error on non numeric tries', function (done) { tmp.file({ tries: 'nan' }, function (err) { assert.ok(err instanceof Error, 'should have failed'); @@ -57,6 +58,7 @@ describe('tmp', function () { done(); }); }); + it('on non graceful', function (done) { childProcess('non-graceful-file.json', function (err, stderr, stdout) { if (err) return done(err); @@ -68,6 +70,7 @@ describe('tmp', function () { done(); }); }); + it('on keep', function (done) { childProcess('keep-file.json', function (err, stderr, stdout) { if (err) return done(err); @@ -79,6 +82,7 @@ describe('tmp', function () { done(); }); }); + it('on unlink (keep == false)', function (done) { childProcess('unlink-file.json', function (err, stderr, stdout) { if (err) return done(err); diff --git a/test/name-sync-test.js b/test/name-sync-test.js index 7362898..e784668 100644 --- a/test/name-sync-test.js +++ b/test/name-sync-test.js @@ -10,7 +10,6 @@ var describe('tmp', function () { describe('#tmpNameSync()', function () { describe('when running inband standard tests', function () { - inbandStandardTests(function before() { this.topic = tmp.tmpNameSync(this.opts); }); diff --git a/test/name-test.js b/test/name-test.js index 7b41e27..098b7b6 100644 --- a/test/name-test.js +++ b/test/name-test.js @@ -10,7 +10,6 @@ var describe('tmp', function () { describe('#tmpName()', function () { describe('when running inband standard tests', function () { - inbandStandardTests(function before(done) { var that = this; tmp.dir(this.opts, function (err, name) { @@ -29,6 +28,7 @@ describe('tmp', function () { done(); }); }); + it('should result in an error on non numeric tries', function (done) { tmp.tmpName({ tries: 'nan' }, function (err) { assert.ok(err instanceof Error, 'should have failed'); From 39a1ad5cd539275cca98c07cb2fc33976a5ddbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 11:27:42 +0100 Subject: [PATCH 09/16] Refactor childProcess starting --- test/child-process.js | 36 ++++++++++++++---------------------- test/dir-sync-test.js | 14 +++++++------- test/dir-test.js | 14 +++++++------- test/file-sync-test.js | 10 +++++----- test/file-test.js | 10 +++++----- test/issue129-test.js | 2 +- 6 files changed, 39 insertions(+), 47 deletions(-) diff --git a/test/child-process.js b/test/child-process.js index 4a2485d..2fd1466 100644 --- a/test/child-process.js +++ b/test/child-process.js @@ -6,32 +6,24 @@ var existsSync = fs.existsSync || path.existsSync, spawn = require('child_process').spawn; +module.exports.genericChildProcess = _spawnProcess('spawn-generic.js'); +module.exports.childProcess = _spawnProcess('spawn-custom.js'); -module.exports.genericChildProcess = function spawnGenericChildProcess(configFile, cb) { - var - configFilePath = path.join(__dirname, 'outband', configFile), - command_args = [path.join(__dirname, 'spawn-generic.js'), configFilePath]; - - // make sure that the config file exists - if (!existsSync(configFilePath)) - return cb(new Error('ENOENT: configFile ' + configFilePath + ' does not exist')); - - _do_spawn(command_args, cb); -}; - -module.exports.childProcess = function spawnChildProcess(configFile, cb) { - var - configFilePath = path.join(__dirname, 'outband', configFile), - command_args = [path.join(__dirname, 'spawn-custom.js'), configFilePath]; +function _spawnProcess(spawnFile) { + return function (testCase, configFile, cb) { + var + configFilePath = path.join(__dirname, 'outband', configFile), + commandArgs = [path.join(__dirname, spawnFile), configFilePath]; - // make sure that the config file exists - if (!existsSync(configFilePath)) - return cb(new Error('ENOENT: configFile ' + configFilePath + ' does not exist')); + // make sure that the config file exists + if (!existsSync(configFilePath)) + return cb(new Error('ENOENT: configFile ' + configFilePath + ' does not exist')); - _do_spawn(command_args, cb); -}; + _doSpawn(commandArgs, cb); + }; +} -function _do_spawn(command_args, cb) { +function _doSpawn(commandArgs, cb) { var node_path = process.argv[0], stdoutBufs = [], diff --git a/test/dir-sync-test.js b/test/dir-sync-test.js index 8b479f0..445ae0d 100644 --- a/test/dir-sync-test.js +++ b/test/dir-sync-test.js @@ -48,7 +48,7 @@ describe('tmp', function () { describe('when running standard outband tests', function () { it('on graceful cleanup', function (done) { - childProcess('graceful-dir-sync.json', function (err, stderr, stdout) { + childProcess(this, 'graceful-dir-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (!stderr) assert.fail('stderr expected'); else assertions.assertDoesNotExist(stdout); @@ -57,7 +57,7 @@ describe('tmp', function () { }); it('on non graceful cleanup', function (done) { - childProcess('non-graceful-dir-sync.json', function (err, stderr, stdout) { + childProcess(this, 'non-graceful-dir-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (!stderr) assert.fail('stderr expected'); else { @@ -69,7 +69,7 @@ describe('tmp', function () { }); it('on keep', function (done) { - childProcess('keep-dir-sync.json', function (err, stderr, stdout) { + childProcess(this, 'keep-dir-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else { @@ -81,7 +81,7 @@ describe('tmp', function () { }); it('on unlink (keep == false)', function (done) { - childProcess('unlink-dir-sync.json', function (err, stderr, stdout) { + childProcess(this, 'unlink-dir-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else assertions.assertDoesNotExist(stdout); @@ -90,7 +90,7 @@ describe('tmp', function () { }); it('on unsafe cleanup', function (done) { - childProcess('unsafe-sync.json', function (err, stderr, stdout) { + childProcess(this, 'unsafe-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else { @@ -104,7 +104,7 @@ describe('tmp', function () { }); it('on non unsafe cleanup', function (done) { - childProcess('non-unsafe-sync.json', function (err, stderr, stdout) { + childProcess(this, 'non-unsafe-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else { @@ -125,7 +125,7 @@ describe('tmp', function () { describe('when running issue specific outband tests', function () { it('on issue #62', function (done) { - childProcess('issue62-sync.json', function (err, stderr, stdout) { + childProcess(this, 'issue62-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else assertions.assertDoesNotExist(stdout); diff --git a/test/dir-test.js b/test/dir-test.js index 381e628..8d20e3e 100644 --- a/test/dir-test.js +++ b/test/dir-test.js @@ -52,7 +52,7 @@ describe('tmp', function () { describe('when running standard outband tests', function () { it('on graceful cleanup', function (done) { - childProcess('graceful-dir.json', function (err, stderr, stdout) { + childProcess(this, 'graceful-dir.json', function (err, stderr, stdout) { if (err) return done(err); else if (!stderr) assert.fail('stderr expected'); else assertions.assertDoesNotExist(stdout); @@ -61,7 +61,7 @@ describe('tmp', function () { }); it('on non graceful cleanup', function (done) { - childProcess('non-graceful-dir.json', function (err, stderr, stdout) { + childProcess(this, 'non-graceful-dir.json', function (err, stderr, stdout) { if (err) return done(err); else if (!stderr) assert.fail('stderr expected'); else { @@ -73,7 +73,7 @@ describe('tmp', function () { }); it('on keep', function (done) { - childProcess('keep-dir.json', function (err, stderr, stdout) { + childProcess(this, 'keep-dir.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else { @@ -85,7 +85,7 @@ describe('tmp', function () { }); it('on unlink (keep == false)', function (done) { - childProcess('unlink-dir.json', function (err, stderr, stdout) { + childProcess(this, 'unlink-dir.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else assertions.assertDoesNotExist(stdout); @@ -94,7 +94,7 @@ describe('tmp', function () { }); it('on unsafe cleanup', function (done) { - childProcess('unsafe.json', function (err, stderr, stdout) { + childProcess(this, 'unsafe.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else { @@ -108,7 +108,7 @@ describe('tmp', function () { }); it('on non unsafe cleanup', function (done) { - childProcess('non-unsafe.json', function (err, stderr, stdout) { + childProcess(this, 'non-unsafe.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else { @@ -129,7 +129,7 @@ describe('tmp', function () { describe('when running issue specific outband tests', function () { it('on issue #62', function (done) { - childProcess('issue62.json', function (err, stderr, stdout) { + childProcess(this, 'issue62.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else assertions.assertDoesNotExist(stdout); diff --git a/test/file-sync-test.js b/test/file-sync-test.js index be997c3..22795fe 100644 --- a/test/file-sync-test.js +++ b/test/file-sync-test.js @@ -47,7 +47,7 @@ describe('tmp', function () { describe('when running standard outband tests', function () { it('on graceful', function (done) { - childProcess('graceful-file-sync.json', function (err, stderr, stdout) { + childProcess(this, 'graceful-file-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (!stderr) assert.fail('stderr expected'); else assertions.assertDoesNotExist(stdout); @@ -56,7 +56,7 @@ describe('tmp', function () { }); it('on non graceful', function (done) { - childProcess('non-graceful-file-sync.json', function (err, stderr, stdout) { + childProcess(this, 'non-graceful-file-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (!stderr) assert.fail('stderr expected'); else { @@ -68,7 +68,7 @@ describe('tmp', function () { }); it('on keep', function (done) { - childProcess('keep-file-sync.json', function (err, stderr, stdout) { + childProcess(this, 'keep-file-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else { @@ -80,7 +80,7 @@ describe('tmp', function () { }); it('on unlink (keep == false)', function (done) { - childProcess('unlink-file-sync.json', function (err, stderr, stdout) { + childProcess(this, 'unlink-file-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else assertions.assertDoesNotExist(stdout); @@ -91,7 +91,7 @@ describe('tmp', function () { describe('when running issue specific outband tests', function () { it('on issue #115', function (done) { - childProcess('issue115-sync.json', function (err, stderr, stdout) { + childProcess(this, 'issue115-sync.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else assertions.assertDoesNotExist(stdout); diff --git a/test/file-test.js b/test/file-test.js index f50095f..6597bef 100644 --- a/test/file-test.js +++ b/test/file-test.js @@ -51,7 +51,7 @@ describe('tmp', function () { describe('when running standard outband tests', function () { it('on graceful', function (done) { - childProcess('graceful-file.json', function (err, stderr, stdout) { + childProcess(this, 'graceful-file.json', function (err, stderr, stdout) { if (err) return done(err); else if (!stderr) assert.fail('stderr expected'); else assertions.assertDoesNotExist(stdout); @@ -60,7 +60,7 @@ describe('tmp', function () { }); it('on non graceful', function (done) { - childProcess('non-graceful-file.json', function (err, stderr, stdout) { + childProcess(this, 'non-graceful-file.json', function (err, stderr, stdout) { if (err) return done(err); else if (!stderr) assert.fail('stderr expected'); else { @@ -72,7 +72,7 @@ describe('tmp', function () { }); it('on keep', function (done) { - childProcess('keep-file.json', function (err, stderr, stdout) { + childProcess(this, 'keep-file.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else { @@ -84,7 +84,7 @@ describe('tmp', function () { }); it('on unlink (keep == false)', function (done) { - childProcess('unlink-file.json', function (err, stderr, stdout) { + childProcess(this, 'unlink-file.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else assertions.assertDoesNotExist(stdout); @@ -95,7 +95,7 @@ describe('tmp', function () { describe('when running issue specific outband tests', function () { it('on issue #115', function (done) { - childProcess('issue115.json', function (err, stderr, stdout) { + childProcess(this, 'issue115.json', function (err, stderr, stdout) { if (err) return done(err); else if (stderr) assert.fail(stderr); else assertions.assertDoesNotExist(stdout); diff --git a/test/issue129-test.js b/test/issue129-test.js index 14a6679..50af325 100644 --- a/test/issue129-test.js +++ b/test/issue129-test.js @@ -9,7 +9,7 @@ var describe('tmp', function () { describe('issue129: safely install listeners', function () { it('when simulating sandboxed behavior', function (done) { - childProcess('issue129.json', function (err, stderr) { + childProcess(this, 'issue129.json', function (err, stderr) { if (err) return done(err); else if (stderr) { assertions.assertDoesNotStartWith(stderr, 'EEXISTS:LEGACY:EXIT'); From a1544cf3f92fd1c34b817fa4f9685c09f2265f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 18:52:28 +0100 Subject: [PATCH 10/16] Indenting and naming fixes --- test/child-process.js | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/test/child-process.js b/test/child-process.js index 2fd1466..315671e 100644 --- a/test/child-process.js +++ b/test/child-process.js @@ -36,39 +36,45 @@ function _doSpawn(commandArgs, cb) { if (process.env.running_under_istanbul) { var istanbul_path = path.join(__dirname, '..', 'node_modules', 'istanbul', 'lib', 'cli.js'); - command_args = [ - istanbul_path, 'cover', '--report' , 'none', '--print', 'none', - '--dir', path.join('coverage', 'json'), '--include-pid', - command_args[0], '--', command_args[1] - ]; + commandArgs = [ + istanbul_path, 'cover', '--report' , 'none', '--print', 'none', + '--dir', path.join('coverage', 'json'), '--include-pid', + commandArgs[0], '--', commandArgs[1] + ]; } // spawn doesn’t have the quoting problems that exec does, // especially when going for Windows portability. - child = spawn(node_path, command_args); + + child = spawn(node_path, commandArgs); child.stdin.end(); // TODO:we no longer support node 0.6 // Cannot use 'close' event because not on node-0.6. + function _close() { var stderr = _bufferConcat(stderrBufs).toString(), stdout = _bufferConcat(stdoutBufs).toString(); + if (stderrDone && stdoutDone && !done) { done = true; cb(null, stderr, stdout); } } + child.on('error', function _spawnError(err) { if (!done) { done = true; cb(err); } }); + child.stdout.on('data', function _stdoutData(data) { stdoutBufs.push(data); }).on('close', function _stdoutEnd() { stdoutDone = true; _close(); }); + child.stderr.on('data', function _stderrData(data) { stderrBufs.push(data); }).on('close', function _stderrEnd() { @@ -80,13 +86,13 @@ function _doSpawn(commandArgs, cb) { function _bufferConcat(buffers) { if (Buffer.concat) { return Buffer.concat.apply(this, arguments); - } else { - return new Buffer(buffers.reduce(function (acc, buf) { - for (var i = 0; i < buf.length; i++) { - acc.push(buf[i]); - } - return acc; - }, [])); } + + return new Buffer(buffers.reduce(function (acc, buf) { + for (var i = 0; i < buf.length; i++) { + acc.push(buf[i]); + } + return acc; + }, [])); } From 8dd9d5f66675976768b6a5169f067eccb195590a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 18:58:18 +0100 Subject: [PATCH 11/16] Switch from sync to async path check --- test/child-process.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/child-process.js b/test/child-process.js index 315671e..df0c291 100644 --- a/test/child-process.js +++ b/test/child-process.js @@ -3,7 +3,7 @@ var fs = require('fs'), path = require('path'), - existsSync = fs.existsSync || path.existsSync, + exists = fs.exists || path.exists, spawn = require('child_process').spawn; module.exports.genericChildProcess = _spawnProcess('spawn-generic.js'); @@ -15,11 +15,11 @@ function _spawnProcess(spawnFile) { configFilePath = path.join(__dirname, 'outband', configFile), commandArgs = [path.join(__dirname, spawnFile), configFilePath]; - // make sure that the config file exists - if (!existsSync(configFilePath)) - return cb(new Error('ENOENT: configFile ' + configFilePath + ' does not exist')); + exists(configFilePath, function (configExists) { + if (configExists) return _doSpawn(commandArgs, cb); - _doSpawn(commandArgs, cb); + cb(new Error('ENOENT: configFile ' + configFilePath + ' does not exist')); + }); }; } From ee21ae805f23229b8cbf5634f63363d09b4be054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 18:58:42 +0100 Subject: [PATCH 12/16] Make istanbul path constant --- test/child-process.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/child-process.js b/test/child-process.js index df0c291..f38e7ba 100644 --- a/test/child-process.js +++ b/test/child-process.js @@ -6,6 +6,8 @@ var exists = fs.exists || path.exists, spawn = require('child_process').spawn; +const ISTANBUL_PATH = path.join(__dirname, '..', 'node_modules', 'istanbul', 'lib', 'cli.js'); + module.exports.genericChildProcess = _spawnProcess('spawn-generic.js'); module.exports.childProcess = _spawnProcess('spawn-custom.js'); @@ -35,9 +37,8 @@ function _doSpawn(commandArgs, cb) { if (process.env.running_under_istanbul) { var - istanbul_path = path.join(__dirname, '..', 'node_modules', 'istanbul', 'lib', 'cli.js'); commandArgs = [ - istanbul_path, 'cover', '--report' , 'none', '--print', 'none', + ISTANBUL_PATH, 'cover', '--report' , 'none', '--print', 'none', '--dir', path.join('coverage', 'json'), '--include-pid', commandArgs[0], '--', commandArgs[1] ]; From b87011dc29b6ff4b8d45b9ea5ca00f9969b1565a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 19:09:36 +0100 Subject: [PATCH 13/16] Fix variable shadowing --- test/child-process.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/child-process.js b/test/child-process.js index f38e7ba..18b007a 100644 --- a/test/child-process.js +++ b/test/child-process.js @@ -36,12 +36,11 @@ function _doSpawn(commandArgs, cb) { stdoutDone = false; if (process.env.running_under_istanbul) { - var - commandArgs = [ - ISTANBUL_PATH, 'cover', '--report' , 'none', '--print', 'none', - '--dir', path.join('coverage', 'json'), '--include-pid', - commandArgs[0], '--', commandArgs[1] - ]; + commandArgs = [ + ISTANBUL_PATH, 'cover', '--report' , 'none', '--print', 'none', + '--dir', path.join('coverage', 'json'), '--include-pid', + commandArgs[0], '--', commandArgs[1] + ]; } // spawn doesn’t have the quoting problems that exec does, // especially when going for Windows portability. From 7661534383d847123742f816cc3a87bad27134a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 19:21:24 +0100 Subject: [PATCH 14/16] Increase timeout --- test/child-process.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/child-process.js b/test/child-process.js index 18b007a..2489838 100644 --- a/test/child-process.js +++ b/test/child-process.js @@ -13,6 +13,8 @@ module.exports.childProcess = _spawnProcess('spawn-custom.js'); function _spawnProcess(spawnFile) { return function (testCase, configFile, cb) { + testCase.timeout(5000); + var configFilePath = path.join(__dirname, 'outband', configFile), commandArgs = [path.join(__dirname, spawnFile), configFilePath]; From da9fe6da98dea3ed7aef302b34c9a49116943cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 19:30:29 +0100 Subject: [PATCH 15/16] Reorder npm tasks --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 26f499d..5dcc1fd 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ ], "scripts": { "lint": "eslint lib --env mocha test", - "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report none --print none --dir ./coverage/json -u exports -R test/*-test.js && istanbul report --root ./coverage/json html && istanbul report text-summary", "clean": "rm -Rf ./coverage", + "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report none --print none --dir ./coverage/json -u exports -R test/*-test.js && istanbul report --root ./coverage/json html && istanbul report text-summary", "doc": "jsdoc -c .jsdoc.json" } } From ea2fc5d0cf86c46e67d58fe3a0a7d0b2647695e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 25 Dec 2017 19:55:23 +0100 Subject: [PATCH 16/16] Style fixes --- test/child-process.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/child-process.js b/test/child-process.js index 2489838..3dd0dde 100644 --- a/test/child-process.js +++ b/test/child-process.js @@ -44,14 +44,14 @@ function _doSpawn(commandArgs, cb) { commandArgs[0], '--', commandArgs[1] ]; } + // spawn doesn’t have the quoting problems that exec does, // especially when going for Windows portability. - child = spawn(node_path, commandArgs); child.stdin.end(); - // TODO:we no longer support node 0.6 - // Cannot use 'close' event because not on node-0.6. + // TODO we no longer support node 0.6 + // Cannot use 'close' event because not on node-0.6. function _close() { var stderr = _bufferConcat(stderrBufs).toString(),