mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Bump ripgrep, remove UTF8 BOM workaround
This commit is contained in:
parent
d5fdadad39
commit
a81fff00c9
|
@ -78,7 +78,7 @@
|
|||
"vscode-oniguruma": "1.5.1",
|
||||
"vscode-proxy-agent": "^0.11.0",
|
||||
"vscode-regexpp": "^3.1.0",
|
||||
"vscode-ripgrep": "^1.11.3",
|
||||
"vscode-ripgrep": "^1.12.0",
|
||||
"vscode-sqlite3": "4.0.11",
|
||||
"vscode-textmate": "5.4.0",
|
||||
"xterm": "4.13.0-beta.1",
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"vscode-oniguruma": "1.5.1",
|
||||
"vscode-proxy-agent": "^0.11.0",
|
||||
"vscode-regexpp": "^3.1.0",
|
||||
"vscode-ripgrep": "^1.11.3",
|
||||
"vscode-ripgrep": "^1.12.0",
|
||||
"vscode-textmate": "5.4.0",
|
||||
"xterm": "4.13.0-beta.1",
|
||||
"xterm-addon-search": "0.9.0-beta.2",
|
||||
|
|
|
@ -492,10 +492,10 @@ vscode-regexpp@^3.1.0:
|
|||
resolved "https://registry.yarnpkg.com/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz#42d059b6fffe99bd42939c0d013f632f0cad823f"
|
||||
integrity sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg==
|
||||
|
||||
vscode-ripgrep@^1.11.3:
|
||||
version "1.11.3"
|
||||
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.11.3.tgz#a997f4f4535dfeb9d775f04053c1247454d7a37a"
|
||||
integrity sha512-fdD+BciXiEO1iWTrV/S3sAthlK/tHRBjHF+aJIZDxUMD/q9wpNq+YPFEiLCrW+8epahfR19241DeVHHgX/I4Ww==
|
||||
vscode-ripgrep@^1.12.0:
|
||||
version "1.12.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.12.0.tgz#8fee3f892349f2bf1c7ef9743e3bbccb108ad9d7"
|
||||
integrity sha512-tn+bM7RbVElyuIGjIFyuSZZSuqodDjPNVQeHdo9w7EOIFEOuNtXuZ82s/Sy59lG/gJyMEkXjXjKunbUNNa5kOw==
|
||||
dependencies:
|
||||
https-proxy-agent "^4.0.0"
|
||||
proxy-from-env "^1.1.0"
|
||||
|
|
|
@ -11,12 +11,12 @@ import { CancellationToken } from 'vs/base/common/cancellation';
|
|||
import { groupBy } from 'vs/base/common/collections';
|
||||
import { splitGlobAware } from 'vs/base/common/glob';
|
||||
import * as path from 'vs/base/common/path';
|
||||
import { createRegExp, escapeRegExpCharacters, startsWithUTF8BOM, stripUTF8BOM } from 'vs/base/common/strings';
|
||||
import { createRegExp, escapeRegExpCharacters } from 'vs/base/common/strings';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Progress } from 'vs/platform/progress/common/progress';
|
||||
import { IExtendedExtensionSearchOptions, SearchError, SearchErrorCode, serializeSearchError } from 'vs/workbench/services/search/common/search';
|
||||
import { Range, TextSearchComplete, TextSearchContext, TextSearchMatch, TextSearchOptions, TextSearchPreviewOptions, TextSearchQuery, TextSearchResult } from 'vs/workbench/services/search/common/searchExtTypes';
|
||||
import { RegExpParser, RegExpVisitor, AST as ReAST } from 'vscode-regexpp';
|
||||
import { AST as ReAST, RegExpParser, RegExpVisitor } from 'vscode-regexpp';
|
||||
import { rgPath } from 'vscode-ripgrep';
|
||||
import { anchorGlob, createTextSearchResult, IOutputChannel, Maybe } from './ripgrepSearchUtils';
|
||||
|
||||
|
@ -272,12 +272,7 @@ export class RipgrepParser extends EventEmitter {
|
|||
|
||||
private createTextSearchMatch(data: IRgMatch, uri: URI): TextSearchMatch {
|
||||
const lineNumber = data.line_number - 1;
|
||||
let isBOMStripped = false;
|
||||
let fullText = bytesOrTextToString(data.lines);
|
||||
if (lineNumber === 0 && startsWithUTF8BOM(fullText)) {
|
||||
isBOMStripped = true;
|
||||
fullText = stripUTF8BOM(fullText);
|
||||
}
|
||||
const fullText = bytesOrTextToString(data.lines);
|
||||
const fullTextBytes = Buffer.from(fullText);
|
||||
|
||||
let prevMatchEnd = 0;
|
||||
|
@ -306,12 +301,7 @@ export class RipgrepParser extends EventEmitter {
|
|||
this.hitLimit = true;
|
||||
}
|
||||
|
||||
let matchText = bytesOrTextToString(match.match);
|
||||
if (lineNumber === 0 && i === 0 && isBOMStripped) {
|
||||
matchText = stripUTF8BOM(matchText);
|
||||
match.start = match.start <= 3 ? 0 : match.start - 3;
|
||||
match.end = match.end <= 3 ? 0 : match.end - 3;
|
||||
}
|
||||
const matchText = bytesOrTextToString(match.match);
|
||||
const inBetweenChars = fullTextBytes.slice(prevMatchEnd, match.start).toString().length;
|
||||
const startCol = prevMatchEndCol + inBetweenChars;
|
||||
|
||||
|
|
|
@ -10055,6 +10055,14 @@ vscode-ripgrep@^1.11.3:
|
|||
https-proxy-agent "^4.0.0"
|
||||
proxy-from-env "^1.1.0"
|
||||
|
||||
vscode-ripgrep@^1.12.0:
|
||||
version "1.12.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.12.0.tgz#8fee3f892349f2bf1c7ef9743e3bbccb108ad9d7"
|
||||
integrity sha512-tn+bM7RbVElyuIGjIFyuSZZSuqodDjPNVQeHdo9w7EOIFEOuNtXuZ82s/Sy59lG/gJyMEkXjXjKunbUNNa5kOw==
|
||||
dependencies:
|
||||
https-proxy-agent "^4.0.0"
|
||||
proxy-from-env "^1.1.0"
|
||||
|
||||
vscode-sqlite3@4.0.11:
|
||||
version "4.0.11"
|
||||
resolved "https://registry.yarnpkg.com/vscode-sqlite3/-/vscode-sqlite3-4.0.11.tgz#8f41ec8f4c03e24a284a74c5fad322ea39141f15"
|
||||
|
|
Loading…
Reference in a new issue