From e78aebf42ffdfc0afd9db88587f053069ef1e904 Mon Sep 17 00:00:00 2001 From: Yangshun Date: Sat, 11 Dec 2021 07:30:16 +0800 Subject: [PATCH] v4.0.3 --- CHANGELOG.md | 4 +++ dist/Flux.js | 2 +- dist/Flux.min.js | 2 +- dist/FluxUtils.js | 69 +++++++++++++++++++++++++++++++++++++++---- dist/FluxUtils.min.js | 8 ++--- package.json | 2 +- yarn.lock | 18 +++++++++++ 7 files changed, 92 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4a71a98..ff624496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +### 4.0.3 + +- Upgraded `fbjs` to 3.0.1 which fixes [CVE-2021-27292](https://www.whitesourcesoftware.com/vulnerability-database/CVE-2021-27292) + ### 4.0.2 - Added support for `UNSAFE_componentWillReceiveProps` lifecycle method diff --git a/dist/Flux.js b/dist/Flux.js index 61616df3..2a74060f 100644 --- a/dist/Flux.js +++ b/dist/Flux.js @@ -1,5 +1,5 @@ /** - * Flux v4.0.2 + * Flux v4.0.3 */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') diff --git a/dist/Flux.min.js b/dist/Flux.min.js index d59add32..d44c5a4f 100644 --- a/dist/Flux.min.js +++ b/dist/Flux.min.js @@ -1,5 +1,5 @@ /** - * Flux v4.0.2 + * Flux v4.0.3 * * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/dist/FluxUtils.js b/dist/FluxUtils.js index 32dc1a25..47e584a9 100644 --- a/dist/FluxUtils.js +++ b/dist/FluxUtils.js @@ -1,5 +1,5 @@ /** - * Flux v4.0.2 + * Flux v4.0.3 */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') @@ -3554,7 +3554,7 @@ return /******/ (function(modules) { // webpackBootstrap var FluxStore = __webpack_require__(11); - var abstractMethod = __webpack_require__(18); + var abstractMethod = __webpack_require__(19); var invariant = __webpack_require__(4); /** @@ -3832,9 +3832,9 @@ return /******/ (function(modules) { // webpackBootstrap var EventSubscriptionVendor = __webpack_require__(16); - var invariant = __webpack_require__(4); + var invariant = __webpack_require__(17); - var emptyFunction = __webpack_require__(17); + var emptyFunction = __webpack_require__(18); /** * @class BaseEventEmitter * @description @@ -4133,7 +4133,7 @@ return /******/ (function(modules) { // webpackBootstrap */ 'use strict'; - var invariant = __webpack_require__(4); + var invariant = __webpack_require__(17); /** * EventSubscriptionVendor stores a set of EventSubscriptions that are * subscribed to a particular event type. @@ -4227,6 +4227,63 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), /* 17 */ +/***/ (function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + 'use strict'; + + var validateFormat = true ? function (format) { + if (format === undefined) { + throw new Error('invariant(...): Second argument must be a string.'); + } + } : function (format) {}; + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments to provide + * information about what broke and what you were expecting. + * + * The invariant message will be stripped in production, but the invariant will + * remain to ensure logic does not differ in production. + */ + + function invariant(condition, format) { + for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + validateFormat(format); + + if (!condition) { + var error; + + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return String(args[argIndex++]); + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // Skip invariant's own stack frame. + + throw error; + } + } + + module.exports = invariant; + +/***/ }), +/* 18 */ /***/ (function(module, exports) { "use strict"; @@ -4269,7 +4326,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = emptyFunction; /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { /** diff --git a/dist/FluxUtils.min.js b/dist/FluxUtils.min.js index 70fcdc9b..3e07e090 100644 --- a/dist/FluxUtils.min.js +++ b/dist/FluxUtils.min.js @@ -1,5 +1,5 @@ /** - * Flux v4.0.2 + * Flux v4.0.3 * * Copyright (c) Facebook, Inc. and its affiliates. * @@ -7,7 +7,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.FluxUtils=e():t.FluxUtils=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports.Container=r(1),t.exports.Mixin=r(9),t.exports.ReduceStore=r(10),t.exports.Store=r(11)},function(t,e,r){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function s(t){var e,r;for(e=1;e2?r-2:0),i=2;i2?r-2:0),i=2;i=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return i=!0,u=!1,{s:function(){c=c.call(t)},n:function(){var t=c.next();return i=t.done,t},e:function(t){u=!0,s=t},f:function(){try{i||null==c.return||c.return()}finally{if(u)throw s}}}}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{withProps:!1};return t=t.filter(function(t){return!!t}),{getInitialState:function(){return s(this),e.withProps?this.constructor.calculateState(null,this.props):this.constructor.calculateState(null,void 0)},componentWillMount:function(){var r,n=this,o=!1,i=function(){o=!0};this._fluxMixinSubscriptions=t.map(function(t){return t.addListener(i)}),r=function(){o&&n.setState(function(t){return e.withProps?n.constructor.calculateState(t,n.props):n.constructor.calculateState(t,void 0)}),o=!1},this._fluxMixinStoreGroup=new c(t,r)},componentWillUnmount:function(){var t,e,r;this._fluxMixinStoreGroup.release(),t=n(this._fluxMixinSubscriptions);try{for(t.s();!(e=t.n()).done;)r=e.value,r.remove()}catch(e){t.e(e)}finally{t.f()}this._fluxMixinSubscriptions=[]}}}function s(t){t.constructor.calculateState?void 0:a(!1)}var c=r(3),a=r(4);t.exports=u},function(t,e,r){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(11),c=r(18),a=r(4),f=function(t){function e(e){var r;return r=t.call(this,e)||this,u(n(r),"_state",void 0),r._state=r.getInitialState(),r}o(e,t);var r=e.prototype;return r.getState=function(){return this._state},r.getInitialState=function(){return c("FluxReduceStore","getInitialState")},r.reduce=function(t,e){return c("FluxReduceStore","reduce")},r.areEqual=function(t,e){return t===e},r.__invokeOnDispatch=function(t){var e,r;this.__changed=!1,e=this._state,r=this.reduce(e,t),void 0===r?a(!1):void 0,this.areEqual(e,r)||(this._state=r,this.__emitChange()),this.__changed&&this.__emitter.emit(this.__changeEvent)},e}(s);t.exports=f},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(12),i=o.EventEmitter,u=r(4),s=function(){function t(t){var e=this;n(this,"_dispatchToken",void 0),n(this,"__changed",void 0),n(this,"__changeEvent",void 0),n(this,"__className",void 0),n(this,"__dispatcher",void 0),n(this,"__emitter",void 0),this.__className=this.constructor.name,this.__changed=!1,this.__changeEvent="change",this.__dispatcher=t,this.__emitter=new i,this._dispatchToken=t.register(function(t){e.__invokeOnDispatch(t)})}var e=t.prototype;return e.addListener=function(t){return this.__emitter.addListener(this.__changeEvent,t)},e.getDispatcher=function(){return this.__dispatcher},e.getDispatchToken=function(){return this._dispatchToken},e.hasChanged=function(){return this.__dispatcher.isDispatching()?void 0:u(!1),this.__changed},e.__emitChange=function(){this.__dispatcher.isDispatching()?void 0:u(!1),this.__changed=!0},e.__invokeOnDispatch=function(t){this.__changed=!1,this.__onDispatch(t),this.__changed&&this.__emitter.emit(this.__changeEvent)},e.__onDispatch=function(t){u(!1)},t}();t.exports=s},function(t,e,r){var n={EventEmitter:r(13),EmitterSubscription:r(14)};t.exports=n},function(t,e,r){"use strict";var n=r(14),o=r(16),i=r(4),u=r(17),s=function(){function t(){this._subscriber=new o,this._currentSubscription=null}var e=t.prototype;return e.addListener=function(t,e,r){return this._subscriber.addSubscription(t,new n(this._subscriber,e,r))},e.once=function(t,e,r){var n=this;return this.addListener(t,function(){n.removeCurrentListener(),e.apply(r,arguments)})},e.removeAllListeners=function(t){this._subscriber.removeAllSubscriptions(t)},e.removeCurrentListener=function(){this._currentSubscription?void 0:i(!1),this._subscriber.removeSubscription(this._currentSubscription)},e.listeners=function(t){var e=this._subscriber.getSubscriptionsForType(t);return e?e.filter(u.thatReturnsTrue).map(function(t){return t.listener}):[]},e.emit=function(t){var e,r,n,o,i=this._subscriber.getSubscriptionsForType(t);if(i){for(e=Object.keys(i),r=0;r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return i=!0,u=!1,{s:function(){c=c.call(t)},n:function(){var t=c.next();return i=t.done,t},e:function(t){u=!0,s=t},f:function(){try{i||null==c.return||c.return()}finally{if(u)throw s}}}}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{withProps:!1};return t=t.filter(function(t){return!!t}),{getInitialState:function(){return s(this),e.withProps?this.constructor.calculateState(null,this.props):this.constructor.calculateState(null,void 0)},componentWillMount:function(){var r,n=this,o=!1,i=function(){o=!0};this._fluxMixinSubscriptions=t.map(function(t){return t.addListener(i)}),r=function(){o&&n.setState(function(t){return e.withProps?n.constructor.calculateState(t,n.props):n.constructor.calculateState(t,void 0)}),o=!1},this._fluxMixinStoreGroup=new c(t,r)},componentWillUnmount:function(){var t,e,r;this._fluxMixinStoreGroup.release(),t=n(this._fluxMixinSubscriptions);try{for(t.s();!(e=t.n()).done;)r=e.value,r.remove()}catch(e){t.e(e)}finally{t.f()}this._fluxMixinSubscriptions=[]}}}function s(t){t.constructor.calculateState?void 0:a(!1)}var c=r(3),a=r(4);t.exports=u},function(t,e,r){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(11),c=r(19),a=r(4),f=function(t){function e(e){var r;return r=t.call(this,e)||this,u(n(r),"_state",void 0),r._state=r.getInitialState(),r}o(e,t);var r=e.prototype;return r.getState=function(){return this._state},r.getInitialState=function(){return c("FluxReduceStore","getInitialState")},r.reduce=function(t,e){return c("FluxReduceStore","reduce")},r.areEqual=function(t,e){return t===e},r.__invokeOnDispatch=function(t){var e,r;this.__changed=!1,e=this._state,r=this.reduce(e,t),void 0===r?a(!1):void 0,this.areEqual(e,r)||(this._state=r,this.__emitChange()),this.__changed&&this.__emitter.emit(this.__changeEvent)},e}(s);t.exports=f},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(12),i=o.EventEmitter,u=r(4),s=function(){function t(t){var e=this;n(this,"_dispatchToken",void 0),n(this,"__changed",void 0),n(this,"__changeEvent",void 0),n(this,"__className",void 0),n(this,"__dispatcher",void 0),n(this,"__emitter",void 0),this.__className=this.constructor.name,this.__changed=!1,this.__changeEvent="change",this.__dispatcher=t,this.__emitter=new i,this._dispatchToken=t.register(function(t){e.__invokeOnDispatch(t)})}var e=t.prototype;return e.addListener=function(t){return this.__emitter.addListener(this.__changeEvent,t)},e.getDispatcher=function(){return this.__dispatcher},e.getDispatchToken=function(){return this._dispatchToken},e.hasChanged=function(){return this.__dispatcher.isDispatching()?void 0:u(!1),this.__changed},e.__emitChange=function(){this.__dispatcher.isDispatching()?void 0:u(!1),this.__changed=!0},e.__invokeOnDispatch=function(t){this.__changed=!1,this.__onDispatch(t),this.__changed&&this.__emitter.emit(this.__changeEvent)},e.__onDispatch=function(t){u(!1)},t}();t.exports=s},function(t,e,r){var n={EventEmitter:r(13),EmitterSubscription:r(14)};t.exports=n},function(t,e,r){"use strict";var n=r(14),o=r(16),i=r(17),u=r(18),s=function(){function t(){this._subscriber=new o,this._currentSubscription=null}var e=t.prototype;return e.addListener=function(t,e,r){return this._subscriber.addSubscription(t,new n(this._subscriber,e,r))},e.once=function(t,e,r){var n=this;return this.addListener(t,function(){n.removeCurrentListener(),e.apply(r,arguments)})},e.removeAllListeners=function(t){this._subscriber.removeAllSubscriptions(t)},e.removeCurrentListener=function(){this._currentSubscription?void 0:i(!1),this._subscriber.removeSubscription(this._currentSubscription)},e.listeners=function(t){var e=this._subscriber.getSubscriptionsForType(t);return e?e.filter(u.thatReturnsTrue).map(function(t){return t.listener}):[]},e.emit=function(t){var e,r,n,o,i=this._subscriber.getSubscriptionsForType(t);if(i){for(e=Object.keys(i),r=0;r2?r-2:0),i=2;i