@atlaspack/reporter-lsp 2.12.1-dev.3450 → 2.12.1-dev.3466

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": "@atlaspack/reporter-lsp",
3
- "version": "2.12.1-dev.3450+58845ef87",
3
+ "version": "2.12.1-dev.3466+9a12fb8bd",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -13,16 +13,16 @@
13
13
  "source": "src/LspReporter.js",
14
14
  "engines": {
15
15
  "node": ">= 16.0.0",
16
- "parcel": "^2.12.1-dev.3450+58845ef87"
16
+ "parcel": "^2.12.1-dev.3466+9a12fb8bd"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/lsp-protocol": "2.12.1-dev.3450+58845ef87",
20
- "@atlaspack/plugin": "2.12.1-dev.3450+58845ef87",
21
- "@atlaspack/utils": "2.12.1-dev.3450+58845ef87",
19
+ "@atlaspack/lsp-protocol": "2.12.1-dev.3466+9a12fb8bd",
20
+ "@atlaspack/plugin": "2.12.1-dev.3466+9a12fb8bd",
21
+ "@atlaspack/utils": "2.12.1-dev.3466+9a12fb8bd",
22
22
  "node-ipc": "^9.1.4",
23
23
  "nullthrows": "^1.1.1",
24
24
  "ps-node": "^0.1.6",
25
25
  "vscode-jsonrpc": "^8.0.2"
26
26
  },
27
- "gitHead": "58845ef87446fcedb7d7d8876440c64184645cbb"
27
+ "gitHead": "9a12fb8bd1b72e407ed043e20337dc60fbec9cbe"
28
28
  }
@@ -38,9 +38,9 @@ import {
38
38
  } from './utils';
39
39
  import type {FSWatcher} from 'fs';
40
40
 
41
- const lookupPid: Query => Program[] = promisify(ps.lookup);
41
+ const lookupPid: (Query) => Program[] = promisify(ps.lookup);
42
42
 
43
- const ignoreFail = func => {
43
+ const ignoreFail = (func) => {
44
44
  try {
45
45
  func();
46
46
  } catch (e) {
@@ -88,7 +88,7 @@ async function watchLspActive(): Promise<FSWatcher> {
88
88
  switch (eventType) {
89
89
  case 'rename':
90
90
  if (filename === LSP_SENTINEL_FILENAME) {
91
- fs.access(LSP_SENTINEL_FILE, fs.constants.F_OK, err => {
91
+ fs.access(LSP_SENTINEL_FILE, fs.constants.F_OK, (err) => {
92
92
  if (err) {
93
93
  lspStarted = false;
94
94
  } else {
@@ -115,21 +115,21 @@ async function doWatchStart(options) {
115
115
  ignoreFail(() => fs.unlinkSync(path.join(BASEDIR, filename + '.json')));
116
116
  }
117
117
 
118
- server = await createServer(SOCKET_FILE, connection => {
118
+ server = await createServer(SOCKET_FILE, (connection) => {
119
119
  // console.log('got connection');
120
120
  connections.push(connection);
121
121
  connection.onClose(() => {
122
- connections = connections.filter(c => c !== connection);
122
+ connections = connections.filter((c) => c !== connection);
123
123
  });
124
124
 
125
- connection.onRequest(RequestDocumentDiagnostics, async uri => {
125
+ connection.onRequest(RequestDocumentDiagnostics, async (uri) => {
126
126
  let graph = await bundleGraph;
127
127
  if (!graph) return;
128
128
 
129
129
  return getDiagnosticsUnusedExports(graph, uri);
130
130
  });
131
131
 
132
- connection.onRequest(RequestImporters, async params => {
132
+ connection.onRequest(RequestImporters, async (params) => {
133
133
  let graph = await bundleGraph;
134
134
  if (!graph) return null;
135
135
 
@@ -210,7 +210,7 @@ export default (new Reporter({
210
210
  break;
211
211
  }
212
212
  case 'watchEnd':
213
- connections.forEach(c => c.end());
213
+ connections.forEach((c) => c.end());
214
214
  await server.close();
215
215
  ignoreFail(() => fs.unlinkSync(META_FILE));
216
216
  break;
@@ -222,7 +222,7 @@ function updateBuildState(
222
222
  state: 'start' | 'progress' | 'end',
223
223
  message: string | void,
224
224
  ) {
225
- connections.forEach(c =>
225
+ connections.forEach((c) =>
226
226
  c.sendNotification(NotificationBuildStatus, state, message),
227
227
  );
228
228
  }
@@ -232,7 +232,7 @@ function clearDiagnostics() {
232
232
  }
233
233
  function sendDiagnostics() {
234
234
  // console.log('send', getWorkspaceDiagnostics());
235
- connections.forEach(c =>
235
+ connections.forEach((c) =>
236
236
  c.sendNotification(
237
237
  NotificationWorkspaceDiagnostics,
238
238
  getWorkspaceDiagnostics(),
@@ -448,8 +448,8 @@ function getImporters(
448
448
  if (asset) {
449
449
  let incoming = bundleGraph.getIncomingDependencies(asset);
450
450
  return incoming
451
- .filter(dep => dep.sourcePath != null)
452
- .map(dep => `file://${nullthrows(dep.sourcePath)}`);
451
+ .filter((dep) => dep.sourcePath != null)
452
+ .map((dep) => `file://${nullthrows(dep.sourcePath)}`);
453
453
  }
454
454
  return null;
455
455
  }
package/src/ipc.js CHANGED
@@ -28,7 +28,7 @@ function createClientPipeTransport(
28
28
  resolve({
29
29
  close() {
30
30
  return new Promise((res, rej) => {
31
- server.close(e => {
31
+ server.close((e) => {
32
32
  if (e) rej(e);
33
33
  else res();
34
34
  });