Skip to content

Commit

Permalink
Merge branch 'feature/PB-33321_Fix-local-storage-loading-on-extension…
Browse files Browse the repository at this point in the history
…-update' into 'release'

PB-33321 Fix local storage loading on extension update

See merge request passbolt/passbolt-browser-extension!862
  • Loading branch information
Benj1er committed May 10, 2024
2 parents a8a9048 + 0cf4895 commit e1d8f2f
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 15 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
## [4.7.7] - 2024-05-10
### Maintenance
- PB-33321 Fix local storage loading on extension update

## [4.7.6] - 2024-05-08
### Maintenance
- PB-33307 Add debug to capture onInstall reason details
Expand Down Expand Up @@ -1607,8 +1611,9 @@ self registration settings option in the left-side bar
- AP: User with plugin installed
- LU: Logged in user

[Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.6...HEAD
[4.7.6]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.6...v4.7.5
[Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.7...HEAD
[4.7.7]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.6...v4.7.7
[4.7.6]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.5...v4.7.6
[4.7.5]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.4...v4.7.5
[4.7.4]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.3...v4.7.4
[4.7.3]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.7.1...v4.7.3
Expand Down
6 changes: 3 additions & 3 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Song: https://youtu.be/J87pJrxvJ5E?si=vGs8M6uyM6E7Lcps

Passbolt v4.7.6 is a test release focused on addressing update issues discovered while transitioning from MV2 to MV3.
Passbolt v4.7.7 is a test release focused on addressing update issues discovered while transitioning from MV2 to MV3.

## [4.7.6] - 2024-05-08
## [4.7.7] - 2024-05-10
### Maintenance
- PB-33307 Add debug to capture onInstall reason details
- PB-33321 Fix local storage loading on extension update
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "passbolt-browser-extension",
"version": "4.7.6-rc.0",
"version": "4.7.7-rc.0",
"license": "AGPL-3.0",
"copyright": "Copyright 2022 Passbolt SA",
"description": "Passbolt web extension for the open source password manager for teams",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import CheckAuthStatusService from "../../service/auth/checkAuthStatusService";
import User from "../../model/user";
import Log from "../../model/log";
import {BrowserExtensionIconService} from "../../service/ui/browserExtensionIcon.service";
import storage from "../../sdk/storage";
import {Config} from "../../model/config";

class OnExtensionInstalledController {
/**
Expand All @@ -29,9 +31,13 @@ class OnExtensionInstalledController {
* @returns {Promise<void>}
*/
static async exec(details) {
console.debug(`The install reason is: ${details.reason}`);
console.debug(`The previous version is: ${details.previousVersion}`);
console.debug(`The shared_module_update id is: ${details.id}`);
// Check if the storage have some data
if (Object.keys(storage._data).length === 0) {
// Fix the initialization of the storage after an update
await storage.init();
// Initialization of the config to get the user information
Config.init();
}
switch (details.reason) {
case browser.runtime.OnInstalledReason.INSTALL:
await OnExtensionInstalledController.onInstall();
Expand Down
1 change: 1 addition & 0 deletions src/all/background_page/sdk/storage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**
* @deprecated
* Local Storage Wrapper Class
* Ref. PASSBOLT-1725
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import toolbarService from "../toolbar/toolbarService";

class SystemRequirementService {
/**
* @deprecated
* Initialize all requirement for proper operation
* @return {Promise<void>}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/chrome-mv3/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_appName__",
"short_name": "passbolt",
"version": "4.7.6",
"version": "4.7.7",
"description": "__MSG_appDescription__",
"default_locale": "en",
"externally_connectable": {
Expand Down
2 changes: 1 addition & 1 deletion src/chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_appName__",
"short_name": "passbolt",
"version": "4.7.6",
"version": "4.7.7",
"description": "__MSG_appDescription__",
"default_locale": "en",
"externally_connectable": {},
Expand Down
2 changes: 1 addition & 1 deletion src/firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_appName__",
"short_name": "passbolt",
"version": "4.7.6",
"version": "4.7.7",
"description": "__MSG_appDescription__",
"default_locale": "en",
"browser_specific_settings": {
Expand Down
2 changes: 1 addition & 1 deletion src/safari/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_appName__",
"short_name": "passbolt",
"version": "4.7.6",
"version": "4.7.7",
"description": "__MSG_appDescription__",
"default_locale": "en",
"externally_connectable": {},
Expand Down

0 comments on commit e1d8f2f

Please sign in to comment.