File tree Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 21
21
"fuzzy-search" : " 3.2.1" ,
22
22
"node-fetch" : " 2.6.8" ,
23
23
"turndown" : " 7.1.1" ,
24
- "urijs" : " 1.19.11" ,
25
24
"vscode-languageserver" : " 8.0.2" ,
26
25
"vscode-languageserver-textdocument" : " 1.0.8" ,
27
26
"web-tree-sitter" : " 0.20.7" ,
Original file line number Diff line number Diff line change 1
1
import * as fs from 'fs'
2
2
import * as FuzzySearch from 'fuzzy-search'
3
3
import fetch from 'node-fetch'
4
- import * as URI from 'urijs'
5
4
import * as url from 'url'
6
5
import { isDeepStrictEqual } from 'util'
7
6
import * as LSP from 'vscode-languageserver/node'
@@ -380,13 +379,13 @@ export default class Analyzer {
380
379
return { }
381
380
}
382
381
383
- const cmd = interestingNode . text
384
-
385
382
type ExplainshellResponse = {
386
383
matches ?: Array < { helpHTML : string ; start : number ; end : number } >
387
384
}
388
385
389
- const url = URI ( endpoint ) . path ( '/api/explain' ) . addQuery ( 'cmd' , cmd ) . toString ( )
386
+ const searchParams = new URLSearchParams ( { cmd : interestingNode . text } ) . toString ( )
387
+ const url = `${ endpoint } /api/explain?${ searchParams } `
388
+
390
389
const explainshellRawResponse = await fetch ( url )
391
390
const explainshellResponse =
392
391
( await explainshellRawResponse . json ( ) ) as ExplainshellResponse
Original file line number Diff line number Diff line change @@ -216,11 +216,6 @@ turndown@7.1.1:
216
216
dependencies :
217
217
domino "^2.1.6"
218
218
219
- urijs@1.19.11 :
220
- version "1.19.11"
221
- resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.11.tgz#204b0d6b605ae80bea54bea39280cdb7c9f923cc"
222
- integrity sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==
223
-
224
219
vscode-jsonrpc@8.0.2 :
225
220
version "8.0.2"
226
221
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz#f239ed2cd6004021b6550af9fd9d3e47eee3cac9"
You can’t perform that action at this time.
0 commit comments