diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-07 07:31:59 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-07 07:31:59 +0000 |
commit | b89039c5688ab75fffa3d806119eb053cc326660 (patch) | |
tree | 4f81cc86bdbf24a6bf6ea840db44c2ca4b21cf23 /ripgrep.patch | |
parent | fa9c0e08315a612470ef72ca5ac658663634f408 (diff) |
automatic import of vscodium
Diffstat (limited to 'ripgrep.patch')
-rw-r--r-- | ripgrep.patch | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/ripgrep.patch b/ripgrep.patch new file mode 100644 index 0000000..486d1fd --- /dev/null +++ b/ripgrep.patch @@ -0,0 +1,152 @@ +diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js +index c6202c70883..f18f3dbec3c 100644 +--- vscode/build/gulpfile.vscode.js ++++ vscode/build/gulpfile.vscode.js +@@ -279,7 +279,6 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op + .pipe(jsFilter.restore) + .pipe(createAsar(path.join(process.cwd(), 'node_modules'), [ + '**/*.node', +- '**/@vscode/ripgrep/bin/*', + '**/node-pty/build/Release/*', + '**/node-pty/lib/worker/conoutSocketWorker.js', + '**/node-pty/lib/shared/conout.js', +diff --git a/build/lib/policies.js b/build/lib/policies.js +index 466295b8ad5..c4e1fce12fe 100644 +--- vscode/build/lib/policies.js ++++ vscode/build/lib/policies.js +@@ -8,7 +8,7 @@ const child_process_1 = require("child_process"); + const fs_1 = require("fs"); + const path = require("path"); + const byline = require("byline"); +-const ripgrep_1 = require("@vscode/ripgrep"); ++const rgPath = '/usr/bin/rg'; + const Parser = require("tree-sitter"); + const { typescript } = require('tree-sitter-typescript'); + const product = require('../../product.json'); +@@ -340,7 +340,7 @@ function getPolicies(moduleName, node) { + async function getFiles(root) { + return new Promise((c, e) => { + const result = []; +- const rg = (0, child_process_1.spawn)(ripgrep_1.rgPath, ['-l', 'registerConfiguration\\(', '-g', 'src/**/*.ts', '-g', '!src/**/test/**', root]); ++ const rg = (0, child_process_1.spawn)(rgPath, ['-l', 'registerConfiguration\\(', '-g', 'src/**/*.ts', '-g', '!src/**/test/**', root]); + const stream = byline(rg.stdout.setEncoding('utf8')); + stream.on('data', path => result.push(path)); + stream.on('error', err => e(err)); +@@ -523,4 +523,4 @@ if (require.main === module) { + process.exit(1); + }); + } +-//# sourceMappingURL=policies.js.map +\ No newline at end of file ++//# sourceMappingURL=policies.js.map +diff --git a/build/lib/policies.ts b/build/lib/policies.ts +index 68f6989f27a..1802c43acfb 100644 +--- vscode/build/lib/policies.ts ++++ vscode/build/lib/policies.ts +@@ -7,7 +7,7 @@ import { spawn } from 'child_process'; + import { promises as fs } from 'fs'; + import * as path from 'path'; + import * as byline from 'byline'; +-import { rgPath } from '@vscode/ripgrep'; ++const rgPath = '/usr/bin/rg'; + import * as Parser from 'tree-sitter'; + const { typescript } = require('tree-sitter-typescript'); + const product = require('../../product.json'); +diff --git a/package.json b/package.json +index 2103fe1fe1a..fcb42f433a0 100644 +--- vscode/package.json ++++ vscode/package.json +@@ -74,7 +74,6 @@ + "@vscode/iconv-lite-umd": "0.7.0", + "@vscode/policy-watcher": "^1.1.4", + "@vscode/proxy-agent": "^0.21.0", +- "@vscode/ripgrep": "^1.15.9", + "@vscode/spdlog": "^0.15.0", + "@vscode/sqlite3": "5.1.6-vscode", + "@vscode/sudo-prompt": "9.3.1", +diff --git a/src/vs/workbench/services/search/node/ripgrepFileSearch.ts b/src/vs/workbench/services/search/node/ripgrepFileSearch.ts +index f833061c553..de0a5fa7df2 100644 +--- vscode/src/vs/workbench/services/search/node/ripgrepFileSearch.ts ++++ vscode/src/vs/workbench/services/search/node/ripgrepFileSearch.ts +@@ -12,7 +12,7 @@ import { isMacintosh as isMac } from 'vs/base/common/platform'; + import * as strings from 'vs/base/common/strings'; + import { IFileQuery, IFolderQuery } from 'vs/workbench/services/search/common/search'; + import { anchorGlob } from 'vs/workbench/services/search/node/ripgrepSearchUtils'; +-import { rgPath } from '@vscode/ripgrep'; ++const rgPath = '/usr/bin/rg'; + + // If @vscode/ripgrep is in an .asar file, then the binary is unpacked. + const rgDiskPath = rgPath.replace(/\bnode_modules\.asar\b/, 'node_modules.asar.unpacked'); +diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts b/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts +index 4740a661119..8bcabe088e2 100644 +--- vscode/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts ++++ vscode/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts +@@ -16,7 +16,7 @@ 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 { AST as ReAST, RegExpParser, RegExpVisitor } from 'vscode-regexpp'; +-import { rgPath } from '@vscode/ripgrep'; ++const rgPath = '/usr/bin/rg'; + import { anchorGlob, createTextSearchResult, IOutputChannel, Maybe } from './ripgrepSearchUtils'; + import type { RipgrepTextSearchOptions } from 'vs/workbench/services/search/common/searchExtTypesInternal'; + +diff --git a/remote/package.json b/remote/package.json +index 5b0e80182ea..a88c2f5d41d 100644 +--- vscode/remote/package.json ++++ vscode/remote/package.json +@@ -9,7 +9,6 @@ + "@vscode/deviceid": "^0.1.1", + "@vscode/iconv-lite-umd": "0.7.0", + "@vscode/proxy-agent": "^0.21.0", +- "@vscode/ripgrep": "^1.15.9", + "@vscode/spdlog": "^0.15.0", + "@vscode/vscode-languagedetection": "1.0.21", + "@vscode/windows-process-tree": "^0.6.0", +diff --git a/yarn.lock b/yarn.lock +index 71aef4295fa..7b74e981e61 100644 +--- vscode/yarn.lock ++++ vscode/yarn.lock +@@ -1584,15 +1584,6 @@ + optionalDependencies: + "@vscode/windows-ca-certs" "^0.3.1" + +-"@vscode/ripgrep@^1.15.9": +- version "1.15.9" +- resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.15.9.tgz#92279f7f28e1e49ad9a89603e10b17a4c7f9f5f1" +- integrity sha512-4q2PXRvUvr3bF+LsfrifmUZgSPmCNcUZo6SbEAZgArIChchkezaxLoIeQMJe/z3CCKStvaVKpBXLxN3Z8lQjFQ== +- dependencies: +- https-proxy-agent "^7.0.2" +- proxy-from-env "^1.1.0" +- yauzl "^2.9.2" +- + "@vscode/spdlog@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@vscode/spdlog/-/spdlog-0.15.0.tgz#37896541410ff036dc01c54e16bf131c522a057e" +@@ -1620,7 +1611,6 @@ + resolved "https://registry.yarnpkg.com/@vscode/telemetry-extractor/-/telemetry-extractor-1.10.2.tgz#b1ec2296dac1923d400bf98b3242d9b7d792fe83" + integrity sha512-hn+KDSwIRj7LzDSFd9HALkc80UY1g16nQgWztHml+nxAZU3Hw/EoWEEDxOncvDYq9YcV+tX/cVHrVjbNL2Dg0g== + dependencies: +- "@vscode/ripgrep" "^1.15.9" + command-line-args "^5.2.1" + ts-morph "^19.0.0" + +diff --git a/remote/yarn.lock b/remote/yarn.lock +index c8e84fc81e1..41219df5f33 100644 +--- vscode/remote/yarn.lock ++++ vscode/remote/yarn.lock +@@ -80,15 +80,6 @@ + optionalDependencies: + "@vscode/windows-ca-certs" "^0.3.1" + +-"@vscode/ripgrep@^1.15.9": +- version "1.15.9" +- resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.15.9.tgz#92279f7f28e1e49ad9a89603e10b17a4c7f9f5f1" +- integrity sha512-4q2PXRvUvr3bF+LsfrifmUZgSPmCNcUZo6SbEAZgArIChchkezaxLoIeQMJe/z3CCKStvaVKpBXLxN3Z8lQjFQ== +- dependencies: +- https-proxy-agent "^7.0.2" +- proxy-from-env "^1.1.0" +- yauzl "^2.9.2" +- + "@vscode/spdlog@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@vscode/spdlog/-/spdlog-0.15.0.tgz#37896541410ff036dc01c54e16bf131c522a057e" |