Эх сурвалжийг харах

refactor(core): rename `command` feature to `process-command-api` (#3594)

Lucas Fernandes Nogueira 3 жил өмнө
parent
commit
4e1af005a1

+ 5 - 0
.changes/refactor-command-feature.md

@@ -0,0 +1,5 @@
+---
+"tauri": patch
+---
+
+**Breaking change:** Renamed the `command` Cargo feature to `process-command-api`.

+ 3 - 3
core/tauri/Cargo.toml

@@ -129,7 +129,7 @@ http-api = [ "attohttpc" ]
 shell-open-api = [ "open", "regex", "tauri-macros/shell-scope" ]
 fs-extract-api = [ "zip" ]
 reqwest-client = [ "reqwest", "bytes" ]
-command = [ "shared_child", "os_pipe", "memchr" ]
+process-command-api = [ "shared_child", "os_pipe", "memchr" ]
 dialog = [ "rfd" ]
 notification = [ "notify-rust" ]
 cli = [ "clap" ]
@@ -195,8 +195,8 @@ process-relaunch-dangerous-allow-symlink-macos = [ "tauri-utils/process-relaunch
 protocol-all = [ "protocol-asset" ]
 protocol-asset = [ ]
 shell-all = [ "shell-execute", "shell-sidecar", "shell-open" ]
-shell-execute = [ "command", "regex", "tauri-macros/shell-scope" ]
-shell-sidecar = [ "command", "regex", "tauri-macros/shell-scope" ]
+shell-execute = [ "process-command-api", "regex", "tauri-macros/shell-scope" ]
+shell-sidecar = [ "process-command-api", "regex", "tauri-macros/shell-scope" ]
 shell-open = [ "shell-open-api" ]
 window-all = [
   "window-create",

+ 4 - 4
core/tauri/src/api/process.rs

@@ -8,11 +8,11 @@ use crate::Env;
 
 use std::path::PathBuf;
 
-#[cfg(feature = "command")]
-#[cfg_attr(doc_cfg, doc(cfg(feature = "command")))]
+#[cfg(feature = "process-command-api")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "process-command-api")))]
 mod command;
-#[cfg(feature = "command")]
-#[cfg_attr(doc_cfg, doc(cfg(feature = "command")))]
+#[cfg(feature = "process-command-api")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "process-command-api")))]
 pub use command::*;
 
 /// Finds the current running binary's path.