mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:51:55 +00:00
chore: Run yarn format (#43031)
This commit is contained in:
parent
b43e7c29fb
commit
b3cbf2e939
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -50,8 +50,7 @@
|
||||
"eslint.packageManager": "yarn",
|
||||
"eslint.lintTask.enable": false,
|
||||
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
|
||||
"editor.codeActionsOnSave": {
|
||||
},
|
||||
"editor.codeActionsOnSave": {},
|
||||
"eslint.codeActionsOnSave.mode": "problems",
|
||||
"eslint.options": { "cache": true },
|
||||
"eslint.workingDirectories": ["./dev/release", "./client/*"],
|
||||
|
||||
@ -29,7 +29,7 @@ All notable changes to Sourcegraph are documented in this file.
|
||||
- Git server access logs are now compliant with the audit logging format. Breaking change: The 'actor' field is now nested under 'audit' field. [#41865](https://github.com/sourcegraph/sourcegraph/pull/41865)
|
||||
- All Perforce rules are now stored together in one column and evaluated on a "last rule takes precedence" basis. [#41785](https://github.com/sourcegraph/sourcegraph/pull/41785)
|
||||
- Security events are now a part of the audit log. [#42653](https://github.com/sourcegraph/sourcegraph/pull/42653)
|
||||
- "GC AUTO" is now the default garbage collection job. We disable sg maintenance, which had previously replace "GC AUTO", after repeated reports about repo corruption. [#42856](https://github.com/sourcegraph/sourcegraph/pull/42856)
|
||||
- "GC AUTO" is now the default garbage collection job. We disable sg maintenance, which had previously replace "GC AUTO", after repeated reports about repo corruption. [#42856](https://github.com/sourcegraph/sourcegraph/pull/42856)
|
||||
- To use the optional `customGitFetch` feature, the `ENABLE_CUSTOM_GIT_FETCH` env var must be set on `gitserver`. [#42704](https://github.com/sourcegraph/sourcegraph/pull/42704)
|
||||
|
||||
### Fixed
|
||||
|
||||
@ -95,7 +95,7 @@ export function applyConfig(config: PluginConfig): void {
|
||||
customRequestHeaders = parseCustomRequestHeadersString(config.customRequestHeadersAsString)
|
||||
anonymousUserId = config.anonymousUserId || 'no-user-id'
|
||||
pluginVersion = config.pluginVersion
|
||||
polyfillEventSource({...(accessToken ? { Authorization: `token ${accessToken}` } : {}), ...customRequestHeaders})
|
||||
polyfillEventSource({ ...(accessToken ? { Authorization: `token ${accessToken}` } : {}), ...customRequestHeaders })
|
||||
}
|
||||
|
||||
function parseCustomRequestHeadersString(headersString: string | null): Record<string, string> | null {
|
||||
@ -163,7 +163,11 @@ export function applyTheme(theme: Theme, rootElement: Element = document.documen
|
||||
|
||||
export async function updateVersionAndAuthDataFromServer(): Promise<void> {
|
||||
try {
|
||||
const { site, currentUser } = await getSiteVersionAndAuthenticatedUser(instanceURL, accessToken, customRequestHeaders)
|
||||
const { site, currentUser } = await getSiteVersionAndAuthenticatedUser(
|
||||
instanceURL,
|
||||
accessToken,
|
||||
customRequestHeaders
|
||||
)
|
||||
authenticatedUser = currentUser
|
||||
backendVersion = site?.productVersion || null
|
||||
isServerAccessSuccessful = true
|
||||
|
||||
@ -90,12 +90,16 @@ export const FileSearchResult: React.FunctionComponent<Props> = ({
|
||||
|
||||
const onClick = (): void =>
|
||||
lines.length
|
||||
? selectResult(getResultId(match,
|
||||
match.type === 'content'
|
||||
? match.lineMatches
|
||||
? match.lineMatches[0]
|
||||
: undefined
|
||||
: match.symbols[0]))
|
||||
? selectResult(
|
||||
getResultId(
|
||||
match,
|
||||
match.type === 'content'
|
||||
? match.lineMatches
|
||||
? match.lineMatches[0]
|
||||
: undefined
|
||||
: match.symbols[0]
|
||||
)
|
||||
)
|
||||
: undefined
|
||||
|
||||
const title = (
|
||||
|
||||
@ -14,8 +14,8 @@ export function getFirstResultId(results: SearchMatch[]): string | null {
|
||||
? firstSupportedMatch.lineMatches[0]
|
||||
: undefined
|
||||
: firstSupportedMatch.type === 'symbol'
|
||||
? firstSupportedMatch.symbols[0]
|
||||
: undefined
|
||||
? firstSupportedMatch.symbols[0]
|
||||
: undefined
|
||||
)
|
||||
}
|
||||
return null
|
||||
|
||||
@ -148,19 +148,20 @@ export const FileSearchResult: React.FunctionComponent<React.PropsWithChildren<P
|
||||
startLine: match.contentStart.line,
|
||||
endLine: match.ranges[match.ranges.length - 1].end.line,
|
||||
aggregableBadges: match.aggregableBadges,
|
||||
}))
|
||||
|| result.lineMatches?.map(match => ({
|
||||
highlightRanges: match.offsetAndLengths.map(offsetAndLength => ({
|
||||
startLine: match.lineNumber,
|
||||
startCharacter: offsetAndLength[0],
|
||||
endLine: match.lineNumber,
|
||||
endCharacter: offsetAndLength[0] + offsetAndLength[1],
|
||||
})),
|
||||
content: match.line,
|
||||
startLine: match.lineNumber,
|
||||
endLine: match.lineNumber,
|
||||
aggregableBadges: match.aggregableBadges,
|
||||
})) || []
|
||||
})) ||
|
||||
result.lineMatches?.map(match => ({
|
||||
highlightRanges: match.offsetAndLengths.map(offsetAndLength => ({
|
||||
startLine: match.lineNumber,
|
||||
startCharacter: offsetAndLength[0],
|
||||
endLine: match.lineNumber,
|
||||
endCharacter: offsetAndLength[0] + offsetAndLength[1],
|
||||
})),
|
||||
content: match.line,
|
||||
startLine: match.lineNumber,
|
||||
endLine: match.lineNumber,
|
||||
aggregableBadges: match.aggregableBadges,
|
||||
})) ||
|
||||
[]
|
||||
: [],
|
||||
[result]
|
||||
)
|
||||
|
||||
@ -52,7 +52,11 @@ export function createStreamSearch({
|
||||
map(version => {
|
||||
let patternType = options.patternType
|
||||
|
||||
if (patternType === SearchPatternType.standard && version && isOlderThan(version, { major: 3, minor: 43 })) {
|
||||
if (
|
||||
patternType === SearchPatternType.standard &&
|
||||
version &&
|
||||
isOlderThan(version, { major: 3, minor: 43 })
|
||||
) {
|
||||
/**
|
||||
* SearchPatternType.standard support was added in Sourcegraph v3.43.0.
|
||||
* Use SearchPatternType.literal for earlier versions instead (it was the default before v3.43.0).
|
||||
|
||||
Loading…
Reference in New Issue
Block a user