@knip/language-server 1.0.0 → 1.1.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knip/language-server",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
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.80.1"
15
+ "knip": "^5.81.0"
16
16
  },
17
17
  "engines": {
18
18
  "node": ">=18.18.0"
package/src/constants.js CHANGED
@@ -12,4 +12,6 @@ export const REQUEST_PACKAGE_JSON = 'knip.getPackageJson';
12
12
 
13
13
  export const REQUEST_RESULTS = 'knip.getResults';
14
14
 
15
+ export const NOTIFICATION_MODULE_GRAPH_BUILT = 'knip.moduleGraphBuilt';
16
+
15
17
  export const SESSION_LOADING = 'session-loading';
package/src/server.js CHANGED
@@ -12,6 +12,7 @@ import {
12
12
  } from './code-actions.js';
13
13
  import {
14
14
  DEFAULT_JSDOC_TAGS,
15
+ NOTIFICATION_MODULE_GRAPH_BUILT,
15
16
  REQUEST_FILE_NODE,
16
17
  REQUEST_PACKAGE_JSON,
17
18
  REQUEST_RESTART,
@@ -195,6 +196,7 @@ export class LanguageServer {
195
196
 
196
197
  this.session = session;
197
198
  this.publishDiagnostics(this.buildDiagnostics(session.getIssues().issues, config, this.rules));
199
+ this.connection.sendNotification(NOTIFICATION_MODULE_GRAPH_BUILT, { duration: Date.now() - start });
198
200
  } catch (_error) {
199
201
  this.connection.console.error(`Error: ${_error}`);
200
202
  }