valdres 0.2.0-alpha.51 → 0.2.0-alpha.52

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.
package/dist/index.js CHANGED
@@ -694,7 +694,8 @@ var transaction = (callback, data, autoCommit = true) => {
694
694
  } else {
695
695
  throw new Error(`Scope '${scopeId}' not found. Registered scopes: ${Object.keys(data.scopes).join(", ")}`);
696
696
  }
697
- }
697
+ },
698
+ data
698
699
  });
699
700
  if (autoCommit)
700
701
  commit();
@@ -769,7 +770,7 @@ var store = (id) => {
769
770
  return storeFromStoreData(data);
770
771
  };
771
772
  // package.json
772
- var version = "0.2.0-alpha.50";
773
+ var version = "0.2.0-alpha.51";
773
774
 
774
775
  // src/globalStore.ts
775
776
  if (globalThis.__valdres__) {
@@ -1,6 +1,7 @@
1
1
  import type { GetValue } from "./GetValue";
2
2
  import type { ResetAtom } from "./ResetAtom";
3
3
  import type { SetAtom } from "./SetAtom";
4
+ import type { StoreData } from "./StoreData";
4
5
  import type { TransactionFn } from "./TransactionFn";
5
6
  export type TransactionInterface = {
6
7
  set: SetAtom;
@@ -8,4 +9,5 @@ export type TransactionInterface = {
8
9
  reset: ResetAtom;
9
10
  commit: () => void;
10
11
  scope: <Callback extends TransactionFn>(scopeId: string, callback: Callback) => ReturnType<Callback>;
12
+ data: StoreData;
11
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valdres",
3
- "version": "0.2.0-alpha.51",
3
+ "version": "0.2.0-alpha.52",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Eigil Sagafos"
@@ -36,5 +36,5 @@
36
36
  "access": "public",
37
37
  "registry": "https://registry.npmjs.org/"
38
38
  },
39
- "gitHead": "d4ffbce5b549566b6a36d0362c3408495a1f91f9"
39
+ "gitHead": "fbc7dd0ea79865876475542baafc0988684b8744"
40
40
  }