@@ -48,31 +48,31 @@ export async function initPolyfillsAsync(): Promise<void> {
4848 // WASM-TODO: performance polyfill for V8
4949}
5050
51- let _node_fs : any | undefined = undefined ;
52- let _node_url : any | undefined = undefined ;
51+ let _nodeFs : any | undefined = undefined ;
52+ let _nodeUrl : any | undefined = undefined ;
5353
54- export async function node_fs ( ) : Promise < any > {
55- if ( ENVIRONMENT_IS_NODE && ! _node_fs ) {
54+ export async function nodeFs ( ) : Promise < any > {
55+ if ( ENVIRONMENT_IS_NODE && ! _nodeFs ) {
5656 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
5757 // @ts -ignore:
58- _node_fs = await import ( /*! webpackIgnore: true */ "fs" ) ;
58+ _nodeFs = await import ( /*! webpackIgnore: true */ "fs" ) ;
5959 }
60- return _node_fs ;
60+ return _nodeFs ;
6161}
6262
63- export async function node_url ( ) : Promise < any > {
64- if ( ENVIRONMENT_IS_NODE && ! _node_url ) {
63+ export async function nodeUrl ( ) : Promise < any > {
64+ if ( ENVIRONMENT_IS_NODE && ! _nodeUrl ) {
6565 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6666 // @ts -ignore:
67- _node_url = await import ( /*! webpackIgnore: true */ "node:url" ) ;
67+ _nodeUrl = await import ( /*! webpackIgnore: true */ "node:url" ) ;
6868 }
69- return _node_url ;
69+ return _nodeUrl ;
7070}
7171
7272export async function fetchLike ( url : string , init ?: RequestInit ) : Promise < Response > {
7373 try {
74- await node_fs ( ) ;
75- await node_url ( ) ;
74+ await nodeFs ( ) ;
75+ await nodeUrl ( ) ;
7676 // this need to be detected only after we import node modules in onConfigLoaded
7777 const hasFetch = typeof ( globalThis . fetch ) === "function" ;
7878 if ( ENVIRONMENT_IS_NODE ) {
@@ -81,10 +81,10 @@ export async function fetchLike(url: string, init?: RequestInit): Promise<Respon
8181 return globalThis . fetch ( url , init || { credentials : "same-origin" } ) ;
8282 }
8383 if ( isFileUrl ) {
84- url = _node_url . fileURLToPath ( url ) ;
84+ url = _nodeUrl . fileURLToPath ( url ) ;
8585 }
8686
87- const arrayBuffer = await _node_fs . promises . readFile ( url ) ;
87+ const arrayBuffer = await _nodeFs . promises . readFile ( url ) ;
8888 return < Response > < any > {
8989 ok : true ,
9090 headers : {
0 commit comments