[PR #4446] [MERGED] chore(agent): major version dependency bump #4804

Closed
opened 2026-03-17 02:18:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4446
Author: @CuriousCorrelation
Created: 10/17/2024
Status: Merged
Merged: 10/23/2024
Merged by: @AndrewBastin

Base: nextHead: agent/deps/bump/consolidated


📝 Commits (1)

  • ab00b2c chore: major version dependency bump

📊 Changes

8 files changed (+856 additions, -946 deletions)

View changed files

📝 packages/hoppscotch-agent/devenv.nix (+2 -0)
📝 packages/hoppscotch-agent/package.json (+9 -9)
📝 packages/hoppscotch-agent/src-tauri/Cargo.lock (+422 -415)
📝 packages/hoppscotch-agent/src-tauri/Cargo.toml (+12 -12)
📝 packages/hoppscotch-agent/src-tauri/src/error.rs (+2 -0)
📝 packages/hoppscotch-agent/src-tauri/src/state.rs (+55 -65)
📝 packages/hoppscotch-agent/src-tauri/src/updater.rs (+33 -28)
📝 pnpm-lock.yaml (+321 -417)

📄 Description

This is a consolidated dependency bump PR for agent.

Closes HFE-614, HFE-620, HFE-621

tauri-plugin-store

Summary

Updating tauri-plugin-store in Hoppscotch Agent.

Package Updated

Package Old Version New Version
tauri-plugin-store 2.0.0-rc.3 2.0.1

Changes

  1. Updated tauri-plugin-store dependency in Cargo.toml
  2. Modified state.rs to use new API for store operations
  3. Updated error handling in error.rs
  4. Refactored store initialization and usage in state.rs

Code Changes

Cargo.toml

- tauri-plugin-store = "2.0.0-rc.3"
+ tauri-plugin-store = "2.0.1"

src/error.rs

+ #[error("Store error: {0}")]
+ TauriPluginStore(#[from] tauri_plugin_store::Error),

src/state.rs

- let mut store = StoreBuilder::new("app_data.bin").build(app_handle);
+ let store = StoreBuilder::new(&app_handle, "app_data.bin").build();

- let _ = store.load();
+ let _ = store.load()?;

- store.delete("registrations").map_err(|_| AppError::RegistrationClearError)?;
+ let _ = store
+     .delete("registrations")
+     .then_some(())
+     .ok_or(AppError::RegistrationClearError)?;

- store.insert("registrations".into(), serde_json::to_value(self.registrations.clone()).unwrap())
-     .map_err(|_| AppError::RegistrationInsertError)?;
+ let _ = store.set(
+     "registrations",
+     serde_json::to_value(self.registrations.clone()).unwrap(),
+ );

Breaking Changes

  • Changed StoreBuilder::new() to take a reference to app_handle
  • Replaced store.insert() with store.set()
  • Updated error handling for store operations

Additional Updates

  • Better error handling with TauriPluginStore error variant
  • Refactored store initialization and usage for error propagation.

Status

Post dep bump registration

agent-post-store-dep-bump-registration

Prompt

agent-post-store-dep-bump-otp

Success

agent-post-store-dep-bump-otp-success

Context Menu

agent-post-store-dep-bump-registration-clear-context-menu

Post Clear

agent-post-store-dep-bump-after-registration-clear

tauri-plugin-dialog

Updating tauri-plugin-dialog in Hoppscotch Agent.

Changes

  1. Updated tauri-plugin-dialog dependency in Cargo.toml
  2. Modified updater.rs to use new API for dialog buttons

Code Changes

Cargo.toml

- tauri-plugin-dialog = "2.0.0-rc.7"
+ tauri-plugin-dialog = "2.0.1"

src/updater.rs

- use tauri_plugin_dialog::MessageDialogKind;
- use tauri_plugin_dialog::DialogExt;
+ use tauri_plugin_dialog::DialogExt;
+ use tauri_plugin_dialog::MessageDialogButtons;
+ use tauri_plugin_dialog::MessageDialogKind;

// ...

- .ok_button_label("Update")
- .cancel_button_label("Cancel")
+ .buttons(MessageDialogButtons::OkCancelCustom(
+     "Update".to_string(),
+     "Cancel".to_string(),
+ ))

Breaking Changes

  • Replaced MessageDialogBuilder::ok_button_label and MessageDialogBuilder::cancel_button_label with MessageDialogBuilder::buttons which now takes an enum

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4446 **Author:** [@CuriousCorrelation](https://github.com/CuriousCorrelation) **Created:** 10/17/2024 **Status:** ✅ Merged **Merged:** 10/23/2024 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `next` ← **Head:** `agent/deps/bump/consolidated` --- ### 📝 Commits (1) - [`ab00b2c`](https://github.com/hoppscotch/hoppscotch/commit/ab00b2cd3dbf2ec64e430f0f5d3fa7c9d434192c) chore: major version dependency bump ### 📊 Changes **8 files changed** (+856 additions, -946 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-agent/devenv.nix` (+2 -0) 📝 `packages/hoppscotch-agent/package.json` (+9 -9) 📝 `packages/hoppscotch-agent/src-tauri/Cargo.lock` (+422 -415) 📝 `packages/hoppscotch-agent/src-tauri/Cargo.toml` (+12 -12) 📝 `packages/hoppscotch-agent/src-tauri/src/error.rs` (+2 -0) 📝 `packages/hoppscotch-agent/src-tauri/src/state.rs` (+55 -65) 📝 `packages/hoppscotch-agent/src-tauri/src/updater.rs` (+33 -28) 📝 `pnpm-lock.yaml` (+321 -417) </details> ### 📄 Description This is a consolidated dependency bump PR for agent. Closes HFE-614, HFE-620, HFE-621 ## `tauri-plugin-store` ### Summary Updating `tauri-plugin-store` in Hoppscotch Agent. ### Package Updated | Package | Old Version | New Version | |---------|-------------|-------------| | tauri-plugin-store | 2.0.0-rc.3 | 2.0.1 | ### Changes 1. Updated `tauri-plugin-store` dependency in `Cargo.toml` 2. Modified `state.rs` to use new API for store operations 3. Updated error handling in `error.rs` 4. Refactored store initialization and usage in `state.rs` ### Code Changes #### Cargo.toml ```toml - tauri-plugin-store = "2.0.0-rc.3" + tauri-plugin-store = "2.0.1" ``` #### src/error.rs ```rust + #[error("Store error: {0}")] + TauriPluginStore(#[from] tauri_plugin_store::Error), ``` #### src/state.rs ```rust - let mut store = StoreBuilder::new("app_data.bin").build(app_handle); + let store = StoreBuilder::new(&app_handle, "app_data.bin").build(); - let _ = store.load(); + let _ = store.load()?; - store.delete("registrations").map_err(|_| AppError::RegistrationClearError)?; + let _ = store + .delete("registrations") + .then_some(()) + .ok_or(AppError::RegistrationClearError)?; - store.insert("registrations".into(), serde_json::to_value(self.registrations.clone()).unwrap()) - .map_err(|_| AppError::RegistrationInsertError)?; + let _ = store.set( + "registrations", + serde_json::to_value(self.registrations.clone()).unwrap(), + ); ``` ### Breaking Changes - Changed `StoreBuilder::new()` to take a reference to `app_handle` - Replaced `store.insert()` with `store.set()` - Updated error handling for store operations ### Additional Updates - Better error handling with `TauriPluginStore` error variant - Refactored store initialization and usage for error propagation. ### Status #### Post dep bump registration ![agent-post-store-dep-bump-registration](https://github.com/user-attachments/assets/33274c74-4a1e-499e-9a3e-ae4f45277b2a) #### Prompt ![agent-post-store-dep-bump-otp](https://github.com/user-attachments/assets/c1227be6-badf-4608-892e-8f8104dec6b9) #### Success ![agent-post-store-dep-bump-otp-success](https://github.com/user-attachments/assets/6b568d33-76f4-4271-b3f4-20b929a096a3) #### Context Menu ![agent-post-store-dep-bump-registration-clear-context-menu](https://github.com/user-attachments/assets/372845e9-6d0a-4552-ae4f-b2bd523e891b) #### Post Clear ![agent-post-store-dep-bump-after-registration-clear](https://github.com/user-attachments/assets/1d442070-a8a9-4150-a196-b4ba6e0bdca1) ## `tauri-plugin-dialog` Updating `tauri-plugin-dialog` in Hoppscotch Agent. ### Changes 1. Updated `tauri-plugin-dialog` dependency in `Cargo.toml` 2. Modified `updater.rs` to use new API for dialog buttons ### Code Changes #### Cargo.toml ```toml - tauri-plugin-dialog = "2.0.0-rc.7" + tauri-plugin-dialog = "2.0.1" ``` #### src/updater.rs ```rust - use tauri_plugin_dialog::MessageDialogKind; - use tauri_plugin_dialog::DialogExt; + use tauri_plugin_dialog::DialogExt; + use tauri_plugin_dialog::MessageDialogButtons; + use tauri_plugin_dialog::MessageDialogKind; // ... - .ok_button_label("Update") - .cancel_button_label("Cancel") + .buttons(MessageDialogButtons::OkCancelCustom( + "Update".to_string(), + "Cancel".to_string(), + )) ``` ### Breaking Changes - Replaced `MessageDialogBuilder::ok_button_label` and `MessageDialogBuilder::cancel_button_label` with `MessageDialogBuilder::buttons` which now takes an enum --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:18:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4804
No description provided.