File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 378378 "js-yaml" : " ^4.0.0" ,
379379 "jszip" : " ^3.7.1" ,
380380 "mocha" : " ^9.1.3" ,
381- "node-fetch" : " ^3.x" ,
382381 "path-browserify" : " ^1.0.1" ,
383382 "process" : " ^0.11.10" ,
384383 "rimraf" : " ^3.0.2" ,
389388 "webpack" : " ^5.64.4" ,
390389 "webpack-cli" : " ^4.9.1"
391390 },
391+ "dependencies" : {
392+ "node-fetch" : " ^3.x"
393+ },
392394 "repository" : {
393395 "type" : " git" ,
394396 "url" : " https://github.com/dosasm/masm-tasm"
398400 "email" : " xsro@foxmail.com"
399401 },
400402 "license" : " MIT"
401- }
403+ }
Original file line number Diff line number Diff line change 22 * API for downloading information from web
33 */
44import { logger } from "./logger" ;
5- import fetch from "node- fetch" ;
5+ import { fetch } from "./ fetch" ;
66
77export async function downloadFromMultiSources ( urls : string [ ] ) : Promise < string | undefined > {
88 for ( const url of urls ) {
Original file line number Diff line number Diff line change 1+ /* eslint-disable @typescript-eslint/no-explicit-any */
2+ // @ts -check
3+
4+ export const fetch =
5+ process . platform
6+ ? eval ( "(...args) => import('node-fetch').then(({default: fetch}) => fetch(...args))" )
7+ : window . fetch ;
You can’t perform that action at this time.
0 commit comments