Fix path join.
This commit is contained in:
Родитель
770ecbda7f
Коммит
bf8a6ad313
|
@ -1,3 +1,4 @@
|
|||
import { join } from 'path-browserify'
|
||||
import { Region, Run } from 'sarif'
|
||||
|
||||
function getHostname(url: string | undefined): string | undefined {
|
||||
|
@ -45,7 +46,7 @@ export function getRepoUri(uri: string | undefined, run: Run, region?: Region |
|
|||
// https://github.com/microsoft/sarif-web-component/blob/main/.gitignore
|
||||
// https://github.com/microsoft/sarif-web-component/blob/d14c42f18766159a7ef6fbb8858ab5ad4f0b532a/.gitignore
|
||||
// https://github.com/microsoft/sarif-web-component/blob/d14c42f18766159a7ef6fbb8858ab5ad4f0b532a/.gitignore#L1
|
||||
let repoUri = `${repositoryUri}/blob/${revisionId ?? 'main'}${uri}`
|
||||
let repoUri = join(`${repositoryUri}/blob/${revisionId ?? 'main'}`, uri)
|
||||
if (region?.startLine) { // `startLine` is 1-based.
|
||||
repoUri += `#L${region!.startLine}`
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@microsoft/sarif-web-component",
|
||||
"version": "0.6.0-15",
|
||||
"version": "0.6.0-16",
|
||||
"author": "Microsoft",
|
||||
"description": "Sarif Viewer",
|
||||
"license": "MIT",
|
||||
|
@ -19,6 +19,7 @@
|
|||
"@babel/preset-env": "^7.4.5",
|
||||
"@types/enzyme": "3.10.8",
|
||||
"@types/jest": "^24.0.13",
|
||||
"@types/path-browserify": "^1.0.0",
|
||||
"@types/react": "^16.8.18",
|
||||
"@types/react-dom": "^16.8.4",
|
||||
"@types/sarif": "^2.1.3",
|
||||
|
@ -49,6 +50,7 @@
|
|||
"mobx": "^5.9.4",
|
||||
"mobx-react": "^5.4.4",
|
||||
"mobx-utils": "^5.5.5",
|
||||
"path-browserify": "^0.0.1",
|
||||
"react-linkify": "^1.0.0-alpha",
|
||||
"react-markdown": "^4.0.8"
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче