Skip to content

Commit

Permalink
fix(cli): Fix npm package name in tauri add (tauri-apps#12354)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored Jan 11, 2025
1 parent f8e50e8 commit cad5504
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/cli-add-pkgname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
tauri-cli: 'patch:bug'
'@tauri-apps/cli': 'patch:bug'
---

Fixed and issue that caused `tauri add` to try to install incorrect npm packages.
2 changes: 1 addition & 1 deletion crates/tauri-cli/src/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub fn run(options: Options) -> Result<()> {
let plugin_snake_case = plugin.replace('-', "_");
let crate_name = format!("tauri-plugin-{plugin}");
let npm_name = if is_known {
format!("tauri-apps/plugin-{plugin}")
format!("@tauri-apps/plugin-{plugin}")
} else {
format!("tauri-plugin-{plugin}-api")
};
Expand Down

0 comments on commit cad5504

Please sign in to comment.