@theholocron/storage-utils 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +5 -4
package/dist/index.mjs CHANGED
@@ -38,7 +38,6 @@ function createStorage(namespace = "theholocron") {
38
38
  },
39
39
  getFrom(key) {
40
40
  if (!lastRegisteredApp) throw new Error(ERROR_MSG);
41
- const appStorage = getAppStorage(lastRegisteredApp);
42
41
  if (isSessionStorageAvailable) try {
43
42
  const storedData = sessionStorage.getItem(prefixedNamespace);
44
43
  if (storedData) {
@@ -48,6 +47,7 @@ function createStorage(namespace = "theholocron") {
48
47
  } catch (error) {
49
48
  console.error("Failed to read data in sessionStorage", error);
50
49
  }
50
+ const appStorage = getAppStorage(lastRegisteredApp);
51
51
  const keys = key.split(".");
52
52
  let currentLevel = appStorage;
53
53
  for (let i = 0; i < keys.length; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/storage-utils",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Storage utilities.",
5
5
  "homepage": "https://github.com/theholocron/utils/tree/main/packages/utils-storage#readme",
6
6
  "bugs": "https://github.com/theholocron/utils/issues",
@@ -22,11 +22,12 @@
22
22
  "README.md"
23
23
  ],
24
24
  "devDependencies": {
25
- "@theholocron/tsdown-config": "^7.5.0",
26
- "@theholocron/vitest-config": "^7.5.0",
25
+ "@theholocron/tsdown-config": "^7.6.1",
26
+ "@theholocron/vitest-config": "^7.6.1",
27
27
  "@tsconfig/node-lts": "^24.0.0",
28
28
  "@vitest/coverage-v8": "^4.1.10",
29
- "tsdown": "^0.22.13",
29
+ "happy-dom": "^20.11.1",
30
+ "tsdown": "^0.22.14",
30
31
  "vitest": "^4.1.10",
31
32
  "vitest-localstorage-mock": "^0.1.2"
32
33
  },