Skip to content

Commit ce80342

Browse files
authored
Support to read 0.5.0 dumps (#187)
* Support to read 0.5.0 dumps * Update version
1 parent 5b8e08c commit ce80342

File tree

4 files changed

+55
-6
lines changed

4 files changed

+55
-6
lines changed

language-service/SECURITY.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
2+
3+
## Security
4+
5+
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6+
7+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
8+
9+
## Reporting Security Issues
10+
11+
**Please do not report security vulnerabilities through public GitHub issues.**
12+
13+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
14+
15+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
16+
17+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18+
19+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20+
21+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22+
* Full paths of source file(s) related to the manifestation of the issue
23+
* The location of the affected source code (tag/branch/commit or direct URL)
24+
* Any special configuration required to reproduce the issue
25+
* Step-by-step instructions to reproduce the issue
26+
* Proof-of-concept or exploit code (if possible)
27+
* Impact of the issue, including how an attacker might exploit the issue
28+
29+
This information will help us triage your report more quickly.
30+
31+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
32+
33+
## Preferred Languages
34+
35+
We prefer all communications to be in English.
36+
37+
## Policy
38+
39+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
40+
41+
<!-- END MICROSOFT SECURITY.MD BLOCK -->

language-service/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

language-service/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@vscode/lsif-language-service",
33
"description": "LSIF based language services",
4-
"version": "0.1.0-pre.1",
4+
"version": "0.1.0-pre.2",
55
"author": "Microsoft Corporation",
66
"license": "MIT",
77
"repository": {
@@ -14,6 +14,8 @@
1414
"engines": {
1515
"node": ">=20.9.0"
1616
},
17+
"main": "./lib/api.js",
18+
"typings": "./lib/api.d.ts",
1719
"exports": {
1820
".": {
1921
"types": "./lib/api.d.ts",

language-service/src/jsonStore.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
Id, Vertex, Project, Document, Range, DiagnosticResult, DocumentSymbolResult, FoldingRangeResult, DocumentLinkResult, DefinitionResult,
1414
TypeDefinitionResult, HoverResult, ReferenceResult, ImplementationResult, Edge, RangeBasedDocumentSymbol, DeclarationResult,
1515
ElementTypes, VertexLabels, EdgeLabels, ItemEdgeProperties, EventScope, EventKind, ProjectEvent, Moniker as PMoniker, MonikerKind,
16-
types
16+
types, type MetaData
1717
} from '@vscode/lsif-protocol';
1818

1919
import { DocumentInfo } from './files';
@@ -165,10 +165,10 @@ export class JsonStore extends Database {
165165
reject(new Error(`No valid semantic version string. The version is: ${this.version}`));
166166
return;
167167
}
168-
const range: SemVer.Range = new SemVer.Range('>0.5.99 <=0.6.0-next.7');
168+
const range: SemVer.Range = new SemVer.Range('>=0.5.0 <=0.6.0-next.7');
169169
range.includePrerelease = true;
170170
if (!SemVer.satisfies(semVer, range)) {
171-
reject(new Error(`Requires version range >0.5.99 <=0.6.0-next.7 but received: ${this.version}`));
171+
reject(new Error(`Requires version range >=0.5.0 <=0.6.0-next.7 but received: ${this.version}`));
172172
return;
173173
}
174174
}
@@ -187,10 +187,16 @@ export class JsonStore extends Database {
187187
}
188188

189189
private processVertex(vertex: Vertex): void {
190+
interface LegacyMetaData extends MetaData {
191+
projectRoot?: string;
192+
}
190193
this.vertices.all.set(vertex.id, vertex);
191194
switch(vertex.label) {
192195
case VertexLabels.metaData:
193196
this.version = vertex.version;
197+
if (this.workspaceRoot === undefined && (vertex as LegacyMetaData).projectRoot !== undefined) {
198+
this.workspaceRoot = URI.parse((vertex as LegacyMetaData).projectRoot!);
199+
}
194200
break;
195201
case VertexLabels.source:
196202
this.workspaceRoot = URI.parse(vertex.workspaceRoot);

0 commit comments

Comments
 (0)