1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

fix(node): repl._builtinLibs (#20046)

Ref https://github.com/denoland/deno/issues/19733
This commit is contained in:
Bartek Iwańczuk 2023-08-04 14:30:48 +02:00 committed by GitHub
parent 5311f69bbb
commit 8d8a89ceea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 2 deletions

View file

@ -73,6 +73,7 @@ util::unit_test_factory!(
process_test,
querystring_test,
readline_test,
repl_test,
stream_test,
string_decoder_test,
timers_test,

View file

@ -0,0 +1,17 @@
// deno-lint-ignore-file no-undef
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
import repl from "node:repl";
import { assert } from "../../../test_util/std/testing/asserts.ts";
Deno.test({
name: "repl module exports",
fn() {
assert(typeof repl.REPLServer !== "undefined");
assert(typeof repl.start !== "undefined");
// @ts-ignore not present in declaration files, but libraries depend on it
assert(typeof repl.builtinModules !== "undefined");
// @ts-ignore not present in declaration files, but libraries depend on it
assert(typeof repl._builtinLibs !== "undefined");
},
});

View file

@ -452,7 +452,6 @@ deno_core::extension!(deno_node,
"path/mod.ts",
"path/separator.ts",
"readline/promises.ts",
"repl.ts",
"wasi.ts",
"assert.ts" with_specifier "node:assert",
"assert/strict.ts" with_specifier "node:assert/strict",
@ -485,6 +484,7 @@ deno_core::extension!(deno_node,
"punycode.ts" with_specifier "node:punycode",
"querystring.ts" with_specifier "node:querystring",
"readline.ts" with_specifier "node:readline",
"repl.ts" with_specifier "node:repl",
"stream.ts" with_specifier "node:stream",
"stream/consumers.mjs" with_specifier "node:stream/consumers",
"stream/promises.mjs" with_specifier "node:stream/promises",

View file

@ -55,6 +55,7 @@ generate_builtin_node_module_lists! {
"process",
"punycode",
"querystring",
"repl",
"readline",
"stream",
"stream/consumers",

View file

@ -110,7 +110,7 @@ import process from "node:process";
import querystring from "node:querystring";
import readline from "node:readline";
import readlinePromises from "ext:deno_node/readline/promises.ts";
import repl from "ext:deno_node/repl.ts";
import repl from "node:repl";
import stream from "node:stream";
import streamConsumers from "node:stream/consumers";
import streamPromises from "node:stream/promises";

View file

@ -52,11 +52,13 @@ export const builtinModules = [
"worker_threads",
"zlib",
];
export const _builtinLibs = builtinModules;
export function start() {
notImplemented("repl.start");
}
export default {
REPLServer,
builtinModules,
_builtinLibs,
start,
};