Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Fixes for format change of 1pux files #714

Merged
merged 3 commits into from
Mar 8, 2022
Merged

Fixes for format change of 1pux files #714

merged 3 commits into from
Mar 8, 2022

Conversation

djsmith85
Copy link
Contributor

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

It seems that 1password has changed the structure of their 1pux file format, since I wrote the importer with the file I received.

//Before:
items: [
  {
     item: {
     }
  }
]
//Current
items: [
  {
  }
]

This will need to be 🍒 ⛏️ to rc

Asana task: https://app.asana.com/0/1200578627114106/1201633451894388/f

Code changes

  • common/src/importers/onepasswordImporters/types/onepassword1PuxImporterTypes.ts:
    • Removed the ItemCollection type and use Item[] instead
    • Made item.trashed and optional property
  • common/src/importers/onepasswordImporters/onepassword1PuxImporter.ts:
    • Removed the import of the no longer needed ItemCollection
    • Fixed the type used in the vaults.items.forEach
  • spec/common/importers/testData/onePassword1Pux/*.ts: Removed the unneeded named object item from the items[]

Before you submit

  • I have checked for linting errors (npm run lint) (required)
  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

@djsmith85 djsmith85 requested a review from a team March 8, 2022 10:40
djsmith85 added a commit to bitwarden/web that referenced this pull request Mar 8, 2022
@djsmith85 djsmith85 merged commit 7446495 into master Mar 8, 2022
@djsmith85 djsmith85 deleted the fixes-for-1pux branch March 8, 2022 12:42
djsmith85 added a commit that referenced this pull request Mar 8, 2022
* Remove unneeded ItemCollection type

* Mark item.trashed as optional property

* Adjust format of test files to be identical to current exports

(cherry picked from commit 7446495)
djsmith85 added a commit to bitwarden/web that referenced this pull request Mar 8, 2022
djsmith85 added a commit to bitwarden/web that referenced this pull request Mar 8, 2022
(cherry picked from commit 80ffa96)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants