@encodable/registry
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.3.0](https://github.com/apache-superset/encodable/compare/@encodable/registry@0.2.0...@encodable/registry@0.3.0) (2020-08-03) | ||
### Features | ||
* **registry:** store schema version ([#49](https://github.com/apache-superset/encodable/issues/49)) ([19072be](https://github.com/apache-superset/encodable/commit/19072be4ba14ea277d963499e1ff54c2f9a828ff)) | ||
# [0.2.0](https://github.com/apache-superset/encodable/compare/@encodable/registry@0.1.2...@encodable/registry@0.2.0) (2020-08-03) | ||
@@ -8,0 +19,0 @@ |
@@ -17,2 +17,3 @@ "use strict"; | ||
name, | ||
version = '0.x.x', | ||
defaultKey, | ||
@@ -25,2 +26,3 @@ setFirstItemAsDefault = false, | ||
name, | ||
version, | ||
defaultKey, | ||
@@ -27,0 +29,0 @@ initialDefaultKey: defaultKey, |
@@ -34,3 +34,3 @@ "use strict"; | ||
} else { | ||
this.store = (0, _globalBox.getStore)().getOrCreate(config.globalId, () => (0, _createRegistryStore.default)(config)); | ||
this.store = (0, _globalBox.globalBox)().getOrCreate(config.globalId, () => (0, _createRegistryStore.default)(config)); | ||
} | ||
@@ -37,0 +37,0 @@ } |
@@ -6,3 +6,3 @@ import { RegistryConfig, RegistryStore } from '../types'; | ||
*/ | ||
export default function createRegistryStore<V, W extends V | Promise<V>>({ globalId, name, defaultKey, setFirstItemAsDefault, overwritePolicy, }: RegistryConfig): RegistryStore<V, W>; | ||
export default function createRegistryStore<V, W extends V | Promise<V>>({ globalId, name, version, defaultKey, setFirstItemAsDefault, overwritePolicy, }: RegistryConfig): RegistryStore<V, W>; | ||
//# sourceMappingURL=createRegistryStore.d.ts.map |
@@ -17,2 +17,3 @@ "use strict"; | ||
name, | ||
version = '0.x.x', | ||
defaultKey, | ||
@@ -25,2 +26,3 @@ setFirstItemAsDefault = false, | ||
name, | ||
version, | ||
defaultKey, | ||
@@ -27,0 +29,0 @@ initialDefaultKey: defaultKey, |
@@ -34,3 +34,3 @@ "use strict"; | ||
} else { | ||
this.store = (0, _globalBox.getStore)().getOrCreate(config.globalId, () => (0, _createRegistryStore.default)(config)); | ||
this.store = (0, _globalBox.globalBox)().getOrCreate(config.globalId, () => (0, _createRegistryStore.default)(config)); | ||
} | ||
@@ -37,0 +37,0 @@ } |
@@ -17,2 +17,4 @@ import OverwritePolicy from '../models/OverwritePolicy'; | ||
name?: string; | ||
/** schema version, can be used to check compatibility */ | ||
version: string; | ||
/** | ||
@@ -47,2 +49,4 @@ * fallback key to use if `.get()` was called without a key | ||
globalId?: string; | ||
/** schema version, can be used to check compatibility */ | ||
version?: string; | ||
/** name of this registry */ | ||
@@ -49,0 +53,0 @@ name?: string; |
{ | ||
"name": "@encodable/registry", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Reusable registry models", | ||
@@ -36,3 +36,3 @@ "sideEffects": false, | ||
}, | ||
"gitHead": "5eff11e2bddd7cb3ba0c713d3d4eeefd5aed10e4" | ||
"gitHead": "5a8a0ccfc183b8d5e58dafe2352a6190f2d76c39" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
44580
824