From 6fc9f7b6823c3658909e398efd7a323e0287dcb1 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 22 Jan 2019 19:05:23 -0800 Subject: [PATCH 01/51] Update yauzl version and changelog date. (#3069) --- Extension/CHANGELOG.md | 2 +- Extension/package-lock.json | 14 +++++++------- Extension/package.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 811394644c..c479629532 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,6 +1,6 @@ # C/C++ for Visual Studio Code Change Log -## Version 0.21.0 January 17, 2019 +## Version 0.21.0 January 23, 2019 ### New Features * Add documentation comments for hover, completion, and signature help. [#399](https://github.com/Microsoft/vscode-cpptools/issues/399) * Add completion committing for methods after `(`. [#1184](https://github.com/Microsoft/vscode-cpptools/issues/1184) diff --git a/Extension/package-lock.json b/Extension/package-lock.json index 52dbb3442d..2cac398b37 100644 --- a/Extension/package-lock.json +++ b/Extension/package-lock.json @@ -1752,9 +1752,9 @@ "dev": true }, "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "requires": { "pend": "~1.2.0" } @@ -7190,12 +7190,12 @@ } }, "yauzl": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.8.0.tgz", - "integrity": "sha1-eUUK/yKyqcWkHvVOAtuQfM+/nuI=", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "requires": { "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.0.1" + "fd-slicer": "~1.1.0" } }, "yazl": { diff --git a/Extension/package.json b/Extension/package.json index 7021c397fc..383658d2e7 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -1412,7 +1412,7 @@ "vscode-debugprotocol": "~1.24.0", "vscode-extension-telemetry": "~0.1.0", "vscode-languageclient": "5.1.1", - "yauzl": "~2.8.0" + "yauzl": "~2.10.0" }, "runtimeDependencies": [ { From 243f21380d13e5e192baca2f8ed9b3c02ab3db29 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Wed, 23 Jan 2019 15:05:37 -0800 Subject: [PATCH 02/51] Updating debugAdapterExecutable to new API (#2921) https://code.visualstudio.com/updates/v1_30#_debugging-api has depricated adapterExecutableCommand. This PR updates the extension to use DebugAdapterDescriptorFactory. --- Extension/package-lock.json | 3682 +++++------------ Extension/package.json | 6 +- .../Debugger/debugAdapterDescriptorFactory.ts | 55 + Extension/src/Debugger/extension.ts | 53 +- 4 files changed, 1063 insertions(+), 2733 deletions(-) create mode 100644 Extension/src/Debugger/debugAdapterDescriptorFactory.ts diff --git a/Extension/package-lock.json b/Extension/package-lock.json index 2cac398b37..936ac10366 100644 --- a/Extension/package-lock.json +++ b/Extension/package-lock.json @@ -33,15 +33,15 @@ } }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", + "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", + "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, "ansi-colors": { @@ -106,303 +106,6 @@ "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } } }, "append-buffer": { @@ -414,16 +117,6 @@ "buffer-equal": "^1.0.0" } }, - "applicationinsights": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.0.6.tgz", - "integrity": "sha512-VQT3kBpJVPw5fCO5n+WUeSx0VHjxFtD7znYbILBlVgOS9/cMDuGFmV2Br3ObzFyZUDGNbEfW36fD1y2/vAiCKw==", - "requires": { - "diagnostic-channel": "0.2.0", - "diagnostic-channel-publishers": "0.2.1", - "zone.js": "0.7.6" - } - }, "archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", @@ -452,8 +145,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" }, "arr-map": { "version": "2.0.2", @@ -564,9 +256,9 @@ "dev": true }, "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, "arrify": { @@ -576,10 +268,13 @@ "dev": true }, "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } }, "assert-plus": { "version": "1.0.0", @@ -590,8 +285,7 @@ "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async-child-process": { "version": "1.1.1", @@ -638,8 +332,7 @@ "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" }, "aws-sign2": { "version": "0.7.0", @@ -648,9 +341,9 @@ "dev": true }, "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, "babel-code-frame": { @@ -664,28 +357,82 @@ "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.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, - "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 - } - } - }, - "babel-runtime": { + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://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.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "^2.3.3", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "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 + } + } + }, + "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", @@ -721,7 +468,6 @@ "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", @@ -736,60 +482,17 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, "requires": { "is-descriptor": "^1.0.0" } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, - "optional": true, "requires": { "tweetnacl": "^0.14.3" } @@ -825,14 +528,32 @@ } }, "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "browser-stdout": { @@ -853,9 +574,9 @@ "dev": true }, "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, "builtin-modules": { @@ -868,7 +589,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", @@ -879,14 +599,6 @@ "to-object-path": "^0.3.0", "union-value": "^1.0.0", "unset-value": "^1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "camelcase": { @@ -1034,7 +746,6 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", @@ -1045,23 +756,32 @@ "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, "requires": { "is-descriptor": "^0.1.0" + }, + "dependencies": { + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + } } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -1113,7 +833,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -1128,7 +848,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -1137,12 +857,6 @@ } } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -1158,24 +872,12 @@ "arr-map": "^2.0.2", "for-own": "^1.0.0", "make-iterator": "^1.0.0" - }, - "dependencies": { - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - } } }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" @@ -1203,9 +905,9 @@ "dev": true }, "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", "dev": true, "requires": { "delayed-stream": "~1.0.0" @@ -1220,8 +922,7 @@ "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "concat-map": { "version": "0.0.1", @@ -1241,16 +942,18 @@ } }, "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true + "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" + } }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "copy-props": { "version": "2.0.4", @@ -1331,7 +1034,6 @@ "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" } @@ -1345,12 +1047,11 @@ "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, "deep-assign": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", "dev": true, "requires": { @@ -1393,53 +1094,9 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } } }, "delayed-stream": { @@ -1475,7 +1132,7 @@ }, "duplexer": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", "dev": true }, @@ -1515,9 +1172,9 @@ } }, "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz", + "integrity": "sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==", "dev": true, "requires": { "end-of-stream": "^1.0.0", @@ -1537,13 +1194,13 @@ } }, "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, - "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "end-of-stream": { @@ -1635,7 +1292,7 @@ }, "event-stream": { "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", "dev": true, "requires": { @@ -1664,61 +1321,114 @@ } }, "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "dev": true - }, - "extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", "dev": true, "requires": { "kind-of": "^1.1.0" } }, "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { - "is-extglob": { + "define-property": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } } } }, @@ -1740,9 +1450,9 @@ } }, "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, "fast-json-stable-stringify": { @@ -1759,23 +1469,25 @@ "pend": "~1.2.0" } }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "find-up": { @@ -1798,727 +1510,423 @@ "is-glob": "^3.1.0", "micromatch": "^3.0.4", "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.1.tgz", + "integrity": "sha512-jQp949ZmEbiYHk3gkbdtpJ0G1+kgtLQBNdP5edFP7Fh+WAYceLQz6yO1SBj72Xkg8GVyTB3bBzAYrHJVh5Xd5g==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "ansi-regex": { + "version": "2.1.1", + "bundled": true, "dev": true }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "aproba": { + "version": "1.2.0", + "bundled": true, "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } + "optional": true }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, "dev": true, + "optional": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "chownr": { + "version": "1.0.1", + "bundled": true, "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } + "optional": true }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "ms": "2.0.0" } }, - "is-accessor-descriptor": { + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, "requires": { - "kind-of": "^6.0.0" + "minipass": "^2.2.1" } }, - "is-data-descriptor": { + "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, "dev": true, + "optional": true, "requires": { - "kind-of": "^6.0.0" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "glob": { + "version": "7.1.2", + "bundled": true, "dev": true, + "optional": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "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" } }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, "dev": true, + "optional": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "safer-buffer": "^2.1.0" } }, - "isobject": { + "ignore-walk": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, "dev": true }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "number-is-nan": "^1.0.0" } - } - } - }, - "fined": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", - "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - } - }, - "first-chunk-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", - "dev": true - }, - "flagged-respawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.0.tgz", - "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=", - "dev": true - }, - "flush-write-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, - "fs-mkdirp-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true }, - "aproba": { - "version": "1.2.0", + "isarray": { + "version": "1.0.0", "bundled": true, "dev": true, "optional": true }, - "are-we-there-yet": { - "version": "1.1.4", + "minimatch": { + "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "brace-expansion": "^1.1.7" } }, - "balanced-match": { - "version": "1.0.0", + "minimist": { + "version": "0.0.8", "bundled": true, "dev": true }, - "brace-expansion": { - "version": "1.1.11", + "minipass": { + "version": "2.2.4", "bundled": true, "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" } }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { + "minizlib": { "version": "1.1.0", "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, "dev": true, "optional": true, "requires": { - "ms": "2.0.0" + "minipass": "^2.2.1" } }, - "deep-extend": { + "mkdirp": { "version": "0.5.1", "bundled": true, "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true + "requires": { + "minimist": "0.0.8" + } }, - "detect-libc": { - "version": "1.0.3", + "ms": { + "version": "2.0.0", "bundled": true, "dev": true, "optional": true }, - "fs-minipass": { - "version": "1.2.5", + "needle": { + "version": "2.2.0", "bundled": true, "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", + "node-pre-gyp": { + "version": "0.10.0", "bundled": true, "dev": true, "optional": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, - "glob": { - "version": "7.1.2", + "nopt": { + "version": "4.0.1", "bundled": true, "dev": true, "optional": 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" + "abbrev": "1", + "osenv": "^0.1.4" } }, - "has-unicode": { - "version": "2.0.1", + "npm-bundled": { + "version": "1.0.3", "bundled": true, "dev": true, "optional": true }, - "iconv-lite": { - "version": "0.4.21", + "npm-packlist": { + "version": "1.1.10", "bundled": true, "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, - "ignore-walk": { - "version": "3.0.1", + "npmlog": { + "version": "4.1.2", "bundled": true, "dev": true, "optional": true, "requires": { - "minimatch": "^3.0.4" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", + "number-is-nan": { + "version": "1.0.1", "bundled": true, "dev": true }, @@ -2757,8 +2165,7 @@ "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "getpass": { "version": "0.1.7", @@ -2783,42 +2190,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", @@ -2830,80 +2201,21 @@ } }, "glob-stream": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", - "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", "dev": true, "requires": { "extend": "^3.0.0", - "glob": "^5.0.3", - "glob-parent": "^3.0.0", - "micromatch": "^2.3.7", - "ordered-read-streams": "^0.3.0", - "through2": "^0.6.0", - "to-absolute-glob": "^0.1.1", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", "unique-stream": "^2.0.2" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - } - } - }, - "glob-watcher": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.1.tgz", - "integrity": "sha512-fK92r2COMC199WCyGUblrZKhjra3cyVMDiypDdqg1vsSDmexnbYivK1kNR4QItiNXLKmGlqan469ks67RtNa2g==", - "dev": true, - "requires": { - "async-done": "^1.2.0", - "chokidar": "^2.0.0", - "just-debounce": "^1.0.0", - "object.defaults": "^1.1.0" } }, "global-modules": { @@ -2940,9 +2252,9 @@ } }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "dev": true }, "growl": { @@ -2963,34 +2275,18 @@ "vinyl-fs": "^3.0.0" }, "dependencies": { - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true - }, - "glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "glob-watcher": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz", + "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==", "dev": true, "requires": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" + "just-debounce": "^1.0.0", + "object.defaults": "^1.1.0" } }, "gulp-cli": { @@ -3018,76 +2314,6 @@ "v8flags": "^3.0.1", "yargs": "^7.1.0" } - }, - "is-valid-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "ordered-read-streams": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "to-absolute-glob": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" - } - }, - "vinyl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - } - }, - "vinyl-fs": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", - "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", - "dev": true, - "requires": { - "fs-mkdirp-stream": "^1.0.0", - "glob-stream": "^6.1.0", - "graceful-fs": "^4.0.0", - "is-valid-glob": "^1.0.0", - "lazystream": "^1.0.0", - "lead": "^1.0.0", - "object.assign": "^4.0.4", - "pumpify": "^1.3.5", - "readable-stream": "^2.3.3", - "remove-bom-buffer": "^3.0.0", - "remove-bom-stream": "^1.2.0", - "resolve-options": "^1.1.0", - "through2": "^2.0.0", - "to-through": "^2.0.0", - "value-or-function": "^3.0.0", - "vinyl": "^2.0.0", - "vinyl-sourcemap": "^1.1.0" - } } } }, @@ -3141,7 +2367,7 @@ }, "readable-stream": { "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { @@ -3153,13 +2379,13 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "through2": { "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "resolved": "http://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "dev": true, "requires": { @@ -3184,12 +2410,12 @@ } }, "gulp-remote-src-vscode": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/gulp-remote-src-vscode/-/gulp-remote-src-vscode-0.5.0.tgz", - "integrity": "sha512-/9vtSk9eI9DEWCqzGieglPqmx0WUQ9pwPHyHFpKmfxqdgqGJC2l0vFMdYs54hLdDsMDEZFLDL2J4ikjc4hQ5HQ==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/gulp-remote-src-vscode/-/gulp-remote-src-vscode-0.5.1.tgz", + "integrity": "sha512-mw4OGjtC/jlCWJFhbcAlel4YPvccChlpsl3JceNiB/DLJi24/UPxXt53/N26lgI3dknEqd4ErfdHrO8sJ5bATQ==", "dev": true, "requires": { - "event-stream": "^3.3.4", + "event-stream": "3.3.4", "node.extend": "^1.1.2", "request": "^2.79.0", "through2": "^2.0.3", @@ -3197,9 +2423,9 @@ }, "dependencies": { "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, "clone-stats": { @@ -3209,9 +2435,9 @@ "dev": true }, "vinyl": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", - "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", "dev": true, "requires": { "clone": "^2.1.1", @@ -3224,56 +2450,6 @@ } } }, - "gulp-sourcemaps": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", - "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", - "dev": true, - "requires": { - "convert-source-map": "^1.1.1", - "graceful-fs": "^4.1.2", - "strip-bom": "^2.0.0", - "through2": "^2.0.0", - "vinyl": "^1.0.0" - }, - "dependencies": { - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, - "gulp-symdest": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/gulp-symdest/-/gulp-symdest-1.1.0.tgz", - "integrity": "sha1-wWUyBzLRks5W/ZQnH/oSMjS/KuA=", - "dev": true, - "requires": { - "event-stream": "^3.3.1", - "mkdirp": "^0.5.1", - "queue": "^3.1.0", - "vinyl-fs": "^2.4.3" - } - }, "gulp-tslint": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-8.1.2.tgz", @@ -3414,24 +2590,24 @@ } }, "gulp-vinyl-zip": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.0.tgz", - "integrity": "sha1-JOQGhdwFtxSZlSRQmeBZAmO+ja0=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.2.tgz", + "integrity": "sha512-wJn09jsb8PyvUeyFF7y7ImEJqJwYy40BqL9GKfJs6UGpaGW9A+N68Q+ajsIpb9AeR6lAdjMbIdDPclIGo1/b7Q==", "dev": true, "requires": { - "event-stream": "^3.3.1", + "event-stream": "3.3.4", "queue": "^4.2.1", "through2": "^2.0.3", "vinyl": "^2.0.2", - "vinyl-fs": "^2.0.0", + "vinyl-fs": "^3.0.3", "yauzl": "^2.2.1", "yazl": "^2.2.1" }, "dependencies": { "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, "clone-stats": { @@ -3440,19 +2616,10 @@ "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", "dev": true }, - "queue": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/queue/-/queue-4.4.2.tgz", - "integrity": "sha512-fSMRXbwhMwipcDZ08enW2vl+YDmAmhcNcr43sCJL8DIg+CFOsoRLG23ctxA+fwNk1w55SePSiS7oqQQSgQoVJQ==", - "dev": true, - "requires": { - "inherits": "~2.0.0" - } - }, "vinyl": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", - "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", "dev": true, "requires": { "clone": "^2.1.1", @@ -3481,15 +2648,24 @@ "dev": true }, "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "dev": true, "requires": { - "ajv": "^5.1.0", + "ajv": "^6.5.5", "har-schema": "^2.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -3524,56 +2700,25 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "has-values": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3709,7 +2854,6 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -3718,7 +2862,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3743,8 +2886,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-builtin-module": { "version": "1.0.0", @@ -3759,7 +2901,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -3768,7 +2909,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3776,44 +2916,42 @@ } }, "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" }, "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, "is-extglob": { "version": "2.1.1", @@ -3846,10 +2984,9 @@ "dev": true }, "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { "kind-of": "^3.0.2" }, @@ -3858,7 +2995,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3867,7 +3003,7 @@ }, "is-obj": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, @@ -3875,31 +3011,10 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, "requires": { "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, "is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", @@ -3937,9 +3052,9 @@ "dev": true }, "is-valid-glob": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", - "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", "dev": true }, "is-windows": { @@ -3951,8 +3066,7 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", @@ -3961,13 +3075,9 @@ "dev": true }, "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "isstream": { "version": "0.1.2", @@ -3985,8 +3095,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true + "dev": true }, "json-schema": { "version": "0.2.3", @@ -3995,9 +3104,9 @@ "dev": true }, "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=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify": { @@ -4105,7 +3214,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4114,6 +3223,17 @@ "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "strip-bom": "^2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } } }, "lodash._basecopy": { @@ -4197,12 +3317,6 @@ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", "dev": true }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, "lodash.keys": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", @@ -4267,12 +3381,11 @@ "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, "map-stream": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "resolved": "http://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", "dev": true }, @@ -4280,7 +3393,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, "requires": { "object-visit": "^1.0.0" } @@ -4295,6 +3407,27 @@ "micromatch": "^3.0.4", "resolve": "^1.4.0", "stack-trace": "0.0.10" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" }, "dependencies": { "arr-diff": { @@ -4303,381 +3436,46 @@ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", "dev": true }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" } }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "is-plain-object": "^2.0.4" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } - } - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, - "merge-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", - "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } } } }, "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", "dev": true }, "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", "dev": true, "requires": { - "mime-db": "~1.33.0" + "mime-db": "~1.37.0" } }, "minimatch": { @@ -4697,7 +3495,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -4707,7 +3504,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -4815,12 +3611,6 @@ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", "dev": true }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -4850,17 +3640,18 @@ }, "next-tick": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, "node.extend": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.6.tgz", - "integrity": "sha1-p7iCyC1sk6SGOlUEvV3o7IYli5Y=", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.8.tgz", + "integrity": "sha512-L/dvEBwyg3UowwqOUTyDsGBU6kjBQOpOhshio9V3i3BMPv5YUb9+mWNN8MK0IbWqT0AqaTSONZf0aTuMMahWgA==", "dev": true, "requires": { - "is": "^3.1.0" + "has": "^1.0.3", + "is": "^3.2.1" } }, "normalize-package-data": { @@ -4909,22 +3700,15 @@ "dev": true }, "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "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=", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", @@ -4935,16 +3719,31 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, "requires": { "is-descriptor": "^0.1.0" + }, + "dependencies": { + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } } }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -4961,17 +3760,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, "requires": { "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "object.assign": { @@ -5003,21 +3793,6 @@ "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true } } }, @@ -5029,27 +3804,6 @@ "requires": { "for-own": "^1.0.0", "make-iterator": "^1.0.0" - }, - "dependencies": { - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - } - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" } }, "object.pick": { @@ -5059,14 +3813,6 @@ "dev": true, "requires": { "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "object.reduce": { @@ -5100,12 +3846,11 @@ } }, "ordered-read-streams": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", - "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", "dev": true, "requires": { - "is-stream": "^1.0.1", "readable-stream": "^2.0.1" } }, @@ -5140,35 +3885,6 @@ "path-root": "^0.1.1" } }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -5187,8 +3903,7 @@ "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, "path-dirname": { "version": "1.0.2", @@ -5251,7 +3966,7 @@ }, "pause-stream": { "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", "dev": true, "requires": { @@ -5306,18 +4021,11 @@ "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "pretty-hrtime": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, @@ -5333,6 +4041,12 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "psl": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", + "dev": true + }, "pump": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", @@ -5355,9 +4069,9 @@ } }, "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, "qs": { @@ -5367,45 +4081,20 @@ "dev": true }, "querystringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", - "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz", + "integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==", "dev": true }, "queue": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/queue/-/queue-3.1.0.tgz", - "integrity": "sha1-bEnQHwCeIlZ4h4nyv/rGuLmZBYU=", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/queue/-/queue-4.5.1.tgz", + "integrity": "sha512-AMD7w5hRXcFSb8s9u38acBZ+309u6GsiibP4/0YacJeaurRshogB7v/ZcVPxP5gD5+zIw6ixRHdutiYUJfwKHw==", "dev": true, "requires": { "inherits": "~2.0.0" } }, - "randomatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", - "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -5417,339 +4106,42 @@ "path-type": "^1.0.0" } }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "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.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.0.3", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } - } - }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "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.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.0.3", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -5765,20 +4157,10 @@ "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", "dev": true }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" @@ -5788,7 +4170,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -5798,7 +4179,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -5833,16 +4213,14 @@ "dev": true }, "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "replace-ext": { "version": "1.0.0", @@ -5862,31 +4240,45 @@ } }, "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "dev": true, "requires": { "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", + "aws4": "^1.8.0", "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" + "uuid": "^3.3.2" + }, + "dependencies": { + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } } }, "require-directory": { @@ -5938,14 +4330,12 @@ "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, "rimraf": { "version": "2.6.2", @@ -5964,9 +4354,8 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, "requires": { "ret": "~0.1.10" } @@ -6001,7 +4390,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -6013,7 +4401,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -6045,7 +4432,6 @@ "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, "requires": { "base": "^0.11.1", "debug": "^2.2.0", @@ -6061,7 +4447,6 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -6070,16 +4455,29 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, @@ -6087,7 +4485,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", @@ -6098,51 +4495,9 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, "requires": { "is-descriptor": "^1.0.0" } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, @@ -6150,7 +4505,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, "requires": { "kind-of": "^3.2.0" }, @@ -6159,7 +4513,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -6176,7 +4529,6 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, "requires": { "atob": "^2.1.1", "decode-uri-component": "^0.2.0", @@ -6186,9 +4538,9 @@ } }, "source-map-support": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", - "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", + "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -6198,8 +4550,7 @@ "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, "sparkles": { "version": "1.0.0", @@ -6241,7 +4592,7 @@ }, "split": { "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "resolved": "http://registry.npmjs.org/split/-/split-0.3.3.tgz", "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", "dev": true, "requires": { @@ -6252,7 +4603,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, "requires": { "extend-shallow": "^3.0.0" }, @@ -6261,7 +4611,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -6271,7 +4620,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -6279,9 +4627,9 @@ } }, "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", + "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -6311,7 +4659,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" @@ -6321,16 +4668,32 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, "requires": { "is-descriptor": "^0.1.0" + }, + "dependencies": { + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + } } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, "stream-combiner": { "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "resolved": "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", "dev": true, "requires": { @@ -6393,25 +4756,6 @@ "ansi-regex": "^2.0.0" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-bom-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", - "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", - "dev": true, - "requires": { - "first-chunk-stream": "^1.0.0", - "strip-bom": "^2.0.0" - } - }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -6439,7 +4783,7 @@ }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, "requires": { @@ -6489,30 +4833,19 @@ } }, "to-absolute-glob": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", - "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", "dev": true, "requires": { - "extend-shallow": "^2.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" } }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -6521,7 +4854,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -6532,7 +4864,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", @@ -6544,7 +4875,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -6554,7 +4884,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -6565,30 +4894,9 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } } }, "to-through": { @@ -6601,12 +4909,21 @@ } }, "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "requires": { + "psl": "^1.1.24", "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } } }, "tslib": { @@ -6682,8 +4999,7 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true + "dev": true }, "typedarray": { "version": "0.0.6", @@ -6730,7 +5046,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", @@ -6741,14 +5056,12 @@ "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -6757,7 +5070,6 @@ "version": "0.4.3", "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -6781,7 +5093,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" @@ -6791,7 +5102,6 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", @@ -6802,7 +5112,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, "requires": { "isarray": "1.0.0" } @@ -6812,14 +5121,7 @@ "has-values": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" } } }, @@ -6829,16 +5131,24 @@ "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", "dev": true }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" }, "url-parse": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz", - "integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.4.tgz", + "integrity": "sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg==", "dev": true, "requires": { "querystringify": "^2.0.0", @@ -6848,8 +5158,7 @@ "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "util-deprecate": { "version": "1.0.2", @@ -6858,9 +5167,9 @@ "dev": true }, "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true }, "v8flags": { @@ -6872,12 +5181,6 @@ "homedir-polyfill": "^1.0.1" } }, - "vali-date": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", - "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", - "dev": true - }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -6916,51 +5219,54 @@ } }, "vinyl-fs": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", - "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", "dev": true, "requires": { - "duplexify": "^3.2.0", - "glob-stream": "^5.3.2", + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", "graceful-fs": "^4.0.0", - "gulp-sourcemaps": "1.6.0", - "is-valid-glob": "^0.3.0", + "is-valid-glob": "^1.0.0", "lazystream": "^1.0.0", - "lodash.isequal": "^4.0.0", - "merge-stream": "^1.0.0", - "mkdirp": "^0.5.0", - "object-assign": "^4.0.0", - "readable-stream": "^2.0.4", - "strip-bom": "^2.0.0", - "strip-bom-stream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", "through2": "^2.0.0", - "through2-filter": "^2.0.0", - "vali-date": "^1.0.0", - "vinyl": "^1.0.0" + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" }, "dependencies": { "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", "dev": true }, "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", "dev": true, "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" } } } @@ -7028,24 +5334,24 @@ } }, "vscode": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.18.tgz", - "integrity": "sha512-SyDw4qFwZ+WthZX7RWp71PNiWLF7VhpM65j2oryY/6jtSORd8qH6J8vclwWZJ6Jvu0EH7JamO2RWNfBfsMR9Zw==", + "version": "1.1.26", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.26.tgz", + "integrity": "sha512-z1Nf5J38gjUFbuDCbJHPN6OJ//5EG+e/yHlh6ERxj/U9B2Qc3aiHaFr38/fee/GGnxvRw/XegLMOG+UJwKi/Qg==", "dev": true, "requires": { "glob": "^7.1.2", "gulp-chmod": "^2.0.0", "gulp-filter": "^5.0.1", "gulp-gunzip": "1.0.0", - "gulp-remote-src-vscode": "^0.5.0", - "gulp-symdest": "^1.1.0", + "gulp-remote-src-vscode": "^0.5.1", "gulp-untar": "^0.0.7", - "gulp-vinyl-zip": "^2.1.0", + "gulp-vinyl-zip": "^2.1.2", "mocha": "^4.0.1", - "request": "^2.83.0", + "request": "^2.88.0", "semver": "^5.4.1", "source-map-support": "^0.5.0", - "url-parse": "^1.1.9", + "url-parse": "^1.4.3", + "vinyl-fs": "^3.0.3", "vinyl-source-stream": "^1.1.0" } }, @@ -7073,6 +5379,18 @@ "integrity": "sha512-WVCnP+uLxlqB6UD98yQNV47mR5Rf79LFxpuZhSPhEf0Sb4tPZed3a63n003/dchhOwyCTCBuNN4n8XKJkLEI1Q==", "requires": { "applicationinsights": "1.0.6" + }, + "dependencies": { + "applicationinsights": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.0.6.tgz", + "integrity": "sha512-VQT3kBpJVPw5fCO5n+WUeSx0VHjxFtD7znYbILBlVgOS9/cMDuGFmV2Br3ObzFyZUDGNbEfW36fD1y2/vAiCKw==", + "requires": { + "diagnostic-channel": "0.2.0", + "diagnostic-channel-publishers": "0.2.1", + "zone.js": "0.7.6" + } + } } }, "vscode-jsonrpc": { @@ -7199,9 +5517,9 @@ } }, "yazl": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.3.tgz", - "integrity": "sha1-7CblzIfVYBud+EMtvdPNLlFzoHE=", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", + "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", "dev": true, "requires": { "buffer-crc32": "~0.2.3" diff --git a/Extension/package.json b/Extension/package.json index 383658d2e7..24373feb6f 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -12,7 +12,7 @@ }, "license": "SEE LICENSE IN LICENSE.txt", "engines": { - "vscode": "^1.26.0" + "vscode": "^1.30.0" }, "bugs": { "url": "https://github.com/Microsoft/vscode-cpptools/issues", @@ -603,7 +603,6 @@ "cpp" ] }, - "adapterExecutableCommand": "extension.cppdbgAdapterExecutableCommand", "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", "variables": { "pickProcess": "extension.pickNativeProcess", @@ -1100,7 +1099,6 @@ "cpp" ] }, - "adapterExecutableCommand": "extension.cppvsdbgAdapterExecutableCommand", "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", "variables": { "pickProcess": "extension.pickNativeProcess" @@ -1397,7 +1395,7 @@ "tslint-no-unused-expression-chai": "0.0.3", "typescript": "^2.5.3", "vrsource-tslint-rules": "^5.8.2", - "vscode": "^1.1.18" + "vscode": "^1.1.26" }, "dependencies": { "@types/minimatch": "^3.0.3", diff --git a/Extension/src/Debugger/debugAdapterDescriptorFactory.ts b/Extension/src/Debugger/debugAdapterDescriptorFactory.ts new file mode 100644 index 0000000000..675e3271c2 --- /dev/null +++ b/Extension/src/Debugger/debugAdapterDescriptorFactory.ts @@ -0,0 +1,55 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. + * See 'LICENSE' in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + +import * as vscode from "vscode"; +import * as util from '../common'; +import * as path from 'path'; +import * as os from 'os'; + +// Registers DebugAdapterDescriptorFactory for `cppdbg` and `cppvsdbg`. If it is not ready, it will prompt a wait for the download dialog. +// Note: util.extensionContext.extensionPath is needed for the commands because VsCode does not support relative paths for adapterExecutableComand + +export class CppdbgDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescriptorFactory { + public static DEBUG_TYPE : string = "cppdbg"; + + createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult { + return util.isExtensionReady().then(ready => { + if (ready) { + let command: string = path.join(util.extensionContext.extensionPath, './debugAdapters/OpenDebugAD7'); + + // Windows has the exe in debugAdapters/bin. + if (os.platform() === 'win32') { + command = path.join(util.extensionContext.extensionPath, "./debugAdapters/bin/OpenDebugAD7.exe"); + } + + return new vscode.DebugAdapterExecutable(command); + } else { + throw new Error(util.extensionNotReadyString); + } + }); + } +} + +export class CppvsdbgDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescriptorFactory { + public static DEBUG_TYPE : string = "cppvsdbg"; + + createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult { + if (os.platform() !== 'win32') { + vscode.window.showErrorMessage("Debugger type 'cppvsdbg' is not avaliable for non-Windows machines."); + return null; + } else { + return util.isExtensionReady().then(ready => { + if (ready) { + return new vscode.DebugAdapterExecutable( + path.join(util.extensionContext.extensionPath, './debugAdapters/vsdbg/bin/vsdbg.exe'), + ['--interpreter=vscode'] + ); + } else { + throw new Error(util.extensionNotReadyString); + } + }); + } + } +} \ No newline at end of file diff --git a/Extension/src/Debugger/extension.ts b/Extension/src/Debugger/extension.ts index 9438b6a3a1..b4558a537b 100644 --- a/Extension/src/Debugger/extension.ts +++ b/Extension/src/Debugger/extension.ts @@ -8,8 +8,7 @@ import * as os from 'os'; import { AttachPicker, RemoteAttachPicker, AttachItemsProvider } from './attachToProcess'; import { NativeAttachItemsProviderFactory } from './nativeAttach'; import { ConfigurationAssetProviderFactory, CppVsDbgConfigurationProvider, CppDbgConfigurationProvider, ConfigurationSnippetProvider, IConfigurationAssetProvider } from './configurationProvider'; -import * as util from '../common'; -import * as path from 'path'; +import { CppdbgDebugAdapterDescriptorFactory, CppvsdbgDebugAdapterDescriptorFactory } from './debugAdapterDescriptorFactory'; // The extension deactivate method is asynchronous, so we handle the disposables ourselves instead of using extensonContext.subscriptions. let disposables: vscode.Disposable[] = []; @@ -38,57 +37,17 @@ export function initialize(): void { language: 'jsonc', pattern: '**/launch.json' }]; + // ConfigurationSnippetProvider needs to be initiallized after configurationProvider calls getConfigurationSnippets. disposables.push(vscode.languages.registerCompletionItemProvider(launchJsonDocumentSelector, new ConfigurationSnippetProvider(configurationProvider))); - // Activate Adapter Commands - registerAdapterExecutableCommands(); + // Register Debug Adapters + disposables.push(vscode.debug.registerDebugAdapterDescriptorFactory(CppvsdbgDebugAdapterDescriptorFactory.DEBUG_TYPE, new CppvsdbgDebugAdapterDescriptorFactory())); + disposables.push(vscode.debug.registerDebugAdapterDescriptorFactory(CppdbgDebugAdapterDescriptorFactory.DEBUG_TYPE, new CppdbgDebugAdapterDescriptorFactory())); vscode.Disposable.from(...disposables); } export function dispose(): void { disposables.forEach(d => d.dispose()); -} - -// Registers adapterExecutableCommands for cppdbg and cppvsdbg. If it is not ready, it will prompt waiting for the download. -// -// Note: util.extensionContext.extensionPath is needed for the commands because VsCode does not support relative paths for adapterExecutableComand -function registerAdapterExecutableCommands(): void { - disposables.push(vscode.commands.registerCommand('extension.cppdbgAdapterExecutableCommand', () => { - return util.isExtensionReady().then(ready => { - if (ready) { - let command: string = path.join(util.extensionContext.extensionPath, './debugAdapters/OpenDebugAD7'); - - // Windows has the exe in debugAdapters/bin. - if (os.platform() === 'win32') { - command = path.join(util.extensionContext.extensionPath, "./debugAdapters/bin/OpenDebugAD7.exe"); - } - - return { - command: command - }; - } else { - throw new Error(util.extensionNotReadyString); - } - }); - })); - - disposables.push(vscode.commands.registerCommand('extension.cppvsdbgAdapterExecutableCommand', () => { - if (os.platform() !== 'win32') { - vscode.window.showErrorMessage("Debugger type 'cppvsdbg' is not avaliable for non-Windows machines."); - return null; - } else { - return util.isExtensionReady().then(ready => { - if (ready) { - return { - command: path.join(util.extensionContext.extensionPath, './debugAdapters/vsdbg/bin/vsdbg.exe'), - args: ['--interpreter=vscode'] - }; - } else { - throw new Error(util.extensionNotReadyString); - } - }); - } - })); -} +} \ No newline at end of file From af516b9515fbbbd100851093ecc136ac2d8c3ffa Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Mon, 28 Jan 2019 17:44:04 -0800 Subject: [PATCH 03/51] Seanmcm/0 22 0 changelog1 (#3101) * Update changelog, version, and fwlinks. * Add telemetry for C/C++ Clang Command Adapter usage. * Update language-service.md. --- .github/ISSUE_TEMPLATE/language-service.md | 4 +-- Extension/CHANGELOG.md | 4 +++ Extension/package-lock.json | 40 +++++++++++----------- Extension/package.json | 10 +++--- Extension/src/LanguageServer/extension.ts | 13 ++++++- 5 files changed, 43 insertions(+), 28 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/language-service.md b/.github/ISSUE_TEMPLATE/language-service.md index 737b9daaa4..15438555fe 100644 --- a/.github/ISSUE_TEMPLATE/language-service.md +++ b/.github/ISSUE_TEMPLATE/language-service.md @@ -34,6 +34,6 @@ about: 'Issues pertaining to IntelliSense, autocomplete, code editing, etc. ' **Additional context** diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index c479629532..d8f38b53a3 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,9 @@ # C/C++ for Visual Studio Code Change Log +## Version 0.22.0-insiders February 5, 2019 +* Fix signature help active parameter selection when parameter names are missing or subsets of each other. [#2952](https://github.com/Microsoft/vscode-cpptools/issues/2952) +* Render macro hover expansions as C/C++. [#3075](https://github.com/Microsoft/vscode-cpptools/issues/3075) + ## Version 0.21.0 January 23, 2019 ### New Features * Add documentation comments for hover, completion, and signature help. [#399](https://github.com/Microsoft/vscode-cpptools/issues/399) diff --git a/Extension/package-lock.json b/Extension/package-lock.json index 936ac10366..4512e8f874 100644 --- a/Extension/package-lock.json +++ b/Extension/package-lock.json @@ -1,6 +1,6 @@ { "name": "cpptools", - "version": "0.21.0-master", + "version": "0.22.0-master", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -396,7 +396,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -833,7 +833,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -848,7 +848,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -1051,7 +1051,7 @@ }, "deep-assign": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", "dev": true, "requires": { @@ -1132,7 +1132,7 @@ }, "duplexer": { "version": "0.1.1", - "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", "dev": true }, @@ -1292,7 +1292,7 @@ }, "event-stream": { "version": "3.3.4", - "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", "dev": true, "requires": { @@ -2367,7 +2367,7 @@ }, "readable-stream": { "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { @@ -2379,13 +2379,13 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "through2": { "version": "0.6.5", - "resolved": "http://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "dev": true, "requires": { @@ -3003,7 +3003,7 @@ }, "is-obj": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, @@ -3214,7 +3214,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -3385,7 +3385,7 @@ }, "map-stream": { "version": "0.1.0", - "resolved": "http://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", "dev": true }, @@ -3640,7 +3640,7 @@ }, "next-tick": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, @@ -3966,7 +3966,7 @@ }, "pause-stream": { "version": "0.0.11", - "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", "dev": true, "requires": { @@ -4025,7 +4025,7 @@ }, "pretty-hrtime": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, @@ -4354,7 +4354,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { "ret": "~0.1.10" @@ -4592,7 +4592,7 @@ }, "split": { "version": "0.3.3", - "resolved": "http://registry.npmjs.org/split/-/split-0.3.3.tgz", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", "dev": true, "requires": { @@ -4693,7 +4693,7 @@ }, "stream-combiner": { "version": "0.0.4", - "resolved": "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", "dev": true, "requires": { @@ -4783,7 +4783,7 @@ }, "tar": { "version": "2.2.1", - "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, "requires": { diff --git a/Extension/package.json b/Extension/package.json index 24373feb6f..6e68a19f07 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -2,7 +2,7 @@ "name": "cpptools", "displayName": "C/C++", "description": "C/C++ IntelliSense, debugging, and code browsing.", - "version": "0.21.0-master", + "version": "0.22.0-master", "publisher": "ms-vscode", "preview": true, "icon": "LanguageCCPP_color_128x.png", @@ -1415,7 +1415,7 @@ "runtimeDependencies": [ { "description": "C/C++ language components (Linux / x86_64)", - "url": "https://go.microsoft.com/fwlink/?linkid=2037608", + "url": "https://go.microsoft.com/fwlink/?linkid=2065016", "platforms": [ "linux" ], @@ -1429,7 +1429,7 @@ }, { "description": "C/C++ language components (Linux / x86)", - "url": "https://go.microsoft.com/fwlink/?linkid=2037526", + "url": "https://go.microsoft.com/fwlink/?linkid=2065017", "platforms": [ "linux" ], @@ -1445,7 +1445,7 @@ }, { "description": "C/C++ language components (OS X)", - "url": "https://go.microsoft.com/fwlink/?linkid=2037527", + "url": "https://go.microsoft.com/fwlink/?linkid=2064955", "platforms": [ "darwin" ], @@ -1456,7 +1456,7 @@ }, { "description": "C/C++ language components (Windows)", - "url": "https://go.microsoft.com/fwlink/?linkid=2037609", + "url": "https://go.microsoft.com/fwlink/?linkid=2065027", "platforms": [ "win32" ], diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index ae9df20d3c..dc4d9354d2 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -14,7 +14,7 @@ import { UI, getUI } from './ui'; import { Client } from './client'; import { ClientCollection } from './clientCollection'; import { CppSettings } from './settings'; -import { PersistentWorkspaceState } from './persistentState'; +import { PersistentWorkspaceState, PersistentState } from './persistentState'; import { getLanguageConfig } from './languageConfig'; import { getCustomConfigProviders } from './customProviders'; import { PlatformInformation } from '../platform'; @@ -108,6 +108,17 @@ function onActivationEvent(): void { function realActivation(): void { if (new CppSettings().intelliSenseEngine === "Disabled") { throw new Error("Do not activate the extension when IntelliSense is disabled."); + } else { + let checkForConflictingExtensions: PersistentState = new PersistentState("CPP." + util.packageJson.version + ".checkForConflictingExtensions", true); + if (checkForConflictingExtensions.Value) { + checkForConflictingExtensions.Value = false; + let clangCommandAdapterActive: boolean = vscode.extensions.all.some((extension: vscode.Extension, index: number, array: vscode.Extension[]): boolean => { + return extension.isActive && extension.id === "mitaki28.vscode-clang"; + }); + if (clangCommandAdapterActive) { + telemetry.logLanguageServerEvent("conflictingExtension"); + } + } } realActivationOccurred = true; From 2713e70563798ffdf78e3f324dd336cfa2974c9d Mon Sep 17 00:00:00 2001 From: "Bob Brown (DEVDIV)" Date: Tue, 29 Jan 2019 10:39:37 -0800 Subject: [PATCH 04/51] #3102 - fix compilerPath/compileCommands policy --- Extension/src/LanguageServer/configurations.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 69ffbc4bb1..9474e055fa 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -242,7 +242,10 @@ export class CppProperties { if (isUnset(settings.defaultWindowsSdkVersion) && this.defaultWindowsSdkVersion && process.platform === 'win32') { configuration.windowsSdkVersion = this.defaultWindowsSdkVersion; } - if (isUnset(settings.defaultCompilerPath) && this.defaultCompilerPath) { + if (isUnset(settings.defaultCompilerPath) && this.defaultCompilerPath && + isUnset(settings.defaultCompileCommands) && !configuration.compileCommands) { + // compile_commands.json already specifies a compiler. compilerPath overrides the compile_commands.json compiler so + // don't set a default when compileCommands is in use. configuration.compilerPath = this.defaultCompilerPath; } if (isUnset(settings.defaultCStandard) && this.defaultCStandard) { From bf6b4aa54e300118760e40b35606eb02fb06c2cf Mon Sep 17 00:00:00 2001 From: Tucker Kern Date: Thu, 31 Jan 2019 19:20:23 -0700 Subject: [PATCH 05/51] Fix regex to allow non-recursive includePath (#3122) * Fix regex to allow non-recursive includePath when constructing browse.path from includePath --- Extension/CHANGELOG.md | 2 ++ Extension/src/LanguageServer/configurations.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index d8f38b53a3..7fa4064ff8 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -3,6 +3,8 @@ ## Version 0.22.0-insiders February 5, 2019 * Fix signature help active parameter selection when parameter names are missing or subsets of each other. [#2952](https://github.com/Microsoft/vscode-cpptools/issues/2952) * Render macro hover expansions as C/C++. [#3075](https://github.com/Microsoft/vscode-cpptools/issues/3075) +* Allow * in includePath to apply to browse.path when browse.path is not specified. [#3121](https://github.com/Microsoft/vscode-cpptools/issues/3121) + * Tucker Kern (@mill1000) [PR #3122](https://github.com/Microsoft/vscode-cpptools/pull/3122) ## Version 0.21.0 January 23, 2019 ### New Features diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 9474e055fa..7a75d5396b 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -481,7 +481,7 @@ export class CppProperties { // If the user doesn't set browse.path, copy the includePath over. Make sure ${workspaceFolder} is in there though... configuration.browse.path = configuration.includePath.slice(0); if (-1 === configuration.includePath.findIndex((value: string, index: number) => { - return !!value.match(/^\$\{(workspaceRoot|workspaceFolder)\}(\\|\\\*\*|\/|\/\*\*)?$/g); + return !!value.match(/^\$\{(workspaceRoot|workspaceFolder)\}(\\\*{0,2}|\/\*{0,2})?$/g); })) { configuration.browse.path.push("${workspaceFolder}"); } From 13b78f21298236e93472217ea19cf5a6710678fc Mon Sep 17 00:00:00 2001 From: xisui-MSFT Date: Sat, 2 Feb 2019 18:24:42 -0800 Subject: [PATCH 06/51] Add Chinese support for commands --- Extension/package.nls.zh-cn.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Extension/package.nls.zh-cn.json diff --git a/Extension/package.nls.zh-cn.json b/Extension/package.nls.zh-cn.json new file mode 100644 index 0000000000..85c66d0015 --- /dev/null +++ b/Extension/package.nls.zh-cn.json @@ -0,0 +1,18 @@ +{ + "c_cpp.command.configurationSelect.title": "选择配置...", + "c_cpp.command.configurationProviderSelect.title": "更换配置提供程序...", + "c_cpp.command.configurationEdit.title": "编辑配置...", + "c_cpp.command.goToDeclaration.title": "跳转到声明", + "c_cpp.command.peekDeclaration.title": "查看声明", + "c_cpp.command.switchHeaderSource.title": "切换头文件/源文件", + "c_cpp.command.navigate.title": "导航...", + "c_cpp.command.toggleErrorSquiggles.title": "切换错误下划线", + "c_cpp.command.toggleIncludeFallback.title": "切换IntelliSense引擎头文件包含错误回退", + "c_cpp.command.toggleDimInactiveRegions.title": "切换非活跃区域着色", + "c_cpp.command.showReleaseNotes.title": "查看版本说明", + "c_cpp.command.resetDatabase.title": "重置IntelliSense数据", + "c_cpp.command.pauseParsing.title": "暂停解析", + "c_cpp.command.resumeParsing.title": "继续解析", + "c_cpp.command.showParsingCommands.title": "查看解析命令", + "c_cpp.command.takeSurvey.title": "调查问卷" +} \ No newline at end of file From 7a20270b103d44184d93a607e9822801042412e5 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 5 Feb 2019 15:46:49 -0800 Subject: [PATCH 07/51] Seanmcm/suggest snippets setting (#3135) * Add suggestSnippets setting. --- Extension/package.json | 6 ++++++ Extension/src/LanguageServer/client.ts | 1 + Extension/src/LanguageServer/settings.ts | 1 + 3 files changed, 8 insertions(+) diff --git a/Extension/package.json b/Extension/package.json index 6e68a19f07..dd373defc1 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -466,6 +466,12 @@ "default": "Default", "description": "Set to \"Insiders\" to automatically download and install the latest Insiders builds of the extension, which include upcoming features and bug fixes.", "scope": "resource" + }, + "C_Cpp.suggestSnippets": { + "type": "boolean", + "default": true, + "description": "If true, snippets are provided by the language server.", + "scope": "resource" } } }, diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index a4ba37098a..e7fa65e3f7 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -399,6 +399,7 @@ class DefaultClient implements Client { autocomplete: settings.autoComplete, errorSquiggles: settings.errorSquiggles, dimInactiveRegions: settings.dimInactiveRegions, + suggestSnippets: settings.suggestSnippets, loggingLevel: settings.loggingLevel, workspaceParsingPriority: settings.workspaceParsingPriority, workspaceSymbols: settings.workspaceSymbols, diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index 50becfb8f9..cc21c6bed7 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -36,6 +36,7 @@ export class CppSettings extends Settings { public get clangFormatSortIncludes(): string { return super.Section.get("clang_format_sortIncludes"); } public get clangFormatOnSave(): string { return super.Section.get("clang_format_formatOnSave"); } public get formatting(): string { return super.Section.get("formatting"); } + public get suggestSnippets(): boolean { return super.Section.get("suggestSnippets"); } public get intelliSenseEngine(): string { return super.Section.get("intelliSenseEngine"); } public get intelliSenseEngineFallback(): string { return super.Section.get("intelliSenseEngineFallback"); } public get errorSquiggles(): string { return super.Section.get("errorSquiggles"); } From 373e9be4cb270e6cd7ad65bd0f791005ae1a6ea3 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Wed, 6 Feb 2019 14:44:40 -0800 Subject: [PATCH 08/51] Update changelog for 0.22.0-insiders. (#3137) * Update changelog for 0.22.0-insiders. --- Extension/CHANGELOG.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 7fa4064ff8..c3c37d8f94 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,10 +1,20 @@ # C/C++ for Visual Studio Code Change Log -## Version 0.22.0-insiders February 5, 2019 +## Version 0.22.0-insiders February 6, 2019 +* Fix crash on Windows when 8.3 filenames are used. [#2453](https://github.com/Microsoft/vscode-cpptools/issues/2453), [#3104](https://github.com/Microsoft/vscode-cpptools/issues/3104) * Fix signature help active parameter selection when parameter names are missing or subsets of each other. [#2952](https://github.com/Microsoft/vscode-cpptools/issues/2952) +* Fix `--enable-pretty-printing` with `gdb` when complex objects are used as keys in maps. [#3024](https://github.com/Microsoft/vscode-cpptools/issues/3024) +* Fix IntelliSense-based `Go to Definition` for `noexcept` methods. [#3060](https://github.com/Microsoft/vscode-cpptools/issues/3060) * Render macro hover expansions as C/C++. [#3075](https://github.com/Microsoft/vscode-cpptools/issues/3075) -* Allow * in includePath to apply to browse.path when browse.path is not specified. [#3121](https://github.com/Microsoft/vscode-cpptools/issues/3121) +* Enable completion after `struct` when manually invoked. [#3080](https://github.com/Microsoft/vscode-cpptools/issues/3080) +* Add `C_Cpp.suggestSnippets` setting to disable language server snippets. [#3083](https://github.com/Microsoft/vscode-cpptools/issues/3083) +* Fix `compilerPath` not getting priority over the `compile_commands.json` compiler. [#3102](https://github.com/Microsoft/vscode-cpptools/issues/3102) +* Fix Linux `compile_commands.json` compiler querying with relative paths. [#3112](https://github.com/Microsoft/vscode-cpptools/issues/3112) +* Allow `*` in `includePath` to apply to `browse.path` when `browse.path` is not specified. [#3121](https://github.com/Microsoft/vscode-cpptools/issues/3121) * Tucker Kern (@mill1000) [PR #3122](https://github.com/Microsoft/vscode-cpptools/pull/3122) +* Disable `(` and `<` completion commit characters. [#3127](https://github.com/Microsoft/vscode-cpptools/issues/3127) +* Add Chinese translations for command titles. [PR #3128](https://github.com/Microsoft/vscode-cpptools/pull/3128) +* Fix other unreported IntelliSense engine bugs. ## Version 0.21.0 January 23, 2019 ### New Features From f216e0262acd5958f8ef8665d374196d5ef1b0b2 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 8 Feb 2019 18:47:52 -0800 Subject: [PATCH 09/51] Update extend version. (#3146) --- Extension/package-lock.json | 6 +++--- Extension/package.json | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Extension/package-lock.json b/Extension/package-lock.json index 4512e8f874..b54c6cc404 100644 --- a/Extension/package-lock.json +++ b/Extension/package-lock.json @@ -1382,9 +1382,9 @@ } }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, "extend-shallow": { diff --git a/Extension/package.json b/Extension/package.json index dd373defc1..d31cda7333 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -468,10 +468,10 @@ "scope": "resource" }, "C_Cpp.suggestSnippets": { - "type": "boolean", - "default": true, - "description": "If true, snippets are provided by the language server.", - "scope": "resource" + "type": "boolean", + "default": true, + "description": "If true, snippets are provided by the language server.", + "scope": "resource" } } }, @@ -1401,7 +1401,8 @@ "tslint-no-unused-expression-chai": "0.0.3", "typescript": "^2.5.3", "vrsource-tslint-rules": "^5.8.2", - "vscode": "^1.1.26" + "vscode": "^1.1.26", + "extend": "3.0.2" }, "dependencies": { "@types/minimatch": "^3.0.3", From 035d0284d9b6b15b3a4a9e52f7ec1d343383dc0a Mon Sep 17 00:00:00 2001 From: Griffin Downs <35574547+grdowns@users.noreply.github.com> Date: Wed, 13 Feb 2019 16:00:31 -0800 Subject: [PATCH 10/51] Grdowns/build tasks (#3118) * Generate a C/C++ build task * Cleaning * Move args into definition * Add args to shellexecution to allow calling the task without first configuring; Add TODO's * Read compiler paths sent in defaults to generate task list * Rename compilerPaths to compilerInfo; Filter tasks based on file extension * Use our own file extension filters to decide whether tasks are presented * Show dialog when no compilers are found * Display a message if no compilers are found * Add compilerPath getter to config; Use it to offer another task * Refactoring; Commenting * Remove CompilerInfo namespace; Formatting; Change return vals * Commenting; Add telemetry; Inverse condition * Change output program based on OS; Remove message and collect telemetry instead * Filter out redundant compiler entries * Remove TODO; Get proper exe name; Properly reassign compilerPaths after filtering * Commenting; Fix cwd mingw bug * Commenting; Refactor * Mark compilerInfo const * Remove whitespace; Remove bad comment * Remove whitespace * Replace unique algorithm with a map * pre-compute basename * Move comment * Commenting; Ensure user's compilerPath setting is used * Use indexOf instead of find * Simplify isHeader calculation by using some instead of every * Don't redundantly check extensions; Use some instead of indexOf * Add comment punctuation Use file macro instead of fileDirName and fileBaseName Change path provider name; expose cwd in definition Add shell task definition (it's not built into vs code apparently) * Lowercase file extension to match; Count extensionless files as headers * Add newline * Change CompilerInfo to KnownCompiler * Support ambiguous file extension * Early out for extensionless files * Commenting * Commenting; Rename telemetry event * Change languageAssociation to isC * Fix bug where cwd was not used; Add comment --- Extension/package.json | 19 +++ Extension/src/LanguageServer/client.ts | 12 ++ .../src/LanguageServer/configurations.ts | 14 ++ Extension/src/LanguageServer/extension.ts | 144 ++++++++++++++++++ 4 files changed, 189 insertions(+) diff --git a/Extension/package.json b/Extension/package.json index d31cda7333..1c6283436b 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -43,6 +43,25 @@ ], "main": "./out/src/main", "contributes": { + "taskDefinitions": [ + { + "type": "shell", + "properties": { + "label": { + "type": "string" + }, + "command": { + "type": "string" + }, + "args": { + "type": "array" + }, + "options": { + "type": "array" + } + } + } + ], "problemMatchers": [ { "name": "gcc", diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index e7fa65e3f7..12c8736d39 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -202,6 +202,8 @@ export interface Client { updateCustomBrowseConfiguration(requestingProvider?: CustomConfigurationProvider1): Thenable; provideCustomConfiguration(document: vscode.TextDocument): Promise; getCurrentConfigName(): Thenable; + getCompilerPath(): Thenable; + getKnownCompilers(): Thenable; takeOwnership(document: vscode.TextDocument): void; queueTask(task: () => Thenable): Thenable; requestWhenReady(request: () => Thenable): Thenable; @@ -662,6 +664,14 @@ class DefaultClient implements Client { return this.queueTask(() => Promise.resolve(this.configuration.CurrentConfiguration.name)); } + public getCompilerPath(): Thenable { + return this.queueTask(() => Promise.resolve(this.configuration.CompilerPath)); + } + + public getKnownCompilers(): Thenable { + return this.queueTask(() => Promise.resolve(this.configuration.KnownCompiler)); + } + /** * Take ownership of a document that was previously serviced by another client. * This process involves sending a textDocument/didOpen message to the server so @@ -1350,6 +1360,8 @@ class NullClient implements Client { updateCustomBrowseConfiguration(requestingProvider?: CustomConfigurationProvider1): Thenable { return Promise.resolve(); } provideCustomConfiguration(document: vscode.TextDocument): Promise { return Promise.resolve(); } getCurrentConfigName(): Thenable { return Promise.resolve(""); } + getCompilerPath(): Thenable { return Promise.resolve(""); } + getKnownCompilers(): Thenable { return Promise.resolve([]); } takeOwnership(document: vscode.TextDocument): void {} queueTask(task: () => Thenable): Thenable { return task(); } requestWhenReady(request: () => Thenable): Thenable { return; } diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 7a75d5396b..9a5029077d 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -46,6 +46,7 @@ export interface ConfigurationJson { export interface Configuration { name: string; compilerPath?: string; + knownCompilers?: KnownCompiler[]; cStandard?: string; cppStandard?: string; includePath?: string[]; @@ -65,8 +66,14 @@ export interface Browse { databaseFilename?: string; } +export interface KnownCompiler { + path: string; + isC: boolean; +} + export interface CompilerDefaults { compilerPath: string; + knownCompilers: KnownCompiler[]; cStandard: string; cppStandard: string; includes: string[]; @@ -85,6 +92,7 @@ export class CppProperties { private configFileWatcherFallbackTime: Date = new Date(); // Used when file watching fails. private compileCommandFileWatchers: fs.FSWatcher[] = []; private defaultCompilerPath: string = null; + private knownCompilers: KnownCompiler[] = null; private defaultCStandard: string = null; private defaultCppStandard: string = null; private defaultIncludes: string[] = null; @@ -147,6 +155,8 @@ export class CppProperties { public get Configurations(): Configuration[] { return this.configurationJson.configurations; } public get CurrentConfigurationIndex(): number { return this.currentConfigurationIndex.Value; } public get CurrentConfiguration(): Configuration { return this.Configurations[this.CurrentConfigurationIndex]; } + public get CompilerPath(): string { return this.CurrentConfiguration.compilerPath; } + public get KnownCompiler(): KnownCompiler[] { return this.knownCompilers; } public get CurrentConfigurationProvider(): string|null { if (this.CurrentConfiguration.configurationProvider) { @@ -163,6 +173,7 @@ export class CppProperties { public set CompilerDefaults(compilerDefaults: CompilerDefaults) { this.defaultCompilerPath = compilerDefaults.compilerPath; + this.knownCompilers = compilerDefaults.knownCompilers; this.defaultCStandard = compilerDefaults.cStandard; this.defaultCppStandard = compilerDefaults.cppStandard; this.defaultIncludes = compilerDefaults.includes; @@ -248,6 +259,9 @@ export class CppProperties { // don't set a default when compileCommands is in use. configuration.compilerPath = this.defaultCompilerPath; } + if (this.knownCompilers) { + configuration.knownCompilers = this.knownCompilers; + } if (isUnset(settings.defaultCStandard) && this.defaultCStandard) { configuration.cStandard = this.defaultCStandard; } diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index dc4d9354d2..6ad6af2418 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -22,6 +22,7 @@ import { Range } from 'vscode-languageclient'; import { ChildProcess, spawn, execSync } from 'child_process'; import * as tmp from 'tmp'; import { getTargetBuildInfo } from '../githubAPI'; +import * as configs from './configurations'; import { PackageVersion } from '../packageVersion'; let prevCrashFile: string; @@ -37,6 +38,8 @@ let tempCommands: vscode.Disposable[] = []; let activatedPreviously: PersistentWorkspaceState; const insiderUpdateTimerInterval: number = 1000 * 60 * 60; +let taskProvider: vscode.Disposable; + /** * activate: set up the extension for language services */ @@ -60,6 +63,21 @@ export function activate(activationEventOccurred: boolean): void { return; } + taskProvider = vscode.tasks.registerTaskProvider('C/Cpp', { + provideTasks: () => { + return getBuildTasks(); + }, + resolveTask(task: vscode.Task): vscode.Task { + // Currently cannot implement because VS Code does not call this. Can implement custom output file directory when enabled. + return undefined; + } + }); + vscode.tasks.onDidStartTask(event => { + if (event.execution.task.source === 'C/Cpp') { + telemetry.logLanguageServerEvent('buildTaskStarted'); + } + }); + // handle "workspaceContains:/.vscode/c_cpp_properties.json" activation event. if (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) { for (let i: number = 0; i < vscode.workspace.workspaceFolders.length; ++i) { @@ -83,6 +101,129 @@ export function activate(activationEventOccurred: boolean): void { } } +/** + * Generate tasks to build the current file based on the user's detected compilers, the user's compilerPath setting, and the current file's extension. + */ +async function getBuildTasks(): Promise { + const editor: vscode.TextEditor = vscode.window.activeTextEditor; + if (!editor) { + return []; + } + + const fileExt: string = path.extname(editor.document.fileName); + if (!fileExt) { + return; + } + + // Don't offer tasks for header files. + const fileExtLower: string = fileExt.toLowerCase(); + const isHeader: boolean = !fileExt || [".hpp", ".hh", ".hxx", ".h", ""].some(ext => fileExtLower === ext); + if (isHeader) { + return []; + } + + // Don't offer tasks if the active file's extension is not a recognized C/C++ extension. + let fileIsCpp: boolean; + let fileIsC: boolean; + if (fileExt === ".C") { // ".C" file extensions are both C and C++. + fileIsCpp = true; + fileIsC = true; + } else { + fileIsCpp = [".cpp", ".cc", ".cxx", ".mm", ".ino", ".inl"].some(ext => fileExtLower === ext); + fileIsC = fileExtLower === ".c"; + } + if (!(fileIsCpp || fileIsC)) { + return []; + } + + // Get a list of compilers found from the C++ side, then filter them based on the file type to get a reduced list appropriate + // for the active file, remove duplicate compiler names, then finally add the user's compilerPath setting. + let compilerPaths: string[]; + const activeClient: Client = getActiveClient(); + const userCompilerPath: string = await activeClient.getCompilerPath(); + let knownCompilers: configs.KnownCompiler[] = await activeClient.getKnownCompilers(); + if (knownCompilers) { + knownCompilers = knownCompilers.filter(info => { return (fileIsCpp && !info.isC) || (fileIsC && info.isC); }); + compilerPaths = knownCompilers.map(info => { return info.path; }); + + let map: Map = new Map(); + const insertOrAssignEntry: (compilerPath: string) => void = (compilerPath: string): void => { + const basename: string = path.basename(compilerPath); + map.has(basename) ? map[basename] = compilerPath : map.set(basename, compilerPath); + }; + compilerPaths.forEach(insertOrAssignEntry); + + // Ensure that the user's compilerPath setting is used by inserting/assigning last. + if (userCompilerPath) { + insertOrAssignEntry(userCompilerPath); + } + + compilerPaths = [...map.values()]; + } else if (userCompilerPath) { + compilerPaths = [userCompilerPath]; + } + + if (!compilerPaths) { + // Don't prompt a message yet until we can make a data-based decision. + telemetry.logLanguageServerEvent('noCompilerFound'); + // Display a message prompting the user to install compilers if none were found. + // const dontShowAgain: string = "Don't Show Again"; + // const learnMore: string = "Learn More"; + // const message: string = "No C/C++ compiler found on the system. Please install a C/C++ compiler to use the C/Cpp: build active file tasks."; + + // let showNoCompilerFoundMessage: PersistentState = new PersistentState("CPP.showNoCompilerFoundMessage", true); + // if (showNoCompilerFoundMessage) { + // vscode.window.showInformationMessage(message, learnMore, dontShowAgain).then(selection => { + // switch (selection) { + // case learnMore: + // const uri: vscode.Uri = vscode.Uri.parse(`https://go.microsoft.com/fwlink/?linkid=864631`); + // vscode.commands.executeCommand('vscode.open', uri); + // break; + // case dontShowAgain: + // showNoCompilerFoundMessage.Value = false; + // break; + // default: + // break; + // } + // }); + // } + return []; + } + + // The build task output file should include a '.exe' extension on Windows. + let platformInfo: PlatformInformation = await PlatformInformation.GetPlatformInformation(); + let exeName: string; + if (platformInfo.platform === 'win32') { + exeName = '${fileBasenameNoExtension}.exe'; + } else { + exeName = '${fileBasenameNoExtension}'; + } + + // Generate tasks. + let result: vscode.Task[] = []; + compilerPaths.forEach(compilerPath => { + const taskName: string = path.basename(compilerPath) + " build active file"; + const args: string[] = ['-g', '${file}', '-o', '${fileDirname}/' + exeName]; + const cwd: string = path.dirname(compilerPath); + const kind: vscode.TaskDefinition = { + type: 'shell', + label: taskName, + command: compilerPath, + args: args, + options: {"cwd": cwd} + }; + + const command: vscode.ShellExecution = new vscode.ShellExecution(compilerPath, [...args], { cwd: cwd }); + const target: vscode.WorkspaceFolder = vscode.workspace.getWorkspaceFolder(clients.ActiveClient.RootUri); + let task: vscode.Task = new vscode.Task(kind, target, taskName, 'C/Cpp', command, '$gcc'); + task.definition = kind; // The constructor for vscode.Task will eat the definition. Reset it by reassigning. + task.group = vscode.TaskGroup.Build; + + result.push(task); + }); + return result; +} + function onDidOpenTextDocument(document: vscode.TextDocument): void { if (document.languageId === "c" || document.languageId === "cpp") { onActivationEvent(); @@ -727,6 +868,9 @@ export function deactivate(): Thenable { disposables.forEach(d => d.dispose()); languageConfigurations.forEach(d => d.dispose()); ui.dispose(); + if (taskProvider) { + taskProvider.dispose(); + } return clients.dispose(); } From 49aa55261fd87963d12d6fd721a5510cec542308 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 15 Feb 2019 12:58:11 -0800 Subject: [PATCH 11/51] Fix quoting for process picker (#3181) --- Extension/src/Debugger/attachToProcess.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Extension/src/Debugger/attachToProcess.ts b/Extension/src/Debugger/attachToProcess.ts index 156e90806c..cff49a7a2c 100644 --- a/Extension/src/Debugger/attachToProcess.ts +++ b/Extension/src/Debugger/attachToProcess.ts @@ -105,9 +105,10 @@ export class RemoteAttachPicker { private getRemoteOSAndProcesses(pipeCmd: string): Promise { // Commands to get OS and processes - const command: string = `sh -c 'uname && if [ $(uname) = "Linux" ] ; then ${PsProcessParser.psLinuxCommand} ; elif [ $(uname) = "Darwin" ] ; ` + - `then ${PsProcessParser.psDarwinCommand}; fi'`; + const command: string = `sh -c "uname && if [ $(uname) = \\\"Linux\\\" ] ; then ${PsProcessParser.psLinuxCommand} ; elif [ $(uname) = \\\"Darwin\\\" ] ; ` + + `then ${PsProcessParser.psDarwinCommand}; fi"`; + // Must use single quotes around ${command}. Linux systems evaluate $() within double-quotes. return execChildProcess(`${pipeCmd} '${command}'`, null, this._channel).then(output => { // OS will be on first line // Processess will follow if listed From e2aaababc4c0562f4b38fdb52e43f2b551548f09 Mon Sep 17 00:00:00 2001 From: Michelle Matias Date: Mon, 3 Dec 2018 13:43:47 -0800 Subject: [PATCH 12/51] Add settings for cached pre-compiled headers --- Extension/package.json | 13 +++++++++++++ Extension/src/LanguageServer/client.ts | 2 ++ Extension/src/LanguageServer/settings.ts | 2 ++ 3 files changed, 17 insertions(+) diff --git a/Extension/package.json b/Extension/package.json index 1c6283436b..4d30f26465 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -308,6 +308,19 @@ "description": "Determines whether pop up notifications will be shown when a configuration provider extension is unable to provide a configuration for a source file.", "scope": "resource" }, + "C_Cpp.intelliSense.cachePath": { + "type": "string", + "default": "${workspaceFolder}/.vscode/ipch", + "description": "Defines the folder path for cached precompiled headers. The default path is \"${workspaceFolder}/.vscode/ipch\" folder", + "scope": "resource" + }, + "C_Cpp.intelliSense.cacheSize": { + "type": "number", + "default": 5120, + "description": "Maximum size of the per-workspace hard drive space in megabytes for cached precompiled headers; the actual usage may fluctuate around this value. The default size is 5120 MB. Precompiled header caching is disabled when the size is 0.", + "scope": "resource", + "minimum": 0 + }, "C_Cpp.default.includePath": { "type": [ "array", diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 12c8736d39..c5c4580f96 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -398,6 +398,8 @@ class DefaultClient implements Client { tab_size: other.editorTabSize, intelliSenseEngine: settings.intelliSenseEngine, intelliSenseEngineFallback: settings.intelliSenseEngineFallback, + cachePath: settings.cachePath, + cacheSize: settings.cacheSize, autocomplete: settings.autoComplete, errorSquiggles: settings.errorSquiggles, dimInactiveRegions: settings.dimInactiveRegions, diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index cc21c6bed7..abdc7d598a 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -39,6 +39,8 @@ export class CppSettings extends Settings { public get suggestSnippets(): boolean { return super.Section.get("suggestSnippets"); } public get intelliSenseEngine(): string { return super.Section.get("intelliSenseEngine"); } public get intelliSenseEngineFallback(): string { return super.Section.get("intelliSenseEngineFallback"); } + public get cachePath(): string { return super.Section.get("intelliSense.cachePath"); } + public get cacheSize(): number { return super.Section.get("intelliSense.cacheSize"); } public get errorSquiggles(): string { return super.Section.get("errorSquiggles"); } public get dimInactiveRegions(): boolean { return super.Section.get("dimInactiveRegions"); } public get inactiveRegionOpacity(): number { return super.Section.get("inactiveRegionOpacity"); } From f86022372309d2524697fd2cffa3b83a46ecb39c Mon Sep 17 00:00:00 2001 From: Michelle Matias Date: Tue, 11 Dec 2018 16:18:36 -0800 Subject: [PATCH 13/51] fix auto pch settings --- Extension/package.json | 2 +- Extension/src/LanguageServer/client.ts | 6 ++++-- Extension/src/LanguageServer/settings.ts | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index 4d30f26465..3d3a156174 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -311,7 +311,7 @@ "C_Cpp.intelliSense.cachePath": { "type": "string", "default": "${workspaceFolder}/.vscode/ipch", - "description": "Defines the folder path for cached precompiled headers. The default path is \"${workspaceFolder}/.vscode/ipch\" folder", + "description": "Defines the folder path for cached precompiled headers. The default path is \"${workspaceFolder}/.vscode/ipch\"", "scope": "resource" }, "C_Cpp.intelliSense.cacheSize": { diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index c5c4580f96..dea3518e79 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -398,8 +398,6 @@ class DefaultClient implements Client { tab_size: other.editorTabSize, intelliSenseEngine: settings.intelliSenseEngine, intelliSenseEngineFallback: settings.intelliSenseEngineFallback, - cachePath: settings.cachePath, - cacheSize: settings.cacheSize, autocomplete: settings.autoComplete, errorSquiggles: settings.errorSquiggles, dimInactiveRegions: settings.dimInactiveRegions, @@ -412,6 +410,10 @@ class DefaultClient implements Client { default: { systemIncludePath: settings.defaultSystemIncludePath }, + intelliSense: { + cachePath: settings.intelliSenseCachePath, + cacheSize: settings.intelliSenseCacheSize, + }, vcpkg_root: util.getVcpkgRoot(), gotoDefIntelliSense: abTestSettings.UseGoToDefIntelliSense }, diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index abdc7d598a..9c82dc7030 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -39,8 +39,8 @@ export class CppSettings extends Settings { public get suggestSnippets(): boolean { return super.Section.get("suggestSnippets"); } public get intelliSenseEngine(): string { return super.Section.get("intelliSenseEngine"); } public get intelliSenseEngineFallback(): string { return super.Section.get("intelliSenseEngineFallback"); } - public get cachePath(): string { return super.Section.get("intelliSense.cachePath"); } - public get cacheSize(): number { return super.Section.get("intelliSense.cacheSize"); } + public get intelliSenseCachePath(): string { return super.Section.get("intelliSense.cachePath"); } + public get intelliSenseCacheSize(): number { return super.Section.get("intelliSense.cacheSize"); } public get errorSquiggles(): string { return super.Section.get("errorSquiggles"); } public get dimInactiveRegions(): boolean { return super.Section.get("dimInactiveRegions"); } public get inactiveRegionOpacity(): number { return super.Section.get("inactiveRegionOpacity"); } From f1ca548849961ad68af6ec4df5c453348808c8b0 Mon Sep 17 00:00:00 2001 From: Michelle Matias Date: Fri, 11 Jan 2019 15:38:09 -0800 Subject: [PATCH 14/51] filter autoPCH cache for telemetry --- Extension/src/LanguageServer/settingsTracker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/src/LanguageServer/settingsTracker.ts b/Extension/src/LanguageServer/settingsTracker.ts index 1850efbe64..65eb6775d3 100644 --- a/Extension/src/LanguageServer/settingsTracker.ts +++ b/Extension/src/LanguageServer/settingsTracker.ts @@ -160,7 +160,7 @@ export class SettingsTracker { break; } default: { - if (key === "clang_format_path" || key.startsWith("default.")) { + if (key === "clang_format_path" || key === "intelliSense.cachePath" || key.startsWith("default.")) { value = this.areEqual(val, settings.inspect(key).defaultValue) ? "" : "..."; // Track whether it's being used, but nothing specific about it. } else { value = String(this.previousCppSettings[key]); From b28ab0a874c09cea255ee2bbd4522e37aeadb3d6 Mon Sep 17 00:00:00 2001 From: Michelle Matias Date: Fri, 15 Feb 2019 16:20:56 -0800 Subject: [PATCH 15/51] add slash at end of default path --- Extension/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index 3d3a156174..a640669313 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -310,8 +310,8 @@ }, "C_Cpp.intelliSense.cachePath": { "type": "string", - "default": "${workspaceFolder}/.vscode/ipch", - "description": "Defines the folder path for cached precompiled headers. The default path is \"${workspaceFolder}/.vscode/ipch\"", + "default": "${workspaceFolder}/.vscode/ipch/", + "description": "Defines the folder path for cached precompiled headers. The default path is \"${workspaceFolder}/.vscode/ipch/\"", "scope": "resource" }, "C_Cpp.intelliSense.cacheSize": { From 10a06af93d47b09dc3b0abd09aa649d57e727ad8 Mon Sep 17 00:00:00 2001 From: Michelle Matias Date: Fri, 22 Feb 2019 10:39:07 -0800 Subject: [PATCH 16/51] rename cachePath and cacheSize --- Extension/package.json | 4 ++-- Extension/src/LanguageServer/client.ts | 6 ++---- Extension/src/LanguageServer/settings.ts | 4 ++-- Extension/src/LanguageServer/settingsTracker.ts | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index a640669313..f2431268ae 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -308,13 +308,13 @@ "description": "Determines whether pop up notifications will be shown when a configuration provider extension is unable to provide a configuration for a source file.", "scope": "resource" }, - "C_Cpp.intelliSense.cachePath": { + "C_Cpp.intelliSenseCachePath": { "type": "string", "default": "${workspaceFolder}/.vscode/ipch/", "description": "Defines the folder path for cached precompiled headers. The default path is \"${workspaceFolder}/.vscode/ipch/\"", "scope": "resource" }, - "C_Cpp.intelliSense.cacheSize": { + "C_Cpp.intelliSenseCacheSize": { "type": "number", "default": 5120, "description": "Maximum size of the per-workspace hard drive space in megabytes for cached precompiled headers; the actual usage may fluctuate around this value. The default size is 5120 MB. Precompiled header caching is disabled when the size is 0.", diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index dea3518e79..f7916e318f 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -398,6 +398,8 @@ class DefaultClient implements Client { tab_size: other.editorTabSize, intelliSenseEngine: settings.intelliSenseEngine, intelliSenseEngineFallback: settings.intelliSenseEngineFallback, + intelliSenseCachePath : settings.intelliSenseCachePath, + intelliSenseCacheSize : settings.intelliSenseCacheSize, autocomplete: settings.autoComplete, errorSquiggles: settings.errorSquiggles, dimInactiveRegions: settings.dimInactiveRegions, @@ -410,10 +412,6 @@ class DefaultClient implements Client { default: { systemIncludePath: settings.defaultSystemIncludePath }, - intelliSense: { - cachePath: settings.intelliSenseCachePath, - cacheSize: settings.intelliSenseCacheSize, - }, vcpkg_root: util.getVcpkgRoot(), gotoDefIntelliSense: abTestSettings.UseGoToDefIntelliSense }, diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index 9c82dc7030..a42edc9c7a 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -39,8 +39,8 @@ export class CppSettings extends Settings { public get suggestSnippets(): boolean { return super.Section.get("suggestSnippets"); } public get intelliSenseEngine(): string { return super.Section.get("intelliSenseEngine"); } public get intelliSenseEngineFallback(): string { return super.Section.get("intelliSenseEngineFallback"); } - public get intelliSenseCachePath(): string { return super.Section.get("intelliSense.cachePath"); } - public get intelliSenseCacheSize(): number { return super.Section.get("intelliSense.cacheSize"); } + public get intelliSenseCachePath(): string { return super.Section.get("intelliSenseCachePath"); } + public get intelliSenseCacheSize(): number { return super.Section.get("intelliSenseCacheSize"); } public get errorSquiggles(): string { return super.Section.get("errorSquiggles"); } public get dimInactiveRegions(): boolean { return super.Section.get("dimInactiveRegions"); } public get inactiveRegionOpacity(): number { return super.Section.get("inactiveRegionOpacity"); } diff --git a/Extension/src/LanguageServer/settingsTracker.ts b/Extension/src/LanguageServer/settingsTracker.ts index 65eb6775d3..ec60495113 100644 --- a/Extension/src/LanguageServer/settingsTracker.ts +++ b/Extension/src/LanguageServer/settingsTracker.ts @@ -160,7 +160,7 @@ export class SettingsTracker { break; } default: { - if (key === "clang_format_path" || key === "intelliSense.cachePath" || key.startsWith("default.")) { + if (key === "clang_format_path" || key === "intelliSenseCachePath" || key.startsWith("default.")) { value = this.areEqual(val, settings.inspect(key).defaultValue) ? "" : "..."; // Track whether it's being used, but nothing specific about it. } else { value = String(this.previousCppSettings[key]); From a0f6eb61ad0188742f9460c22f9927cb5003f786 Mon Sep 17 00:00:00 2001 From: Michelle Matias Date: Fri, 22 Feb 2019 11:05:09 -0800 Subject: [PATCH 17/51] Update cachePath description --- Extension/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/package.json b/Extension/package.json index f2431268ae..857803d727 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -311,7 +311,7 @@ "C_Cpp.intelliSenseCachePath": { "type": "string", "default": "${workspaceFolder}/.vscode/ipch/", - "description": "Defines the folder path for cached precompiled headers. The default path is \"${workspaceFolder}/.vscode/ipch/\"", + "description": "Defines the folder path for cached precompiled headers. The default path \"${workspaceFolder}/.vscode/ipch/\" will be used if a specified path is invalid.", "scope": "resource" }, "C_Cpp.intelliSenseCacheSize": { From cc81b4bb8ff42861eb53145ec45906c28867cbe1 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 22 Feb 2019 11:51:01 -0800 Subject: [PATCH 18/51] Set up CI with Azure Pipelines (#3191) Set up CI with Azure Pipelines --- Extension/jobs/build.windows.yml | 58 ++++ Extension/jobs/build.yml | 67 +++++ Extension/package-lock.json | 261 +++++++++++++----- Extension/package.json | 13 +- .../Debugger/debugAdapterDescriptorFactory.ts | 33 ++- Extension/src/Debugger/extension.ts | 6 +- Extension/src/main.ts | 2 +- .../debugAdapterDescriptorFactory.ts | 47 ++++ .../MockDebugger/mockDebug.ts | 8 + .../MockDebugger/mockDebugSession.ts | 67 +++++ .../debug.integration.test.ts | 32 --- .../test/integrationTests/debug/index.ts | 44 +++ .../{ => languageServer}/index.ts | 7 +- .../languageServer.integration.test.ts | 10 +- .../SimpleCppProject/.vscode/launch.json | 12 +- azure-pipelines.yml | 17 ++ 16 files changed, 558 insertions(+), 126 deletions(-) create mode 100644 Extension/jobs/build.windows.yml create mode 100644 Extension/jobs/build.yml create mode 100644 Extension/test/integrationTests/MockDebugger/debugAdapterDescriptorFactory.ts create mode 100644 Extension/test/integrationTests/MockDebugger/mockDebug.ts create mode 100644 Extension/test/integrationTests/MockDebugger/mockDebugSession.ts delete mode 100644 Extension/test/integrationTests/debug.integration.test.ts create mode 100644 Extension/test/integrationTests/debug/index.ts rename Extension/test/integrationTests/{ => languageServer}/index.ts (87%) rename Extension/test/integrationTests/{ => languageServer}/languageServer.integration.test.ts (97%) create mode 100644 azure-pipelines.yml diff --git a/Extension/jobs/build.windows.yml b/Extension/jobs/build.windows.yml new file mode 100644 index 0000000000..662c72a11c --- /dev/null +++ b/Extension/jobs/build.windows.yml @@ -0,0 +1,58 @@ +parameters: + name: '' + pool: '' + +jobs: +- job: Windows + pool: + vmImage: 'vs2017-win2016' + + steps: + - task: NodeTool@0 + displayName: 'Use Node 8.x' + inputs: + versionSpec: 8.x + + - script: npm install + displayName: "Install Dependencies" + workingDirectory: '$(Build.SourcesDirectory)\Extension' + + - script: npm run compile + displayName: "Compile Sources" + workingDirectory: '$(Build.SourcesDirectory)\Extension' + + - script: npm run pr-check + displayName: 'Validate Extension/package.json' + workingDirectory: '$(Build.SourcesDirectory)\Extension' + + - script: npm run tslint + displayName: 'Run Linter' + workingDirectory: '$(Build.SourcesDirectory)\Extension' + + - script: 'npm run unitTests' + displayName: 'Run unit tests' + workingDirectory: '$(Build.SourcesDirectory)\Extension' + continueOnError: true + + - script: 'copy "$(Build.SourcesDirectory)\Extension\out\test\integrationTests\MockDebugger\debugAdapterDescriptorFactory.js" "$(Build.SourcesDirectory)\Extension\out\src\Debugger\debugAdapterDescriptorFactory.js" /Y' + displayName: Replace Debug Adapter Descriptor Factory + + - script: 'node node_modules/vscode/bin/test' + displayName: 'Run debug integration tests' + workingDirectory: '$(Build.SourcesDirectory)\Extension' + continueOnError: true + env: + CODE_TESTS_PATH: '$(Build.SourcesDirectory)\Extension\out\test\integrationTests\debug' + CODE_EXTENSIONS_PATH: '$(Build.SourcesDirectory)\Extension' + CODE_TESTS_WORKSPACE: '$(Build.SourcesDirectory)\Extension\test\integrationTests\testAssets\SimpleCppProject' + CODE_DISABLE_EXTENSIONS: 1 + + - script: 'node node_modules/vscode/bin/test' + displayName: 'Run languageServer integration tests' + workingDirectory: '$(Build.SourcesDirectory)\Extension' + continueOnError: true + env: + CODE_TESTS_PATH: '$(Build.SourcesDirectory)\Extension\out\test\integrationTests\languageServer' + CODE_EXTENSIONS_PATH: '$(Build.SourcesDirectory)\Extension' + CODE_TESTS_WORKSPACE: '$(Build.SourcesDirectory)\Extension\test\integrationTests\testAssets\SimpleCppProject' + CODE_DISABLE_EXTENSIONS: 1 \ No newline at end of file diff --git a/Extension/jobs/build.yml b/Extension/jobs/build.yml new file mode 100644 index 0000000000..905777acbe --- /dev/null +++ b/Extension/jobs/build.yml @@ -0,0 +1,67 @@ +parameters: + name: '' + pool: '' + +jobs: +- job: ${{ parameters.name }} + pool: ${{ parameters.pool }} + + steps: + - task: NodeTool@0 + displayName: 'Use Node 8.x' + inputs: + versionSpec: 8.x + + - script: npm install + displayName: "Install Dependencies" + workingDirectory: '$(Build.SourcesDirectory)/Extension' + + - script: npm run compile + displayName: "Compile Sources" + workingDirectory: '$(Build.SourcesDirectory)/Extension' + + - script: npm run pr-check + displayName: 'Validate Extension/package.json' + workingDirectory: '$(Build.SourcesDirectory)/Extension' + + - script: npm run tslint + displayName: 'Run Linter' + workingDirectory: '$(Build.SourcesDirectory)/Extension' + + - script: 'npm run unitTests' + displayName: 'Run unit tests' + workingDirectory: '$(Build.SourcesDirectory)/Extension' + continueOnError: true + + - script: | + set -e + /usr/bin/Xvfb :10 -ac >> /tmp/Xvfb.out 2>&1 & + disown -ar + displayName: 'Start xvfb' + + - script: | + cp $(Build.SourcesDirectory)/Extension/out/test/integrationTests/MockDebugger/debugAdapterDescriptorFactory.js $(Build.SourcesDirectory)/Extension/out/src/Debugger/debugAdapterDescriptorFactory.js + displayName: Replace Debug Adapter Descriptor Factory + + - script: 'node node_modules/vscode/bin/test' + displayName: 'Run debug integration tests' + workingDirectory: '$(Build.SourcesDirectory)/Extension' + continueOnError: true + env: + MOCK_DEBUG: 1 + DISPLAY: :10 + CODE_TESTS_PATH: '$(Build.SourcesDirectory)/Extension/out/test/integrationTests/debug' + CODE_EXTENSIONS_PATH: '$(Build.SourcesDirectory)/Extension' + CODE_TESTS_WORKSPACE: '$(Build.SourcesDirectory)/Extension/test/integrationTests/testAssets/SimpleCppProject' + CODE_DISABLE_EXTENSIONS: 1 + + - script: 'node node_modules/vscode/bin/test' + displayName: 'Run languageServer integration tests' + workingDirectory: '$(Build.SourcesDirectory)/Extension' + continueOnError: true + env: + DISPLAY: :10 + CODE_TESTS_PATH: '$(Build.SourcesDirectory)/Extension/out/test/integrationTests/languageServer' + CODE_EXTENSIONS_PATH: '$(Build.SourcesDirectory)/Extension' + CODE_TESTS_WORKSPACE: '$(Build.SourcesDirectory)/Extension/test/integrationTests/testAssets/SimpleCppProject' + CODE_DISABLE_EXTENSIONS: 1 \ No newline at end of file diff --git a/Extension/package-lock.json b/Extension/package-lock.json index b54c6cc404..725e0f648a 100644 --- a/Extension/package-lock.json +++ b/Extension/package-lock.json @@ -10,13 +10,10 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/mocha": { - "version": "2.2.45", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.45.tgz", - "integrity": "sha512-tE1SYtNG3I3atRVPELSGN2FJJJtPg3O/G0tycYSyzeDqdAbdLPRH089LhpWYA5M/iHeWHkVZq/b0OVKngcK0Eg==", - "dev": true, - "requires": { - "@types/node": "*" - } + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", + "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==", + "dev": true }, "@types/node": { "version": "8.5.4", @@ -33,9 +30,9 @@ } }, "ajv": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", - "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", + "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -334,6 +331,12 @@ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" }, + "await-notify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/await-notify/-/await-notify-1.0.1.tgz", + "integrity": "sha1-C0gTOyLlJBgeEVV2ZRhfKi885Hw=", + "dev": true + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -1623,7 +1626,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1644,12 +1648,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1664,17 +1670,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1791,7 +1800,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1803,6 +1813,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1817,6 +1828,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1824,12 +1836,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -1848,6 +1862,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -1928,7 +1943,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -1940,6 +1956,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2025,7 +2042,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2061,6 +2079,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2080,6 +2099,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2123,12 +2143,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -2407,6 +2429,35 @@ "npm-run-path": "^2.0.2", "plugin-error": "^0.1.2", "through2": "^2.0.3" + }, + "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" + } + }, + "mocha": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", + "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + } + } } }, "gulp-remote-src-vscode": { @@ -2835,9 +2886,9 @@ "dev": true }, "is": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", - "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz", + "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg==", "dev": true }, "is-absolute": { @@ -3464,18 +3515,18 @@ } }, "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", "dev": true }, "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "version": "2.1.22", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", + "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", "dev": true, "requires": { - "mime-db": "~1.37.0" + "mime-db": "~1.38.0" } }, "minimatch": { @@ -3519,23 +3570,36 @@ } }, "mocha": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", - "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", "dev": true, "requires": { - "browser-stdout": "1.3.0", - "commander": "2.11.0", + "browser-stdout": "1.3.1", + "commander": "2.15.1", "debug": "3.1.0", - "diff": "3.3.1", + "diff": "3.5.0", "escape-string-regexp": "1.0.5", "glob": "7.1.2", - "growl": "1.10.3", + "growl": "1.10.5", "he": "1.1.1", + "minimatch": "3.0.4", "mkdirp": "0.5.1", - "supports-color": "4.4.0" + "supports-color": "5.4.0" }, "dependencies": { + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -3544,6 +3608,33 @@ "requires": { "ms": "2.0.0" } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, @@ -4267,12 +4358,6 @@ "uuid": "^3.3.2" }, "dependencies": { - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4338,12 +4423,28 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "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" + } + } } }, "safe-buffer": { @@ -4538,9 +4639,9 @@ } }, "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "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", @@ -4627,9 +4728,9 @@ } }, "sshpk": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", - "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -5334,9 +5435,9 @@ } }, "vscode": { - "version": "1.1.26", - "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.26.tgz", - "integrity": "sha512-z1Nf5J38gjUFbuDCbJHPN6OJ//5EG+e/yHlh6ERxj/U9B2Qc3aiHaFr38/fee/GGnxvRw/XegLMOG+UJwKi/Qg==", + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.29.tgz", + "integrity": "sha512-E6hzqGtCD65BnBxdZzSIi8FPCM4seEEK/bbTeYdJntg+4D5R6GLbdYFySE9DNTtMJF4iB9UGoucKU/p8Guts1g==", "dev": true, "requires": { "glob": "^7.1.2", @@ -5353,6 +5454,35 @@ "url-parse": "^1.4.3", "vinyl-fs": "^3.0.3", "vinyl-source-stream": "^1.1.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" + } + }, + "mocha": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", + "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + } + } } }, "vscode-cpptools": { @@ -5361,17 +5491,18 @@ "integrity": "sha512-IDe47rkJVAaSbSknlFnrQWQHM/EIc2r1yGgb5ICuqrGlOpgKkzbrXqDnIEdEYm39ztpNDAiCIwlxjpJK8Y19Iw==" }, "vscode-debugadapter": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.24.0.tgz", - "integrity": "sha1-KAY7AcyorB5fehPRGOMgem6If/0=", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/vscode-debugadapter/-/vscode-debugadapter-1.33.0.tgz", + "integrity": "sha512-GsSD6PyVokjyW+7LU3FRXbu8SINv9muQtMQEDvwB6SIGQfrQzld8kECpQRr71j3mgXW+sTY+44/XMzueeaU6/Q==", "requires": { - "vscode-debugprotocol": "^1.24.0" + "mkdirp": "^0.5.1", + "vscode-debugprotocol": "1.33.0" } }, "vscode-debugprotocol": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.24.0.tgz", - "integrity": "sha1-28EOjX2VsQJyehmvPw/O9+JSsI4=" + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.33.0.tgz", + "integrity": "sha512-d+l4lrEz6OP2kmGpweqe37x9H7icAMV8S4m8azTWGAIlNJxBP4rlSTnZa7NMLcbgqWkWG9lTGY7fJ+rSPaW7yg==" }, "vscode-extension-telemetry": { "version": "0.1.0", diff --git a/Extension/package.json b/Extension/package.json index 1c6283436b..73fe6beaa0 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -12,7 +12,7 @@ }, "license": "SEE LICENSE IN LICENSE.txt", "engines": { - "vscode": "^1.30.0" + "vscode": "^1.31.0" }, "bugs": { "url": "https://github.com/Microsoft/vscode-cpptools/issues", @@ -1406,21 +1406,22 @@ "watch": "tsc -watch -p ./" }, "devDependencies": { - "@types/mocha": "^2.2.43", + "@types/mocha": "^5.2.6", "@types/node": "^8.0.46", + "await-notify": "^1.0.1", "async-child-process": "^1.1.1", "child-process": "^1.0.2", "gulp": "^4.0.0", "gulp-env": "0.4.0", "gulp-mocha": "5.0.0", "gulp-tslint": "8.1.2", - "mocha": "^4.0.1", + "mocha": "^5.2.0", "tslint": "5.8.0", "tslint-microsoft-contrib": "5.0.1", "tslint-no-unused-expression-chai": "0.0.3", "typescript": "^2.5.3", "vrsource-tslint-rules": "^5.8.2", - "vscode": "^1.1.26", + "vscode": "^1.1.29", "extend": "3.0.2" }, "dependencies": { @@ -1432,8 +1433,8 @@ "mkdirp": "~0.5.1", "tmp": "~0.0.33", "vscode-cpptools": "2.1.1", - "vscode-debugadapter": "~1.24.0", - "vscode-debugprotocol": "~1.24.0", + "vscode-debugadapter": "~1.33.0", + "vscode-debugprotocol": "~1.33.0", "vscode-extension-telemetry": "~0.1.0", "vscode-languageclient": "5.1.1", "yauzl": "~2.10.0" diff --git a/Extension/src/Debugger/debugAdapterDescriptorFactory.ts b/Extension/src/Debugger/debugAdapterDescriptorFactory.ts index 675e3271c2..76b111a0a2 100644 --- a/Extension/src/Debugger/debugAdapterDescriptorFactory.ts +++ b/Extension/src/Debugger/debugAdapterDescriptorFactory.ts @@ -9,22 +9,37 @@ import * as path from 'path'; import * as os from 'os'; // Registers DebugAdapterDescriptorFactory for `cppdbg` and `cppvsdbg`. If it is not ready, it will prompt a wait for the download dialog. -// Note: util.extensionContext.extensionPath is needed for the commands because VsCode does not support relative paths for adapterExecutableComand +// NOTE: This file is not automatically tested. -export class CppdbgDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescriptorFactory { +abstract class DebugAdapterDescriptorFactoryWithContext implements vscode.DebugAdapterDescriptorFactory { + protected readonly context: vscode.ExtensionContext; + + // This is important for the Mock Debugger since it can not use src/common + constructor(context: vscode.ExtensionContext) { + this.context = context; + } + + abstract createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult; +} + +export class CppdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorFactoryWithContext { public static DEBUG_TYPE : string = "cppdbg"; + constructor(context: vscode.ExtensionContext) { + super(context); + } + createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult { return util.isExtensionReady().then(ready => { if (ready) { - let command: string = path.join(util.extensionContext.extensionPath, './debugAdapters/OpenDebugAD7'); + let command: string = path.join(this.context.extensionPath, './debugAdapters/OpenDebugAD7'); // Windows has the exe in debugAdapters/bin. if (os.platform() === 'win32') { - command = path.join(util.extensionContext.extensionPath, "./debugAdapters/bin/OpenDebugAD7.exe"); + command = path.join(this.context.extensionPath, "./debugAdapters/bin/OpenDebugAD7.exe"); } - return new vscode.DebugAdapterExecutable(command); + return new vscode.DebugAdapterExecutable(command, []); } else { throw new Error(util.extensionNotReadyString); } @@ -32,9 +47,13 @@ export class CppdbgDebugAdapterDescriptorFactory implements vscode.DebugAdapterD } } -export class CppvsdbgDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescriptorFactory { +export class CppvsdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorFactoryWithContext { public static DEBUG_TYPE : string = "cppvsdbg"; + constructor(context: vscode.ExtensionContext) { + super(context); + } + createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult { if (os.platform() !== 'win32') { vscode.window.showErrorMessage("Debugger type 'cppvsdbg' is not avaliable for non-Windows machines."); @@ -43,7 +62,7 @@ export class CppvsdbgDebugAdapterDescriptorFactory implements vscode.DebugAdapte return util.isExtensionReady().then(ready => { if (ready) { return new vscode.DebugAdapterExecutable( - path.join(util.extensionContext.extensionPath, './debugAdapters/vsdbg/bin/vsdbg.exe'), + path.join(this.context.extensionPath, './debugAdapters/vsdbg/bin/vsdbg.exe'), ['--interpreter=vscode'] ); } else { diff --git a/Extension/src/Debugger/extension.ts b/Extension/src/Debugger/extension.ts index b4558a537b..0680b9da51 100644 --- a/Extension/src/Debugger/extension.ts +++ b/Extension/src/Debugger/extension.ts @@ -13,7 +13,7 @@ import { CppdbgDebugAdapterDescriptorFactory, CppvsdbgDebugAdapterDescriptorFact // The extension deactivate method is asynchronous, so we handle the disposables ourselves instead of using extensonContext.subscriptions. let disposables: vscode.Disposable[] = []; -export function initialize(): void { +export function initialize(context: vscode.ExtensionContext): void { // Activate Process Picker Commands let attachItemsProvider: AttachItemsProvider = NativeAttachItemsProviderFactory.Get(); let attacher: AttachPicker = new AttachPicker(attachItemsProvider); @@ -42,8 +42,8 @@ export function initialize(): void { disposables.push(vscode.languages.registerCompletionItemProvider(launchJsonDocumentSelector, new ConfigurationSnippetProvider(configurationProvider))); // Register Debug Adapters - disposables.push(vscode.debug.registerDebugAdapterDescriptorFactory(CppvsdbgDebugAdapterDescriptorFactory.DEBUG_TYPE, new CppvsdbgDebugAdapterDescriptorFactory())); - disposables.push(vscode.debug.registerDebugAdapterDescriptorFactory(CppdbgDebugAdapterDescriptorFactory.DEBUG_TYPE, new CppdbgDebugAdapterDescriptorFactory())); + disposables.push(vscode.debug.registerDebugAdapterDescriptorFactory(CppvsdbgDebugAdapterDescriptorFactory.DEBUG_TYPE, new CppvsdbgDebugAdapterDescriptorFactory(context))); + disposables.push(vscode.debug.registerDebugAdapterDescriptorFactory(CppdbgDebugAdapterDescriptorFactory.DEBUG_TYPE, new CppdbgDebugAdapterDescriptorFactory(context))); vscode.Disposable.from(...disposables); } diff --git a/Extension/src/main.ts b/Extension/src/main.ts index 039b595104..09817e708b 100644 --- a/Extension/src/main.ts +++ b/Extension/src/main.ts @@ -35,7 +35,7 @@ export async function activate(context: vscode.ExtensionContext): Promise; +} + +export class CppdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorFactoryWithContext { + public static DEBUG_TYPE : string = "cppdbg"; + + constructor(context: vscode.ExtensionContext) { + super(context); + } + + createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult { + console.warn("This should only appear in a test scenario."); + + return new vscode.DebugAdapterExecutable('node', [path.join(this.context.extensionPath, './out/test/integrationTests/MockDebugger/mockDebug.js')]); + } +} + +export class CppvsdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorFactoryWithContext { + public static DEBUG_TYPE : string = "cppvsdbg"; + + constructor(context: vscode.ExtensionContext) { + super(context); + } + + createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult { + console.warn("This should only appear in a test scenario."); + + return new vscode.DebugAdapterExecutable('node', [path.join(this.context.extensionPath, './out/test/integrationTests/MockDebugger/mockDebug.js')]); + } +} \ No newline at end of file diff --git a/Extension/test/integrationTests/MockDebugger/mockDebug.ts b/Extension/test/integrationTests/MockDebugger/mockDebug.ts new file mode 100644 index 0000000000..20c5540fec --- /dev/null +++ b/Extension/test/integrationTests/MockDebugger/mockDebug.ts @@ -0,0 +1,8 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. + * See 'LICENSE' in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + +import { MockDebugSession } from './mockDebugSession'; + +MockDebugSession.run(MockDebugSession); \ No newline at end of file diff --git a/Extension/test/integrationTests/MockDebugger/mockDebugSession.ts b/Extension/test/integrationTests/MockDebugger/mockDebugSession.ts new file mode 100644 index 0000000000..9ab5e577c6 --- /dev/null +++ b/Extension/test/integrationTests/MockDebugger/mockDebugSession.ts @@ -0,0 +1,67 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. + * See 'LICENSE' in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + +import { Logger, logger, LoggingDebugSession, InitializedEvent, TerminatedEvent } from 'vscode-debugadapter'; +import { DebugProtocol } from 'vscode-debugprotocol'; +import { Subject } from 'await-notify'; + +interface LaunchRequestArguments extends DebugProtocol.LaunchRequestArguments { + /** An absolute path to the "program" to debug. */ + program: string; + + /** enable logging the Debug Adapter Protocol */ + logPath?: string; +} + +export class MockDebugSession extends LoggingDebugSession +{ + private _configurationDone = new Subject(); + + public constructor() { + super("mock-debug.txt"); + } + + protected initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void { + // build and return the capabilities of this debug adapter: + response.body = response.body || {}; + + // the adapter implements the configurationDoneRequest. + + response.body.supportsConfigurationDoneRequest = true; + + this.sendResponse(response); + // since this debug adapter can accept configuration requests like 'setBreakpoint' at any time, + // we request them early by sending an 'initializeRequest' to the frontend. + // The frontend will end the configuration sequence by calling 'configurationDone' request. + this.sendEvent(new InitializedEvent()); + + } + + protected configurationDoneRequest(response: DebugProtocol.ConfigurationDoneResponse, args: DebugProtocol.ConfigurationDoneArguments): void { + + super.configurationDoneRequest(response, args); + // notify the launchRequest that configuration has finished + this._configurationDone.notify(); + + } + + protected async launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments) { + // make sure to 'Stop' the buffered logging if 'trace' is not set + logger.setup(Logger.LogLevel.Verbose, args.logPath); + + // wait until configuration has finished (and configurationDoneRequest has been called) + await this._configurationDone.wait(1000); + + this.sendResponse(response); + + // Terminate after launch. + this.sendEvent(new TerminatedEvent()); + } + + protected async disconnectRequest(response: DebugProtocol.DisconnectResponse, args: DebugProtocol.DisconnectArguments) + { + this.sendResponse(response); + } +} \ No newline at end of file diff --git a/Extension/test/integrationTests/debug.integration.test.ts b/Extension/test/integrationTests/debug.integration.test.ts deleted file mode 100644 index 434e35fd7d..0000000000 --- a/Extension/test/integrationTests/debug.integration.test.ts +++ /dev/null @@ -1,32 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import * as assert from 'assert'; - -suite(`Debug Integration Test: `, function(): void { - suiteSetup(async function(): Promise { - let extension: vscode.Extension = vscode.extensions.getExtension("ms-vscode.cpptools"); - if (!extension.isActive) { - await extension.activate(); - } - }); - - test("Starting (gdb) Launch from the workspace root should create an Active Debug Session", async () => { - await vscode.debug.startDebugging(vscode.workspace.workspaceFolders[0], "(gdb) Launch"); - - let debugSessionTerminated: Promise = new Promise(resolve => { - vscode.debug.onDidTerminateDebugSession((e) => resolve()); - }); - - try { - assert.equal(vscode.debug.activeDebugSession.type, "cppdbg"); - } catch (e) { - assert.fail("Debugger failed to launch. Did the extension activate correctly?"); - } - - await debugSessionTerminated; - }); -}); \ No newline at end of file diff --git a/Extension/test/integrationTests/debug/index.ts b/Extension/test/integrationTests/debug/index.ts new file mode 100644 index 0000000000..4b47377591 --- /dev/null +++ b/Extension/test/integrationTests/debug/index.ts @@ -0,0 +1,44 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. + * See 'LICENSE' in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + + +import * as fs from "fs"; +import * as path from 'path'; + +import { subscribeToAllLoggers } from "../../../src/logger"; + +// +// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING +// +// This file is providing the test runner to use when running extension tests. +// By default the test runner in use is Mocha based. +// git status + +// You can provide your own test runner if you want to override it by exporting +// a function run(testRoot: string, clb: (error:Error) => void) that the extension +// host can call to run the tests. The test runner is expected to use console.log +// to report the results back to the caller. When the tests are finished, return +// a possible error to the callback or null if none. + +var testRunner = require('vscode/lib/testrunner'); + +// You can directly control Mocha options by uncommenting the following lines +// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info +testRunner.configure({ + ui: 'tdd', // the TDD UI is being used in *.test.ts (suite, test, etc.) + useColors: true, // colored output from test results + fullTrace: true, + timeout: 60000 +}); + +const logFolder = path.join( __dirname, ".logs") + +if (!fs.existsSync(logFolder)) { + fs.mkdirSync(logFolder); +} +const logFilePath = path.join(logFolder, "integrationTests.log"); +subscribeToAllLoggers(message => fs.appendFileSync(logFilePath, message)); + +module.exports = testRunner; \ No newline at end of file diff --git a/Extension/test/integrationTests/index.ts b/Extension/test/integrationTests/languageServer/index.ts similarity index 87% rename from Extension/test/integrationTests/index.ts rename to Extension/test/integrationTests/languageServer/index.ts index ce27074f52..db359bda02 100644 --- a/Extension/test/integrationTests/index.ts +++ b/Extension/test/integrationTests/languageServer/index.ts @@ -7,7 +7,7 @@ import * as fs from "fs"; import * as path from 'path'; -import { subscribeToAllLoggers } from "../../src/logger"; +import { subscribeToAllLoggers } from "../../../src/logger"; // // PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING @@ -26,8 +26,9 @@ var testRunner = require('vscode/lib/testrunner'); // You can directly control Mocha options by uncommenting the following lines // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info testRunner.configure({ - ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.) - useColors: true, // colored output from test results + ui: 'tdd', // the TDD UI is being used in *.test.ts (suite, test, etc.) + useColors: true, // colored output from test results + fullTrace: true, timeout: 60000 }); diff --git a/Extension/test/integrationTests/languageServer.integration.test.ts b/Extension/test/integrationTests/languageServer/languageServer.integration.test.ts similarity index 97% rename from Extension/test/integrationTests/languageServer.integration.test.ts rename to Extension/test/integrationTests/languageServer/languageServer.integration.test.ts index 0a6e394084..ed863dc88c 100644 --- a/Extension/test/integrationTests/languageServer.integration.test.ts +++ b/Extension/test/integrationTests/languageServer/languageServer.integration.test.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import * as assert from 'assert'; -import { getLanguageConfigFromPatterns } from '../../src/LanguageServer/languageConfig'; -import * as util from '../../src/common'; +import { getLanguageConfigFromPatterns } from '../../../src/LanguageServer/languageConfig'; +import * as util from '../../../src/common'; import * as api from 'vscode-cpptools'; import * as apit from 'vscode-cpptools/out/testApi'; -import * as config from '../../src/LanguageServer/configurations'; -import { CppSettings } from '../../src/LanguageServer/settings'; -import { getActiveClient } from '../../src/LanguageServer/extension'; +import * as config from '../../../src/LanguageServer/configurations'; +import { CppSettings } from '../../../src/LanguageServer/settings'; +import { getActiveClient } from '../../../src/LanguageServer/extension'; suite("multiline comment setting tests", function(): void { suiteSetup(async function(): Promise { diff --git a/Extension/test/integrationTests/testAssets/SimpleCppProject/.vscode/launch.json b/Extension/test/integrationTests/testAssets/SimpleCppProject/.vscode/launch.json index 96c53dfe83..2063832cc4 100644 --- a/Extension/test/integrationTests/testAssets/SimpleCppProject/.vscode/launch.json +++ b/Extension/test/integrationTests/testAssets/SimpleCppProject/.vscode/launch.json @@ -5,15 +5,12 @@ "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", - "preLaunchTask": "build", "program": "${workspaceFolder}/program", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": true, - "MIMode": "gdb", - "miDebuggerPath": "/usr/bin/gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", @@ -22,10 +19,17 @@ } ], "windows": { + "MIMode": "gdb", "miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe" }, "osx": { - "miDebuggerPath": "/usr/bin/lldb" + "MIMode": "lldb", + "preLaunchTask": "build" + }, + "linux": { + "MIMode": "gdb", + "miDebuggerPath": "/usr/bin/gdb", + "preLaunchTask": "build" } } ] diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..6e4aca13be --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,17 @@ +name: $(Date:yyyyMMdd).$(Rev:.r) +pr: +- 'master' +jobs: +- template: Extension/jobs/build.yml + parameters: + name: macOS + pool: + vmImage: 'macOS-10.13' + +- template: Extension/jobs/build.yml + parameters: + name: Linux + pool: + vmImage: 'ubuntu-16.04' + +- template: Extension/jobs/build.windows.yml \ No newline at end of file From 50ddd670c77dfeb0e1e46f9a02719d8ed1054874 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 22 Feb 2019 13:50:11 -0800 Subject: [PATCH 19/51] Fix command not found and empty c_cpp_properties.json if activation is too slow. (#3178) * Fix command not found if activation is too slow. * Fix empty c_cpp_properties.json. --- Extension/src/LanguageServer/client.ts | 6 +++++- Extension/src/LanguageServer/extension.ts | 20 ++++++++++++++++---- Extension/src/commands.ts | 15 ++++++++++++--- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 12c8736d39..61685c2a4e 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -23,7 +23,7 @@ import { createProtocolFilter } from './protocolFilter'; import { DataBinding } from './dataBinding'; import minimatch = require("minimatch"); import * as logger from '../logger'; -import { updateLanguageConfigurations } from './extension'; +import { updateLanguageConfigurations, registerCommands } from './extension'; import { CancellationTokenSource } from 'vscode'; import { SettingsTracker, getTracker } from './settingsTracker'; import { getTestHook, TestHook } from '../testHook'; @@ -321,6 +321,10 @@ class DefaultClient implements Client { // The event handlers must be set before this happens. languageClient.sendRequest(QueryCompilerDefaultsRequest, {}).then((compilerDefaults: configs.CompilerDefaults) => { this.configuration.CompilerDefaults = compilerDefaults; + + // Only register the real commands after the extension has finished initializing, + // e.g. prevents empty c_cpp_properties.json from generation. + registerCommands(); }); this.languageClient = languageClient; diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 6ad6af2418..8aec926c12 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -24,6 +24,7 @@ import * as tmp from 'tmp'; import { getTargetBuildInfo } from '../githubAPI'; import * as configs from './configurations'; import { PackageVersion } from '../packageVersion'; +import { getTemporaryCommandRegistrarInstance } from '../commands'; let prevCrashFile: string; let clients: ClientCollection; @@ -44,7 +45,9 @@ let taskProvider: vscode.Disposable; * activate: set up the extension for language services */ export function activate(activationEventOccurred: boolean): void { - console.log("activating extension"); + if (realActivationOccurred) { + return; // Occurs if multiple delayed commands occur before the real commands are registered. + } // Activate immediately if an activation event occurred in the previous workspace session. // If onActivationEvent doesn't occur, it won't auto-activate next time. @@ -54,8 +57,9 @@ export function activate(activationEventOccurred: boolean): void { realActivation(); } - registerCommands(); - tempCommands.push(vscode.workspace.onDidOpenTextDocument(d => onDidOpenTextDocument(d))); + if (tempCommands.length === 0) { // Only needs to be added once. + tempCommands.push(vscode.workspace.onDidOpenTextDocument(d => onDidOpenTextDocument(d))); + } // Check if an activation event has already occurred. if (activationEventOccurred) { @@ -250,6 +254,7 @@ function realActivation(): void { if (new CppSettings().intelliSenseEngine === "Disabled") { throw new Error("Do not activate the extension when IntelliSense is disabled."); } else { + console.log("activating extension"); let checkForConflictingExtensions: PersistentState = new PersistentState("CPP." + util.packageJson.version + ".checkForConflictingExtensions", true); if (checkForConflictingExtensions.Value) { checkForConflictingExtensions.Value = false; @@ -554,8 +559,14 @@ async function checkAndApplyUpdate(updateChannel: string): Promise { /********************************************* * registered commands *********************************************/ +let commandsRegistered: boolean = false; -function registerCommands(): void { +export function registerCommands(): void { + if (commandsRegistered) { + return; + } + commandsRegistered = true; + getTemporaryCommandRegistrarInstance().clearTempCommands(); disposables.push(vscode.commands.registerCommand('C_Cpp.Navigate', onNavigate)); disposables.push(vscode.commands.registerCommand('C_Cpp.GoToDeclaration', onGoToDeclaration)); disposables.push(vscode.commands.registerCommand('C_Cpp.PeekDeclaration', onPeekDeclaration)); @@ -573,6 +584,7 @@ function registerCommands(): void { disposables.push(vscode.commands.registerCommand('C_Cpp.ResumeParsing', onResumeParsing)); disposables.push(vscode.commands.registerCommand('C_Cpp.ShowParsingCommands', onShowParsingCommands)); disposables.push(vscode.commands.registerCommand('C_Cpp.TakeSurvey', onTakeSurvey)); + getTemporaryCommandRegistrarInstance().executeDelayedCommands(); } function onNavigate(): void { diff --git a/Extension/src/commands.ts b/Extension/src/commands.ts index de94515aa9..e40f55ea88 100644 --- a/Extension/src/commands.ts +++ b/Extension/src/commands.ts @@ -11,7 +11,8 @@ class TemporaryCommandRegistrar { // Used to save/re-execute commands used before the extension has activated (e.g. delayed by dependency downloading). private delayedCommandsToExecute: Set; private tempCommands: vscode.Disposable[]; // Need to save this to unregister/dispose the temporary commands. - private isLanguageServerDisabled: boolean; + private isLanguageServerDisabled: boolean = false; + private isActivationReady: boolean = false; private commandsToRegister: string[] = [ "C_Cpp.ConfigurationEdit", @@ -49,6 +50,9 @@ class TemporaryCommandRegistrar { return; } this.delayedCommandsToExecute.add(command); + if (this.isActivationReady) { + LanguageServer.activate(true); + } })); } @@ -58,13 +62,18 @@ class TemporaryCommandRegistrar { public activateLanguageServer(): void { // Main activation code. + LanguageServer.activate(this.delayedCommandsToExecute.size > 0); + this.isActivationReady = true; + } + + public clearTempCommands(): void { this.tempCommands.forEach((command) => { command.dispose(); }); this.tempCommands = []; + } - LanguageServer.activate(this.delayedCommandsToExecute.size > 0); - + public executeDelayedCommands(): void { this.delayedCommandsToExecute.forEach((command) => { vscode.commands.executeCommand(command); }); From fdcbfee87c3cbdbbd3716acedef5b53539c4e914 Mon Sep 17 00:00:00 2001 From: Michelle Matias Date: Fri, 22 Feb 2019 13:59:26 -0800 Subject: [PATCH 20/51] update cache path --- Extension/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index 857803d727..0699aeb3f5 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -310,8 +310,8 @@ }, "C_Cpp.intelliSenseCachePath": { "type": "string", - "default": "${workspaceFolder}/.vscode/ipch/", - "description": "Defines the folder path for cached precompiled headers. The default path \"${workspaceFolder}/.vscode/ipch/\" will be used if a specified path is invalid.", + "default": "${workspaceFolder}/.vscode/", + "description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default path \"${workspaceFolder}/.vscode/\" will be used if a specified path is invalid.", "scope": "resource" }, "C_Cpp.intelliSenseCacheSize": { From 28e8f1f2ed42f514f5caf832c716bd17c1194bf4 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Mon, 25 Feb 2019 14:46:05 -0800 Subject: [PATCH 21/51] Seanmcm/cpp properties squiggles (#3196) * Add c_cpp_properties.json warning squiggles for invalid paths. --- .../src/LanguageServer/clientCollection.ts | 3 +- .../src/LanguageServer/configurations.ts | 245 +++++++++++++++--- Extension/src/common.ts | 17 ++ 3 files changed, 231 insertions(+), 34 deletions(-) diff --git a/Extension/src/LanguageServer/clientCollection.ts b/Extension/src/LanguageServer/clientCollection.ts index e14ad626de..fed01ec11a 100644 --- a/Extension/src/LanguageServer/clientCollection.ts +++ b/Extension/src/LanguageServer/clientCollection.ts @@ -175,7 +175,8 @@ export class ClientCollection { } private onDidOpenTextDocument(document: vscode.TextDocument): void { - if (document.languageId === "c" || document.languageId === "cpp") { + if (document.languageId === "c" || document.languageId === "cpp" + || document.languageId === "json" && document.uri.fsPath.endsWith("c_cpp_properties.json")) { // Make sure a client exists for this document's workspace. this.getClientFor(document.uri); } diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 9a5029077d..8eb519f61d 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -13,6 +13,7 @@ import { PersistentFolderState } from './persistentState'; import { CppSettings } from './settings'; import { ABTestSettings, getABTestSettings } from '../abTesting'; import { getCustomConfigProviders } from './customProviders'; +import * as os from 'os'; const configVersion: number = 4; type Environment = { [key: string]: string | string[] }; @@ -80,11 +81,12 @@ export interface CompilerDefaults { frameworks: string[]; windowsSdkVersion: string; intelliSenseMode: string; + rootfs: string; } export class CppProperties { private rootUri: vscode.Uri; - private propertiesFile: vscode.Uri = null; + private propertiesFile: vscode.Uri = undefined; private readonly configFolder: string; private configurationJson: ConfigurationJson = null; private currentConfigurationIndex: PersistentFolderState; @@ -106,6 +108,9 @@ export class CppProperties { private configurationsChanged = new vscode.EventEmitter(); private selectionChanged = new vscode.EventEmitter(); private compileCommandsChanged = new vscode.EventEmitter(); + private diagnosticCollection: vscode.DiagnosticCollection; + private prevSquiggleMetrics: Map = new Map(); + private rootfs: string = null; // Any time the default settings are parsed and assigned to `this.configurationJson`, // we want to track when the default includes have been added to it. @@ -117,32 +122,7 @@ export class CppProperties { let rootPath: string = rootUri ? rootUri.fsPath : ""; this.currentConfigurationIndex = new PersistentFolderState("CppProperties.currentConfigurationIndex", -1, rootPath); this.configFolder = path.join(rootPath, ".vscode"); - - let configFilePath: string = path.join(this.configFolder, "c_cpp_properties.json"); - if (fs.existsSync(configFilePath)) { - this.propertiesFile = vscode.Uri.file(configFilePath); - this.parsePropertiesFile(); - } - if (!this.configurationJson) { - this.resetToDefaultSettings(this.CurrentConfigurationIndex === -1); - } - - this.configFileWatcher = vscode.workspace.createFileSystemWatcher(path.join(this.configFolder, this.configurationGlobPattern)); - this.disposables.push(this.configFileWatcher); - this.configFileWatcher.onDidCreate((uri) => { - this.propertiesFile = uri; - this.handleConfigurationChange(); - }); - - this.configFileWatcher.onDidDelete(() => { - this.propertiesFile = null; - this.resetToDefaultSettings(true); - this.handleConfigurationChange(); - }); - - this.configFileWatcher.onDidChange(() => { - this.handleConfigurationChange(); - }); + this.diagnosticCollection = vscode.languages.createDiagnosticCollection(rootPath); this.buildVcpkgIncludePath(); @@ -180,9 +160,34 @@ export class CppProperties { this.defaultFrameworks = compilerDefaults.frameworks; this.defaultWindowsSdkVersion = compilerDefaults.windowsSdkVersion; this.defaultIntelliSenseMode = compilerDefaults.intelliSenseMode; + this.rootfs = compilerDefaults.rootfs; // defaultPaths is only used when there isn't a c_cpp_properties.json, but we don't send the configuration changed event // to the language server until the default include paths and frameworks have been sent. + let configFilePath: string = path.join(this.configFolder, "c_cpp_properties.json"); + if (fs.existsSync(configFilePath)) { + this.propertiesFile = vscode.Uri.file(configFilePath); + } else { + this.propertiesFile = null; + } + + this.configFileWatcher = vscode.workspace.createFileSystemWatcher(path.join(this.configFolder, this.configurationGlobPattern)); + this.disposables.push(this.configFileWatcher); + this.configFileWatcher.onDidCreate((uri) => { + this.propertiesFile = uri; + this.handleConfigurationChange(); + }); + + this.configFileWatcher.onDidDelete(() => { + this.propertiesFile = null; + this.resetToDefaultSettings(true); + this.handleConfigurationChange(); + }); + + this.configFileWatcher.onDidChange(() => { + this.handleConfigurationChange(); + }); + this.handleConfigurationChange(); } @@ -196,6 +201,7 @@ export class CppProperties { private onSelectionChanged(): void { this.selectionChanged.fire(this.CurrentConfigurationIndex); + this.handleSquiggles(); } private onCompileCommandsChanged(path: string): void { @@ -467,6 +473,9 @@ export class CppProperties { } private updateServerOnFolderSettingsChange(): void { + if (!this.configurationJson) { + return; + } let settings: CppSettings = new CppSettings(this.rootUri); let env: Environment = this.ExtendedEnvironment; for (let i: number = 0; i < this.configurationJson.configurations.length; i++) { @@ -562,7 +571,10 @@ export class CppProperties { }); settings.update("default.configurationProvider", undefined); // delete the setting } + let savedKnownCompilers: KnownCompiler[] = this.configurationJson.configurations[0].knownCompilers; + delete this.configurationJson.configurations[0].knownCompilers; edit.insert(document.uri, new vscode.Position(0, 0), JSON.stringify(this.configurationJson, null, 4)); + this.configurationJson.configurations[0].knownCompilers = savedKnownCompilers; vscode.workspace.applyEdit(edit).then((status) => { // Fix for issue 163 // https://github.com/Microsoft/vscppsamples/issues/163 @@ -583,12 +595,15 @@ export class CppProperties { } private handleConfigurationChange(): void { + if (this.propertiesFile === undefined) { + return; // Occurs when propertiesFile hasn't been checked yet. + } this.configFileWatcherFallbackTime = new Date(); if (this.propertiesFile) { this.parsePropertiesFile(); // parsePropertiesFile can fail, but it won't overwrite an existing configurationJson in the event of failure. // this.configurationJson should only be undefined here if we have never successfully parsed the propertiesFile. - if (this.configurationJson !== undefined) { + if (this.configurationJson) { if (this.CurrentConfigurationIndex < 0 || this.CurrentConfigurationIndex >= this.configurationJson.configurations.length) { // If the index is out of bounds (during initialization or due to removal of configs), fix it. @@ -597,7 +612,7 @@ export class CppProperties { } } - if (this.configurationJson === undefined) { + if (!this.configurationJson) { this.resetToDefaultSettings(true); // I don't think there's a case where this will be hit anymore. } @@ -612,6 +627,10 @@ export class CppProperties { return; // Repros randomly when the file is initially created. The parse will get called again after the file is written. } + // Replace all \ with \\. + // Otherwise, the JSON.parse result will have the \ missing. + readResults = readResults.replace(/\\/g, '\\\\'); + // Try to use the same configuration as before the change. let newJson: ConfigurationJson = JSON.parse(readResults); if (!newJson || !newJson.configurations || newJson.configurations.length === 0) { @@ -675,15 +694,173 @@ export class CppProperties { fs.writeFileSync(this.propertiesFile.fsPath, JSON.stringify(this.configurationJson, null, 4)); } catch (err) { // Ignore write errors, the file may be under source control. Updated settings will only be modified in memory. - vscode.window.showWarningMessage('Attempt to update "' + this.propertiesFile.fsPath + '" failed (do you have write access?)'); + vscode.window.showWarningMessage(`Attempt to update "${this.propertiesFile.fsPath}" failed (do you have write access?)`); } } + + this.handleSquiggles(); } catch (err) { - vscode.window.showErrorMessage('Failed to parse "' + this.propertiesFile.fsPath + '": ' + err.message); + vscode.window.showErrorMessage(`Failed to parse "${this.propertiesFile.fsPath}": ${err.message}`); throw err; } } + private handleSquiggles(): void { + if (!this.propertiesFile) { + return; + } + vscode.workspace.openTextDocument(this.propertiesFile).then((document: vscode.TextDocument) => { + let diagnostics: vscode.Diagnostic[] = new Array(); + + // Get the text of the current configuration. + let curText: string = document.getText(); + let curTextStartOffset: number = 0; + let configStart: number = curText.search(new RegExp(`{\\s*"name"\\s*:\\s*"${this.CurrentConfiguration.name}"`)); + if (configStart === -1) { + telemetry.logLanguageServerEvent("ConfigSquiggles", { "error": "config name not first" }); + return; + } + curTextStartOffset = configStart + 1; + curText = curText.substr(curTextStartOffset); // Remove earlier configs. + let nameEnd: number = curText.indexOf(":"); + curTextStartOffset += nameEnd + 1; + curText = curText.substr(nameEnd + 1); + let nextNameStart: number = curText.search(new RegExp('"name"\\s*:\\s*"')); + if (nextNameStart !== -1) { + curText = curText.substr(0, nextNameStart + 6); // Remove later configs. + let nextNameStart2: number = curText.search(new RegExp('\\s*}\\s*,\\s*{\\s*"name"')); + if (nextNameStart2 === -1) { + telemetry.logLanguageServerEvent("ConfigSquiggles", { "error": "next config name not first" }); + return; + } + curText = curText.substr(0, nextNameStart2); + } + + // TODO: Add other squiggles. + + // Check for path-related squiggles. + let paths: Set = new Set(); + for (let pathArray of [ (this.CurrentConfiguration.browse ? this.CurrentConfiguration.browse.path : undefined), + this.CurrentConfiguration.includePath, this.CurrentConfiguration.macFrameworkPath, this.CurrentConfiguration.forcedInclude ] ) { + if (pathArray) { + for (let curPath of pathArray) { + paths.add(`"${curPath}"`); + } + } + } + if (this.CurrentConfiguration.compileCommands) { + paths.add(`"${this.CurrentConfiguration.compileCommands}"`); + } + + // Get the start/end for properties that are file-only. + let forcedIncludeStart: number = curText.search(/\s*\"forcedInclude\"\s*:\s*\[/); + let forcedeIncludeEnd: number = forcedIncludeStart === -1 ? -1 : curText.indexOf("]", forcedIncludeStart); + let compileCommandsStart: number = curText.search(/\s*\"compileCommands\"\s*:\s*\"/); + let compileCommandsEnd: number = compileCommandsStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compileCommandsStart)) + 1); + + if (this.prevSquiggleMetrics[this.CurrentConfiguration.name] === undefined) { + this.prevSquiggleMetrics[this.CurrentConfiguration.name] = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; + } + let newSquiggleMetrics: { [key: string]: number } = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; + + for (let curPath of paths) { + let resolvedPath: string = curPath.substr(1, curPath.length - 2); + // Resolve special path cases. + if (resolvedPath === "${default}") { + // TODO: Add squiggles for when the C_Cpp.default.* paths are invalid. + continue; + } + resolvedPath = util.resolveVariables(resolvedPath, this.ExtendedEnvironment); + if (resolvedPath.includes("${workspaceFolder}")) { + resolvedPath = resolvedPath.replace("${workspaceFolder}", this.rootUri.fsPath); + } + if (resolvedPath.includes("${workspaceRoot}")) { + resolvedPath = resolvedPath.replace("${workspaceRoot}", this.rootUri.fsPath); + } + if (resolvedPath.includes("${vcpkgRoot}")) { + resolvedPath = resolvedPath.replace("${vcpkgRoot}", util.getVcpkgRoot()); + } + if (resolvedPath.includes("*")) { + resolvedPath = resolvedPath.replace(/\*/g, ""); + } + + // Handle WSL paths. + if (resolvedPath.startsWith("/") && os.platform() === 'win32') { + const mntStr: string = "/mnt/"; + if (resolvedPath.length > "/mnt/c/".length && resolvedPath.substr(0, mntStr.length) === mntStr) { + resolvedPath = resolvedPath.substr(mntStr.length); + resolvedPath = resolvedPath.substr(0, 1) + ":" + resolvedPath.substr(1); + } else if (this.rootfs && this.rootfs.length > 0) { + resolvedPath = this.rootfs + resolvedPath.substr(1); + resolvedPath = resolvedPath.replace(/\//g, path.sep); + // TODO: Handle WSL symlinks. + } + } + + let pathExists: boolean = true; + if (!fs.existsSync(resolvedPath)) { + // Check again for a relative path. + let relativePath: string = this.rootUri.fsPath + path.sep + resolvedPath; + if (!fs.existsSync(relativePath)) { + pathExists = false; + } else { + resolvedPath = relativePath; + } + } + + // Iterate through the text and apply squiggles. + for (let curOffset: number = curText.indexOf(curPath); curOffset !== -1; curOffset = curText.indexOf(curPath, curOffset + curPath.length)) { + let message: string; + if (!pathExists) { + message = `Cannot find "${resolvedPath}".`; + newSquiggleMetrics.PathNonExistent++; + } else { + // Check for file versus path mismatches. + if ((curOffset >= forcedIncludeStart && curOffset <= forcedeIncludeEnd) || + (curOffset >= compileCommandsStart && curOffset <= compileCommandsEnd)) { + if (util.checkFileExistsSync(resolvedPath)) { + continue; + } + message = `Path is not a file: "${resolvedPath}".`; + newSquiggleMetrics.PathNotAFile++; + } else { + if (util.checkDirectoryExistsSync(resolvedPath)) { + continue; + } + message = `Path is not a directory: "${resolvedPath}".`; + newSquiggleMetrics.PathNotADirectory++; + } + } + let diagnostic: vscode.Diagnostic = new vscode.Diagnostic( + new vscode.Range(document.positionAt(curTextStartOffset + curOffset + 1), document.positionAt(curTextStartOffset + curOffset + curPath.length - 1)), + message, vscode.DiagnosticSeverity.Warning); + diagnostics.push(diagnostic); + } + } + if (diagnostics.length !== 0) { + this.diagnosticCollection.set(document.uri, diagnostics); + } else { + this.diagnosticCollection.clear(); + } + + // Send telemetry on squiggle changes. + let changedSquiggleMetrics: { [key: string]: number } = {}; + if (newSquiggleMetrics.PathNonExistent !== this.prevSquiggleMetrics[this.CurrentConfiguration.name].PathNonExistent) { + changedSquiggleMetrics.PathNonExistent = newSquiggleMetrics.PathNonExistent; + } + if (newSquiggleMetrics.PathNotAFile !== this.prevSquiggleMetrics[this.CurrentConfiguration.name].PathNotAFile) { + changedSquiggleMetrics.PathNotAFile = newSquiggleMetrics.PathNotAFile; + } + if (newSquiggleMetrics.PathNotADirectory !== this.prevSquiggleMetrics[this.CurrentConfiguration.name].PathNotADirectory) { + changedSquiggleMetrics.PathNotADirectory = newSquiggleMetrics.PathNotADirectory; + } + if (Object.keys(changedSquiggleMetrics).length > 0) { + telemetry.logLanguageServerEvent("ConfigSquiggles", null, changedSquiggleMetrics); + } + this.prevSquiggleMetrics[this.CurrentConfiguration.name] = newSquiggleMetrics; + }); + } + private updateToVersion2(): void { this.configurationJson.version = 2; // no-op. We don't automatically populate the browse.path anymore. @@ -735,13 +912,13 @@ export class CppProperties { let propertiesFile: string = path.join(this.configFolder, "c_cpp_properties.json"); fs.stat(propertiesFile, (err, stats) => { if (err) { - if (this.propertiesFile !== null) { + if (this.propertiesFile) { this.propertiesFile = null; // File deleted. this.resetToDefaultSettings(true); this.handleConfigurationChange(); } } else if (stats.mtime > this.configFileWatcherFallbackTime) { - if (this.propertiesFile === null) { + if (!this.propertiesFile) { this.propertiesFile = vscode.Uri.file(propertiesFile); // File created. } this.handleConfigurationChange(); @@ -755,5 +932,7 @@ export class CppProperties { this.compileCommandFileWatchers.forEach((watcher: fs.FSWatcher) => watcher.close()); this.compileCommandFileWatchers = []; //reset it + + this.diagnosticCollection.dispose(); } } diff --git a/Extension/src/common.ts b/Extension/src/common.ts index b0729d01a3..43aa47c1e4 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -386,6 +386,23 @@ export function checkDirectoryExists(dirPath: string): Promise { }); } +export function checkFileExistsSync(filePath: string): boolean { + try { + return fs.statSync(filePath).isFile(); + } catch (e) { + } + return false; +} + +/** Test whether a directory exists */ +export function checkDirectoryExistsSync(dirPath: string): boolean { + try { + return fs.statSync(dirPath).isDirectory(); + } catch (e) { + } + return false; +} + /** Read the files in a directory */ export function readDir(dirPath: string): Promise { return new Promise((resolve) => { From ece90711fb4722ef4b7dc27009db38be3d6abd00 Mon Sep 17 00:00:00 2001 From: Bob Brown Date: Tue, 26 Feb 2019 14:54:22 -0800 Subject: [PATCH 22/51] fix typos (#3218) --- Extension/package.json | 8 ++++---- Extension/tools/OptionsSchema.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index f0708980c2..87faa6bb44 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -991,12 +991,12 @@ "anyOf": [ { "type": "string", - "description": "Optional process id to attach the debugger to. Use \"${command:pickProcesss}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", + "description": "Optional process id to attach the debugger to. Use \"${command:pickProcess}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", "default": "${command:pickProcess}" }, { "type": "integer", - "description": "Optional process id to attach the debugger to. Use \"${command:pickProcesss}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", + "description": "Optional process id to attach the debugger to. Use \"${command:pickProcess}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", "default": 0 } ] @@ -1272,12 +1272,12 @@ "anyOf": [ { "type": "string", - "description": "Optional process id to attach the debugger to. Use \"${command:pickProcesss}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", + "description": "Optional process id to attach the debugger to. Use \"${command:pickProcess}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", "default": "${command:pickProcess}" }, { "type": "integer", - "description": "Optional process id to attach the debugger to. Use \"${command:pickProcesss}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", + "description": "Optional process id to attach the debugger to. Use \"${command:pickProcess}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", "default": 0 } ] diff --git a/Extension/tools/OptionsSchema.json b/Extension/tools/OptionsSchema.json index 07163c7178..109e9f3aa6 100644 --- a/Extension/tools/OptionsSchema.json +++ b/Extension/tools/OptionsSchema.json @@ -345,12 +345,12 @@ "anyOf": [ { "type": "string", - "description": "Optional process id to attach the debugger to. Use \"${command:pickProcesss}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", + "description": "Optional process id to attach the debugger to. Use \"${command:pickProcess}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", "default": "${command:pickProcess}" }, { "type": "integer", - "description": "Optional process id to attach the debugger to. Use \"${command:pickProcesss}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", + "description": "Optional process id to attach the debugger to. Use \"${command:pickProcess}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", "default": 0 } ] @@ -511,12 +511,12 @@ "anyOf": [ { "type": "string", - "description": "Optional process id to attach the debugger to. Use \"${command:pickProcesss}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", + "description": "Optional process id to attach the debugger to. Use \"${command:pickProcess}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", "default": "${command:pickProcess}" }, { "type": "integer", - "description": "Optional process id to attach the debugger to. Use \"${command:pickProcesss}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", + "description": "Optional process id to attach the debugger to. Use \"${command:pickProcess}\" to get a list of local running processes to attach to. Note that some platforms require administrator privileges in order to attach to a process.", "default": 0 } ] From 8d96465cb648c1db349e9e6b6c75dd550981ad98 Mon Sep 17 00:00:00 2001 From: Bob Brown Date: Tue, 26 Feb 2019 20:09:20 -0800 Subject: [PATCH 23/51] Enable ${command:cpptools.activeConfigName} in tasks #1524 (#3219) * Enable ${command:cpptools.activeConfigName} in tasks #1524 * PR feedback --- Extension/src/LanguageServer/extension.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 8aec926c12..09177b5b84 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -584,6 +584,7 @@ export function registerCommands(): void { disposables.push(vscode.commands.registerCommand('C_Cpp.ResumeParsing', onResumeParsing)); disposables.push(vscode.commands.registerCommand('C_Cpp.ShowParsingCommands', onShowParsingCommands)); disposables.push(vscode.commands.registerCommand('C_Cpp.TakeSurvey', onTakeSurvey)); + disposables.push(vscode.commands.registerCommand('cpptools.activeConfigName', onGetActiveConfigName)); getTemporaryCommandRegistrarInstance().executeDelayedCommands(); } @@ -765,6 +766,10 @@ function onTakeSurvey(): void { vscode.commands.executeCommand('vscode.open', uri); } +function onGetActiveConfigName(): Thenable { + return clients.ActiveClient.getCurrentConfigName(); +} + function reportMacCrashes(): void { if (process.platform === "darwin") { prevCrashFile = ""; From 98260f96ea45a82b2bbc54b6df79940f05af99b7 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Thu, 28 Feb 2019 14:55:14 -0800 Subject: [PATCH 24/51] Remove Travis-CI (#3205) Removing .travis.yml and will be removing webhooks/app integration of Travis-CI from vscode-cpptools. Minor fixes and add debug integration tests back. --- .travis.yml | 43 ------------------- .../Debugger/debugAdapterDescriptorFactory.ts | 6 +-- .../debugAdapterDescriptorFactory.ts | 6 +-- .../debug/integration.test.ts | 37 ++++++++++++++++ 4 files changed, 43 insertions(+), 49 deletions(-) delete mode 100644 .travis.yml create mode 100644 Extension/test/integrationTests/debug/integration.test.ts diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0fa3788981..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: node_js - -node_js: -- "8" - -before_install: - # Do not modify. Required for GUI based tests: See https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI - - if [ $TRAVIS_OS_NAME == "linux" ]; then - export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0; - sh -e /etc/init.d/xvfb start; - sleep 3; - fi - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - - sourceline: 'deb https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main' - key_url: 'https://packages.microsoft.com/keys/microsoft.asc' - packages: - - gdb - - g++-4.9 - - -script: - # Download debugAdapters from an existing extension version. See TravisCI settings to set CPPTOOL_VERSION - - mkdir -p ~/.vscode/extensions/ms-vscode.cpptools-$CPPTOOL_VERSION - - wget https://github.com/Microsoft/vscode-cpptools/releases/download/$CPPTOOL_VERSION/cpptools.vsix -O ~/cpptools.vsix - - unzip ~/cpptools.vsix "extension/debugAdapters/*" -d ~/. - - mv ~/extension/debugAdapters ~/.vscode/extensions/ms-vscode.cpptools-$CPPTOOL_VERSION/debugAdapters - # Build and then run tests - - cd Extension - - npm install - - npm run compile - - npm run tslint - # pr-check needs to run before test. test modifies package.json. - - npm run pr-check - - npm run unitTests - # TODO: Merge tests into one group due to Gulp 4.0 - - npm run integrationTests - # Dump integrationTest.log output - - find ~ -name "integrationTests.log" -type f -exec cat {} \; - \ No newline at end of file diff --git a/Extension/src/Debugger/debugAdapterDescriptorFactory.ts b/Extension/src/Debugger/debugAdapterDescriptorFactory.ts index 76b111a0a2..5734265f82 100644 --- a/Extension/src/Debugger/debugAdapterDescriptorFactory.ts +++ b/Extension/src/Debugger/debugAdapterDescriptorFactory.ts @@ -11,7 +11,7 @@ import * as os from 'os'; // Registers DebugAdapterDescriptorFactory for `cppdbg` and `cppvsdbg`. If it is not ready, it will prompt a wait for the download dialog. // NOTE: This file is not automatically tested. -abstract class DebugAdapterDescriptorFactoryWithContext implements vscode.DebugAdapterDescriptorFactory { +abstract class AbstractDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescriptorFactory { protected readonly context: vscode.ExtensionContext; // This is important for the Mock Debugger since it can not use src/common @@ -22,7 +22,7 @@ abstract class DebugAdapterDescriptorFactoryWithContext implements vscode.DebugA abstract createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult; } -export class CppdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorFactoryWithContext { +export class CppdbgDebugAdapterDescriptorFactory extends AbstractDebugAdapterDescriptorFactory { public static DEBUG_TYPE : string = "cppdbg"; constructor(context: vscode.ExtensionContext) { @@ -47,7 +47,7 @@ export class CppdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorF } } -export class CppvsdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorFactoryWithContext { +export class CppvsdbgDebugAdapterDescriptorFactory extends AbstractDebugAdapterDescriptorFactory { public static DEBUG_TYPE : string = "cppvsdbg"; constructor(context: vscode.ExtensionContext) { diff --git a/Extension/test/integrationTests/MockDebugger/debugAdapterDescriptorFactory.ts b/Extension/test/integrationTests/MockDebugger/debugAdapterDescriptorFactory.ts index 6c30191201..02a6fa5db9 100644 --- a/Extension/test/integrationTests/MockDebugger/debugAdapterDescriptorFactory.ts +++ b/Extension/test/integrationTests/MockDebugger/debugAdapterDescriptorFactory.ts @@ -8,7 +8,7 @@ import * as path from 'path'; // import * as util from '../src/common' <- DO NOT USE. Also do not use anything with relative paths, it will break during replacing in test/integrationTests/debug/integration.test.ts -abstract class DebugAdapterDescriptorFactoryWithContext implements vscode.DebugAdapterDescriptorFactory { +abstract class AbstractDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescriptorFactory { protected readonly context: vscode.ExtensionContext; constructor(context: vscode.ExtensionContext) { @@ -18,7 +18,7 @@ abstract class DebugAdapterDescriptorFactoryWithContext implements vscode.DebugA abstract createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult; } -export class CppdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorFactoryWithContext { +export class CppdbgDebugAdapterDescriptorFactory extends AbstractDebugAdapterDescriptorFactory { public static DEBUG_TYPE : string = "cppdbg"; constructor(context: vscode.ExtensionContext) { @@ -32,7 +32,7 @@ export class CppdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorF } } -export class CppvsdbgDebugAdapterDescriptorFactory extends DebugAdapterDescriptorFactoryWithContext { +export class CppvsdbgDebugAdapterDescriptorFactory extends AbstractDebugAdapterDescriptorFactory { public static DEBUG_TYPE : string = "cppvsdbg"; constructor(context: vscode.ExtensionContext) { diff --git a/Extension/test/integrationTests/debug/integration.test.ts b/Extension/test/integrationTests/debug/integration.test.ts new file mode 100644 index 0000000000..dfe02e6212 --- /dev/null +++ b/Extension/test/integrationTests/debug/integration.test.ts @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as assert from 'assert'; + +suite(`Debug Integration Test: `, function(): void { + let origFactoryFile: string; + let tempFactoryFile: string; + let hijackedFactoryFile: string; + + suiteSetup(async function(): Promise { + let extension: vscode.Extension = vscode.extensions.getExtension("ms-vscode.cpptools"); + if (!extension.isActive) { + await extension.activate(); + } + }); + + test("Starting (gdb) Launch from the workspace root should create an Active Debug Session", async function() { + // If it is failing on startDebugging. Investigate the SimpleCppProject's tasks.json or launch.json. + await vscode.debug.startDebugging(vscode.workspace.workspaceFolders[0], "(gdb) Launch"); + + let debugSessionTerminated: Promise = new Promise(resolve => { + vscode.debug.onDidTerminateDebugSession((e) => resolve()); + }); + + try { + assert.equal(vscode.debug.activeDebugSession.type, "cppdbg"); + } catch (e) { + assert.fail("Debugger failed to launch. Did the extension activate correctly?"); + } + + await debugSessionTerminated; + }); +}); \ No newline at end of file From 3d7937feeb1699492969acb6c8e6b915cd4abfae Mon Sep 17 00:00:00 2001 From: Griffin Downs <35574547+grdowns@users.noreply.github.com> Date: Thu, 28 Feb 2019 16:46:26 -0800 Subject: [PATCH 25/51] Grdowns/launch configs (#3215) * Implement debug configurations that will build the active C/C++ file and launch a debugger (disabled) * Handle compilerPath in build and squiggles. --- Extension/package-lock.json | 106 ++++++--------- Extension/package.json | 14 +- Extension/package.nls.it.json | 3 +- Extension/package.nls.json | 7 +- Extension/package.nls.zh-cn.json | 3 +- .../src/Debugger/configurationProvider.ts | 127 +++++++++++++++++- Extension/src/Debugger/extension.ts | 73 +++++++++- .../src/LanguageServer/configurations.ts | 16 ++- Extension/src/LanguageServer/extension.ts | 67 +++++---- Extension/src/common.ts | 97 +++++++++++++ Extension/src/main.ts | 1 + 11 files changed, 403 insertions(+), 111 deletions(-) diff --git a/Extension/package-lock.json b/Extension/package-lock.json index 725e0f648a..9931d25af0 100644 --- a/Extension/package-lock.json +++ b/Extension/package-lock.json @@ -16,9 +16,9 @@ "dev": true }, "@types/node": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.4.tgz", - "integrity": "sha512-iSJdm5S6Vhk+Ep38gwxie/5T7+MSip6bu30LsE5VylRKTMxXrvVJGqdxJLs8hsviLqjlCx9o3uRXDkJ+/K0DsQ==", + "version": "8.10.40", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.40.tgz", + "integrity": "sha512-RRSjdwz63kS4u7edIwJUn8NqKLLQ6LyqF/X4+4jp38MBT3Vwetewi2N4dgJEshLbDwNgOJXNYoOwzVZUSSLhkQ==", "dev": true }, "agent-base": { @@ -30,9 +30,9 @@ } }, "ajv": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", - "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "version": "6.9.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.2.tgz", + "integrity": "sha512-4UFy0/LgDo7Oa/+wOAlj44tp9K78u38E5/359eSrqEp1Z5PdVfimCcs7SluXMP755RUQu6d2b4AvF0R1C9RZjg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -114,6 +114,16 @@ "buffer-equal": "^1.0.0" } }, + "applicationinsights": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.0.8.tgz", + "integrity": "sha512-KzOOGdphOS/lXWMFZe5440LUdFbrLpMvh2SaRxn7BmiI550KAoSb2gIhiq6kJZ9Ir3AxRRztjhzif+e5P5IXIg==", + "requires": { + "diagnostic-channel": "0.2.0", + "diagnostic-channel-publishers": "0.2.1", + "zone.js": "0.7.6" + } + }, "archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", @@ -1626,8 +1636,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -1648,14 +1657,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1670,20 +1677,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -1800,8 +1804,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -1813,7 +1816,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1828,7 +1830,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1836,14 +1837,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -1862,7 +1861,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -1943,8 +1941,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -1956,7 +1953,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -2042,8 +2038,7 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -2079,7 +2074,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2099,7 +2093,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2143,14 +2136,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -5109,9 +5100,9 @@ "dev": true }, "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", "dev": true }, "unc-path-regex": { @@ -5426,18 +5417,15 @@ } }, "vrsource-tslint-rules": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/vrsource-tslint-rules/-/vrsource-tslint-rules-5.8.2.tgz", - "integrity": "sha512-wr69FB/S6P8GT+rO/OocCr3biFaX4lT/JH1IZGqd7Jy4A3WaPUs0Jn4ELmTEpbFtYMWTawFACMQh1AyT7YewRQ==", - "dev": true, - "requires": { - "tslint": "~5.8.0" - } + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/vrsource-tslint-rules/-/vrsource-tslint-rules-5.8.3.tgz", + "integrity": "sha512-3tYS1zn+d9QtgmQIYmQ9e1i0kipmUjp6cvvYWLC+lZ3z8CQUle7rPKsTFMexOTIVXDpBt9JSJlhDWbwljl3DMQ==", + "dev": true }, "vscode": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.29.tgz", - "integrity": "sha512-E6hzqGtCD65BnBxdZzSIi8FPCM4seEEK/bbTeYdJntg+4D5R6GLbdYFySE9DNTtMJF4iB9UGoucKU/p8Guts1g==", + "version": "1.1.30", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.30.tgz", + "integrity": "sha512-YDj5w0TGOcS8XLIdekT4q6LlLV6hv1ZvuT2aGT3KJll4gMz6dUPDgo2VVAf0i0E8igbbZthwvmaUGRwW9yPIaw==", "dev": true, "requires": { "glob": "^7.1.2", @@ -5505,23 +5493,11 @@ "integrity": "sha512-d+l4lrEz6OP2kmGpweqe37x9H7icAMV8S4m8azTWGAIlNJxBP4rlSTnZa7NMLcbgqWkWG9lTGY7fJ+rSPaW7yg==" }, "vscode-extension-telemetry": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.0.tgz", - "integrity": "sha512-WVCnP+uLxlqB6UD98yQNV47mR5Rf79LFxpuZhSPhEf0Sb4tPZed3a63n003/dchhOwyCTCBuNN4n8XKJkLEI1Q==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.1.tgz", + "integrity": "sha512-TkKKG/B/J94DP5qf6xWB4YaqlhWDg6zbbqVx7Bz//stLQNnfE9XS1xm3f6fl24c5+bnEK0/wHgMgZYKIKxPeUA==", "requires": { - "applicationinsights": "1.0.6" - }, - "dependencies": { - "applicationinsights": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.0.6.tgz", - "integrity": "sha512-VQT3kBpJVPw5fCO5n+WUeSx0VHjxFtD7znYbILBlVgOS9/cMDuGFmV2Br3ObzFyZUDGNbEfW36fD1y2/vAiCKw==", - "requires": { - "diagnostic-channel": "0.2.0", - "diagnostic-channel-publishers": "0.2.1", - "zone.js": "0.7.6" - } - } + "applicationinsights": "1.0.8" } }, "vscode-jsonrpc": { diff --git a/Extension/package.json b/Extension/package.json index 87faa6bb44..d9d38be8e0 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -1420,10 +1420,11 @@ }, "devDependencies": { "@types/mocha": "^5.2.6", - "@types/node": "^8.0.46", - "await-notify": "^1.0.1", + "@types/node": "^8.10.40", "async-child-process": "^1.1.1", + "await-notify": "^1.0.1", "child-process": "^1.0.2", + "extend": "3.0.2", "gulp": "^4.0.0", "gulp-env": "0.4.0", "gulp-mocha": "5.0.0", @@ -1432,10 +1433,9 @@ "tslint": "5.8.0", "tslint-microsoft-contrib": "5.0.1", "tslint-no-unused-expression-chai": "0.0.3", - "typescript": "^2.5.3", - "vrsource-tslint-rules": "^5.8.2", - "vscode": "^1.1.29", - "extend": "3.0.2" + "typescript": "^2.9.2", + "vrsource-tslint-rules": "^5.8.3", + "vscode": "^1.1.30" }, "dependencies": { "@types/minimatch": "^3.0.3", @@ -1448,7 +1448,7 @@ "vscode-cpptools": "2.1.1", "vscode-debugadapter": "~1.33.0", "vscode-debugprotocol": "~1.33.0", - "vscode-extension-telemetry": "~0.1.0", + "vscode-extension-telemetry": "^0.1.1", "vscode-languageclient": "5.1.1", "yauzl": "~2.10.0" }, diff --git a/Extension/package.nls.it.json b/Extension/package.nls.it.json index e6735b8399..78b9f62b7f 100644 --- a/Extension/package.nls.it.json +++ b/Extension/package.nls.it.json @@ -14,5 +14,6 @@ "c_cpp.command.pauseParsing.title": "Metti in pausa l'analisi del codice", "c_cpp.command.resumeParsing.title": "Riprendi l'analisi del codice", "c_cpp.command.showParsingCommands.title": "Mostra comandi per l'analisi del codice", - "c_cpp.command.takeSurvey.title": "Partecipa al Sondaggio" + "c_cpp.command.takeSurvey.title": "Partecipa al Sondaggio", + "c_cpp.command.buildAndDebugActiveFile.title": "Compila ed Esegui il debug del file attivo" } \ No newline at end of file diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 07190b6125..fdd276cd63 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -2,8 +2,8 @@ "c_cpp.command.configurationSelect.title": "Select a configuration...", "c_cpp.command.configurationProviderSelect.title": "Change configuration provider...", "c_cpp.command.configurationEdit.title": "Edit configurations...", - "c_cpp.command.goToDeclaration.title": "Go to declaration", - "c_cpp.command.peekDeclaration.title": "Peek declaration", + "c_cpp.command.goToDeclaration.title": "Go to Declaration", + "c_cpp.command.peekDeclaration.title": "Peek Declaration", "c_cpp.command.switchHeaderSource.title": "Switch Header/Source", "c_cpp.command.navigate.title": "Navigate...", "c_cpp.command.toggleErrorSquiggles.title": "Toggle error squiggles", @@ -14,5 +14,6 @@ "c_cpp.command.pauseParsing.title": "Pause parsing", "c_cpp.command.resumeParsing.title": "Resume parsing", "c_cpp.command.showParsingCommands.title": "Show parsing commands", - "c_cpp.command.takeSurvey.title": "Take survey" + "c_cpp.command.takeSurvey.title": "Take survey", + "c_cpp.command.buildAndDebugActiveFile.title": "Build and Debug Active File" } \ No newline at end of file diff --git a/Extension/package.nls.zh-cn.json b/Extension/package.nls.zh-cn.json index 85c66d0015..3d40e60849 100644 --- a/Extension/package.nls.zh-cn.json +++ b/Extension/package.nls.zh-cn.json @@ -14,5 +14,6 @@ "c_cpp.command.pauseParsing.title": "暂停解析", "c_cpp.command.resumeParsing.title": "继续解析", "c_cpp.command.showParsingCommands.title": "查看解析命令", - "c_cpp.command.takeSurvey.title": "调查问卷" + "c_cpp.command.takeSurvey.title": "调查问卷", + "c_cpp.command.buildAndDebugActiveFile.title": "生成和调试当前文件" } \ No newline at end of file diff --git a/Extension/src/Debugger/configurationProvider.ts b/Extension/src/Debugger/configurationProvider.ts index ac64edbfd7..3ff0811a0d 100644 --- a/Extension/src/Debugger/configurationProvider.ts +++ b/Extension/src/Debugger/configurationProvider.ts @@ -7,11 +7,80 @@ import * as debugUtils from './utils'; import * as os from 'os'; import * as path from 'path'; import * as vscode from 'vscode'; +import { getBuildTasks, BuildTaskDefinition } from '../LanguageServer/extension'; +import * as util from '../common'; +import * as fs from 'fs'; +import * as assert from 'assert'; +import * as Telemetry from '../telemetry'; +import { buildAndDebugActiveFileStr } from './extension'; import { IConfiguration, IConfigurationSnippet, DebuggerType, MIConfigurations, WindowsConfigurations, WSLConfigurations, PipeTransportConfigurations } from './configurations'; import { parse } from 'jsonc-parser'; +import { PlatformInformation } from '../platform'; -abstract class CppConfigurationProvider implements vscode.DebugConfigurationProvider { +function isDebugLaunchStr(str: string): boolean { + return str === "(gdb) Launch" || str === "(lldb) Launch" || str === "(Windows) Launch"; +} + +/* + * Retrieves configurations from a provider and displays them in a quickpick menu to be selected. + * Ensures that the selected configuration's preLaunchTask (if existent) is populated in the user's task.json. + * Automatically starts debugging for "Build and Debug" configurations. + */ +export class QuickPickConfigurationProvider implements vscode.DebugConfigurationProvider { + private underlyingProvider: vscode.DebugConfigurationProvider; + + public constructor(provider: CppConfigurationProvider) { + this.underlyingProvider = provider; + } + + async provideDebugConfigurations(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): Promise { + const configs: vscode.DebugConfiguration[] = await this.underlyingProvider.provideDebugConfigurations(folder, token); + const defaultConfig: vscode.DebugConfiguration = configs.find(config => { return isDebugLaunchStr(config.name); }); + console.assert(defaultConfig); + const editor: vscode.TextEditor = vscode.window.activeTextEditor; + if (!editor || !util.fileIsCOrCppSource(editor.document.fileName) || configs.length <= 1) { + return [defaultConfig]; + } + interface MenuItem extends vscode.QuickPickItem { + configuration: vscode.DebugConfiguration; + } + + const items: MenuItem[] = configs.map(config => { + let menuItem: MenuItem = {label: config.name, configuration: config}; + // Rename the menu item for the default configuration as its name is non-descriptive. + if (isDebugLaunchStr(menuItem.label)) { + menuItem.label = "Default Configuration"; + } + return menuItem; + }); + + return vscode.window.showQuickPick(items, {placeHolder: "Select a configuration"}).then(async selection => { + // Wrap in new Promise to make sure task kicks off before VS Code switches the active document to launch.json + return new Promise(async resolve => { + if (!selection) { + return resolve([defaultConfig]); // User canceled it. Choose the default config? + } + if (selection.label.indexOf(buildAndDebugActiveFileStr()) !== -1 && selection.configuration.preLaunchTask) { + try { + await util.ensureBuildTaskExists(selection.configuration.preLaunchTask); + await vscode.debug.startDebugging(folder, selection.configuration); + Telemetry.logDebuggerEvent("buildAndDebug", { "success": "true" }); + } catch (e) { + Telemetry.logDebuggerEvent("buildAndDebug", { "success": "false" }); + } + } + return resolve([selection.configuration]); + }); + }); + } + + resolveDebugConfiguration(folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, token?: vscode.CancellationToken): vscode.ProviderResult { + return this.underlyingProvider.resolveDebugConfiguration(folder, config, token); + } +} + +class CppConfigurationProvider implements vscode.DebugConfigurationProvider { private type: DebuggerType; private provider: IConfigurationAssetProvider; @@ -23,8 +92,60 @@ abstract class CppConfigurationProvider implements vscode.DebugConfigurationProv /** * Returns a list of initial debug configurations based on contextual information, e.g. package.json or folder. */ - provideDebugConfigurations(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): vscode.ProviderResult { - return this.provider.getInitialConfigurations(this.type); + async provideDebugConfigurations(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): Promise { + let buildTasks: vscode.Task[]; // = await getBuildTasks(); // TODO + if (!buildTasks || buildTasks.length === 0) { + return Promise.resolve(this.provider.getInitialConfigurations(this.type)); + } + const defaultConfig: vscode.DebugConfiguration = this.provider.getInitialConfigurations(this.type).find(config => { + return isDebugLaunchStr(config.name); + }); + console.assert(defaultConfig, "Could not find default debug configuration."); + + const platformInfo: PlatformInformation = await PlatformInformation.GetPlatformInformation(); + const platform: string = platformInfo.platform; + + // Generate new configurations for each build task. + // Generating a task is async, therefore we must *await* *all* map(task => config) Promises to resolve. + let configs: vscode.DebugConfiguration[] = await Promise.all(buildTasks.map>(async task => { + const definition: BuildTaskDefinition = task.definition as BuildTaskDefinition; + const compilerName: string = path.basename(definition.compilerPath); + const compilerDirname: string = path.dirname(definition.compilerPath); + + let newConfig: vscode.DebugConfiguration = Object.assign({}, defaultConfig); // Copy enumerables and properties + + newConfig.name = compilerName + buildAndDebugActiveFileStr(); + newConfig.preLaunchTask = task.name; + newConfig.externalConsole = false; + const exeName: string = path.join("${fileDirname}", "${fileBasenameNoExtension}"); + newConfig.program = platform === "win32" ? exeName + ".exe" : exeName; + + let debuggerName: string; + if (compilerName.startsWith("clang")) { + newConfig.MIMode = "lldb"; + const suffixIndex: number = compilerName.indexOf("-"); + const suffix: string = suffixIndex === -1 ? "" : compilerName.substr(suffixIndex); + debuggerName = (platform === "darwin" ? "lldb" : "lldb-mi") + suffix; + } else { + debuggerName = "gdb"; + } + + const debuggerPath: string = path.join(compilerDirname, debuggerName); + return new Promise(resolve => { + fs.stat(debuggerPath, (err, stats: fs.Stats) => { + if (!err && stats && stats.isFile) { + newConfig.miDebuggerPath = debuggerPath; + } else { + // TODO should probably resolve a missing debugger in a more graceful fashion for win32. + newConfig.miDebuggerPath = path.join("/usr", "bin", debuggerName); + } + + return resolve(newConfig); + }); + }); + })); + configs.push(defaultConfig); + return configs; } /** diff --git a/Extension/src/Debugger/extension.ts b/Extension/src/Debugger/extension.ts index 0680b9da51..0f793f72bc 100644 --- a/Extension/src/Debugger/extension.ts +++ b/Extension/src/Debugger/extension.ts @@ -7,12 +7,18 @@ import * as vscode from 'vscode'; import * as os from 'os'; import { AttachPicker, RemoteAttachPicker, AttachItemsProvider } from './attachToProcess'; import { NativeAttachItemsProviderFactory } from './nativeAttach'; -import { ConfigurationAssetProviderFactory, CppVsDbgConfigurationProvider, CppDbgConfigurationProvider, ConfigurationSnippetProvider, IConfigurationAssetProvider } from './configurationProvider'; +import { QuickPickConfigurationProvider, ConfigurationAssetProviderFactory, CppVsDbgConfigurationProvider, CppDbgConfigurationProvider, ConfigurationSnippetProvider, IConfigurationAssetProvider } from './configurationProvider'; import { CppdbgDebugAdapterDescriptorFactory, CppvsdbgDebugAdapterDescriptorFactory } from './debugAdapterDescriptorFactory'; +import * as util from '../common'; +import * as Telemetry from '../telemetry'; // The extension deactivate method is asynchronous, so we handle the disposables ourselves instead of using extensonContext.subscriptions. let disposables: vscode.Disposable[] = []; +export function buildAndDebugActiveFileStr(): string { + return " build and debug active file"; +} + export function initialize(context: vscode.ExtensionContext): void { // Activate Process Picker Commands let attachItemsProvider: AttachItemsProvider = NativeAttachItemsProviderFactory.Get(); @@ -28,7 +34,70 @@ export function initialize(context: vscode.ExtensionContext): void { if (os.platform() === 'win32') { disposables.push(vscode.debug.registerDebugConfigurationProvider('cppvsdbg', new CppVsDbgConfigurationProvider(configurationProvider))); } - disposables.push(vscode.debug.registerDebugConfigurationProvider('cppdbg', new CppDbgConfigurationProvider(configurationProvider))); + const provider: CppDbgConfigurationProvider = new CppDbgConfigurationProvider(configurationProvider); + disposables.push(vscode.debug.registerDebugConfigurationProvider('cppdbg', provider)); //new QuickPickConfigurationProvider(provider))); // TODO + + disposables.push(vscode.commands.registerTextEditorCommand("C_Cpp.BuildAndDebugActiveFile", async (textEditor: vscode.TextEditor, edit: vscode.TextEditorEdit, ...args: any[]) => { + const folder: vscode.WorkspaceFolder = vscode.workspace.getWorkspaceFolder(textEditor.document.uri); + if (!folder) { + // Not enabled because we do not react to single-file mode correctly yet. + // We get an ENOENT when the user's c_cpp_properties.json is attempted to be parsed. + // The DefaultClient will also have its configuration accessed, but since it doesn't exist it errors out. + vscode.window.showErrorMessage('This command is not yet available for single-file mode.'); + return Promise.resolve(); + } + + if (!util.fileIsCOrCppSource(textEditor.document.uri.fsPath)) { + vscode.window.showErrorMessage('Cannot build and debug because the active file is not a C or C++ source file.'); + return Promise.resolve(); + } + let configs: vscode.DebugConfiguration[] = (await provider.provideDebugConfigurations(folder)).filter(config => { + return config.name.indexOf(buildAndDebugActiveFileStr()) !== -1; + }); + + interface MenuItem extends vscode.QuickPickItem { + configuration: vscode.DebugConfiguration; + } + + const items: MenuItem[] = configs.map(config => { + return {label: config.name, configuration: config}; + }); + + vscode.window.showQuickPick(items, {placeHolder: (items.length === 0 ? "No compiler found" : "Select a compiler" )}).then(async selection => { + if (!selection) { + return; // User canceled it. + } + if (selection.configuration.preLaunchTask) { + if (folder) { + try { + await util.ensureBuildTaskExists(selection.configuration.preLaunchTask); + Telemetry.logDebuggerEvent("buildAndDebug", { "success": "false" }); + } catch (e) { + return Promise.resolve(); + } + } else { + return Promise.resolve(); + // TODO uncomment this when single file mode works correctly. + // const buildTasks: vscode.Task[] = await getBuildTasks(); + // const task: vscode.Task = buildTasks.find(task => task.name === selection.configuration.preLaunchTask); + // await vscode.tasks.executeTask(task); + // delete selection.configuration.preLaunchTask; + } + } + + // Attempt to use the user's (possibly) modified configuration before using the generated one. + try { + await vscode.debug.startDebugging(folder, selection.configuration.name); + Telemetry.logDebuggerEvent("buildAndDebug", { "success": "true" }); + } catch (e) { + try { + vscode.debug.startDebugging(folder, selection.configuration); + } catch (e) { + Telemetry.logDebuggerEvent("buildAndDebug", { "success": "false" }); + } + } + }); + })); configurationProvider.getConfigurationSnippets(); diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 8eb519f61d..ec220f362f 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -630,6 +630,7 @@ export class CppProperties { // Replace all \ with \\. // Otherwise, the JSON.parse result will have the \ missing. readResults = readResults.replace(/\\/g, '\\\\'); + readResults = readResults.replace(/\\\\"/g, '\\"'); // Need to revert the change to \". // Try to use the same configuration as before the change. let newJson: ConfigurationJson = JSON.parse(readResults); @@ -752,11 +753,19 @@ export class CppProperties { paths.add(`"${this.CurrentConfiguration.compileCommands}"`); } + let compilerPathAndArgs: util.CompilerPathAndArgs; + if (this.CurrentConfiguration.compilerPath) { + compilerPathAndArgs = util.extractCompilerPathAndArgs(this.CurrentConfiguration.compilerPath); + paths.add(`"${compilerPathAndArgs.compilerPath}`); // It may not end with ". + } + // Get the start/end for properties that are file-only. let forcedIncludeStart: number = curText.search(/\s*\"forcedInclude\"\s*:\s*\[/); let forcedeIncludeEnd: number = forcedIncludeStart === -1 ? -1 : curText.indexOf("]", forcedIncludeStart); let compileCommandsStart: number = curText.search(/\s*\"compileCommands\"\s*:\s*\"/); let compileCommandsEnd: number = compileCommandsStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compileCommandsStart)) + 1); + let compilerPathStart: number = curText.search(/\s*\"compilerPath\"\s*:\s*\"/); + let compilerPathEnd: number = compilerPathStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compilerPathStart)) + 1); if (this.prevSquiggleMetrics[this.CurrentConfiguration.name] === undefined) { this.prevSquiggleMetrics[this.CurrentConfiguration.name] = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; @@ -764,7 +773,7 @@ export class CppProperties { let newSquiggleMetrics: { [key: string]: number } = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; for (let curPath of paths) { - let resolvedPath: string = curPath.substr(1, curPath.length - 2); + let resolvedPath: string = curPath.substr(1, (curPath.endsWith('"') ? curPath.length - 2 : curPath.length - 1)); // Resolve special path cases. if (resolvedPath === "${default}") { // TODO: Add squiggles for when the C_Cpp.default.* paths are invalid. @@ -817,7 +826,8 @@ export class CppProperties { } else { // Check for file versus path mismatches. if ((curOffset >= forcedIncludeStart && curOffset <= forcedeIncludeEnd) || - (curOffset >= compileCommandsStart && curOffset <= compileCommandsEnd)) { + (curOffset >= compileCommandsStart && curOffset <= compileCommandsEnd) || + (curOffset >= compilerPathStart && curOffset <= compilerPathEnd)) { if (util.checkFileExistsSync(resolvedPath)) { continue; } @@ -832,7 +842,7 @@ export class CppProperties { } } let diagnostic: vscode.Diagnostic = new vscode.Diagnostic( - new vscode.Range(document.positionAt(curTextStartOffset + curOffset + 1), document.positionAt(curTextStartOffset + curOffset + curPath.length - 1)), + new vscode.Range(document.positionAt(curTextStartOffset + curOffset + 1), document.positionAt(curTextStartOffset + curOffset + (curPath.endsWith('"') ? curPath.length - 1 : curPath.length))), message, vscode.DiagnosticSeverity.Warning); diagnostics.push(diagnostic); } diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 09177b5b84..818f0175a6 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -38,6 +38,7 @@ let realActivationOccurred: boolean = false; let tempCommands: vscode.Disposable[] = []; let activatedPreviously: PersistentWorkspaceState; const insiderUpdateTimerInterval: number = 1000 * 60 * 60; +const taskSourceStr: string = "C/C++"; let taskProvider: vscode.Disposable; @@ -67,7 +68,7 @@ export function activate(activationEventOccurred: boolean): void { return; } - taskProvider = vscode.tasks.registerTaskProvider('C/Cpp', { + taskProvider = vscode.tasks.registerTaskProvider(taskSourceStr, { provideTasks: () => { return getBuildTasks(); }, @@ -77,7 +78,7 @@ export function activate(activationEventOccurred: boolean): void { } }); vscode.tasks.onDidStartTask(event => { - if (event.execution.task.source === 'C/Cpp') { + if (event.execution.task.source === taskSourceStr) { telemetry.logLanguageServerEvent('buildTaskStarted'); } }); @@ -105,10 +106,14 @@ export function activate(activationEventOccurred: boolean): void { } } +export interface BuildTaskDefinition extends vscode.TaskDefinition { + compilerPath: string; +} + /** * Generate tasks to build the current file based on the user's detected compilers, the user's compilerPath setting, and the current file's extension. */ -async function getBuildTasks(): Promise { +export async function getBuildTasks(): Promise { const editor: vscode.TextEditor = vscode.window.activeTextEditor; if (!editor) { return []; @@ -121,7 +126,7 @@ async function getBuildTasks(): Promise { // Don't offer tasks for header files. const fileExtLower: string = fileExt.toLowerCase(); - const isHeader: boolean = !fileExt || [".hpp", ".hh", ".hxx", ".h", ""].some(ext => fileExtLower === ext); + const isHeader: boolean = !fileExt || [".hpp", ".hh", ".hxx", ".h", ".inl", ""].some(ext => fileExtLower === ext); if (isHeader) { return []; } @@ -133,7 +138,7 @@ async function getBuildTasks(): Promise { fileIsCpp = true; fileIsC = true; } else { - fileIsCpp = [".cpp", ".cc", ".cxx", ".mm", ".ino", ".inl"].some(ext => fileExtLower === ext); + fileIsCpp = [".cpp", ".cc", ".cxx", ".mm", ".ino"].some(ext => fileExtLower === ext); fileIsC = fileExtLower === ".c"; } if (!(fileIsCpp || fileIsC)) { @@ -143,17 +148,31 @@ async function getBuildTasks(): Promise { // Get a list of compilers found from the C++ side, then filter them based on the file type to get a reduced list appropriate // for the active file, remove duplicate compiler names, then finally add the user's compilerPath setting. let compilerPaths: string[]; + const isWindows: boolean = os.platform() === 'win32'; const activeClient: Client = getActiveClient(); - const userCompilerPath: string = await activeClient.getCompilerPath(); + let userCompilerPath: string = await activeClient.getCompilerPath(); + if (userCompilerPath) { + userCompilerPath = userCompilerPath.trim(); + if (isWindows && (userCompilerPath.startsWith("/") || userCompilerPath.endsWith("cl.exe"))) { // TODO: Add WSL/cl.exe compiler support. + userCompilerPath = null; + } else { + userCompilerPath = userCompilerPath.replace(/\\\\/g, "\\"); + } + } + let knownCompilers: configs.KnownCompiler[] = await activeClient.getKnownCompilers(); if (knownCompilers) { - knownCompilers = knownCompilers.filter(info => { return (fileIsCpp && !info.isC) || (fileIsC && info.isC); }); + knownCompilers = knownCompilers.filter(info => { + return ((fileIsCpp && !info.isC) || (fileIsC && info.isC)) && + (!isWindows || !info.path.startsWith("/")); // TODO: Add WSL compiler support. + }); compilerPaths = knownCompilers.map(info => { return info.path; }); let map: Map = new Map(); const insertOrAssignEntry: (compilerPath: string) => void = (compilerPath: string): void => { const basename: string = path.basename(compilerPath); - map.has(basename) ? map[basename] = compilerPath : map.set(basename, compilerPath); + //map.has(basename) ? map.basename] = compilerPath : + map.set(basename, compilerPath); }; compilerPaths.forEach(insertOrAssignEntry); @@ -173,7 +192,7 @@ async function getBuildTasks(): Promise { // Display a message prompting the user to install compilers if none were found. // const dontShowAgain: string = "Don't Show Again"; // const learnMore: string = "Learn More"; - // const message: string = "No C/C++ compiler found on the system. Please install a C/C++ compiler to use the C/Cpp: build active file tasks."; + // const message: string = "No C/C++ compiler found on the system. Please install a C/C++ compiler to use the C/C++: build active file tasks."; // let showNoCompilerFoundMessage: PersistentState = new PersistentState("CPP.showNoCompilerFoundMessage", true); // if (showNoCompilerFoundMessage) { @@ -194,38 +213,34 @@ async function getBuildTasks(): Promise { return []; } - // The build task output file should include a '.exe' extension on Windows. - let platformInfo: PlatformInformation = await PlatformInformation.GetPlatformInformation(); - let exeName: string; - if (platformInfo.platform === 'win32') { - exeName = '${fileBasenameNoExtension}.exe'; - } else { - exeName = '${fileBasenameNoExtension}'; - } - // Generate tasks. - let result: vscode.Task[] = []; - compilerPaths.forEach(compilerPath => { + return compilerPaths.map(compilerPath => { + // Handle compiler args in compilerPath. + let compilerPathAndArgs: util.CompilerPathAndArgs = util.extractCompilerPathAndArgs(compilerPath); + compilerPath = compilerPathAndArgs.compilerPath; const taskName: string = path.basename(compilerPath) + " build active file"; - const args: string[] = ['-g', '${file}', '-o', '${fileDirname}/' + exeName]; + let args: string[] = ['-g', '${file}', '-o', path.join('${fileDirname}', '${fileBasenameNoExtension}' + (isWindows ? '.exe' : ''))]; + if (compilerPathAndArgs.additionalArgs) { + args = args.concat(compilerPathAndArgs.additionalArgs); + } const cwd: string = path.dirname(compilerPath); - const kind: vscode.TaskDefinition = { + const kind: BuildTaskDefinition = { type: 'shell', label: taskName, command: compilerPath, args: args, - options: {"cwd": cwd} + options: {"cwd": cwd}, + compilerPath: compilerPath }; const command: vscode.ShellExecution = new vscode.ShellExecution(compilerPath, [...args], { cwd: cwd }); const target: vscode.WorkspaceFolder = vscode.workspace.getWorkspaceFolder(clients.ActiveClient.RootUri); - let task: vscode.Task = new vscode.Task(kind, target, taskName, 'C/Cpp', command, '$gcc'); + let task: vscode.Task = new vscode.Task(kind, target, taskName, taskSourceStr, command, '$gcc'); task.definition = kind; // The constructor for vscode.Task will eat the definition. Reset it by reassigning. task.group = vscode.TaskGroup.Build; - result.push(task); + return task; }); - return result; } function onDidOpenTextDocument(document: vscode.TextDocument): void { diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 43aa47c1e4..56b5626bc0 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -16,6 +16,7 @@ import { getOutputChannelLogger, showOutputChannel } from './logger'; import * as assert from 'assert'; import * as https from 'https'; import { ClientRequest, OutgoingHttpHeaders } from 'http'; +import { getBuildTasks } from './LanguageServer/extension'; export let extensionContext: vscode.ExtensionContext; export function setExtensionContext(context: vscode.ExtensionContext): void { @@ -36,6 +37,65 @@ export function getRawPackageJson(): any { return rawPackageJson; } +export function getRawTasksJson(): Promise { + const path: string = getTasksJsonPath(); + if (!path) { + return undefined; + } + return new Promise((resolve, reject) => { + fs.exists(path, exists => { + if (!exists) { + return resolve({}); + } + const fileContents: Buffer = fs.readFileSync(path); + let rawTasks: any = {}; + try { + rawTasks = JSON.parse(fileContents.toString()); + } catch (error) { + } + resolve(rawTasks); + }); + }); +} + +export async function ensureBuildTaskExists(taskName: string): Promise { + let rawTasksJson: any = await getRawTasksJson(); + + // Ensure that the task exists in the user's task.json. Task will not be found otherwise. + if (!rawTasksJson.tasks) { + rawTasksJson.tasks = new Array(); + } + // Find or create the task which should be created based on the selected "debug configuration". + let selectedTask: vscode.Task = rawTasksJson.tasks.find(task => { + return task.label && task.label === task; + }); + if (selectedTask) { + return; + } + + const buildTasks: vscode.Task[] = await getBuildTasks(); + selectedTask = buildTasks.find(task => task.name === taskName); + console.assert(selectedTask); + + let definition: vscode.TaskDefinition = selectedTask.definition as vscode.TaskDefinition; + if (definition && definition.compilerPath) { + // TODO: add desired properties to empty object, don't delete. + delete definition.compilerPath; + } + + if (!rawTasksJson.tasks.find(task => { return task.label === selectedTask.definition.label; })) { + rawTasksJson.tasks.push(selectedTask.definition); + } + + // TODO: It's dangerous to overwrite this file. We could be wiping out comments. + await writeFileText(getTasksJsonPath(), JSON.stringify(rawTasksJson, null, 2)); +} + +export function fileIsCOrCppSource(file: string): boolean { + const fileExtLower: string = path.extname(file).toLowerCase(); + return [".C", ".c", ".cpp", ".cc", ".cxx", ".mm", ".ino", ".inl"].some(ext => fileExtLower === ext); +} + // This function is used to stringify the rawPackageJson. // Do not use with util.packageJson or else the expanded // package.json will be written back. @@ -51,6 +111,15 @@ export function getPackageJsonPath(): string { return getExtensionFilePath("package.json"); } +export function getTasksJsonPath(): string { + const editor: vscode.TextEditor = vscode.window.activeTextEditor; + const folder: vscode.WorkspaceFolder = vscode.workspace.getWorkspaceFolder(editor.document.uri); + if (!folder) { + return undefined; + } + return path.join(folder.uri.fsPath, ".vscode", "tasks.json"); +} + export function getVcpkgPathDescriptorFile(): string { if (process.platform === 'win32') { return path.join(process.env.LOCALAPPDATA, "vcpkg/vcpkg.path.txt"); @@ -686,4 +755,32 @@ export function downloadFileToStr(urlStr: string, headers?: OutgoingHttpHeaders) request.on('error', (error) => { reject(error); }); request.end(); }); +} + +export interface CompilerPathAndArgs { + compilerPath: string; + additionalArgs: string[]; +} + +export function extractCompilerPathAndArgs(inputCompilerPath: string): CompilerPathAndArgs { + let compilerPath: string = inputCompilerPath; + let additionalArgs: string[]; + if (compilerPath) { + if (compilerPath.startsWith("\"")) { + let endQuote: number = compilerPath.substr(1).search("\"") + 1; + if (endQuote !== -1) { + additionalArgs = compilerPath.substr(endQuote + 1).split(" "); + additionalArgs = additionalArgs.filter((arg: string) => { return arg.trim().length !== 0; }); + compilerPath = compilerPath.substr(1, endQuote - 1); + } + } else { + if (compilerPath.includes(" ") && !fs.existsSync(compilerPath)) { + let argStart: number = compilerPath.search(" "); + additionalArgs = compilerPath.substr(argStart + 1).split(" "); + additionalArgs = additionalArgs.filter((arg: string) => { return arg.trim().length !== 0; }); + compilerPath = compilerPath.substr(0, argStart); + } + } + } + return { compilerPath, additionalArgs }; } \ No newline at end of file diff --git a/Extension/src/main.ts b/Extension/src/main.ts index 09817e708b..fa28ffb376 100644 --- a/Extension/src/main.ts +++ b/Extension/src/main.ts @@ -329,6 +329,7 @@ function rewriteManifest(): Promise { "onLanguage:c", "onCommand:extension.pickNativeProcess", "onCommand:extension.pickRemoteNativeProcess", + //"onCommand:C_Cpp.BuildAndDebugActiveFile", // TODO "onCommand:C_Cpp.ConfigurationEdit", "onCommand:C_Cpp.ConfigurationSelect", "onCommand:C_Cpp.ConfigurationProviderSelect", From 1d47bc41601f9042b7f40eb16761255cf3e9a2e2 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Thu, 28 Feb 2019 17:56:27 -0800 Subject: [PATCH 26/51] Seanmcm/0 22 0 insiders2 changelog (#3226) * Update changelog for 0.22.0-insiders. --- Extension/CHANGELOG.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index c3c37d8f94..b650ec919c 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,6 +1,19 @@ # C/C++ for Visual Studio Code Change Log -## Version 0.22.0-insiders February 6, 2019 +## Version 0.22.0-insiders2: February 28, 2019 +* Fix IntelliSense not working on Windows when the username has a space in it and file `C:\Users\` exists. [#1377](https://github.com/Microsoft/vscode-cpptools/issues/1377), [#2114](https://github.com/Microsoft/vscode-cpptools/issues/2114), [#2176](https://github.com/Microsoft/vscode-cpptools/issues/2176), [#3052](https://github.com/Microsoft/vscode-cpptools/issues/3052), [#3139](https://github.com/Microsoft/vscode-cpptools/issues/3139) +* Enable `${command:cpptools.activeConfigName}` in tasks. [#1524](https://github.com/Microsoft/vscode-cpptools/issues/1524) +* Fix completion when the start of an identifier matches a keyword. [#1986](https://github.com/Microsoft/vscode-cpptools/issues/1986) +* Fix auto-removal of compiler-provided paths in `includePath`. [#2177](https://github.com/Microsoft/vscode-cpptools/issues/2177) +* Add support for `Scope::Member` scoped symbol searches. [#2484](https://github.com/Microsoft/vscode-cpptools/issues/2484) +* Fix remote process picker bug. [#2585](https://github.com/Microsoft/vscode-cpptools/issues/2585), [#3150](https://github.com/Microsoft/vscode-cpptools/issues/3150) +* Add warning squiggles to `c_cpp_properties.json` for invalid paths. [#2799](https://github.com/Microsoft/vscode-cpptools/issues/2799) +* Fix bug with manual completion invocation after `struct`. [#3080](https://github.com/Microsoft/vscode-cpptools/issues/3080) +* Add C/C++ compiler build tasks for compiling the active source file. [PR #3118](https://github.com/Microsoft/vscode-cpptools/pull/3118) +* Fix command not found and empty `c_cpp_properties.json` if activation is too slow. [#3160](https://github.com/Microsoft/vscode-cpptools/issues/3160), [#3176](https://github.com/Microsoft/vscode-cpptools/issues/3176) +* Add AutoPch support to reduce IntelliSense parsing time, with `C_Cpp.intelliSenseCachePath` and `C_Cpp.intelliSenseCacheSize` settings. [PR #3184](https://github.com/Microsoft/vscode-cpptools/pull/3184) + +## Version 0.22.0-insiders: February 6, 2019 * Fix crash on Windows when 8.3 filenames are used. [#2453](https://github.com/Microsoft/vscode-cpptools/issues/2453), [#3104](https://github.com/Microsoft/vscode-cpptools/issues/3104) * Fix signature help active parameter selection when parameter names are missing or subsets of each other. [#2952](https://github.com/Microsoft/vscode-cpptools/issues/2952) * Fix `--enable-pretty-printing` with `gdb` when complex objects are used as keys in maps. [#3024](https://github.com/Microsoft/vscode-cpptools/issues/3024) @@ -16,7 +29,7 @@ * Add Chinese translations for command titles. [PR #3128](https://github.com/Microsoft/vscode-cpptools/pull/3128) * Fix other unreported IntelliSense engine bugs. -## Version 0.21.0 January 23, 2019 +## Version 0.21.0: January 23, 2019 ### New Features * Add documentation comments for hover, completion, and signature help. [#399](https://github.com/Microsoft/vscode-cpptools/issues/399) * Add completion committing for methods after `(`. [#1184](https://github.com/Microsoft/vscode-cpptools/issues/1184) From e928bfb0a9ed8ed1f9232d565641477a549c35df Mon Sep 17 00:00:00 2001 From: Bob Brown Date: Fri, 1 Mar 2019 10:51:11 -0800 Subject: [PATCH 27/51] Fix tslint issues (#3234) --- Extension/src/Debugger/configurationProvider.ts | 4 ++-- Extension/src/Debugger/extension.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Extension/src/Debugger/configurationProvider.ts b/Extension/src/Debugger/configurationProvider.ts index 3ff0811a0d..7723bccdf1 100644 --- a/Extension/src/Debugger/configurationProvider.ts +++ b/Extension/src/Debugger/configurationProvider.ts @@ -7,10 +7,10 @@ import * as debugUtils from './utils'; import * as os from 'os'; import * as path from 'path'; import * as vscode from 'vscode'; -import { getBuildTasks, BuildTaskDefinition } from '../LanguageServer/extension'; +import { /*getBuildTasks,*/ BuildTaskDefinition } from '../LanguageServer/extension'; import * as util from '../common'; import * as fs from 'fs'; -import * as assert from 'assert'; +//import * as assert from 'assert'; import * as Telemetry from '../telemetry'; import { buildAndDebugActiveFileStr } from './extension'; diff --git a/Extension/src/Debugger/extension.ts b/Extension/src/Debugger/extension.ts index 0f793f72bc..35497a5aef 100644 --- a/Extension/src/Debugger/extension.ts +++ b/Extension/src/Debugger/extension.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import * as os from 'os'; import { AttachPicker, RemoteAttachPicker, AttachItemsProvider } from './attachToProcess'; import { NativeAttachItemsProviderFactory } from './nativeAttach'; -import { QuickPickConfigurationProvider, ConfigurationAssetProviderFactory, CppVsDbgConfigurationProvider, CppDbgConfigurationProvider, ConfigurationSnippetProvider, IConfigurationAssetProvider } from './configurationProvider'; +import { /*QuickPickConfigurationProvider,*/ ConfigurationAssetProviderFactory, CppVsDbgConfigurationProvider, CppDbgConfigurationProvider, ConfigurationSnippetProvider, IConfigurationAssetProvider } from './configurationProvider'; import { CppdbgDebugAdapterDescriptorFactory, CppvsdbgDebugAdapterDescriptorFactory } from './debugAdapterDescriptorFactory'; import * as util from '../common'; import * as Telemetry from '../telemetry'; From c39579010b5de1fee08b1f372c2e4a79f3140c45 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 1 Mar 2019 11:10:16 -0800 Subject: [PATCH 28/51] Fix bugs with compilerPath squiggles and build tasks. (#3228) --- .../src/LanguageServer/configurations.ts | 9 ++++--- Extension/src/common.ts | 27 ++++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index ec220f362f..925392e8d0 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -756,7 +756,7 @@ export class CppProperties { let compilerPathAndArgs: util.CompilerPathAndArgs; if (this.CurrentConfiguration.compilerPath) { compilerPathAndArgs = util.extractCompilerPathAndArgs(this.CurrentConfiguration.compilerPath); - paths.add(`"${compilerPathAndArgs.compilerPath}`); // It may not end with ". + paths.add(`${compilerPathAndArgs.compilerPath}`); // It may not start or end with ". } // Get the start/end for properties that are file-only. @@ -765,7 +765,7 @@ export class CppProperties { let compileCommandsStart: number = curText.search(/\s*\"compileCommands\"\s*:\s*\"/); let compileCommandsEnd: number = compileCommandsStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compileCommandsStart)) + 1); let compilerPathStart: number = curText.search(/\s*\"compilerPath\"\s*:\s*\"/); - let compilerPathEnd: number = compilerPathStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compilerPathStart)) + 1); + let compilerPathEnd: number = compilerPathStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compilerPathStart)) + 1) + 1; if (this.prevSquiggleMetrics[this.CurrentConfiguration.name] === undefined) { this.prevSquiggleMetrics[this.CurrentConfiguration.name] = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; @@ -773,7 +773,7 @@ export class CppProperties { let newSquiggleMetrics: { [key: string]: number } = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; for (let curPath of paths) { - let resolvedPath: string = curPath.substr(1, (curPath.endsWith('"') ? curPath.length - 2 : curPath.length - 1)); + let resolvedPath: string = curPath.substr((curPath.startsWith('"') ? 1 : 0), (curPath.endsWith('"') ? curPath.length - 2 : curPath.length)); // Resolve special path cases. if (resolvedPath === "${default}") { // TODO: Add squiggles for when the C_Cpp.default.* paths are invalid. @@ -842,7 +842,8 @@ export class CppProperties { } } let diagnostic: vscode.Diagnostic = new vscode.Diagnostic( - new vscode.Range(document.positionAt(curTextStartOffset + curOffset + 1), document.positionAt(curTextStartOffset + curOffset + (curPath.endsWith('"') ? curPath.length - 1 : curPath.length))), + new vscode.Range(document.positionAt(curTextStartOffset + curOffset), + document.positionAt(curTextStartOffset + curOffset + (curPath.endsWith('"') ? curPath.length - 1 : curPath.length))), message, vscode.DiagnosticSeverity.Warning); diagnostics.push(diagnostic); } diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 56b5626bc0..39a214be78 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -766,19 +766,34 @@ export function extractCompilerPathAndArgs(inputCompilerPath: string): CompilerP let compilerPath: string = inputCompilerPath; let additionalArgs: string[]; if (compilerPath) { + compilerPath = compilerPath.trim(); if (compilerPath.startsWith("\"")) { let endQuote: number = compilerPath.substr(1).search("\"") + 1; if (endQuote !== -1) { additionalArgs = compilerPath.substr(endQuote + 1).split(" "); - additionalArgs = additionalArgs.filter((arg: string) => { return arg.trim().length !== 0; }); + additionalArgs = additionalArgs.filter((arg: string) => { return arg.trim().length !== 0; }); // Remove empty args. compilerPath = compilerPath.substr(1, endQuote - 1); } } else { - if (compilerPath.includes(" ") && !fs.existsSync(compilerPath)) { - let argStart: number = compilerPath.search(" "); - additionalArgs = compilerPath.substr(argStart + 1).split(" "); - additionalArgs = additionalArgs.filter((arg: string) => { return arg.trim().length !== 0; }); - compilerPath = compilerPath.substr(0, argStart); + // Go from right to left checking if a valid path is to the left of a space. + let spaceStart: number = compilerPath.lastIndexOf(" "); + if (spaceStart !== -1 && !fs.existsSync(compilerPath)) { + let potentialCompilerPath: string = compilerPath.substr(0, spaceStart); + while (!fs.existsSync(potentialCompilerPath)) { + spaceStart = potentialCompilerPath.lastIndexOf(" "); + if (spaceStart === -1) { + // Reached the start without finding a valid path. Use the original value. + potentialCompilerPath = compilerPath; + break; + } + potentialCompilerPath = potentialCompilerPath.substr(0, spaceStart); + } + if (compilerPath !== potentialCompilerPath) { + // Found a valid compilerPath and args. + additionalArgs = compilerPath.substr(spaceStart + 1).split(" "); + additionalArgs = additionalArgs.filter((arg: string) => { return arg.trim().length !== 0; }); // Remove empty args. + compilerPath = potentialCompilerPath; + } } } } From 0c77b9e6cff915d4035a26b626144f9c96501621 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 1 Mar 2019 13:53:19 -0800 Subject: [PATCH 29/51] Fix "cl.exe" in the compilerPath squiggle. (#3237) * Fix "cl.exe" and missing ".exe" in the compilerPath squiggle. --- .../src/LanguageServer/configurations.ts | 58 ++++++++++++------- Extension/src/common.ts | 3 +- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 925392e8d0..91b3326696 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -716,20 +716,20 @@ export class CppProperties { // Get the text of the current configuration. let curText: string = document.getText(); let curTextStartOffset: number = 0; - let configStart: number = curText.search(new RegExp(`{\\s*"name"\\s*:\\s*"${this.CurrentConfiguration.name}"`)); + const configStart: number = curText.search(new RegExp(`{\\s*"name"\\s*:\\s*"${this.CurrentConfiguration.name}"`)); if (configStart === -1) { telemetry.logLanguageServerEvent("ConfigSquiggles", { "error": "config name not first" }); return; } curTextStartOffset = configStart + 1; curText = curText.substr(curTextStartOffset); // Remove earlier configs. - let nameEnd: number = curText.indexOf(":"); + const nameEnd: number = curText.indexOf(":"); curTextStartOffset += nameEnd + 1; curText = curText.substr(nameEnd + 1); - let nextNameStart: number = curText.search(new RegExp('"name"\\s*:\\s*"')); + const nextNameStart: number = curText.search(new RegExp('"name"\\s*:\\s*"')); if (nextNameStart !== -1) { curText = curText.substr(0, nextNameStart + 6); // Remove later configs. - let nextNameStart2: number = curText.search(new RegExp('\\s*}\\s*,\\s*{\\s*"name"')); + const nextNameStart2: number = curText.search(new RegExp('\\s*}\\s*,\\s*{\\s*"name"')); if (nextNameStart2 === -1) { telemetry.logLanguageServerEvent("ConfigSquiggles", { "error": "next config name not first" }); return; @@ -753,19 +753,24 @@ export class CppProperties { paths.add(`"${this.CurrentConfiguration.compileCommands}"`); } - let compilerPathAndArgs: util.CompilerPathAndArgs; + const isWindows: boolean = os.platform() === 'win32'; if (this.CurrentConfiguration.compilerPath) { + let compilerPathAndArgs: util.CompilerPathAndArgs; compilerPathAndArgs = util.extractCompilerPathAndArgs(this.CurrentConfiguration.compilerPath); - paths.add(`${compilerPathAndArgs.compilerPath}`); // It may not start or end with ". + if (!(isWindows && compilerPathAndArgs.compilerPath.endsWith("cl.exe"))) { + // Unlike other cases, compilerPath may not start or end with " due to trimming of whitespace. + // This is checked to determine if the path is a compilerPath later on. + paths.add(`${compilerPathAndArgs.compilerPath}`); + } } // Get the start/end for properties that are file-only. - let forcedIncludeStart: number = curText.search(/\s*\"forcedInclude\"\s*:\s*\[/); - let forcedeIncludeEnd: number = forcedIncludeStart === -1 ? -1 : curText.indexOf("]", forcedIncludeStart); - let compileCommandsStart: number = curText.search(/\s*\"compileCommands\"\s*:\s*\"/); - let compileCommandsEnd: number = compileCommandsStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compileCommandsStart)) + 1); - let compilerPathStart: number = curText.search(/\s*\"compilerPath\"\s*:\s*\"/); - let compilerPathEnd: number = compilerPathStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compilerPathStart)) + 1) + 1; + const forcedIncludeStart: number = curText.search(/\s*\"forcedInclude\"\s*:\s*\[/); + const forcedeIncludeEnd: number = forcedIncludeStart === -1 ? -1 : curText.indexOf("]", forcedIncludeStart); + const compileCommandsStart: number = curText.search(/\s*\"compileCommands\"\s*:\s*\"/); + const compileCommandsEnd: number = compileCommandsStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compileCommandsStart)) + 1); + const compilerPathStart: number = curText.search(/\s*\"compilerPath\"\s*:\s*\"/); + const compilerPathEnd: number = compilerPathStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compilerPathStart)) + 1) + 1; if (this.prevSquiggleMetrics[this.CurrentConfiguration.name] === undefined) { this.prevSquiggleMetrics[this.CurrentConfiguration.name] = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; @@ -773,7 +778,8 @@ export class CppProperties { let newSquiggleMetrics: { [key: string]: number } = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; for (let curPath of paths) { - let resolvedPath: string = curPath.substr((curPath.startsWith('"') ? 1 : 0), (curPath.endsWith('"') ? curPath.length - 2 : curPath.length)); + const isCompilerPath: boolean = !curPath.startsWith('"'); // This check probably will need to change later. + let resolvedPath: string = curPath.substr((!isCompilerPath ? 1 : 0), curPath.length + (!isCompilerPath ? - 2 : 0)); // Resolve special path cases. if (resolvedPath === "${default}") { // TODO: Add squiggles for when the C_Cpp.default.* paths are invalid. @@ -794,7 +800,8 @@ export class CppProperties { } // Handle WSL paths. - if (resolvedPath.startsWith("/") && os.platform() === 'win32') { + const isWSL: boolean = isWindows && resolvedPath.startsWith("/"); + if (isWSL) { const mntStr: string = "/mnt/"; if (resolvedPath.length > "/mnt/c/".length && resolvedPath.substr(0, mntStr.length) === mntStr) { resolvedPath = resolvedPath.substr(mntStr.length); @@ -807,13 +814,24 @@ export class CppProperties { } let pathExists: boolean = true; + let existsWithExeAdded: (path: string) => boolean = (path: string) => { + return isCompilerPath && isWindows && !isWSL && fs.existsSync(path + ".exe"); + }; if (!fs.existsSync(resolvedPath)) { - // Check again for a relative path. - let relativePath: string = this.rootUri.fsPath + path.sep + resolvedPath; - if (!fs.existsSync(relativePath)) { - pathExists = false; + if (existsWithExeAdded(resolvedPath)) { + resolvedPath += ".exe"; } else { - resolvedPath = relativePath; + // Check again for a relative path. + const relativePath: string = this.rootUri.fsPath + path.sep + resolvedPath; + if (!fs.existsSync(relativePath)) { + if (existsWithExeAdded(resolvedPath)) { + resolvedPath += ".exe"; + } else { + pathExists = false; + } + } else { + resolvedPath = relativePath; + } } } @@ -843,7 +861,7 @@ export class CppProperties { } let diagnostic: vscode.Diagnostic = new vscode.Diagnostic( new vscode.Range(document.positionAt(curTextStartOffset + curOffset), - document.positionAt(curTextStartOffset + curOffset + (curPath.endsWith('"') ? curPath.length - 1 : curPath.length))), + document.positionAt(curTextStartOffset + curOffset + curPath.length + (!isCompilerPath ? - 1 : 0))), message, vscode.DiagnosticSeverity.Warning); diagnostics.push(diagnostic); } diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 39a214be78..10f57c03c9 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -765,6 +765,7 @@ export interface CompilerPathAndArgs { export function extractCompilerPathAndArgs(inputCompilerPath: string): CompilerPathAndArgs { let compilerPath: string = inputCompilerPath; let additionalArgs: string[]; + let isWindows: boolean = os.platform() === 'win32'; if (compilerPath) { compilerPath = compilerPath.trim(); if (compilerPath.startsWith("\"")) { @@ -779,7 +780,7 @@ export function extractCompilerPathAndArgs(inputCompilerPath: string): CompilerP let spaceStart: number = compilerPath.lastIndexOf(" "); if (spaceStart !== -1 && !fs.existsSync(compilerPath)) { let potentialCompilerPath: string = compilerPath.substr(0, spaceStart); - while (!fs.existsSync(potentialCompilerPath)) { + while ((!isWindows || !potentialCompilerPath.endsWith("cl.exe")) && !fs.existsSync(potentialCompilerPath)) { spaceStart = potentialCompilerPath.lastIndexOf(" "); if (spaceStart === -1) { // Reached the start without finding a valid path. Use the original value. From 15ac01d70c0f424f27ce003497f446f21362f1ef Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 1 Mar 2019 13:56:03 -0800 Subject: [PATCH 30/51] Update date. (#3238) --- Extension/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index b650ec919c..0829007bc4 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,6 +1,6 @@ # C/C++ for Visual Studio Code Change Log -## Version 0.22.0-insiders2: February 28, 2019 +## Version 0.22.0-insiders2: March 1, 2019 * Fix IntelliSense not working on Windows when the username has a space in it and file `C:\Users\` exists. [#1377](https://github.com/Microsoft/vscode-cpptools/issues/1377), [#2114](https://github.com/Microsoft/vscode-cpptools/issues/2114), [#2176](https://github.com/Microsoft/vscode-cpptools/issues/2176), [#3052](https://github.com/Microsoft/vscode-cpptools/issues/3052), [#3139](https://github.com/Microsoft/vscode-cpptools/issues/3139) * Enable `${command:cpptools.activeConfigName}` in tasks. [#1524](https://github.com/Microsoft/vscode-cpptools/issues/1524) * Fix completion when the start of an identifier matches a keyword. [#1986](https://github.com/Microsoft/vscode-cpptools/issues/1986) From bb2d23c6943856e5c4905a13c57c177244e0a46e Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 1 Mar 2019 13:59:19 -0800 Subject: [PATCH 31/51] Change AutoPch to AutoPCH. (#3239) --- Extension/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 0829007bc4..80cba64048 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -11,7 +11,7 @@ * Fix bug with manual completion invocation after `struct`. [#3080](https://github.com/Microsoft/vscode-cpptools/issues/3080) * Add C/C++ compiler build tasks for compiling the active source file. [PR #3118](https://github.com/Microsoft/vscode-cpptools/pull/3118) * Fix command not found and empty `c_cpp_properties.json` if activation is too slow. [#3160](https://github.com/Microsoft/vscode-cpptools/issues/3160), [#3176](https://github.com/Microsoft/vscode-cpptools/issues/3176) -* Add AutoPch support to reduce IntelliSense parsing time, with `C_Cpp.intelliSenseCachePath` and `C_Cpp.intelliSenseCacheSize` settings. [PR #3184](https://github.com/Microsoft/vscode-cpptools/pull/3184) +* Add AutoPCH support to reduce IntelliSense parsing time, with `C_Cpp.intelliSenseCachePath` and `C_Cpp.intelliSenseCacheSize` settings. [PR #3184](https://github.com/Microsoft/vscode-cpptools/pull/3184) ## Version 0.22.0-insiders: February 6, 2019 * Fix crash on Windows when 8.3 filenames are used. [#2453](https://github.com/Microsoft/vscode-cpptools/issues/2453), [#3104](https://github.com/Microsoft/vscode-cpptools/issues/3104) From 55120359a4485c690c2570ce31f44f32560a8d9f Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 1 Mar 2019 14:44:11 -0800 Subject: [PATCH 32/51] Remove trailing "/" from intelliSenseCachePath setting. (#3240) --- Extension/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index d9d38be8e0..cb466d9038 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -310,8 +310,8 @@ }, "C_Cpp.intelliSenseCachePath": { "type": "string", - "default": "${workspaceFolder}/.vscode/", - "description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default path \"${workspaceFolder}/.vscode/\" will be used if a specified path is invalid.", + "default": "${workspaceFolder}/.vscode", + "description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default path \"${workspaceFolder}/.vscode\" will be used if a specified path is invalid.", "scope": "resource" }, "C_Cpp.intelliSenseCacheSize": { From 95dd5386ed6e1dd627dafdba19dc6b0542d4a050 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 1 Mar 2019 16:02:41 -0800 Subject: [PATCH 33/51] Reduce VS Code requirement. (#3241) * Reduce VS Code requirement. * Remove more addresses in crash telemetry. --- Extension/package.json | 2 +- Extension/src/LanguageServer/extension.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Extension/package.json b/Extension/package.json index cb466d9038..cc3dc38443 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -12,7 +12,7 @@ }, "license": "SEE LICENSE IN LICENSE.txt", "engines": { - "vscode": "^1.31.0" + "vscode": "^1.30.0" }, "bugs": { "url": "https://github.com/Microsoft/vscode-cpptools/issues", diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 818f0175a6..279eb36d3d 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -859,6 +859,7 @@ function handleCrashFileRead(err: NodeJS.ErrnoException, data: string): void { // Get rid of the memory addresses (which breaks being able get a hit count for each crash call stack). data = data.replace(/0x................ /g, ""); + data = data.replace(/0x1........ \+ 0/g, ""); // Get rid of the process names on each line and just add it to the start. const process1: string = "Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin\t"; From 5445eff2509419c1ab92d724d6a010bcfc72124d Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 1 Mar 2019 17:23:33 -0800 Subject: [PATCH 34/51] Update vsdbg for 0.23.0 (#3242) --- Extension/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/package.json b/Extension/package.json index cc3dc38443..8727b00ebc 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -1610,7 +1610,7 @@ }, { "description": "Visual Studio Windows Debugger", - "url": "https://go.microsoft.com/fwlink/?linkid=872985", + "url": "https://go.microsoft.com/fwlink/?linkid=2080806", "platforms": [ "win32" ], From 670a105c1f80ab383d98fe1fb807b11f3f751212 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 1 Mar 2019 17:26:25 -0800 Subject: [PATCH 35/51] Update changelog. (#3243) --- Extension/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 80cba64048..ead95e80f6 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -12,6 +12,7 @@ * Add C/C++ compiler build tasks for compiling the active source file. [PR #3118](https://github.com/Microsoft/vscode-cpptools/pull/3118) * Fix command not found and empty `c_cpp_properties.json` if activation is too slow. [#3160](https://github.com/Microsoft/vscode-cpptools/issues/3160), [#3176](https://github.com/Microsoft/vscode-cpptools/issues/3176) * Add AutoPCH support to reduce IntelliSense parsing time, with `C_Cpp.intelliSenseCachePath` and `C_Cpp.intelliSenseCacheSize` settings. [PR #3184](https://github.com/Microsoft/vscode-cpptools/pull/3184) +* Fix `cppvsdbg` debugger showing `"An unspecified error has occurred."` for structured binding variables. [#3197](https://github.com/Microsoft/vscode-cpptools/issues/3197) ## Version 0.22.0-insiders: February 6, 2019 * Fix crash on Windows when 8.3 filenames are used. [#2453](https://github.com/Microsoft/vscode-cpptools/issues/2453), [#3104](https://github.com/Microsoft/vscode-cpptools/issues/3104) From 3db3c8da9a7c84ca5030938c650e4e6c7ff0d899 Mon Sep 17 00:00:00 2001 From: lh123 Date: Tue, 5 Mar 2019 09:26:12 +0800 Subject: [PATCH 36/51] Suggest user switching to insiders channel (#3221) * suggested user switch to insiders --- Extension/src/LanguageServer/extension.ts | 182 ++++++++++++++-------- 1 file changed, 113 insertions(+), 69 deletions(-) diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 279eb36d3d..69724aa74c 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -21,7 +21,7 @@ import { PlatformInformation } from '../platform'; import { Range } from 'vscode-languageclient'; import { ChildProcess, spawn, execSync } from 'child_process'; import * as tmp from 'tmp'; -import { getTargetBuildInfo } from '../githubAPI'; +import { getTargetBuildInfo, BuildInfo } from '../githubAPI'; import * as configs from './configurations'; import { PackageVersion } from '../packageVersion'; import { getTemporaryCommandRegistrarInstance } from '../commands'; @@ -38,6 +38,7 @@ let realActivationOccurred: boolean = false; let tempCommands: vscode.Disposable[] = []; let activatedPreviously: PersistentWorkspaceState; const insiderUpdateTimerInterval: number = 1000 * 60 * 60; +let buildInfoCache: BuildInfo | null = null; const taskSourceStr: string = "C/C++"; let taskProvider: vscode.Disposable; @@ -308,9 +309,12 @@ function realActivation(): void { updateLanguageConfigurations(); reportMacCrashes(); - + const settings: CppSettings = new CppSettings(clients.ActiveClient.RootUri); - if (settings.updateChannel === 'Insiders') { + + if (settings.updateChannel === 'Default') { + suggestInsidersChannel(); + } else if (settings.updateChannel === 'Insiders') { insiderUpdateTimer = setInterval(checkAndApplyUpdate, insiderUpdateTimerInterval, settings.updateChannel); checkAndApplyUpdate(settings.updateChannel); } @@ -341,7 +345,7 @@ function onDidChangeSettings(): void { } else if (newUpdateChannel === 'Insiders') { insiderUpdateTimer = setInterval(checkAndApplyUpdate, insiderUpdateTimerInterval); } - + checkAndApplyUpdate(newUpdateChannel); } } @@ -492,78 +496,94 @@ async function installVsix(vsixLocation: string, updateChannel: string): Promise }); } -/** - * Query package.json and the GitHub API to determine whether the user should update, if so then install the update. - * The update can be an upgrade or downgrade depending on the the updateChannel setting. - * @param updateChannel The user's updateChannel setting. - */ -async function checkAndApplyUpdate(updateChannel: string): Promise { - // Wrap in new Promise to allow tmp.file callback to successfully resolve/reject - // as tmp.file does not do anything with the callback functions return value - const p: Promise = new Promise((resolve, reject) => { - getTargetBuildInfo(updateChannel).then(buildInfo => { - if (!buildInfo) { - resolve(); +async function suggestInsidersChannel(): Promise { + let suggestInsiders: PersistentState = new PersistentState("CPP.suggestInsiders", true); + + if (!suggestInsiders.Value) { + return; + } + let buildInfo: BuildInfo; + try { + buildInfo = await getTargetBuildInfo("Insiders"); + } catch (error) { + telemetry.logLanguageServerEvent('suggestInsiders', { 'error': error.message, 'success': 'false' }); + } + if (!buildInfo) { + return; + } + const message: string = `Insiders version: ${buildInfo.name} is available. Would you like to switch to the Insiders channel and install this update?`; + const yes: string = "Yes"; + const askLater: string = "Ask Me Later"; + const dontShowAgain: string = "Don't Show Again"; + let selection: string = await vscode.window.showInformationMessage(message, yes, askLater, dontShowAgain); + switch (selection) { + case yes: + // Cache buidinfo. + buildInfoCache = buildInfo; + // It will call onDidChangeSettings. + vscode.workspace.getConfiguration("C_Cpp").update("updateChannel", "Insiders", vscode.ConfigurationTarget.Global); + break; + case dontShowAgain: + suggestInsiders.Value = false; + break; + case askLater: + break; + default: + break; + } +} + +function applyUpdate(buildInfo: BuildInfo, updateChannel: string): Promise { + return new Promise((resolve, reject) => { + tmp.file({postfix: '.vsix'}, async (err, vsixPath, fd, cleanupCallback) => { + if (err) { + reject(new Error('Failed to create vsix file')); return; } - - // Create a temporary file, download the VSIX to it, then install the VSIX - tmp.file({postfix: '.vsix'}, async (err, vsixPath, fd, cleanupCallback) => { - if (err) { - reject(new Error('Failed to create vsix file')); - return; - } - - // Place in try/catch as the .catch call catches a rejection in downloadFileToDestination - // then the .catch call will return a resolved promise - // Thusly, the .catch call must also throw, as a return would simply return an unused promise - // instead of returning early from this function scope - let config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration(); - let originalProxySupport: string = config.inspect('http.proxySupport').globalValue; - while (true) { // Might need to try again with a different http.proxySupport setting. - try { - await util.downloadFileToDestination(buildInfo.downloadUrl, vsixPath); - } catch { - // Try again with the proxySupport to "off". - if (originalProxySupport !== config.inspect('http.proxySupport').globalValue) { - config.update('http.proxySupport', originalProxySupport, true); // Reset the http.proxySupport. - reject(new Error('Failed to download VSIX package with proxySupport off')); // Changing the proxySupport didn't help. - return; - } - if (config.get('http.proxySupport') !== "off" && originalProxySupport !== "off") { - config.update('http.proxySupport', "off", true); - continue; - } - reject(new Error('Failed to download VSIX package')); - return; - } + + // Place in try/catch as the .catch call catches a rejection in downloadFileToDestination + // then the .catch call will return a resolved promise + // Thusly, the .catch call must also throw, as a return would simply return an unused promise + // instead of returning early from this function scope + let config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration(); + let originalProxySupport: string = config.inspect('http.proxySupport').globalValue; + while (true) { // Might need to try again with a different http.proxySupport setting. + try { + await util.downloadFileToDestination(buildInfo.downloadUrl, vsixPath); + } catch { + // Try again with the proxySupport to "off". if (originalProxySupport !== config.inspect('http.proxySupport').globalValue) { config.update('http.proxySupport', originalProxySupport, true); // Reset the http.proxySupport. - telemetry.logLanguageServerEvent('installVsix', { 'error': "Success with proxySupport off", 'success': 'true' }); + reject(new Error('Failed to download VSIX package with proxySupport off')); // Changing the proxySupport didn't help. + return; } - break; - } - try { - await installVsix(vsixPath, updateChannel); - } catch (error) { - reject(error); + if (config.get('http.proxySupport') !== "off" && originalProxySupport !== "off") { + config.update('http.proxySupport', "off", true); + continue; + } + reject(new Error('Failed to download VSIX package')); return; } - clearInterval(insiderUpdateTimer); - const message: string = - `The C/C++ Extension has been updated to version ${buildInfo.name}. Please reload the window for the changes to take effect.`; - util.promptReloadWindow(message); - telemetry.logLanguageServerEvent('installVsix', { 'success': 'true' }); - - resolve(); - }); - }, (error: Error) => { - // Handle getTargetBuildInfo rejection - reject(error); + if (originalProxySupport !== config.inspect('http.proxySupport').globalValue) { + config.update('http.proxySupport', originalProxySupport, true); // Reset the http.proxySupport. + telemetry.logLanguageServerEvent('installVsix', { 'error': "Success with proxySupport off", 'success': 'true' }); + } + break; + } + try { + await installVsix(vsixPath, updateChannel); + } catch (error) { + reject(error); + return; + } + clearInterval(insiderUpdateTimer); + const message: string = + `The C/C++ Extension has been updated to version ${buildInfo.name}. Please reload the window for the changes to take effect.`; + util.promptReloadWindow(message); + telemetry.logLanguageServerEvent('installVsix', { 'success': 'true' }); + resolve(); }); - }); - await p.catch((error: Error) => { - // Handle .then following getTargetBuildInfo rejection + }).catch(error => { if (error.message.indexOf('/') !== -1 || error.message.indexOf('\\') !== -1) { error.message = "Potential PII hidden"; } @@ -571,6 +591,30 @@ async function checkAndApplyUpdate(updateChannel: string): Promise { }); } +/** + * Query package.json and the GitHub API to determine whether the user should update, if so then install the update. + * The update can be an upgrade or downgrade depending on the the updateChannel setting. + * @param updateChannel The user's updateChannel setting. + */ +async function checkAndApplyUpdate(updateChannel: string): Promise { + // If we have buildinfo cache, we should use it. + let buildInfo: BuildInfo | null = buildInfoCache; + // clear buildinfo cache. + buildInfoCache = null; + + if (!buildInfo) { + try { + buildInfo = await getTargetBuildInfo(updateChannel); + } catch (error) { + telemetry.logLanguageServerEvent('installVsix', { 'error': error.message, 'success': 'false' }); + } + } + if (!buildInfo) { + return; + } + await applyUpdate(buildInfo, updateChannel); +} + /********************************************* * registered commands *********************************************/ @@ -923,4 +967,4 @@ export function getActiveClient(): Client { realActivation(); } return clients.ActiveClient; -} \ No newline at end of file +} From 1a8e84bca34372b174f160950247ea8ca805ab81 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 5 Mar 2019 16:29:43 -0800 Subject: [PATCH 37/51] Seanmcm/debug fixes (#3244) * Fix debug launch bugs. --- Extension/package.json | 15 +++++++ .../src/Debugger/configurationProvider.ts | 45 +++++++++---------- Extension/src/Debugger/extension.ts | 4 +- Extension/src/common.ts | 2 + Extension/src/main.ts | 2 +- 5 files changed, 42 insertions(+), 26 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index 8727b00ebc..e5d15681e1 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -587,6 +587,11 @@ "command": "C_Cpp.TakeSurvey", "title": "%c_cpp.command.takeSurvey.title%", "category": "C/C++" + }, + { + "command": "C_Cpp.BuildAndDebugActiveFile", + "title": "%c_cpp.command.buildAndDebugActiveFile.title%", + "category": "C/C++" } ], "keybindings": [ @@ -1393,6 +1398,16 @@ "when": "editorLangId == cpp", "command": "workbench.action.showAllSymbols", "group": "other@4" + }, + { + "when": "editorLangId == cpp", + "command": "C_Cpp.BuildAndDebugActiveFile", + "group": "other@5" + }, + { + "when": "editorLangId == c", + "command": "C_Cpp.BuildAndDebugActiveFile", + "group": "other@5" } ] }, diff --git a/Extension/src/Debugger/configurationProvider.ts b/Extension/src/Debugger/configurationProvider.ts index 7723bccdf1..6c5941595e 100644 --- a/Extension/src/Debugger/configurationProvider.ts +++ b/Extension/src/Debugger/configurationProvider.ts @@ -7,10 +7,9 @@ import * as debugUtils from './utils'; import * as os from 'os'; import * as path from 'path'; import * as vscode from 'vscode'; -import { /*getBuildTasks,*/ BuildTaskDefinition } from '../LanguageServer/extension'; +import { getBuildTasks, BuildTaskDefinition } from '../LanguageServer/extension'; import * as util from '../common'; import * as fs from 'fs'; -//import * as assert from 'assert'; import * as Telemetry from '../telemetry'; import { buildAndDebugActiveFileStr } from './extension'; @@ -55,24 +54,20 @@ export class QuickPickConfigurationProvider implements vscode.DebugConfiguration return menuItem; }); - return vscode.window.showQuickPick(items, {placeHolder: "Select a configuration"}).then(async selection => { - // Wrap in new Promise to make sure task kicks off before VS Code switches the active document to launch.json - return new Promise(async resolve => { - if (!selection) { - return resolve([defaultConfig]); // User canceled it. Choose the default config? - } - if (selection.label.indexOf(buildAndDebugActiveFileStr()) !== -1 && selection.configuration.preLaunchTask) { - try { - await util.ensureBuildTaskExists(selection.configuration.preLaunchTask); - await vscode.debug.startDebugging(folder, selection.configuration); - Telemetry.logDebuggerEvent("buildAndDebug", { "success": "true" }); - } catch (e) { - Telemetry.logDebuggerEvent("buildAndDebug", { "success": "false" }); - } - } - return resolve([selection.configuration]); - }); - }); + const selection: MenuItem = await vscode.window.showQuickPick(items, {placeHolder: "Select a configuration"}); + if (!selection) { + throw new Error(); // User canceled it. + } + if (selection.label.indexOf(buildAndDebugActiveFileStr()) !== -1 && selection.configuration.preLaunchTask) { + try { + await util.ensureBuildTaskExists(selection.configuration.preLaunchTask); + await vscode.debug.startDebugging(folder, selection.configuration); + Telemetry.logDebuggerEvent("buildAndDebug", { "success": "true" }); + } catch (e) { + Telemetry.logDebuggerEvent("buildAndDebug", { "success": "false" }); + } + } + return [selection.configuration]; } resolveDebugConfiguration(folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, token?: vscode.CancellationToken): vscode.ProviderResult { @@ -93,8 +88,8 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider { * Returns a list of initial debug configurations based on contextual information, e.g. package.json or folder. */ async provideDebugConfigurations(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): Promise { - let buildTasks: vscode.Task[]; // = await getBuildTasks(); // TODO - if (!buildTasks || buildTasks.length === 0) { + let buildTasks: vscode.Task[] = await getBuildTasks(); + if (buildTasks.length === 0 || this.type === DebuggerType.cppvsdbg) { return Promise.resolve(this.provider.getInitialConfigurations(this.type)); } const defaultConfig: vscode.DebugConfiguration = this.provider.getInitialConfigurations(this.type).find(config => { @@ -130,6 +125,10 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider { debuggerName = "gdb"; } + if (platform === "win32") { + debuggerName += ".exe"; + } + const debuggerPath: string = path.join(compilerDirname, debuggerName); return new Promise(resolve => { fs.stat(debuggerPath, (err, stats: fs.Stats) => { @@ -137,7 +136,7 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider { newConfig.miDebuggerPath = debuggerPath; } else { // TODO should probably resolve a missing debugger in a more graceful fashion for win32. - newConfig.miDebuggerPath = path.join("/usr", "bin", debuggerName); + newConfig.miDebuggerPath = (platform === "darwin" ? undefined : path.join("/usr", "bin", debuggerName)); } return resolve(newConfig); diff --git a/Extension/src/Debugger/extension.ts b/Extension/src/Debugger/extension.ts index 35497a5aef..c49b82c2af 100644 --- a/Extension/src/Debugger/extension.ts +++ b/Extension/src/Debugger/extension.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import * as os from 'os'; import { AttachPicker, RemoteAttachPicker, AttachItemsProvider } from './attachToProcess'; import { NativeAttachItemsProviderFactory } from './nativeAttach'; -import { /*QuickPickConfigurationProvider,*/ ConfigurationAssetProviderFactory, CppVsDbgConfigurationProvider, CppDbgConfigurationProvider, ConfigurationSnippetProvider, IConfigurationAssetProvider } from './configurationProvider'; +import { QuickPickConfigurationProvider, ConfigurationAssetProviderFactory, CppVsDbgConfigurationProvider, CppDbgConfigurationProvider, ConfigurationSnippetProvider, IConfigurationAssetProvider } from './configurationProvider'; import { CppdbgDebugAdapterDescriptorFactory, CppvsdbgDebugAdapterDescriptorFactory } from './debugAdapterDescriptorFactory'; import * as util from '../common'; import * as Telemetry from '../telemetry'; @@ -35,7 +35,7 @@ export function initialize(context: vscode.ExtensionContext): void { disposables.push(vscode.debug.registerDebugConfigurationProvider('cppvsdbg', new CppVsDbgConfigurationProvider(configurationProvider))); } const provider: CppDbgConfigurationProvider = new CppDbgConfigurationProvider(configurationProvider); - disposables.push(vscode.debug.registerDebugConfigurationProvider('cppdbg', provider)); //new QuickPickConfigurationProvider(provider))); // TODO + disposables.push(vscode.debug.registerDebugConfigurationProvider('cppdbg', new QuickPickConfigurationProvider(provider))); disposables.push(vscode.commands.registerTextEditorCommand("C_Cpp.BuildAndDebugActiveFile", async (textEditor: vscode.TextEditor, edit: vscode.TextEditorEdit, ...args: any[]) => { const folder: vscode.WorkspaceFolder = vscode.workspace.getWorkspaceFolder(textEditor.document.uri); diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 10f57c03c9..c47bf3e062 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -83,6 +83,8 @@ export async function ensureBuildTaskExists(taskName: string): Promise { delete definition.compilerPath; } + rawTasksJson.version = "2.0.0"; + if (!rawTasksJson.tasks.find(task => { return task.label === selectedTask.definition.label; })) { rawTasksJson.tasks.push(selectedTask.definition); } diff --git a/Extension/src/main.ts b/Extension/src/main.ts index fa28ffb376..ea519b3b61 100644 --- a/Extension/src/main.ts +++ b/Extension/src/main.ts @@ -329,7 +329,7 @@ function rewriteManifest(): Promise { "onLanguage:c", "onCommand:extension.pickNativeProcess", "onCommand:extension.pickRemoteNativeProcess", - //"onCommand:C_Cpp.BuildAndDebugActiveFile", // TODO + "onCommand:C_Cpp.BuildAndDebugActiveFile", "onCommand:C_Cpp.ConfigurationEdit", "onCommand:C_Cpp.ConfigurationSelect", "onCommand:C_Cpp.ConfigurationProviderSelect", From 01d013723f9e2fc4945927a1cb30038af09dc6d0 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 5 Mar 2019 16:42:09 -0800 Subject: [PATCH 38/51] Fix install vsix. (#3251) * Fix install vsix. --- Extension/src/LanguageServer/extension.ts | 37 +++++++++++++++++------ Extension/src/githubAPI.ts | 17 +++++++---- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 69724aa74c..3326a15eb5 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -40,7 +40,7 @@ let activatedPreviously: PersistentWorkspaceState; const insiderUpdateTimerInterval: number = 1000 * 60 * 60; let buildInfoCache: BuildInfo | null = null; const taskSourceStr: string = "C/C++"; - +const cppInstallVsixStr: string = 'C/C++: Install vsix -- '; let taskProvider: vscode.Disposable; /** @@ -409,7 +409,7 @@ function onInterval(): void { * Install a VSIX package. This helper function will exist until VSCode offers a command to do so. * @param updateChannel The user's updateChannel setting. */ -async function installVsix(vsixLocation: string, updateChannel: string): Promise { +function installVsix(vsixLocation: string, updateChannel: string): Promise { // Get the path to the VSCode command -- replace logic later when VSCode allows calling of // workbench.extensions.action.installVSIX from TypeScript w/o instead popping up a file dialog return PlatformInformation.GetPlatformInformation().then((platformInfo) => { @@ -451,6 +451,21 @@ async function installVsix(vsixLocation: string, updateChannel: string): Promise let process: ChildProcess; try { process = spawn(vsCodeScriptPath, ['--install-extension', vsixLocation, '--force']); + + // Timeout the process if no response is sent back. Ensures this Promise resolves/rejects + const timer: NodeJS.Timer = setTimeout(() => { + process.kill(); + reject(new Error('Failed to receive response from VS Code script process for installation within 30s.')); + }, 30000); + + process.on('exit', (code: number) => { + clearInterval(timer); + if (code !== 0) { + reject(new Error(`VS Code script exited with error code ${code}`)); + } else { + resolve(); + } + }); if (process.pid === undefined) { throw new Error(); } @@ -458,7 +473,6 @@ async function installVsix(vsixLocation: string, updateChannel: string): Promise reject(new Error('Failed to launch VS Code script process for installation')); return; } - resolve(); }); } @@ -506,19 +520,23 @@ async function suggestInsidersChannel(): Promise { try { buildInfo = await getTargetBuildInfo("Insiders"); } catch (error) { + console.log(`${cppInstallVsixStr}${error.message}`); + if (error.message.indexOf('/') !== -1 || error.message.indexOf('\\') !== -1) { + error.message = "Potential PII hidden"; + } telemetry.logLanguageServerEvent('suggestInsiders', { 'error': error.message, 'success': 'false' }); } if (!buildInfo) { - return; + return; // No need to update. } - const message: string = `Insiders version: ${buildInfo.name} is available. Would you like to switch to the Insiders channel and install this update?`; + const message: string = `Insiders version ${buildInfo.name} is available. Would you like to switch to the Insiders channel and install this update?`; const yes: string = "Yes"; const askLater: string = "Ask Me Later"; const dontShowAgain: string = "Don't Show Again"; let selection: string = await vscode.window.showInformationMessage(message, yes, askLater, dontShowAgain); switch (selection) { case yes: - // Cache buidinfo. + // Cache buildInfo. buildInfoCache = buildInfo; // It will call onDidChangeSettings. vscode.workspace.getConfiguration("C_Cpp").update("updateChannel", "Insiders", vscode.ConfigurationTarget.Global); @@ -584,6 +602,7 @@ function applyUpdate(buildInfo: BuildInfo, updateChannel: string): Promise resolve(); }); }).catch(error => { + console.error(`${cppInstallVsixStr}${error.message}`); if (error.message.indexOf('/') !== -1 || error.message.indexOf('\\') !== -1) { error.message = "Potential PII hidden"; } @@ -597,9 +616,9 @@ function applyUpdate(buildInfo: BuildInfo, updateChannel: string): Promise * @param updateChannel The user's updateChannel setting. */ async function checkAndApplyUpdate(updateChannel: string): Promise { - // If we have buildinfo cache, we should use it. + // If we have buildInfo cache, we should use it. let buildInfo: BuildInfo | null = buildInfoCache; - // clear buildinfo cache. + // clear buildInfo cache. buildInfoCache = null; if (!buildInfo) { @@ -610,7 +629,7 @@ async function checkAndApplyUpdate(updateChannel: string): Promise { } } if (!buildInfo) { - return; + return; // No need to update. } await applyUpdate(buildInfo, updateChannel); } diff --git a/Extension/src/githubAPI.ts b/Extension/src/githubAPI.ts index 56adc7c347..646d7ea9fe 100644 --- a/Extension/src/githubAPI.ts +++ b/Extension/src/githubAPI.ts @@ -9,6 +9,8 @@ import * as util from './common'; import { PlatformInformation } from './platform'; import { OutgoingHttpHeaders } from 'http'; +const testingInsidersVsixInstall: boolean = false; // Change this to true to enable testing of the Insiders vsix installation. + /** * The object representation of a Build Asset. Each Asset corresponds to information about a release file on GitHub. */ @@ -139,7 +141,7 @@ export async function getTargetBuildInfo(updateChannel: string): Promise boolean; let useBuild: (build: Build) => boolean; if (updateChannel === 'Insiders') { - needsUpdate = (installed: PackageVersion, target: PackageVersion) => { return target.isGreaterThan(installed); }; + needsUpdate = (installed: PackageVersion, target: PackageVersion) => { return testingInsidersVsixInstall || target.isGreaterThan(installed); }; useBuild = (build: Build): boolean => { return true; }; } else if (updateChannel === 'Default') { needsUpdate = function(installed: PackageVersion, target: PackageVersion): boolean { return installed.isGreaterThan(target); }; @@ -189,7 +191,10 @@ function getTargetBuild(builds: Build[], userVersion: PackageVersion, updateChan // Check current version against target's version to determine if the installation should happen const targetVersion: PackageVersion = new PackageVersion(targetBuild.name); - return needsUpdate(userVersion, targetVersion) ? targetBuild : undefined; + if (needsUpdate(userVersion, targetVersion)) { + return targetBuild; + } + return undefined; } interface Rate { @@ -201,7 +206,7 @@ interface RateLimit { } function isRate(input: any): input is Rate { - return input && input.remaining && util.isNumber(input.remaining); + return input && util.isNumber(input.remaining); } function isRateLimit(input: any): input is RateLimit { @@ -212,7 +217,7 @@ async function getRateLimit(): Promise { const header: OutgoingHttpHeaders = { 'User-Agent': 'vscode-cpptools' }; const data: string = await util.downloadFileToStr('https://api.github.com/rate_limit', header) .catch((error) => { - if (error.code && error.code !== "ENOENT") { + if (error && error.code && error.code !== "ENOENT") { // Only throw if the user is connected to the Internet. throw new Error('Failed to download rate limit JSON'); } @@ -255,7 +260,7 @@ async function getReleaseJson(): Promise { const data: string = await util.downloadFileToStr(releaseUrl, header) .catch((error) => { - if (error.code && error.code !== "ENOENT") { + if (error && error.code && error.code !== "ENOENT") { // Only throw if the user is connected to the Internet. throw new Error('Failed to download release JSON'); } From 868799af10a66d7e080d71ec10efb96e130197ba Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Thu, 7 Mar 2019 11:10:32 -0800 Subject: [PATCH 39/51] Disable AutoPCH for older Macs. (#3261) * Disable AutoPCH for older Macs. --- Extension/package-lock.json | 6 +++--- Extension/package.json | 2 +- Extension/src/LanguageServer/client.ts | 12 ++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Extension/package-lock.json b/Extension/package-lock.json index 9931d25af0..2d99963562 100644 --- a/Extension/package-lock.json +++ b/Extension/package-lock.json @@ -16,9 +16,9 @@ "dev": true }, "@types/node": { - "version": "8.10.40", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.40.tgz", - "integrity": "sha512-RRSjdwz63kS4u7edIwJUn8NqKLLQ6LyqF/X4+4jp38MBT3Vwetewi2N4dgJEshLbDwNgOJXNYoOwzVZUSSLhkQ==", + "version": "8.10.43", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.43.tgz", + "integrity": "sha512-5m5W13HR2k3cu88mpzlnPBBv5+GyMHtj4F0P83RG4mqoC0AYVYHVMHfF3SgwKNtqEZiZQASMxU92QsLEekKcnw==", "dev": true }, "agent-base": { diff --git a/Extension/package.json b/Extension/package.json index e5d15681e1..93bdb52665 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -1435,7 +1435,7 @@ }, "devDependencies": { "@types/mocha": "^5.2.6", - "@types/node": "^8.10.40", + "@types/node": "^8.10.43", "async-child-process": "^1.1.1", "await-notify": "^1.0.1", "child-process": "^1.0.2", diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index f567569991..cb25e28bbe 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -30,6 +30,7 @@ import { getTestHook, TestHook } from '../testHook'; import { getCustomConfigProviders, CustomConfigurationProviderCollection, CustomConfigurationProvider1 } from '../LanguageServer/customProviders'; import { ABTestSettings, getABTestSettings } from '../abTesting'; import * as fs from 'fs'; +import * as os from 'os'; let ui: UI; const configProviderTimeout: number = 2000; @@ -379,6 +380,16 @@ class DefaultClient implements Client { } let abTestSettings: ABTestSettings = getABTestSettings(); + + let intelliSenseCacheDisabled: boolean = false; + if (os.platform() === "darwin") { + const releaseParts: string[] = os.release().split("."); + if (releaseParts.length >= 1) { + // AutoPCH doesn't work for older Mac OS's. + intelliSenseCacheDisabled = parseInt(releaseParts[0]) < 17; + } + } + let clientOptions: LanguageClientOptions = { documentSelector: [ { scheme: 'file', language: 'cpp' }, @@ -402,6 +413,7 @@ class DefaultClient implements Client { tab_size: other.editorTabSize, intelliSenseEngine: settings.intelliSenseEngine, intelliSenseEngineFallback: settings.intelliSenseEngineFallback, + intelliSenseCacheDisabled: intelliSenseCacheDisabled, intelliSenseCachePath : settings.intelliSenseCachePath, intelliSenseCacheSize : settings.intelliSenseCacheSize, autocomplete: settings.autoComplete, From 6f5c9e362bad8fed4772db7e65518ae85036fb82 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Thu, 7 Mar 2019 11:22:21 -0800 Subject: [PATCH 40/51] Fix unwanted compilerPath squiggle with cl.exe. (#3263) --- Extension/src/common.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Extension/src/common.ts b/Extension/src/common.ts index c47bf3e062..620a5883f5 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -780,9 +780,9 @@ export function extractCompilerPathAndArgs(inputCompilerPath: string): CompilerP } else { // Go from right to left checking if a valid path is to the left of a space. let spaceStart: number = compilerPath.lastIndexOf(" "); - if (spaceStart !== -1 && !fs.existsSync(compilerPath)) { + if (spaceStart !== -1 && (!isWindows || !compilerPath.endsWith("cl.exe")) && !checkFileExistsSync(compilerPath)) { let potentialCompilerPath: string = compilerPath.substr(0, spaceStart); - while ((!isWindows || !potentialCompilerPath.endsWith("cl.exe")) && !fs.existsSync(potentialCompilerPath)) { + while ((!isWindows || !potentialCompilerPath.endsWith("cl.exe")) && !checkFileExistsSync(potentialCompilerPath)) { spaceStart = potentialCompilerPath.lastIndexOf(" "); if (spaceStart === -1) { // Reached the start without finding a valid path. Use the original value. From 2426a66be461f574cdd0ddf5ee13a5947e0c65cf Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Thu, 7 Mar 2019 11:27:30 -0800 Subject: [PATCH 41/51] Seanmcm/change mac mi debugger path default (#3262) * Change default miDebuggerPath on Mac. --- .../src/Debugger/configurationProvider.ts | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Extension/src/Debugger/configurationProvider.ts b/Extension/src/Debugger/configurationProvider.ts index 6c5941595e..8143a46349 100644 --- a/Extension/src/Debugger/configurationProvider.ts +++ b/Extension/src/Debugger/configurationProvider.ts @@ -120,7 +120,7 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider { newConfig.MIMode = "lldb"; const suffixIndex: number = compilerName.indexOf("-"); const suffix: string = suffixIndex === -1 ? "" : compilerName.substr(suffixIndex); - debuggerName = (platform === "darwin" ? "lldb" : "lldb-mi") + suffix; + debuggerName = "lldb-mi" + suffix; } else { debuggerName = "gdb"; } @@ -131,16 +131,20 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider { const debuggerPath: string = path.join(compilerDirname, debuggerName); return new Promise(resolve => { - fs.stat(debuggerPath, (err, stats: fs.Stats) => { - if (!err && stats && stats.isFile) { - newConfig.miDebuggerPath = debuggerPath; - } else { - // TODO should probably resolve a missing debugger in a more graceful fashion for win32. - newConfig.miDebuggerPath = (platform === "darwin" ? undefined : path.join("/usr", "bin", debuggerName)); - } - + if (platform === "darwin") { return resolve(newConfig); - }); + } else { + fs.stat(debuggerPath, (err, stats: fs.Stats) => { + if (!err && stats && stats.isFile) { + newConfig.miDebuggerPath = debuggerPath; + } else { + // TODO should probably resolve a missing debugger in a more graceful fashion for win32. + newConfig.miDebuggerPath = path.join("/usr", "bin", debuggerName); + } + + return resolve(newConfig); + }); + } }); })); configs.push(defaultConfig); From 260124b39b60992ad9f11b7a8be4d73d26fbfe8a Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Mon, 11 Mar 2019 13:02:44 -0700 Subject: [PATCH 42/51] Updating vsdbg (#3267) --- Extension/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/package.json b/Extension/package.json index 93bdb52665..3d5a34c584 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -1625,7 +1625,7 @@ }, { "description": "Visual Studio Windows Debugger", - "url": "https://go.microsoft.com/fwlink/?linkid=2080806", + "url": "https://go.microsoft.com/fwlink/?linkid=2082216", "platforms": [ "win32" ], From 24b69c7873bb87782a136f02fc8cf45e08564a11 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 12 Mar 2019 16:55:15 -0700 Subject: [PATCH 43/51] Seanmcm/add cl debug support (#3264) * Add cl.exe support. * Fix Build and Debug too early. * Make menus better. --- Extension/package.json | 20 +++---- .../src/Debugger/configurationProvider.ts | 59 +++++++++++++------ Extension/src/Debugger/extension.ts | 20 ++++++- .../src/LanguageServer/configurations.ts | 6 +- Extension/src/LanguageServer/extension.ts | 17 +++--- 5 files changed, 83 insertions(+), 39 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index 3d5a34c584..2d7eef7308 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -1362,52 +1362,52 @@ { "when": "editorLangId == c", "command": "C_Cpp.SwitchHeaderSource", - "group": "other@1" + "group": "other1_navigation@1" }, { "when": "editorLangId == cpp", "command": "C_Cpp.SwitchHeaderSource", - "group": "other@1" + "group": "other1_navigation@1" }, { "when": "editorLangId == c", "command": "C_Cpp.Navigate", - "group": "other@2" + "group": "other1_navigation@2" }, { "when": "editorLangId == cpp", "command": "C_Cpp.Navigate", - "group": "other@2" + "group": "other1_navigation@2" }, { "when": "editorLangId == c", "command": "workbench.action.gotoSymbol", - "group": "other@3" + "group": "other1_navigation@3" }, { "when": "editorLangId == cpp", "command": "workbench.action.gotoSymbol", - "group": "other@3" + "group": "other1_navigation@3" }, { "when": "editorLangId == c", "command": "workbench.action.showAllSymbols", - "group": "other@4" + "group": "other1_navigation@4" }, { "when": "editorLangId == cpp", "command": "workbench.action.showAllSymbols", - "group": "other@4" + "group": "other1_navigation@4" }, { "when": "editorLangId == cpp", "command": "C_Cpp.BuildAndDebugActiveFile", - "group": "other@5" + "group": "other2_debug@1" }, { "when": "editorLangId == c", "command": "C_Cpp.BuildAndDebugActiveFile", - "group": "other@5" + "group": "other2_debug@1" } ] }, diff --git a/Extension/src/Debugger/configurationProvider.ts b/Extension/src/Debugger/configurationProvider.ts index 8143a46349..55fb345a41 100644 --- a/Extension/src/Debugger/configurationProvider.ts +++ b/Extension/src/Debugger/configurationProvider.ts @@ -58,6 +58,12 @@ export class QuickPickConfigurationProvider implements vscode.DebugConfiguration if (!selection) { throw new Error(); // User canceled it. } + if (selection.label.startsWith("cl.exe")) { + if (!process.env.DevEnvDir || process.env.DevEnvDir.length === 0) { + vscode.window.showErrorMessage('cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS.'); + throw new Error(); + } + } if (selection.label.indexOf(buildAndDebugActiveFileStr()) !== -1 && selection.configuration.preLaunchTask) { try { await util.ensureBuildTaskExists(selection.configuration.preLaunchTask); @@ -89,7 +95,7 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider { */ async provideDebugConfigurations(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): Promise { let buildTasks: vscode.Task[] = await getBuildTasks(); - if (buildTasks.length === 0 || this.type === DebuggerType.cppvsdbg) { + if (buildTasks.length === 0) { return Promise.resolve(this.provider.getInitialConfigurations(this.type)); } const defaultConfig: vscode.DebugConfiguration = this.provider.getInitialConfigurations(this.type).find(config => { @@ -100,12 +106,25 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider { const platformInfo: PlatformInformation = await PlatformInformation.GetPlatformInformation(); const platform: string = platformInfo.platform; + // Filter out build tasks that don't match the currently selectede debug configuration type. + buildTasks = buildTasks.filter((task: vscode.Task) => { + if (defaultConfig.name === "(Windows) Launch") { + if (task.name.startsWith("cl.exe")) { + return true; + } + } else { + if (!task.name.startsWith("cl.exe")) { + return true; + } + } + return false; + }); + // Generate new configurations for each build task. // Generating a task is async, therefore we must *await* *all* map(task => config) Promises to resolve. let configs: vscode.DebugConfiguration[] = await Promise.all(buildTasks.map>(async task => { const definition: BuildTaskDefinition = task.definition as BuildTaskDefinition; const compilerName: string = path.basename(definition.compilerPath); - const compilerDirname: string = path.dirname(definition.compilerPath); let newConfig: vscode.DebugConfiguration = Object.assign({}, defaultConfig); // Copy enumerables and properties @@ -115,25 +134,30 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider { const exeName: string = path.join("${fileDirname}", "${fileBasenameNoExtension}"); newConfig.program = platform === "win32" ? exeName + ".exe" : exeName; - let debuggerName: string; - if (compilerName.startsWith("clang")) { - newConfig.MIMode = "lldb"; - const suffixIndex: number = compilerName.indexOf("-"); - const suffix: string = suffixIndex === -1 ? "" : compilerName.substr(suffixIndex); - debuggerName = "lldb-mi" + suffix; - } else { - debuggerName = "gdb"; - } - - if (platform === "win32") { - debuggerName += ".exe"; - } - - const debuggerPath: string = path.join(compilerDirname, debuggerName); return new Promise(resolve => { if (platform === "darwin") { return resolve(newConfig); } else { + let debuggerName: string; + if (compilerName.startsWith("clang")) { + newConfig.MIMode = "lldb"; + const suffixIndex: number = compilerName.indexOf("-"); + const suffix: string = suffixIndex === -1 ? "" : compilerName.substr(suffixIndex); + debuggerName = "lldb-mi" + suffix; + } else if (compilerName === "cl.exe") { + newConfig.miDebuggerPath = undefined; + newConfig.type = "cppvsdbg"; + return resolve(newConfig); + } else { + debuggerName = "gdb"; + } + + if (platform === "win32") { + debuggerName += ".exe"; + } + + const compilerDirname: string = path.dirname(definition.compilerPath); + const debuggerPath: string = path.join(compilerDirname, debuggerName); fs.stat(debuggerPath, (err, stats: fs.Stats) => { if (!err && stats && stats.isFile) { newConfig.miDebuggerPath = debuggerPath; @@ -141,7 +165,6 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider { // TODO should probably resolve a missing debugger in a more graceful fashion for win32. newConfig.miDebuggerPath = path.join("/usr", "bin", debuggerName); } - return resolve(newConfig); }); } diff --git a/Extension/src/Debugger/extension.ts b/Extension/src/Debugger/extension.ts index c49b82c2af..5208b1c65f 100644 --- a/Extension/src/Debugger/extension.ts +++ b/Extension/src/Debugger/extension.ts @@ -31,8 +31,10 @@ export function initialize(context: vscode.ExtensionContext): void { let configurationProvider: IConfigurationAssetProvider = ConfigurationAssetProviderFactory.getConfigurationProvider(); // On non-windows platforms, the cppvsdbg debugger will not be registered for initial configurations. // This will cause it to not show up on the dropdown list. + let vsdbgProvider: CppVsDbgConfigurationProvider = null; if (os.platform() === 'win32') { - disposables.push(vscode.debug.registerDebugConfigurationProvider('cppvsdbg', new CppVsDbgConfigurationProvider(configurationProvider))); + vsdbgProvider = new CppVsDbgConfigurationProvider(configurationProvider); + disposables.push(vscode.debug.registerDebugConfigurationProvider('cppvsdbg', new QuickPickConfigurationProvider(vsdbgProvider))); } const provider: CppDbgConfigurationProvider = new CppDbgConfigurationProvider(configurationProvider); disposables.push(vscode.debug.registerDebugConfigurationProvider('cppdbg', new QuickPickConfigurationProvider(provider))); @@ -51,10 +53,20 @@ export function initialize(context: vscode.ExtensionContext): void { vscode.window.showErrorMessage('Cannot build and debug because the active file is not a C or C++ source file.'); return Promise.resolve(); } + let configs: vscode.DebugConfiguration[] = (await provider.provideDebugConfigurations(folder)).filter(config => { return config.name.indexOf(buildAndDebugActiveFileStr()) !== -1; }); + if (vsdbgProvider) { + let vsdbgConfigs: vscode.DebugConfiguration[] = (await vsdbgProvider.provideDebugConfigurations(folder)).filter(config => { + return config.name.indexOf(buildAndDebugActiveFileStr()) !== -1; + }); + if (vsdbgConfigs) { + configs.push(...vsdbgConfigs); + } + } + interface MenuItem extends vscode.QuickPickItem { configuration: vscode.DebugConfiguration; } @@ -67,6 +79,12 @@ export function initialize(context: vscode.ExtensionContext): void { if (!selection) { return; // User canceled it. } + if (selection.label.startsWith("cl.exe")) { + if (!process.env.DevEnvDir || process.env.DevEnvDir.length === 0) { + vscode.window.showErrorMessage('cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS.'); + return; + } + } if (selection.configuration.preLaunchTask) { if (folder) { try { diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 91b3326696..33ce6541a1 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -132,10 +132,10 @@ export class CppProperties { public get ConfigurationsChanged(): vscode.Event { return this.configurationsChanged.event; } public get SelectionChanged(): vscode.Event { return this.selectionChanged.event; } public get CompileCommandsChanged(): vscode.Event { return this.compileCommandsChanged.event; } - public get Configurations(): Configuration[] { return this.configurationJson.configurations; } + public get Configurations(): Configuration[] { return this.configurationJson ? this.configurationJson.configurations : null; } public get CurrentConfigurationIndex(): number { return this.currentConfigurationIndex.Value; } - public get CurrentConfiguration(): Configuration { return this.Configurations[this.CurrentConfigurationIndex]; } - public get CompilerPath(): string { return this.CurrentConfiguration.compilerPath; } + public get CurrentConfiguration(): Configuration { return this.Configurations ? this.Configurations[this.CurrentConfigurationIndex] : null; } + public get CompilerPath(): string { return this.CurrentConfiguration ? this.CurrentConfiguration.compilerPath : null; } public get KnownCompiler(): KnownCompiler[] { return this.knownCompilers; } public get CurrentConfigurationProvider(): string|null { diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 3326a15eb5..0a875c0516 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -154,7 +154,7 @@ export async function getBuildTasks(): Promise { let userCompilerPath: string = await activeClient.getCompilerPath(); if (userCompilerPath) { userCompilerPath = userCompilerPath.trim(); - if (isWindows && (userCompilerPath.startsWith("/") || userCompilerPath.endsWith("cl.exe"))) { // TODO: Add WSL/cl.exe compiler support. + if (isWindows && userCompilerPath.startsWith("/")) { // TODO: Add WSL compiler support. userCompilerPath = null; } else { userCompilerPath = userCompilerPath.replace(/\\\\/g, "\\"); @@ -219,19 +219,22 @@ export async function getBuildTasks(): Promise { // Handle compiler args in compilerPath. let compilerPathAndArgs: util.CompilerPathAndArgs = util.extractCompilerPathAndArgs(compilerPath); compilerPath = compilerPathAndArgs.compilerPath; - const taskName: string = path.basename(compilerPath) + " build active file"; - let args: string[] = ['-g', '${file}', '-o', path.join('${fileDirname}', '${fileBasenameNoExtension}' + (isWindows ? '.exe' : ''))]; + const filePath: string = path.join('${fileDirname}', '${fileBasenameNoExtension}'); + const compilerPathBase: string = path.basename(compilerPath); + const taskName: string = compilerPathBase + " build active file"; + const isCl: boolean = taskName.startsWith("cl.exe"); + let args: string[] = isCl ? [ '/Zi', '/EHsc', '/Fe:', filePath + '.exe', '${file}' ] : ['-g', '${file}', '-o', filePath + (isWindows ? '.exe' : '')]; if (compilerPathAndArgs.additionalArgs) { args = args.concat(compilerPathAndArgs.additionalArgs); } - const cwd: string = path.dirname(compilerPath); + const cwd: string = isCl ? "" : path.dirname(compilerPath); const kind: BuildTaskDefinition = { type: 'shell', label: taskName, - command: compilerPath, + command: isCl ? compilerPathBase : compilerPath, args: args, - options: {"cwd": cwd}, - compilerPath: compilerPath + options: isCl ? undefined : {"cwd": cwd}, + compilerPath: isCl ? compilerPathBase : compilerPath }; const command: vscode.ShellExecution = new vscode.ShellExecution(compilerPath, [...args], { cwd: cwd }); From 79f8262d26ea44221c369f2a4c93a4aa0442f3a4 Mon Sep 17 00:00:00 2001 From: Bob Brown Date: Tue, 12 Mar 2019 16:58:30 -0700 Subject: [PATCH 44/51] show squiggles when invalid properties are added to the c_cpp_properties.json file (#3283) --- Extension/c_cpp_properties.schema.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Extension/c_cpp_properties.schema.json b/Extension/c_cpp_properties.schema.json index 2e7a7ad00f..d10e750cdf 100644 --- a/Extension/c_cpp_properties.schema.json +++ b/Extension/c_cpp_properties.schema.json @@ -112,9 +112,11 @@ "type": "string" } } - } + }, + "additionalProperties": false } - } + }, + "additionalProperties": false } }, "env": { @@ -156,5 +158,6 @@ "required": [ "configurations", "version" - ] + ], + "additionalProperties": false } From cd0dde9e278cd65a999b1e7f9bc9143e352dd5d0 Mon Sep 17 00:00:00 2001 From: Bob Brown Date: Thu, 14 Mar 2019 13:14:40 -0700 Subject: [PATCH 45/51] Update release notes (#3291) --- Extension/ReleaseNotes.html | 26 ++++++++++++++++++++------ Extension/package.json | 21 +-------------------- Extension/src/main.ts | 2 +- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/Extension/ReleaseNotes.html b/Extension/ReleaseNotes.html index 8eaca692d6..e6156f2c04 100644 --- a/Extension/ReleaseNotes.html +++ b/Extension/ReleaseNotes.html @@ -205,8 +205,23 @@

Microsoft C/C++ Extension for VS Code

-

January 2019 Update

-
Thank you for installing the C/C++ extension. In the January update, we added documentation comments for hover, completion, and signature help.
+

March 2019 Update

+
Thank you for installing the C/C++ extension! We're excited to announce the following features in the March update:
+

IntelliSense caching

+ On Windows and Linux, the extension will now cache header information to improve IntelliSense speed for your code files. Support for macOS will be available in a future release.
+
+ Please Note: The extension writes the cache to disk in order to achieve this performance improvement. By default the cache files will be stored in your workspace + folder's ".vscode" folder, but you can change this location by using the "C_Cpp.intelliSenseCachePath" setting. You can also control how much disk space can be + used for the cache with the "C_Cpp.intelliSenseCacheSize" setting. The default is 5120 MB as the caches for individual translation units can be large, + depending on the size and number of included headers.
+

Build and debug the active source file

+ We added a command to help you generate build and debug tasks for single code files. Since this feature writes out tasks.json and launch.json files, it currently requires + that a workspace folder be opened in VS Code first. After that, you can press F5 or select the command from the context menu to configure the tasks or kick off a build and debug + session.
+

Configuration squiggles

+ We added additional validation to the c_cpp_properties.json file to assist in diagnosing potential configuration mistakes. They will show up as problems in the + problems window.
+

Additional features and bug fixes are detailed in the full release notes.
@@ -231,10 +246,9 @@

Getting Started

diff --git a/Extension/package.json b/Extension/package.json index 2d7eef7308..dc04bf7c6f 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -43,25 +43,6 @@ ], "main": "./out/src/main", "contributes": { - "taskDefinitions": [ - { - "type": "shell", - "properties": { - "label": { - "type": "string" - }, - "command": { - "type": "string" - }, - "args": { - "type": "array" - }, - "options": { - "type": "array" - } - } - } - ], "problemMatchers": [ { "name": "gcc", @@ -1632,4 +1613,4 @@ "binaries": [] } ] -} +} \ No newline at end of file diff --git a/Extension/src/main.ts b/Extension/src/main.ts index ea519b3b61..9aea33bbda 100644 --- a/Extension/src/main.ts +++ b/Extension/src/main.ts @@ -22,7 +22,7 @@ import { getInstallationInformation, InstallationInformation, setInstallationSta import { Logger, getOutputChannelLogger, showOutputChannel } from './logger'; import { CppTools1 } from './cppTools1'; -const releaseNotesVersion: number = 3; +const releaseNotesVersion: number = 4; const cppTools: CppTools1 = new CppTools1(); let languageServiceDisabled: boolean = false; let reloadMessageShown: boolean = false; From 342de46452c7c8e08df8a958f12e57b262dc7f70 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Thu, 14 Mar 2019 14:22:32 -0700 Subject: [PATCH 46/51] Disable the IntelliSense cache on Mac. (#3293) * Disable the IntelliSense cache on Mac. --- Extension/src/LanguageServer/client.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index cb25e28bbe..ef6f759710 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -383,11 +383,13 @@ class DefaultClient implements Client { let intelliSenseCacheDisabled: boolean = false; if (os.platform() === "darwin") { - const releaseParts: string[] = os.release().split("."); - if (releaseParts.length >= 1) { - // AutoPCH doesn't work for older Mac OS's. - intelliSenseCacheDisabled = parseInt(releaseParts[0]) < 17; - } + intelliSenseCacheDisabled = true; + // TODO: Re-enable this after the performance is improved on Mac. + //const releaseParts: string[] = os.release().split("."); + //if (releaseParts.length >= 1) { + // // AutoPCH doesn't work for older Mac OS's. + // intelliSenseCacheDisabled = parseInt(releaseParts[0]) < 17; + //} } let clientOptions: LanguageClientOptions = { From 270a4f7d3830575fe1fc5a89339765536028d835 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Thu, 14 Mar 2019 17:27:22 -0700 Subject: [PATCH 47/51] Update changelog for 0.22.0-insiders3. (#3294) * Update changelog for 0.22.0-insiders3. --- Extension/CHANGELOG.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index ead95e80f6..5634f0cc4e 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,19 @@ # C/C++ for Visual Studio Code Change Log +## Version 0.22.0-insiders3: March 14, 2019 +* Fix bugs with squiggles and IntelliSense updating after edits. [#1779](https://github.com/Microsoft/vscode-cpptools/issues/1779), [#3124](https://github.com/Microsoft/vscode-cpptools/issues/3124), [#3260](https://github.com/Microsoft/vscode-cpptools/issues/3260) +* Fix formatting (and other non-IntelliSense operations) being blocked by IntelliSense processing. [#1928](https://github.com/Microsoft/vscode-cpptools/issues/1928) +* Show a prompt for changing `C_Cpp.updateChannel` to `Insiders`. [#3089](https://github.com/Microsoft/vscode-cpptools/issues/3089) + * lh123 (@lh123) [PR #3221](https://github.com/Microsoft/vscode-cpptools/pull/3221) +* Fix bugs with the Insider reload prompt appearing when it shouldn't. [#3206](https://github.com/Microsoft/vscode-cpptools/issues/3206) +* Enable `F5` and the `Build and Debug Active File` context menu command. [PR #3244](https://github.com/Microsoft/vscode-cpptools/pull/3244) +* Fix IntelliSense process crashing with Mac Sierra 10.12 or earlier. [#3256](https://github.com/Microsoft/vscode-cpptools/issues/3256) +* Fix incorrect `c_cpp_properties.json` squiggles with `cl.exe`. [#3263](https://github.com/Microsoft/vscode-cpptools/pull/3263) +* Add `cl.exe` build and debug support. [PR #3264](https://github.com/Microsoft/vscode-cpptools/pull/3264) +* Fix debugging not working for Windows 32-bit programs. [#3258](https://github.com/Microsoft/vscode-cpptools/issues/3258) +* Add warning squiggles for invalid properties in `c_cpp_properties.json`. [PR #3283](https://github.com/Microsoft/vscode-cpptools/pull/3283) +* Fix AutoPCH performance on Windows and Linux. + ## Version 0.22.0-insiders2: March 1, 2019 * Fix IntelliSense not working on Windows when the username has a space in it and file `C:\Users\` exists. [#1377](https://github.com/Microsoft/vscode-cpptools/issues/1377), [#2114](https://github.com/Microsoft/vscode-cpptools/issues/2114), [#2176](https://github.com/Microsoft/vscode-cpptools/issues/2176), [#3052](https://github.com/Microsoft/vscode-cpptools/issues/3052), [#3139](https://github.com/Microsoft/vscode-cpptools/issues/3139) * Enable `${command:cpptools.activeConfigName}` in tasks. [#1524](https://github.com/Microsoft/vscode-cpptools/issues/1524) @@ -7,7 +21,7 @@ * Fix auto-removal of compiler-provided paths in `includePath`. [#2177](https://github.com/Microsoft/vscode-cpptools/issues/2177) * Add support for `Scope::Member` scoped symbol searches. [#2484](https://github.com/Microsoft/vscode-cpptools/issues/2484) * Fix remote process picker bug. [#2585](https://github.com/Microsoft/vscode-cpptools/issues/2585), [#3150](https://github.com/Microsoft/vscode-cpptools/issues/3150) -* Add warning squiggles to `c_cpp_properties.json` for invalid paths. [#2799](https://github.com/Microsoft/vscode-cpptools/issues/2799) +* Add warning squiggles for invalid paths in `c_cpp_properties.json`. [#2799](https://github.com/Microsoft/vscode-cpptools/issues/2799) * Fix bug with manual completion invocation after `struct`. [#3080](https://github.com/Microsoft/vscode-cpptools/issues/3080) * Add C/C++ compiler build tasks for compiling the active source file. [PR #3118](https://github.com/Microsoft/vscode-cpptools/pull/3118) * Fix command not found and empty `c_cpp_properties.json` if activation is too slow. [#3160](https://github.com/Microsoft/vscode-cpptools/issues/3160), [#3176](https://github.com/Microsoft/vscode-cpptools/issues/3176) From e020801daca0a5cdfa6a196ddc95a5660a4a271f Mon Sep 17 00:00:00 2001 From: Bob Brown Date: Mon, 18 Mar 2019 13:12:18 -0700 Subject: [PATCH 48/51] readme feedback #3300 (#3307) --- Extension/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Extension/README.md b/Extension/README.md index b8be24a4f1..c3ec6c28f1 100644 --- a/Extension/README.md +++ b/Extension/README.md @@ -23,5 +23,12 @@ This preview release of the extension adds language support for C/C++ to Visual You can find more detailed information about C/C++ support for Visual Studio Code at our [GitHub page](https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation) and our [VS Code documentation page](https://code.visualstudio.com/docs/languages/cpp). +## Installation +The extension has OS-specific binary dependencies, so installation via the Marketplace requires an Internet connection so that these additional dependencies can be downloaded. If you are working on a computer that does not have access to the Internet or is behind a strict firewall, you may need to use our OS-specific packages and install them by invoking VS Code's `"Install from VSIX..."` command. These "offline' packages are available at: https://github.com/Microsoft/vscode-cpptools/releases. +* `cpptools-linux.vsix` - for 64-bit Linux +* `cpptools-linux32.vsix` - for 32-bit Linux +* `cpptools-osx.vsix` - for macOS +* `cpptools-win32.vsix` - for 64-bit & 32-bit Windows + ## Contact Us -If you run into any issues or have suggestions for us, please file [issues and suggestions on GitHub](https://github.com/Microsoft/vscode-cpptools/issues). If you haven’t already provided us feedback, please take this [quick survey](https://www.research.net/r/VBVV6C6) to help shape this extension for your needs. +If you run into any issues or have suggestions for us, please file [issues and suggestions on GitHub](https://github.com/Microsoft/vscode-cpptools/issues). If you haven’t already provided us feedback, please take this [quick survey](https://www.research.net/r/VBVV6C6) and let us know what you think! From 0c61ee96b7ea4cdc159f62cbf9aa5dd516432cf9 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Mon, 18 Mar 2019 15:47:57 -0700 Subject: [PATCH 49/51] Fix variable resolving not working with ${default}. (#3310) --- Extension/src/LanguageServer/configurations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 33ce6541a1..dadcc86b7b 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -435,9 +435,9 @@ export class CppProperties { private resolveAndSplit(paths: string[] | undefined, defaultValue: string[], env: Environment): string[] { let result: string[] = []; if (paths) { + paths = this.resolveDefaults(paths, defaultValue); paths.forEach(entry => { let entries: string[] = util.resolveVariables(entry, env).split(";").filter(e => e); - entries = this.resolveDefaults(entries, defaultValue); result = result.concat(entries); }); } From 8aadd40a580f7c95ecdba8f86028338e7c359e4a Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 19 Mar 2019 13:44:58 -0700 Subject: [PATCH 50/51] Fix squiggles with WSL compilerPath with args. (#3313) * Fix squiggles with WSL compilerPath with args. * Normalize path separators. --- .../src/LanguageServer/configurations.ts | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index dadcc86b7b..9ef947e65c 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -753,15 +753,9 @@ export class CppProperties { paths.add(`"${this.CurrentConfiguration.compileCommands}"`); } - const isWindows: boolean = os.platform() === 'win32'; if (this.CurrentConfiguration.compilerPath) { - let compilerPathAndArgs: util.CompilerPathAndArgs; - compilerPathAndArgs = util.extractCompilerPathAndArgs(this.CurrentConfiguration.compilerPath); - if (!(isWindows && compilerPathAndArgs.compilerPath.endsWith("cl.exe"))) { - // Unlike other cases, compilerPath may not start or end with " due to trimming of whitespace. - // This is checked to determine if the path is a compilerPath later on. - paths.add(`${compilerPathAndArgs.compilerPath}`); - } + // Unlike other cases, compilerPath may not start or end with " due to trimming of whitespace and the possibility of compiler args. + paths.add(`${this.CurrentConfiguration.compilerPath}`); } // Get the start/end for properties that are file-only. @@ -776,10 +770,11 @@ export class CppProperties { this.prevSquiggleMetrics[this.CurrentConfiguration.name] = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; } let newSquiggleMetrics: { [key: string]: number } = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0 }; + const isWindows: boolean = os.platform() === 'win32'; for (let curPath of paths) { - const isCompilerPath: boolean = !curPath.startsWith('"'); // This check probably will need to change later. - let resolvedPath: string = curPath.substr((!isCompilerPath ? 1 : 0), curPath.length + (!isCompilerPath ? - 2 : 0)); + const isCompilerPath: boolean = curPath === this.CurrentConfiguration.compilerPath; + let resolvedPath: string = isCompilerPath ? curPath : curPath.substr(1, curPath.length - 2); // Remove the surrounding quotes. // Resolve special path cases. if (resolvedPath === "${default}") { // TODO: Add squiggles for when the C_Cpp.default.* paths are invalid. @@ -799,6 +794,8 @@ export class CppProperties { resolvedPath = resolvedPath.replace(/\*/g, ""); } + // TODO: Invalid paths created from environment variables are not detected. + // Handle WSL paths. const isWSL: boolean = isWindows && resolvedPath.startsWith("/"); if (isWSL) { @@ -808,11 +805,19 @@ export class CppProperties { resolvedPath = resolvedPath.substr(0, 1) + ":" + resolvedPath.substr(1); } else if (this.rootfs && this.rootfs.length > 0) { resolvedPath = this.rootfs + resolvedPath.substr(1); - resolvedPath = resolvedPath.replace(/\//g, path.sep); // TODO: Handle WSL symlinks. } } + if (isCompilerPath) { + let compilerPathAndArgs: util.CompilerPathAndArgs = util.extractCompilerPathAndArgs(resolvedPath); + if (isWindows && compilerPathAndArgs.compilerPath.endsWith("cl.exe")) { + continue; // Don't squiggle invalid cl.exe paths because it could be for an older preview build. + } + resolvedPath = compilerPathAndArgs.compilerPath; + curPath = curPath.replace(/\"/g, `\\"`); + } + let pathExists: boolean = true; let existsWithExeAdded: (path: string) => boolean = (path: string) => { return isCompilerPath && isWindows && !isWSL && fs.existsSync(path + ".exe"); @@ -835,6 +840,13 @@ export class CppProperties { } } + // Normalize path separators. + if (path.sep === "/") { + resolvedPath = resolvedPath.replace(/\\/g, path.sep); + } else { + resolvedPath = resolvedPath.replace(/\//g, path.sep); + } + // Iterate through the text and apply squiggles. for (let curOffset: number = curText.indexOf(curPath); curOffset !== -1; curOffset = curText.indexOf(curPath, curOffset + curPath.length)) { let message: string; @@ -861,7 +873,7 @@ export class CppProperties { } let diagnostic: vscode.Diagnostic = new vscode.Diagnostic( new vscode.Range(document.positionAt(curTextStartOffset + curOffset), - document.positionAt(curTextStartOffset + curOffset + curPath.length + (!isCompilerPath ? - 1 : 0))), + document.positionAt(curTextStartOffset + curOffset + curPath.length + (!isCompilerPath ? -1 : 0))), message, vscode.DiagnosticSeverity.Warning); diagnostics.push(diagnostic); } From 4ca9ad8b3a45aadf2e4f5da05795714bde3ea555 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 19 Mar 2019 14:01:54 -0700 Subject: [PATCH 51/51] Update changelog. (#3312) * Update changelog. --- Extension/CHANGELOG.md | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 5634f0cc4e..41065333f2 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,47 +1,39 @@ # C/C++ for Visual Studio Code Change Log -## Version 0.22.0-insiders3: March 14, 2019 -* Fix bugs with squiggles and IntelliSense updating after edits. [#1779](https://github.com/Microsoft/vscode-cpptools/issues/1779), [#3124](https://github.com/Microsoft/vscode-cpptools/issues/3124), [#3260](https://github.com/Microsoft/vscode-cpptools/issues/3260) -* Fix formatting (and other non-IntelliSense operations) being blocked by IntelliSense processing. [#1928](https://github.com/Microsoft/vscode-cpptools/issues/1928) -* Show a prompt for changing `C_Cpp.updateChannel` to `Insiders`. [#3089](https://github.com/Microsoft/vscode-cpptools/issues/3089) - * lh123 (@lh123) [PR #3221](https://github.com/Microsoft/vscode-cpptools/pull/3221) -* Fix bugs with the Insider reload prompt appearing when it shouldn't. [#3206](https://github.com/Microsoft/vscode-cpptools/issues/3206) -* Enable `F5` and the `Build and Debug Active File` context menu command. [PR #3244](https://github.com/Microsoft/vscode-cpptools/pull/3244) -* Fix IntelliSense process crashing with Mac Sierra 10.12 or earlier. [#3256](https://github.com/Microsoft/vscode-cpptools/issues/3256) -* Fix incorrect `c_cpp_properties.json` squiggles with `cl.exe`. [#3263](https://github.com/Microsoft/vscode-cpptools/pull/3263) -* Add `cl.exe` build and debug support. [PR #3264](https://github.com/Microsoft/vscode-cpptools/pull/3264) -* Fix debugging not working for Windows 32-bit programs. [#3258](https://github.com/Microsoft/vscode-cpptools/issues/3258) -* Add warning squiggles for invalid properties in `c_cpp_properties.json`. [PR #3283](https://github.com/Microsoft/vscode-cpptools/pull/3283) -* Fix AutoPCH performance on Windows and Linux. - -## Version 0.22.0-insiders2: March 1, 2019 +## Version 0.22.0: March 19, 2019 +### Major Changes +* Add warning squiggles for invalid properties and paths in `c_cpp_properties.json`. [#2799](https://github.com/Microsoft/vscode-cpptools/issues/2799), [PR #3283](https://github.com/Microsoft/vscode-cpptools/pull/3283) +* Add C/C++ compiler build tasks for compiling the active source file, with support for `F5` debugging and the `Build and Debug Active File` context menu command. [PR #3118](https://github.com/Microsoft/vscode-cpptools/pull/3118), [PR #3244](https://github.com/Microsoft/vscode-cpptools/pull/3244) +* Add AutoPCH support to reduce IntelliSense parsing time, with `C_Cpp.intelliSenseCachePath` and `C_Cpp.intelliSenseCacheSize` settings. It isn't enabled for Mac yet. [PR #3184](https://github.com/Microsoft/vscode-cpptools/pull/3184) + +### Minor Changes * Fix IntelliSense not working on Windows when the username has a space in it and file `C:\Users\` exists. [#1377](https://github.com/Microsoft/vscode-cpptools/issues/1377), [#2114](https://github.com/Microsoft/vscode-cpptools/issues/2114), [#2176](https://github.com/Microsoft/vscode-cpptools/issues/2176), [#3052](https://github.com/Microsoft/vscode-cpptools/issues/3052), [#3139](https://github.com/Microsoft/vscode-cpptools/issues/3139) * Enable `${command:cpptools.activeConfigName}` in tasks. [#1524](https://github.com/Microsoft/vscode-cpptools/issues/1524) +* Fix bugs with squiggles and IntelliSense updating after edits. [#1779](https://github.com/Microsoft/vscode-cpptools/issues/1779), [#3124](https://github.com/Microsoft/vscode-cpptools/issues/3124), [#3260](https://github.com/Microsoft/vscode-cpptools/issues/3260) +* Fix formatting (and other non-IntelliSense operations) being blocked by IntelliSense processing. [#1928](https://github.com/Microsoft/vscode-cpptools/issues/1928) * Fix completion when the start of an identifier matches a keyword. [#1986](https://github.com/Microsoft/vscode-cpptools/issues/1986) * Fix auto-removal of compiler-provided paths in `includePath`. [#2177](https://github.com/Microsoft/vscode-cpptools/issues/2177) -* Add support for `Scope::Member` scoped symbol searches. [#2484](https://github.com/Microsoft/vscode-cpptools/issues/2484) -* Fix remote process picker bug. [#2585](https://github.com/Microsoft/vscode-cpptools/issues/2585), [#3150](https://github.com/Microsoft/vscode-cpptools/issues/3150) -* Add warning squiggles for invalid paths in `c_cpp_properties.json`. [#2799](https://github.com/Microsoft/vscode-cpptools/issues/2799) -* Fix bug with manual completion invocation after `struct`. [#3080](https://github.com/Microsoft/vscode-cpptools/issues/3080) -* Add C/C++ compiler build tasks for compiling the active source file. [PR #3118](https://github.com/Microsoft/vscode-cpptools/pull/3118) -* Fix command not found and empty `c_cpp_properties.json` if activation is too slow. [#3160](https://github.com/Microsoft/vscode-cpptools/issues/3160), [#3176](https://github.com/Microsoft/vscode-cpptools/issues/3176) -* Add AutoPCH support to reduce IntelliSense parsing time, with `C_Cpp.intelliSenseCachePath` and `C_Cpp.intelliSenseCacheSize` settings. [PR #3184](https://github.com/Microsoft/vscode-cpptools/pull/3184) -* Fix `cppvsdbg` debugger showing `"An unspecified error has occurred."` for structured binding variables. [#3197](https://github.com/Microsoft/vscode-cpptools/issues/3197) - -## Version 0.22.0-insiders: February 6, 2019 * Fix crash on Windows when 8.3 filenames are used. [#2453](https://github.com/Microsoft/vscode-cpptools/issues/2453), [#3104](https://github.com/Microsoft/vscode-cpptools/issues/3104) +* Add support for `Scope::Member` scoped symbol searches. [#2484](https://github.com/Microsoft/vscode-cpptools/issues/2484) * Fix signature help active parameter selection when parameter names are missing or subsets of each other. [#2952](https://github.com/Microsoft/vscode-cpptools/issues/2952) * Fix `--enable-pretty-printing` with `gdb` when complex objects are used as keys in maps. [#3024](https://github.com/Microsoft/vscode-cpptools/issues/3024) * Fix IntelliSense-based `Go to Definition` for `noexcept` methods. [#3060](https://github.com/Microsoft/vscode-cpptools/issues/3060) * Render macro hover expansions as C/C++. [#3075](https://github.com/Microsoft/vscode-cpptools/issues/3075) * Enable completion after `struct` when manually invoked. [#3080](https://github.com/Microsoft/vscode-cpptools/issues/3080) * Add `C_Cpp.suggestSnippets` setting to disable language server snippets. [#3083](https://github.com/Microsoft/vscode-cpptools/issues/3083) +* Show a prompt for changing `C_Cpp.updateChannel` to `Insiders`. [#3089](https://github.com/Microsoft/vscode-cpptools/issues/3089) + * lh123 (@lh123) [PR #3221](https://github.com/Microsoft/vscode-cpptools/pull/3221) * Fix `compilerPath` not getting priority over the `compile_commands.json` compiler. [#3102](https://github.com/Microsoft/vscode-cpptools/issues/3102) * Fix Linux `compile_commands.json` compiler querying with relative paths. [#3112](https://github.com/Microsoft/vscode-cpptools/issues/3112) * Allow `*` in `includePath` to apply to `browse.path` when `browse.path` is not specified. [#3121](https://github.com/Microsoft/vscode-cpptools/issues/3121) * Tucker Kern (@mill1000) [PR #3122](https://github.com/Microsoft/vscode-cpptools/pull/3122) * Disable `(` and `<` completion commit characters. [#3127](https://github.com/Microsoft/vscode-cpptools/issues/3127) * Add Chinese translations for command titles. [PR #3128](https://github.com/Microsoft/vscode-cpptools/pull/3128) +* Fix remote process picker bug. [#2585](https://github.com/Microsoft/vscode-cpptools/issues/2585), [#3150](https://github.com/Microsoft/vscode-cpptools/issues/3150) +* Fix command not found and empty `c_cpp_properties.json` if activation is too slow. [#3160](https://github.com/Microsoft/vscode-cpptools/issues/3160), [#3176](https://github.com/Microsoft/vscode-cpptools/issues/3176) +* Fix `cppvsdbg` debugger showing `"An unspecified error has occurred."` for structured binding variables. [#3197](https://github.com/Microsoft/vscode-cpptools/issues/3197) +* Fix bugs with the Insider reload prompt appearing when it shouldn't. [#3206](https://github.com/Microsoft/vscode-cpptools/issues/3206) +* Fix variable expansion (e.g. `${env.HOME}`) not working when `${default}` is used in `c_cpp_properties.json`. [#3309](https://github.com/Microsoft/vscode-cpptools/issues/3309) * Fix other unreported IntelliSense engine bugs. ## Version 0.21.0: January 23, 2019