mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 23:59:43 +01:00
@@ -24,73 +24,14 @@ const specSpecificReplaceStrings = new Map([
|
||||
[
|
||||
'import { ai } from "@fig/autocomplete-generators";',
|
||||
'function ai(...args: any[]): undefined { return undefined; }'
|
||||
], [
|
||||
'const remoteURLs = out.split("\\n").reduce((dict, line) => {',
|
||||
'const remoteURLs = out.split("\\n").reduce<Record<string, string>>((dict, line) => {',
|
||||
], [
|
||||
'prompt: async ({ executeCommand }) => {',
|
||||
'prompt: async ({ executeCommand }: any) => {'
|
||||
], [
|
||||
'message: async ({ executeCommand }) =>',
|
||||
'message: async ({ executeCommand }: any) =>'
|
||||
], [
|
||||
'if (parts.length > 1) {',
|
||||
'if (parts && parts.length > 1) {'
|
||||
], [
|
||||
'if (seen.has(suggestion.name)) return false;',
|
||||
'if (!suggestion) return false;\n\t\t\t\tif (seen.has(suggestion.name)) return false;'
|
||||
], [
|
||||
'return pp(',
|
||||
'return pp?.('
|
||||
]
|
||||
]],
|
||||
['kill', [[
|
||||
'out.match(/\\w+/g)',
|
||||
'out.match(/\\w+/g)?'
|
||||
]]],
|
||||
['node', [[
|
||||
'const isAdonisJsonPresentCommand = "test -f .adonisrc.json";',
|
||||
''
|
||||
]]],
|
||||
['npm', [
|
||||
[
|
||||
'keywords?.length > 0 ? `+keywords:${keywords.join(",")}` : "";',
|
||||
'keywords && keywords.length > 0 ? `+keywords:${keywords.join(",")}` : "";'
|
||||
], [
|
||||
'return results.map((item) => ({',
|
||||
'return results.map((item: any) => ({'
|
||||
], [
|
||||
'const suggestions = [];',
|
||||
'const suggestions: Fig.Suggestion[] = [];'
|
||||
]
|
||||
]],
|
||||
['nvm', [[
|
||||
'const pattern: Fig.Arg = {\n\tname: "pattern",\n};',
|
||||
''
|
||||
]]],
|
||||
['pnpm', [
|
||||
[
|
||||
'if (parts.length > 1) {',
|
||||
'if (parts && parts.length > 1) {'
|
||||
], [
|
||||
'const packages = postProcess(',
|
||||
'if (postProcess === undefined) return undefined;\n\t\tconst packages = postProcess('
|
||||
], [
|
||||
').map(({ name }) => name as string);',
|
||||
')?.filter((e) => e !== null).map(({ name }) => name as string);'
|
||||
], [
|
||||
'.filter((name) => nodeClis.has(name))',
|
||||
'?.filter((name) => nodeClis.has(name))'
|
||||
]
|
||||
]],
|
||||
['ssh', [[
|
||||
'const includeLines = await Promise.all(',
|
||||
'const includeLines: any = await Promise.all('
|
||||
]]],
|
||||
['yarn', [[
|
||||
'(item) =>',
|
||||
'(item: any) =>'
|
||||
]]],
|
||||
]);
|
||||
|
||||
for (const spec of upstreamSpecs) {
|
||||
|
||||
Reference in New Issue
Block a user