Showing 2 of 4 files from the diff.
Other files ignored by Codecov
package.json has changed.
src/blame.test.ts has changed.

@@ -4,6 +4,9 @@
Loading
4 4
import { getBlameDecorations } from './blame'
5 5
6 6
export interface Settings {
7 +
    ['git.blame.decorations']?: 'none' | 'line' | 'file'
8 +
    // The following two settings are deprecated, but we will still look for them
9 +
    // to 'onboard' users to new setting
7 10
    ['git.blame.lineDecorations']?: boolean
8 11
    ['git.blame.decorateWholeFile']?: boolean
9 12
}
@@ -16,6 +19,40 @@
Loading
16 19
    const configurationChanges = new BehaviorSubject<void>(undefined)
17 20
    context.subscriptions.add(sourcegraph.configuration.subscribe(() => configurationChanges.next(undefined)))
18 21
22 +
    // Backcompat: Set 'git.blame.decorations' based on previous settings values
23 +
    ;(async () => {
24 +
        try {
25 +
            const settings = sourcegraph.configuration.get<Settings>().value
26 +
            const initialDecorations = settings['git.blame.decorations']
27 +
            if (!initialDecorations) {
28 +
                if (settings['git.blame.lineDecorations'] === false) {
29 +
                    await sourcegraph.commands.executeCommand('updateConfiguration', ['git.blame.decorations'], 'none')
30 +
                } else if (settings['git.blame.lineDecorations'] === true) {
31 +
                    if (settings['git.blame.decorateWholeFile']) {
32 +
                        await sourcegraph.commands.executeCommand(
33 +
                            'updateConfiguration',
34 +
                            ['git.blame.decorations'],
35 +
                            'file'
36 +
                        )
37 +
                    } else {
38 +
                        await sourcegraph.commands.executeCommand(
39 +
                            'updateConfiguration',
40 +
                            ['git.blame.decorations'],
41 +
                            'line'
42 +
                        )
43 +
                    }
44 +
                } else {
45 +
                    // Default to 'line'
46 +
                    await sourcegraph.commands.executeCommand('updateConfiguration', ['git.blame.decorations'], 'line')
47 +
                }
48 +
            }
49 +
        } catch {
50 +
            // noop
51 +
        }
52 +
    })().catch(() => {
53 +
        // noop
54 +
    })
55 +
19 56
    if (sourcegraph.app.activeWindowChanges) {
20 57
        const selectionChanges = from(sourcegraph.app.activeWindowChanges).pipe(
21 58
            filter((window): window is Exclude<typeof window, undefined> => window !== undefined),

@@ -131,11 +131,13 @@
Loading
131 131
    queryHunks?: ({ uri, sourcegraph }: { uri: string; sourcegraph: typeof import('sourcegraph') }) => Promise<Hunk[]>
132 132
    sourcegraph: typeof import('sourcegraph')
133 133
}): Promise<TextDocumentDecoration[]> => {
134 -
    if (!settings['git.blame.lineDecorations']) {
134 +
    const decorations = settings['git.blame.decorations'] || 'none'
135 +
136 +
    if (decorations === 'none') {
135 137
        return []
136 138
    }
137 139
    const hunks = await queryHunks({ uri, sourcegraph })
138 -
    if (selections !== null && !settings['git.blame.decorateWholeFile']) {
140 +
    if (selections !== null && decorations === 'line') {
139 141
        return getBlameDecorationsForSelections(hunks, selections, now, sourcegraph)
140 142
    } else {
141 143
        return getAllBlameDecorations(hunks, now, sourcegraph)
Files Coverage
src 34.82%
Project Totals (4 files) 34.82%
1142.1
10=0
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading