@rest-hooks/endpoint
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -6,2 +6,10 @@ # Change Log | ||
## <small>0.6.1 (2020-08-09)</small> | ||
* fix: extend() correctly keeps options for FetchShape compat ([bf522a2](https://github.com/coinbase/rest-hooks/commit/bf522a2)) | ||
## 0.6.0 (2020-08-08) | ||
@@ -8,0 +16,0 @@ |
@@ -165,3 +165,3 @@ 'use strict'; | ||
runCompat(instance, Object.assign({}, this, options)); | ||
runCompat(instance, Object.assign({}, this.options, options)); | ||
return instance; | ||
@@ -168,0 +168,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@rest-hooks/normalizr")):"function"==typeof define&&define.amd?define(["exports","@rest-hooks/normalizr"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).restHookCore={},e.normalizr)}(this,(function(e,t){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return(u=c()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function f(e){var t="function"==typeof Map?new Map:void 0;return(f=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i(r,e)})(e)}function s(e,t){e.type=e.sideEffect?"mutate":"read",e.options=Object.assign({},t),delete e.options.key,delete e.options.schema,delete e.options.sideEffect,delete e.options.fetch,delete e.options.getFetchKey,delete e.options.options,0===Object.keys(e.options).length&&delete e.options,void 0===e.schema&&(e.schema=null)}var a=function(e){function t(t,r){var o;return(o=e.call(this,"return arguments.callee.fetch.apply(arguments.callee, arguments)")||this).getFetchKey=function(e){return o.key(e)},t&&(o.fetch=t),Object.assign(n(o),r),s(n(o),r),o}r(t,e);var o=t.prototype;return o.key=function(e){return this.fetch.name+" "+JSON.stringify(e)},o.extend=function(e){var t=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(this.constructor);Object.assign(t.prototype,this);var n=new t(e.fetch,e);return s(n,Object.assign({},this,e)),n},t}(f(Function)),p=function(){function e(e,t){var n=this;this.getFetchKey=function(e){return n.key(e)},this.schema=e,t&&(this.key=t)}return e.prototype.key=function(e){return JSON.stringify(e)},e}();Object.defineProperty(e,"AbstractInstanceType",{enumerable:!0,get:function(){return t.AbstractInstanceType}}),Object.defineProperty(e,"DELETED",{enumerable:!0,get:function(){return t.DELETED}}),Object.defineProperty(e,"Entity",{enumerable:!0,get:function(){return t.Entity}}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return t.Schema}}),Object.defineProperty(e,"SimpleRecord",{enumerable:!0,get:function(){return t.SimpleRecord}}),Object.defineProperty(e,"denormalize",{enumerable:!0,get:function(){return t.denormalize}}),Object.defineProperty(e,"isEntity",{enumerable:!0,get:function(){return t.isEntity}}),Object.defineProperty(e,"normalize",{enumerable:!0,get:function(){return t.normalize}}),Object.defineProperty(e,"schema",{enumerable:!0,get:function(){return t.schema}}),e.Endpoint=a,e.Index=p,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@rest-hooks/normalizr")):"function"==typeof define&&define.amd?define(["exports","@rest-hooks/normalizr"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).restHookCore={},e.normalizr)}(this,(function(e,t){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return(u=c()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function f(e){var t="function"==typeof Map?new Map:void 0;return(f=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i(r,e)})(e)}function s(e,t){e.type=e.sideEffect?"mutate":"read",e.options=Object.assign({},t),delete e.options.key,delete e.options.schema,delete e.options.sideEffect,delete e.options.fetch,delete e.options.getFetchKey,delete e.options.options,0===Object.keys(e.options).length&&delete e.options,void 0===e.schema&&(e.schema=null)}var p=function(e){function t(t,r){var o;return(o=e.call(this,"return arguments.callee.fetch.apply(arguments.callee, arguments)")||this).getFetchKey=function(e){return o.key(e)},t&&(o.fetch=t),Object.assign(n(o),r),s(n(o),r),o}r(t,e);var o=t.prototype;return o.key=function(e){return this.fetch.name+" "+JSON.stringify(e)},o.extend=function(e){var t=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(this.constructor);Object.assign(t.prototype,this);var n=new t(e.fetch,e);return s(n,Object.assign({},this.options,e)),n},t}(f(Function)),a=function(){function e(e,t){var n=this;this.getFetchKey=function(e){return n.key(e)},this.schema=e,t&&(this.key=t)}return e.prototype.key=function(e){return JSON.stringify(e)},e}();Object.defineProperty(e,"AbstractInstanceType",{enumerable:!0,get:function(){return t.AbstractInstanceType}}),Object.defineProperty(e,"DELETED",{enumerable:!0,get:function(){return t.DELETED}}),Object.defineProperty(e,"Entity",{enumerable:!0,get:function(){return t.Entity}}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return t.Schema}}),Object.defineProperty(e,"SimpleRecord",{enumerable:!0,get:function(){return t.SimpleRecord}}),Object.defineProperty(e,"denormalize",{enumerable:!0,get:function(){return t.denormalize}}),Object.defineProperty(e,"isEntity",{enumerable:!0,get:function(){return t.isEntity}}),Object.defineProperty(e,"normalize",{enumerable:!0,get:function(){return t.normalize}}),Object.defineProperty(e,"schema",{enumerable:!0,get:function(){return t.schema}}),e.Endpoint=p,e.Index=a,Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -46,3 +46,3 @@ function runCompat(endpoint, options) { | ||
runCompat(instance, Object.assign({}, this, options)); | ||
runCompat(instance, Object.assign({}, this.options, options)); | ||
return instance; | ||
@@ -54,2 +54,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9lbmRwb2ludC5qcyJdLCJuYW1lcyI6WyJydW5Db21wYXQiLCJlbmRwb2ludCIsIm9wdGlvbnMiLCJ0eXBlIiwic2lkZUVmZmVjdCIsImtleSIsInNjaGVtYSIsImZldGNoIiwiZ2V0RmV0Y2hLZXkiLCJPYmplY3QiLCJrZXlzIiwibGVuZ3RoIiwidW5kZWZpbmVkIiwiRW5kcG9pbnQiLCJGdW5jdGlv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ks/endpoint", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Declarative Network Interface Definitions", | ||
@@ -57,3 +57,3 @@ "sideEffects": false, | ||
}, | ||
"gitHead": "529b34f1f4913a4266abb2eddf345332e063ca1a" | ||
"gitHead": "fd8e457af82610927a6a120e02801f0f59d29150" | ||
} |
@@ -37,3 +37,3 @@ function runCompat(endpoint, options) { | ||
/** The following is for compatibility with FetchShape */ | ||
runCompat(instance, { ...this, ...options }); | ||
runCompat(instance, { ...this.options, ...options }); | ||
@@ -40,0 +40,0 @@ return instance; |
90961