Skip to content

Commit

Permalink
feat(cli): Support node v22 and v23 (#2207)
Browse files Browse the repository at this point in the history
Co-authored-by: Oscar Spencer <[email protected]>
  • Loading branch information
spotandjake and ospencer authored Jan 17, 2025
1 parent d176be5 commit 130c494
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/bin/grainrun.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ const v8 = require("v8");
* This method should be used with care. Changing settings after the VM has started may result
* in unpredictable behavior, including crashes and data loss; or it may simply do nothing.
*
* This seems to work for our needs with Node 18, but we should be cautious when updating.
* This is valid in Node 18, 19, 20, and 21.
*/
v8.setFlagsFromString("--experimental-wasm-return-call");
if (process.version.match(/^v(18|19|20|21)\./))
v8.setFlagsFromString("--experimental-wasm-return-call");

const { readFile } = require("fs/promises");
const { WASI } = require("wasi");
Expand Down

0 comments on commit 130c494

Please sign in to comment.