@vue/language-server 3.0.0-beta.3 → 3.0.0-beta.4

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/index.js CHANGED
@@ -151,12 +151,6 @@ connection.onInitialize(params => {
151
151
  });
152
152
  connection.onInitialized(server.initialized);
153
153
  connection.onShutdown(server.shutdown);
154
- connection.onRequest('vue/parseSfc', (params) => {
155
- const document = server.documents.get(vscode_uri_1.URI.parse(params.textDocument.uri));
156
- if (document) {
157
- return (0, language_core_1.parse)(document.getText());
158
- }
159
- });
160
154
  connection.onRequest('vue/interpolationRanges', async (params) => {
161
155
  const uri = vscode_uri_1.URI.parse(params.textDocument.uri);
162
156
  const languageService = await server.project.getLanguageService(uri);
@@ -121,7 +121,6 @@ function analyze(ts, languageService, fileName, position) {
121
121
  }
122
122
  node.forEachChild(child => visit(child, needToUse, ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)));
123
123
  }
124
- ;
125
124
  }
126
125
  function findSubscribers(refName, trackKinds, visited = new Set()) {
127
126
  return (0, language_core_1.findBindingVars)(ts, refName, sourceFile)
@@ -180,13 +179,16 @@ function analyze(ts, languageService, fileName, position) {
180
179
  return result;
181
180
  }
182
181
  function findSignalByNamePosition(position) {
183
- return signals.find(ref => ref.bindingInfo && ref.bindingInfo.name.getStart(sourceFile) <= position && ref.bindingInfo.name.getEnd() >= position);
182
+ return signals.find(ref => ref.bindingInfo && ref.bindingInfo.name.getStart(sourceFile) <= position
183
+ && ref.bindingInfo.name.getEnd() >= position);
184
184
  }
185
185
  function findEffectByEffectHandlerPosition(position) {
186
- return signals.find(ref => ref.sideEffectInfo && ref.sideEffectInfo.handler.getStart(sourceFile) <= position && ref.sideEffectInfo.handler.getEnd() >= position);
186
+ return signals.find(ref => ref.sideEffectInfo && ref.sideEffectInfo.handler.getStart(sourceFile) <= position
187
+ && ref.sideEffectInfo.handler.getEnd() >= position);
187
188
  }
188
189
  function findEffectByDepsHandlerPosition(position) {
189
- return signals.find(ref => ref.trackInfo && ref.trackInfo.depsHandler.getStart(sourceFile) <= position && ref.trackInfo.depsHandler.getEnd() >= position);
190
+ return signals.find(ref => ref.trackInfo && ref.trackInfo.depsHandler.getStart(sourceFile) <= position
191
+ && ref.trackInfo.depsHandler.getEnd() >= position);
190
192
  }
191
193
  }
192
194
  function collect(ts, sourceFile) {
@@ -200,7 +202,8 @@ function collect(ts, sourceFile) {
200
202
  const call = node.initializer;
201
203
  if (ts.isIdentifier(call.expression)) {
202
204
  const callName = call.expression.escapedText;
203
- if (callName === 'ref' || callName === 'shallowRef' || callName === 'toRef' || callName === 'useTemplateRef' || callName === 'defineModel') {
205
+ if (callName === 'ref' || callName === 'shallowRef' || callName === 'toRef' || callName === 'useTemplateRef'
206
+ || callName === 'defineModel') {
204
207
  signals.push({
205
208
  bindingInfo: {
206
209
  isRef: true,
@@ -209,7 +212,8 @@ function collect(ts, sourceFile) {
209
212
  },
210
213
  });
211
214
  }
212
- else if (callName === 'reactive' || callName === 'shallowReactive' || callName === 'defineProps' || callName === 'withDefaults') {
215
+ else if (callName === 'reactive' || callName === 'shallowReactive' || callName === 'defineProps'
216
+ || callName === 'withDefaults') {
213
217
  signals.push({
214
218
  bindingInfo: {
215
219
  isRef: true,
@@ -20,10 +20,13 @@ const host = {
20
20
  function getLanguageService(ts, snapshot, languageId) {
21
21
  if (currentSnapshot !== snapshot) {
22
22
  currentSnapshot = snapshot;
23
- currentFileName = '/tmp.' + (languageId === 'javascript' ? 'js' :
24
- languageId === 'typescriptreact' ? 'tsx' :
25
- languageId === 'javascriptreact' ? 'jsx' :
26
- 'ts');
23
+ currentFileName = '/tmp.' + (languageId === 'javascript'
24
+ ? 'js'
25
+ : languageId === 'typescriptreact'
26
+ ? 'tsx'
27
+ : languageId === 'javascriptreact'
28
+ ? 'jsx'
29
+ : 'ts');
27
30
  currentProjectVersion++;
28
31
  }
29
32
  languageService ??= ts.createLanguageService(host);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/language-server",
3
- "version": "3.0.0-beta.3",
3
+ "version": "3.0.0-beta.4",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -16,10 +16,10 @@
16
16
  "directory": "packages/language-server"
17
17
  },
18
18
  "dependencies": {
19
- "@volar/language-server": "2.4.14",
20
- "@vue/language-core": "3.0.0-beta.3",
21
- "@vue/language-service": "3.0.0-beta.3",
22
- "@vue/typescript-plugin": "3.0.0-beta.3",
19
+ "@volar/language-server": "2.4.15",
20
+ "@vue/language-core": "3.0.0-beta.4",
21
+ "@vue/language-service": "3.0.0-beta.4",
22
+ "@vue/typescript-plugin": "3.0.0-beta.4",
23
23
  "vscode-uri": "^3.0.8"
24
24
  },
25
25
  "peerDependencies": {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@typescript/server-harness": "latest",
30
- "@volar/test-utils": "2.4.14"
30
+ "@volar/test-utils": "2.4.15"
31
31
  },
32
- "gitHead": "17e3beabc13e9eb59a82fb1a9f0252fd6685e444"
32
+ "gitHead": "5cb41faacbfe2d9e2d64637c6c1ae8769d9cba3f"
33
33
  }