Skip to content

Commit b1343ab

Browse files
npm run format
1 parent cf91bdc commit b1343ab

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

packages/npm-packages/ruby-wasm-wasi/rollup.config.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import typescript from "@rollup/plugin-typescript";
2-
import { nodeResolve } from '@rollup/plugin-node-resolve';
2+
import { nodeResolve } from "@rollup/plugin-node-resolve";
33

44
function variant(basename) {
55
return {
@@ -21,7 +21,10 @@ function variant(basename) {
2121
exports: "named",
2222
},
2323
],
24-
plugins: [typescript({ tsconfig: "./tsconfig.json", declaration: false }), nodeResolve()],
24+
plugins: [
25+
typescript({ tsconfig: "./tsconfig.json", declaration: false }),
26+
nodeResolve(),
27+
],
2528
};
2629
}
2730

@@ -43,7 +46,10 @@ export default [
4346
exports: "named",
4447
},
4548
],
46-
plugins: [typescript({ tsconfig: "./tsconfig.json", declaration: false }), nodeResolve()],
49+
plugins: [
50+
typescript({ tsconfig: "./tsconfig.json", declaration: false }),
51+
nodeResolve(),
52+
],
4753
external: ["wasi"],
48-
}
54+
},
4955
];

packages/npm-packages/ruby-wasm-wasi/src/browser.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import { WASI } from "@wasmer/wasi";
22
import { WasmFs } from "@wasmer/wasmfs";
33
import { RubyVM } from "./index";
44

5-
export const DefaultRubyVM = async (rubyModule: WebAssembly.Module, options: { consolePrint: boolean } = { consolePrint: true }) => {
5+
export const DefaultRubyVM = async (
6+
rubyModule: WebAssembly.Module,
7+
options: { consolePrint: boolean } = { consolePrint: true }
8+
) => {
69
const wasmFs = new WasmFs();
710
const wasi = new WASI({
811
bindings: {
@@ -13,7 +16,7 @@ export const DefaultRubyVM = async (rubyModule: WebAssembly.Module, options: { c
1316

1417
if (options.consolePrint) {
1518
const originalWriteSync = wasmFs.fs.writeSync.bind(wasmFs.fs);
16-
wasmFs.fs.writeSync = function() {
19+
wasmFs.fs.writeSync = function () {
1720
let fd: number = arguments[0];
1821
let text: string;
1922
if (arguments.length === 4) {
@@ -46,6 +49,9 @@ export const DefaultRubyVM = async (rubyModule: WebAssembly.Module, options: { c
4649
vm.initialize();
4750

4851
return {
49-
vm, wasi, fs: wasmFs, instance,
52+
vm,
53+
wasi,
54+
fs: wasmFs,
55+
instance,
5056
};
5157
};

packages/npm-packages/ruby-wasm-wasi/src/node.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export const DefaultRubyVM = async (rubyModule: WebAssembly.Module) => {
1818
vm.initialize();
1919

2020
return {
21-
vm, wasi, instance,
21+
vm,
22+
wasi,
23+
instance,
2224
};
2325
};

packages/npm-packages/ruby-wasm-wasi/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outDir": "./dist",
77
"target": "es2017",
88
"esModuleInterop": true,
9-
"moduleResolution": "node",
9+
"moduleResolution": "node"
1010
},
1111
"include": ["src/**/*.ts", "./src/bindgen/*"],
1212
"exclude": ["node_modules", "dist"]

0 commit comments

Comments
 (0)