Skip to content

Commit 9dca031

Browse files
committed
Update ruby-wasm-wasi dev dependencies
1 parent ef0300a commit 9dca031

8 files changed

Lines changed: 1971 additions & 942 deletions

File tree

package-lock.json

Lines changed: 1899 additions & 873 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
"build": "npm run build:rollup && npm run build:tsc && npm run build:static && ./tools/post-build.sh ./dist"
5454
},
5555
"devDependencies": {
56-
"@bytecodealliance/jco": "1.8.1",
57-
"@rollup/plugin-typescript": "^12.1.4",
58-
"@types/node": "24.1.0",
59-
"prettier": "^3.6.2",
60-
"typescript": "^5.9.2",
61-
"vitest": "^3.2.4"
56+
"@bytecodealliance/jco": "^1.19.0",
57+
"@rollup/plugin-typescript": "^12.3.0",
58+
"@types/node": "^24.12.2",
59+
"prettier": "^3.8.3",
60+
"typescript": "^5.9.3",
61+
"vitest": "^4.1.5"
6262
},
6363
"dependencies": {
6464
"@bjorn3/browser_wasi_shim": "^0.4.2",

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import typescript from "@rollup/plugin-typescript";
22
import { nodeResolve } from "@rollup/plugin-node-resolve";
33

4-
const typescriptOptions = { tsconfig: "./tsconfig.json", declaration: false };
4+
const typescriptOptions = {
5+
tsconfig: "./tsconfig.json",
6+
declaration: false,
7+
outDir: "./dist",
8+
};
59

610
function config({ basename }) {
711
return {
Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
export namespace RubyJsJsRuntime {
2-
export function evalJs(code: string): JsAbiResult;
3-
export function isJs(value: JsAbiValue): boolean;
4-
export function instanceOf(value: JsAbiValue, klass: JsAbiValue): boolean;
5-
export function globalThis(): JsAbiValue;
6-
export function intToJsNumber(value: number): JsAbiValue;
7-
export function floatToJsNumber(value: number): JsAbiValue;
8-
export function stringToJsString(value: string): JsAbiValue;
9-
export function boolToJsBool(value: boolean): JsAbiValue;
10-
export function procToJsFunction(): JsAbiValue;
11-
export function rbObjectToJsRbValue(): JsAbiValue;
12-
export function jsValueToString(value: JsAbiValue): string;
13-
export function jsValueToInteger(value: JsAbiValue): RawInteger;
14-
export function exportJsValueToHost(value: JsAbiValue): void;
15-
export function importJsValueFromHost(): JsAbiValue;
16-
export function jsValueTypeof(value: JsAbiValue): string;
17-
export function jsValueEqual(lhs: JsAbiValue, rhs: JsAbiValue): boolean;
18-
export function jsValueStrictlyEqual(lhs: JsAbiValue, rhs: JsAbiValue): boolean;
19-
export function reflectApply(target: JsAbiValue, thisArgument: JsAbiValue, arguments: Array<JsAbiValue>): JsAbiResult;
20-
export function reflectGet(target: JsAbiValue, propertyKey: string): JsAbiResult;
21-
export function reflectSet(target: JsAbiValue, propertyKey: string, value: JsAbiValue): JsAbiResult;
22-
export function throwProhibitRewindException(message: string): void;
23-
export { JsAbiValue };
24-
}
1+
/** @module Interface ruby:js/js-runtime **/
2+
export function evalJs(code: string): JsAbiResult;
3+
export function isJs(value: JsAbiValue): boolean;
4+
export function instanceOf(value: JsAbiValue, klass: JsAbiValue): boolean;
5+
export function globalThis(): JsAbiValue;
6+
export function intToJsNumber(value: number): JsAbiValue;
7+
export function floatToJsNumber(value: number): JsAbiValue;
8+
export function stringToJsString(value: string): JsAbiValue;
9+
export function boolToJsBool(value: boolean): JsAbiValue;
10+
export function procToJsFunction(): JsAbiValue;
11+
export function rbObjectToJsRbValue(): JsAbiValue;
12+
export function jsValueToString(value: JsAbiValue): string;
13+
export function jsValueToInteger(value: JsAbiValue): RawInteger;
14+
export function exportJsValueToHost(value: JsAbiValue): void;
15+
export function importJsValueFromHost(): JsAbiValue;
16+
export function jsValueTypeof(value: JsAbiValue): string;
17+
export function jsValueEqual(lhs: JsAbiValue, rhs: JsAbiValue): boolean;
18+
export function jsValueStrictlyEqual(lhs: JsAbiValue, rhs: JsAbiValue): boolean;
19+
export function reflectApply(target: JsAbiValue, thisArgument: JsAbiValue, arguments: Array<JsAbiValue>): JsAbiResult;
20+
export function reflectGet(target: JsAbiValue, propertyKey: string): JsAbiResult;
21+
export function reflectSet(target: JsAbiValue, propertyKey: string, value: JsAbiValue): JsAbiResult;
22+
export function throwProhibitRewindException(message: string): void;
2523
export type JsAbiResult = JsAbiResultSuccess | JsAbiResultFailure;
2624
export interface JsAbiResultSuccess {
2725
tag: 'success',
@@ -42,4 +40,8 @@ export interface RawIntegerBignum {
4240
}
4341

4442
export class JsAbiValue {
43+
/**
44+
* This type does not have a public constructor.
45+
*/
46+
private constructor();
4547
}
Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
1-
export namespace RubyJsRubyRuntime {
2-
export function rubyShowVersion(): void;
3-
export function rubyInit(args: Array<string>): void;
4-
export function rubyInitLoadpath(): void;
5-
export function rbEvalStringProtect(str: string): [RbAbiValue, number];
6-
export function rbFuncallvProtect(recv: RbAbiValue, mid: RbId, args: Array<RbAbiValue>): [RbAbiValue, number];
7-
export function rbIntern(name: string): RbId;
8-
export function rbErrinfo(): RbAbiValue;
9-
export function rbClearErrinfo(): void;
10-
export function rstringPtr(value: RbAbiValue): string;
11-
export function rbVmBugreport(): void;
12-
export function rbGcEnable(): boolean;
13-
export function rbGcDisable(): boolean;
14-
export function rbSetShouldProhibitRewind(newValue: boolean): boolean;
15-
/**
16-
* XXX: Do we really need them?
17-
* wrap-js-value: func(value: js-abi-value) -> rb-abi-value;
18-
* to-js-value: func(value: borrow<rb-abi-value>) -> js-abi-value;
19-
* Transfer the value from Ruby to JS
20-
*
21-
* 1. Ruby side registers the value in the stage
22-
* 2. Ruby side calls JS's `import-rb-value-from-rb()`
23-
* 3. `import-rb-value-from-rb()` calls `export-rb-value-to-js()`
24-
* 4. `export-rb-value-to-js()` returns the staged value
25-
*/
26-
export function exportRbValueToJs(): RbAbiValue;
27-
export { RbAbiValue };
28-
}
29-
import type { JsAbiValue } from './ruby-js-js-runtime.js';
30-
export { JsAbiValue };
1+
/** @module Interface ruby:js/ruby-runtime **/
2+
export function rubyShowVersion(): void;
3+
export function rubyInit(args: Array<string>): void;
4+
export function rubyInitLoadpath(): void;
5+
export function rbEvalStringProtect(str: string): [RbAbiValue, number];
6+
export function rbFuncallvProtect(recv: RbAbiValue, mid: RbId, args: Array<RbAbiValue>): [RbAbiValue, number];
7+
export function rbIntern(name: string): RbId;
8+
export function rbErrinfo(): RbAbiValue;
9+
export function rbClearErrinfo(): void;
10+
export function rstringPtr(value: RbAbiValue): string;
11+
export function rbVmBugreport(): void;
12+
export function rbGcEnable(): boolean;
13+
export function rbGcDisable(): boolean;
14+
export function rbSetShouldProhibitRewind(newValue: boolean): boolean;
15+
/**
16+
* XXX: Do we really need them?
17+
* wrap-js-value: func(value: js-abi-value) -> rb-abi-value;
18+
* to-js-value: func(value: borrow<rb-abi-value>) -> js-abi-value;
19+
* Transfer the value from Ruby to JS
20+
*
21+
* 1. Ruby side registers the value in the stage
22+
* 2. Ruby side calls JS's `import-rb-value-from-rb()`
23+
* 3. `import-rb-value-from-rb()` calls `export-rb-value-to-js()`
24+
* 4. `export-rb-value-to-js()` returns the staged value
25+
*/
26+
export function exportRbValueToJs(): RbAbiValue;
27+
export type JsAbiValue = import('./ruby-js-js-runtime.js').JsAbiValue;
3128
export type RbErrno = number;
3229
export type RbId = number;
3330

3431
export class RbAbiValue {
32+
/**
33+
* This type does not have a public constructor.
34+
*/
35+
private constructor();
3536
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RubyJsRubyRuntime } from "./bindgen/interfaces/ruby-js-ruby-runtime.js";
1+
import type * as RubyJsRubyRuntime from "./bindgen/interfaces/ruby-js-ruby-runtime.js";
22
import * as RbAbi from "./bindgen/legacy/rb-abi-guest.js";
33

44
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { RubyJsJsRuntime } from "./bindgen/interfaces/ruby-js-js-runtime.js";
2-
import type { RubyJsRubyRuntime } from "./bindgen/interfaces/ruby-js-ruby-runtime.js";
1+
import type * as RubyJsJsRuntime from "./bindgen/interfaces/ruby-js-js-runtime.js";
2+
import type * as RubyJsRubyRuntime from "./bindgen/interfaces/ruby-js-ruby-runtime.js";
33
import * as RbAbi from "./bindgen/legacy/rb-abi-guest.js";
44
import {
55
RbJsAbiHost,

packages/npm-packages/ruby-wasm-wasi/vitest.config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import { defineConfig } from 'vitest/config'
33
export default defineConfig({
44
test: {
55
pool: "forks",
6-
poolOptions: {
7-
forks: {
8-
execArgv: ["--experimental-wasi-unstable-preview1", "--expose-gc"],
9-
}
10-
},
6+
execArgv: ["--experimental-wasi-unstable-preview1", "--expose-gc"],
117
testTimeout: 300000,
128
exclude: [],
139
},

0 commit comments

Comments
 (0)