summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-11-25 18:38:08 -0500
committerGitHub <noreply@github.com>2022-11-25 18:38:08 -0500
commit6de3d7f184a4490d342a4c43af6a04b0b26f8cfd (patch)
treecdb69a46a85bf0908cfe45ebd3f06e3ada608454
parentdcb4ffb93a380710c32cc212b937ea38db5ceacc (diff)
refactor: move cdp.rs to tools/repl (#16821)
-rw-r--r--cli/main.rs1
-rw-r--r--cli/text_encoding.rs7
-rw-r--r--cli/tools/repl/cdp.rs (renamed from cli/cdp.rs)0
-rw-r--r--cli/tools/repl/editor.rs2
-rw-r--r--cli/tools/repl/mod.rs1
-rw-r--r--cli/tools/repl/session.rs3
6 files changed, 7 insertions, 7 deletions
diff --git a/cli/main.rs b/cli/main.rs
index 2fb595b79..e42c6325e 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -3,7 +3,6 @@
mod args;
mod auth_tokens;
mod cache;
-mod cdp;
mod checksum;
mod deno_dir;
mod deno_std;
diff --git a/cli/text_encoding.rs b/cli/text_encoding.rs
index 2bb45beb0..c16a1289d 100644
--- a/cli/text_encoding.rs
+++ b/cli/text_encoding.rs
@@ -1,10 +1,9 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
use encoding_rs::*;
-use std::{
- borrow::Cow,
- io::{Error, ErrorKind},
-};
+use std::borrow::Cow;
+use std::io::Error;
+use std::io::ErrorKind;
pub const BOM_CHAR: char = '\u{FEFF}';
diff --git a/cli/cdp.rs b/cli/tools/repl/cdp.rs
index de2d784f7..de2d784f7 100644
--- a/cli/cdp.rs
+++ b/cli/tools/repl/cdp.rs
diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs
index 73196d3f3..2ff9ee0b4 100644
--- a/cli/tools/repl/editor.rs
+++ b/cli/tools/repl/editor.rs
@@ -1,6 +1,5 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
-use crate::cdp;
use crate::colors;
use deno_ast::swc::parser::error::SyntaxError;
use deno_ast::swc::parser::token::Token;
@@ -32,6 +31,7 @@ use std::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering::Relaxed;
use std::sync::Arc;
+use super::cdp;
use super::channel::RustylineSyncMessageSender;
// Provides helpers to the editor like validation for multi-line edits, completion candidates for
diff --git a/cli/tools/repl/mod.rs b/cli/tools/repl/mod.rs
index e37591583..597b3ff5f 100644
--- a/cli/tools/repl/mod.rs
+++ b/cli/tools/repl/mod.rs
@@ -6,6 +6,7 @@ use deno_runtime::permissions::Permissions;
use deno_runtime::worker::MainWorker;
use rustyline::error::ReadlineError;
+mod cdp;
mod channel;
mod editor;
mod session;
diff --git a/cli/tools/repl/session.rs b/cli/tools/repl/session.rs
index f2cdfe568..e3bdac3b2 100644
--- a/cli/tools/repl/session.rs
+++ b/cli/tools/repl/session.rs
@@ -1,6 +1,5 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
-use crate::cdp;
use crate::colors;
use crate::lsp::ReplLanguageServer;
use deno_ast::DiagnosticsError;
@@ -12,6 +11,8 @@ use deno_core::serde_json::Value;
use deno_core::LocalInspectorSession;
use deno_runtime::worker::MainWorker;
+use super::cdp;
+
static PRELUDE: &str = r#"
Object.defineProperty(globalThis, "_", {
configurable: true,