Skip to content

Commit

Permalink
feat(storage): Add sessionExtStorage (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 authored Nov 2, 2023
1 parent 03b2c99 commit 49ebe5a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"@types/webextension-polyfill": "^0.9.1",
"@types/webextension-polyfill": "^0.10.5",
"@vitest/coverage-c8": "^0.24.5",
"tsup": "^6.4.0",
"typescript": "^4.8.4",
Expand Down
8 changes: 8 additions & 0 deletions packages/storage/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ export { defineExtensionStorage };
* An implementation of `ExtensionStorage` based on the `browser.storage.local` storage area.
*/
export const localExtStorage = defineExtensionStorage(Browser.storage.local);
/**
* An implementation of `ExtensionStorage` based on the `browser.storage.local` storage area.
*
* - Added to Chrome 102 as of May 24th, 2022.
* - Added to Safari 16.4 as of March 27th, 2023.
* - Added to Firefox 115 as of July 4th, 2023.
*/
export const sessionExtStorage = defineExtensionStorage(Browser.storage.session);
/**
* An implementation of `ExtensionStorage` based on the `browser.storage.sync` storage area.
*/
Expand Down
13 changes: 11 additions & 2 deletions pnpm-lock.yaml

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

0 comments on commit 49ebe5a

Please sign in to comment.