aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/code/.vscodeignore3
-rw-r--r--editors/code/package-lock.json860
-rw-r--r--editors/code/package.json99
-rw-r--r--editors/code/rollup.config.js4
-rw-r--r--editors/code/rust.tmGrammar.json686
-rw-r--r--editors/code/src/cargo.ts53
-rw-r--r--editors/code/src/client.ts98
-rw-r--r--editors/code/src/commands/index.ts70
-rw-r--r--editors/code/src/commands/join_lines.ts12
-rw-r--r--editors/code/src/commands/on_enter.ts5
-rw-r--r--editors/code/src/commands/runnables.ts17
-rw-r--r--editors/code/src/commands/ssr.ts8
-rw-r--r--editors/code/src/commands/syntax_tree.ts2
-rw-r--r--editors/code/src/config.ts13
-rw-r--r--editors/code/src/main.ts52
-rw-r--r--editors/code/src/rust-analyzer-api.ts8
-rw-r--r--editors/code/tests/runTests.ts43
-rw-r--r--editors/code/tests/unit/index.ts38
-rw-r--r--editors/code/tests/unit/launch_config.test.ts52
-rw-r--r--editors/code/tsconfig.json9
20 files changed, 2004 insertions, 128 deletions
diff --git a/editors/code/.vscodeignore b/editors/code/.vscodeignore
index ac411f8e2..7149ab799 100644
--- a/editors/code/.vscodeignore
+++ b/editors/code/.vscodeignore
@@ -1,7 +1,8 @@
1** 1**
2!out/main.js 2!out/src/main.js
3!package.json 3!package.json
4!package-lock.json 4!package-lock.json
5!ra_syntax_tree.tmGrammar.json 5!ra_syntax_tree.tmGrammar.json
6!rust.tmGrammar.json
6!icon.png 7!icon.png
7!README.md 8!README.md
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json
index 71c627a2a..c322b02c8 100644
--- a/editors/code/package-lock.json
+++ b/editors/code/package-lock.json
@@ -81,22 +81,51 @@
81 "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 81 "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
82 "dev": true 82 "dev": true
83 }, 83 },
84 "@types/events": {
85 "version": "3.0.0",
86 "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
87 "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==",
88 "dev": true
89 },
90 "@types/glob": {
91 "version": "7.1.1",
92 "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
93 "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==",
94 "dev": true,
95 "requires": {
96 "@types/events": "*",
97 "@types/minimatch": "*",
98 "@types/node": "*"
99 }
100 },
84 "@types/json-schema": { 101 "@types/json-schema": {
85 "version": "7.0.4", 102 "version": "7.0.4",
86 "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", 103 "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz",
87 "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", 104 "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==",
88 "dev": true 105 "dev": true
89 }, 106 },
107 "@types/minimatch": {
108 "version": "3.0.3",
109 "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
110 "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
111 "dev": true
112 },
113 "@types/mocha": {
114 "version": "7.0.2",
115 "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz",
116 "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==",
117 "dev": true
118 },
90 "@types/node": { 119 "@types/node": {
91 "version": "12.12.37", 120 "version": "12.12.39",
92 "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.37.tgz", 121 "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.39.tgz",
93 "integrity": "sha512-4mXKoDptrXAwZErQHrLzpe0FN/0Wmf5JRniSVIdwUrtDf9wnmEV1teCNLBo/TwuXhkK/bVegoEn/wmb+x0AuPg==", 122 "integrity": "sha512-pADGfwnDkr6zagDwEiCVE4yQrv7XDkoeVa4OfA9Ju/zRTk6YNDLGtQbkdL4/56mCQQCs4AhNrBIag6jrp7ZuOg==",
94 "dev": true 123 "dev": true
95 }, 124 },
96 "@types/node-fetch": { 125 "@types/node-fetch": {
97 "version": "2.5.6", 126 "version": "2.5.7",
98 "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.6.tgz", 127 "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz",
99 "integrity": "sha512-2w0NTwMWF1d3NJMK0Uiq2UNN8htVCyOWOD0jIPjPgC5Ph/YP4dVhs9YxxcMcuLuwAslz0dVEcZQUaqkLs3IzOQ==", 128 "integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==",
100 "dev": true, 129 "dev": true,
101 "requires": { 130 "requires": {
102 "@types/node": "*", 131 "@types/node": "*",
@@ -113,31 +142,31 @@
113 } 142 }
114 }, 143 },
115 "@types/vscode": { 144 "@types/vscode": {
116 "version": "1.44.0", 145 "version": "1.45.0",
117 "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.44.0.tgz", 146 "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.45.0.tgz",
118 "integrity": "sha512-WJZtZlinE3meRdH+I7wTsIhpz/GLhqEQwmPGeh4s1irWLwMzCeTV8WZ+pgPTwrDXoafVUWwo1LiZ9HJVHFlJSQ==", 147 "integrity": "sha512-b0Gyir7sPBCqiKLygAhn/AYVfzWD+SMPkWltBrIuPEyTOxSU1wVApWY/FcxYO2EWTRacoubTl4+gvZf86RkecA==",
119 "dev": true 148 "dev": true
120 }, 149 },
121 "@typescript-eslint/eslint-plugin": { 150 "@typescript-eslint/eslint-plugin": {
122 "version": "2.29.0", 151 "version": "2.33.0",
123 "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.29.0.tgz", 152 "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.33.0.tgz",
124 "integrity": "sha512-X/YAY7azKirENm4QRpT7OVmzok02cSkqeIcLmdz6gXUQG4Hk0Fi9oBAynSAyNXeGdMRuZvjBa0c1Lu0dn/u6VA==", 153 "integrity": "sha512-QV6P32Btu1sCI/kTqjTNI/8OpCYyvlGjW5vD8MpTIg+HGE5S88HtT1G+880M4bXlvXj/NjsJJG0aGcVh0DdbeQ==",
125 "dev": true, 154 "dev": true,
126 "requires": { 155 "requires": {
127 "@typescript-eslint/experimental-utils": "2.29.0", 156 "@typescript-eslint/experimental-utils": "2.33.0",
128 "functional-red-black-tree": "^1.0.1", 157 "functional-red-black-tree": "^1.0.1",
129 "regexpp": "^3.0.0", 158 "regexpp": "^3.0.0",
130 "tsutils": "^3.17.1" 159 "tsutils": "^3.17.1"
131 } 160 }
132 }, 161 },
133 "@typescript-eslint/experimental-utils": { 162 "@typescript-eslint/experimental-utils": {
134 "version": "2.29.0", 163 "version": "2.33.0",
135 "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.29.0.tgz", 164 "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.33.0.tgz",
136 "integrity": "sha512-H/6VJr6eWYstyqjWXBP2Nn1hQJyvJoFdDtsHxGiD+lEP7piGnGpb/ZQd+z1ZSB1F7dN+WsxUDh8+S4LwI+f3jw==", 165 "integrity": "sha512-qzPM2AuxtMrRq78LwyZa8Qn6gcY8obkIrBs1ehqmQADwkYzTE1Pb4y2W+U3rE/iFkSWcWHG2LS6MJfj6SmHApg==",
137 "dev": true, 166 "dev": true,
138 "requires": { 167 "requires": {
139 "@types/json-schema": "^7.0.3", 168 "@types/json-schema": "^7.0.3",
140 "@typescript-eslint/typescript-estree": "2.29.0", 169 "@typescript-eslint/typescript-estree": "2.33.0",
141 "eslint-scope": "^5.0.0", 170 "eslint-scope": "^5.0.0",
142 "eslint-utils": "^2.0.0" 171 "eslint-utils": "^2.0.0"
143 }, 172 },
@@ -154,21 +183,21 @@
154 } 183 }
155 }, 184 },
156 "@typescript-eslint/parser": { 185 "@typescript-eslint/parser": {
157 "version": "2.29.0", 186 "version": "2.33.0",
158 "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.29.0.tgz", 187 "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.33.0.tgz",
159 "integrity": "sha512-H78M+jcu5Tf6m/5N8iiFblUUv+HJDguMSdFfzwa6vSg9lKR8Mk9BsgeSjO8l2EshKnJKcbv0e8IDDOvSNjl0EA==", 188 "integrity": "sha512-AUtmwUUhJoH6yrtxZMHbRUEMsC2G6z5NSxg9KsROOGqNXasM71I8P2NihtumlWTUCRld70vqIZ6Pm4E5PAziEA==",
160 "dev": true, 189 "dev": true,
161 "requires": { 190 "requires": {
162 "@types/eslint-visitor-keys": "^1.0.0", 191 "@types/eslint-visitor-keys": "^1.0.0",
163 "@typescript-eslint/experimental-utils": "2.29.0", 192 "@typescript-eslint/experimental-utils": "2.33.0",
164 "@typescript-eslint/typescript-estree": "2.29.0", 193 "@typescript-eslint/typescript-estree": "2.33.0",
165 "eslint-visitor-keys": "^1.1.0" 194 "eslint-visitor-keys": "^1.1.0"
166 } 195 }
167 }, 196 },
168 "@typescript-eslint/typescript-estree": { 197 "@typescript-eslint/typescript-estree": {
169 "version": "2.29.0", 198 "version": "2.33.0",
170 "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.29.0.tgz", 199 "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.33.0.tgz",
171 "integrity": "sha512-3YGbtnWy4az16Egy5Fj5CckkVlpIh0MADtAQza+jiMADRSKkjdpzZp/5WuvwK/Qib3Z0HtzrDFeWanS99dNhnA==", 200 "integrity": "sha512-d8rY6/yUxb0+mEwTShCQF2zYQdLlqihukNfG9IUlLYz5y1CH6G/9XYbrxQLq3Z14RNvkCC6oe+OcFlyUpwUbkg==",
172 "dev": true, 201 "dev": true,
173 "requires": { 202 "requires": {
174 "debug": "^4.1.1", 203 "debug": "^4.1.1",
@@ -176,8 +205,16 @@
176 "glob": "^7.1.6", 205 "glob": "^7.1.6",
177 "is-glob": "^4.0.1", 206 "is-glob": "^4.0.1",
178 "lodash": "^4.17.15", 207 "lodash": "^4.17.15",
179 "semver": "^6.3.0", 208 "semver": "^7.3.2",
180 "tsutils": "^3.17.1" 209 "tsutils": "^3.17.1"
210 },
211 "dependencies": {
212 "semver": {
213 "version": "7.3.2",
214 "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
215 "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
216 "dev": true
217 }
181 } 218 }
182 }, 219 },
183 "acorn": { 220 "acorn": {
@@ -192,6 +229,15 @@
192 "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", 229 "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==",
193 "dev": true 230 "dev": true
194 }, 231 },
232 "agent-base": {
233 "version": "4.3.0",
234 "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
235 "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
236 "dev": true,
237 "requires": {
238 "es6-promisify": "^5.0.0"
239 }
240 },
195 "ajv": { 241 "ajv": {
196 "version": "6.12.0", 242 "version": "6.12.0",
197 "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", 243 "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
@@ -204,6 +250,12 @@
204 "uri-js": "^4.2.2" 250 "uri-js": "^4.2.2"
205 } 251 }
206 }, 252 },
253 "ansi-colors": {
254 "version": "3.2.3",
255 "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
256 "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
257 "dev": true
258 },
207 "ansi-escapes": { 259 "ansi-escapes": {
208 "version": "4.3.1", 260 "version": "4.3.1",
209 "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", 261 "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
@@ -236,6 +288,16 @@
236 "color-convert": "^1.9.0" 288 "color-convert": "^1.9.0"
237 } 289 }
238 }, 290 },
291 "anymatch": {
292 "version": "3.1.1",
293 "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
294 "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
295 "dev": true,
296 "requires": {
297 "normalize-path": "^3.0.0",
298 "picomatch": "^2.0.4"
299 }
300 },
239 "argparse": { 301 "argparse": {
240 "version": "1.0.10", 302 "version": "1.0.10",
241 "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 303 "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -275,6 +337,12 @@
275 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 337 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
276 "dev": true 338 "dev": true
277 }, 339 },
340 "binary-extensions": {
341 "version": "2.0.0",
342 "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
343 "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
344 "dev": true
345 },
278 "boolbase": { 346 "boolbase": {
279 "version": "1.0.0", 347 "version": "1.0.0",
280 "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", 348 "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
@@ -300,6 +368,12 @@
300 "fill-range": "^7.0.1" 368 "fill-range": "^7.0.1"
301 } 369 }
302 }, 370 },
371 "browser-stdout": {
372 "version": "1.3.1",
373 "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
374 "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
375 "dev": true
376 },
303 "buffer-crc32": { 377 "buffer-crc32": {
304 "version": "0.2.13", 378 "version": "0.2.13",
305 "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 379 "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
@@ -318,6 +392,12 @@
318 "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 392 "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
319 "dev": true 393 "dev": true
320 }, 394 },
395 "camelcase": {
396 "version": "5.3.1",
397 "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
398 "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
399 "dev": true
400 },
321 "chalk": { 401 "chalk": {
322 "version": "2.4.2", 402 "version": "2.4.2",
323 "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 403 "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
@@ -349,6 +429,22 @@
349 "parse5": "^3.0.1" 429 "parse5": "^3.0.1"
350 } 430 }
351 }, 431 },
432 "chokidar": {
433 "version": "3.3.0",
434 "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
435 "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==",
436 "dev": true,
437 "requires": {
438 "anymatch": "~3.1.1",
439 "braces": "~3.0.2",
440 "fsevents": "~2.1.1",
441 "glob-parent": "~5.1.0",
442 "is-binary-path": "~2.1.0",
443 "is-glob": "~4.0.1",
444 "normalize-path": "~3.0.0",
445 "readdirp": "~3.2.0"
446 }
447 },
352 "cli-cursor": { 448 "cli-cursor": {
353 "version": "3.1.0", 449 "version": "3.1.0",
354 "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", 450 "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
@@ -364,6 +460,42 @@
364 "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", 460 "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
365 "dev": true 461 "dev": true
366 }, 462 },
463 "cliui": {
464 "version": "5.0.0",
465 "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
466 "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
467 "dev": true,
468 "requires": {
469 "string-width": "^3.1.0",
470 "strip-ansi": "^5.2.0",
471 "wrap-ansi": "^5.1.0"
472 },
473 "dependencies": {
474 "emoji-regex": {
475 "version": "7.0.3",
476 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
477 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
478 "dev": true
479 },
480 "is-fullwidth-code-point": {
481 "version": "2.0.0",
482 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
483 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
484 "dev": true
485 },
486 "string-width": {
487 "version": "3.1.0",
488 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
489 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
490 "dev": true,
491 "requires": {
492 "emoji-regex": "^7.0.1",
493 "is-fullwidth-code-point": "^2.0.0",
494 "strip-ansi": "^5.1.0"
495 }
496 }
497 }
498 },
367 "color-convert": { 499 "color-convert": {
368 "version": "1.9.3", 500 "version": "1.9.3",
369 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 501 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -460,12 +592,27 @@
460 "ms": "^2.1.1" 592 "ms": "^2.1.1"
461 } 593 }
462 }, 594 },
595 "decamelize": {
596 "version": "1.2.0",
597 "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
598 "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
599 "dev": true
600 },
463 "deep-is": { 601 "deep-is": {
464 "version": "0.1.3", 602 "version": "0.1.3",
465 "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 603 "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
466 "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 604 "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
467 "dev": true 605 "dev": true
468 }, 606 },
607 "define-properties": {
608 "version": "1.1.3",
609 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
610 "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
611 "dev": true,
612 "requires": {
613 "object-keys": "^1.0.12"
614 }
615 },
469 "delayed-stream": { 616 "delayed-stream": {
470 "version": "1.0.0", 617 "version": "1.0.0",
471 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 618 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -478,6 +625,12 @@
478 "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=", 625 "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=",
479 "dev": true 626 "dev": true
480 }, 627 },
628 "diff": {
629 "version": "3.5.0",
630 "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
631 "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
632 "dev": true
633 },
481 "doctrine": { 634 "doctrine": {
482 "version": "3.0.0", 635 "version": "3.0.0",
483 "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 636 "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@@ -554,6 +707,51 @@
554 "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", 707 "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
555 "dev": true 708 "dev": true
556 }, 709 },
710 "es-abstract": {
711 "version": "1.17.5",
712 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
713 "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
714 "dev": true,
715 "requires": {
716 "es-to-primitive": "^1.2.1",
717 "function-bind": "^1.1.1",
718 "has": "^1.0.3",
719 "has-symbols": "^1.0.1",
720 "is-callable": "^1.1.5",
721 "is-regex": "^1.0.5",
722 "object-inspect": "^1.7.0",
723 "object-keys": "^1.1.1",
724 "object.assign": "^4.1.0",
725 "string.prototype.trimleft": "^2.1.1",
726 "string.prototype.trimright": "^2.1.1"
727 }
728 },
729 "es-to-primitive": {
730 "version": "1.2.1",
731 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
732 "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
733 "dev": true,
734 "requires": {
735 "is-callable": "^1.1.4",
736 "is-date-object": "^1.0.1",
737 "is-symbol": "^1.0.2"
738 }
739 },
740 "es6-promise": {
741 "version": "4.2.8",
742 "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
743 "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
744 "dev": true
745 },
746 "es6-promisify": {
747 "version": "5.0.0",
748 "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
749 "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
750 "dev": true,
751 "requires": {
752 "es6-promise": "^4.0.3"
753 }
754 },
557 "escape-string-regexp": { 755 "escape-string-regexp": {
558 "version": "1.0.5", 756 "version": "1.0.5",
559 "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 757 "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@@ -756,6 +954,24 @@
756 "to-regex-range": "^5.0.1" 954 "to-regex-range": "^5.0.1"
757 } 955 }
758 }, 956 },
957 "find-up": {
958 "version": "3.0.0",
959 "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
960 "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
961 "dev": true,
962 "requires": {
963 "locate-path": "^3.0.0"
964 }
965 },
966 "flat": {
967 "version": "4.1.0",
968 "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
969 "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
970 "dev": true,
971 "requires": {
972 "is-buffer": "~2.0.3"
973 }
974 },
759 "flat-cache": { 975 "flat-cache": {
760 "version": "2.0.1", 976 "version": "2.0.1",
761 "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", 977 "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
@@ -797,12 +1013,24 @@
797 "dev": true, 1013 "dev": true,
798 "optional": true 1014 "optional": true
799 }, 1015 },
1016 "function-bind": {
1017 "version": "1.1.1",
1018 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
1019 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
1020 "dev": true
1021 },
800 "functional-red-black-tree": { 1022 "functional-red-black-tree": {
801 "version": "1.0.1", 1023 "version": "1.0.1",
802 "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 1024 "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
803 "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 1025 "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
804 "dev": true 1026 "dev": true
805 }, 1027 },
1028 "get-caller-file": {
1029 "version": "2.0.5",
1030 "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
1031 "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
1032 "dev": true
1033 },
806 "glob": { 1034 "glob": {
807 "version": "7.1.6", 1035 "version": "7.1.6",
808 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 1036 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
@@ -835,12 +1063,39 @@
835 "type-fest": "^0.8.1" 1063 "type-fest": "^0.8.1"
836 } 1064 }
837 }, 1065 },
1066 "growl": {
1067 "version": "1.10.5",
1068 "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
1069 "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
1070 "dev": true
1071 },
1072 "has": {
1073 "version": "1.0.3",
1074 "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
1075 "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
1076 "dev": true,
1077 "requires": {
1078 "function-bind": "^1.1.1"
1079 }
1080 },
838 "has-flag": { 1081 "has-flag": {
839 "version": "3.0.0", 1082 "version": "3.0.0",
840 "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 1083 "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
841 "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 1084 "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
842 "dev": true 1085 "dev": true
843 }, 1086 },
1087 "has-symbols": {
1088 "version": "1.0.1",
1089 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
1090 "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
1091 "dev": true
1092 },
1093 "he": {
1094 "version": "1.2.0",
1095 "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
1096 "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
1097 "dev": true
1098 },
844 "htmlparser2": { 1099 "htmlparser2": {
845 "version": "3.10.1", 1100 "version": "3.10.1",
846 "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", 1101 "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
@@ -855,6 +1110,54 @@
855 "readable-stream": "^3.1.1" 1110 "readable-stream": "^3.1.1"
856 } 1111 }
857 }, 1112 },
1113 "http-proxy-agent": {
1114 "version": "2.1.0",
1115 "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
1116 "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
1117 "dev": true,
1118 "requires": {
1119 "agent-base": "4",
1120 "debug": "3.1.0"
1121 },
1122 "dependencies": {
1123 "debug": {
1124 "version": "3.1.0",
1125 "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
1126 "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
1127 "dev": true,
1128 "requires": {
1129 "ms": "2.0.0"
1130 }
1131 },
1132 "ms": {
1133 "version": "2.0.0",
1134 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1135 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
1136 "dev": true
1137 }
1138 }
1139 },
1140 "https-proxy-agent": {
1141 "version": "2.2.4",
1142 "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
1143 "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
1144 "dev": true,
1145 "requires": {
1146 "agent-base": "^4.3.0",
1147 "debug": "^3.1.0"
1148 },
1149 "dependencies": {
1150 "debug": {
1151 "version": "3.2.6",
1152 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
1153 "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
1154 "dev": true,
1155 "requires": {
1156 "ms": "^2.1.1"
1157 }
1158 }
1159 }
1160 },
858 "iconv-lite": { 1161 "iconv-lite": {
859 "version": "0.4.24", 1162 "version": "0.4.24",
860 "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 1163 "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -984,6 +1287,33 @@
984 } 1287 }
985 } 1288 }
986 }, 1289 },
1290 "is-binary-path": {
1291 "version": "2.1.0",
1292 "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
1293 "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
1294 "dev": true,
1295 "requires": {
1296 "binary-extensions": "^2.0.0"
1297 }
1298 },
1299 "is-buffer": {
1300 "version": "2.0.4",
1301 "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
1302 "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
1303 "dev": true
1304 },
1305 "is-callable": {
1306 "version": "1.1.5",
1307 "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
1308 "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
1309 "dev": true
1310 },
1311 "is-date-object": {
1312 "version": "1.0.2",
1313 "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
1314 "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
1315 "dev": true
1316 },
987 "is-extglob": { 1317 "is-extglob": {
988 "version": "2.1.1", 1318 "version": "2.1.1",
989 "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1319 "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@@ -1032,6 +1362,24 @@
1032 "@types/estree": "0.0.39" 1362 "@types/estree": "0.0.39"
1033 } 1363 }
1034 }, 1364 },
1365 "is-regex": {
1366 "version": "1.0.5",
1367 "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
1368 "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
1369 "dev": true,
1370 "requires": {
1371 "has": "^1.0.3"
1372 }
1373 },
1374 "is-symbol": {
1375 "version": "1.0.3",
1376 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
1377 "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
1378 "dev": true,
1379 "requires": {
1380 "has-symbols": "^1.0.1"
1381 }
1382 },
1035 "isexe": { 1383 "isexe": {
1036 "version": "2.0.0", 1384 "version": "2.0.0",
1037 "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1385 "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@@ -1091,12 +1439,31 @@
1091 "uc.micro": "^1.0.1" 1439 "uc.micro": "^1.0.1"
1092 } 1440 }
1093 }, 1441 },
1442 "locate-path": {
1443 "version": "3.0.0",
1444 "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
1445 "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
1446 "dev": true,
1447 "requires": {
1448 "p-locate": "^3.0.0",
1449 "path-exists": "^3.0.0"
1450 }
1451 },
1094 "lodash": { 1452 "lodash": {
1095 "version": "4.17.15", 1453 "version": "4.17.15",
1096 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 1454 "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
1097 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 1455 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
1098 "dev": true 1456 "dev": true
1099 }, 1457 },
1458 "log-symbols": {
1459 "version": "3.0.0",
1460 "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
1461 "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",
1462 "dev": true,
1463 "requires": {
1464 "chalk": "^2.4.2"
1465 }
1466 },
1100 "lru-cache": { 1467 "lru-cache": {
1101 "version": "4.1.5", 1468 "version": "4.1.5",
1102 "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", 1469 "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
@@ -1160,18 +1527,18 @@
1160 "dev": true 1527 "dev": true
1161 }, 1528 },
1162 "mime-db": { 1529 "mime-db": {
1163 "version": "1.43.0", 1530 "version": "1.44.0",
1164 "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", 1531 "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
1165 "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", 1532 "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
1166 "dev": true 1533 "dev": true
1167 }, 1534 },
1168 "mime-types": { 1535 "mime-types": {
1169 "version": "2.1.26", 1536 "version": "2.1.27",
1170 "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", 1537 "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
1171 "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", 1538 "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
1172 "dev": true, 1539 "dev": true,
1173 "requires": { 1540 "requires": {
1174 "mime-db": "1.43.0" 1541 "mime-db": "1.44.0"
1175 } 1542 }
1176 }, 1543 },
1177 "mimic-fn": { 1544 "mimic-fn": {
@@ -1204,6 +1571,93 @@
1204 "minimist": "^1.2.5" 1571 "minimist": "^1.2.5"
1205 } 1572 }
1206 }, 1573 },
1574 "mocha": {
1575 "version": "7.1.2",
1576 "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz",
1577 "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==",
1578 "dev": true,
1579 "requires": {
1580 "ansi-colors": "3.2.3",
1581 "browser-stdout": "1.3.1",
1582 "chokidar": "3.3.0",
1583 "debug": "3.2.6",
1584 "diff": "3.5.0",
1585 "escape-string-regexp": "1.0.5",
1586 "find-up": "3.0.0",
1587 "glob": "7.1.3",
1588 "growl": "1.10.5",
1589 "he": "1.2.0",
1590 "js-yaml": "3.13.1",
1591 "log-symbols": "3.0.0",
1592 "minimatch": "3.0.4",
1593 "mkdirp": "0.5.5",
1594 "ms": "2.1.1",
1595 "node-environment-flags": "1.0.6",
1596 "object.assign": "4.1.0",
1597 "strip-json-comments": "2.0.1",
1598 "supports-color": "6.0.0",
1599 "which": "1.3.1",
1600 "wide-align": "1.1.3",
1601 "yargs": "13.3.2",
1602 "yargs-parser": "13.1.2",
1603 "yargs-unparser": "1.6.0"
1604 },
1605 "dependencies": {
1606 "debug": {
1607 "version": "3.2.6",
1608 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
1609 "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
1610 "dev": true,
1611 "requires": {
1612 "ms": "^2.1.1"
1613 }
1614 },
1615 "glob": {
1616 "version": "7.1.3",
1617 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
1618 "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
1619 "dev": true,
1620 "requires": {
1621 "fs.realpath": "^1.0.0",
1622 "inflight": "^1.0.4",
1623 "inherits": "2",
1624 "minimatch": "^3.0.4",
1625 "once": "^1.3.0",
1626 "path-is-absolute": "^1.0.0"
1627 }
1628 },
1629 "mkdirp": {
1630 "version": "0.5.5",
1631 "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
1632 "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
1633 "dev": true,
1634 "requires": {
1635 "minimist": "^1.2.5"
1636 }
1637 },
1638 "ms": {
1639 "version": "2.1.1",
1640 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
1641 "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
1642 "dev": true
1643 },
1644 "strip-json-comments": {
1645 "version": "2.0.1",
1646 "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
1647 "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
1648 "dev": true
1649 },
1650 "supports-color": {
1651 "version": "6.0.0",
1652 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
1653 "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
1654 "dev": true,
1655 "requires": {
1656 "has-flag": "^3.0.0"
1657 }
1658 }
1659 }
1660 },
1207 "ms": { 1661 "ms": {
1208 "version": "2.1.2", 1662 "version": "2.1.2",
1209 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1663 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -1228,11 +1682,35 @@
1228 "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", 1682 "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
1229 "dev": true 1683 "dev": true
1230 }, 1684 },
1685 "node-environment-flags": {
1686 "version": "1.0.6",
1687 "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
1688 "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==",
1689 "dev": true,
1690 "requires": {
1691 "object.getownpropertydescriptors": "^2.0.3",
1692 "semver": "^5.7.0"
1693 },
1694 "dependencies": {
1695 "semver": {
1696 "version": "5.7.1",
1697 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
1698 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
1699 "dev": true
1700 }
1701 }
1702 },
1231 "node-fetch": { 1703 "node-fetch": {
1232 "version": "2.6.0", 1704 "version": "2.6.0",
1233 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", 1705 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
1234 "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" 1706 "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
1235 }, 1707 },
1708 "normalize-path": {
1709 "version": "3.0.0",
1710 "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
1711 "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
1712 "dev": true
1713 },
1236 "nth-check": { 1714 "nth-check": {
1237 "version": "1.0.2", 1715 "version": "1.0.2",
1238 "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", 1716 "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
@@ -1242,6 +1720,40 @@
1242 "boolbase": "~1.0.0" 1720 "boolbase": "~1.0.0"
1243 } 1721 }
1244 }, 1722 },
1723 "object-inspect": {
1724 "version": "1.7.0",
1725 "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
1726 "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
1727 "dev": true
1728 },
1729 "object-keys": {
1730 "version": "1.1.1",
1731 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
1732 "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
1733 "dev": true
1734 },
1735 "object.assign": {
1736 "version": "4.1.0",
1737 "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
1738 "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
1739 "dev": true,
1740 "requires": {
1741 "define-properties": "^1.1.2",
1742 "function-bind": "^1.1.1",
1743 "has-symbols": "^1.0.0",
1744 "object-keys": "^1.0.11"
1745 }
1746 },
1747 "object.getownpropertydescriptors": {
1748 "version": "2.1.0",
1749 "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
1750 "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
1751 "dev": true,
1752 "requires": {
1753 "define-properties": "^1.1.3",
1754 "es-abstract": "^1.17.0-next.1"
1755 }
1756 },
1245 "once": { 1757 "once": {
1246 "version": "1.4.0", 1758 "version": "1.4.0",
1247 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1759 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -1302,6 +1814,30 @@
1302 "os-tmpdir": "^1.0.0" 1814 "os-tmpdir": "^1.0.0"
1303 } 1815 }
1304 }, 1816 },
1817 "p-limit": {
1818 "version": "2.3.0",
1819 "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
1820 "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
1821 "dev": true,
1822 "requires": {
1823 "p-try": "^2.0.0"
1824 }
1825 },
1826 "p-locate": {
1827 "version": "3.0.0",
1828 "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
1829 "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
1830 "dev": true,
1831 "requires": {
1832 "p-limit": "^2.0.0"
1833 }
1834 },
1835 "p-try": {
1836 "version": "2.2.0",
1837 "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
1838 "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
1839 "dev": true
1840 },
1305 "parent-module": { 1841 "parent-module": {
1306 "version": "1.0.1", 1842 "version": "1.0.1",
1307 "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 1843 "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@@ -1337,6 +1873,12 @@
1337 "@types/node": "*" 1873 "@types/node": "*"
1338 } 1874 }
1339 }, 1875 },
1876 "path-exists": {
1877 "version": "3.0.0",
1878 "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
1879 "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
1880 "dev": true
1881 },
1340 "path-is-absolute": { 1882 "path-is-absolute": {
1341 "version": "1.0.1", 1883 "version": "1.0.1",
1342 "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1884 "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -1411,12 +1953,33 @@
1411 "util-deprecate": "^1.0.1" 1953 "util-deprecate": "^1.0.1"
1412 } 1954 }
1413 }, 1955 },
1956 "readdirp": {
1957 "version": "3.2.0",
1958 "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz",
1959 "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==",
1960 "dev": true,
1961 "requires": {
1962 "picomatch": "^2.0.4"
1963 }
1964 },
1414 "regexpp": { 1965 "regexpp": {
1415 "version": "3.1.0", 1966 "version": "3.1.0",
1416 "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", 1967 "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
1417 "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", 1968 "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
1418 "dev": true 1969 "dev": true
1419 }, 1970 },
1971 "require-directory": {
1972 "version": "2.1.1",
1973 "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
1974 "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
1975 "dev": true
1976 },
1977 "require-main-filename": {
1978 "version": "2.0.0",
1979 "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
1980 "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
1981 "dev": true
1982 },
1420 "resolve": { 1983 "resolve": {
1421 "version": "1.16.1", 1984 "version": "1.16.1",
1422 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz", 1985 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz",
@@ -1452,9 +2015,9 @@
1452 } 2015 }
1453 }, 2016 },
1454 "rollup": { 2017 "rollup": {
1455 "version": "2.7.1", 2018 "version": "2.10.0",
1456 "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.7.1.tgz", 2019 "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.10.0.tgz",
1457 "integrity": "sha512-c1FCjY8HK1nAq0bTZHaR72ZknpP7p0EjxbcVc6BcmtOosurK//P5jtwxX+f/4fgtbrjczqf0uvR+EdtxpriE8g==", 2020 "integrity": "sha512-7BmpEfUN9P6esJzWIn3DmR//90mW6YwYB1t3y48LpF8ITpYtL8s1kEirMKqUu44dVH/6a/rs0EuwYVL3FuRDoA==",
1458 "dev": true, 2021 "dev": true,
1459 "requires": { 2022 "requires": {
1460 "fsevents": "~2.1.2" 2023 "fsevents": "~2.1.2"
@@ -1495,6 +2058,12 @@
1495 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 2058 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
1496 "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 2059 "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
1497 }, 2060 },
2061 "set-blocking": {
2062 "version": "2.0.0",
2063 "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
2064 "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
2065 "dev": true
2066 },
1498 "shebang-command": { 2067 "shebang-command": {
1499 "version": "1.2.0", 2068 "version": "1.2.0",
1500 "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 2069 "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
@@ -1575,6 +2144,48 @@
1575 } 2144 }
1576 } 2145 }
1577 }, 2146 },
2147 "string.prototype.trimend": {
2148 "version": "1.0.1",
2149 "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
2150 "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
2151 "dev": true,
2152 "requires": {
2153 "define-properties": "^1.1.3",
2154 "es-abstract": "^1.17.5"
2155 }
2156 },
2157 "string.prototype.trimleft": {
2158 "version": "2.1.2",
2159 "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
2160 "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
2161 "dev": true,
2162 "requires": {
2163 "define-properties": "^1.1.3",
2164 "es-abstract": "^1.17.5",
2165 "string.prototype.trimstart": "^1.0.0"
2166 }
2167 },
2168 "string.prototype.trimright": {
2169 "version": "2.1.2",
2170 "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
2171 "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
2172 "dev": true,
2173 "requires": {
2174 "define-properties": "^1.1.3",
2175 "es-abstract": "^1.17.5",
2176 "string.prototype.trimend": "^1.0.0"
2177 }
2178 },
2179 "string.prototype.trimstart": {
2180 "version": "1.0.1",
2181 "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
2182 "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
2183 "dev": true,
2184 "requires": {
2185 "define-properties": "^1.1.3",
2186 "es-abstract": "^1.17.5"
2187 }
2188 },
1578 "string_decoder": { 2189 "string_decoder": {
1579 "version": "1.3.0", 2190 "version": "1.3.0",
1580 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 2191 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -1684,9 +2295,9 @@
1684 } 2295 }
1685 }, 2296 },
1686 "tslib": { 2297 "tslib": {
1687 "version": "1.11.1", 2298 "version": "1.12.0",
1688 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", 2299 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.12.0.tgz",
1689 "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", 2300 "integrity": "sha512-5rxCQkP0kytf4H1T4xz1imjxaUUPMvc5aWp0rJ/VMIN7ClRiH1FwFvBt8wOeMasp/epeUnmSW6CixSIePtiLqA==",
1690 "dev": true 2301 "dev": true
1691 }, 2302 },
1692 "tsutils": { 2303 "tsutils": {
@@ -1730,9 +2341,9 @@
1730 } 2341 }
1731 }, 2342 },
1732 "typescript": { 2343 "typescript": {
1733 "version": "3.8.3", 2344 "version": "3.9.2",
1734 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", 2345 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz",
1735 "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", 2346 "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==",
1736 "dev": true 2347 "dev": true
1737 }, 2348 },
1738 "typescript-formatter": { 2349 "typescript-formatter": {
@@ -1857,6 +2468,17 @@
1857 "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.1.tgz", 2468 "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.1.tgz",
1858 "integrity": "sha512-tZFUSbyjUcrh+qQf13ALX4QDdOfDX0cVaBFgy7ktJ0VwS7AW/yRKgGPSxVqqP9OCMNPdqP57O5q47w2pEwfaUg==" 2469 "integrity": "sha512-tZFUSbyjUcrh+qQf13ALX4QDdOfDX0cVaBFgy7ktJ0VwS7AW/yRKgGPSxVqqP9OCMNPdqP57O5q47w2pEwfaUg=="
1859 }, 2470 },
2471 "vscode-test": {
2472 "version": "1.3.0",
2473 "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.3.0.tgz",
2474 "integrity": "sha512-LddukcBiSU2FVTDr3c1D8lwkiOvwlJdDL2hqVbn6gIz+rpTqUCkMZSKYm94Y1v0WXlHSDQBsXyY+tchWQgGVsw==",
2475 "dev": true,
2476 "requires": {
2477 "http-proxy-agent": "^2.1.0",
2478 "https-proxy-agent": "^2.2.4",
2479 "rimraf": "^2.6.3"
2480 }
2481 },
1860 "which": { 2482 "which": {
1861 "version": "1.3.1", 2483 "version": "1.3.1",
1862 "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 2484 "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
@@ -1866,12 +2488,96 @@
1866 "isexe": "^2.0.0" 2488 "isexe": "^2.0.0"
1867 } 2489 }
1868 }, 2490 },
2491 "which-module": {
2492 "version": "2.0.0",
2493 "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
2494 "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
2495 "dev": true
2496 },
2497 "wide-align": {
2498 "version": "1.1.3",
2499 "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
2500 "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
2501 "dev": true,
2502 "requires": {
2503 "string-width": "^1.0.2 || 2"
2504 },
2505 "dependencies": {
2506 "ansi-regex": {
2507 "version": "3.0.0",
2508 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
2509 "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
2510 "dev": true
2511 },
2512 "is-fullwidth-code-point": {
2513 "version": "2.0.0",
2514 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
2515 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
2516 "dev": true
2517 },
2518 "string-width": {
2519 "version": "2.1.1",
2520 "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
2521 "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
2522 "dev": true,
2523 "requires": {
2524 "is-fullwidth-code-point": "^2.0.0",
2525 "strip-ansi": "^4.0.0"
2526 }
2527 },
2528 "strip-ansi": {
2529 "version": "4.0.0",
2530 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
2531 "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
2532 "dev": true,
2533 "requires": {
2534 "ansi-regex": "^3.0.0"
2535 }
2536 }
2537 }
2538 },
1869 "word-wrap": { 2539 "word-wrap": {
1870 "version": "1.2.3", 2540 "version": "1.2.3",
1871 "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 2541 "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
1872 "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", 2542 "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
1873 "dev": true 2543 "dev": true
1874 }, 2544 },
2545 "wrap-ansi": {
2546 "version": "5.1.0",
2547 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
2548 "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
2549 "dev": true,
2550 "requires": {
2551 "ansi-styles": "^3.2.0",
2552 "string-width": "^3.0.0",
2553 "strip-ansi": "^5.0.0"
2554 },
2555 "dependencies": {
2556 "emoji-regex": {
2557 "version": "7.0.3",
2558 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
2559 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
2560 "dev": true
2561 },
2562 "is-fullwidth-code-point": {
2563 "version": "2.0.0",
2564 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
2565 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
2566 "dev": true
2567 },
2568 "string-width": {
2569 "version": "3.1.0",
2570 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
2571 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
2572 "dev": true,
2573 "requires": {
2574 "emoji-regex": "^7.0.1",
2575 "is-fullwidth-code-point": "^2.0.0",
2576 "strip-ansi": "^5.1.0"
2577 }
2578 }
2579 }
2580 },
1875 "wrappy": { 2581 "wrappy": {
1876 "version": "1.0.2", 2582 "version": "1.0.2",
1877 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2583 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@@ -1887,12 +2593,82 @@
1887 "mkdirp": "^0.5.1" 2593 "mkdirp": "^0.5.1"
1888 } 2594 }
1889 }, 2595 },
2596 "y18n": {
2597 "version": "4.0.0",
2598 "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
2599 "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
2600 "dev": true
2601 },
1890 "yallist": { 2602 "yallist": {
1891 "version": "2.1.2", 2603 "version": "2.1.2",
1892 "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", 2604 "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
1893 "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", 2605 "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
1894 "dev": true 2606 "dev": true
1895 }, 2607 },
2608 "yargs": {
2609 "version": "13.3.2",
2610 "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
2611 "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
2612 "dev": true,
2613 "requires": {
2614 "cliui": "^5.0.0",
2615 "find-up": "^3.0.0",
2616 "get-caller-file": "^2.0.1",
2617 "require-directory": "^2.1.1",
2618 "require-main-filename": "^2.0.0",
2619 "set-blocking": "^2.0.0",
2620 "string-width": "^3.0.0",
2621 "which-module": "^2.0.0",
2622 "y18n": "^4.0.0",
2623 "yargs-parser": "^13.1.2"
2624 },
2625 "dependencies": {
2626 "emoji-regex": {
2627 "version": "7.0.3",
2628 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
2629 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
2630 "dev": true
2631 },
2632 "is-fullwidth-code-point": {
2633 "version": "2.0.0",
2634 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
2635 "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
2636 "dev": true
2637 },
2638 "string-width": {
2639 "version": "3.1.0",
2640 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
2641 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
2642 "dev": true,
2643 "requires": {
2644 "emoji-regex": "^7.0.1",
2645 "is-fullwidth-code-point": "^2.0.0",
2646 "strip-ansi": "^5.1.0"
2647 }
2648 }
2649 }
2650 },
2651 "yargs-parser": {
2652 "version": "13.1.2",
2653 "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
2654 "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
2655 "dev": true,
2656 "requires": {
2657 "camelcase": "^5.0.0",
2658 "decamelize": "^1.2.0"
2659 }
2660 },
2661 "yargs-unparser": {
2662 "version": "1.6.0",
2663 "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
2664 "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
2665 "dev": true,
2666 "requires": {
2667 "flat": "^4.1.0",
2668 "lodash": "^4.17.15",
2669 "yargs": "^13.3.0"
2670 }
2671 },
1896 "yauzl": { 2672 "yauzl": {
1897 "version": "2.10.0", 2673 "version": "2.10.0",
1898 "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", 2674 "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
diff --git a/editors/code/package.json b/editors/code/package.json
index ec325ad3f..3aa90cd66 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -29,8 +29,10 @@
29 "package": "vsce package -o rust-analyzer.vsix", 29 "package": "vsce package -o rust-analyzer.vsix",
30 "build": "tsc", 30 "build": "tsc",
31 "watch": "tsc --watch", 31 "watch": "tsc --watch",
32 "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src", 32 "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src ./tests",
33 "fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src --fix" 33 "fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src ./tests --fix",
34 "pretest": "npm run build",
35 "test": "node ./out/tests/runTests.js"
34 }, 36 },
35 "dependencies": { 37 "dependencies": {
36 "node-fetch": "^2.6.0", 38 "node-fetch": "^2.6.0",
@@ -39,17 +41,22 @@
39 "devDependencies": { 41 "devDependencies": {
40 "@rollup/plugin-commonjs": "^11.1.0", 42 "@rollup/plugin-commonjs": "^11.1.0",
41 "@rollup/plugin-node-resolve": "^7.1.3", 43 "@rollup/plugin-node-resolve": "^7.1.3",
42 "@types/node": "^12.12.37", 44 "@types/glob": "^7.1.1",
43 "@types/node-fetch": "^2.5.6", 45 "@types/mocha": "^7.0.2",
46 "@types/node": "^12.12.39",
47 "@types/node-fetch": "^2.5.7",
44 "@types/vscode": "^1.44.0", 48 "@types/vscode": "^1.44.0",
45 "@typescript-eslint/eslint-plugin": "^2.29.0", 49 "@typescript-eslint/eslint-plugin": "^2.33.0",
46 "@typescript-eslint/parser": "^2.29.0", 50 "@typescript-eslint/parser": "^2.33.0",
47 "eslint": "^6.8.0", 51 "eslint": "^6.8.0",
48 "rollup": "^2.7.1", 52 "glob": "^7.1.6",
49 "tslib": "^1.11.1", 53 "mocha": "^7.1.2",
50 "typescript": "^3.8.3", 54 "rollup": "^2.10.0",
55 "tslib": "^1.12.0",
56 "typescript": "^3.9.2",
51 "typescript-formatter": "^7.2.2", 57 "typescript-formatter": "^7.2.2",
52 "vsce": "^1.75.0" 58 "vsce": "^1.75.0",
59 "vscode-test": "^1.3.0"
53 }, 60 },
54 "activationEvents": [ 61 "activationEvents": [
55 "onLanguage:rust", 62 "onLanguage:rust",
@@ -57,7 +64,7 @@
57 "onCommand:rust-analyzer.collectGarbage", 64 "onCommand:rust-analyzer.collectGarbage",
58 "workspaceContains:**/Cargo.toml" 65 "workspaceContains:**/Cargo.toml"
59 ], 66 ],
60 "main": "./out/main", 67 "main": "./out/src/main",
61 "contributes": { 68 "contributes": {
62 "taskDefinitions": [ 69 "taskDefinitions": [
63 { 70 {
@@ -313,22 +320,22 @@
313 "rust-analyzer.inlayHints.enable": { 320 "rust-analyzer.inlayHints.enable": {
314 "type": "boolean", 321 "type": "boolean",
315 "default": true, 322 "default": true,
316 "description": "Disable all inlay hints" 323 "description": "Whether to show inlay hints"
317 }, 324 },
318 "rust-analyzer.inlayHints.typeHints": { 325 "rust-analyzer.inlayHints.typeHints": {
319 "type": "boolean", 326 "type": "boolean",
320 "default": true, 327 "default": true,
321 "description": "Whether to show inlay type hints" 328 "description": "Whether to show inlay type hints for variables."
322 }, 329 },
323 "rust-analyzer.inlayHints.chainingHints": { 330 "rust-analyzer.inlayHints.chainingHints": {
324 "type": "boolean", 331 "type": "boolean",
325 "default": true, 332 "default": true,
326 "description": "Whether to show inlay type hints for method chains" 333 "description": "Whether to show inlay type hints for method chains."
327 }, 334 },
328 "rust-analyzer.inlayHints.parameterHints": { 335 "rust-analyzer.inlayHints.parameterHints": {
329 "type": "boolean", 336 "type": "boolean",
330 "default": true, 337 "default": true,
331 "description": "Whether to show function parameter name inlay hints at the call site" 338 "description": "Whether to show function parameter name inlay hints at the call site."
332 }, 339 },
333 "rust-analyzer.inlayHints.maxLength": { 340 "rust-analyzer.inlayHints.maxLength": {
334 "type": [ 341 "type": [
@@ -443,6 +450,26 @@
443 "type": "object", 450 "type": "object",
444 "default": {}, 451 "default": {},
445 "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }" 452 "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }"
453 },
454 "rust-analyzer.lens.enable": {
455 "description": "Whether to show CodeLens in Rust files.",
456 "type": "boolean",
457 "default": true
458 },
459 "rust-analyzer.lens.run": {
460 "markdownDescription": "Whether to show Run lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
461 "type": "boolean",
462 "default": true
463 },
464 "rust-analyzer.lens.debug": {
465 "markdownDescription": "Whether to show Debug lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
466 "type": "boolean",
467 "default": true
468 },
469 "rust-analyzer.lens.implementations": {
470 "markdownDescription": "Whether to show Implementations lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
471 "type": "boolean",
472 "default": true
446 } 473 }
447 } 474 }
448 }, 475 },
@@ -489,6 +516,11 @@
489 ], 516 ],
490 "grammars": [ 517 "grammars": [
491 { 518 {
519 "language": "rust",
520 "scopeName": "source.rust",
521 "path": "rust.tmGrammar.json"
522 },
523 {
492 "language": "ra_syntax_tree", 524 "language": "ra_syntax_tree",
493 "scopeName": "source.ra_syntax_tree", 525 "scopeName": "source.ra_syntax_tree",
494 "path": "ra_syntax_tree.tmGrammar.json" 526 "path": "ra_syntax_tree.tmGrammar.json"
@@ -579,6 +611,10 @@
579 ], 611 ],
580 "semanticTokenModifiers": [ 612 "semanticTokenModifiers": [
581 { 613 {
614 "id": "attribute",
615 "description": "Style for elements within attributes"
616 },
617 {
582 "id": "constant", 618 "id": "constant",
583 "description": "Style for compile-time constants" 619 "description": "Style for compile-time constants"
584 }, 620 },
@@ -599,35 +635,44 @@
599 { 635 {
600 "language": "rust", 636 "language": "rust",
601 "scopes": { 637 "scopes": {
638 "macro": [
639 "entity.name.function.macro.rust"
640 ],
602 "attribute": [ 641 "attribute": [
603 "meta.attribute" 642 "meta.attribute.rust"
643 ],
644 "function.attribute": [
645 "entity.name.function.attribute.rust"
604 ], 646 ],
605 "builtinType": [ 647 "builtinType": [
606 "support.type.primitive" 648 "support.type.primitive.rust"
607 ], 649 ],
608 "lifetime": [ 650 "lifetime": [
609 "entity.name.lifetime.rust" 651 "storage.modifier.lifetime.rust"
610 ], 652 ],
611 "typeAlias": [ 653 "typeAlias": [
612 "entity.name.typeAlias" 654 "entity.name.type.typeAlias.rust"
613 ], 655 ],
614 "union": [ 656 "union": [
615 "entity.name.union" 657 "entity.name.type.union.rust"
616 ], 658 ],
617 "struct": [ 659 "struct": [
618 "entity.name.type.struct" 660 "entity.name.type.struct.rust"
619 ],
620 "keyword.unsafe": [
621 "keyword.other.unsafe"
622 ], 661 ],
623 "keyword": [ 662 "keyword": [
624 "keyword" 663 "keyword.other.rust"
625 ], 664 ],
626 "keyword.controlFlow": [ 665 "keyword.controlFlow": [
627 "keyword.control" 666 "keyword.control.rust"
628 ], 667 ],
629 "variable.constant": [ 668 "variable.constant": [
630 "entity.name.constant" 669 "variable.other.constant.rust"
670 ],
671 "formatSpecifier": [
672 "punctuation.section.embedded.rust"
673 ],
674 "*.mutable": [
675 "markup.underline"
631 ] 676 ]
632 } 677 }
633 } 678 }
diff --git a/editors/code/rollup.config.js b/editors/code/rollup.config.js
index 2ca27694d..58360eabb 100644
--- a/editors/code/rollup.config.js
+++ b/editors/code/rollup.config.js
@@ -6,7 +6,7 @@ import nodeBuiltins from 'builtin-modules';
6 6
7/** @type { import('rollup').RollupOptions } */ 7/** @type { import('rollup').RollupOptions } */
8export default { 8export default {
9 input: 'out/main.js', 9 input: 'out/src/main.js',
10 plugins: [ 10 plugins: [
11 resolve({ 11 resolve({
12 preferBuiltins: true 12 preferBuiltins: true
@@ -20,7 +20,7 @@ export default {
20 ], 20 ],
21 external: [...nodeBuiltins, 'vscode'], 21 external: [...nodeBuiltins, 'vscode'],
22 output: { 22 output: {
23 file: './out/main.js', 23 file: './out/src/main.js',
24 format: 'cjs', 24 format: 'cjs',
25 exports: 'named' 25 exports: 'named'
26 } 26 }
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json
new file mode 100644
index 000000000..cdcd557dc
--- /dev/null
+++ b/editors/code/rust.tmGrammar.json
@@ -0,0 +1,686 @@
1{
2 "name": "Rust",
3 "scopeName": "source.rust",
4 "patterns": [
5 {
6 "comment": "Implementation",
7 "begin": "\\b(impl)\\b",
8 "end": "\\{",
9 "beginCaptures": {
10 "1": {
11 "name": "storage.type.rust"
12 }
13 },
14 "patterns": [
15 {
16 "include": "#block_comment"
17 },
18 {
19 "include": "#line_comment"
20 },
21 {
22 "include": "#sigils"
23 },
24 {
25 "include": "#mut"
26 },
27 {
28 "include": "#dyn"
29 },
30 {
31 "include": "#ref_lifetime"
32 },
33 {
34 "include": "#core_types"
35 },
36 {
37 "include": "#core_marker"
38 },
39 {
40 "include": "#core_traits"
41 },
42 {
43 "include": "#std_types"
44 },
45 {
46 "include": "#std_traits"
47 },
48 {
49 "include": "#type_params"
50 },
51 {
52 "include": "#where"
53 },
54 {
55 "name": "storage.type.rust",
56 "match": "\\bfor\\b"
57 },
58 {
59 "include": "#type"
60 }
61 ]
62 },
63 {
64 "include": "#block_doc_comment"
65 },
66 {
67 "include": "#block_comment"
68 },
69 {
70 "include": "#line_doc_comment"
71 },
72 {
73 "include": "#line_comment"
74 },
75 {
76 "comment": "Attribute",
77 "name": "meta.attribute.rust",
78 "begin": "#\\!?\\[(\\w*)",
79 "end": "\\]",
80 "captures": {
81 "1": {
82 "name": "entity.name.function.attribute.rust"
83 }
84 },
85 "patterns": [
86 {
87 "include": "#string_literal"
88 },
89 {
90 "include": "#block_doc_comment"
91 },
92 {
93 "include": "#block_comment"
94 },
95 {
96 "include": "#line_doc_comment"
97 },
98 {
99 "include": "#line_comment"
100 }
101 ]
102 },
103 {
104 "comment": "Single-quote string literal (character)",
105 "name": "string.quoted.single.rust",
106 "match": "b?'([^'\\\\]|\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.))'"
107 },
108 {
109 "include": "#string_literal"
110 },
111 {
112 "include": "#raw_string_literal"
113 },
114 {
115 "comment": "Floating point literal (fraction)",
116 "name": "constant.numeric.float.rust",
117 "match": "\\b[0-9][0-9_]*\\.[0-9][0-9_]*([eE][+-]?[0-9_]+)?(f32|f64)?\\b"
118 },
119 {
120 "comment": "Floating point literal (exponent)",
121 "name": "constant.numeric.float.rust",
122 "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?[eE][+-]?[0-9_]+(f32|f64)?\\b"
123 },
124 {
125 "comment": "Floating point literal (typed)",
126 "name": "constant.numeric.float.rust",
127 "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?([eE][+-]?[0-9_]+)?(f32|f64)\\b"
128 },
129 {
130 "comment": "Integer literal (decimal)",
131 "name": "constant.numeric.integer.decimal.rust",
132 "match": "\\b[0-9][0-9_]*([ui](8|16|32|64|128|s|size))?\\b"
133 },
134 {
135 "comment": "Integer literal (hexadecimal)",
136 "name": "constant.numeric.integer.hexadecimal.rust",
137 "match": "\\b0x[a-fA-F0-9_]+([ui](8|16|32|64|128|s|size))?\\b"
138 },
139 {
140 "comment": "Integer literal (octal)",
141 "name": "constant.numeric.integer.octal.rust",
142 "match": "\\b0o[0-7_]+([ui](8|16|32|64|128|s|size))?\\b"
143 },
144 {
145 "comment": "Integer literal (binary)",
146 "name": "constant.numeric.integer.binary.rust",
147 "match": "\\b0b[01_]+([ui](8|16|32|64|128|s|size))?\\b"
148 },
149 {
150 "comment": "Static storage modifier",
151 "name": "storage.modifier.static.rust",
152 "match": "\\bstatic\\b"
153 },
154 {
155 "comment": "Boolean constant",
156 "name": "constant.language.boolean.rust",
157 "match": "\\b(true|false)\\b"
158 },
159 {
160 "comment": "Control keyword",
161 "name": "keyword.control.rust",
162 "match": "\\b(async|await|break|continue|else|if|in|for|loop|match|return|try|while)\\b"
163 },
164 {
165 "comment": "Keyword",
166 "name": "keyword.other.rust",
167 "match": "\\b(crate|extern|mod|let|ref|use|super|move|as)\\b"
168 },
169 {
170 "comment": "Reserved keyword",
171 "name": "invalid.deprecated.rust",
172 "match": "\\b(abstract|alignof|become|do|final|macro|offsetof|override|priv|proc|pure|sizeof|typeof|virtual|yield)\\b"
173 },
174 {
175 "include": "#unsafe"
176 },
177 {
178 "include": "#sigils"
179 },
180 {
181 "include": "#self"
182 },
183 {
184 "include": "#mut"
185 },
186 {
187 "include": "#dyn"
188 },
189 {
190 "include": "#impl"
191 },
192 {
193 "include": "#box"
194 },
195 {
196 "include": "#lifetime"
197 },
198 {
199 "include": "#ref_lifetime"
200 },
201 {
202 "include": "#const"
203 },
204 {
205 "include": "#pub"
206 },
207 {
208 "comment": "Miscellaneous operator",
209 "name": "keyword.operator.misc.rust",
210 "match": "(=>|::)"
211 },
212 {
213 "comment": "Comparison operator",
214 "name": "keyword.operator.comparison.rust",
215 "match": "(&&|\\|\\||==|!=)"
216 },
217 {
218 "comment": "Assignment operator",
219 "name": "keyword.operator.assignment.rust",
220 "match": "(\\+=|-=|/=|\\*=|%=|\\^=|&=|\\|=|<<=|>>=|=)"
221 },
222 {
223 "comment": "Arithmetic operator",
224 "name": "keyword.operator.arithmetic.rust",
225 "match": "(!|\\+|-|/|\\*|%|\\^|&|\\||<<|>>)"
226 },
227 {
228 "comment": "Comparison operator (second group because of regex precedence)",
229 "name": "keyword.operator.comparison.rust",
230 "match": "(<=|>=|<|>)"
231 },
232 {
233 "include": "#core_types"
234 },
235 {
236 "include": "#core_vars"
237 },
238 {
239 "include": "#core_marker"
240 },
241 {
242 "include": "#core_traits"
243 },
244 {
245 "include": "#std_types"
246 },
247 {
248 "include": "#std_traits"
249 },
250 {
251 "comment": "Built-in macro",
252 "name": "support.function.builtin.rust",
253 "match": "\\b(macro_rules|compile_error|format_args|env|option_env|concat_idents|concat|line|column|file|stringify|include|include_str|include_bytes|module_path|cfg)!"
254 },
255 {
256 "comment": "Core macro",
257 "name": "support.function.core.rust",
258 "match": "\\b(panic|assert|assert_eq|assert_ne|debug_assert|debug_assert_eq|debug_assert_ne|try|write|writeln|unreachable|unimplemented)!"
259 },
260 {
261 "comment": "Standard library macro",
262 "name": "support.function.std.rust",
263 "match": "\\b(format|print|println|eprint|eprintln|select|vec)!"
264 },
265 {
266 "comment": "Logging macro",
267 "name": "support.function.log.rust",
268 "match": "\\b(log|error|warn|info|debug|trace|log_enabled)!"
269 },
270 {
271 "comment": "Invokation of a macro",
272 "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*\\!)\\s*[({\\[]",
273 "captures": {
274 "1": {
275 "name": "entity.name.function.macro.rust"
276 }
277 }
278 },
279 {
280 "comment": "Function call",
281 "match": "\\b([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)\\s*\\(",
282 "captures": {
283 "1": {
284 "name": "entity.name.function.rust"
285 }
286 }
287 },
288 {
289 "comment": "Function call with type parameters",
290 "begin": "\\b([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)\\s*(::)(?=\\s*<.*>\\s*\\()",
291 "end": "\\(",
292 "captures": {
293 "1": {
294 "name": "entity.name.function.rust"
295 },
296 "2": {
297 "name": "keyword.operator.misc.rust"
298 }
299 },
300 "patterns": [
301 {
302 "include": "#type_params"
303 }
304 ]
305 },
306 {
307 "comment": "Function definition",
308 "begin": "\\b(fn)\\s+([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)",
309 "end": "[\\{;]",
310 "beginCaptures": {
311 "1": {
312 "name": "keyword.other.fn.rust"
313 },
314 "2": {
315 "name": "entity.name.function.rust"
316 }
317 },
318 "patterns": [
319 {
320 "include": "#block_comment"
321 },
322 {
323 "include": "#line_comment"
324 },
325 {
326 "include": "#sigils"
327 },
328 {
329 "include": "#self"
330 },
331 {
332 "include": "#mut"
333 },
334 {
335 "include": "#dyn"
336 },
337 {
338 "include": "#impl"
339 },
340 {
341 "include": "#ref_lifetime"
342 },
343 {
344 "include": "#core_types"
345 },
346 {
347 "include": "#core_marker"
348 },
349 {
350 "include": "#core_traits"
351 },
352 {
353 "include": "#std_types"
354 },
355 {
356 "include": "#std_traits"
357 },
358 {
359 "include": "#type_params"
360 },
361 {
362 "include": "#const"
363 },
364 {
365 "include": "#where"
366 },
367 {
368 "include": "#unsafe"
369 },
370 {
371 "comment": "Function arguments",
372 "match": "\bfn\b",
373 "name": "keyword.other.fn.rust"
374 }
375 ]
376 },
377 {
378 "comment": "Type declaration",
379 "begin": "\\b(enum|struct|trait|union)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
380 "end": "[\\{\\(;]",
381 "beginCaptures": {
382 "1": {
383 "name": "storage.type.rust"
384 },
385 "2": {
386 "name": "entity.name.type.rust"
387 }
388 },
389 "patterns": [
390 {
391 "include": "#block_comment"
392 },
393 {
394 "include": "#line_comment"
395 },
396 {
397 "include": "#core_traits"
398 },
399 {
400 "include": "#std_traits"
401 },
402 {
403 "include": "#type_params"
404 },
405 {
406 "include": "#core_types"
407 },
408 {
409 "include": "#pub"
410 },
411 {
412 "include": "#where"
413 }
414 ]
415 },
416 {
417 "comment": "Type alias",
418 "begin": "\\b(type)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
419 "end": ";",
420 "beginCaptures": {
421 "1": {
422 "name": "storage.type.rust"
423 },
424 "2": {
425 "name": "entity.name.type.rust"
426 }
427 },
428 "patterns": [
429 {
430 "include": "#block_comment"
431 },
432 {
433 "include": "#line_comment"
434 },
435 {
436 "include": "#sigils"
437 },
438 {
439 "include": "#mut"
440 },
441 {
442 "include": "#dyn"
443 },
444 {
445 "include": "#impl"
446 },
447 {
448 "include": "#lifetime"
449 },
450 {
451 "include": "#ref_lifetime"
452 },
453 {
454 "include": "#core_types"
455 },
456 {
457 "include": "#core_marker"
458 },
459 {
460 "include": "#core_traits"
461 },
462 {
463 "include": "#std_types"
464 },
465 {
466 "include": "#std_traits"
467 },
468 {
469 "include": "#type_params"
470 }
471 ]
472 }
473 ],
474 "repository": {
475 "block_doc_comment": {
476 "comment": "Block documentation comment",
477 "name": "comment.block.documentation.rust",
478 "begin": "/\\*[\\*!](?![\\*/])",
479 "end": "\\*/",
480 "patterns": [
481 {
482 "include": "#block_doc_comment"
483 },
484 {
485 "include": "#block_comment"
486 }
487 ]
488 },
489 "block_comment": {
490 "comment": "Block comment",
491 "name": "comment.block.rust",
492 "begin": "/\\*",
493 "end": "\\*/",
494 "patterns": [
495 {
496 "include": "#block_doc_comment"
497 },
498 {
499 "include": "#block_comment"
500 }
501 ]
502 },
503 "line_doc_comment": {
504 "comment": "Single-line documentation comment",
505 "name": "comment.line.documentation.rust",
506 "begin": "//[!/](?=[^/])",
507 "end": "$"
508 },
509 "line_comment": {
510 "comment": "Single-line comment",
511 "name": "comment.line.double-slash.rust",
512 "begin": "//",
513 "end": "$"
514 },
515 "escaped_character": {
516 "name": "constant.character.escape.rust",
517 "match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)"
518 },
519 "string_literal": {
520 "comment": "Double-quote string literal",
521 "name": "string.quoted.double.rust",
522 "begin": "b?\"",
523 "end": "\"",
524 "patterns": [
525 {
526 "include": "#escaped_character"
527 }
528 ]
529 },
530 "raw_string_literal": {
531 "comment": "Raw double-quote string literal",
532 "name": "string.quoted.double.raw.rust",
533 "begin": "b?r(#*)\"",
534 "end": "\"\\1"
535 },
536 "sigils": {
537 "comment": "Sigil",
538 "name": "keyword.operator.sigil.rust",
539 "match": "[&*](?=[a-zA-Z0-9_\\(\\[\\|\\\"]+)"
540 },
541 "self": {
542 "comment": "Self variable",
543 "name": "variable.language.rust",
544 "match": "\\bself\\b"
545 },
546 "mut": {
547 "comment": "Mutable storage modifier",
548 "name": "storage.modifier.mut.rust",
549 "match": "\\bmut\\b"
550 },
551 "dyn": {
552 "comment": "Dynamic modifier",
553 "name": "storage.modifier.dyn.rust",
554 "match": "\\bdyn\\b"
555 },
556 "impl": {
557 "comment": "Existential type modifier",
558 "name": "storage.modifier.impl.rust",
559 "match": "\\bimpl\\b"
560 },
561 "box": {
562 "comment": "Box storage modifier",
563 "name": "storage.modifier.box.rust",
564 "match": "\\bbox\\b"
565 },
566 "const": {
567 "comment": "Const storage modifier",
568 "name": "storage.modifier.const.rust",
569 "match": "\\bconst\\b"
570 },
571 "pub": {
572 "comment": "Visibility modifier",
573 "name": "storage.modifier.visibility.rust",
574 "match": "\\bpub\\b"
575 },
576 "unsafe": {
577 "comment": "Unsafe code keyword",
578 "name": "keyword.other.unsafe.rust",
579 "match": "\\bunsafe\\b"
580 },
581 "where": {
582 "comment": "Generic where clause",
583 "name": "keyword.other.where.rust",
584 "match": "\\bwhere\\b"
585 },
586 "lifetime": {
587 "comment": "Named lifetime",
588 "name": "storage.modifier.lifetime.rust",
589 "match": "'([a-zA-Z_][a-zA-Z0-9_]*)\\b"
590 },
591 "ref_lifetime": {
592 "comment": "Reference with named lifetime",
593 "match": "(&)('[a-zA-Z_][a-zA-Z0-9_]*)\\b",
594 "captures": {
595 "1": {
596 "name": "keyword.operator.sigil.rust"
597 },
598 "2": {
599 "name": "storage.modifier.lifetime.rust"
600 }
601 }
602 },
603 "core_types": {
604 "comment": "Built-in/core type",
605 "name": "support.type.primitive.rust",
606 "match": "\\b(bool|char|usize|isize|u8|u16|u32|u64|u128|i8|i16|i32|i64|i128|f32|f64|str|Self)\\b"
607 },
608 "core_vars": {
609 "comment": "Core type variant",
610 "name": "support.constant.core.rust",
611 "match": "\\b(Some|None|Ok|Err)\\b"
612 },
613 "core_marker": {
614 "comment": "Core trait (marker)",
615 "name": "entity.name.type.marker.rust",
616 "match": "\\b(Copy|Send|Sized|Sync)\\b"
617 },
618 "core_traits": {
619 "comment": "Core trait",
620 "name": "entity.name.type.core.rust",
621 "match": "\\b(Drop|Fn|FnMut|FnOnce|Clone|PartialEq|PartialOrd|Eq|Ord|AsRef|AsMut|Into|From|Default|Iterator|Extend|IntoIterator|DoubleEndedIterator|ExactSizeIterator)\\b"
622 },
623 "std_types": {
624 "comment": "Standard library type",
625 "name": "entity.name.type.class.std.rust",
626 "match": "\\b(Box|String|Vec|Path|PathBuf|Option|Result)\\b"
627 },
628 "std_traits": {
629 "comment": "Standard library trait",
630 "name": "entity.name.type.std.rust",
631 "match": "\\b(ToOwned|ToString)\\b"
632 },
633 "type": {
634 "comment": "A type",
635 "name": "entity.name.type.rust",
636 "match": "\\b([A-Za-z][_A-Za-z0-9]*|_[_A-Za-z0-9]+)\\b"
637 },
638 "type_params": {
639 "comment": "Type parameters",
640 "name": "meta.type_params.rust",
641 "begin": "<(?![=<])",
642 "end": "(?<![-])>",
643 "patterns": [
644 {
645 "include": "#block_comment"
646 },
647 {
648 "include": "#line_comment"
649 },
650 {
651 "include": "#sigils"
652 },
653 {
654 "include": "#mut"
655 },
656 {
657 "include": "#dyn"
658 },
659 {
660 "include": "#impl"
661 },
662 {
663 "include": "#lifetime"
664 },
665 {
666 "include": "#core_types"
667 },
668 {
669 "include": "#core_marker"
670 },
671 {
672 "include": "#core_traits"
673 },
674 {
675 "include": "#std_types"
676 },
677 {
678 "include": "#std_traits"
679 },
680 {
681 "include": "#type_params"
682 }
683 ]
684 }
685 }
686} \ No newline at end of file
diff --git a/editors/code/src/cargo.ts b/editors/code/src/cargo.ts
index 28c7de992..a55b2f860 100644
--- a/editors/code/src/cargo.ts
+++ b/editors/code/src/cargo.ts
@@ -12,14 +12,44 @@ interface CompilationArtifact {
12 isTest: boolean; 12 isTest: boolean;
13} 13}
14 14
15export interface ArtifactSpec {
16 cargoArgs: string[];
17 filter?: (artifacts: CompilationArtifact[]) => CompilationArtifact[];
18}
19
20export function artifactSpec(args: readonly string[]): ArtifactSpec {
21 const cargoArgs = [...args, "--message-format=json"];
22
23 // arguments for a runnable from the quick pick should be updated.
24 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
25 switch (cargoArgs[0]) {
26 case "run": cargoArgs[0] = "build"; break;
27 case "test": {
28 if (!cargoArgs.includes("--no-run")) {
29 cargoArgs.push("--no-run");
30 }
31 break;
32 }
33 }
34
35 const result: ArtifactSpec = { cargoArgs: cargoArgs };
36 if (cargoArgs[0] === "test") {
37 // for instance, `crates\rust-analyzer\tests\heavy_tests\main.rs` tests
38 // produce 2 artifacts: {"kind": "bin"} and {"kind": "test"}
39 result.filter = (artifacts) => artifacts.filter(it => it.isTest);
40 }
41
42 return result;
43}
44
15export class Cargo { 45export class Cargo {
16 constructor(readonly rootFolder: string, readonly output: OutputChannel) { } 46 constructor(readonly rootFolder: string, readonly output: OutputChannel) { }
17 47
18 private async artifactsFromArgs(cargoArgs: string[]): Promise<CompilationArtifact[]> { 48 private async getArtifacts(spec: ArtifactSpec): Promise<CompilationArtifact[]> {
19 const artifacts: CompilationArtifact[] = []; 49 const artifacts: CompilationArtifact[] = [];
20 50
21 try { 51 try {
22 await this.runCargo(cargoArgs, 52 await this.runCargo(spec.cargoArgs,
23 message => { 53 message => {
24 if (message.reason === 'compiler-artifact' && message.executable) { 54 if (message.reason === 'compiler-artifact' && message.executable) {
25 const isBinary = message.target.crate_types.includes('bin'); 55 const isBinary = message.target.crate_types.includes('bin');
@@ -43,26 +73,11 @@ export class Cargo {
43 throw new Error(`Cargo invocation has failed: ${err}`); 73 throw new Error(`Cargo invocation has failed: ${err}`);
44 } 74 }
45 75
46 return artifacts; 76 return spec.filter?.(artifacts) ?? artifacts;
47 } 77 }
48 78
49 async executableFromArgs(args: readonly string[]): Promise<string> { 79 async executableFromArgs(args: readonly string[]): Promise<string> {
50 const cargoArgs = [...args, "--message-format=json"]; 80 const artifacts = await this.getArtifacts(artifactSpec(args));
51
52 // arguments for a runnable from the quick pick should be updated.
53 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
54 if (cargoArgs[0] === "run") {
55 cargoArgs[0] = "build";
56 } else if (cargoArgs.indexOf("--no-run") === -1) {
57 cargoArgs.push("--no-run");
58 }
59
60 let artifacts = await this.artifactsFromArgs(cargoArgs);
61 if (cargoArgs[0] === "test") {
62 // for instance, `crates\rust-analyzer\tests\heavy_tests\main.rs` tests
63 // produce 2 artifacts: {"kind": "bin"} and {"kind": "test"}
64 artifacts = artifacts.filter(a => a.isTest);
65 }
66 81
67 if (artifacts.length === 0) { 82 if (artifacts.length === 0) {
68 throw new Error('No compilation artifacts'); 83 throw new Error('No compilation artifacts');
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index cffdcf11a..d64f9a3f9 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -31,24 +31,112 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
31 const res = await next(document, token); 31 const res = await next(document, token);
32 if (res === undefined) throw new Error('busy'); 32 if (res === undefined) throw new Error('busy');
33 return res; 33 return res;
34 },
35 async provideCodeActions(document: vscode.TextDocument, range: vscode.Range, context: vscode.CodeActionContext, token: vscode.CancellationToken, _next: lc.ProvideCodeActionsSignature) {
36 const params: lc.CodeActionParams = {
37 textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),
38 range: client.code2ProtocolConverter.asRange(range),
39 context: client.code2ProtocolConverter.asCodeActionContext(context)
40 };
41 return client.sendRequest(lc.CodeActionRequest.type, params, token).then((values) => {
42 if (values === null) return undefined;
43 const result: (vscode.CodeAction | vscode.Command)[] = [];
44 const groups = new Map<string, { index: number; items: vscode.CodeAction[] }>();
45 for (const item of values) {
46 if (lc.CodeAction.is(item)) {
47 const action = client.protocol2CodeConverter.asCodeAction(item);
48 const group = actionGroup(item);
49 if (isSnippetEdit(item) || group) {
50 action.command = {
51 command: "rust-analyzer.applySnippetWorkspaceEdit",
52 title: "",
53 arguments: [action.edit],
54 };
55 action.edit = undefined;
56 }
57
58 if (group) {
59 let entry = groups.get(group);
60 if (!entry) {
61 entry = { index: result.length, items: [] };
62 groups.set(group, entry);
63 result.push(action);
64 }
65 entry.items.push(action);
66 } else {
67 result.push(action);
68 }
69 } else {
70 const command = client.protocol2CodeConverter.asCommand(item);
71 result.push(command);
72 }
73 }
74 for (const [group, { index, items }] of groups) {
75 if (items.length === 1) {
76 result[index] = items[0];
77 } else {
78 const action = new vscode.CodeAction(group);
79 action.command = {
80 command: "rust-analyzer.applyActionGroup",
81 title: "",
82 arguments: [items.map((item) => {
83 return { label: item.title, edit: item.command!!.arguments!![0] };
84 })],
85 };
86 result[index] = action;
87 }
88 }
89 return result;
90 },
91 (_error) => undefined
92 );
34 } 93 }
94
35 } as any 95 } as any
36 }; 96 };
37 97
38 const res = new lc.LanguageClient( 98 const client = new lc.LanguageClient(
39 'rust-analyzer', 99 'rust-analyzer',
40 'Rust Analyzer Language Server', 100 'Rust Analyzer Language Server',
41 serverOptions, 101 serverOptions,
42 clientOptions, 102 clientOptions,
43 ); 103 );
44 104
45 // To turn on all proposed features use: res.registerProposedFeatures(); 105 // To turn on all proposed features use: client.registerProposedFeatures();
46 // Here we want to enable CallHierarchyFeature and SemanticTokensFeature 106 // Here we want to enable CallHierarchyFeature and SemanticTokensFeature
47 // since they are available on stable. 107 // since they are available on stable.
48 // Note that while these features are stable in vscode their LSP protocol 108 // Note that while these features are stable in vscode their LSP protocol
49 // implementations are still in the "proposed" category for 3.16. 109 // implementations are still in the "proposed" category for 3.16.
50 res.registerFeature(new CallHierarchyFeature(res)); 110 client.registerFeature(new CallHierarchyFeature(client));
51 res.registerFeature(new SemanticTokensFeature(res)); 111 client.registerFeature(new SemanticTokensFeature(client));
112 client.registerFeature(new ExperimentalFeatures());
113
114 return client;
115}
116
117class ExperimentalFeatures implements lc.StaticFeature {
118 fillClientCapabilities(capabilities: lc.ClientCapabilities): void {
119 const caps: any = capabilities.experimental ?? {};
120 caps.snippetTextEdit = true;
121 caps.codeActionGroup = true;
122 capabilities.experimental = caps;
123 }
124 initialize(_capabilities: lc.ServerCapabilities<any>, _documentSelector: lc.DocumentSelector | undefined): void {
125 }
126}
127
128function isSnippetEdit(action: lc.CodeAction): boolean {
129 const documentChanges = action.edit?.documentChanges ?? [];
130 for (const edit of documentChanges) {
131 if (lc.TextDocumentEdit.is(edit)) {
132 if (edit.edits.some((indel) => (indel as any).insertTextFormat === lc.InsertTextFormat.Snippet)) {
133 return true;
134 }
135 }
136 }
137 return false;
138}
52 139
53 return res; 140function actionGroup(action: lc.CodeAction): string | undefined {
141 return (action as any).group;
54} 142}
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts
index bdb7fc3b0..abb53a248 100644
--- a/editors/code/src/commands/index.ts
+++ b/editors/code/src/commands/index.ts
@@ -4,6 +4,7 @@ import * as ra from '../rust-analyzer-api';
4 4
5import { Ctx, Cmd } from '../ctx'; 5import { Ctx, Cmd } from '../ctx';
6import * as sourceChange from '../source_change'; 6import * as sourceChange from '../source_change';
7import { assert } from '../util';
7 8
8export * from './analyzer_status'; 9export * from './analyzer_status';
9export * from './matching_brace'; 10export * from './matching_brace';
@@ -40,14 +41,65 @@ export function applySourceChange(ctx: Ctx): Cmd {
40 }; 41 };
41} 42}
42 43
43export function selectAndApplySourceChange(ctx: Ctx): Cmd { 44export function applyActionGroup(_ctx: Ctx): Cmd {
44 return async (changes: ra.SourceChange[]) => { 45 return async (actions: { label: string; edit: vscode.WorkspaceEdit }[]) => {
45 if (changes.length === 1) { 46 const selectedAction = await vscode.window.showQuickPick(actions);
46 await sourceChange.applySourceChange(ctx, changes[0]); 47 if (!selectedAction) return;
47 } else if (changes.length > 0) { 48 await applySnippetWorkspaceEdit(selectedAction.edit);
48 const selectedChange = await vscode.window.showQuickPick(changes); 49 };
49 if (!selectedChange) return; 50}
50 await sourceChange.applySourceChange(ctx, selectedChange); 51
51 } 52export function applySnippetWorkspaceEditCommand(_ctx: Ctx): Cmd {
53 return async (edit: vscode.WorkspaceEdit) => {
54 await applySnippetWorkspaceEdit(edit);
52 }; 55 };
53} 56}
57
58export async function applySnippetWorkspaceEdit(edit: vscode.WorkspaceEdit) {
59 assert(edit.entries().length === 1, `bad ws edit: ${JSON.stringify(edit)}`);
60 const [uri, edits] = edit.entries()[0];
61
62 const editor = vscode.window.visibleTextEditors.find((it) => it.document.uri.toString() === uri.toString());
63 if (!editor) return;
64
65 let selection: vscode.Selection | undefined = undefined;
66 let lineDelta = 0;
67 await editor.edit((builder) => {
68 for (const indel of edits) {
69 const parsed = parseSnippet(indel.newText);
70 if (parsed) {
71 const [newText, [placeholderStart, placeholderLength]] = parsed;
72 const prefix = newText.substr(0, placeholderStart);
73 const lastNewline = prefix.lastIndexOf('\n');
74
75 const startLine = indel.range.start.line + lineDelta + countLines(prefix);
76 const startColumn = lastNewline === -1 ?
77 indel.range.start.character + placeholderStart
78 : prefix.length - lastNewline - 1;
79 const endColumn = startColumn + placeholderLength;
80 selection = new vscode.Selection(
81 new vscode.Position(startLine, startColumn),
82 new vscode.Position(startLine, endColumn),
83 );
84 builder.replace(indel.range, newText);
85 } else {
86 lineDelta = countLines(indel.newText) - (indel.range.end.line - indel.range.start.line);
87 builder.replace(indel.range, indel.newText);
88 }
89 }
90 });
91 if (selection) editor.selection = selection;
92}
93
94function parseSnippet(snip: string): [string, [number, number]] | undefined {
95 const m = snip.match(/\$(0|\{0:([^}]*)\})/);
96 if (!m) return undefined;
97 const placeholder = m[2] ?? "";
98 const range: [number, number] = [m.index!!, placeholder.length];
99 const insert = snip.replace(m[0], placeholder);
100 return [insert, range];
101}
102
103function countLines(text: string): number {
104 return (text.match(/\n/g) || []).length;
105}
diff --git a/editors/code/src/commands/join_lines.ts b/editors/code/src/commands/join_lines.ts
index de0614653..0bf1ee6e6 100644
--- a/editors/code/src/commands/join_lines.ts
+++ b/editors/code/src/commands/join_lines.ts
@@ -1,7 +1,7 @@
1import * as ra from '../rust-analyzer-api'; 1import * as ra from '../rust-analyzer-api';
2import * as lc from 'vscode-languageclient';
2 3
3import { Ctx, Cmd } from '../ctx'; 4import { Ctx, Cmd } from '../ctx';
4import { applySourceChange } from '../source_change';
5 5
6export function joinLines(ctx: Ctx): Cmd { 6export function joinLines(ctx: Ctx): Cmd {
7 return async () => { 7 return async () => {
@@ -9,10 +9,14 @@ export function joinLines(ctx: Ctx): Cmd {
9 const client = ctx.client; 9 const client = ctx.client;
10 if (!editor || !client) return; 10 if (!editor || !client) return;
11 11
12 const change = await client.sendRequest(ra.joinLines, { 12 const items: lc.TextEdit[] = await client.sendRequest(ra.joinLines, {
13 range: client.code2ProtocolConverter.asRange(editor.selection), 13 ranges: editor.selections.map((it) => client.code2ProtocolConverter.asRange(it)),
14 textDocument: { uri: editor.document.uri.toString() }, 14 textDocument: { uri: editor.document.uri.toString() },
15 }); 15 });
16 await applySourceChange(ctx, change); 16 editor.edit((builder) => {
17 client.protocol2CodeConverter.asTextEdits(items).forEach((edit) => {
18 builder.replace(edit.range, edit.newText);
19 });
20 });
17 }; 21 };
18} 22}
diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts
index 285849db7..a7871c31e 100644
--- a/editors/code/src/commands/on_enter.ts
+++ b/editors/code/src/commands/on_enter.ts
@@ -1,8 +1,8 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import * as ra from '../rust-analyzer-api'; 2import * as ra from '../rust-analyzer-api';
3 3
4import { applySourceChange } from '../source_change';
5import { Cmd, Ctx } from '../ctx'; 4import { Cmd, Ctx } from '../ctx';
5import { applySnippetWorkspaceEdit } from '.';
6 6
7async function handleKeypress(ctx: Ctx) { 7async function handleKeypress(ctx: Ctx) {
8 const editor = ctx.activeRustEditor; 8 const editor = ctx.activeRustEditor;
@@ -21,7 +21,8 @@ async function handleKeypress(ctx: Ctx) {
21 }); 21 });
22 if (!change) return false; 22 if (!change) return false;
23 23
24 await applySourceChange(ctx, change); 24 const workspaceEdit = client.protocol2CodeConverter.asWorkspaceEdit(change);
25 await applySnippetWorkspaceEdit(workspaceEdit);
25 return true; 26 return true;
26} 27}
27 28
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts
index b1d93fc34..0bd30fb07 100644
--- a/editors/code/src/commands/runnables.ts
+++ b/editors/code/src/commands/runnables.ts
@@ -7,7 +7,7 @@ import { startDebugSession, getDebugConfiguration } from '../debug';
7 7
8const quickPickButtons = [{ iconPath: new vscode.ThemeIcon("save"), tooltip: "Save as a launch.json configurtation." }]; 8const quickPickButtons = [{ iconPath: new vscode.ThemeIcon("save"), tooltip: "Save as a launch.json configurtation." }];
9 9
10async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick, showButtons: boolean = true): Promise<RunnableQuickPick | undefined> { 10async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick, debuggeeOnly = false, showButtons: boolean = true): Promise<RunnableQuickPick | undefined> {
11 const editor = ctx.activeRustEditor; 11 const editor = ctx.activeRustEditor;
12 const client = ctx.client; 12 const client = ctx.client;
13 if (!editor || !client) return; 13 if (!editor || !client) return;
@@ -33,9 +33,20 @@ async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick, showBu
33 ) { 33 ) {
34 continue; 34 continue;
35 } 35 }
36
37 if (debuggeeOnly && (r.label.startsWith('doctest') || r.label.startsWith('cargo'))) {
38 continue;
39 }
36 items.push(new RunnableQuickPick(r)); 40 items.push(new RunnableQuickPick(r));
37 } 41 }
38 42
43 if (items.length === 0) {
44 // it is the debug case, run always has at least 'cargo check ...'
45 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_runnables
46 vscode.window.showErrorMessage("There's no debug target!");
47 return;
48 }
49
39 return await new Promise((resolve) => { 50 return await new Promise((resolve) => {
40 const disposables: vscode.Disposable[] = []; 51 const disposables: vscode.Disposable[] = [];
41 const close = (result?: RunnableQuickPick) => { 52 const close = (result?: RunnableQuickPick) => {
@@ -107,7 +118,7 @@ export function debug(ctx: Ctx): Cmd {
107 let prevDebuggee: RunnableQuickPick | undefined; 118 let prevDebuggee: RunnableQuickPick | undefined;
108 119
109 return async () => { 120 return async () => {
110 const item = await selectRunnable(ctx, prevDebuggee); 121 const item = await selectRunnable(ctx, prevDebuggee, true);
111 if (!item) return; 122 if (!item) return;
112 123
113 item.detail = 'restart'; 124 item.detail = 'restart';
@@ -147,7 +158,7 @@ async function makeDebugConfig(ctx: Ctx, item: RunnableQuickPick): Promise<void>
147 158
148export function newDebugConfig(ctx: Ctx): Cmd { 159export function newDebugConfig(ctx: Ctx): Cmd {
149 return async () => { 160 return async () => {
150 const item = await selectRunnable(ctx, undefined, false); 161 const item = await selectRunnable(ctx, undefined, true, false);
151 if (!item) return; 162 if (!item) return;
152 163
153 await makeDebugConfig(ctx, item); 164 await makeDebugConfig(ctx, item);
diff --git a/editors/code/src/commands/ssr.ts b/editors/code/src/commands/ssr.ts
index 6fee051fd..5d40a64d2 100644
--- a/editors/code/src/commands/ssr.ts
+++ b/editors/code/src/commands/ssr.ts
@@ -2,7 +2,6 @@ import * as vscode from 'vscode';
2import * as ra from "../rust-analyzer-api"; 2import * as ra from "../rust-analyzer-api";
3 3
4import { Ctx, Cmd } from '../ctx'; 4import { Ctx, Cmd } from '../ctx';
5import { applySourceChange } from '../source_change';
6 5
7export function ssr(ctx: Ctx): Cmd { 6export function ssr(ctx: Ctx): Cmd {
8 return async () => { 7 return async () => {
@@ -11,7 +10,7 @@ export function ssr(ctx: Ctx): Cmd {
11 10
12 const options: vscode.InputBoxOptions = { 11 const options: vscode.InputBoxOptions = {
13 value: "() ==>> ()", 12 value: "() ==>> ()",
14 prompt: "EnteR request, for example 'Foo($a:expr) ==> Foo::new($a)' ", 13 prompt: "Enter request, for example 'Foo($a:expr) ==> Foo::new($a)' ",
15 validateInput: async (x: string) => { 14 validateInput: async (x: string) => {
16 try { 15 try {
17 await client.sendRequest(ra.ssr, { query: x, parseOnly: true }); 16 await client.sendRequest(ra.ssr, { query: x, parseOnly: true });
@@ -22,11 +21,10 @@ export function ssr(ctx: Ctx): Cmd {
22 } 21 }
23 }; 22 };
24 const request = await vscode.window.showInputBox(options); 23 const request = await vscode.window.showInputBox(options);
25
26 if (!request) return; 24 if (!request) return;
27 25
28 const change = await client.sendRequest(ra.ssr, { query: request, parseOnly: false }); 26 const edit = await client.sendRequest(ra.ssr, { query: request, parseOnly: false });
29 27
30 await applySourceChange(ctx, change); 28 await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit));
31 }; 29 };
32} 30}
diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts
index b80a18a47..a5446c327 100644
--- a/editors/code/src/commands/syntax_tree.ts
+++ b/editors/code/src/commands/syntax_tree.ts
@@ -206,7 +206,7 @@ class AstInspector implements vscode.HoverProvider, vscode.DefinitionProvider, D
206 } 206 }
207 207
208 private parseRustTextRange(doc: vscode.TextDocument, astLine: string): undefined | vscode.Range { 208 private parseRustTextRange(doc: vscode.TextDocument, astLine: string): undefined | vscode.Range {
209 const parsedRange = /\[(\d+); (\d+)\)/.exec(astLine); 209 const parsedRange = /(\d+)\.\.(\d+)/.exec(astLine);
210 if (!parsedRange) return; 210 if (!parsedRange) return;
211 211
212 const [begin, end] = parsedRange 212 const [begin, end] = parsedRange
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 1652827c3..ee294fbe3 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -16,6 +16,10 @@ export class Config {
16 "files", 16 "files",
17 "highlighting", 17 "highlighting",
18 "updates.channel", 18 "updates.channel",
19 "lens.enable",
20 "lens.run",
21 "lens.debug",
22 "lens.implementations",
19 ] 23 ]
20 .map(opt => `${this.rootSection}.${opt}`); 24 .map(opt => `${this.rootSection}.${opt}`);
21 25
@@ -119,4 +123,13 @@ export class Config {
119 sourceFileMap: sourceFileMap 123 sourceFileMap: sourceFileMap
120 }; 124 };
121 } 125 }
126
127 get lens() {
128 return {
129 enable: this.get<boolean>("lens.enable"),
130 run: this.get<boolean>("lens.run"),
131 debug: this.get<boolean>("lens.debug"),
132 implementations: this.get<boolean>("lens.implementations"),
133 };
134 }
122} 135}
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index c015460b8..3405634f3 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -1,7 +1,7 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import * as path from "path"; 2import * as path from "path";
3import * as os from "os"; 3import * as os from "os";
4import { promises as fs } from "fs"; 4import { promises as fs, PathLike } from "fs";
5 5
6import * as commands from './commands'; 6import * as commands from './commands';
7import { activateInlayHints } from './inlay_hints'; 7import { activateInlayHints } from './inlay_hints';
@@ -12,6 +12,7 @@ import { log, assert, isValidExecutable } from './util';
12import { PersistentState } from './persistent_state'; 12import { PersistentState } from './persistent_state';
13import { fetchRelease, download } from './net'; 13import { fetchRelease, download } from './net';
14import { activateTaskProvider } from './tasks'; 14import { activateTaskProvider } from './tasks';
15import { exec } from 'child_process';
15 16
16let ctx: Ctx | undefined; 17let ctx: Ctx | undefined;
17 18
@@ -91,7 +92,8 @@ export async function activate(context: vscode.ExtensionContext) {
91 ctx.registerCommand('debugSingle', commands.debugSingle); 92 ctx.registerCommand('debugSingle', commands.debugSingle);
92 ctx.registerCommand('showReferences', commands.showReferences); 93 ctx.registerCommand('showReferences', commands.showReferences);
93 ctx.registerCommand('applySourceChange', commands.applySourceChange); 94 ctx.registerCommand('applySourceChange', commands.applySourceChange);
94 ctx.registerCommand('selectAndApplySourceChange', commands.selectAndApplySourceChange); 95 ctx.registerCommand('applySnippetWorkspaceEdit', commands.applySnippetWorkspaceEditCommand);
96 ctx.registerCommand('applyActionGroup', commands.applyActionGroup);
95 97
96 ctx.pushCleanup(activateTaskProvider(workspaceFolder)); 98 ctx.pushCleanup(activateTaskProvider(workspaceFolder));
97 99
@@ -187,6 +189,46 @@ async function bootstrapServer(config: Config, state: PersistentState): Promise<
187 return path; 189 return path;
188} 190}
189 191
192async function patchelf(dest: PathLike): Promise<void> {
193 await vscode.window.withProgress(
194 {
195 location: vscode.ProgressLocation.Notification,
196 title: "Patching rust-analyzer for NixOS"
197 },
198 async (progress, _) => {
199 const expression = `
200 {src, pkgs ? import <nixpkgs> {}}:
201 pkgs.stdenv.mkDerivation {
202 name = "rust-analyzer";
203 inherit src;
204 phases = [ "installPhase" "fixupPhase" ];
205 installPhase = "cp $src $out";
206 fixupPhase = ''
207 chmod 755 $out
208 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out
209 '';
210 }
211 `;
212 const origFile = dest + "-orig";
213 await fs.rename(dest, origFile);
214 progress.report({ message: "Patching executable", increment: 20 });
215 await new Promise((resolve, reject) => {
216 const handle = exec(`nix-build -E - --arg src '${origFile}' -o ${dest}`,
217 (err, stdout, stderr) => {
218 if (err != null) {
219 reject(Error(stderr));
220 } else {
221 resolve(stdout);
222 }
223 });
224 handle.stdin?.write(expression);
225 handle.stdin?.end();
226 });
227 await fs.unlink(origFile);
228 }
229 );
230}
231
190async function getServer(config: Config, state: PersistentState): Promise<string | undefined> { 232async function getServer(config: Config, state: PersistentState): Promise<string | undefined> {
191 const explicitPath = process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath; 233 const explicitPath = process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath;
192 if (explicitPath) { 234 if (explicitPath) {
@@ -236,6 +278,12 @@ async function getServer(config: Config, state: PersistentState): Promise<string
236 assert(!!artifact, `Bad release: ${JSON.stringify(release)}`); 278 assert(!!artifact, `Bad release: ${JSON.stringify(release)}`);
237 279
238 await download(artifact.browser_download_url, dest, "Downloading rust-analyzer server", { mode: 0o755 }); 280 await download(artifact.browser_download_url, dest, "Downloading rust-analyzer server", { mode: 0o755 });
281
282 // Patching executable if that's NixOS.
283 if (await fs.stat("/etc/nixos").then(_ => true).catch(_ => false)) {
284 await patchelf(dest);
285 }
286
239 await state.updateServerVersion(config.package.version); 287 await state.updateServerVersion(config.package.version);
240 return dest; 288 return dest;
241} 289}
diff --git a/editors/code/src/rust-analyzer-api.ts b/editors/code/src/rust-analyzer-api.ts
index 400ac3714..73f36432f 100644
--- a/editors/code/src/rust-analyzer-api.ts
+++ b/editors/code/src/rust-analyzer-api.ts
@@ -64,12 +64,12 @@ export const parentModule = request<lc.TextDocumentPositionParams, Vec<lc.Locati
64 64
65export interface JoinLinesParams { 65export interface JoinLinesParams {
66 textDocument: lc.TextDocumentIdentifier; 66 textDocument: lc.TextDocumentIdentifier;
67 range: lc.Range; 67 ranges: lc.Range[];
68} 68}
69export const joinLines = request<JoinLinesParams, SourceChange>("joinLines"); 69export const joinLines = new lc.RequestType<JoinLinesParams, lc.TextEdit[], unknown>('experimental/joinLines');
70 70
71 71
72export const onEnter = request<lc.TextDocumentPositionParams, Option<SourceChange>>("onEnter"); 72export const onEnter = request<lc.TextDocumentPositionParams, Option<lc.WorkspaceEdit>>("onEnter");
73 73
74export interface RunnablesParams { 74export interface RunnablesParams {
75 textDocument: lc.TextDocumentIdentifier; 75 textDocument: lc.TextDocumentIdentifier;
@@ -112,7 +112,7 @@ export interface SsrParams {
112 query: string; 112 query: string;
113 parseOnly: boolean; 113 parseOnly: boolean;
114} 114}
115export const ssr = request<SsrParams, SourceChange>("ssr"); 115export const ssr = new lc.RequestType<SsrParams, lc.WorkspaceEdit, unknown>('experimental/ssr');
116 116
117 117
118export const publishDecorations = notification<PublishDecorationsParams>("publishDecorations"); 118export const publishDecorations = notification<PublishDecorationsParams>("publishDecorations");
diff --git a/editors/code/tests/runTests.ts b/editors/code/tests/runTests.ts
new file mode 100644
index 000000000..22df80ad3
--- /dev/null
+++ b/editors/code/tests/runTests.ts
@@ -0,0 +1,43 @@
1import * as path from 'path';
2import * as fs from 'fs';
3
4import { runTests } from 'vscode-test';
5
6async function main() {
7 // The folder containing the Extension Manifest package.json
8 // Passed to `--extensionDevelopmentPath`
9 const extensionDevelopmentPath = path.resolve(__dirname, '../../');
10
11 // Minimum supported version.
12 const jsonData = fs.readFileSync(path.join(extensionDevelopmentPath, 'package.json'));
13 const json = JSON.parse(jsonData.toString());
14 let minimalVersion: string = json.engines.vscode;
15 if (minimalVersion.startsWith('^')) minimalVersion = minimalVersion.slice(1);
16
17 const launchArgs = ["--disable-extensions"];
18
19 // All test suites (either unit tests or integration tests) should be in subfolders.
20 const extensionTestsPath = path.resolve(__dirname, './unit/index');
21
22 // Run tests using the minimal supported version.
23 await runTests({
24 version: minimalVersion,
25 launchArgs,
26 extensionDevelopmentPath,
27 extensionTestsPath
28 });
29
30 // and the latest one
31 await runTests({
32 version: 'stable',
33 launchArgs,
34 extensionDevelopmentPath,
35 extensionTestsPath
36 });
37}
38
39main().catch(err => {
40 // eslint-disable-next-line no-console
41 console.error('Failed to run tests', err);
42 process.exit(1);
43});
diff --git a/editors/code/tests/unit/index.ts b/editors/code/tests/unit/index.ts
new file mode 100644
index 000000000..5165720b4
--- /dev/null
+++ b/editors/code/tests/unit/index.ts
@@ -0,0 +1,38 @@
1import * as path from 'path';
2import Mocha from 'mocha';
3import glob from 'glob';
4
5export function run(): Promise<void> {
6 // Create the mocha test
7 const mocha = new Mocha({
8 ui: 'tdd',
9 color: true
10 });
11
12 const testsRoot = __dirname;
13
14 return new Promise((resolve, reject) => {
15 glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
16 if (err) {
17 return reject(err);
18 }
19
20 // Add files to the test suite
21 files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));
22
23 try {
24 // Run the mocha test
25 mocha.timeout(100000);
26 mocha.run(failures => {
27 if (failures > 0) {
28 reject(new Error(`${failures} tests failed.`));
29 } else {
30 resolve();
31 }
32 });
33 } catch (err) {
34 reject(err);
35 }
36 });
37 });
38}
diff --git a/editors/code/tests/unit/launch_config.test.ts b/editors/code/tests/unit/launch_config.test.ts
new file mode 100644
index 000000000..d5cf1b74e
--- /dev/null
+++ b/editors/code/tests/unit/launch_config.test.ts
@@ -0,0 +1,52 @@
1import * as assert from 'assert';
2import * as cargo from '../../src/cargo';
3
4suite('Launch configuration', () => {
5
6 suite('Lens', () => {
7 test('A binary', async () => {
8 const args = cargo.artifactSpec(["build", "--package", "pkg_name", "--bin", "pkg_name"]);
9
10 assert.deepEqual(args.cargoArgs, ["build", "--package", "pkg_name", "--bin", "pkg_name", "--message-format=json"]);
11 assert.deepEqual(args.filter, undefined);
12 });
13
14 test('One of Multiple Binaries', async () => {
15 const args = cargo.artifactSpec(["build", "--package", "pkg_name", "--bin", "bin1"]);
16
17 assert.deepEqual(args.cargoArgs, ["build", "--package", "pkg_name", "--bin", "bin1", "--message-format=json"]);
18 assert.deepEqual(args.filter, undefined);
19 });
20
21 test('A test', async () => {
22 const args = cargo.artifactSpec(["test", "--package", "pkg_name", "--lib", "--no-run"]);
23
24 assert.deepEqual(args.cargoArgs, ["test", "--package", "pkg_name", "--lib", "--no-run", "--message-format=json"]);
25 assert.notDeepEqual(args.filter, undefined);
26 });
27 });
28
29 suite('QuickPick', () => {
30 test('A binary', async () => {
31 const args = cargo.artifactSpec(["run", "--package", "pkg_name", "--bin", "pkg_name"]);
32
33 assert.deepEqual(args.cargoArgs, ["build", "--package", "pkg_name", "--bin", "pkg_name", "--message-format=json"]);
34 assert.deepEqual(args.filter, undefined);
35 });
36
37
38 test('One of Multiple Binaries', async () => {
39 const args = cargo.artifactSpec(["run", "--package", "pkg_name", "--bin", "bin2"]);
40
41 assert.deepEqual(args.cargoArgs, ["build", "--package", "pkg_name", "--bin", "bin2", "--message-format=json"]);
42 assert.deepEqual(args.filter, undefined);
43 });
44
45 test('A test', async () => {
46 const args = cargo.artifactSpec(["test", "--package", "pkg_name", "--lib"]);
47
48 assert.deepEqual(args.cargoArgs, ["test", "--package", "pkg_name", "--lib", "--message-format=json", "--no-run"]);
49 assert.notDeepEqual(args.filter, undefined);
50 });
51 });
52});
diff --git a/editors/code/tsconfig.json b/editors/code/tsconfig.json
index ad134865a..32d1a865f 100644
--- a/editors/code/tsconfig.json
+++ b/editors/code/tsconfig.json
@@ -9,7 +9,7 @@
9 "esModuleInterop": true, 9 "esModuleInterop": true,
10 "allowSyntheticDefaultImports": true, 10 "allowSyntheticDefaultImports": true,
11 "sourceMap": true, 11 "sourceMap": true,
12 "rootDir": "src", 12 "rootDir": ".",
13 "strict": true, 13 "strict": true,
14 "noUnusedLocals": true, 14 "noUnusedLocals": true,
15 "noUnusedParameters": true, 15 "noUnusedParameters": true,
@@ -18,6 +18,11 @@
18 "newLine": "LF" 18 "newLine": "LF"
19 }, 19 },
20 "exclude": [ 20 "exclude": [
21 "node_modules" 21 "node_modules",
22 ".vscode-test"
23 ],
24 "include": [
25 "src",
26 "tests"
22 ] 27 ]
23} 28}