@artisan-commerce/state 0.2.2-canary.2 → 0.2.2-canary.4
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/CHANGELOG.md +17 -0
- package/build/lib/state.d.ts +27 -3
- package/build/main.bundle.js +1 -1
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [0.2.2-canary.4](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/state@0.2.2-canary.3...@artisan-commerce/state@0.2.2-canary.4) (2021-04-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **global:** fix updateActiveVendor utility function and state lib ([e5d9c52](https://bitbucket.org/tradesystem/artisan_monorepo/commit/e5d9c52455929782ada1762b03abb3363efe88cf))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### [0.2.2-canary.3](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/state@0.2.2-canary.2...@artisan-commerce/state@0.2.2-canary.3) (2021-04-16)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @artisan-commerce/state
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
### [0.2.2-canary.2](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/state@0.2.2-canary.1...@artisan-commerce/state@0.2.2-canary.2) (2021-04-06)
|
|
7
24
|
|
|
8
25
|
|
package/build/lib/state.d.ts
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @since 0.1.0
|
|
3
|
+
* @typedef State
|
|
4
|
+
*/
|
|
5
|
+
declare type State = Record<string, any>;
|
|
6
|
+
/**
|
|
7
|
+
* Initializes the global state.
|
|
8
|
+
*
|
|
9
|
+
* @since 0.1.0
|
|
10
|
+
* @param {T} initialState Initial global state
|
|
11
|
+
*/
|
|
12
|
+
export declare const initState: <T extends State>(initialState: T) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Updates the global state.
|
|
15
|
+
*
|
|
16
|
+
* @since 0.1.0
|
|
17
|
+
* @param {T} overrides Global state overrides
|
|
18
|
+
*/
|
|
19
|
+
export declare const setState: <T extends State>(overrides: Partial<T>) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the global state.
|
|
22
|
+
*
|
|
23
|
+
* @since 0.1.0
|
|
24
|
+
* @returns {T} The global state
|
|
25
|
+
*/
|
|
26
|
+
export declare const getState: <T extends State>() => T;
|
|
27
|
+
export {};
|
package/build/main.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("state",[],t):"object"==typeof exports?exports.state=t():e.state=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([,function(e,t,n){"use strict";n.r(t),n.d(t,"initState",(function(){return u})),n.d(t,"getState",(function(){return f})),n.d(t,"setState",(function(){return i}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=null,u=function(e){Object.freeze(e),o=r({},e),Object.seal(o)},i=function(e){var t=o?r({},o):{};o=null,o=r(r({},t),e),Object.seal(o)},f=function(){if(null===o)throw new Error("The state has not been initialized, make sure to call initState beforehand");return r({},o)}}])}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artisan-commerce/state",
|
|
3
3
|
"description": "Library used to share state functionality",
|
|
4
|
-
"version": "0.2.2-canary.
|
|
4
|
+
"version": "0.2.2-canary.4",
|
|
5
5
|
"main": "./build/main.bundle.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"avn": "^0.2.4",
|
|
43
43
|
"avn-nvm": "^0.2.2",
|
|
44
44
|
"clean-webpack-plugin": "^3.0.0",
|
|
45
|
-
"cross-env": "^7.0.2",
|
|
46
45
|
"dotenv-webpack": "^2.0.0",
|
|
47
46
|
"env-cmd": "^10.1.0",
|
|
48
47
|
"eslint": "^7.5.0",
|
|
@@ -71,5 +70,5 @@
|
|
|
71
70
|
"webpack-dev-server": "^3.11.0",
|
|
72
71
|
"webpack-merge": "^5.0.9"
|
|
73
72
|
},
|
|
74
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "5e25b79fe0ee1023e87be7d5e9c83d4144f1867f"
|
|
75
74
|
}
|