Skip to content
This repository was archived by the owner on Feb 22, 2020. It is now read-only.

Commit a4f6880

Browse files
renovate[bot]felixfbecker
authored andcommitted
fix(deps): update dependency sourcegraph to v23 (#9)
1 parent b2193f3 commit a4f6880

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@sourcegraph/vscode-ws-jsonrpc": "^0.0.3-fork",
7777
"lodash": "^4.17.11",
7878
"rxjs": "^6.4.0",
79-
"sourcegraph": "^22.0.0",
79+
"sourcegraph": "^23.0.0",
8080
"type-zoo": "^3.2.1",
8181
"uuid": "^3.3.2",
8282
"vscode-languageserver-protocol": "^3.14.1",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export async function register({
118118
textDocument: {
119119
uri: serverTextDocumentUri.href,
120120
languageId: textDocument.languageId,
121-
text: textDocument.text,
121+
text: textDocument.text || '', // TODO try to fetch contents from somewhere
122122
version: 1,
123123
},
124124
}

src/test/integration.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const logger = new NoopLogger()
2525
describe('register()', () => {
2626
it('should initialize one connection with each workspace folder if the server is multi-root capable', async () => {
2727
const sourcegraph = createMockSourcegraphAPI()
28-
sourcegraph.workspace.roots = [{ uri: 'git://repo1?rev' }, { uri: 'git://repo2?rev' }]
28+
sourcegraph.workspace.roots = [{ uri: new URL('git://repo1?rev') }, { uri: new URL('git://repo2?rev') }]
2929
const server = {
3030
initialize: sinon.spy((params: InitializeParams): InitializeResult => ({ capabilities: {} })),
3131
}
@@ -49,7 +49,7 @@ describe('register()', () => {
4949
})
5050
it('should initialize one connection for each workspace folder if the server is not multi-root capable', async () => {
5151
const sourcegraph = createMockSourcegraphAPI()
52-
sourcegraph.workspace.roots = [{ uri: 'git://repo1?rev' }, { uri: 'git://repo2?rev' }]
52+
sourcegraph.workspace.roots = [{ uri: new URL('git://repo1?rev') }, { uri: new URL('git://repo2?rev') }]
5353
const server = {
5454
initialize: sinon.spy((params: InitializeParams): InitializeResult => ({ capabilities: {} })),
5555
}
@@ -80,7 +80,7 @@ describe('register()', () => {
8080
})
8181
it('should close a connection when a workspace folder is closed', async () => {
8282
const sourcegraph = createMockSourcegraphAPI()
83-
sourcegraph.workspace.roots = [{ uri: 'git://repo1?rev' }, { uri: 'git://repo2?rev' }]
83+
sourcegraph.workspace.roots = [{ uri: new URL('git://repo1?rev') }, { uri: new URL('git://repo2?rev') }]
8484
const server = {
8585
initialize: sinon.spy((params: InitializeParams): InitializeResult => ({ capabilities: {} })),
8686
}
@@ -99,7 +99,7 @@ describe('register()', () => {
9999
sinon.assert.calledOnce(createConnection.returnValues[0].unsubscribe)
100100
})
101101
it('should register a references provider if the server reports the references capability', async () => {
102-
const repoRoot = 'https://sourcegraph.test/repo@rev/-/raw/'
102+
const repoRoot = new URL('https://sourcegraph.test/repo@rev/-/raw/')
103103
const server = {
104104
initialize: sinon.spy(
105105
(params: InitializeParams): InitializeResult => ({
@@ -180,7 +180,7 @@ describe('register()', () => {
180180
])
181181
})
182182
it('should register a definition provider if the server reports the definition capability', async () => {
183-
const repoRoot = 'https://sourcegraph.test/repo@rev/-/raw/'
183+
const repoRoot = new URL('https://sourcegraph.test/repo@rev/-/raw/')
184184
const server = {
185185
initialize: sinon.spy(
186186
(params: InitializeParams): InitializeResult => ({
@@ -257,7 +257,7 @@ describe('register()', () => {
257257
])
258258
})
259259
it('should register a hover provider if the server reports the hover capability', async () => {
260-
const repoRoot = 'https://sourcegraph.test/repo@rev/-/raw/'
260+
const repoRoot = new URL('https://sourcegraph.test/repo@rev/-/raw/')
261261
const server = {
262262
initialize: sinon.spy(
263263
async (params: InitializeParams): Promise<InitializeResult> => ({

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5233,10 +5233,10 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
52335233
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
52345234
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
52355235

5236-
sourcegraph@^22.0.0:
5237-
version "22.0.0"
5238-
resolved "https://registry.npmjs.org/sourcegraph/-/sourcegraph-22.0.0.tgz#b259929c31bf367f5160056698a881dc26eb36bd"
5239-
integrity sha512-cJHby0OPCM0y0BmRTKhY89D02f9koROluHMJGQGNE8q9CoIVbe1s6ctHCytz7bjY9mKtCpQMbtxYQhfIm5S4lg==
5236+
sourcegraph@^23.0.0:
5237+
version "23.0.0"
5238+
resolved "https://registry.yarnpkg.com/sourcegraph/-/sourcegraph-23.0.0.tgz#1fb96015af3e84cc9cc2944823f04a7e952ed565"
5239+
integrity sha512-hQALHrTt+AK5ZAqUAUNhxO7ClSv/xyTjMQPBb+hQykKJrMaHTk+CnJNHs7dRfXYKnbnZeisQRjaxKGX8UecU0Q==
52405240

52415241
spawn-error-forwarder@~1.0.0:
52425242
version "1.0.0"

0 commit comments

Comments
 (0)