@knip/language-server 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/server.js +12 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knip/language-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"vscode-languageserver": "^9.0.1",
|
|
14
14
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
15
|
-
"knip": "^5.
|
|
15
|
+
"knip": "^5.82.0"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
18
|
"node": ">=18.18.0"
|
package/src/server.js
CHANGED
|
@@ -361,21 +361,25 @@ export class LanguageServer {
|
|
|
361
361
|
|
|
362
362
|
if (issueType === 'unlisted') {
|
|
363
363
|
codeActions.push({
|
|
364
|
-
title: `
|
|
364
|
+
title: `Install '${issue.symbol}' as dependency`,
|
|
365
365
|
kind: CodeActionKind.QuickFix,
|
|
366
366
|
diagnostics: [diagnostic],
|
|
367
|
+
command: {
|
|
368
|
+
title: `Install '${issue.symbol}' as dependency`,
|
|
369
|
+
command: 'knip.installDependency',
|
|
370
|
+
arguments: [issue.symbol, 'dependencies', issue.workspace],
|
|
371
|
+
},
|
|
367
372
|
});
|
|
368
373
|
|
|
369
374
|
codeActions.push({
|
|
370
|
-
title: `
|
|
371
|
-
kind: CodeActionKind.QuickFix,
|
|
372
|
-
diagnostics: [diagnostic],
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
codeActions.push({
|
|
376
|
-
title: `Add '@types/${issue.symbol}' to devDependencies in package.json`,
|
|
375
|
+
title: `Install '${issue.symbol}' as devDependency`,
|
|
377
376
|
kind: CodeActionKind.QuickFix,
|
|
378
377
|
diagnostics: [diagnostic],
|
|
378
|
+
command: {
|
|
379
|
+
title: `Install '${issue.symbol}' as devDependency`,
|
|
380
|
+
command: 'knip.installDependency',
|
|
381
|
+
arguments: [issue.symbol, 'devDependencies', issue.workspace],
|
|
382
|
+
},
|
|
379
383
|
});
|
|
380
384
|
}
|
|
381
385
|
|