mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 00:29:09 -05:00
fix(ext/node): Add "module" to builtinsModule (#23242)
Fixes https://github.com/denoland/deno/issues/22731
This commit is contained in:
parent
7446b0163d
commit
f4b11db072
2 changed files with 7 additions and 1 deletions
|
@ -218,6 +218,7 @@ function setupBuiltinModules() {
|
||||||
"internal/util/inspect": internalUtilInspect,
|
"internal/util/inspect": internalUtilInspect,
|
||||||
"internal/util": internalUtil,
|
"internal/util": internalUtil,
|
||||||
net,
|
net,
|
||||||
|
module: Module,
|
||||||
os,
|
os,
|
||||||
"path/posix": pathPosix,
|
"path/posix": pathPosix,
|
||||||
"path/win32": pathWin32,
|
"path/win32": pathWin32,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import { createRequire, isBuiltin, Module } from "node:module";
|
import { builtinModules, createRequire, isBuiltin, Module } from "node:module";
|
||||||
import { assert, assertEquals } from "@std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
import process from "node:process";
|
import process from "node:process";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
|
@ -83,3 +83,8 @@ Deno.test("[node/module isBuiltin] recognizes node builtins", () => {
|
||||||
// deno-lint-ignore no-explicit-any
|
// deno-lint-ignore no-explicit-any
|
||||||
assert(!isBuiltin(undefined as any));
|
assert(!isBuiltin(undefined as any));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// https://github.com/denoland/deno/issues/22731
|
||||||
|
Deno.test("[node/module builtinModules] has 'module' in builtins", () => {
|
||||||
|
assert(builtinModules.includes("module"));
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue