File tree Expand file tree Collapse file tree 3 files changed +401
-701
lines changed Expand file tree Collapse file tree 3 files changed +401
-701
lines changed Original file line number Diff line number Diff line change 429
429
}
430
430
},
431
431
"devDependencies" : {
432
+ "@types/bent" : " ^7.3.2" ,
432
433
"@types/cheerio" : " ^0.22.30" ,
433
434
"@types/glob" : " ^7.1.4" ,
434
435
"@types/js-yaml" : " ^4.0.5" ,
435
436
"@types/lodash-es" : " ^4.17.3" ,
436
437
"@types/lru-cache" : " ^7.6.1" ,
437
438
"@types/mocha" : " ^9.0.0" ,
438
439
"@types/node" : " ^17.0.23" ,
439
- "@types/request-promise-native" : " ^1.0.17" ,
440
440
"@types/vscode" : " ^1.52.0" ,
441
441
"@types/which" : " ^2.0.1" ,
442
442
"@types/yauzl" : " ^2.9.1" ,
461
461
" justusadam.language-haskell"
462
462
],
463
463
"dependencies" : {
464
+ "bent" : " ^7.3.12" ,
464
465
"cheerio" : " ^1.0.0-rc.10" ,
465
466
"extend" : " >=3.0.2" ,
466
467
"js-yaml" : " ^4.1.0" ,
467
468
"lodash-es" : " ^4.17.21" ,
468
469
"lru-cache" : " ^7.7.3" ,
469
- "request" : " ^2.88.2" ,
470
- "request-promise-native" : " ^1.0.8" ,
471
470
"ts-pattern" : " ^4.0.1" ,
472
471
"vscode-languageclient" : " ^7.0.0" ,
473
472
"which" : " ^2.0.1" ,
Original file line number Diff line number Diff line change @@ -2,15 +2,16 @@ import * as cheerio from 'cheerio';
2
2
import * as yaml from 'js-yaml' ;
3
3
import escapeRegExp from 'lodash-es/escapeRegExp' ;
4
4
import * as LRUCache from 'lru-cache' ;
5
- import * as request from 'request-promise-native ' ;
5
+ import * as bent from 'bent ' ;
6
6
import * as vscode from 'vscode' ;
7
7
import { CommandNames } from './constants' ;
8
8
9
+ const getJson = bent ( 'json' ) ;
10
+
9
11
const askHoogle = async ( variable : string ) : Promise < any > => {
10
- return await request ( {
11
- url : `https://hoogle.haskell.org/?hoogle=${ variable } &scope=set%3Astackage&mode=json` ,
12
- json : true ,
13
- } ) . promise ( ) ;
12
+ return await getJson (
13
+ `https://hoogle.haskell.org/?hoogle=${ variable } &scope=set%3Astackage&mode=json`
14
+ ) ;
14
15
} ;
15
16
16
17
const withCache =
You can’t perform that action at this time.
0 commit comments