Browse Source

release: v3.5.1

ktsn 4 years ago
parent
commit
6b0014cada
9 changed files with 82 additions and 16 deletions
  1. 10 0
      CHANGELOG.md
  2. 1 1
      dist/logger.js
  3. 17 3
      dist/vuex.common.js
  4. 17 3
      dist/vuex.esm.browser.js
  5. 1 1
      dist/vuex.esm.browser.min.js
  6. 17 3
      dist/vuex.esm.js
  7. 17 3
      dist/vuex.js
  8. 1 1
      dist/vuex.min.js
  9. 1 1
      package.json

+ 10 - 0
CHANGELOG.md

@@ -1,3 +1,13 @@
+## [3.5.1](https://github.com/vuejs/vuex/compare/v3.5.0...v3.5.1) (2020-06-29)
+
+
+### Bug Fixes
+
+* **types:** add missing `logger.d.ts` file to the package ([#1789](https://github.com/vuejs/vuex/issues/1789)) ([a477334](https://github.com/vuejs/vuex/commit/a477334b909913f6a92bdbedcf4a3016a62eab7a))
+* warn when unregistering non existing module ([#1786](https://github.com/vuejs/vuex/issues/1786)) ([7cec79d](https://github.com/vuejs/vuex/commit/7cec79d339b874ec41f35891c891dfd27460c1d3))
+
+
+
 # [3.5.0](https://github.com/vuejs/vuex/compare/v3.4.0...v3.5.0) (2020-06-29)
 
 

+ 1 - 1
dist/logger.js

@@ -1,5 +1,5 @@
 /*!
- * vuex v3.5.0
+ * vuex v3.5.1
  * (c) 2020 Evan You
  * @license MIT
  */

+ 17 - 3
dist/vuex.common.js

@@ -1,5 +1,5 @@
 /*!
- * vuex v3.5.0
+ * vuex v3.5.1
  * (c) 2020 Evan You
  * @license MIT
  */
@@ -265,7 +265,21 @@ ModuleCollection.prototype.register = function register (path, rawModule, runtim
 ModuleCollection.prototype.unregister = function unregister (path) {
   var parent = this.get(path.slice(0, -1));
   var key = path[path.length - 1];
-  if (!parent.getChild(key).runtime) { return }
+  var child = parent.getChild(key);
+
+  if (!child) {
+    if ((process.env.NODE_ENV !== 'production')) {
+      console.warn(
+        "[vuex] trying to unregister module '" + key + "', which is " +
+        "not registered"
+      );
+    }
+    return
+  }
+
+  if (!child.runtime) {
+    return
+  }
 
   parent.removeChild(key);
 };
@@ -1214,7 +1228,7 @@ function pad (num, maxLength) {
 var index_cjs = {
   Store: Store,
   install: install,
-  version: '3.5.0',
+  version: '3.5.1',
   mapState: mapState,
   mapMutations: mapMutations,
   mapGetters: mapGetters,

+ 17 - 3
dist/vuex.esm.browser.js

@@ -1,5 +1,5 @@
 /*!
- * vuex v3.5.0
+ * vuex v3.5.1
  * (c) 2020 Evan You
  * @license MIT
  */
@@ -255,7 +255,21 @@ class ModuleCollection {
   unregister (path) {
     const parent = this.get(path.slice(0, -1));
     const key = path[path.length - 1];
-    if (!parent.getChild(key).runtime) return
+    const child = parent.getChild(key);
+
+    if (!child) {
+      {
+        console.warn(
+          `[vuex] trying to unregister module '${key}', which is ` +
+          `not registered`
+        );
+      }
+      return
+    }
+
+    if (!child.runtime) {
+      return
+    }
 
     parent.removeChild(key);
   }
@@ -1169,7 +1183,7 @@ function pad (num, maxLength) {
 var index = {
   Store,
   install,
-  version: '3.5.0',
+  version: '3.5.1',
   mapState,
   mapMutations,
   mapGetters,

File diff suppressed because it is too large
+ 1 - 1
dist/vuex.esm.browser.min.js


+ 17 - 3
dist/vuex.esm.js

@@ -1,5 +1,5 @@
 /*!
- * vuex v3.5.0
+ * vuex v3.5.1
  * (c) 2020 Evan You
  * @license MIT
  */
@@ -263,7 +263,21 @@ ModuleCollection.prototype.register = function register (path, rawModule, runtim
 ModuleCollection.prototype.unregister = function unregister (path) {
   var parent = this.get(path.slice(0, -1));
   var key = path[path.length - 1];
-  if (!parent.getChild(key).runtime) { return }
+  var child = parent.getChild(key);
+
+  if (!child) {
+    if ((process.env.NODE_ENV !== 'production')) {
+      console.warn(
+        "[vuex] trying to unregister module '" + key + "', which is " +
+        "not registered"
+      );
+    }
+    return
+  }
+
+  if (!child.runtime) {
+    return
+  }
 
   parent.removeChild(key);
 };
@@ -1212,7 +1226,7 @@ function pad (num, maxLength) {
 var index = {
   Store: Store,
   install: install,
-  version: '3.5.0',
+  version: '3.5.1',
   mapState: mapState,
   mapMutations: mapMutations,
   mapGetters: mapGetters,

+ 17 - 3
dist/vuex.js

@@ -1,5 +1,5 @@
 /*!
- * vuex v3.5.0
+ * vuex v3.5.1
  * (c) 2020 Evan You
  * @license MIT
  */
@@ -269,7 +269,21 @@
   ModuleCollection.prototype.unregister = function unregister (path) {
     var parent = this.get(path.slice(0, -1));
     var key = path[path.length - 1];
-    if (!parent.getChild(key).runtime) { return }
+    var child = parent.getChild(key);
+
+    if (!child) {
+      {
+        console.warn(
+          "[vuex] trying to unregister module '" + key + "', which is " +
+          "not registered"
+        );
+      }
+      return
+    }
+
+    if (!child.runtime) {
+      return
+    }
 
     parent.removeChild(key);
   };
@@ -1218,7 +1232,7 @@
   var index_cjs = {
     Store: Store,
     install: install,
-    version: '3.5.0',
+    version: '3.5.1',
     mapState: mapState,
     mapMutations: mapMutations,
     mapGetters: mapGetters,

File diff suppressed because it is too large
+ 1 - 1
dist/vuex.min.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "vuex",
-  "version": "3.5.0",
+  "version": "3.5.1",
   "description": "state management for Vue.js",
   "main": "dist/vuex.common.js",
   "module": "dist/vuex.esm.js",

Some files were not shown because too many files changed in this diff