Skip to content

Commit 22335bb

Browse files
committed
Update @wasmer/wasi to v1.2.2
1 parent f75371b commit 22335bb

File tree

7 files changed

+169
-472
lines changed

7 files changed

+169
-472
lines changed

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

Lines changed: 89 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
],
2828
"license": "MIT",
2929
"devDependencies": {
30+
"@rollup/plugin-json": "^6.0.0",
3031
"rollup": "^3.2.2",
31-
"@rollup/plugin-json": "^6.0.0"
32+
"rollup-plugin-polyfill-node": "^0.12.0"
3233
}
3334
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import json from "@rollup/plugin-json";
22
import fs from "fs";
33
import path from "path";
4+
import nodePolyfills from "rollup-plugin-polyfill-node";
45

56
/** @type {import('rollup').RollupOptions[]} */
67
export default [
@@ -15,6 +16,7 @@ export default [
1516
],
1617
plugins: [
1718
json(),
19+
nodePolyfills(),
1820
],
1921
},
2022
];
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
2+
import { Buffer } from "buffer";
3+
14
import { main } from "../../ruby-wasm-wasi/dist/browser.script.esm"
25
import * as pkg from "../package.json"
36

7+
// Since `Buffer.from` is used by `@wasmer/wasi`,
8+
// we export `Buffer` class into the global.
9+
globalThis.Buffer = Buffer;
10+
411
main(pkg)

0 commit comments

Comments
 (0)