summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-09-03 09:15:26 +0100
committerGitHub <noreply@github.com>2024-09-03 08:15:26 +0000
commite49d80e500c384b381c375900060e5a476581541 (patch)
tree032064a7ac1a8580e089d4bf67aef4076196e52c /cli
parent5f08d634f73fab21c17cc02f3f3bf8e8b531eee8 (diff)
chore: cleanup code for deprecation notices in JS code (#25368)
This code hasn't been used in some time, so I cleaned as much of it as possible.
Diffstat (limited to 'cli')
-rw-r--r--cli/args/mod.rs11
-rw-r--r--cli/factory.rs4
-rw-r--r--cli/standalone/binary.rs3
-rw-r--r--cli/standalone/mod.rs3
-rw-r--r--cli/worker.rs14
5 files changed, 0 insertions, 35 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index 9be115d5c..a7e75745a 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -780,8 +780,6 @@ pub struct CliOptions {
maybe_lockfile: Option<Arc<CliLockfile>>,
overrides: CliOptionOverrides,
pub start_dir: Arc<WorkspaceDirectory>,
- pub disable_deprecated_api_warning: bool,
- pub verbose_deprecated_api_warning: bool,
pub deno_dir_provider: Arc<DenoDirProvider>,
}
@@ -824,13 +822,6 @@ impl CliOptions {
load_env_variables_from_env_file(flags.env_file.as_ref());
- let disable_deprecated_api_warning = flags.log_level
- == Some(log::Level::Error)
- || std::env::var("DENO_NO_DEPRECATION_WARNINGS").ok().is_some();
-
- let verbose_deprecated_api_warning =
- std::env::var("DENO_VERBOSE_WARNINGS").ok().is_some();
-
Ok(Self {
flags,
initial_cwd,
@@ -839,8 +830,6 @@ impl CliOptions {
maybe_node_modules_folder,
overrides: Default::default(),
start_dir,
- disable_deprecated_api_warning,
- verbose_deprecated_api_warning,
deno_dir_provider,
})
}
diff --git a/cli/factory.rs b/cli/factory.rs
index 42850f2cb..d1ccac6ce 100644
--- a/cli/factory.rs
+++ b/cli/factory.rs
@@ -866,10 +866,6 @@ impl CliFactory {
node_ipc: cli_options.node_ipc_fd(),
serve_port: cli_options.serve_port(),
serve_host: cli_options.serve_host(),
- // TODO(bartlomieju): temporarily disabled
- disable_deprecated_api_warning: true,
- verbose_deprecated_api_warning: cli_options
- .verbose_deprecated_api_warning,
})
}
}
diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs
index 9d2c0781a..45d9b7c63 100644
--- a/cli/standalone/binary.rs
+++ b/cli/standalone/binary.rs
@@ -117,7 +117,6 @@ pub struct Metadata {
pub workspace_resolver: SerializedWorkspaceResolver,
pub entrypoint_key: String,
pub node_modules: Option<NodeModules>,
- pub disable_deprecated_api_warning: bool,
pub unstable_config: UnstableConfig,
}
@@ -624,8 +623,6 @@ impl<'a> DenoCompileBinaryWriter<'a> {
pkg_json_resolution: self.workspace_resolver.pkg_json_dep_resolution(),
},
node_modules,
- disable_deprecated_api_warning: cli_options
- .disable_deprecated_api_warning,
unstable_config: UnstableConfig {
legacy_flag_enabled: cli_options.legacy_unstable_flag(),
bare_node_builtins: cli_options.unstable_bare_node_builtins(),
diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs
index 4c199a7d5..a0a312ad9 100644
--- a/cli/standalone/mod.rs
+++ b/cli/standalone/mod.rs
@@ -737,9 +737,6 @@ pub async fn run(
node_ipc: None,
serve_port: None,
serve_host: None,
- // TODO(bartlomieju): temporarily disabled
- disable_deprecated_api_warning: true,
- verbose_deprecated_api_warning: false,
},
);
diff --git a/cli/worker.rs b/cli/worker.rs
index f3ff1141a..7000fd204 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -119,8 +119,6 @@ pub struct CliMainWorkerOptions {
pub node_ipc: Option<i64>,
pub serve_port: Option<u16>,
pub serve_host: Option<String>,
- pub disable_deprecated_api_warning: bool,
- pub verbose_deprecated_api_warning: bool,
}
struct SharedWorkerState {
@@ -593,12 +591,6 @@ impl CliMainWorkerFactory {
argv0: shared.options.argv0.clone(),
node_debug: shared.options.node_debug.clone(),
node_ipc_fd: shared.options.node_ipc,
- disable_deprecated_api_warning: shared
- .options
- .disable_deprecated_api_warning,
- verbose_deprecated_api_warning: shared
- .options
- .verbose_deprecated_api_warning,
future: shared.enable_future_features,
mode,
serve_port: shared.options.serve_port,
@@ -795,12 +787,6 @@ fn create_web_worker_callback(
argv0: shared.options.argv0.clone(),
node_debug: shared.options.node_debug.clone(),
node_ipc_fd: None,
- disable_deprecated_api_warning: shared
- .options
- .disable_deprecated_api_warning,
- verbose_deprecated_api_warning: shared
- .options
- .verbose_deprecated_api_warning,
future: shared.enable_future_features,
mode: WorkerExecutionMode::Worker,
serve_port: shared.options.serve_port,