Skip to content

Commit 0ad0940

Browse files
rake format
1 parent d6c94b7 commit 0ad0940

File tree

7 files changed

+41
-37
lines changed

7 files changed

+41
-37
lines changed

lib/ruby_wasm/build.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ class BuildExecutor
1010
def initialize(verbose: false, process_count: nil)
1111
@verbose = verbose
1212
@github_actions_markup = ENV["ENABLE_GITHUB_ACTIONS_MARKUP"] != nil
13-
__skip__ = begin
14-
require "etc"
15-
@process_count = process_count || Etc.nprocessors
16-
rescue LoadError
17-
@process_count = process_count || 1
18-
end
13+
__skip__ =
14+
begin
15+
require "etc"
16+
@process_count = process_count || Etc.nprocessors
17+
rescue LoadError
18+
@process_count = process_count || 1
19+
end
1920
end
2021

2122
def system(*args, chdir: nil, env: nil)

packages/npm-packages/ruby-wasm-wasi/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This package is a template for each channel-specific package.
44

5-
| Channel | Package |
6-
| ------- | ------------------------------------------------- |
5+
| Channel | Package |
6+
| ------- | -------------------------------------------------- |
77
| `head` | [`@ruby/head-wasm-wasi`](./../ruby-head-wasm-wasi) |
8-
| `3.2` | [`@ruby/3.2-wasm-wasi`](./../ruby-3.2-wasm-wasi) |
8+
| `3.2` | [`@ruby/3.2-wasm-wasi`](./../ruby-3.2-wasm-wasi) |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ function config({ basename }) {
1717
nodePolyfills(),
1818
inject({ Buffer: ["buffer", "Buffer"] }),
1919
typescript(typescriptOptions),
20-
nodeResolve({ resolveOnly: ["@wasmer/wasi"] })
21-
]
20+
nodeResolve({ resolveOnly: ["@wasmer/wasi"] }),
21+
],
2222
};
2323
}
2424

packages/npm-packages/ruby-wasm-wasi/test-e2e/integrations/browser-script.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { test, expect, Page } from "@playwright/test";
22

3-
import { setupDebugLog, setupProxy, setupUncaughtExceptionRejection, expectUncaughtException } from "../support";
3+
import {
4+
setupDebugLog,
5+
setupProxy,
6+
setupUncaughtExceptionRejection,
7+
expectUncaughtException,
8+
} from "../support";
49

510
if (!process.env.RUBY_NPM_PACKAGE_ROOT) {
611
test.skip("skip", () => {});
@@ -63,6 +68,4 @@ if (!process.env.RUBY_NPM_PACKAGE_ROOT) {
6368
expect(await resolve()).toBe("ok");
6469
});
6570
});
66-
test.describe('data-eval="async" crash', () => {
67-
});
6871
}

packages/npm-packages/ruby-wasm-wasi/test-e2e/support.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export const setupDebugLog = (context: BrowserContext) => {
1818
};
1919

2020
export const setupProxy = (context: BrowserContext) => {
21-
const cdnPattern = /cdn.jsdelivr.net\/npm\/@ruby\/.+-wasm-wasi@.+\/dist\/(.+)/;
21+
const cdnPattern =
22+
/cdn.jsdelivr.net\/npm\/@ruby\/.+-wasm-wasi@.+\/dist\/(.+)/;
2223
context.route(cdnPattern, (route) => {
2324
const request = route.request();
2425
console.log(">> [MOCK]", request.method(), request.url());
@@ -29,16 +30,17 @@ export const setupProxy = (context: BrowserContext) => {
2930
});
3031
};
3132

32-
export const { setupUncaughtExceptionRejection, expectUncaughtException } = (() => {
33-
const rejectUncaughtException = (err: Error) => {
34-
expect(err).toEqual(undefined);
35-
}
36-
return {
37-
setupUncaughtExceptionRejection: (page: Page) => {
38-
page.on("pageerror", rejectUncaughtException);
39-
},
40-
expectUncaughtException: (page: Page) => {
41-
page.off("pageerror", rejectUncaughtException);
42-
},
43-
}
44-
})()
33+
export const { setupUncaughtExceptionRejection, expectUncaughtException } =
34+
(() => {
35+
const rejectUncaughtException = (err: Error) => {
36+
expect(err).toEqual(undefined);
37+
};
38+
return {
39+
setupUncaughtExceptionRejection: (page: Page) => {
40+
page.on("pageerror", rejectUncaughtException);
41+
},
42+
expectUncaughtException: (page: Page) => {
43+
page.off("pageerror", rejectUncaughtException);
44+
},
45+
};
46+
})();

packages/npm-packages/ruby-wasm-wasi/test/init.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ const rubyModule = (async () => {
1919
return await WebAssembly.compile(binary.buffer);
2020
})();
2121

22-
const initRubyVM = async (
23-
{ suppressStderr } = { suppressStderr: false },
24-
) => {
22+
const initRubyVM = async ({ suppressStderr } = { suppressStderr: false }) => {
2523
let preopens = {};
2624
if (process.env.RUBY_ROOT) {
2725
preopens["/usr"] = path.join(process.env.RUBY_ROOT, "./usr");
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"extends": "./tsconfig.json",
3-
"compilerOptions": {
4-
"module": "CommonJS",
5-
"esModuleInterop": true,
6-
"outDir": "./dist/cjs"
7-
}
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"module": "CommonJS",
5+
"esModuleInterop": true,
6+
"outDir": "./dist/cjs"
7+
}
88
}

0 commit comments

Comments
 (0)