Skip to content

Remove vault folder from wasm-internal #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 28, 2025
Merged

Remove vault folder from wasm-internal #294

merged 5 commits into from
May 28, 2025

Conversation

Hinton
Copy link
Member

@Hinton Hinton commented May 26, 2025

🎟️ Tracking

📔 Objective

Removes the vault folder from wasm-internal and relies on the upstream implementations instead. Note this adds wasm_bindgen to everything that should be exposed which is a bit clunky.

⏰ 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

  • 👍 (:+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

@Hinton Hinton requested a review from a team as a code owner May 26, 2025 16:21
@Hinton Hinton requested a review from addisonbeck May 26, 2025 16:21
pub fn generate_totp_wasm(
&self,
key: String,
time_ms: Option<f64>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DateTimes 😢

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're having a separate WASM function to deal with the parameters, we could use js_sys::Date or js_sys::Number here and then convert, that'll probably be a breaking change for the current SDK API though, so maybe later.

@Hinton Hinton requested review from dani-garcia and coroiu and removed request for addisonbeck May 26, 2025 16:23
Copy link
Contributor

github-actions bot commented May 26, 2025

Logo
Checkmarx One – Scan Summary & Details7792923a-77db-4f85-ae11-48deb2138f2f

Great job, no security vulnerabilities found in this Pull Request

Copy link

codecov bot commented May 26, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 27 lines in your changes missing coverage. Please review.

Project coverage is 70.28%. Comparing base (3d2e4b5) to head (3dba619).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/bitwarden-vault/src/vault_client.rs 33.33% 10 Missing ⚠️
crates/bitwarden-vault/src/totp_client.rs 0.00% 9 Missing ⚠️
crates/bitwarden-uniffi/src/vault/mod.rs 0.00% 6 Missing ⚠️
...es/bitwarden-vault/src/cipher/attachment_client.rs 92.85% 1 Missing ⚠️
crates/bitwarden-wasm-internal/src/client.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #294      +/-   ##
==========================================
+ Coverage   70.20%   70.28%   +0.07%     
==========================================
  Files         220      217       -3     
  Lines       17009    16990      -19     
==========================================
  Hits        11942    11942              
+ Misses       5067     5048      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coroiu coroiu requested a review from gbubemismith May 27, 2025 06:57
dani-garcia
dani-garcia previously approved these changes May 27, 2025
pub fn generate_totp_wasm(
&self,
key: String,
time_ms: Option<f64>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're having a separate WASM function to deal with the parameters, we could use js_sys::Date or js_sys::Number here and then convert, that'll probably be a breaking change for the current SDK API though, so maybe later.

gbubemismith
gbubemismith previously approved these changes May 27, 2025
Copy link
Contributor

@gbubemismith gbubemismith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this change

Hinton added a commit that referenced this pull request May 27, 2025
## 🎟️ Tracking

<!-- Paste the link to the Jira or GitHub issue or otherwise describe /
point to where this change is coming from. -->

## 📔 Objective

<!-- Describe what the purpose of this PR is, for example what bug
you're fixing or new feature you're adding. -->

Per request in #294 we want to avoid having multiple impl of
VaultClient.

## ⏰ 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
@Hinton Hinton dismissed stale reviews from gbubemismith and dani-garcia via 58ce5e7 May 27, 2025 17:17
gbubemismith
gbubemismith previously approved these changes May 27, 2025
Copy link

@Hinton Hinton merged commit 3425208 into main May 28, 2025
43 checks passed
@Hinton Hinton deleted the arch/remove-wasm-vault branch May 28, 2025 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants