Skip to content

Commit aa4d3f5

Browse files
committed
Update sourcegraph dependency to 20.1.0
1 parent 873fefa commit aa4d3f5

File tree

3 files changed

+38
-30
lines changed

3 files changed

+38
-30
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"mkdirp": "^0.5.1",
2828
"parcel-bundler": "^1.10.0",
2929
"prettier": "1.13.5",
30-
"sourcegraph": "^16.0.0",
30+
"sourcegraph": "^20.1.0",
3131
"tslint": "^5.10.0",
3232
"typescript": "^3.0.3"
3333
},

src/extension.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { distanceInWordsToNow } from 'date-fns'
33
import { resolveSettings, Settings } from './settings'
44
import { fetchDiscussionThreads } from './shared/api'
55

6+
const decorationType = sourcegraph.app.createDecorationType && sourcegraph.app.createDecorationType()
7+
68
export function activate(): void {
79
function activeEditor(): sourcegraph.CodeEditor | undefined {
810
return sourcegraph.app.activeWindow ? sourcegraph.app.activeWindow.visibleViewComponents[0] : undefined
@@ -84,7 +86,7 @@ export function activate(): void {
8486
})
8587

8688
try {
87-
editor.setDecorations(null, decorations)
89+
editor.setDecorations(decorationType, decorations)
8890
} catch (err) {
8991
console.error('Decoration error:', err)
9092
}

0 commit comments

Comments
 (0)