diff --git a/.gitmodules b/.gitmodules index fdf474a693d..0e4e0b3ed77 100644 --- a/.gitmodules +++ b/.gitmodules @@ -34,3 +34,7 @@ path = tests/cases/user/axios-src/axios-src url = https://github.com/axios/axios.git ignore = all +[submodule "tests/cases/user/prettier/prettier"] + path = tests/cases/user/prettier/prettier + url = https://github.com/prettier/prettier.git + ignore = all diff --git a/package-lock.json b/package-lock.json index 2e1c6f6207e..265d4233ad8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "@types/browserify": { "version": "12.0.33", "resolved": "https://registry.npmjs.org/@types/browserify/-/browserify-12.0.33.tgz", - "integrity": "sha1-5hlxwPmFvx93CQSDJkk/ELDdeL0=", + "integrity": "sha512-mY6dYfq1Ns3Xqz/JFUcyoWaXtm0XDoNhkU1vCwM/ULM5zqNL+SbtacJhce/JCgPeCdbqdVqq77tJ4HwdtypSxg==", "dev": true, "requires": { "@types/insert-module-globals": "7.0.0", @@ -46,21 +46,21 @@ } }, "@types/chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.2.tgz", - "integrity": "sha512-D8uQwKYUw2KESkorZ27ykzXgvkDJYXVEihGklgfp5I4HUP8D6IxtcdLTMB1emjQiWzV7WZ5ihm1cxIzVwjoleQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.3.tgz", + "integrity": "sha512-f5dXGzOJycyzSMdaXVhiBhauL4dYydXwVpavfQ1mVCaGjR56a9QfklXObUxlIY9bGTmCPHEEZ04I16BZ/8w5ww==", "dev": true }, "@types/convert-source-map": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-1NGA3WrcXLaK2ZvVbgPWN4gfRhY=", + "integrity": "sha512-laiDIXqqthjJlyAMYAXOtN3N8+UlbM+KvZi4BaY5ZOekmVkBs/UxfK5O0HWeJVG2eW8F+Mu2ww13fTX+kY1FlQ==", "dev": true }, "@types/del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/del/-/del-3.0.0.tgz", - "integrity": "sha1-HIzYtuONo7VyNSyo6vVSeTFCYog=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/del/-/del-3.0.1.tgz", + "integrity": "sha512-y6qRq6raBuu965clKgx6FHuiPu3oHdtmzMPXi8Uahsjdq1L6DL5fS/aY5/s71YwM7k6K1QIWvem5vNwlnNGIkQ==", "dev": true, "requires": { "@types/glob": "5.0.35" @@ -86,7 +86,7 @@ "@types/gulp": { "version": "3.8.36", "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-3.8.36.tgz", - "integrity": "sha1-Eer1g78FNGabT/qb/tUVV/qgCkw=", + "integrity": "sha512-u6/zWPzYRNPAtvyFJ3/RSXjmBaBM1dVs5kW22/jU6J786ZGLfSndhLoNOpFI6FGQvqTA+QzFHjSMhpkAN+wxcQ==", "dev": true, "requires": { "@types/node": "8.5.5", @@ -97,7 +97,7 @@ "@types/gulp-concat": { "version": "0.0.32", "resolved": "https://registry.npmjs.org/@types/gulp-concat/-/gulp-concat-0.0.32.tgz", - "integrity": "sha1-ckhgKLHPX6qUyMHPNMYmUxzsrNY=", + "integrity": "sha512-CUCFADlITzzBfBa2bdGzhKtvBr4eFh+evb+4igVbvPoO5RyPfHifmyQlZl6lM7q19+OKncRlFXDU7B4X9Ayo2g==", "dev": true, "requires": { "@types/node": "8.5.5" @@ -106,7 +106,7 @@ "@types/gulp-help": { "version": "0.0.34", "resolved": "https://registry.npmjs.org/@types/gulp-help/-/gulp-help-0.0.34.tgz", - "integrity": "sha1-Dm1mcYySiWZPLtdaIaDmXXqIM+w=", + "integrity": "sha512-MkW7psZznxxJg2MBk2P2qHE+T8jEZVFz3FG/qGjUYazkyJt7hBJWx5Nuewmay5RVNtUvSWPrdZLr/WTXY3T/6A==", "dev": true, "requires": { "@types/gulp": "3.8.36", @@ -117,7 +117,7 @@ "@types/gulp-newer": { "version": "0.0.31", "resolved": "https://registry.npmjs.org/@types/gulp-newer/-/gulp-newer-0.0.31.tgz", - "integrity": "sha1-818j0eT+DXuP9pnknRwhdmy546c=", + "integrity": "sha512-e7J/Zv5Wd7CC0WpuA2syWVitgwrkG0u221e41w7r07XUR6hMH6kHPkq9tUrusHkbeW8QbuLbis5fODOwQCyggQ==", "dev": true, "requires": { "@types/node": "8.5.5" @@ -126,7 +126,7 @@ "@types/gulp-sourcemaps": { "version": "0.0.32", "resolved": "https://registry.npmjs.org/@types/gulp-sourcemaps/-/gulp-sourcemaps-0.0.32.tgz", - "integrity": "sha1-557mF+DLFXKYdL5FM/5ZwHeToXU=", + "integrity": "sha512-+7BAmptW2bxyJnJcCEuie7vLoop3FwWgCdBMzyv7MYXED/HeNMeQuX7uPCkp4vfU1TTu4CYFH0IckNPvo0VePA==", "dev": true, "requires": { "@types/node": "8.5.5" @@ -135,7 +135,7 @@ "@types/insert-module-globals": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@types/insert-module-globals/-/insert-module-globals-7.0.0.tgz", - "integrity": "sha1-jRWN5KY4To2qE7PWPuurbV9nd30=", + "integrity": "sha512-zudCJPwluh1VUDB6Gl/OQdRp+fYy3+47huJB/JMQubMS2p+sH18MCVK4WUz3FqaWLB12yh5ELxVR/+tqwlm/qA==", "dev": true, "requires": { "@types/node": "8.5.5" @@ -144,7 +144,7 @@ "@types/merge2": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@types/merge2/-/merge2-1.1.4.tgz", - "integrity": "sha1-CmUOHMIVove4BALqtraiNuYC96M=", + "integrity": "sha512-GjaXY4OultxbaOOk7lCLO7xvEcFpdjExC605YmfI6X29vhHKpJfMWKCDZd3x+BITrZaXKg97DgV/SdGVSwdzxA==", "dev": true, "requires": { "@types/node": "8.5.5" @@ -165,28 +165,28 @@ "@types/mkdirp": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.5.2.tgz", - "integrity": "sha1-UDqs/lzCcD1UhDJrGyfvpnoznB8=", + "integrity": "sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==", "dev": true, "requires": { "@types/node": "8.5.5" } }, "@types/mocha": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.0.0.tgz", - "integrity": "sha512-ZS0vBV7Jn5Z/Q4T3VXauEKMDCV8nWOtJJg90OsDylkYJiQwcWtKuLzohWzrthBkerUF7DLMmJcwOPEP0i/AOXw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-YeDiSEzznwZwwp766SJ6QlrTyBYUGPSIwmREHVTmktUYiT/WADdWtpt9iH0KuUSf8lZLdI4lP0X6PBzPo5//JQ==", "dev": true }, "@types/node": { "version": "8.5.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.5.tgz", - "integrity": "sha1-b56BZK4aVam+sdJXHPt6z51yDGE=", + "integrity": "sha512-JRnfoh0Ll4ElmIXKxbUfcOodkGvcNHljct6mO1X9hE/mlrMzAx0hYCLAD7sgT53YAY1HdlpzUcV0CkmDqUqTuA==", "dev": true }, "@types/orchestrator": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@types/orchestrator/-/orchestrator-0.3.2.tgz", - "integrity": "sha1-zRXGzql4oyuY5QVCOcvMeOVWcfE=", + "integrity": "sha512-cKB4yTX0wGaRCSkdHDX2fkGQbMAA8UOshC2U7DQky1CE5o+5q2iQQ8VkbPbE/88uaTtsusvBPMcCX7dgmjxBhQ==", "dev": true, "requires": { "@types/node": "8.5.5", @@ -202,7 +202,7 @@ "@types/run-sequence": { "version": "0.0.30", "resolved": "https://registry.npmjs.org/@types/run-sequence/-/run-sequence-0.0.30.tgz", - "integrity": "sha1-s6kMn9KaXu3lgTXdAl6zrEu7Vg4=", + "integrity": "sha512-XwGr1b4yCGUILKeBkzmeWcxmGHQ0vFFFpA6D6y1yLO6gKmYorF+PHqdU5KG+nWt38OvtrkDptmrSmlHX/XtpLw==", "dev": true, "requires": { "@types/gulp": "3.8.36", @@ -218,10 +218,16 @@ "@types/node": "8.5.5" } }, + "@types/travis-fold": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@types/travis-fold/-/travis-fold-0.1.0.tgz", + "integrity": "sha512-qrXB0Div8vIzA8P809JRlh9lD4mSOYwRBJbU1zcj0BWhULP15Zx0oQyJtjaOnkNR5RZcYQDbgimj40M1GDmhcQ==", + "dev": true + }, "@types/vinyl": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.2.tgz", - "integrity": "sha1-TzuNro9YKNOADvcJsM/0iO6FLeM=", + "integrity": "sha512-2iYpNuOl98SrLPBZfEN9Mh2JCJ2EI9HU35SfgBEb51DcmaHkhp8cKMblYeBqMQiwXMgAD3W60DbQ4i/UdLiXhw==", "dev": true, "requires": { "@types/node": "8.5.5" @@ -230,7 +236,7 @@ "@types/xml2js": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.2.tgz", - "integrity": "sha1-pLhLOHn/1HEJU/2Syr/emopOhFY=", + "integrity": "sha512-8aKUBSj3oGcnuiBmDLm3BIk09RYg01mz9HlQ2u4aS17oJ25DxjQrEUVGFSBVNOfM45pQW4OjcBPplq6r/exJdA==", "dev": true, "requires": { "@types/node": "8.5.5" @@ -377,9 +383,9 @@ "dev": true }, "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "1.0.3" @@ -394,7 +400,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, "arr-union": { @@ -436,7 +442,7 @@ "array-slice": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha1-42jqFfibxwaff/uJrsOmx9SsItQ=", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true }, "array-union": { @@ -460,12 +466,6 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, "asn1.js": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", @@ -474,7 +474,7 @@ "requires": { "bn.js": "4.11.8", "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "minimalistic-assert": "1.0.1" } }, "assert": { @@ -514,9 +514,9 @@ "dev": true }, "atob": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", - "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.0.tgz", + "integrity": "sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw==", "dev": true }, "babel-code-frame": { @@ -566,22 +566,62 @@ "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { "cache-base": "1.0.1", - "class-utils": "0.3.5", + "class-utils": "0.3.6", "component-emitter": "1.2.1", "define-property": "1.0.0", "isobject": "3.0.1", - "mixin-deep": "1.3.0", + "mixin-deep": "1.3.1", "pascalcase": "0.1.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.2" + } + }, + "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.2" + } + }, + "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.2" + } + }, + "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" + } + } } }, "base64-js": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.3.tgz", - "integrity": "sha512-MsAhsUW1GxCdgYSO6tAfZrNapmUKk7mWx/k5mFY/A1gBtkaCaNapTg+FExCw1r9yeaZhqx/xPg43xgTFH6KL5w==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", "dev": true }, "beeper": { @@ -597,9 +637,9 @@ "dev": true }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "1.0.0", @@ -607,22 +647,32 @@ } }, "braces": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.0.tgz", - "integrity": "sha1-pGlBy1+0khVrPWplbgbDU2Tj5m4=", + "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", - "define-property": "1.0.0", "extend-shallow": "2.0.1", "fill-range": "4.0.0", "isobject": "3.0.1", "repeat-element": "1.1.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "snapdragon-node": "2.1.1", "split-string": "3.1.0", - "to-regex": "3.0.1" + "to-regex": "3.0.2" + }, + "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.1" + } + } } }, "brorand": { @@ -640,7 +690,7 @@ "JSONStream": "1.3.2", "combine-source-map": "0.8.0", "defined": "1.0.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "through2": "2.0.3", "umd": "3.0.3" } @@ -661,9 +711,9 @@ "dev": true }, "browserify": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.1.1.tgz", - "integrity": "sha512-iSH21jK0+IApV8YHOfmGt1qsGd74oflQ1Ko/28JOkWLFNBngAQfKb6WYIJ9CufH8vycqKX1sYU3y7ZrVhwevAg==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.0.tgz", + "integrity": "sha512-yotdAkp/ZbgDesHQBYU37zjc29JDH4iXT8hjzM1fdUVWogjARX0S1cKeX24Ci6zZ+jG+ADmCTRt6xvtmJnI+BQ==", "dev": true, "requires": { "JSONStream": "1.3.2", @@ -698,13 +748,13 @@ "punycode": "1.4.1", "querystring-es3": "0.2.1", "read-only-stream": "2.0.0", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "resolve": "1.1.7", "shasum": "1.0.2", "shell-quote": "1.6.1", "stream-browserify": "2.0.1", "stream-http": "2.8.1", - "string_decoder": "1.0.3", + "string_decoder": "1.1.1", "subarg": "1.0.0", "syntax-error": "1.4.0", "through2": "2.0.3", @@ -712,7 +762,7 @@ "tty-browserify": "0.0.1", "url": "0.11.0", "util": "0.10.3", - "vm-browserify": "0.0.4", + "vm-browserify": "1.0.1", "xtend": "4.0.1" } }, @@ -724,27 +774,27 @@ "requires": { "buffer-xor": "1.0.3", "cipher-base": "1.0.4", - "create-hash": "1.1.3", + "create-hash": "1.2.0", "evp_bytestokey": "1.0.3", "inherits": "2.0.3", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "browserify-cipher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", - "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { "browserify-aes": "1.2.0", - "browserify-des": "1.0.0", + "browserify-des": "1.0.1", "evp_bytestokey": "1.0.3" } }, "browserify-des": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", - "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", "dev": true, "requires": { "cipher-base": "1.0.4", @@ -770,11 +820,11 @@ "requires": { "bn.js": "4.11.8", "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", "elliptic": "6.4.0", "inherits": "2.0.3", - "parse-asn1": "5.1.0" + "parse-asn1": "5.1.1" } }, "browserify-zlib": { @@ -792,7 +842,7 @@ "integrity": "sha512-YkIRgwsZwJWTnyQrsBTWefizHh+8GYj3kbL1BTiAQ/9pwpino0G7B2gp5tx/FUBqUlvtxV85KNR3mwfAtv15Yw==", "dev": true, "requires": { - "base64-js": "1.2.3", + "base64-js": "1.3.0", "ieee754": "1.1.11" } }, @@ -835,7 +885,7 @@ "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { "collection-visit": "1.0.0", @@ -871,15 +921,6 @@ "requires": { "align-text": "0.1.4", "lazy-cache": "1.0.4" - }, - "dependencies": { - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true - } } }, "chai": { @@ -893,18 +934,18 @@ "deep-eql": "3.0.1", "get-func-name": "2.0.0", "pathval": "1.1.0", - "type-detect": "4.0.5" + "type-detect": "4.0.8" } }, "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", "dev": true, "requires": { "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" + "supports-color": "5.4.0" } }, "check-error": { @@ -920,19 +961,18 @@ "dev": true, "requires": { "inherits": "2.0.3", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "class-utils": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.5.tgz", - "integrity": "sha1-F+eTEDdQ+WJ7IXbqNM/RtWWQPIA=", + "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", "isobject": "3.0.1", - "lazy-cache": "2.0.2", "static-extend": "0.1.2" }, "dependencies": { @@ -944,63 +984,6 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "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.2.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.6" - } - } - } - }, - "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.2.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.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true } } }, @@ -1026,9 +1009,9 @@ } }, "clone": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", - "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", "dev": true }, "clone-buffer": { @@ -1044,14 +1027,14 @@ "dev": true }, "cloneable-readable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz", - "integrity": "sha1-pikNQT8hemEjL5XkWP84QYz7ARc=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", + "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", "dev": true, "requires": { "inherits": "2.0.3", - "process-nextick-args": "1.0.7", - "through2": "2.0.3" + "process-nextick-args": "2.0.0", + "readable-stream": "2.3.6" } }, "collection-visit": { @@ -1082,7 +1065,7 @@ "color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha1-k4NDeaHMmgxh+C9S8NBDIiUb1aI=", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true }, "combine-source-map": { @@ -1131,17 +1114,25 @@ "requires": { "buffer-from": "1.0.0", "inherits": "2.0.3", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "typedarray": "0.0.6" } }, "concat-with-sourcemaps": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz", - "integrity": "sha1-9Vs74q60dgGxCi1SWcz7cP0vHdY=", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.5.tgz", + "integrity": "sha512-YtnS0VEY+e2Khzsey/6mra9EoM6h/5gxaC0e3mcHpA5yfDxafhygytNmcJWodvUgyXzSiL5MSkPO6bQGgfliHw==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "console-browserify": { @@ -1178,9 +1169,9 @@ "dev": true }, "create-ecdh": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", - "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.1.tgz", + "integrity": "sha512-iZvCCg8XqHQZ1ioNBTzXS/cQSkqkqcPs8xSX4upNB+DAk9Ht3uzQf2J32uAHNCne8LDmKr29AgZrEs4oIrwLuQ==", "dev": true, "requires": { "bn.js": "4.11.8", @@ -1188,28 +1179,29 @@ } }, "create-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", - "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { "cipher-base": "1.0.4", "inherits": "2.0.3", - "ripemd160": "2.0.1", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", "sha.js": "2.4.11" } }, "create-hmac": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", - "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { "cipher-base": "1.0.4", - "create-hash": "1.1.3", + "create-hash": "1.2.0", "inherits": "2.0.3", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", "sha.js": "2.4.11" } }, @@ -1219,15 +1211,15 @@ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "browserify-cipher": "1.0.0", + "browserify-cipher": "1.0.1", "browserify-sign": "4.0.4", - "create-ecdh": "4.0.0", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "diffie-hellman": "5.0.2", + "create-ecdh": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", "inherits": "2.0.3", - "pbkdf2": "3.0.14", - "public-encrypt": "4.0.0", + "pbkdf2": "3.0.16", + "public-encrypt": "4.0.2", "randombytes": "2.0.6", "randomfill": "1.0.4" } @@ -1303,7 +1295,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -1347,10 +1339,10 @@ "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha1-38lARACtHI/gI+faHfHBR8S0RN8=", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { - "type-detect": "4.0.5" + "type-detect": "4.0.8" } }, "deep-is": { @@ -1365,7 +1357,7 @@ "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", "dev": true, "requires": { - "clone": "1.0.3" + "clone": "1.0.4" } }, "define-properties": { @@ -1379,12 +1371,44 @@ } }, "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "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" + "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.2" + } + }, + "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.2" + } + }, + "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" + } + } } }, "defined": { @@ -1401,7 +1425,7 @@ "requires": { "globby": "6.1.0", "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", "p-map": "1.2.0", "pify": "3.0.0", "rimraf": "2.6.2" @@ -1432,7 +1456,7 @@ "dev": true, "requires": { "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "minimalistic-assert": "1.0.1" } }, "detect-file": { @@ -1465,9 +1489,9 @@ "dev": true }, "diffie-hellman": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", - "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { "bn.js": "4.11.8", @@ -1487,7 +1511,7 @@ "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", "dev": true, "requires": { - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "duplexify": { @@ -1498,7 +1522,7 @@ "requires": { "end-of-stream": "1.4.1", "inherits": "2.0.3", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "stream-shift": "1.0.0" }, "dependencies": { @@ -1524,7 +1548,7 @@ "hash.js": "1.1.3", "hmac-drbg": "1.0.1", "inherits": "2.0.3", - "minimalistic-assert": "1.0.0", + "minimalistic-assert": "1.0.1", "minimalistic-crypto-utils": "1.0.1" } }, @@ -1670,7 +1694,7 @@ "dev": true, "requires": { "md5.js": "1.3.4", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "expand-brackets": { @@ -1683,9 +1707,9 @@ "define-property": "0.2.5", "extend-shallow": "2.0.1", "posix-character-classes": "0.1.1", - "regex-not": "1.0.0", - "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -1697,62 +1721,14 @@ "is-descriptor": "0.1.6" } }, - "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=", + "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": { - "kind-of": "3.2.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.6" - } - } + "is-extendable": "0.1.1" } - }, - "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.2.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.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true } } }, @@ -1772,18 +1748,30 @@ "dev": true }, "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "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.3", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.3.tgz", - "integrity": "sha1-VeAZ0Mlb+HOUnHN7flFy26hOuyk=", + "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", @@ -1791,9 +1779,58 @@ "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" + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "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.2" + } + }, + "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.1" + } + }, + "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.2" + } + }, + "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.2" + } + }, + "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" + } + } } }, "fancy-log": { @@ -1841,6 +1878,17 @@ "is-number": "3.0.0", "repeat-string": "1.6.1", "to-regex-range": "2.1.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.1" + } + } } }, "find-index": { @@ -1857,7 +1905,7 @@ "requires": { "detect-file": "1.0.0", "is-glob": "3.1.0", - "micromatch": "3.1.5", + "micromatch": "3.1.10", "resolve-dir": "1.0.1" } }, @@ -1893,7 +1941,7 @@ "dev": true, "requires": { "inherits": "2.0.3", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "for-in": { @@ -1980,7 +2028,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -2039,7 +2087,7 @@ "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "1.1.11" } }, "readable-stream": { @@ -2093,11 +2141,11 @@ "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { "global-prefix": "1.0.2", - "is-windows": "1.0.1", + "is-windows": "1.0.2", "resolve-dir": "1.0.1" } }, @@ -2110,7 +2158,7 @@ "expand-tilde": "2.0.2", "homedir-polyfill": "1.0.1", "ini": "1.3.5", - "is-windows": "1.0.1", + "is-windows": "1.0.2", "which": "1.3.0" } }, @@ -2182,9 +2230,9 @@ } }, "glogg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", - "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", + "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", "dev": true, "requires": { "sparkles": "1.0.0" @@ -2196,7 +2244,7 @@ "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", "dev": true, "requires": { - "natives": "1.1.1" + "natives": "1.1.3" } }, "growl": { @@ -2269,7 +2317,7 @@ "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=", "dev": true, "requires": { - "concat-with-sourcemaps": "1.0.4", + "concat-with-sourcemaps": "1.0.5", "through2": "2.0.3", "vinyl": "2.1.0" } @@ -2429,7 +2477,7 @@ "is-negated-glob": "1.0.0", "ordered-read-streams": "1.0.1", "pumpify": "1.4.0", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "remove-trailing-separator": "1.1.0", "to-absolute-glob": "2.0.2", "unique-stream": "2.2.1" @@ -2456,7 +2504,7 @@ "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", "dev": true, "requires": { - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "source-map": { @@ -2489,7 +2537,7 @@ "lead": "1.0.0", "object.assign": "4.1.0", "pumpify": "1.4.0", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "remove-bom-buffer": "3.0.0", "remove-bom-stream": "1.2.0", "resolve-options": "1.1.0", @@ -2565,7 +2613,7 @@ "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", "dev": true, "requires": { - "clone": "1.0.3", + "clone": "1.0.4", "clone-stats": "0.0.1", "replace-ext": "0.0.1" } @@ -2578,7 +2626,7 @@ "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", "dev": true, "requires": { - "glogg": "1.0.0" + "glogg": "1.0.1" } }, "handlebars": { @@ -2682,12 +2730,13 @@ } }, "hash-base": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", - "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "dev": true, "requires": { - "inherits": "2.0.3" + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "hash.js": { @@ -2697,7 +2746,7 @@ "dev": true, "requires": { "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "minimalistic-assert": "1.0.1" } }, "he": { @@ -2713,7 +2762,7 @@ "dev": true, "requires": { "hash.js": "1.1.3", - "minimalistic-assert": "1.0.0", + "minimalistic-assert": "1.0.1", "minimalistic-crypto-utils": "1.0.1" } }, @@ -2744,12 +2793,6 @@ "integrity": "sha512-VhDzCKN7K8ufStx/CLj5/PDTMgph+qwN5Pkd5i0sGnVwk56zJ0lkT8Qzi1xqWLS0Wp29DgDtNeS7v8/wMoZeHg==", "dev": true }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2769,7 +2812,7 @@ "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, "inline-source-map": { @@ -2807,46 +2850,76 @@ "is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha1-OV4a6EsR8mrReV5zwXN45IowFXY=", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, "requires": { "is-relative": "1.0.0", - "is-windows": "1.0.1" + "is-windows": "1.0.2" } }, "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "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": "6.0.2" + "kind-of": "3.2.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.6" + } + } } }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "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": "6.0.2" + "kind-of": "3.2.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.6" + } + } } }, "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "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": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "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 + } } }, "is-extendable": { @@ -2897,12 +2970,20 @@ } }, "is-odd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-1.0.0.tgz", - "integrity": "sha1-O4qTLrAos3dcObsJ6RdnrM22kIg=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "dev": true, "requires": { - "is-number": "3.0.0" + "is-number": "4.0.0" + }, + "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 + } } }, "is-path-cwd": { @@ -2912,9 +2993,9 @@ "dev": true }, "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { "is-path-inside": "1.0.1" @@ -2932,7 +3013,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "3.0.1" @@ -2947,7 +3028,7 @@ "is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha1-obtpNc6MXboei5dUubLcwCDiJg0=", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, "requires": { "is-unc-path": "1.0.0" @@ -2956,7 +3037,7 @@ "is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha1-1zHoiY7QkKEsNSrS6u1Qla0yLJ0=", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, "requires": { "unc-path-regex": "0.1.2" @@ -2975,9 +3056,9 @@ "dev": true }, "is-windows": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.1.tgz", - "integrity": "sha1-MQ23D3QtJZoWo2kgK1GvhCMzENk=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, "isarray": { @@ -3010,7 +3091,7 @@ "esprima": "2.7.3", "glob": "5.0.15", "handlebars": "4.0.11", - "js-yaml": "3.10.0", + "js-yaml": "3.11.0", "mkdirp": "0.5.1", "nopt": "3.0.6", "once": "1.4.0", @@ -3051,9 +3132,9 @@ } }, "jake": { - "version": "8.0.15", - "resolved": "https://registry.npmjs.org/jake/-/jake-8.0.15.tgz", - "integrity": "sha1-8Np9WOeQrBqPhubuDxk+XZIw6rs=", + "version": "8.0.16", + "resolved": "https://registry.npmjs.org/jake/-/jake-8.0.16.tgz", + "integrity": "sha512-qUTOVCKFkiz3tHgV1WMy7HTxDZgo+sO4X9GxFLAU+Mks4WsDGe9+ONHK6tPsSp8I3x6sPl0TwGbXHwTOhTyzog==", "dev": true, "requires": { "async": "0.9.2", @@ -3101,19 +3182,19 @@ "dev": true }, "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha1-LnhEFka9RoLpY/IrbpKCPDCcYtw=", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", "dev": true, "requires": { - "argparse": "1.0.9", + "argparse": "1.0.10", "esprima": "4.0.0" }, "dependencies": { "esprima": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha1-RJnt3NERDgshi6zy+n9/WfVcqAQ=", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", "dev": true } } @@ -3148,7 +3229,7 @@ "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, "labeled-stream-splicer": { @@ -3171,13 +3252,11 @@ } }, "lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", "dev": true, - "requires": { - "set-getter": "0.1.0" - } + "optional": true }, "lazystream": { "version": "1.0.0", @@ -3185,7 +3264,7 @@ "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", "dev": true, "requires": { - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "lead": { @@ -3384,30 +3463,13 @@ "es5-ext": "0.10.42" } }, - "make-error": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", - "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", - "dev": true - }, "make-iterator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.0.tgz", - "integrity": "sha1-V7713IXSOSO6I3ZzJNjo+PPZaUs=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", "dev": true, "requires": { - "kind-of": "3.2.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.6" - } - } + "kind-of": "6.0.2" } }, "map-cache": { @@ -3433,18 +3495,6 @@ "requires": { "hash-base": "3.0.4", "inherits": "2.0.3" - }, - "dependencies": { - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" - } - } } }, "memoizee": { @@ -3470,24 +3520,24 @@ "dev": true }, "micromatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.5.tgz", - "integrity": "sha512-ykttrLPQrz1PUJcXjwsTUjGoPJ64StIGNE2lGVD1c9CuguJ+L7/navsE8IcDNndOoCMvYV0qc/exfVbMHkUhvA==", + "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.0", - "define-property": "1.0.0", - "extend-shallow": "2.0.1", - "extglob": "2.0.3", + "braces": "2.3.2", + "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.7", + "nanomatch": "1.2.9", "object.pick": "1.3.0", - "regex-not": "1.0.0", - "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "miller-rabin": { @@ -3501,9 +3551,9 @@ } }, "minimalistic-assert": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "dev": true }, "minimalistic-crypto-utils": { @@ -3515,10 +3565,10 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -3528,9 +3578,9 @@ "dev": true }, "mixin-deep": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.0.tgz", - "integrity": "sha1-R6hzK6l3mUV8jB7KKPlRMtfoFQo=", + "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", @@ -3540,7 +3590,7 @@ "is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { "is-plain-object": "2.0.4" @@ -3566,9 +3616,9 @@ } }, "mocha": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.5.tgz", - "integrity": "sha512-3MM3UjZ5p8EJrYpG7s+29HAI9G7sTzKEe4+w37Dg0QP7qL4XGsV+Q2xet2cE37AqdgN1OtYQB6Vl98YiPV3PgA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.1.1.tgz", + "integrity": "sha512-kKKs/H1KrMMQIEsWNxGmb4/BGsmj0dkeyotEvbrAuQ01FcWRLssUNXCEUZk6SZtyJBi6EE7SL0zDDtItw1rGhw==", "dev": true, "requires": { "browser-stdout": "1.3.1", @@ -3579,6 +3629,7 @@ "glob": "7.1.2", "growl": "1.10.3", "he": "1.1.1", + "minimatch": "3.0.4", "mkdirp": "0.5.1", "supports-color": "4.4.0" }, @@ -3630,8 +3681,8 @@ "duplexer2": "0.1.4", "inherits": "2.0.3", "parents": "1.0.1", - "readable-stream": "2.3.3", - "resolve": "1.6.0", + "readable-stream": "2.3.6", + "resolve": "1.7.1", "stream-combiner2": "1.1.1", "subarg": "1.0.0", "through2": "2.0.3", @@ -3639,9 +3690,9 @@ }, "dependencies": { "resolve": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz", - "integrity": "sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { "path-parse": "1.0.5" @@ -3700,36 +3751,29 @@ } }, "nanomatch": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.7.tgz", - "integrity": "sha512-/5ldsnyurvEw7wNpxLFgjVvBLMta43niEYOy0CJ4ntcYSbx6bugRUTQeFb4BR/WanEL1o3aQgHuVLHQaB6tOqg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "dev": true, "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", - "define-property": "1.0.0", - "extend-shallow": "2.0.1", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", "fragment-cache": "0.2.1", - "is-odd": "1.0.0", - "kind-of": "5.1.0", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", "object.pick": "1.3.0", - "regex-not": "1.0.0", - "snapdragon": "0.8.1", - "to-regex": "3.0.1" - }, - "dependencies": { - "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 - } + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "natives": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.1.tgz", - "integrity": "sha1-ARrM4ffL2H97prMJPWzZOSvhxXQ=", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.3.tgz", + "integrity": "sha512-BZGSYV4YOLxzoTK73l0/s/0sH9l8SHs2ocReMH1f8JYSh5FUWu4ZrKCpJdRkWXV6HFR/pZDz7bwWOVAY07q77g==", "dev": true }, "next-tick": { @@ -3791,43 +3835,6 @@ "is-descriptor": "0.1.6" } }, - "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.2.2" - } - }, - "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.2.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true - } - } - }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -3885,7 +3892,7 @@ "dev": true, "requires": { "for-own": "1.0.0", - "make-iterator": "1.0.0" + "make-iterator": "1.0.1" } }, "object.pick": { @@ -3952,7 +3959,7 @@ "requires": { "end-of-stream": "0.1.5", "sequencify": "0.0.7", - "stream-consume": "0.1.0" + "stream-consume": "0.1.1" } }, "ordered-read-streams": { @@ -3976,7 +3983,7 @@ "p-map": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha1-5OlPMR6rvIYzoeeZCBZfyiYkG2s=", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", "dev": true }, "pako": { @@ -3995,16 +4002,16 @@ } }, "parse-asn1": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", - "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "dev": true, "requires": { "asn1.js": "4.10.1", "browserify-aes": "1.2.0", - "create-hash": "1.1.3", + "create-hash": "1.2.0", "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.14" + "pbkdf2": "3.0.16" } }, "parse-filepath": { @@ -4088,15 +4095,15 @@ "dev": true }, "pbkdf2": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", - "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", "dev": true, "requires": { - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", "sha.js": "2.4.11" } }, @@ -4198,21 +4205,21 @@ "dev": true }, "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, "public-encrypt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", "dev": true, "requires": { "bn.js": "4.11.8", "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "parse-asn1": "5.1.0", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", "randombytes": "2.0.6" } }, @@ -4278,7 +4285,7 @@ "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "randomfill": { @@ -4288,7 +4295,7 @@ "dev": true, "requires": { "randombytes": "2.0.6", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "read-only-stream": { @@ -4297,21 +4304,21 @@ "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", "dev": true, "requires": { - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } }, @@ -4325,12 +4332,13 @@ } }, "regex-not": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.0.tgz", - "integrity": "sha1-Qvg+OXcWIt+CawKvF2Ul1qXxV/k=", + "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": "2.0.1" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, "remove-bom-buffer": { @@ -4350,7 +4358,7 @@ "dev": true, "requires": { "remove-bom-buffer": "3.0.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "through2": "2.0.3" } }, @@ -4409,6 +4417,12 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, + "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 + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -4422,26 +4436,26 @@ "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { "glob": "7.1.2" } }, "ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { - "hash-base": "2.0.2", + "hash-base": "3.0.4", "inherits": "2.0.3" } }, "run-sequence": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/run-sequence/-/run-sequence-2.2.1.tgz", - "integrity": "sha1-HOZD2jb9jH6n4akynaM/wriJhJU=", + "integrity": "sha512-qkzZnQWMZjcKbh3CNly2srtrkaO/2H/SI5f2eliMCapdRD3UhMrwjfOAZJAnZ2H8Ju4aBzFZkBGXUqFs9V0yxw==", "dev": true, "requires": { "chalk": "1.1.3", @@ -4477,11 +4491,20 @@ } }, "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=", + "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 }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "0.1.15" + } + }, "sander": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", @@ -4505,7 +4528,7 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true }, "semver": { @@ -4520,25 +4543,27 @@ "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", "dev": true }, - "set-getter": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", - "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", - "dev": true, - "requires": { - "to-object-path": "0.3.0" - } - }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { "extend-shallow": "2.0.1", "is-extendable": "0.1.1", "is-plain-object": "2.0.4", "split-string": "3.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.1" + } + } } }, "sha.js": { @@ -4548,7 +4573,7 @@ "dev": true, "requires": { "inherits": "2.0.3", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "shasum": { @@ -4580,9 +4605,9 @@ "dev": true }, "snapdragon": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.1.tgz", - "integrity": "sha1-4StUh/re0+PeoKyR6UAL91tAE3A=", + "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.2", @@ -4592,7 +4617,7 @@ "map-cache": "0.2.2", "source-map": "0.5.7", "source-map-resolve": "0.5.1", - "use": "2.0.2" + "use": "3.1.0" }, "dependencies": { "define-property": { @@ -4604,80 +4629,72 @@ "is-descriptor": "0.1.6" } }, - "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=", + "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": { - "kind-of": "3.2.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.6" - } - } + "is-extendable": "0.1.1" } - }, - "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.2.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.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true } } }, "snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { "define-property": "1.0.0", "isobject": "3.0.1", "snapdragon-util": "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.2" + } + }, + "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.2" + } + }, + "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.2" + } + }, + "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" + } + } } }, "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { "kind-of": "3.2.2" @@ -4703,7 +4720,7 @@ "buffer-crc32": "0.2.13", "minimist": "1.2.0", "sander": "0.5.1", - "sourcemap-codec": "1.3.1" + "sourcemap-codec": "1.4.1" } }, "source-map": { @@ -4715,10 +4732,10 @@ "source-map-resolve": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", - "integrity": "sha1-etD1k/IoFZjoVN+A8ZquS5LXoRo=", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "dev": true, "requires": { - "atob": "2.0.3", + "atob": "2.1.0", "decode-uri-component": "0.2.0", "resolve-url": "0.2.1", "source-map-url": "0.4.0", @@ -4726,11 +4743,12 @@ } }, "source-map-support": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.4.tgz", - "integrity": "sha512-PETSPG6BjY1AHs2t64vS2aqAgu6dMIMXJULWFBGbh2Gr8nVLbCFDo6i/RMMvviIQ2h1Z8+5gQhVKSn2je9nmdg==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", + "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", "dev": true, "requires": { + "buffer-from": "1.0.0", "source-map": "0.6.1" }, "dependencies": { @@ -4749,13 +4767,10 @@ "dev": true }, "sourcemap-codec": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.3.1.tgz", - "integrity": "sha1-mtb5vb1pGTEBbjCTnbyGhnMyMUY=", - "dev": true, - "requires": { - "vlq": "0.2.3" - } + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz", + "integrity": "sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA==", + "dev": true }, "sparkles": { "version": "1.0.0", @@ -4766,31 +4781,10 @@ "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { "extend-shallow": "3.0.2" - }, - "dependencies": { - "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" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", - "dev": true, - "requires": { - "is-plain-object": "2.0.4" - } - } } }, "sprintf-js": { @@ -4817,63 +4811,6 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "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.2.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.6" - } - } - } - }, - "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.2.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.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true } } }, @@ -4884,7 +4821,7 @@ "dev": true, "requires": { "inherits": "2.0.3", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "stream-combiner2": { @@ -4894,13 +4831,13 @@ "dev": true, "requires": { "duplexer2": "0.1.4", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "stream-consume": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", - "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", "dev": true }, "stream-http": { @@ -4911,7 +4848,7 @@ "requires": { "builtin-status-codes": "3.0.0", "inherits": "2.0.3", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "to-arraybuffer": "1.0.1", "xtend": "4.0.1" } @@ -4929,7 +4866,7 @@ "dev": true, "requires": { "inherits": "2.0.3", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "streamqueue": { @@ -4968,12 +4905,12 @@ } }, "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "strip-ansi": { @@ -5011,9 +4948,9 @@ } }, "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "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" @@ -5040,7 +4977,7 @@ "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "xtend": "4.0.1" } }, @@ -5125,82 +5062,15 @@ } }, "to-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.1.tgz", - "integrity": "sha1-FTWL7kosg712N3uh3ASdDxiDeq4=", + "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": "0.2.5", - "extend-shallow": "2.0.1", - "regex-not": "1.0.0" - }, - "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.6" - } - }, - "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.2.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.6" - } - } - } - }, - "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.2.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.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true - } + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -5228,22 +5098,6 @@ "integrity": "sha1-/sAF+dyqJZo/lFnOWmkGq6TFRdo=", "dev": true }, - "ts-node": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.1.tgz", - "integrity": "sha512-XK7QmDcNHVmZkVtkiwNDWiERRHPyU8nBqZB1+iv2UhOG0q3RQ9HsZ2CMqISlFbxjrYFGfG2mX7bW4dAyxBVzUw==", - "dev": true, - "requires": { - "arrify": "1.0.1", - "chalk": "2.3.2", - "diff": "3.5.0", - "make-error": "1.3.4", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map-support": "0.5.4", - "yn": "2.0.0" - } - }, "tslib": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", @@ -5258,13 +5112,13 @@ "requires": { "babel-code-frame": "6.26.0", "builtin-modules": "1.1.1", - "chalk": "2.3.2", + "chalk": "2.4.0", "commander": "2.15.1", "diff": "3.5.0", "glob": "7.1.2", - "js-yaml": "3.10.0", + "js-yaml": "3.11.0", "minimatch": "3.0.4", - "resolve": "1.6.0", + "resolve": "1.7.1", "semver": "5.5.0", "tslib": "1.9.0", "tsutils": "2.26.1" @@ -5277,9 +5131,9 @@ "dev": true }, "resolve": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz", - "integrity": "sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { "path-parse": "1.0.5" @@ -5318,9 +5172,9 @@ } }, "type-detect": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.5.tgz", - "integrity": "sha1-1w5byB223io4G8rKDG4MvcdjXeI=", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, "typedarray": { @@ -5330,9 +5184,9 @@ "dev": true }, "typescript": { - "version": "2.9.0-dev.20180407", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.0-dev.20180407.tgz", - "integrity": "sha512-Tg0/hU2hSz+4pb5Lj5+bj1uLldN7C8NO5Ik19WfftMlpeXRyZQJzglV0oncmsXOfN9gG+JC0xnO58YspE6sZ1w==", + "version": "2.9.0-dev.20180425", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.0-dev.20180425.tgz", + "integrity": "sha512-6t/l13ofVeTSJVD78b20E0rkoOcFPrst5bK9vCGDbbjzx+Ab3HoV7fSTuwB8zMEvpxHwQtR+0kR3XUy06HzwUg==", "dev": true }, "uglify-js": { @@ -5378,6 +5232,15 @@ "set-value": "0.4.3" }, "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.1" + } + }, "set-value": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", @@ -5463,82 +5326,12 @@ } }, "use": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/use/-/use-2.0.2.tgz", - "integrity": "sha1-riig1y+TvyJCKhii43mZMRLeyOg=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "dev": true, "requires": { - "define-property": "0.2.5", - "isobject": "3.0.1", - "lazy-cache": "2.0.2" - }, - "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.6" - } - }, - "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.2.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.6" - } - } - } - }, - "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.2.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.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true - } + "kind-of": "6.0.2" } }, "user-home": { @@ -5600,7 +5393,7 @@ "clone": "2.1.2", "clone-buffer": "1.0.0", "clone-stats": "1.0.0", - "cloneable-readable": "1.0.0", + "cloneable-readable": "1.1.2", "remove-trailing-separator": "1.1.0", "replace-ext": "1.0.0" }, @@ -5716,25 +5509,16 @@ } } }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha1-jz5DKM9jsVQMDWfhsneDhviXWyY=", - "dev": true - }, "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.0.1.tgz", + "integrity": "sha512-EqzLchIMYLBjRPoqVsEkZOa/4Vr2RfOWbd58F+I/Gj79AYTrsseMunxbbSkbYfrqZaXSuPBBXNSOhtJgg0PpmA==", + "dev": true }, "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "dev": true, "requires": { "isexe": "2.0.0" @@ -5762,17 +5546,17 @@ "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", "dev": true, "requires": { "sax": "1.2.4", - "xmlbuilder": "9.0.4" + "xmlbuilder": "9.0.7" } }, "xmlbuilder": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", - "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=", + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", "dev": true }, "xtend": { @@ -5793,12 +5577,6 @@ "decamelize": "1.2.0", "window-size": "0.1.0" } - }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true } } } diff --git a/package.json b/package.json index 71b5ed71029..3e53a3c67b8 100644 --- a/package.json +++ b/package.json @@ -48,11 +48,12 @@ "@types/q": "latest", "@types/run-sequence": "latest", "@types/through2": "latest", + "@types/travis-fold": "latest", "@types/xml2js": "^0.4.0", - "xml2js": "^0.4.19", "browser-resolve": "^1.11.2", "browserify": "latest", "chai": "latest", + "chalk": "latest", "convert-source-map": "latest", "del": "latest", "gulp": "3.X", @@ -77,9 +78,9 @@ "through2": "latest", "travis-fold": "latest", "tslint": "latest", + "typescript": "next", "vinyl": "latest", - "chalk": "latest", - "typescript": "next" + "xml2js": "^0.4.19" }, "scripts": { "pretest": "jake tests", diff --git a/scripts/buildProtocol.ts b/scripts/buildProtocol.ts index 899ab700bf3..3ea7d703cd3 100644 --- a/scripts/buildProtocol.ts +++ b/scripts/buildProtocol.ts @@ -178,7 +178,7 @@ function writeProtocolFile(outputFile: string, protocolTs: string, typeScriptSer ts.sys.writeFile(outputFile, protocolDts); if (diagnostics.length) { - const flattenedDiagnostics = diagnostics.map(d => `${ts.flattenDiagnosticMessageText(d.messageText, "\n")} at ${d.file.fileName} line ${d.start}`).join("\n"); + const flattenedDiagnostics = diagnostics.map(d => `${ts.flattenDiagnosticMessageText(d.messageText, "\n")} at ${d.file ? d.file.fileName : ""} line ${d.start}`).join("\n"); throw new Error(`Unexpected errors during sanity check: ${flattenedDiagnostics}`); } } diff --git a/scripts/types/ambient.d.ts b/scripts/types/ambient.d.ts index f99bf010198..4f9112d236e 100644 --- a/scripts/types/ambient.d.ts +++ b/scripts/types/ambient.d.ts @@ -14,4 +14,3 @@ declare module "gulp-insert" { } declare module "sorcery"; -declare module "travis-fold"; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 374e27f9e77..f0cbd70ed9c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2118,14 +2118,22 @@ namespace ts { return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol); } + /** + * For prototype-property methods like `A.prototype.m = function () ...`, try to resolve names in the scope of `A` too. + * Note that prototype-property assignment to locations outside the current file (eg globals) doesn't work, so + * name resolution won't work either. + */ function resolveEntityNameFromJSPrototype(name: Identifier, meaning: SymbolFlags) { if (isJSDocTypeReference(name.parent) && isJSDocTag(name.parent.parent.parent)) { const host = getJSDocHost(name.parent.parent.parent as JSDocTag); if (isExpressionStatement(host) && isBinaryExpression(host.expression) && getSpecialPropertyAssignmentKind(host.expression) === SpecialPropertyAssignmentKind.PrototypeProperty) { - const secondaryLocation = getSymbolOfNode(host.expression.left).parent.valueDeclaration; - return resolveName(secondaryLocation, name.escapedText, meaning, /*nameNotFoundMessage*/ undefined, name, /*isUse*/ true); + const symbol = getSymbolOfNode(host.expression.left); + if (symbol) { + const secondaryLocation = symbol.parent.valueDeclaration; + return resolveName(secondaryLocation, name.escapedText, meaning, /*nameNotFoundMessage*/ undefined, name, /*isUse*/ true); + } } } } @@ -4156,7 +4164,7 @@ namespace ts { const isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (ModifierFlags.Private | ModifierFlags.Protected); const isSetOnlyAccessor = prop.flags & SymbolFlags.SetAccessor && !(prop.flags & SymbolFlags.GetAccessor); if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) { - members.set(prop.escapedName, prop); + members.set(prop.escapedName, getNonReadonlySymbol(prop)); } } const stringIndexInfo = getIndexInfoOfType(source, IndexKind.String); @@ -4406,7 +4414,7 @@ namespace ts { const special = getSpecialPropertyAssignmentKind(expression); if (special === SpecialPropertyAssignmentKind.ThisProperty) { const thisContainer = getThisContainer(expression, /*includeArrowFunctions*/ false); - // Properties defined in a constructor (or javascript constructor function) don't get undefined added. + // Properties defined in a constructor (or base constructor, or javascript constructor function) don't get undefined added. // Function expressions that are assigned to the prototype count as methods. declarationInConstructor = thisContainer.kind === SyntaxKind.Constructor || thisContainer.kind === SyntaxKind.FunctionDeclaration || @@ -4476,7 +4484,14 @@ namespace ts { } let type = jsDocType; if (!type) { - // use only the constructor types unless only null | undefined (including widening variants) were assigned there + // use only the constructor types unless they were only assigned null | undefined (including widening variants) + if (definedInMethod) { + const propType = getTypeOfSpecialPropertyOfBaseType(symbol); + if (propType) { + (constructorTypes || (constructorTypes = [])).push(propType); + definedInConstructor = true; + } + } const sourceTypes = some(constructorTypes, t => !!(t.flags & ~(TypeFlags.Nullable | TypeFlags.ContainsWideningType))) ? constructorTypes : types; type = getUnionType(sourceTypes, UnionReduction.Subtype); } @@ -4490,6 +4505,20 @@ namespace ts { return widened; } + /** check for definition in base class if any declaration is in a class */ + function getTypeOfSpecialPropertyOfBaseType(specialProperty: Symbol) { + const parentDeclaration = forEach(specialProperty.declarations, d => { + const parent = getThisContainer(d, /*includeArrowFunctions*/ false).parent; + return isClassLike(parent) && parent; + }); + if (parentDeclaration) { + const classType = getDeclaredTypeOfSymbol(getSymbolOfNode(parentDeclaration)) as InterfaceType; + const baseClassType = classType && getBaseTypes(classType)[0]; + if (baseClassType) { + return getTypeOfPropertyOfType(baseClassType, specialProperty.escapedName); + } + } + } // Return the type implied by a binding pattern element. This is the type of the initializer of the element if // one is present. Otherwise, if the element is itself a binding pattern, it is the type implied by the binding @@ -6425,6 +6454,47 @@ namespace ts { return getConstraintOfDistributiveConditionalType(type) || getDefaultConstraintOfConditionalType(type); } + function getUnionConstraintOfIntersection(type: IntersectionType, targetIsUnion: boolean) { + let constraints: Type[]; + let hasDisjointDomainType = false; + for (const t of type.types) { + if (t.flags & TypeFlags.Instantiable) { + // We keep following constraints as long as we have an instantiable type that is known + // not to be circular or infinite (hence we stop on index access types). + let constraint = getConstraintOfType(t); + while (constraint && constraint.flags & (TypeFlags.TypeParameter | TypeFlags.Index | TypeFlags.Conditional)) { + constraint = getConstraintOfType(constraint); + } + if (constraint) { + // A constraint that isn't a union type implies that the final type would be a non-union + // type as well. Since non-union constraints are of no interest, we can exit here. + if (!(constraint.flags & TypeFlags.Union)) { + return undefined; + } + constraints = append(constraints, constraint); + } + } + else if (t.flags & TypeFlags.DisjointDomains) { + hasDisjointDomainType = true; + } + } + // If the target is a union type or if we are intersecting with types belonging to one of the + // disjoint domans, we may end up producing a constraint that hasn't been examined before. + if (constraints && (targetIsUnion || hasDisjointDomainType)) { + if (hasDisjointDomainType) { + // We add any types belong to one of the disjoint domans because they might cause the final + // intersection operation to reduce the union constraints. + for (const t of type.types) { + if (t.flags & TypeFlags.DisjointDomains) { + constraints = append(constraints, t); + } + } + } + return getIntersectionType(constraints); + } + return undefined; + } + function getBaseConstraintOfInstantiableNonPrimitiveUnionOrIntersection(type: Type) { if (type.flags & (TypeFlags.InstantiableNonPrimitive | TypeFlags.UnionOrIntersection)) { const constraint = getResolvedBaseConstraint(type); @@ -6632,7 +6702,15 @@ namespace ts { let nameType: Type; const propTypes: Type[] = []; let first = true; + let commonValueDeclaration: Declaration; + let hasNonUniformValueDeclaration = false; for (const prop of props) { + if (!commonValueDeclaration) { + commonValueDeclaration = prop.valueDeclaration; + } + else if (prop.valueDeclaration !== commonValueDeclaration) { + hasNonUniformValueDeclaration = true; + } declarations = addRange(declarations, prop.declarations); const type = getTypeOfSymbol(prop); if (first) { @@ -6649,6 +6727,9 @@ namespace ts { } const result = createSymbol(SymbolFlags.Property | commonFlags, name, syntheticFlag | checkFlags); result.containingType = containingType; + if (!hasNonUniformValueDeclaration && commonValueDeclaration) { + result.valueDeclaration = commonValueDeclaration; + } result.declarations = declarations; result.nameType = nameType; result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes); @@ -7272,7 +7353,8 @@ namespace ts { } function getConstraintDeclaration(type: TypeParameter) { - return type.symbol && getDeclarationOfKind(type.symbol, SyntaxKind.TypeParameter).constraint; + const decl = type.symbol && getDeclarationOfKind(type.symbol, SyntaxKind.TypeParameter); + return decl && decl.constraint; } function getInferredTypeParameterConstraint(typeParameter: TypeParameter) { @@ -7894,8 +7976,14 @@ namespace ts { return binarySearch(types, type, getTypeId, compareValues) >= 0; } - // Return true if the given intersection type contains (a) more than one unit type or (b) an object - // type and a nullable type (null or undefined). + // Return true if the given intersection type contains + // more than one unit type or, + // an object type and a nullable type (null or undefined), or + // a string-like type and a type known to be non-string-like, or + // a number-like type and a type known to be non-number-like, or + // a symbol-like type and a type known to be non-symbol-like, or + // a void-like type and a type known to be non-void-like, or + // a non-primitive type and a type known to be primitive. function isEmptyIntersectionType(type: IntersectionType) { let combined: TypeFlags = 0; for (const t of type.types) { @@ -7903,7 +7991,12 @@ namespace ts { return true; } combined |= t.flags; - if (combined & TypeFlags.Nullable && combined & (TypeFlags.Object | TypeFlags.NonPrimitive)) { + if (combined & TypeFlags.Nullable && combined & (TypeFlags.Object | TypeFlags.NonPrimitive) || + combined & TypeFlags.NonPrimitive && combined & (TypeFlags.DisjointDomains & ~TypeFlags.NonPrimitive) || + combined & TypeFlags.StringLike && combined & (TypeFlags.DisjointDomains & ~TypeFlags.StringLike) || + combined & TypeFlags.NumberLike && combined & (TypeFlags.DisjointDomains & ~TypeFlags.NumberLike) || + combined & TypeFlags.ESSymbolLike && combined & (TypeFlags.DisjointDomains & ~TypeFlags.ESSymbolLike) || + combined & TypeFlags.VoidLike && combined & (TypeFlags.DisjointDomains & ~TypeFlags.VoidLike)) { return true; } } @@ -10131,6 +10224,23 @@ namespace ts { } } } + if (!result && source.flags & TypeFlags.Intersection) { + // The combined constraint of an intersection type is the intersection of the constraints of + // the constituents. When an intersection type contains instantiable types with union type + // constraints, there are situations where we need to examine the combined constraint. One is + // when the target is a union type. Another is when the intersection contains types belonging + // to one of the disjoint domains. For example, given type variables T and U, each with the + // constraint 'string | number', the combined constraint of 'T & U' is 'string | number' and + // we need to check this constraint against a union on the target side. Also, given a type + // variable V constrained to 'string | number', 'V & number' has a combined constraint of + // 'string & number | number & number' which reduces to just 'number'. + const constraint = getUnionConstraintOfIntersection(source, !!(target.flags & TypeFlags.Union)); + if (constraint) { + if (result = isRelatedTo(constraint, target, reportErrors)) { + errorInfo = saveErrorInfo; + } + } + } isIntersectionConstituent = saveIsIntersectionConstituent; @@ -10488,11 +10598,14 @@ namespace ts { } } // A type S is assignable to keyof T if S is assignable to keyof C, where C is the - // constraint of T. - const constraint = getConstraintForRelation((target).type); - if (constraint) { - if (result = isRelatedTo(source, getIndexType(constraint, (target as IndexType).stringsOnly), reportErrors)) { - return result; + // simplified form of T or, if T doesn't simplify, the constraint of T. + if (relation !== definitelyAssignableRelation) { + const simplified = getSimplifiedType((target).type); + const constraint = simplified !== (target).type ? simplified : getConstraintOfType((target).type); + if (constraint) { + if (result = isRelatedTo(source, getIndexType(constraint, (target as IndexType).stringsOnly), reportErrors)) { + return result; + } } } } @@ -10736,13 +10849,14 @@ namespace ts { const sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp); const targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp); if (sourcePropFlags & ModifierFlags.Private || targetPropFlags & ModifierFlags.Private) { - if (getCheckFlags(sourceProp) & CheckFlags.ContainsPrivate) { + const hasDifferingDeclarations = sourceProp.valueDeclaration !== targetProp.valueDeclaration; + if (getCheckFlags(sourceProp) & CheckFlags.ContainsPrivate && hasDifferingDeclarations) { if (reportErrors) { reportError(Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source)); } return Ternary.False; } - if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { + if (hasDifferingDeclarations) { if (reportErrors) { if (sourcePropFlags & ModifierFlags.Private && targetPropFlags & ModifierFlags.Private) { reportError(Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp)); diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 2b01f2fdda1..53d4e56c301 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1441,9 +1441,9 @@ namespace ts { function emitElementAccessExpression(node: ElementAccessExpression) { emitExpression(node.expression); - const openPos = emitTokenWithComment(SyntaxKind.OpenBracketToken, node.expression.end, writePunctuation, node); + emitTokenWithComment(SyntaxKind.OpenBracketToken, node.expression.end, writePunctuation, node); emitExpression(node.argumentExpression); - emitTokenWithComment(SyntaxKind.CloseBracketToken, node.argumentExpression ? node.argumentExpression.end : openPos, writePunctuation, node); + emitTokenWithComment(SyntaxKind.CloseBracketToken, node.argumentExpression.end, writePunctuation, node); } function emitCallExpression(node: CallExpression) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c0d9b0ed9af..1fa62b269bc 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3620,6 +3620,9 @@ namespace ts { BooleanLike = Boolean | BooleanLiteral, EnumLike = Enum | EnumLiteral, ESSymbolLike = ESSymbol | UniqueESSymbol, + VoidLike = Void | Undefined, + /* @internal */ + DisjointDomains = NonPrimitive | StringLike | NumberLike | BooleanLike | ESSymbolLike | VoidLike | Null, UnionOrIntersection = Union | Intersection, StructuredType = Object | Union | Intersection, TypeVariable = TypeParameter | IndexedAccess, diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index c5cb19e876a..04db855d4f8 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1889,7 +1889,13 @@ namespace ts { export function getJSDocHost(node: JSDocTag): HasJSDoc { while (node.parent.kind === SyntaxKind.JSDocTypeLiteral) { - node = node.parent.parent.parent as JSDocParameterTag; + if (node.parent.parent.kind === SyntaxKind.JSDocTypedefTag) { + node = node.parent.parent as JSDocTypedefTag; + } + else { + // node.parent.parent is a type expression, child of a parameter type + node = node.parent.parent.parent as JSDocParameterTag; + } } Debug.assert(node.parent!.kind === SyntaxKind.JSDocComment); return node.parent!.parent!; @@ -4025,12 +4031,14 @@ namespace ts { } /** Add a value to a set, and return true if it wasn't already present. */ - export function addToSeen(seen: Map, key: string | number): boolean { + export function addToSeen(seen: Map, key: string | number): boolean; + export function addToSeen(seen: Map, key: string | number, value: T): boolean; + export function addToSeen(seen: Map, key: string | number, value: T = true as any): boolean { key = String(key); if (seen.has(key)) { return false; } - seen.set(key, true); + seen.set(key, value); return true; } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 9e6978f2a15..9fe26ed51c3 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -304,14 +304,13 @@ namespace Utils { o.containsParseError = true; } - ts.forEach(Object.getOwnPropertyNames(n), propertyName => { + for (const propertyName of Object.getOwnPropertyNames(n) as ReadonlyArray) { switch (propertyName) { case "parent": case "symbol": case "locals": case "localSymbol": case "kind": - case "semanticDiagnostics": case "id": case "nodeCount": case "symbolCount": @@ -334,7 +333,6 @@ namespace Utils { } break; - case "referenceDiagnostics": case "parseDiagnostics": o[propertyName] = convertDiagnostics((n)[propertyName]); break; @@ -355,9 +353,7 @@ namespace Utils { default: o[propertyName] = (n)[propertyName]; } - - return undefined; - }); + } return o; } diff --git a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl index 619c6ea41af..fa924a9d856 100644 --- a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1251,6 +1251,15 @@ + + + + + + + + + @@ -6504,6 +6513,15 @@ + + + + + + + + + @@ -8754,6 +8772,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl index f8a6325f4a1..f7c9f90e59e 100644 --- a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1241,6 +1241,15 @@ + + + + + + + + + @@ -6494,6 +6503,9 @@ + + + @@ -8747,6 +8759,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl index 3be5ddb0dbb..098f08d8cd2 100644 --- a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1250,6 +1250,15 @@ + + + + + + + + + @@ -6506,6 +6515,9 @@ + + + @@ -8759,6 +8771,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl index 5899715db8b..b03397f22a9 100644 --- a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -899,6 +899,9 @@ + + + @@ -1001,6 +1004,9 @@ + + + @@ -6491,6 +6497,12 @@ + + + + + + @@ -8741,6 +8753,12 @@ + + + + + + diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index b8694947472..fa466eb8cb9 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -98,16 +98,21 @@ namespace ts.codefix { symbolToken: Node | undefined, preferences: UserPreferences, ): { readonly moduleSpecifier: string, readonly codeAction: CodeAction } { - const exportInfos = getAllReExportingModules(exportedSymbol, symbolName, checker, allSourceFiles); + const exportInfos = getAllReExportingModules(exportedSymbol, moduleSymbol, symbolName, sourceFile, checker, allSourceFiles); Debug.assert(exportInfos.some(info => info.moduleSymbol === moduleSymbol)); // We sort the best codefixes first, so taking `first` is best for completions. const moduleSpecifier = first(getNewImportInfos(program, sourceFile, exportInfos, compilerOptions, getCanonicalFileName, host, preferences)).moduleSpecifier; const ctx: ImportCodeFixContext = { host, program, checker, compilerOptions, sourceFile, formatContext, symbolName, getCanonicalFileName, symbolToken, preferences }; return { moduleSpecifier, codeAction: first(getCodeActionsForImport(exportInfos, ctx)) }; } - function getAllReExportingModules(exportedSymbol: Symbol, symbolName: string, checker: TypeChecker, allSourceFiles: ReadonlyArray): ReadonlyArray { + function getAllReExportingModules(exportedSymbol: Symbol, exportingModuleSymbol: Symbol, symbolName: string, sourceFile: SourceFile, checker: TypeChecker, allSourceFiles: ReadonlyArray): ReadonlyArray { const result: SymbolExportInfo[] = []; - forEachExternalModule(checker, allSourceFiles, moduleSymbol => { + forEachExternalModule(checker, allSourceFiles, (moduleSymbol, moduleFile) => { + // Don't import from a re-export when looking "up" like to `./index` or `../index`. + if (moduleFile && moduleSymbol !== exportingModuleSymbol && startsWith(sourceFile.fileName, getDirectoryPath(moduleFile.fileName))) { + return; + } + for (const exported of checker.getExportsOfModule(moduleSymbol)) { if (exported.escapedName === InternalSymbolName.Default || exported.name === symbolName && skipAlias(exported, checker) === exportedSymbol) { const isDefaultExport = checker.tryGetMemberInModuleExports(InternalSymbolName.Default, moduleSymbol) === exported; diff --git a/src/services/services.ts b/src/services/services.ts index 9b427452650..f17b7698a87 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -546,7 +546,6 @@ namespace ts { public typeReferenceDirectives: FileReference[]; public syntacticDiagnostics: Diagnostic[]; - public referenceDiagnostics: Diagnostic[]; public parseDiagnostics: Diagnostic[]; public bindDiagnostics: Diagnostic[]; diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index 4f431e28e0e..648ab77a922 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -212,8 +212,7 @@ namespace ts.textChanges { export class ChangeTracker { private readonly changes: Change[] = []; private readonly deletedNodesInLists: true[] = []; // Stores ids of nodes in lists that we already deleted. Used to avoid deleting `, ` twice in `a, b`. - // Map from class id to nodes to insert at the start - private readonly nodesInsertedAtClassStarts = createMap<{ sourceFile: SourceFile, cls: ClassLikeDeclaration, members: ClassElement[] }>(); + private readonly classesWithNodesInsertedAtStart = createMap(); // Set implemented as Map public static fromContext(context: TextChangesContext): ChangeTracker { return new ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext); @@ -343,8 +342,7 @@ namespace ts.textChanges { } public insertNodeBefore(sourceFile: SourceFile, before: Node, newNode: Node, blankLineBetween = false) { - const pos = getAdjustedStartPosition(sourceFile, before, {}, Position.Start); - return this.replaceRange(sourceFile, { pos, end: pos }, newNode, this.getOptionsForInsertNodeBefore(before, blankLineBetween)); + this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, {}, Position.Start), newNode, this.getOptionsForInsertNodeBefore(before, blankLineBetween)); } public insertModifierBefore(sourceFile: SourceFile, modifier: SyntaxKind, before: Node): void { @@ -443,21 +441,20 @@ namespace ts.textChanges { } public insertNodeAtClassStart(sourceFile: SourceFile, cls: ClassLikeDeclaration, newElement: ClassElement): void { - const firstMember = firstOrUndefined(cls.members); - if (!firstMember) { - const id = getNodeId(cls).toString(); - const newMembers = this.nodesInsertedAtClassStarts.get(id); - if (newMembers) { - Debug.assert(newMembers.sourceFile === sourceFile && newMembers.cls === cls); - newMembers.members.push(newElement); - } - else { - this.nodesInsertedAtClassStarts.set(id, { sourceFile, cls, members: [newElement] }); + const clsStart = cls.getStart(sourceFile); + let prefix = ""; + let suffix = this.newLineCharacter; + if (addToSeen(this.classesWithNodesInsertedAtStart, getNodeId(cls), cls)) { + prefix = this.newLineCharacter; + // For `class C {\n}`, don't add the trailing "\n" + if (cls.members.length === 0 && !(positionsAreOnSameLine as any)(...getClassBraceEnds(cls, sourceFile), sourceFile)) { // TODO: GH#4130 remove 'as any' + suffix = ""; } } - else { - this.insertNodeBefore(sourceFile, firstMember, newElement); - } + + const indentation = formatting.SmartIndenter.findFirstNonWhitespaceColumn(getLineStartPositionForPosition(clsStart, sourceFile), clsStart, sourceFile, this.formatContext.options) + + this.formatContext.options.indentSize; + this.insertNodeAt(sourceFile, cls.members.pos, newElement, { indentation, prefix, suffix }); } public insertNodeAfter(sourceFile: SourceFile, after: Node, newNode: Node): this { @@ -638,12 +635,14 @@ namespace ts.textChanges { return this; } - private finishInsertNodeAtClassStart(): void { - this.nodesInsertedAtClassStarts.forEach(({ sourceFile, cls, members }) => { - const newCls = cls.kind === SyntaxKind.ClassDeclaration - ? updateClassDeclaration(cls, cls.decorators, cls.modifiers, cls.name, cls.typeParameters, cls.heritageClauses, members) - : updateClassExpression(cls, cls.modifiers, cls.name, cls.typeParameters, cls.heritageClauses, members); - this.replaceNode(sourceFile, cls, newCls); + private finishClassesWithNodesInsertedAtStart(): void { + this.classesWithNodesInsertedAtStart.forEach(cls => { + const sourceFile = cls.getSourceFile(); + const [openBraceEnd, closeBraceEnd] = getClassBraceEnds(cls, sourceFile); + // For `class C { }` remove the whitespace inside the braces. + if (positionsAreOnSameLine(openBraceEnd, closeBraceEnd, sourceFile) && openBraceEnd !== closeBraceEnd - 1) { + this.deleteRange(sourceFile, createTextRange(openBraceEnd, closeBraceEnd - 1)); + } }); } @@ -654,11 +653,15 @@ namespace ts.textChanges { * so we can only call this once and can't get the non-formatted text separately. */ public getChanges(validate?: ValidateNonFormattedText): FileTextChanges[] { - this.finishInsertNodeAtClassStart(); + this.finishClassesWithNodesInsertedAtStart(); return changesToText.getTextChangesFromChanges(this.changes, this.newLineCharacter, this.formatContext, validate); } } + function getClassBraceEnds(cls: ClassLikeDeclaration, sourceFile: SourceFile): [number, number] { + return [findChildOfKind(cls, SyntaxKind.OpenBraceToken, sourceFile).end, findChildOfKind(cls, SyntaxKind.CloseBraceToken, sourceFile).end]; + } + export type ValidateNonFormattedText = (node: Node, text: string) => void; namespace changesToText { diff --git a/src/services/types.ts b/src/services/types.ts index e835d0cdef6..2369db8a0ce 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -331,7 +331,7 @@ namespace ts { applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise; /** @deprecated `fileName` will be ignored */ applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise; - getApplicableRefactors(fileName: string, positionOrRaneg: number | TextRange, preferences: UserPreferences | undefined): ApplicableRefactorInfo[]; + getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined): ApplicableRefactorInfo[]; getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): ReadonlyArray; getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings): ReadonlyArray; diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 504d0c18d40..cc176c1fb2f 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2111,6 +2111,7 @@ declare namespace ts { BooleanLike = 136, EnumLike = 272, ESSymbolLike = 1536, + VoidLike = 6144, UnionOrIntersection = 393216, StructuredType = 458752, TypeVariable = 1081344, @@ -4451,7 +4452,7 @@ declare namespace ts { applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise; /** @deprecated `fileName` will be ignored */ applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise; - getApplicableRefactors(fileName: string, positionOrRaneg: number | TextRange, preferences: UserPreferences | undefined): ApplicableRefactorInfo[]; + getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined): ApplicableRefactorInfo[]; getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): ReadonlyArray; getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings): ReadonlyArray; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 967fe44aab6..641e092b51c 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2111,6 +2111,7 @@ declare namespace ts { BooleanLike = 136, EnumLike = 272, ESSymbolLike = 1536, + VoidLike = 6144, UnionOrIntersection = 393216, StructuredType = 458752, TypeVariable = 1081344, @@ -4451,7 +4452,7 @@ declare namespace ts { applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise; /** @deprecated `fileName` will be ignored */ applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise; - getApplicableRefactors(fileName: string, positionOrRaneg: number | TextRange, preferences: UserPreferences | undefined): ApplicableRefactorInfo[]; + getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined): ApplicableRefactorInfo[]; getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): ReadonlyArray; getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings): ReadonlyArray; diff --git a/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.js b/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.js new file mode 100644 index 00000000000..6ea7a46bb68 --- /dev/null +++ b/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.js @@ -0,0 +1,42 @@ +//// [doubleMixinConditionalTypeBaseClassWorks.ts] +type Constructor = new (...args: any[]) => {}; + +const Mixin1 = (Base: C) => class extends Base { private _fooPrivate: {}; } + +type FooConstructor = typeof Mixin1 extends (a: Constructor) => infer Cls ? Cls : never; +const Mixin2 = (Base: C) => class extends Base {}; + +class C extends Mixin2(Mixin1(Object)) {} + +//// [doubleMixinConditionalTypeBaseClassWorks.js] +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var Mixin1 = function (Base) { return /** @class */ (function (_super) { + __extends(class_1, _super); + function class_1() { + return _super !== null && _super.apply(this, arguments) || this; + } + return class_1; +}(Base)); }; +var Mixin2 = function (Base) { return /** @class */ (function (_super) { + __extends(class_2, _super); + function class_2() { + return _super !== null && _super.apply(this, arguments) || this; + } + return class_2; +}(Base)); }; +var C = /** @class */ (function (_super) { + __extends(C, _super); + function C() { + return _super !== null && _super.apply(this, arguments) || this; + } + return C; +}(Mixin2(Mixin1(Object)))); diff --git a/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.symbols b/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.symbols new file mode 100644 index 00000000000..f1f0187a7eb --- /dev/null +++ b/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.symbols @@ -0,0 +1,36 @@ +=== tests/cases/compiler/doubleMixinConditionalTypeBaseClassWorks.ts === +type Constructor = new (...args: any[]) => {}; +>Constructor : Symbol(Constructor, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 0, 0)) +>args : Symbol(args, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 0, 24)) + +const Mixin1 = (Base: C) => class extends Base { private _fooPrivate: {}; } +>Mixin1 : Symbol(Mixin1, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 5)) +>C : Symbol(C, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 16)) +>Constructor : Symbol(Constructor, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 0, 0)) +>Base : Symbol(Base, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 39)) +>C : Symbol(C, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 16)) +>Base : Symbol(Base, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 39)) +>_fooPrivate : Symbol((Anonymous class)._fooPrivate, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 71)) + +type FooConstructor = typeof Mixin1 extends (a: Constructor) => infer Cls ? Cls : never; +>FooConstructor : Symbol(FooConstructor, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 98)) +>Mixin1 : Symbol(Mixin1, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 5)) +>a : Symbol(a, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 4, 45)) +>Constructor : Symbol(Constructor, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 0, 0)) +>Cls : Symbol(Cls, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 4, 69)) +>Cls : Symbol(Cls, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 4, 69)) + +const Mixin2 = (Base: C) => class extends Base {}; +>Mixin2 : Symbol(Mixin2, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 5, 5)) +>C : Symbol(C, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 5, 16)) +>FooConstructor : Symbol(FooConstructor, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 98)) +>Base : Symbol(Base, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 5, 42)) +>C : Symbol(C, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 5, 16)) +>Base : Symbol(Base, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 5, 42)) + +class C extends Mixin2(Mixin1(Object)) {} +>C : Symbol(C, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 5, 76)) +>Mixin2 : Symbol(Mixin2, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 5, 5)) +>Mixin1 : Symbol(Mixin1, Decl(doubleMixinConditionalTypeBaseClassWorks.ts, 2, 5)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.types b/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.types new file mode 100644 index 00000000000..5fd92f6e2eb --- /dev/null +++ b/tests/baselines/reference/doubleMixinConditionalTypeBaseClassWorks.types @@ -0,0 +1,42 @@ +=== tests/cases/compiler/doubleMixinConditionalTypeBaseClassWorks.ts === +type Constructor = new (...args: any[]) => {}; +>Constructor : Constructor +>args : any[] + +const Mixin1 = (Base: C) => class extends Base { private _fooPrivate: {}; } +>Mixin1 : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>(Base: C) => class extends Base { private _fooPrivate: {}; } : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>C : C +>Constructor : Constructor +>Base : C +>C : C +>class extends Base { private _fooPrivate: {}; } : { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>Base : {} +>_fooPrivate : {} + +type FooConstructor = typeof Mixin1 extends (a: Constructor) => infer Cls ? Cls : never; +>FooConstructor : { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); } & Constructor +>Mixin1 : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>a : Constructor +>Constructor : Constructor +>Cls : Cls +>Cls : Cls + +const Mixin2 = (Base: C) => class extends Base {}; +>Mixin2 : .(Anonymous class); prototype: .(Anonymous class); } & Constructor>(Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>(Base: C) => class extends Base {} : .(Anonymous class); prototype: .(Anonymous class); } & Constructor>(Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>C : C +>FooConstructor : { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); } & Constructor +>Base : C +>C : C +>class extends Base {} : { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>Base : .(Anonymous class) + +class C extends Mixin2(Mixin1(Object)) {} +>C : C +>Mixin2(Mixin1(Object)) : <{ new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); } & ObjectConstructor>.(Anonymous class) & .(Anonymous class) & Object +>Mixin2 : .(Anonymous class); prototype: .(Anonymous class); } & Constructor>(Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>Mixin1(Object) : { new (...args: any[]): .(Anonymous class); prototype: .(Anonymous class); } & ObjectConstructor +>Mixin1 : (Base: C) => { new (...args: any[]): (Anonymous class); prototype: .(Anonymous class); } & C +>Object : ObjectConstructor + diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes04.errors.txt b/tests/baselines/reference/errorMessagesIntersectionTypes04.errors.txt index d2e81844da1..25fdc65f5e8 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes04.errors.txt +++ b/tests/baselines/reference/errorMessagesIntersectionTypes04.errors.txt @@ -1,11 +1,9 @@ tests/cases/compiler/errorMessagesIntersectionTypes04.ts(17,5): error TS2322: Type 'A & B' is not assignable to type 'number'. tests/cases/compiler/errorMessagesIntersectionTypes04.ts(18,5): error TS2322: Type 'A & B' is not assignable to type 'boolean'. tests/cases/compiler/errorMessagesIntersectionTypes04.ts(19,5): error TS2322: Type 'A & B' is not assignable to type 'string'. -tests/cases/compiler/errorMessagesIntersectionTypes04.ts(21,5): error TS2322: Type '(number & true) | (number & false)' is not assignable to type 'string'. - Type 'number & true' is not assignable to type 'string'. -==== tests/cases/compiler/errorMessagesIntersectionTypes04.ts (4 errors) ==== +==== tests/cases/compiler/errorMessagesIntersectionTypes04.ts (3 errors) ==== interface A { a; } @@ -33,7 +31,4 @@ tests/cases/compiler/errorMessagesIntersectionTypes04.ts(21,5): error TS2322: Ty !!! error TS2322: Type 'A & B' is not assignable to type 'string'. str = num_and_bool; - ~~~ -!!! error TS2322: Type '(number & true) | (number & false)' is not assignable to type 'string'. -!!! error TS2322: Type 'number & true' is not assignable to type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes04.types b/tests/baselines/reference/errorMessagesIntersectionTypes04.types index 9d8db5dba3d..b24597d4b33 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes04.types +++ b/tests/baselines/reference/errorMessagesIntersectionTypes04.types @@ -36,7 +36,7 @@ function f(): void { >B : B let num_and_bool: number & boolean; ->num_and_bool : (number & true) | (number & false) +>num_and_bool : never num = a_and_b; >num = a_and_b : A & B @@ -54,7 +54,7 @@ function f(): void { >a_and_b : A & B str = num_and_bool; ->str = num_and_bool : (number & true) | (number & false) +>str = num_and_bool : never >str : string ->num_and_bool : (number & true) | (number & false) +>num_and_bool : never } diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments3.symbols b/tests/baselines/reference/inferringClassMembersFromAssignments3.symbols new file mode 100644 index 00000000000..b4006600dbe --- /dev/null +++ b/tests/baselines/reference/inferringClassMembersFromAssignments3.symbols @@ -0,0 +1,25 @@ +=== tests/cases/conformance/salsa/a.js === +class Base { +>Base : Symbol(Base, Decl(a.js, 0, 0)) + + constructor() { + this.p = 1 +>this.p : Symbol(Base.p, Decl(a.js, 1, 19)) +>this : Symbol(Base, Decl(a.js, 0, 0)) +>p : Symbol(Base.p, Decl(a.js, 1, 19)) + } +} +class Derived extends Base { +>Derived : Symbol(Derived, Decl(a.js, 4, 1)) +>Base : Symbol(Base, Decl(a.js, 0, 0)) + + m() { +>m : Symbol(Derived.m, Decl(a.js, 5, 28)) + + this.p = 1 +>this.p : Symbol(Derived.p, Decl(a.js, 6, 9)) +>this : Symbol(Derived, Decl(a.js, 4, 1)) +>p : Symbol(Derived.p, Decl(a.js, 6, 9)) + } +} + diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments3.types b/tests/baselines/reference/inferringClassMembersFromAssignments3.types new file mode 100644 index 00000000000..60d545b2832 --- /dev/null +++ b/tests/baselines/reference/inferringClassMembersFromAssignments3.types @@ -0,0 +1,29 @@ +=== tests/cases/conformance/salsa/a.js === +class Base { +>Base : Base + + constructor() { + this.p = 1 +>this.p = 1 : 1 +>this.p : number +>this : this +>p : number +>1 : 1 + } +} +class Derived extends Base { +>Derived : Derived +>Base : Base + + m() { +>m : () => void + + this.p = 1 +>this.p = 1 : 1 +>this.p : number +>this : this +>p : number +>1 : 1 + } +} + diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments4.symbols b/tests/baselines/reference/inferringClassMembersFromAssignments4.symbols new file mode 100644 index 00000000000..d0d438c3ed3 --- /dev/null +++ b/tests/baselines/reference/inferringClassMembersFromAssignments4.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/salsa/a.js === +class Base { +>Base : Symbol(Base, Decl(a.js, 0, 0)) + + m() { +>m : Symbol(Base.m, Decl(a.js, 0, 12)) + + this.p = 1 +>this.p : Symbol(Base.p, Decl(a.js, 1, 9)) +>this : Symbol(Base, Decl(a.js, 0, 0)) +>p : Symbol(Base.p, Decl(a.js, 1, 9)) + } +} +class Derived extends Base { +>Derived : Symbol(Derived, Decl(a.js, 4, 1)) +>Base : Symbol(Base, Decl(a.js, 0, 0)) + + m() { +>m : Symbol(Derived.m, Decl(a.js, 5, 28)) + + // should be OK, and p should have type number | undefined from its base + this.p = 1 +>this.p : Symbol(Derived.p, Decl(a.js, 6, 9)) +>this : Symbol(Derived, Decl(a.js, 4, 1)) +>p : Symbol(Derived.p, Decl(a.js, 6, 9)) + } +} + diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments4.types b/tests/baselines/reference/inferringClassMembersFromAssignments4.types new file mode 100644 index 00000000000..f20602d188e --- /dev/null +++ b/tests/baselines/reference/inferringClassMembersFromAssignments4.types @@ -0,0 +1,32 @@ +=== tests/cases/conformance/salsa/a.js === +class Base { +>Base : Base + + m() { +>m : () => void + + this.p = 1 +>this.p = 1 : 1 +>this.p : number | undefined +>this : this +>p : number | undefined +>1 : 1 + } +} +class Derived extends Base { +>Derived : Derived +>Base : Base + + m() { +>m : () => void + + // should be OK, and p should have type number | undefined from its base + this.p = 1 +>this.p = 1 : 1 +>this.p : number | undefined +>this : this +>p : number | undefined +>1 : 1 + } +} + diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments5.symbols b/tests/baselines/reference/inferringClassMembersFromAssignments5.symbols new file mode 100644 index 00000000000..5c46300d770 --- /dev/null +++ b/tests/baselines/reference/inferringClassMembersFromAssignments5.symbols @@ -0,0 +1,37 @@ +=== tests/cases/conformance/salsa/a.js === +class Base { +>Base : Symbol(Base, Decl(a.js, 0, 0)) + + m() { +>m : Symbol(Base.m, Decl(a.js, 0, 12)) + + this.p = 1 +>this.p : Symbol(Base.p, Decl(a.js, 1, 9)) +>this : Symbol(Base, Decl(a.js, 0, 0)) +>p : Symbol(Base.p, Decl(a.js, 1, 9)) + } +} +class Derived extends Base { +>Derived : Symbol(Derived, Decl(a.js, 4, 1)) +>Base : Symbol(Base, Decl(a.js, 0, 0)) + + constructor() { + super(); +>super : Symbol(Base, Decl(a.js, 0, 0)) + + // should be OK, and p should have type number from this assignment + this.p = 1 +>this.p : Symbol(Derived.p, Decl(a.js, 7, 16)) +>this : Symbol(Derived, Decl(a.js, 4, 1)) +>p : Symbol(Derived.p, Decl(a.js, 7, 16)) + } + test() { +>test : Symbol(Derived.test, Decl(a.js, 10, 5)) + + return this.p +>this.p : Symbol(Derived.p, Decl(a.js, 7, 16)) +>this : Symbol(Derived, Decl(a.js, 4, 1)) +>p : Symbol(Derived.p, Decl(a.js, 7, 16)) + } +} + diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments5.types b/tests/baselines/reference/inferringClassMembersFromAssignments5.types new file mode 100644 index 00000000000..fc95b82e5fd --- /dev/null +++ b/tests/baselines/reference/inferringClassMembersFromAssignments5.types @@ -0,0 +1,42 @@ +=== tests/cases/conformance/salsa/a.js === +class Base { +>Base : Base + + m() { +>m : () => void + + this.p = 1 +>this.p = 1 : 1 +>this.p : number | undefined +>this : this +>p : number | undefined +>1 : 1 + } +} +class Derived extends Base { +>Derived : Derived +>Base : Base + + constructor() { + super(); +>super() : void +>super : typeof Base + + // should be OK, and p should have type number from this assignment + this.p = 1 +>this.p = 1 : 1 +>this.p : number +>this : this +>p : number +>1 : 1 + } + test() { +>test : () => number + + return this.p +>this.p : number +>this : this +>p : number + } +} + diff --git a/tests/baselines/reference/intersectionWithUnionConstraint.errors.txt b/tests/baselines/reference/intersectionWithUnionConstraint.errors.txt new file mode 100644 index 00000000000..9bdfc6f30f9 --- /dev/null +++ b/tests/baselines/reference/intersectionWithUnionConstraint.errors.txt @@ -0,0 +1,83 @@ +tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(7,9): error TS2322: Type 'T & U' is not assignable to type 'string | number'. + Type 'string | undefined' is not assignable to type 'string | number'. + Type 'undefined' is not assignable to type 'string | number'. + Type 'T & U' is not assignable to type 'number'. +tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(8,9): error TS2322: Type 'T & U' is not assignable to type 'string | null'. + Type 'string | undefined' is not assignable to type 'string | null'. + Type 'undefined' is not assignable to type 'string | null'. + Type 'T & U' is not assignable to type 'string'. +tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(10,9): error TS2322: Type 'T & U' is not assignable to type 'number | null'. + Type 'string | undefined' is not assignable to type 'number | null'. + Type 'undefined' is not assignable to type 'number | null'. + Type 'T & U' is not assignable to type 'number'. +tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(11,9): error TS2322: Type 'T & U' is not assignable to type 'number | undefined'. + Type 'string | undefined' is not assignable to type 'number | undefined'. + Type 'string' is not assignable to type 'number | undefined'. + Type 'T & U' is not assignable to type 'number'. +tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(12,9): error TS2322: Type 'T & U' is not assignable to type 'null | undefined'. + Type 'string | undefined' is not assignable to type 'null | undefined'. + Type 'string' is not assignable to type 'null | undefined'. + Type 'T & U' is not assignable to type 'null'. + + +==== tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts (5 errors) ==== + function f1(x: T & U) { + // Combined constraint of 'T & U' is 'string | number' + let y: string | number = x; + } + + function f2(x: T & U) { + let y1: string | number = x; // Error + ~~ +!!! error TS2322: Type 'T & U' is not assignable to type 'string | number'. +!!! error TS2322: Type 'string | undefined' is not assignable to type 'string | number'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. +!!! error TS2322: Type 'T & U' is not assignable to type 'number'. + let y2: string | null = x; // Error + ~~ +!!! error TS2322: Type 'T & U' is not assignable to type 'string | null'. +!!! error TS2322: Type 'string | undefined' is not assignable to type 'string | null'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string | null'. +!!! error TS2322: Type 'T & U' is not assignable to type 'string'. + let y3: string | undefined = x; + let y4: number | null = x; // Error + ~~ +!!! error TS2322: Type 'T & U' is not assignable to type 'number | null'. +!!! error TS2322: Type 'string | undefined' is not assignable to type 'number | null'. +!!! error TS2322: Type 'undefined' is not assignable to type 'number | null'. +!!! error TS2322: Type 'T & U' is not assignable to type 'number'. + let y5: number | undefined = x; // Error + ~~ +!!! error TS2322: Type 'T & U' is not assignable to type 'number | undefined'. +!!! error TS2322: Type 'string | undefined' is not assignable to type 'number | undefined'. +!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'. +!!! error TS2322: Type 'T & U' is not assignable to type 'number'. + let y6: null | undefined = x; // Error + ~~ +!!! error TS2322: Type 'T & U' is not assignable to type 'null | undefined'. +!!! error TS2322: Type 'string | undefined' is not assignable to type 'null | undefined'. +!!! error TS2322: Type 'string' is not assignable to type 'null | undefined'. +!!! error TS2322: Type 'T & U' is not assignable to type 'null'. + } + + type T1 = (string | number | undefined) & (string | null | undefined); // string | undefined + + function f3(x: T & (number | object | undefined)) { + const y: number | undefined = x; + } + + function f4(x: T & (number | object)) { + const y: number = x; + } + + function f5(x: keyof T & U) { + let y: keyof any = x; + } + + // Repro from #23648 + + type Example = { [K in keyof T]: K extends keyof U ? UnexpectedError : NoErrorHere } + + type UnexpectedError = T + type NoErrorHere = T + \ No newline at end of file diff --git a/tests/baselines/reference/intersectionWithUnionConstraint.js b/tests/baselines/reference/intersectionWithUnionConstraint.js new file mode 100644 index 00000000000..fc3e50309c6 --- /dev/null +++ b/tests/baselines/reference/intersectionWithUnionConstraint.js @@ -0,0 +1,60 @@ +//// [intersectionWithUnionConstraint.ts] +function f1(x: T & U) { + // Combined constraint of 'T & U' is 'string | number' + let y: string | number = x; +} + +function f2(x: T & U) { + let y1: string | number = x; // Error + let y2: string | null = x; // Error + let y3: string | undefined = x; + let y4: number | null = x; // Error + let y5: number | undefined = x; // Error + let y6: null | undefined = x; // Error +} + +type T1 = (string | number | undefined) & (string | null | undefined); // string | undefined + +function f3(x: T & (number | object | undefined)) { + const y: number | undefined = x; +} + +function f4(x: T & (number | object)) { + const y: number = x; +} + +function f5(x: keyof T & U) { + let y: keyof any = x; +} + +// Repro from #23648 + +type Example = { [K in keyof T]: K extends keyof U ? UnexpectedError : NoErrorHere } + +type UnexpectedError = T +type NoErrorHere = T + + +//// [intersectionWithUnionConstraint.js] +"use strict"; +function f1(x) { + // Combined constraint of 'T & U' is 'string | number' + var y = x; +} +function f2(x) { + var y1 = x; // Error + var y2 = x; // Error + var y3 = x; + var y4 = x; // Error + var y5 = x; // Error + var y6 = x; // Error +} +function f3(x) { + var y = x; +} +function f4(x) { + var y = x; +} +function f5(x) { + var y = x; +} diff --git a/tests/baselines/reference/intersectionWithUnionConstraint.symbols b/tests/baselines/reference/intersectionWithUnionConstraint.symbols new file mode 100644 index 00000000000..0b7d7455977 --- /dev/null +++ b/tests/baselines/reference/intersectionWithUnionConstraint.symbols @@ -0,0 +1,114 @@ +=== tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts === +function f1(x: T & U) { +>f1 : Symbol(f1, Decl(intersectionWithUnionConstraint.ts, 0, 0)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 0, 12)) +>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 0, 38)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 0, 66)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 0, 12)) +>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 0, 38)) + + // Combined constraint of 'T & U' is 'string | number' + let y: string | number = x; +>y : Symbol(y, Decl(intersectionWithUnionConstraint.ts, 2, 7)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 0, 66)) +} + +function f2(x: T & U) { +>f2 : Symbol(f2, Decl(intersectionWithUnionConstraint.ts, 3, 1)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 5, 12)) +>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 5, 50)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 5, 88)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 5, 12)) +>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 5, 50)) + + let y1: string | number = x; // Error +>y1 : Symbol(y1, Decl(intersectionWithUnionConstraint.ts, 6, 7)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 5, 88)) + + let y2: string | null = x; // Error +>y2 : Symbol(y2, Decl(intersectionWithUnionConstraint.ts, 7, 7)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 5, 88)) + + let y3: string | undefined = x; +>y3 : Symbol(y3, Decl(intersectionWithUnionConstraint.ts, 8, 7)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 5, 88)) + + let y4: number | null = x; // Error +>y4 : Symbol(y4, Decl(intersectionWithUnionConstraint.ts, 9, 7)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 5, 88)) + + let y5: number | undefined = x; // Error +>y5 : Symbol(y5, Decl(intersectionWithUnionConstraint.ts, 10, 7)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 5, 88)) + + let y6: null | undefined = x; // Error +>y6 : Symbol(y6, Decl(intersectionWithUnionConstraint.ts, 11, 7)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 5, 88)) +} + +type T1 = (string | number | undefined) & (string | null | undefined); // string | undefined +>T1 : Symbol(T1, Decl(intersectionWithUnionConstraint.ts, 12, 1)) + +function f3(x: T & (number | object | undefined)) { +>f3 : Symbol(f3, Decl(intersectionWithUnionConstraint.ts, 14, 70)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 16, 12)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 16, 51)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 16, 12)) + + const y: number | undefined = x; +>y : Symbol(y, Decl(intersectionWithUnionConstraint.ts, 17, 9)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 16, 51)) +} + +function f4(x: T & (number | object)) { +>f4 : Symbol(f4, Decl(intersectionWithUnionConstraint.ts, 18, 1)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 20, 12)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 20, 39)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 20, 12)) + + const y: number = x; +>y : Symbol(y, Decl(intersectionWithUnionConstraint.ts, 21, 9)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 20, 39)) +} + +function f5(x: keyof T & U) { +>f5 : Symbol(f5, Decl(intersectionWithUnionConstraint.ts, 22, 1)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 24, 12)) +>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 24, 14)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 24, 12)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 24, 34)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 24, 12)) +>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 24, 14)) + + let y: keyof any = x; +>y : Symbol(y, Decl(intersectionWithUnionConstraint.ts, 25, 7)) +>x : Symbol(x, Decl(intersectionWithUnionConstraint.ts, 24, 34)) +} + +// Repro from #23648 + +type Example = { [K in keyof T]: K extends keyof U ? UnexpectedError : NoErrorHere } +>Example : Symbol(Example, Decl(intersectionWithUnionConstraint.ts, 26, 1)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 30, 13)) +>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 30, 15)) +>K : Symbol(K, Decl(intersectionWithUnionConstraint.ts, 30, 24)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 30, 13)) +>K : Symbol(K, Decl(intersectionWithUnionConstraint.ts, 30, 24)) +>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 30, 15)) +>UnexpectedError : Symbol(UnexpectedError, Decl(intersectionWithUnionConstraint.ts, 30, 96)) +>K : Symbol(K, Decl(intersectionWithUnionConstraint.ts, 30, 24)) +>NoErrorHere : Symbol(NoErrorHere, Decl(intersectionWithUnionConstraint.ts, 32, 47)) +>K : Symbol(K, Decl(intersectionWithUnionConstraint.ts, 30, 24)) + +type UnexpectedError = T +>UnexpectedError : Symbol(UnexpectedError, Decl(intersectionWithUnionConstraint.ts, 30, 96)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 32, 21)) +>PropertyKey : Symbol(PropertyKey, Decl(lib.d.ts, --, --)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 32, 21)) + +type NoErrorHere = T +>NoErrorHere : Symbol(NoErrorHere, Decl(intersectionWithUnionConstraint.ts, 32, 47)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 33, 17)) +>PropertyKey : Symbol(PropertyKey, Decl(lib.d.ts, --, --)) +>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 33, 17)) + diff --git a/tests/baselines/reference/intersectionWithUnionConstraint.types b/tests/baselines/reference/intersectionWithUnionConstraint.types new file mode 100644 index 00000000000..bef278feba1 --- /dev/null +++ b/tests/baselines/reference/intersectionWithUnionConstraint.types @@ -0,0 +1,119 @@ +=== tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts === +function f1(x: T & U) { +>f1 : (x: T & U) => void +>T : T +>U : U +>x : T & U +>T : T +>U : U + + // Combined constraint of 'T & U' is 'string | number' + let y: string | number = x; +>y : string | number +>x : T & U +} + +function f2(x: T & U) { +>f2 : (x: T & U) => void +>T : T +>U : U +>null : null +>x : T & U +>T : T +>U : U + + let y1: string | number = x; // Error +>y1 : string | number +>x : T & U + + let y2: string | null = x; // Error +>y2 : string | null +>null : null +>x : T & U + + let y3: string | undefined = x; +>y3 : string | undefined +>x : T & U + + let y4: number | null = x; // Error +>y4 : number | null +>null : null +>x : T & U + + let y5: number | undefined = x; // Error +>y5 : number | undefined +>x : T & U + + let y6: null | undefined = x; // Error +>y6 : null | undefined +>null : null +>x : T & U +} + +type T1 = (string | number | undefined) & (string | null | undefined); // string | undefined +>T1 : string | undefined +>null : null + +function f3(x: T & (number | object | undefined)) { +>f3 : (x: (T & undefined) | (T & number) | (T & object)) => void +>T : T +>x : (T & undefined) | (T & number) | (T & object) +>T : T + + const y: number | undefined = x; +>y : number | undefined +>x : (T & undefined) | (T & number) | (T & object) +} + +function f4(x: T & (number | object)) { +>f4 : (x: (T & number) | (T & object)) => void +>T : T +>x : (T & number) | (T & object) +>T : T + + const y: number = x; +>y : number +>x : (T & number) | (T & object) +} + +function f5(x: keyof T & U) { +>f5 : (x: keyof T & U) => void +>T : T +>U : U +>T : T +>x : keyof T & U +>T : T +>U : U + + let y: keyof any = x; +>y : string | number | symbol +>x : keyof T & U +} + +// Repro from #23648 + +type Example = { [K in keyof T]: K extends keyof U ? UnexpectedError : NoErrorHere } +>Example : Example +>T : T +>U : U +>K : K +>T : T +>K : K +>U : U +>UnexpectedError : T +>K : K +>NoErrorHere : T +>K : K + +type UnexpectedError = T +>UnexpectedError : T +>T : T +>PropertyKey : string | number | symbol +>T : T + +type NoErrorHere = T +>NoErrorHere : T +>T : T +>PropertyKey : string | number | symbol +>T : T + diff --git a/tests/baselines/reference/jsdocTemplateConstructorFunction2.errors.txt b/tests/baselines/reference/jsdocTemplateConstructorFunction2.errors.txt index db54928b288..6a8e45566ec 100644 --- a/tests/baselines/reference/jsdocTemplateConstructorFunction2.errors.txt +++ b/tests/baselines/reference/jsdocTemplateConstructorFunction2.errors.txt @@ -1,7 +1,8 @@ tests/cases/conformance/jsdoc/templateTagWithNestedTypeLiteral.js(21,1): error TS2322: Type 'false' is not assignable to type 'number'. +tests/cases/conformance/jsdoc/templateTagWithNestedTypeLiteral.js(26,15): error TS2304: Cannot find name 'T'. -==== tests/cases/conformance/jsdoc/templateTagWithNestedTypeLiteral.js (1 errors) ==== +==== tests/cases/conformance/jsdoc/templateTagWithNestedTypeLiteral.js (2 errors) ==== /** * @template {T} * @param {T} t @@ -25,4 +26,14 @@ tests/cases/conformance/jsdoc/templateTagWithNestedTypeLiteral.js(21,1): error T z.u = false ~~~ !!! error TS2322: Type 'false' is not assignable to type 'number'. + + // lookup in typedef should not crash the compiler, even when the type is unknown + /** + * @typedef {Object} A + * @property {T} value + ~ +!!! error TS2304: Cannot find name 'T'. + */ + /** @type {A} */ + const options = { value: null }; \ No newline at end of file diff --git a/tests/baselines/reference/jsdocTemplateConstructorFunction2.symbols b/tests/baselines/reference/jsdocTemplateConstructorFunction2.symbols index 1913ee53cdf..c65570f84c4 100644 --- a/tests/baselines/reference/jsdocTemplateConstructorFunction2.symbols +++ b/tests/baselines/reference/jsdocTemplateConstructorFunction2.symbols @@ -54,3 +54,13 @@ z.u = false >z : Symbol(z, Decl(templateTagWithNestedTypeLiteral.js, 18, 3)) >u : Symbol(Zet.u, Decl(templateTagWithNestedTypeLiteral.js, 4, 17), Decl(templateTagWithNestedTypeLiteral.js, 14, 36)) +// lookup in typedef should not crash the compiler, even when the type is unknown +/** + * @typedef {Object} A + * @property {T} value + */ +/** @type {A} */ +const options = { value: null }; +>options : Symbol(options, Decl(templateTagWithNestedTypeLiteral.js, 28, 5)) +>value : Symbol(value, Decl(templateTagWithNestedTypeLiteral.js, 28, 17)) + diff --git a/tests/baselines/reference/jsdocTemplateConstructorFunction2.types b/tests/baselines/reference/jsdocTemplateConstructorFunction2.types index 9f0a55289f3..5737f8caaf9 100644 --- a/tests/baselines/reference/jsdocTemplateConstructorFunction2.types +++ b/tests/baselines/reference/jsdocTemplateConstructorFunction2.types @@ -72,3 +72,15 @@ z.u = false >u : number >false : false +// lookup in typedef should not crash the compiler, even when the type is unknown +/** + * @typedef {Object} A + * @property {T} value + */ +/** @type {A} */ +const options = { value: null }; +>options : { value: any; } +>{ value: null } : { value: null; } +>value : null +>null : null + diff --git a/tests/baselines/reference/jsdocTemplateTag.errors.txt b/tests/baselines/reference/jsdocTemplateTag.errors.txt new file mode 100644 index 00000000000..c8b3e92f8c0 --- /dev/null +++ b/tests/baselines/reference/jsdocTemplateTag.errors.txt @@ -0,0 +1,30 @@ +tests/cases/conformance/jsdoc/forgot.js(23,19): error TS2339: Property 'animate' does not exist on type 'Element'. + + +==== tests/cases/conformance/jsdoc/forgot.js (1 errors) ==== + /** + * @param {T} a + * @template T + */ + function f(a) { + return () => a + } + let n = f(1)() + + /** + * @param {T} a + * @template T + * @returns {function(): T} + */ + function g(a) { + return () => a + } + let s = g('hi')() + + /** + * @param {Array.} keyframes - Can't look up types on Element since it's a global in another file. (But it shouldn't crash). + */ + Element.prototype.animate = function(keyframes) {}; + ~~~~~~~ +!!! error TS2339: Property 'animate' does not exist on type 'Element'. + \ No newline at end of file diff --git a/tests/baselines/reference/jsdocTemplateTag.symbols b/tests/baselines/reference/jsdocTemplateTag.symbols index 98eee628178..235f26c330e 100644 --- a/tests/baselines/reference/jsdocTemplateTag.symbols +++ b/tests/baselines/reference/jsdocTemplateTag.symbols @@ -30,3 +30,12 @@ let s = g('hi')() >s : Symbol(s, Decl(forgot.js, 17, 3)) >g : Symbol(g, Decl(forgot.js, 7, 14)) +/** + * @param {Array.} keyframes - Can't look up types on Element since it's a global in another file. (But it shouldn't crash). + */ +Element.prototype.animate = function(keyframes) {}; +>Element.prototype : Symbol(prototype, Decl(lib.dom.d.ts, --, --)) +>Element : Symbol(Element, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>prototype : Symbol(prototype, Decl(lib.dom.d.ts, --, --)) +>keyframes : Symbol(keyframes, Decl(forgot.js, 22, 37)) + diff --git a/tests/baselines/reference/jsdocTemplateTag.types b/tests/baselines/reference/jsdocTemplateTag.types index b1d8c46720d..7917329b3e6 100644 --- a/tests/baselines/reference/jsdocTemplateTag.types +++ b/tests/baselines/reference/jsdocTemplateTag.types @@ -38,3 +38,16 @@ let s = g('hi')() >g : (a: T) => () => T >'hi' : "hi" +/** + * @param {Array.} keyframes - Can't look up types on Element since it's a global in another file. (But it shouldn't crash). + */ +Element.prototype.animate = function(keyframes) {}; +>Element.prototype.animate = function(keyframes) {} : (keyframes: any[]) => void +>Element.prototype.animate : any +>Element.prototype : Element +>Element : { new (): Element; prototype: Element; } +>prototype : Element +>animate : any +>function(keyframes) {} : (keyframes: any[]) => void +>keyframes : any[] + diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index f0af336563c..a343b1e24fc 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -566,6 +566,15 @@ type Predicates = { [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] } +// Repros from #23592 + +type Example = { [K in keyof T]: T[K]["prop"] }; +type Result = Example<{ a: { prop: string }; b: { prop: number } }>; + +type Helper2 = { [K in keyof T]: Extract }; +type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; +type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; + // Repro from #23618 type DBBoolTable = { [k in K]: 0 | 1 } @@ -1241,6 +1250,37 @@ declare function f3>(t: T, k: K, tk: T[K]) declare type Predicates = { [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T]; }; +declare type Example = { + [K in keyof T]: T[K]["prop"]; +}; +declare type Result = Example<{ + a: { + prop: string; + }; + b: { + prop: number; + }; +}>; +declare type Helper2 = { + [K in keyof T]: Extract; +}; +declare type Example2 = { + [K in keyof Helper2]: Helper2[K]["prop"]; +}; +declare type Result2 = Example2<{ + 1: { + prop: string; + }; + 2: { + prop: number; + }; +}>; declare type DBBoolTable = { [k in K]: 0 | 1; }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.symbols b/tests/baselines/reference/keyofAndIndexedAccess.symbols index 27c7128e42d..5c0b45d81fb 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.symbols +++ b/tests/baselines/reference/keyofAndIndexedAccess.symbols @@ -2010,64 +2010,113 @@ type Predicates = { >T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 564, 3)) } +// Repros from #23592 + +type Example = { [K in keyof T]: T[K]["prop"] }; +>Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 565, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 569, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 569, 26)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 569, 13)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 569, 42)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 569, 63)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 569, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 569, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 569, 63)) + +type Result = Example<{ a: { prop: string }; b: { prop: number } }>; +>Result : Symbol(Result, Decl(keyofAndIndexedAccess.ts, 569, 93)) +>Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 565, 1)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 570, 23)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 570, 28)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 570, 44)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 570, 49)) + +type Helper2 = { [K in keyof T]: Extract }; +>Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 570, 68)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 572, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 572, 21)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 572, 13)) +>Extract : Symbol(Extract, Decl(lib.d.ts, --, --)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 572, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 572, 21)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 572, 51)) + +type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; +>Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 572, 67)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 573, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 573, 22)) +>Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 570, 68)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 573, 14)) +>Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 570, 68)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 573, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 573, 22)) + +type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; +>Result2 : Symbol(Result2, Decl(keyofAndIndexedAccess.ts, 573, 70)) +>Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 572, 67)) +>1 : Symbol(1, Decl(keyofAndIndexedAccess.ts, 574, 25)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 574, 30)) +>2 : Symbol(2, Decl(keyofAndIndexedAccess.ts, 574, 46)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 574, 51)) + // Repro from #23618 type DBBoolTable = { [k in K]: 0 | 1 } ->DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 565, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 569, 17)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 569, 40)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 569, 17)) +>DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 574, 70)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 578, 17)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 578, 40)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 578, 17)) enum Flag { ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 569, 56)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 578, 56)) FLAG_1 = "flag_1", ->FLAG_1 : Symbol(Flag.FLAG_1, Decl(keyofAndIndexedAccess.ts, 570, 11)) +>FLAG_1 : Symbol(Flag.FLAG_1, Decl(keyofAndIndexedAccess.ts, 579, 11)) FLAG_2 = "flag_2" ->FLAG_2 : Symbol(Flag.FLAG_2, Decl(keyofAndIndexedAccess.ts, 571, 22)) +>FLAG_2 : Symbol(Flag.FLAG_2, Decl(keyofAndIndexedAccess.ts, 580, 22)) } type SimpleDBRecord = { staticField: number } & DBBoolTable ->SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 573, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 575, 20)) ->staticField : Symbol(staticField, Decl(keyofAndIndexedAccess.ts, 575, 44)) ->DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 565, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 575, 20)) +>SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 582, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 584, 20)) +>staticField : Symbol(staticField, Decl(keyofAndIndexedAccess.ts, 584, 44)) +>DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 574, 70)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 584, 20)) function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]) { ->getFlagsFromSimpleRecord : Symbol(getFlagsFromSimpleRecord, Decl(keyofAndIndexedAccess.ts, 575, 86)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 576, 34)) ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 576, 55)) ->SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 573, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 576, 34)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 576, 84)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 576, 34)) +>getFlagsFromSimpleRecord : Symbol(getFlagsFromSimpleRecord, Decl(keyofAndIndexedAccess.ts, 584, 86)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 585, 34)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 585, 55)) +>SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 582, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 585, 34)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 585, 84)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 585, 34)) return record[flags[0]]; ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 576, 55)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 576, 84)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 585, 55)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 585, 84)) } type DynamicDBRecord = ({ dynamicField: number } | { dynamicField: string }) & DBBoolTable ->DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 578, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 580, 21)) ->dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 580, 46)) ->dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 580, 73)) ->DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 565, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 580, 21)) +>DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 587, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 589, 21)) +>dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 589, 46)) +>dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 589, 73)) +>DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 574, 70)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 589, 21)) function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]) { ->getFlagsFromDynamicRecord : Symbol(getFlagsFromDynamicRecord, Decl(keyofAndIndexedAccess.ts, 580, 117)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 581, 35)) ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 581, 56)) ->DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 578, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 581, 35)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 581, 86)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 581, 35)) +>getFlagsFromDynamicRecord : Symbol(getFlagsFromDynamicRecord, Decl(keyofAndIndexedAccess.ts, 589, 117)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 590, 35)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 590, 56)) +>DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 587, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 590, 35)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 590, 86)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 590, 35)) return record[flags[0]]; ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 581, 56)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 581, 86)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 590, 56)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 590, 86)) } diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index de35c620d33..51b91526fdb 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -2345,6 +2345,55 @@ type Predicates = { >T : T } +// Repros from #23592 + +type Example = { [K in keyof T]: T[K]["prop"] }; +>Example : Example +>T : T +>K : K +>T : T +>prop : any +>K : K +>T : T +>T : T +>K : K + +type Result = Example<{ a: { prop: string }; b: { prop: number } }>; +>Result : Example<{ a: { prop: string; }; b: { prop: number; }; }> +>Example : Example +>a : { prop: string; } +>prop : string +>b : { prop: number; } +>prop : number + +type Helper2 = { [K in keyof T]: Extract }; +>Helper2 : Helper2 +>T : T +>K : K +>T : T +>Extract : Extract +>T : T +>K : K +>prop : any + +type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; +>Example2 : Example2 +>T : T +>K : K +>Helper2 : Helper2 +>T : T +>Helper2 : Helper2 +>T : T +>K : K + +type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; +>Result2 : Example2<{ 1: { prop: string; }; 2: { prop: number; }; }> +>Example2 : Example2 +>1 : { prop: string; } +>prop : string +>2 : { prop: number; } +>prop : number + // Repro from #23618 type DBBoolTable = { [k in K]: 0 | 1 } diff --git a/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt b/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt index bbd4685a492..c74c90c510f 100644 --- a/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt +++ b/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt @@ -44,6 +44,7 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(87,5): error tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(103,9): error TS2322: Type 'Extract' is not assignable to type 'K'. Type 'string & keyof T' is not assignable to type 'K'. Type 'string' is not assignable to type 'K'. + Type 'string' is not assignable to type 'K'. tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(105,9): error TS2322: Type 'T[Extract]' is not assignable to type 'T[K]'. Type 'Extract' is not assignable to type 'K'. tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(108,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. @@ -55,6 +56,7 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(114,5): error Type 'Extract' is not assignable to type 'J'. Type 'string & keyof T' is not assignable to type 'J'. Type 'string' is not assignable to type 'J'. + Type 'string' is not assignable to type 'J'. tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(117,5): error TS2322: Type 'T[K]' is not assignable to type 'U[J]'. Type 'T' is not assignable to type 'U'. @@ -238,6 +240,7 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(117,5): error !!! error TS2322: Type 'Extract' is not assignable to type 'K'. !!! error TS2322: Type 'string & keyof T' is not assignable to type 'K'. !!! error TS2322: Type 'string' is not assignable to type 'K'. +!!! error TS2322: Type 'string' is not assignable to type 'K'. t[key] = tk; // ok, T[K] ==> T[keyof T] tk = t[key]; // error, T[keyof T] =/=> T[K] ~~ @@ -264,6 +267,7 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(117,5): error !!! error TS2322: Type 'Extract' is not assignable to type 'J'. !!! error TS2322: Type 'string & keyof T' is not assignable to type 'J'. !!! error TS2322: Type 'string' is not assignable to type 'J'. +!!! error TS2322: Type 'string' is not assignable to type 'J'. tk = uj; uj = tk; // error diff --git a/tests/baselines/reference/keyofAndIndexedAccessErrors.types b/tests/baselines/reference/keyofAndIndexedAccessErrors.types index 6a474c18107..6f90eb2c187 100644 --- a/tests/baselines/reference/keyofAndIndexedAccessErrors.types +++ b/tests/baselines/reference/keyofAndIndexedAccessErrors.types @@ -34,19 +34,19 @@ type T02 = keyof keyof Object; >Object : Object type T03 = keyof keyof keyof Object; ->T03 : "toString" | "valueOf" | ("toString" & number) | ("toLocaleString" & number) | ("valueOf" & number) | ("toFixed" & number) | ("toExponential" & number) | ("toPrecision" & number) +>T03 : "toString" | "valueOf" >Object : Object type T04 = keyof keyof keyof keyof Object; ->T04 : number | "length" | "toString" | "valueOf" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" | ("toString" & number) | ("valueOf" & number) | (number & "length") | (number & "toString") | (number & "toLocaleString") | (number & "valueOf") | (number & "charAt") | (number & "charCodeAt") | (number & "concat") | (number & "indexOf") | (number & "lastIndexOf") | (number & "localeCompare") | (number & "match") | (number & "replace") | (number & "search") | (number & "slice") | (number & "split") | (number & "substring") | (number & "toLowerCase") | (number & "toLocaleLowerCase") | (number & "toUpperCase") | (number & "toLocaleUpperCase") | (number & "trim") | (number & "substr") | (number & "toFixed") | (number & "toExponential") | (number & "toPrecision") | ("length" & number) | ("charAt" & number) | ("charCodeAt" & number) | ("concat" & number) | ("indexOf" & number) | ("lastIndexOf" & number) | ("localeCompare" & number) | ("match" & number) | ("replace" & number) | ("search" & number) | ("slice" & number) | ("split" & number) | ("substring" & number) | ("toLowerCase" & number) | ("toLocaleLowerCase" & number) | ("toUpperCase" & number) | ("toLocaleUpperCase" & number) | ("trim" & number) | ("substr" & number) +>T04 : number | "length" | "toString" | "valueOf" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" >Object : Object type T05 = keyof keyof keyof keyof keyof Object; ->T05 : "toString" | "valueOf" | ("toString" & number) | ("toLocaleString" & number) | ("valueOf" & number) | ("toFixed" & number) | ("toExponential" & number) | ("toPrecision" & number) +>T05 : "toString" | "valueOf" >Object : Object type T06 = keyof keyof keyof keyof keyof keyof Object; ->T06 : number | "length" | "toString" | "valueOf" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" | ("toString" & number) | ("valueOf" & number) | (number & "length") | (number & "toString") | (number & "toLocaleString") | (number & "valueOf") | (number & "charAt") | (number & "charCodeAt") | (number & "concat") | (number & "indexOf") | (number & "lastIndexOf") | (number & "localeCompare") | (number & "match") | (number & "replace") | (number & "search") | (number & "slice") | (number & "split") | (number & "substring") | (number & "toLowerCase") | (number & "toLocaleLowerCase") | (number & "toUpperCase") | (number & "toLocaleUpperCase") | (number & "trim") | (number & "substr") | (number & "toFixed") | (number & "toExponential") | (number & "toPrecision") | ("length" & number) | ("charAt" & number) | ("charCodeAt" & number) | ("concat" & number) | ("indexOf" & number) | ("lastIndexOf" & number) | ("localeCompare" & number) | ("match" & number) | ("replace" & number) | ("search" & number) | ("slice" & number) | ("split" & number) | ("substring" & number) | ("toLowerCase" & number) | ("toLocaleLowerCase" & number) | ("toUpperCase" & number) | ("toLocaleUpperCase" & number) | ("trim" & number) | ("substr" & number) +>T06 : number | "length" | "toString" | "valueOf" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" >Object : Object type T10 = Shape["name"]; diff --git a/tests/baselines/reference/noCrashOnThisTypeUsage.js b/tests/baselines/reference/noCrashOnThisTypeUsage.js new file mode 100644 index 00000000000..32fb972c865 --- /dev/null +++ b/tests/baselines/reference/noCrashOnThisTypeUsage.js @@ -0,0 +1,48 @@ +//// [noCrashOnThisTypeUsage.ts] +interface IListenable { + changeListeners: Function[] | null + observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean): void +} + +function notifyListeners(listenable: IListenable, change: T) { +} + +export class ObservableValue { + constructor( + public value: T + ) { + const newValue: T = value; + const oldValue: any = null; + notifyListeners(this, { + type: "update", + object: this, + newValue, + oldValue + }); + } + changeListeners: Function[] | null = []; + observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean) {} +} + +//// [noCrashOnThisTypeUsage.js] +"use strict"; +exports.__esModule = true; +function notifyListeners(listenable, change) { +} +var ObservableValue = /** @class */ (function () { + function ObservableValue(value) { + this.value = value; + this.changeListeners = []; + var newValue = value; + var oldValue = null; + notifyListeners(this, { + type: "update", + object: this, + newValue: newValue, + oldValue: oldValue + }); + } + ObservableValue.prototype.observe = function (handler, fireImmediately) { }; + return ObservableValue; +}()); +exports.ObservableValue = ObservableValue; diff --git a/tests/baselines/reference/noCrashOnThisTypeUsage.symbols b/tests/baselines/reference/noCrashOnThisTypeUsage.symbols new file mode 100644 index 00000000000..84ab25a3392 --- /dev/null +++ b/tests/baselines/reference/noCrashOnThisTypeUsage.symbols @@ -0,0 +1,73 @@ +=== tests/cases/compiler/noCrashOnThisTypeUsage.ts === +interface IListenable { +>IListenable : Symbol(IListenable, Decl(noCrashOnThisTypeUsage.ts, 0, 0)) + + changeListeners: Function[] | null +>changeListeners : Symbol(IListenable.changeListeners, Decl(noCrashOnThisTypeUsage.ts, 0, 23)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean): void +>observe : Symbol(IListenable.observe, Decl(noCrashOnThisTypeUsage.ts, 1, 38)) +>handler : Symbol(handler, Decl(noCrashOnThisTypeUsage.ts, 2, 12)) +>change : Symbol(change, Decl(noCrashOnThisTypeUsage.ts, 2, 22)) +>oldValue : Symbol(oldValue, Decl(noCrashOnThisTypeUsage.ts, 2, 34)) +>fireImmediately : Symbol(fireImmediately, Decl(noCrashOnThisTypeUsage.ts, 2, 59)) +} + +function notifyListeners(listenable: IListenable, change: T) { +>notifyListeners : Symbol(notifyListeners, Decl(noCrashOnThisTypeUsage.ts, 3, 1)) +>T : Symbol(T, Decl(noCrashOnThisTypeUsage.ts, 5, 25)) +>listenable : Symbol(listenable, Decl(noCrashOnThisTypeUsage.ts, 5, 28)) +>IListenable : Symbol(IListenable, Decl(noCrashOnThisTypeUsage.ts, 0, 0)) +>change : Symbol(change, Decl(noCrashOnThisTypeUsage.ts, 5, 52)) +>T : Symbol(T, Decl(noCrashOnThisTypeUsage.ts, 5, 25)) +} + +export class ObservableValue { +>ObservableValue : Symbol(ObservableValue, Decl(noCrashOnThisTypeUsage.ts, 6, 1)) +>T : Symbol(T, Decl(noCrashOnThisTypeUsage.ts, 8, 29)) + + constructor( + public value: T +>value : Symbol(ObservableValue.value, Decl(noCrashOnThisTypeUsage.ts, 9, 16)) +>T : Symbol(T, Decl(noCrashOnThisTypeUsage.ts, 8, 29)) + + ) { + const newValue: T = value; +>newValue : Symbol(newValue, Decl(noCrashOnThisTypeUsage.ts, 12, 13)) +>T : Symbol(T, Decl(noCrashOnThisTypeUsage.ts, 8, 29)) +>value : Symbol(value, Decl(noCrashOnThisTypeUsage.ts, 9, 16)) + + const oldValue: any = null; +>oldValue : Symbol(oldValue, Decl(noCrashOnThisTypeUsage.ts, 13, 13)) + + notifyListeners(this, { +>notifyListeners : Symbol(notifyListeners, Decl(noCrashOnThisTypeUsage.ts, 3, 1)) +>this : Symbol(ObservableValue, Decl(noCrashOnThisTypeUsage.ts, 6, 1)) + + type: "update", +>type : Symbol(type, Decl(noCrashOnThisTypeUsage.ts, 14, 31)) + + object: this, +>object : Symbol(object, Decl(noCrashOnThisTypeUsage.ts, 15, 27)) +>this : Symbol(ObservableValue, Decl(noCrashOnThisTypeUsage.ts, 6, 1)) + + newValue, +>newValue : Symbol(newValue, Decl(noCrashOnThisTypeUsage.ts, 16, 25)) + + oldValue +>oldValue : Symbol(oldValue, Decl(noCrashOnThisTypeUsage.ts, 17, 21)) + + }); + } + changeListeners: Function[] | null = []; +>changeListeners : Symbol(ObservableValue.changeListeners, Decl(noCrashOnThisTypeUsage.ts, 20, 5)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean) {} +>observe : Symbol(ObservableValue.observe, Decl(noCrashOnThisTypeUsage.ts, 21, 44)) +>handler : Symbol(handler, Decl(noCrashOnThisTypeUsage.ts, 22, 12)) +>change : Symbol(change, Decl(noCrashOnThisTypeUsage.ts, 22, 22)) +>oldValue : Symbol(oldValue, Decl(noCrashOnThisTypeUsage.ts, 22, 34)) +>fireImmediately : Symbol(fireImmediately, Decl(noCrashOnThisTypeUsage.ts, 22, 59)) +} diff --git a/tests/baselines/reference/noCrashOnThisTypeUsage.types b/tests/baselines/reference/noCrashOnThisTypeUsage.types new file mode 100644 index 00000000000..81851f96a5e --- /dev/null +++ b/tests/baselines/reference/noCrashOnThisTypeUsage.types @@ -0,0 +1,80 @@ +=== tests/cases/compiler/noCrashOnThisTypeUsage.ts === +interface IListenable { +>IListenable : IListenable + + changeListeners: Function[] | null +>changeListeners : Function[] | null +>Function : Function +>null : null + + observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean): void +>observe : (handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean | undefined) => void +>handler : (change: any, oldValue?: any) => void +>change : any +>oldValue : any +>fireImmediately : boolean | undefined +} + +function notifyListeners(listenable: IListenable, change: T) { +>notifyListeners : (listenable: IListenable, change: T) => void +>T : T +>listenable : IListenable +>IListenable : IListenable +>change : T +>T : T +} + +export class ObservableValue { +>ObservableValue : ObservableValue +>T : T + + constructor( + public value: T +>value : T +>T : T + + ) { + const newValue: T = value; +>newValue : T +>T : T +>value : T + + const oldValue: any = null; +>oldValue : any +>null : null + + notifyListeners(this, { +>notifyListeners(this, { type: "update", object: this, newValue, oldValue }) : void +>notifyListeners : (listenable: IListenable, change: T) => void +>this : this +>{ type: "update", object: this, newValue, oldValue } : { type: string; object: this; newValue: T; oldValue: any; } + + type: "update", +>type : string +>"update" : "update" + + object: this, +>object : this +>this : this + + newValue, +>newValue : T + + oldValue +>oldValue : any + + }); + } + changeListeners: Function[] | null = []; +>changeListeners : Function[] | null +>Function : Function +>null : null +>[] : never[] + + observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean) {} +>observe : (handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean | undefined) => void +>handler : (change: any, oldValue?: any) => void +>change : any +>oldValue : any +>fireImmediately : boolean | undefined +} diff --git a/tests/baselines/reference/objectRestReadonly.js b/tests/baselines/reference/objectRestReadonly.js new file mode 100644 index 00000000000..a940dbf52cc --- /dev/null +++ b/tests/baselines/reference/objectRestReadonly.js @@ -0,0 +1,36 @@ +//// [objectRestReadonly.ts] +// #23734 +type ObjType = { + foo: string + baz: string + quux: string +} + +const obj: Readonly = { + foo: 'bar', + baz: 'qux', + quux: 'quuz', +} + +const { foo, ...rest } = obj + +delete rest.baz + + +//// [objectRestReadonly.js] +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +var obj = { + foo: 'bar', + baz: 'qux', + quux: 'quuz' +}; +var foo = obj.foo, rest = __rest(obj, ["foo"]); +delete rest.baz; diff --git a/tests/baselines/reference/objectRestReadonly.symbols b/tests/baselines/reference/objectRestReadonly.symbols new file mode 100644 index 00000000000..91c95f915e1 --- /dev/null +++ b/tests/baselines/reference/objectRestReadonly.symbols @@ -0,0 +1,40 @@ +=== tests/cases/conformance/types/rest/objectRestReadonly.ts === +// #23734 +type ObjType = { +>ObjType : Symbol(ObjType, Decl(objectRestReadonly.ts, 0, 0)) + + foo: string +>foo : Symbol(foo, Decl(objectRestReadonly.ts, 1, 16)) + + baz: string +>baz : Symbol(baz, Decl(objectRestReadonly.ts, 2, 13)) + + quux: string +>quux : Symbol(quux, Decl(objectRestReadonly.ts, 3, 13)) +} + +const obj: Readonly = { +>obj : Symbol(obj, Decl(objectRestReadonly.ts, 7, 5)) +>Readonly : Symbol(Readonly, Decl(lib.d.ts, --, --)) +>ObjType : Symbol(ObjType, Decl(objectRestReadonly.ts, 0, 0)) + + foo: 'bar', +>foo : Symbol(foo, Decl(objectRestReadonly.ts, 7, 32)) + + baz: 'qux', +>baz : Symbol(baz, Decl(objectRestReadonly.ts, 8, 13)) + + quux: 'quuz', +>quux : Symbol(quux, Decl(objectRestReadonly.ts, 9, 13)) +} + +const { foo, ...rest } = obj +>foo : Symbol(foo, Decl(objectRestReadonly.ts, 13, 7)) +>rest : Symbol(rest, Decl(objectRestReadonly.ts, 13, 12)) +>obj : Symbol(obj, Decl(objectRestReadonly.ts, 7, 5)) + +delete rest.baz +>rest.baz : Symbol(baz, Decl(objectRestReadonly.ts, 2, 13)) +>rest : Symbol(rest, Decl(objectRestReadonly.ts, 13, 12)) +>baz : Symbol(baz, Decl(objectRestReadonly.ts, 2, 13)) + diff --git a/tests/baselines/reference/objectRestReadonly.types b/tests/baselines/reference/objectRestReadonly.types new file mode 100644 index 00000000000..30fd21e896b --- /dev/null +++ b/tests/baselines/reference/objectRestReadonly.types @@ -0,0 +1,45 @@ +=== tests/cases/conformance/types/rest/objectRestReadonly.ts === +// #23734 +type ObjType = { +>ObjType : ObjType + + foo: string +>foo : string + + baz: string +>baz : string + + quux: string +>quux : string +} + +const obj: Readonly = { +>obj : Readonly +>Readonly : Readonly +>ObjType : ObjType +>{ foo: 'bar', baz: 'qux', quux: 'quuz',} : { foo: string; baz: string; quux: string; } + + foo: 'bar', +>foo : string +>'bar' : "bar" + + baz: 'qux', +>baz : string +>'qux' : "qux" + + quux: 'quuz', +>quux : string +>'quuz' : "quuz" +} + +const { foo, ...rest } = obj +>foo : string +>rest : { baz: string; quux: string; } +>obj : Readonly + +delete rest.baz +>delete rest.baz : boolean +>rest.baz : string +>rest : { baz: string; quux: string; } +>baz : string + diff --git a/tests/baselines/reference/switchCaseWithIntersectionTypes01.errors.txt b/tests/baselines/reference/switchCaseWithIntersectionTypes01.errors.txt index 3aca9d926b7..380e98c3c3d 100644 --- a/tests/baselines/reference/switchCaseWithIntersectionTypes01.errors.txt +++ b/tests/baselines/reference/switchCaseWithIntersectionTypes01.errors.txt @@ -1,10 +1,7 @@ -tests/cases/conformance/types/typeRelationships/comparable/switchCaseWithIntersectionTypes01.ts(18,10): error TS2678: Type '(number & true) | (number & false)' is not comparable to type 'string & number'. - Type 'number & false' is not comparable to type 'string & number'. - Type 'number & false' is not comparable to type 'string'. tests/cases/conformance/types/typeRelationships/comparable/switchCaseWithIntersectionTypes01.ts(22,10): error TS2678: Type 'boolean' is not comparable to type 'string & number'. -==== tests/cases/conformance/types/typeRelationships/comparable/switchCaseWithIntersectionTypes01.ts (2 errors) ==== +==== tests/cases/conformance/types/typeRelationships/comparable/switchCaseWithIntersectionTypes01.ts (1 errors) ==== var strAndNum: string & number; var numAndBool: number & boolean; var str: string; @@ -23,10 +20,6 @@ tests/cases/conformance/types/typeRelationships/comparable/switchCaseWithInterse // Overlap in constituents case numAndBool: - ~~~~~~~~~~ -!!! error TS2678: Type '(number & true) | (number & false)' is not comparable to type 'string & number'. -!!! error TS2678: Type 'number & false' is not comparable to type 'string & number'. -!!! error TS2678: Type 'number & false' is not comparable to type 'string'. break; // No relation diff --git a/tests/baselines/reference/switchCaseWithIntersectionTypes01.types b/tests/baselines/reference/switchCaseWithIntersectionTypes01.types index 4a578f22319..9ba884985dc 100644 --- a/tests/baselines/reference/switchCaseWithIntersectionTypes01.types +++ b/tests/baselines/reference/switchCaseWithIntersectionTypes01.types @@ -3,7 +3,7 @@ var strAndNum: string & number; >strAndNum : string & number var numAndBool: number & boolean; ->numAndBool : (number & true) | (number & false) +>numAndBool : never var str: string; >str : string @@ -34,7 +34,7 @@ switch (strAndNum) { // Overlap in constituents case numAndBool: ->numAndBool : (number & true) | (number & false) +>numAndBool : never break; diff --git a/tests/baselines/reference/typeGuardsWithInstanceOf.types b/tests/baselines/reference/typeGuardsWithInstanceOf.types index 7fce8cd4559..3fd47f43fc3 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOf.types +++ b/tests/baselines/reference/typeGuardsWithInstanceOf.types @@ -25,7 +25,7 @@ if (!(result instanceof RegExp)) { } else if (!result.global) { >!result.global : boolean ->result.global : (string & true) | (string & false) +>result.global : never >result : I & RegExp ->global : (string & true) | (string & false) +>global : never } diff --git a/tests/baselines/reference/user/prettier.log b/tests/baselines/reference/user/prettier.log new file mode 100644 index 00000000000..d2c65743131 --- /dev/null +++ b/tests/baselines/reference/user/prettier.log @@ -0,0 +1,92 @@ +Exit Code: 1 +Standard output: +index.js(3,25): error TS2307: Cannot find module './package.json'. +index.js(138,21): error TS2532: Object is possibly 'undefined'. +src/cli/util.js(262,64): error TS2339: Property 'length' does not exist on type 'Ignore'. +src/cli/util.js(335,52): error TS2339: Property 'length' does not exist on type 'Ignore'. +src/cli/util.js(396,46): error TS2345: Argument of type 'null' is not assignable to parameter of type 'number | undefined'. +src/cli/util.js(403,39): error TS2339: Property 'grey' does not exist on type 'typeof import("/home/nathansa/ts/node_modules/chalk/types/index")'. +src/common/parser-create-error.js(8,9): error TS2339: Property 'loc' does not exist on type 'SyntaxError'. +src/config/resolve-config.js(75,32): error TS2345: Argument of type '{ sync: false; }' is not assignable to parameter of type '{ cache: boolean; sync: boolean; }'. + Property 'cache' is missing in type '{ sync: false; }'. +src/config/resolve-config.js(82,32): error TS2345: Argument of type '{ sync: true; }' is not assignable to parameter of type '{ cache: boolean; sync: boolean; }'. + Property 'cache' is missing in type '{ sync: true; }'. +src/doc/doc-printer.js(213,17): error TS2532: Object is possibly 'undefined'. +src/doc/doc-printer.js(214,18): error TS2532: Object is possibly 'undefined'. +src/doc/doc-printer.js(215,17): error TS2532: Object is possibly 'undefined'. +src/language-css/clean.js(3,30): error TS2307: Cannot find module 'html-tag-names'. +src/language-css/parser-postcss.js(78,32): error TS2345: Argument of type '{ [x: string]: any; groups: never[]; type: string; }' is not assignable to parameter of type 'never'. +src/language-css/parser-postcss.js(88,30): error TS2345: Argument of type '{ [x: string]: any; open: null; close: null; groups: never[]; type: string; }' is not assignable to parameter of type 'never'. +src/language-css/parser-postcss.js(93,30): error TS2345: Argument of type '{ [x: string]: any; groups: never[]; type: string; }' is not assignable to parameter of type 'never'. +src/language-css/parser-postcss.js(100,30): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. +src/language-css/parser-postcss.js(104,28): error TS2345: Argument of type '{ [x: string]: any; groups: never[]; type: string; }' is not assignable to parameter of type 'never'. +src/language-css/parser-postcss.js(407,32): error TS2531: Object is possibly 'null'. +src/language-css/printer-postcss.js(3,30): error TS2307: Cannot find module 'html-tag-names'. +src/language-handlebars/parser-glimmer.js(27,26): error TS2345: Argument of type '{ plugins: { ast: (() => { [x: string]: any; visitor: { [x: string]: any; Program(node: any): voi...' is not assignable to parameter of type 'PreprocessOptions | undefined'. + Type '{ plugins: { ast: (() => { [x: string]: any; visitor: { [x: string]: any; Program(node: any): voi...' is not assignable to type 'PreprocessOptions'. + Types of property 'plugins' are incompatible. + Type '{ ast: (() => { [x: string]: any; visitor: { [x: string]: any; Program(node: any): void; ElementN...' is not assignable to type '{ ast?: ASTPluginBuilder[] | undefined; } | undefined'. + Type '{ ast: (() => { [x: string]: any; visitor: { [x: string]: any; Program(node: any): void; ElementN...' is not assignable to type '{ ast?: ASTPluginBuilder[] | undefined; }'. + Types of property 'ast' are incompatible. + Type '(() => { [x: string]: any; visitor: { [x: string]: any; Program(node: any): void; ElementNode(nod...' is not assignable to type 'ASTPluginBuilder[] | undefined'. + Type '(() => { [x: string]: any; visitor: { [x: string]: any; Program(node: any): void; ElementNode(nod...' is not assignable to type 'ASTPluginBuilder[]'. + Type '() => { [x: string]: any; visitor: { [x: string]: any; Program(node: any): void; ElementNode(node...' is not assignable to type 'ASTPluginBuilder'. + Type '{ [x: string]: any; visitor: { [x: string]: any; Program(node: any): void; ElementNode(node: any)...' is not assignable to type 'ASTPlugin'. + Property 'name' is missing in type '{ [x: string]: any; visitor: { [x: string]: any; Program(node: any): void; ElementNode(node: any)...'. +src/language-handlebars/printer-glimmer.js(270,7): error TS2554: Expected 0-1 arguments, but got 2. +src/language-js/printer-estree.js(99,9): error TS2322: Type '{ [x: string]: any; type: string; }' is not assignable to type '{ [x: string]: any; type: string; parts: any; }'. + Property 'parts' is missing in type '{ [x: string]: any; type: string; }'. +src/language-js/printer-estree.js(302,9): error TS2345: Argument of type '{ [x: string]: any; type: string; parts: any; } | { [x: string]: any; type: string; contents: any...' is not assignable to parameter of type 'ConcatArray'. + Type '{ [x: string]: any; type: string; parts: any; }' is not assignable to type 'ConcatArray'. + Property 'length' is missing in type '{ [x: string]: any; type: string; parts: any; }'. +src/language-js/printer-estree.js(1224,28): error TS2345: Argument of type '{ [x: string]: any; type: string; parts: any; }' is not assignable to parameter of type 'string | ConcatArray'. + Type '{ [x: string]: any; type: string; parts: any; }' is not assignable to type 'ConcatArray'. + Property 'length' is missing in type '{ [x: string]: any; type: string; parts: any; }'. +src/language-js/printer-estree.js(1601,20): error TS2345: Argument of type '" "' is not assignable to parameter of type '{ [x: string]: any; type: string; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(1603,20): error TS2345: Argument of type '{ [x: string]: any; type: string; parts: any; }' is not assignable to parameter of type '{ [x: string]: any; type: string; contents: any; break: boolean; expandedStates: any; }'. + Property 'contents' is missing in type '{ [x: string]: any; type: string; parts: any; }'. +src/language-js/printer-estree.js(1605,18): error TS2345: Argument of type '"while ("' is not assignable to parameter of type '{ [x: string]: any; type: string; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(1614,9): error TS2345: Argument of type '")"' is not assignable to parameter of type '{ [x: string]: any; type: string; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(3293,23): error TS2532: Object is possibly 'undefined'. +src/language-js/printer-estree.js(3294,24): error TS2532: Object is possibly 'undefined'. +src/language-js/printer-estree.js(3647,5): error TS2345: Argument of type '"" | { [x: string]: any; type: string; parts: any; } | { [x: string]: any; type: string; contents...' is not assignable to parameter of type 'string'. + Type '{ [x: string]: any; type: string; parts: any; }' is not assignable to type 'string'. +src/language-js/printer-estree.js(3651,16): error TS2345: Argument of type '{ [x: string]: any; type: string; parts: any; }' is not assignable to parameter of type 'string'. +src/language-js/printer-estree.js(3693,9): error TS2345: Argument of type '{ [x: string]: any; type: string; parts: any; }' is not assignable to parameter of type 'string'. +src/language-js/printer-estree.js(3995,14): error TS2554: Expected 0-2 arguments, but got 3. +src/language-js/printer-estree.js(5034,9): error TS2554: Expected 0-1 arguments, but got 2. +src/language-js/printer-estree.js(5070,7): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type '((childPath: any) => any) | ConcatArray<(childPath: any) => any>'. + Type '(string | number)[]' is not assignable to type 'ConcatArray<(childPath: any) => any>'. + Types of property 'slice' are incompatible. + Type '(start?: number | undefined, end?: number | undefined) => (string | number)[]' is not assignable to type '(start?: number | undefined, end?: number | undefined) => ((childPath: any) => any)[]'. + Type '(string | number)[]' is not assignable to type '((childPath: any) => any)[]'. + Type 'string | number' is not assignable to type '(childPath: any) => any'. + Type 'string' is not assignable to type '(childPath: any) => any'. +src/language-markdown/printer-markdown.js(258,18): error TS2532: Object is possibly 'undefined'. +src/language-markdown/printer-markdown.js(259,17): error TS2532: Object is possibly 'undefined'. +src/language-markdown/printer-markdown.js(283,14): error TS2532: Object is possibly 'undefined'. +src/language-vue/parser-vue.js(54,23): error TS2345: Argument of type '(m: string, g: any) => void' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. + Type 'void' is not assignable to type 'string'. +src/language-vue/parser-vue.js(180,34): error TS2339: Property 'toLowerCase' does not exist on type 'never'. +src/language-vue/parser-vue.js(244,26): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. +src/language-vue/parser-vue.js(393,25): error TS2345: Argument of type '{ [x: string]: any; tag: any; attrs: any; unary: any; start: any; children: never[]; }' is not assignable to parameter of type 'never'. +src/language-vue/parser-vue.js(398,23): error TS2345: Argument of type '{ [x: string]: any; tag: any; attrs: any; unary: any; start: any; children: never[]; }' is not assignable to parameter of type '{ [x: string]: any; tag: string; attrs: never[]; unary: boolean; start: number; contentStart: num...'. + Property 'contentStart' is missing in type '{ [x: string]: any; tag: any; attrs: any; unary: any; start: any; children: never[]; }'. +src/language-vue/parser-vue.js(399,9): error TS2322: Type '{ [x: string]: any; tag: any; attrs: any; unary: any; start: any; children: never[]; }' is not assignable to type '{ [x: string]: any; tag: string; attrs: never[]; unary: boolean; start: number; contentStart: num...'. +src/main/core-options.js(51,43): error TS1005: '}' expected. +src/main/core-options.js(63,5): error TS2322: Type '{ cursorOffset: { since: string; category: string; type: "int"; default: number; range: { start: ...' is not assignable to type '{ [name: string]: { since: string; category: string; type: "boolean" | "path" | "int" | "choice";...'. + Property 'cursorOffset' is incompatible with index signature. + Type '{ since: string; category: string; type: "int"; default: number; range: { start: number; end: num...' is not assignable to type '{ since: string; category: string; type: "boolean" | "path" | "int" | "choice"; array: boolean; d...'. + Object literal may only specify known properties, and 'cliCategory' does not exist in type '{ since: string; category: string; type: "boolean" | "path" | "int" | "choice"; array: boolean; d...'. +src/main/parser.js(61,9): error TS2345: Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType'. + Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType'. + Type 'undefined' is not assignable to type 'PropertyDescriptor'. +src/main/support.js(5,32): error TS2307: Cannot find module '../../package.json'. +src/main/support.js(36,24): error TS2339: Property 'name' does not exist on type 'never'. +src/main/support.js(36,35): error TS2339: Property 'name' does not exist on type 'never'. +src/main/support.js(36,48): error TS2339: Property 'name' does not exist on type 'never'. +src/main/support.js(36,57): error TS2339: Property 'name' does not exist on type 'never'. + + + +Standard error: diff --git a/tests/cases/compiler/doubleMixinConditionalTypeBaseClassWorks.ts b/tests/cases/compiler/doubleMixinConditionalTypeBaseClassWorks.ts new file mode 100644 index 00000000000..616e5f56b3f --- /dev/null +++ b/tests/cases/compiler/doubleMixinConditionalTypeBaseClassWorks.ts @@ -0,0 +1,8 @@ +type Constructor = new (...args: any[]) => {}; + +const Mixin1 = (Base: C) => class extends Base { private _fooPrivate: {}; } + +type FooConstructor = typeof Mixin1 extends (a: Constructor) => infer Cls ? Cls : never; +const Mixin2 = (Base: C) => class extends Base {}; + +class C extends Mixin2(Mixin1(Object)) {} \ No newline at end of file diff --git a/tests/cases/compiler/noCrashOnThisTypeUsage.ts b/tests/cases/compiler/noCrashOnThisTypeUsage.ts new file mode 100644 index 00000000000..7f3832a70d7 --- /dev/null +++ b/tests/cases/compiler/noCrashOnThisTypeUsage.ts @@ -0,0 +1,26 @@ +// @strict: true + +interface IListenable { + changeListeners: Function[] | null + observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean): void +} + +function notifyListeners(listenable: IListenable, change: T) { +} + +export class ObservableValue { + constructor( + public value: T + ) { + const newValue: T = value; + const oldValue: any = null; + notifyListeners(this, { + type: "update", + object: this, + newValue, + oldValue + }); + } + changeListeners: Function[] | null = []; + observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean) {} +} \ No newline at end of file diff --git a/tests/cases/conformance/jsdoc/jsdocTemplateConstructorFunction2.ts b/tests/cases/conformance/jsdoc/jsdocTemplateConstructorFunction2.ts index 750126a05b9..a4f107190ff 100644 --- a/tests/cases/conformance/jsdoc/jsdocTemplateConstructorFunction2.ts +++ b/tests/cases/conformance/jsdoc/jsdocTemplateConstructorFunction2.ts @@ -24,3 +24,11 @@ Zet.prototype.add = function(v, o) { var z = new Zet(1) z.t = 2 z.u = false + +// lookup in typedef should not crash the compiler, even when the type is unknown +/** + * @typedef {Object} A + * @property {T} value + */ +/** @type {A} */ +const options = { value: null }; diff --git a/tests/cases/conformance/jsdoc/jsdocTemplateTag.ts b/tests/cases/conformance/jsdoc/jsdocTemplateTag.ts index 79dc083a952..e69756c0941 100644 --- a/tests/cases/conformance/jsdoc/jsdocTemplateTag.ts +++ b/tests/cases/conformance/jsdoc/jsdocTemplateTag.ts @@ -1,6 +1,7 @@ // @allowJs: true // @checkJs: true // @noEmit: true +// @lib: dom,esnext // @Filename: forgot.js /** * @param {T} a @@ -20,3 +21,8 @@ function g(a) { return () => a } let s = g('hi')() + +/** + * @param {Array.} keyframes - Can't look up types on Element since it's a global in another file. (But it shouldn't crash). + */ +Element.prototype.animate = function(keyframes) {}; diff --git a/tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts new file mode 100644 index 00000000000..800bd368dba --- /dev/null +++ b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts @@ -0,0 +1,16 @@ +// @noEmit: true +// @allowJs: true +// @checkJs: true +// @noImplicitAny: true +// @strictNullChecks: true +// @Filename: a.js +class Base { + constructor() { + this.p = 1 + } +} +class Derived extends Base { + m() { + this.p = 1 + } +} diff --git a/tests/cases/conformance/salsa/inferringClassMembersFromAssignments4.ts b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments4.ts new file mode 100644 index 00000000000..ba443bf8595 --- /dev/null +++ b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments4.ts @@ -0,0 +1,17 @@ +// @noEmit: true +// @allowJs: true +// @checkJs: true +// @noImplicitAny: true +// @strictNullChecks: true +// @Filename: a.js +class Base { + m() { + this.p = 1 + } +} +class Derived extends Base { + m() { + // should be OK, and p should have type number | undefined from its base + this.p = 1 + } +} diff --git a/tests/cases/conformance/salsa/inferringClassMembersFromAssignments5.ts b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments5.ts new file mode 100644 index 00000000000..5044ea396eb --- /dev/null +++ b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments5.ts @@ -0,0 +1,21 @@ +// @noEmit: true +// @allowJs: true +// @checkJs: true +// @noImplicitAny: true +// @strictNullChecks: true +// @Filename: a.js +class Base { + m() { + this.p = 1 + } +} +class Derived extends Base { + constructor() { + super(); + // should be OK, and p should have type number from this assignment + this.p = 1 + } + test() { + return this.p + } +} diff --git a/tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts b/tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts new file mode 100644 index 00000000000..278d72595cd --- /dev/null +++ b/tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts @@ -0,0 +1,36 @@ +// @strict: true + +function f1(x: T & U) { + // Combined constraint of 'T & U' is 'string | number' + let y: string | number = x; +} + +function f2(x: T & U) { + let y1: string | number = x; // Error + let y2: string | null = x; // Error + let y3: string | undefined = x; + let y4: number | null = x; // Error + let y5: number | undefined = x; // Error + let y6: null | undefined = x; // Error +} + +type T1 = (string | number | undefined) & (string | null | undefined); // string | undefined + +function f3(x: T & (number | object | undefined)) { + const y: number | undefined = x; +} + +function f4(x: T & (number | object)) { + const y: number = x; +} + +function f5(x: keyof T & U) { + let y: keyof any = x; +} + +// Repro from #23648 + +type Example = { [K in keyof T]: K extends keyof U ? UnexpectedError : NoErrorHere } + +type UnexpectedError = T +type NoErrorHere = T diff --git a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts index 03d4ae01ea1..23e5cd6a66e 100644 --- a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts +++ b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts @@ -568,6 +568,15 @@ type Predicates = { [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] } +// Repros from #23592 + +type Example = { [K in keyof T]: T[K]["prop"] }; +type Result = Example<{ a: { prop: string }; b: { prop: number } }>; + +type Helper2 = { [K in keyof T]: Extract }; +type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; +type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; + // Repro from #23618 type DBBoolTable = { [k in K]: 0 | 1 } diff --git a/tests/cases/conformance/types/rest/objectRestReadonly.ts b/tests/cases/conformance/types/rest/objectRestReadonly.ts new file mode 100644 index 00000000000..be600620348 --- /dev/null +++ b/tests/cases/conformance/types/rest/objectRestReadonly.ts @@ -0,0 +1,16 @@ +// #23734 +type ObjType = { + foo: string + baz: string + quux: string +} + +const obj: Readonly = { + foo: 'bar', + baz: 'qux', + quux: 'quuz', +} + +const { foo, ...rest } = obj + +delete rest.baz diff --git a/tests/cases/fourslash/codeFixAddMissingMember.ts b/tests/cases/fourslash/codeFixAddMissingMember.ts index f5bdf567b20..c507d8b80c9 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember.ts @@ -11,6 +11,7 @@ verify.codeFix({ index: 0, newFileContent: `class C { foo: number; + method() { this.foo = 10; } diff --git a/tests/cases/fourslash/codeFixAddMissingMember2.ts b/tests/cases/fourslash/codeFixAddMissingMember2.ts index a4b7ffb3bfe..b19632dd104 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember2.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember2.ts @@ -11,6 +11,7 @@ verify.codeFix({ index: 1, newFileContent: `class C { [x: string]: number; + method() { this.foo = 10; } diff --git a/tests/cases/fourslash/codeFixAddMissingMember3.ts b/tests/cases/fourslash/codeFixAddMissingMember3.ts index 82512406985..88ea2efef66 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember3.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember3.ts @@ -11,6 +11,7 @@ verify.codeFix({ index: 0, newFileContent: `class C { static foo: number; + static method() { this.foo = 10; } diff --git a/tests/cases/fourslash/codeFixAddMissingMember_all.ts b/tests/cases/fourslash/codeFixAddMissingMember_all.ts index 5a2f8606f2d..0e7abb79cc2 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember_all.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember_all.ts @@ -17,6 +17,7 @@ verify.codeFixAll({ y(): any { throw new Error("Method not implemented."); } + method() { this.x = 0; this.y(); diff --git a/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts b/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts index 5e5a2895fdc..48455943af5 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts @@ -21,6 +21,7 @@ verify.codeFixAll({ y() { throw new Error("Method not implemented."); } + constructor() { this.x = undefined; } diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethod_comment.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethod_comment.ts new file mode 100644 index 00000000000..909fd4ba7c7 --- /dev/null +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethod_comment.ts @@ -0,0 +1,24 @@ +/// + +////abstract class A { +//// abstract m() : void; +////} +//// +////class B extends A { +//// // comment +////} + +verify.codeFix({ + description: "Implement inherited abstract class", + newFileContent: +`abstract class A { + abstract m() : void; +} + +class B extends A { + m(): void { + throw new Error("Method not implemented."); + } + // comment +}`, +}); diff --git a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts index 4b5be82f870..5da060d3d36 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts @@ -6,7 +6,7 @@ //// method(a: string): Function; //// method(a: string | number, b?: string | number): boolean | Function { return a + b as any; } ////} -////class C implements A {[| |]} +////class C implements A { } verify.codeFix({ description: "Implement interface 'A'", diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts index 88f0d32fe18..8bd180907bf 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts @@ -1,7 +1,7 @@ /// ////interface I { x: T; } -////class C implements I {[| |]} +////class C implements I { } verify.codeFix({ description: "Implement interface 'I'", diff --git a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts index cabf3a2d444..f1bac17b2fa 100644 --- a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts @@ -1,7 +1,7 @@ /// -//// class A {[| -//// |]static foo0() { +//// class A { +//// static foo0() { //// this.m1(1,2,3); //// A.m2(1,2); //// this.prop1 = 10; @@ -12,51 +12,89 @@ verify.codeFix({ description: "Declare static method 'm1'", index: 0, - newRangeContent: ` + newFileContent: +`class A { static m1(arg0: any, arg1: any, arg2: any): any { throw new Error("Method not implemented."); } - `, + + static foo0() { + this.m1(1,2,3); + A.m2(1,2); + this.prop1 = 10; + A.prop2 = "asdf"; + } +}`, }); verify.codeFix({ description: "Declare static method 'm2'", index: 0, - newRangeContent: ` + newFileContent: +`class A { static m2(arg0: any, arg1: any): any { throw new Error("Method not implemented."); } + static m1(arg0: any, arg1: any, arg2: any): any { throw new Error("Method not implemented."); } - `, + + static foo0() { + this.m1(1,2,3); + A.m2(1,2); + this.prop1 = 10; + A.prop2 = "asdf"; + } +}`, }); verify.codeFix({ description: "Declare static property 'prop1'", index: 0, - newRangeContent: ` + newFileContent: +`class A { static prop1: number; + static m2(arg0: any, arg1: any): any { throw new Error("Method not implemented."); } + static m1(arg0: any, arg1: any, arg2: any): any { throw new Error("Method not implemented."); } - `, + + static foo0() { + this.m1(1,2,3); + A.m2(1,2); + this.prop1 = 10; + A.prop2 = "asdf"; + } +}`, }); verify.codeFix({ description: "Declare static property 'prop2'", index: 1, // fix at index 0 is to change the spelling to 'prop1' - newRangeContent: ` + newFileContent: +`class A { static prop2: string; + static prop1: number; + static m2(arg0: any, arg1: any): any { throw new Error("Method not implemented."); } + static m1(arg0: any, arg1: any, arg2: any): any { throw new Error("Method not implemented."); } - `, + + static foo0() { + this.m1(1,2,3); + A.m2(1,2); + this.prop1 = 10; + A.prop2 = "asdf"; + } +}`, }); diff --git a/tests/cases/fourslash/codeFixUndeclaredMethod.ts b/tests/cases/fourslash/codeFixUndeclaredMethod.ts index 70ed58b995b..b85e5fbfdfa 100644 --- a/tests/cases/fourslash/codeFixUndeclaredMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredMethod.ts @@ -1,7 +1,7 @@ /// -//// class A {[| -//// |]constructor() { +//// class A { +//// constructor() { //// this.foo1(1,2,3); //// // 7 type args //// this.foo2<1,2,3,4,5,6,7>(); @@ -13,38 +13,68 @@ verify.codeFix({ description: "Declare method 'foo1'", index: 0, - newRangeContent: ` + newFileContent: +`class A { foo1(arg0: any, arg1: any, arg2: any): any { throw new Error("Method not implemented."); } - `, + + constructor() { + this.foo1(1,2,3); + // 7 type args + this.foo2<1,2,3,4,5,6,7>(); + // 8 type args + this.foo3<1,2,3,4,5,6,7,8>(); + } +}`, }); verify.codeFix({ description: "Declare method 'foo2'", index: 0, - newRangeContent: ` + newFileContent: +`class A { foo2(): any { throw new Error("Method not implemented."); } + foo1(arg0: any, arg1: any, arg2: any): any { throw new Error("Method not implemented."); } - ` + + constructor() { + this.foo1(1,2,3); + // 7 type args + this.foo2<1,2,3,4,5,6,7>(); + // 8 type args + this.foo3<1,2,3,4,5,6,7,8>(); + } +}` }); verify.codeFix({ description: "Declare method 'foo3'", index: 0, - newRangeContent:` + newFileContent: +`class A { foo3(): any { throw new Error("Method not implemented."); } + foo2(): any { throw new Error("Method not implemented."); } + foo1(arg0: any, arg1: any, arg2: any): any { throw new Error("Method not implemented."); } - ` + + constructor() { + this.foo1(1,2,3); + // 7 type args + this.foo2<1,2,3,4,5,6,7>(); + // 8 type args + this.foo3<1,2,3,4,5,6,7,8>(); + } +}` }); diff --git a/tests/cases/fourslash/completionsImport_notFromIndex.ts b/tests/cases/fourslash/completionsImport_notFromIndex.ts new file mode 100644 index 00000000000..c42c768d23d --- /dev/null +++ b/tests/cases/fourslash/completionsImport_notFromIndex.ts @@ -0,0 +1,27 @@ +/// + +// @Filename: /src/a.ts +////export const x = 0; + +// @Filename: /src/index.ts +////export { x } from "./a"; + +// @Filename: /0.ts +////x/*0*/ + +// @Filename: /src/1.ts +////x/*1*/ + +// @Filename: /src/inner/2.ts +////x/*2*/ + +for (const [marker, sourceDisplay] of [["0", "./src"], ["1", "./a"], ["2", "../a"]]) { + goTo.marker(marker); + verify.completionListContains({ name: "x", source: "/src/a" }, "const x: 0", "", "const", /*spanIndex*/ undefined, /*hasAction*/ true, { includeCompletionsForModuleExports: true, sourceDisplay }); + verify.applyCodeActionFromCompletion(marker, { + name: "x", + source: "/src/a", + description: `Import 'x' from module "${sourceDisplay}"`, + newFileContent: `import { x } from "${sourceDisplay}";\n\nx`, + }); +} diff --git a/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess16.ts b/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess16.ts index dd2cc4cf848..03cadfbceec 100644 --- a/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess16.ts +++ b/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess16.ts @@ -17,6 +17,7 @@ edit.applyRefactor({ public set a(value: string) { this._a = value; } + constructor() { } }`, }); diff --git a/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess17.ts b/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess17.ts index ee212b63502..a04932fe68d 100644 --- a/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess17.ts +++ b/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess17.ts @@ -17,6 +17,7 @@ edit.applyRefactor({ protected set a(value: string) { this._a = value; } + constructor() { } }`, }); diff --git a/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess18.ts b/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess18.ts index 37676a8a047..a48361288e0 100644 --- a/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess18.ts +++ b/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess18.ts @@ -17,6 +17,7 @@ edit.applyRefactor({ public set a(value: string) { this._a = value; } + constructor() { } }`, }); diff --git a/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess22.ts b/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess22.ts index 0c6cd0f9844..d1002c2e809 100644 --- a/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess22.ts +++ b/tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess22.ts @@ -18,6 +18,7 @@ edit.applyRefactor({ public set a(value: string) { this._a = value; } + public a_1: number; constructor() { } }`, diff --git a/tests/cases/user/prettier/prettier b/tests/cases/user/prettier/prettier new file mode 160000 index 00000000000..67f1c4877ee --- /dev/null +++ b/tests/cases/user/prettier/prettier @@ -0,0 +1 @@ +Subproject commit 67f1c4877ee1090b66d468a847caccca411a6f82 diff --git a/tests/cases/user/prettier/test.json b/tests/cases/user/prettier/test.json new file mode 100644 index 00000000000..b6495a1b80b --- /dev/null +++ b/tests/cases/user/prettier/test.json @@ -0,0 +1,3 @@ +{ + "types": ["node"] +} diff --git a/tests/cases/user/prettier/tsconfig.json b/tests/cases/user/prettier/tsconfig.json new file mode 100644 index 00000000000..d3b1f270dbc --- /dev/null +++ b/tests/cases/user/prettier/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "noImplicitAny": false, + "noImplicitThis": false, + "maxNodeModuleJsDepth": 0, + "strict": true, + "noEmit": true, + "allowJs": true, + "checkJs": true, + "types": ["node"], + "lib": ["esnext", "dom"], + "target": "esnext", + "module": "commonjs", + "pretty": false, + }, + "include": ["prettier/src"] +}