Skip to content

Commit 91f6fe5

Browse files
authored
[PM-21902] Migrate back to tsify (#284)
## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-21902 ## 📔 Objective Migrate back to tsify from tsify-next now that the original is back to being maintained and all the changes have been backported. ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
1 parent 18041b7 commit 91f6fe5

File tree

46 files changed

+79
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+79
-79
lines changed

Cargo.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ serde_repr = ">=0.1.12, <0.2"
6363
syn = ">=2.0.87, <3"
6464
thiserror = ">=1.0.40, <3"
6565
tokio = { version = "1.36.0", features = ["macros"] }
66-
tsify-next = { version = ">=0.5.4, <0.6", features = [
66+
tsify = { version = ">=0.5.5, <0.6", features = [
6767
"js",
6868
], default-features = false }
6969
uniffi = "=0.29.1"

crates/bitwarden-core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ wasm = [
2525
"bitwarden-error/wasm",
2626
"dep:wasm-bindgen",
2727
"dep:wasm-bindgen-futures",
28-
"dep:tsify-next"
28+
"dep:tsify"
2929
] # WASM support
3030

3131
[dependencies]
@@ -49,7 +49,7 @@ serde_json = { workspace = true }
4949
serde_qs = { workspace = true }
5050
serde_repr = { workspace = true }
5151
thiserror = { workspace = true }
52-
tsify-next = { workspace = true, optional = true }
52+
tsify = { workspace = true, optional = true }
5353
uniffi = { workspace = true, optional = true, features = ["tokio"] }
5454
uuid = { workspace = true }
5555
wasm-bindgen = { workspace = true, optional = true }

crates/bitwarden-core/src/client/client_settings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use serde::{Deserialize, Serialize};
2121
#[cfg_attr(feature = "uniffi", derive(uniffi::Record))]
2222
#[cfg_attr(
2323
feature = "wasm",
24-
derive(tsify_next::Tsify),
24+
derive(tsify::Tsify),
2525
tsify(into_wasm_abi, from_wasm_abi)
2626
)]
2727
pub struct ClientSettings {
@@ -51,7 +51,7 @@ impl Default for ClientSettings {
5151
#[cfg_attr(feature = "uniffi", derive(uniffi::Enum))]
5252
#[cfg_attr(
5353
feature = "wasm",
54-
derive(tsify_next::Tsify),
54+
derive(tsify::Tsify),
5555
tsify(into_wasm_abi, from_wasm_abi)
5656
)]
5757
pub enum DeviceType {

crates/bitwarden-core/src/key_management/crypto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use bitwarden_error::bitwarden_error;
1717
use schemars::JsonSchema;
1818
use serde::{Deserialize, Serialize};
1919
#[cfg(feature = "wasm")]
20-
use {tsify_next::Tsify, wasm_bindgen::prelude::*};
20+
use {tsify::Tsify, wasm_bindgen::prelude::*};
2121

2222
use crate::{
2323
client::{encryption_settings::EncryptionSettingsError, LoginMethod, UserLoginMethod},

crates/bitwarden-crypto/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ keywords.workspace = true
1616

1717
[features]
1818
default = []
19-
wasm = ["dep:tsify-next", "dep:wasm-bindgen"] # WASM support
19+
wasm = ["dep:tsify", "dep:wasm-bindgen"] # WASM support
2020

2121
uniffi = ["dep:uniffi"] # Uniffi bindings
2222
no-memory-hardening = [] # Disable memory hardening features
@@ -52,7 +52,7 @@ sha1 = ">=0.10.5, <0.11"
5252
sha2 = ">=0.10.6, <0.11"
5353
subtle = ">=2.5.0, <3.0"
5454
thiserror = { workspace = true }
55-
tsify-next = { workspace = true, optional = true }
55+
tsify = { workspace = true, optional = true }
5656
typenum = ">=1.18.0, <1.19.0"
5757
uniffi = { workspace = true, optional = true }
5858
uuid = { workspace = true }

crates/bitwarden-crypto/src/keys/kdf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use schemars::JsonSchema;
55
use serde::{Deserialize, Serialize};
66
use sha2::Digest;
77
#[cfg(feature = "wasm")]
8-
use tsify_next::Tsify;
8+
use tsify::Tsify;
99
use typenum::U32;
1010
use zeroize::Zeroize;
1111

crates/bitwarden-crypto/src/signing/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub use message::SerializedMessage;
4444
use schemars::JsonSchema;
4545
use serde::{Deserialize, Serialize};
4646
#[cfg(feature = "wasm")]
47-
use {tsify_next::Tsify, wasm_bindgen::prelude::*};
47+
use {tsify::Tsify, wasm_bindgen::prelude::*};
4848

4949
/// The type of key / signature scheme used for signing and verifying.
5050
#[derive(Serialize, Deserialize, Debug, JsonSchema, PartialEq)]

crates/bitwarden-error-macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ bitwarden-error = { workspace = true, features = ["wasm"] }
3434
js-sys.workspace = true
3535
serde.workspace = true
3636
thiserror.workspace = true
37-
tsify-next.workspace = true
37+
tsify.workspace = true
3838
wasm-bindgen.workspace = true

crates/bitwarden-error-macro/src/full/attribute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub(crate) fn bitwarden_error_full(
1414

1515
let wasm_attributes = cfg!(feature = "wasm").then(|| {
1616
quote! {
17-
#[derive(bitwarden_error::tsify_next::Tsify)]
17+
#[derive(bitwarden_error::tsify::Tsify)]
1818
#[tsify(into_wasm_abi)]
1919
}
2020
});

0 commit comments

Comments
 (0)