-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
482 lines (482 loc) · 16.6 KB
/
Copy pathpackage.json
File metadata and controls
482 lines (482 loc) · 16.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
{
"name": "rstack",
"displayName": "Rstack",
"version": "0.1.1",
"private": true,
"description": "All Rstack tool integrations for VS Code.",
"categories": [
"Linters",
"Testing",
"Formatters"
],
"keywords": [
"rstack",
"rslint",
"rstest",
"rsfmt",
"typescript"
],
"bugs": {
"url": "https://github.com/rstackjs/rstack-editor/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rstackjs/rstack-editor.git"
},
"license": "MIT",
"qna": "https://github.com/rstackjs/rstack-editor/issues",
"publisher": "rstack",
"main": "./dist/extension.js",
"scripts": {
"build": "rslib build",
"build:local": "rslib build --env-mode dev",
"package": "pnpm run build && vsce package",
"package:targets": "node scripts/packageTargets.mjs",
"test": "pnpm run test:unit && pnpm run test:e2e",
"test:e2e": "node ./e2e/run.mjs",
"test:e2e:fixtures": "node ./e2e/setupFixtures.mjs",
"test:e2e:lint": "node ./e2e/run.mjs lint",
"test:e2e:rstest": "node ./e2e/run.mjs rstest",
"test:e2e:smoke": "node ./e2e/run.mjs smoke",
"test:e2e:vscode": "node ./e2e/run.mjs vscode",
"test:unit": "rstest",
"watch": "rslib build --watch",
"watch:local": "rslib build --watch --env-mode dev"
},
"contributes": {
"commands": [
{
"command": "rstack.showOutput",
"title": "Show Extension Log",
"category": "Rstack"
},
{
"command": "rstack.restart",
"title": "Relaunch Extension",
"category": "Rstack",
"icon": "$(debug-restart)"
},
{
"command": "rstack.rslint.output.focus",
"title": "Show Rslint Log",
"category": "Rstack"
},
{
"command": "rstack.rslint.restart",
"title": "Restart Rslint",
"category": "Rstack",
"icon": "$(refresh)"
},
{
"command": "rstack.rstest.output.focus",
"title": "Show Rstest Log",
"category": "Rstack"
},
{
"command": "rstack.rstest.restart",
"title": "Restart Rstest",
"category": "Rstack",
"icon": "$(refresh)"
},
{
"command": "rstack.rstest.updateSnapshot",
"title": "Update Snapshot",
"category": "Testing",
"icon": "$(merge)"
},
{
"command": "rstack.rstest.revealInTestExplorer",
"title": "Reveal in Test Explorer",
"category": "Rstack"
},
{
"command": "rstack.rstest.copyErrorOutput",
"title": "Copy Error Output",
"category": "Rstack",
"icon": "$(copy)"
},
{
"command": "rstack.rstest.copyTestItemErrors",
"title": "Copy Test Errors",
"category": "Rstack",
"icon": "$(copy)"
},
{
"command": "rstack.rstest.runInTerminal",
"title": "Run in Terminal",
"category": "Rstack",
"icon": "$(terminal)"
},
{
"command": "rstack.fmt.output.focus",
"title": "Show rs fmt Log",
"category": "Rstack"
},
{
"command": "rstack.fmt.restart",
"title": "Restart rs fmt",
"category": "Rstack",
"icon": "$(refresh)"
}
],
"configuration": [
{
"type": "object",
"title": "Rstack",
"properties": {
"rstack.enable": {
"order": 0,
"type": "boolean",
"default": true,
"scope": "window",
"markdownDescription": "Master switch for the Rstack extension. When disabled, no stack is registered — the status bar item stays visible so the extension can still be told apart from a broken install."
},
"rstack.nodeExecutable": {
"order": 1,
"type": "string",
"scope": "resource",
"markdownDescription": "Overrides the `node` binary used to spawn processes that load your project — the Rslint worker, the Rstest test worker and the `rs fmt` language server. Provide an absolute path to a Node.js executable (for example, a version-manager or custom build). An explicit choice is always honoured — the escape hatch when no suitable Node.js can be found automatically — but the version check still runs as an advisory: pointing at a Node.js below the supported floor shows a status-bar warning while runs proceed with it. When empty, the extension picks one: the `node` on `PATH` if it is new enough, otherwise the one your interactive shell resolves. Supports the `${workspaceFolder}` placeholder."
}
}
},
{
"type": "object",
"title": "Rstack › Rslint",
"properties": {
"rstack.rslint.enable": {
"order": 0,
"type": "boolean",
"default": true,
"scope": "window",
"markdownDescription": "Enable the Rslint language server for detected workspace folders. Requires `#rstack.enable#`. This is a window-level kill switch; which folders run Rslint is decided by detection."
},
"rstack.rslint.corePath": {
"order": 1,
"type": "string",
"default": "",
"scope": "resource",
"markdownDescription": "Path to an `@rslint/core` package directory. Relative paths are resolved from the workspace folder. When empty, a native folder uses the nearest installation above each file and a bridged folder (root `rstack.config.*`) uses the one its `rstack` depends on."
},
"rstack.rslint.trace.server": {
"order": 2,
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"scope": "resource",
"description": "Traces the communication between VS Code and the Rslint language server"
}
}
},
{
"type": "object",
"title": "Rstack › Rstest",
"properties": {
"rstack.rstest.enable": {
"order": 0,
"type": "boolean",
"default": true,
"scope": "window",
"markdownDescription": "Enable the Rstest test explorer for detected workspace folders. Requires `#rstack.enable#`. This is a window-level kill switch; which folders run Rstest is decided by detection."
},
"rstack.rstest.rstestPackagePath": {
"order": 1,
"type": "string",
"scope": "resource",
"markdownDescription": "The path to a `package.json` file of an Rstest installation (usually inside `node_modules`) in case the extension cannot find it. It will be used to resolve Rstest API paths. This should be used as a last resort fix. Supports the `${workspaceFolder}` placeholder."
},
"rstack.rstest.configFileGlobPattern": {
"order": 2,
"type": "array",
"items": {
"type": "string"
},
"default": [
"**/rstest.config.{mjs,ts,js,cjs,mts,cts}"
],
"description": "Glob patterns used to discover Rstest config files. Must be an array of strings."
},
"rstack.rstest.testCaseCollectMethod": {
"order": 3,
"type": "string",
"description": "How test cases are discovered inside a test file: statically from the AST, or by running the file and collecting the registered tests.",
"default": "ast",
"enum": [
"ast",
"runtime"
],
"enumItemLabels": [
"Static AST Analyze",
"Run Test File"
],
"enumDescriptions": [
"Fast, only supports basic test cases.",
"Slow, supports all test cases, including dynamic test generation methods (each/for/extend)."
]
},
"rstack.rstest.applyDiagnostic": {
"order": 4,
"type": "boolean",
"default": true,
"description": "Show diagnostics in the editor and Problems panel for failed tests."
},
"rstack.rstest.nodeExecArgs": {
"order": 6,
"type": "array",
"items": {
"type": "string"
},
"default": [],
"scope": "resource",
"description": "Extra arguments passed to the Node executable when spawning the test worker (e.g. --experimental-vm-modules). Must be an array of strings."
},
"rstack.rstest.nodeEnv": {
"order": 7,
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
},
"default": null,
"scope": "resource",
"markdownDescription": "Environment variables passed to the test worker process, in addition to `process.env`."
},
"rstack.rstest.debugNodeEnv": {
"order": 8,
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
},
"default": null,
"scope": "resource",
"markdownDescription": "Environment variables passed to the test worker process when debugging, in addition to `process.env` and `#rstack.rstest.nodeEnv#`."
},
"rstack.rstest.debugExclude": {
"order": 9,
"type": "array",
"items": {
"type": "string"
},
"default": [
"<node_internals>/**"
],
"scope": "resource",
"markdownDescription": "Glob patterns for files to skip while debugging tests (maps to the debug session's `skipFiles`)."
},
"rstack.rstest.debugOutFiles": {
"order": 10,
"type": "array",
"items": {
"type": "string"
},
"default": [],
"scope": "resource",
"markdownDescription": "When source maps are enabled, glob patterns locating the generated JavaScript files (maps to the debug session's `outFiles`)."
},
"rstack.rstest.debuggerPort": {
"order": 11,
"type": "number",
"scope": "resource",
"description": "Port the debugger attaches to. Defaults to Node's inspector behavior (9229, or a free port if taken)."
},
"rstack.rstest.debuggerAddress": {
"order": 12,
"type": "string",
"scope": "resource",
"description": "TCP/IP address the debugger attaches to. Defaults to localhost."
},
"rstack.rstest.terminalShellPath": {
"order": 13,
"type": "string",
"markdownDescription": "Path to the shell used by the **Run in Terminal** command. Leave empty to use your default integrated terminal so its profile and environment are honored. Note: command arguments are quoted for POSIX shells; on Windows point this at a POSIX-style shell (e.g. Git Bash) if a test name needs quoting."
},
"rstack.rstest.terminalShellArgs": {
"order": 14,
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Arguments passed to the shell used by the **Run in Terminal** command."
}
}
},
{
"type": "object",
"title": "Rstack › Formatter",
"properties": {
"rstack.fmt.enable": {
"order": 0,
"type": "boolean",
"default": true,
"scope": "window",
"markdownDescription": "Enable the `rs fmt` document formatter for detected workspace folders. Requires `#rstack.enable#`. This is a window-level kill switch; which folders are formatted is decided by detection."
},
"rstack.fmt.trace.server": {
"order": 1,
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"scope": "window",
"description": "Traces the communication between VS Code and the rs fmt language server (`messages` also shows how long each formatting request took)"
}
}
}
],
"menus": {
"commandPalette": [
{
"command": "rstack.rslint.output.focus",
"when": "rstack.rslint.active"
},
{
"command": "rstack.rslint.restart",
"when": "rstack.rslint.active"
},
{
"command": "rstack.rstest.output.focus",
"when": "rstack.rstest.active"
},
{
"command": "rstack.rstest.restart",
"when": "rstack.rstest.active"
},
{
"command": "rstack.fmt.output.focus",
"when": "rstack.fmt.active"
},
{
"command": "rstack.fmt.restart",
"when": "rstack.fmt.active"
},
{
"command": "rstack.rstest.updateSnapshot",
"when": "false"
},
{
"command": "rstack.rstest.revealInTestExplorer",
"when": "false"
},
{
"command": "rstack.rstest.copyErrorOutput",
"when": "false"
},
{
"command": "rstack.rstest.copyTestItemErrors",
"when": "false"
},
{
"command": "rstack.rstest.runInTerminal",
"when": "false"
}
],
"editor/title/context": [
{
"command": "rstack.rstest.revealInTestExplorer",
"when": "resourcePath in rstack.rstest.testFiles"
}
],
"testing/message/content": [
{
"command": "rstack.rstest.updateSnapshot",
"when": "testMessage == canUpdateSnapshot"
},
{
"command": "rstack.rstest.copyErrorOutput",
"when": "resourcePath in rstack.rstest.testFiles"
}
],
"testing/message/context": [
{
"command": "rstack.rstest.updateSnapshot",
"group": "inline@1",
"when": "testMessage == canUpdateSnapshot"
},
{
"command": "rstack.rstest.copyErrorOutput",
"group": "inline@2",
"when": "resourcePath in rstack.rstest.testFiles"
}
],
"testing/item/context": [
{
"command": "rstack.rstest.runInTerminal",
"group": "rstack@1",
"when": "controllerId == 'rstack.rstest'"
},
{
"command": "rstack.rstest.copyTestItemErrors",
"when": "controllerId == 'rstack.rstest'"
}
],
"testing/item/gutter": [
{
"command": "rstack.rstest.runInTerminal",
"when": "controllerId == 'rstack.rstest'"
},
{
"command": "rstack.rstest.copyTestItemErrors",
"when": "controllerId == 'rstack.rstest'"
}
]
}
},
"activationEvents": [
"onStartupFinished"
],
"devDependencies": {
"@rsbuild/core": "~2.1.9",
"@rslib/core": "^1.0.0-beta.1",
"@rslint/core": "^0.8.0",
"@rstackjs/load-config": "^0.1.2",
"@rstest/core": "^0.11.5",
"@types/istanbul-lib-report": "^3.0.3",
"@types/mocha": "^10.0.10",
"@types/node": "^22.16.5",
"@types/picomatch": "^4.0.3",
"@types/semver": "^7.7.1",
"@types/vscode": "1.97.0",
"@vscode/test-electron": "^3.1.0",
"@vscode/vsce": "^3.9.2",
"birpc": "^4.0.0",
"core-js-pure": "^3.49.0",
"mocha": "^11.7.6",
"ovsx": "^1.0.2",
"picomatch": "^4.0.5",
"semver": "^7.8.5",
"stacktrace-parser": "^0.1.11",
"tinyglobby": "^0.2.17",
"typescript": "^5.9.3",
"valibot": "^1.4.2",
"vscode-jsonrpc": "^8.2.0",
"vscode-languageclient": "^9.0.1",
"yuku-parser": "^0.8.3"
},
"engines": {
"vscode": "^1.97.0"
},
"icon": "icon.png",
"preview": true,
"capabilities": {
"virtualWorkspaces": {
"supported": "limited",
"description": "Rslint, Rstest and `rs fmt` are resolved from the workspace's node_modules and spawned as local processes, so they only start for file-system workspace folders. In a virtual workspace only the status bar item is shown; no tool starts."
},
"untrustedWorkspaces": {
"supported": "limited",
"description": "Rstack spawns project-local executables (the Rslint language server, the Rstest worker, `rs fmt`) and loads project configuration files. In Restricted Mode only the status bar item is shown; no process is spawned and no project code is loaded."
}
}
}