Skip to content

Commit 9d7dc12

Browse files
committed
camelCase
1 parent c5610ec commit 9d7dc12

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

src/native/corehost/browserhost/loader/bootstrap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { ENVIRONMENT_IS_NODE, ENVIRONMENT_IS_SHELL } from "./per-module";
88
import { getLoaderConfig } from "./config";
99
import { BrowserHost_InitializeCoreCLR } from "./run";
1010
import { createPromiseCompletionSource } from "./promise-completion-source";
11-
import { node_fs } from "./polyfills";
11+
import { nodeFs } from "./polyfills";
1212

1313
const scriptUrlQuery = /*! webpackIgnore: true */import.meta.url;
1414
const queryIndex = scriptUrlQuery.indexOf("?");
@@ -164,7 +164,7 @@ export async function findResources(dotnet: DotnetHostBuilder): Promise<void> {
164164
if (!ENVIRONMENT_IS_NODE) {
165165
return;
166166
}
167-
const fs = await node_fs();
167+
const fs = await nodeFs();
168168
const mountedDir = "/managed";
169169
const files: string[] = await fs.promises.readdir(".");
170170
const assemblies = files

src/native/corehost/browserhost/loader/dotnet.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ interface IMemoryView extends IDisposable {
767767
get length(): number;
768768
get byteLength(): number;
769769
}
770-
declare function exit(exit_code: number, reason?: any): void;
770+
declare function exit(exitCode: number, reason?: any): void;
771771
declare const dotnet: DotnetHostBuilder;
772772
declare global {
773773
function getDotnetRuntime(runtimeId: number): RuntimeAPI | undefined;

src/native/corehost/browserhost/loader/exit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { dotnetLogger } from "./cross-module";
55
import { ENVIRONMENT_IS_NODE } from "./per-module";
66

77
// WASM-TODO: redirect to host.ts
8-
export function exit(exit_code: number, reason: any): void {
8+
export function exit(exitCode: number, reason: any): void {
99
if (reason) {
1010
const reasonStr = (typeof reason === "object") ? `${reason.message || ""}\n${reason.stack || ""}` : reason.toString();
1111
dotnetLogger.error(reasonStr);
1212
}
1313
if (ENVIRONMENT_IS_NODE) {
14-
(globalThis as any).process.exit(exit_code);
14+
(globalThis as any).process.exit(exitCode);
1515
}
1616
}

src/native/corehost/browserhost/loader/polyfills.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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

7272
export 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: {

src/native/libs/Common/JavaScript/types/public-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ export interface IMemoryView extends IDisposable {
724724
get byteLength(): number;
725725
}
726726

727-
export declare function exit(exit_code: number, reason?: any): void;
727+
export declare function exit(exitCode: number, reason?: any): void;
728728

729729
export declare const dotnet: DotnetHostBuilder;
730730

src/native/libs/System.Native.Browser/utils/host.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import { ENVIRONMENT_IS_NODE } from "./per-module";
1111
// - install global handler for unhandled exceptions and promise rejections
1212
// - raise ExceptionHandling.RaiseAppDomainUnhandledExceptionEvent()
1313
// eslint-disable-next-line @typescript-eslint/no-unused-vars
14-
export function exit(exit_code: number, reason: any): void {
14+
export function exit(exitCode: number, reason: any): void {
1515
if (reason) {
1616
const reasonStr = (typeof reason === "object") ? `${reason.message || ""}\n${reason.stack || ""}` : reason.toString();
1717
dotnetLogger.error(reasonStr);
1818
}
1919
if (ENVIRONMENT_IS_NODE) {
20-
(globalThis as any).process.exit(exit_code);
20+
(globalThis as any).process.exit(exitCode);
2121
}
2222
}
2323

src/native/libs/System.Runtime.InteropServices.JavaScript.Native/native/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export function SystemInteropJS_BindJSImportST(signature: JSFunctionSignature):
99
return dotnetRuntimeExports.bindJSImportST(signature);
1010
}
1111

12-
export function SystemInteropJS_InvokeJSImportST(function_handle: JSFnHandle, args: JSMarshalerArguments): void {
13-
dotnetRuntimeExports.invokeJSImportST(function_handle, args);
12+
export function SystemInteropJS_InvokeJSImportST(functionHandle: JSFnHandle, args: JSMarshalerArguments): void {
13+
dotnetRuntimeExports.invokeJSImportST(functionHandle, args);
1414
}
1515

1616
export function dotnetInitializeModule(internals: InternalExchange): void {

0 commit comments

Comments
 (0)