From 48514d88c7acd318fbe34d2b5a5ee444c45a8646 Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 10 Dec 2023 08:33:51 +0100 Subject: [PATCH] redux v5.0.0 (#1610) --- THIRD_PARTY.txt | 1 + audit/audit.sh | 2 ++ modules/internal/targets.js | 1 + pages/updates/updates.html | 1 + resources/redux/5.0.0/note | 4 ++++ resources/redux/5.0.0/redux.min.jsm | 1 + 6 files changed, 10 insertions(+) create mode 100644 resources/redux/5.0.0/note create mode 100644 resources/redux/5.0.0/redux.min.jsm diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt index e9b26b15..87d84bee 100644 --- a/THIRD_PARTY.txt +++ b/THIRD_PARTY.txt @@ -1497,6 +1497,7 @@ https://cdnjs.cloudflare.com/ajax/libs/react-redux/8.1.3/react-redux.min.js https://cdnjs.cloudflare.com/ajax/libs/react-router/5.3.3/react-router.min.js https://cdnjs.cloudflare.com/ajax/libs/react-router/6.20.1/react-router.production.min.js https://cdnjs.cloudflare.com/ajax/libs/redux/4.2.1/redux.min.js +https://cdnjs.cloudflare.com/ajax/libs/redux/5.0.0/redux.legacy-esm.min.js https://cdnjs.cloudflare.com/ajax/libs/rickshaw/1.7.1/rickshaw.min.css https://cdnjs.cloudflare.com/ajax/libs/rickshaw/1.7.1/rickshaw.min.js https://cdnjs.cloudflare.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js diff --git a/audit/audit.sh b/audit/audit.sh index da937169..6c36e1f5 100755 --- a/audit/audit.sh +++ b/audit/audit.sh @@ -745,6 +745,8 @@ function create_url() { url="$CLOUDFLARE/$folder/$version/vue-router.min.js" elif [ "$folder" = "ScrollMagic" ] && [ "$jfile" != "ScrollMagic.min.js" ];then url="$CLOUDFLARE/$folder/$version/plugins/$jfile" + elif [ "$folder" = "redux" ] && [ "$version" != "4.2.1" ];then + url="$CLOUDFLARE/$folder/$version/redux.legacy-esm.min.js" # -------------------------------------------------------------------------- else if [ "$subfile" = "$jfile" ]; then diff --git a/modules/internal/targets.js b/modules/internal/targets.js index 367f282b..b56c9c89 100644 --- a/modules/internal/targets.js +++ b/modules/internal/targets.js @@ -402,6 +402,7 @@ targets.setLastVersion = function (type, version) { if (type.startsWith('/react-side-effect/')) return '2.1.2'; if (type.startsWith('/react-lifecycles-compat/')) return '3.0.4'; if (type.startsWith('/redux/4.')) return '4.2.1'; + if (type.startsWith('/redux/5.')) return '5.0.0'; if (type.startsWith('/rickshaw/1.')) return '1.7.1'; if (type.startsWith('/script.js/2.')) return '2.5.9'; if (type.startsWith('/scriptaculous/1.')) return '1.9.0'; diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 9ec3a75f..bba4f02a 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -46,6 +46,7 @@
  • hls.js v1.4.12 -> v1.4.13 (#1607)
  • instantsearch.js v4.60.0 -> v4.62.0 (#1608)
  • mdb-ui-kit v7.1.0 (#1609)
  • +
  • redux v5.0.0 (#1610)
  • diff --git a/resources/redux/5.0.0/note b/resources/redux/5.0.0/note new file mode 100644 index 00000000..5447b724 --- /dev/null +++ b/resources/redux/5.0.0/note @@ -0,0 +1,4 @@ +In this directory the file was renamed. + +Original: redux.legacy-esm.min.js +Now: redux.min.jsm diff --git a/resources/redux/5.0.0/redux.min.jsm b/resources/redux/5.0.0/redux.min.jsm new file mode 100644 index 00000000..ee8c79a4 --- /dev/null +++ b/resources/redux/5.0.0/redux.min.jsm @@ -0,0 +1 @@ +function formatProdErrorMessage(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $$observable=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),symbol_observable_default=$$observable,randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:"@@redux/INIT"+randomString(),REPLACE:"@@redux/REPLACE"+randomString(),PROBE_UNKNOWN_ACTION:()=>"@@redux/PROBE_UNKNOWN_ACTION"+randomString()},actionTypes_default=ActionTypes;function isPlainObject(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function miniKindOf(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(isDate(e))return"date";if(isError(e))return"error";var r=ctorName(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function ctorName(e){return"function"==typeof e.constructor?e.constructor.name:null}function isError(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}function isDate(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}function kindOf(e){let t=typeof e;return t="production"!==process.env.NODE_ENV?miniKindOf(e):t}function createStore(e,t,r){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(2):`Expected the root reducer to be a function. Instead, received: '${kindOf(e)}'`);if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(1):`Expected the enhancer to be a function. Instead, received: '${kindOf(r)}'`);return r(createStore)(e,t)}let o=e,n=t,i=new Map,s=i,a=0,c=!1;function u(){s===i&&(s=new Map,i.forEach((e,t)=>{s.set(t,e)}))}function d(){if(c)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return n}function f(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(4):`Expected the listener to be a function. Instead, received: '${kindOf(e)}'`);if(c)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;u();const r=a++;return s.set(r,e),function(){if(t){if(c)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,u(),s.delete(r),i=null}}}function p(e){if(!isPlainObject(e))throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(7):`Actions must be plain objects. Instead, the actual type was: '${kindOf(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(17):`Action "type" property must be a string. Instead, the actual type was: '${kindOf(e.type)}'. Value was: '${e.type}' (stringified)`);if(c)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(9):"Reducers may not dispatch actions.");try{c=!0,n=o(n,e)}finally{c=!1}const t=i=s;return t.forEach(e=>{e()}),e}return p({type:actionTypes_default.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(10):"Expected the nextReducer to be a function. Instead, received: '"+kindOf(e));o=e,p({type:actionTypes_default.REPLACE})},[symbol_observable_default]:function(){const r=f;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(11):`Expected the observer to be an object. Instead, received: '${kindOf(t)}'`);function e(){const e=t;e.next&&e.next(d())}return e(),{unsubscribe:r(e)}},[symbol_observable_default](){return this}}}}}function legacy_createStore(e,t,r){return createStore(e,t,r)}function warning(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function getUnexpectedStateShapeWarningMessage(e,t,r,o){const n=Object.keys(t);var i=r&&r.type===actionTypes_default.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===n.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject(e))return`The ${i} has unexpected type of "${kindOf(e)}". Expected argument to be an object with the following keys: "${n.join('", "')}"`;const s=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!o[e]);return s.forEach(e=>{o[e]=!0}),(!r||r.type!==actionTypes_default.REPLACE)&&0{const t=r[e];if(void 0===t(void 0,{type:actionTypes_default.INIT}))throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(12):`The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===t(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()}))throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(13):`The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function combineReducers(t){var r=Object.keys(t);const d={};for(let e=0;ee:1===e.length?e[0]:e.reduce((t,r)=>(...e)=>t(r(...e)))}function applyMiddleware(...i){return n=>(e,t)=>{e=n(e,t);let r=()=>{throw new Error("production"===process.env.NODE_ENV?formatProdErrorMessage(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const o={getState:e.getState,dispatch:(e,...t)=>r(e,...t)};t=i.map(e=>e(o));return r=compose(...t)(e.dispatch),{...e,dispatch:r}}}function isAction(e){return isPlainObject(e)&&"type"in e&&"string"==typeof e.type}export{actionTypes_default as __DO_NOT_USE__ActionTypes,applyMiddleware,bindActionCreators,combineReducers,compose,createStore,isAction,isPlainObject,legacy_createStore}; \ No newline at end of file