mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 15:49:44 -05:00
fix(ext/node): register node:wasi
built-in (#25134)
Fixes https://github.com/denoland/deno/issues/23531
(cherry picked from commit 2531204a34
)
This commit is contained in:
parent
3314a0ceb8
commit
1bafcf538e
7 changed files with 13 additions and 3 deletions
|
@ -594,7 +594,6 @@ deno_core::extension!(deno_node,
|
|||
"path/mod.ts",
|
||||
"path/separator.ts",
|
||||
"readline/promises.ts",
|
||||
"wasi.ts",
|
||||
"node:assert" = "assert.ts",
|
||||
"node:assert/strict" = "assert/strict.ts",
|
||||
"node:async_hooks" = "async_hooks.ts",
|
||||
|
@ -645,6 +644,7 @@ deno_core::extension!(deno_node,
|
|||
"node:util/types" = "util/types.ts",
|
||||
"node:v8" = "v8.ts",
|
||||
"node:vm" = "vm.js",
|
||||
"node:wasi" = "wasi.ts",
|
||||
"node:worker_threads" = "worker_threads.ts",
|
||||
"node:zlib" = "zlib.ts",
|
||||
],
|
||||
|
|
|
@ -75,6 +75,7 @@ generate_builtin_node_module_lists! {
|
|||
"util/types",
|
||||
"v8",
|
||||
"vm",
|
||||
"wasi",
|
||||
"worker_threads",
|
||||
"zlib",
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ import util from "node:util";
|
|||
import v8 from "node:v8";
|
||||
import vm from "node:vm";
|
||||
import workerThreads from "node:worker_threads";
|
||||
import wasi from "ext:deno_node/wasi.ts";
|
||||
import wasi from "node:wasi";
|
||||
import zlib from "node:zlib";
|
||||
|
||||
const nativeModuleExports = ObjectCreate(null);
|
||||
|
|
|
@ -7663,6 +7663,7 @@ fn lsp_completions_node_specifier() {
|
|||
"node:util/types",
|
||||
"node:v8",
|
||||
"node:vm",
|
||||
"node:wasi",
|
||||
"node:worker_threads",
|
||||
"node:zlib",
|
||||
],
|
||||
|
|
|
@ -96,6 +96,7 @@ util::unit_test_factory!(
|
|||
util_test,
|
||||
v8_test,
|
||||
vm_test,
|
||||
wasi_test,
|
||||
worker_threads_test,
|
||||
zlib_test
|
||||
]
|
||||
|
|
7
tests/unit_node/wasi_test.ts
Normal file
7
tests/unit_node/wasi_test.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
import wasi from "node:wasi";
|
||||
import { assertThrows } from "@std/assert";
|
||||
|
||||
Deno.test("[node/wasi] - WASI should throw (not implemented)", () => {
|
||||
assertThrows(() => new wasi.WASI());
|
||||
});
|
|
@ -206,7 +206,7 @@
|
|||
"node:util/types": "../ext/node/polyfills/util/types.ts",
|
||||
"node:v8": "../ext/node/polyfills/v8.ts",
|
||||
"node:vm": "../ext/node/polyfills/vm.js",
|
||||
"ext:deno_node/wasi.ts": "../ext/node/polyfills/wasi.ts",
|
||||
"node:wasi": "../ext/node/polyfills/wasi.ts",
|
||||
"node:worker_threads": "../ext/node/polyfills/worker_threads.ts",
|
||||
"node:zlib": "../ext/node/polyfills/zlib.ts",
|
||||
"ext:deno_url/00_url.js": "../ext/url/00_url.js",
|
||||
|
|
Loading…
Reference in a new issue