ソースを参照

release: v3.6.0

Kia King Ishii 4 年 前
コミット
c9dbb13d41
10 ファイル変更71 行追加18 行削除
  1. 11 0
      CHANGELOG.md
  2. 2 2
      dist/logger.js
  3. 7 3
      dist/vuex.common.js
  4. 7 3
      dist/vuex.esm.browser.js
  5. 1 1
      dist/vuex.esm.browser.min.js
  6. 7 3
      dist/vuex.esm.js
  7. 8 4
      dist/vuex.js
  8. 1 1
      dist/vuex.min.js
  9. 26 0
      dist/vuex.mjs
  10. 1 1
      package.json

+ 11 - 0
CHANGELOG.md

@@ -1,3 +1,14 @@
+# [3.6.0](https://github.com/vuejs/vuex/compare/v3.5.1...v3.6.0) (2020-11-25)
+
+### Bug Fixes
+
+* stop throwing an error on `hasModule` when parent does not exists ([#1850](https://github.com/vuejs/vuex/issues/1850)) ([#1851](https://github.com/vuejs/vuex/issues/1851)) ([12aabe4](https://github.com/vuejs/vuex/commit/12aabe4cc470916d40691097dcb95badb8212f5c))
+
+### Features
+
+* **types:** adding logger type for logger plugin ([#1853](https://github.com/vuejs/vuex/issues/1853)) ([cb3198d](https://github.com/vuejs/vuex/commit/cb3198d5998bdb11ef05dfa5ef98d5c5fa873089))
+* **build:** enable named esm module import on node.js >= 14 ([#1872](https://github.com/vuejs/vuex/issues/1872)) ([acddab2](https://github.com/vuejs/vuex/commit/acddab20769d1bb6125f2da78ac47561c682fc98))
+
 ## [3.5.1](https://github.com/vuejs/vuex/compare/v3.5.0...v3.5.1) (2020-06-29)
 
 

+ 2 - 2
dist/logger.js

@@ -1,12 +1,12 @@
 /*!
- * vuex v3.5.1
+ * vuex v3.6.0
  * (c) 2020 Evan You
  * @license MIT
  */
 (function (global, factory) {
   typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
   typeof define === 'function' && define.amd ? define(factory) :
-  (global = global || self, global.Vuex = factory());
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Vuex = factory());
 }(this, (function () { 'use strict';
 
   /**

+ 7 - 3
dist/vuex.common.js

@@ -1,5 +1,5 @@
 /*!
- * vuex v3.5.1
+ * vuex v3.6.0
  * (c) 2020 Evan You
  * @license MIT
  */
@@ -288,7 +288,11 @@ ModuleCollection.prototype.isRegistered = function isRegistered (path) {
   var parent = this.get(path.slice(0, -1));
   var key = path[path.length - 1];
 
-  return parent.hasChild(key)
+  if (parent) {
+    return parent.hasChild(key)
+  }
+
+  return false
 };
 
 function update (path, targetModule, newModule) {
@@ -1228,7 +1232,7 @@ function pad (num, maxLength) {
 var index_cjs = {
   Store: Store,
   install: install,
-  version: '3.5.1',
+  version: '3.6.0',
   mapState: mapState,
   mapMutations: mapMutations,
   mapGetters: mapGetters,

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

@@ -1,5 +1,5 @@
 /*!
- * vuex v3.5.1
+ * vuex v3.6.0
  * (c) 2020 Evan You
  * @license MIT
  */
@@ -278,7 +278,11 @@ class ModuleCollection {
     const parent = this.get(path.slice(0, -1));
     const key = path[path.length - 1];
 
-    return parent.hasChild(key)
+    if (parent) {
+      return parent.hasChild(key)
+    }
+
+    return false
   }
 }
 
@@ -1183,7 +1187,7 @@ function pad (num, maxLength) {
 var index = {
   Store,
   install,
-  version: '3.5.1',
+  version: '3.6.0',
   mapState,
   mapMutations,
   mapGetters,

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/vuex.esm.browser.min.js


+ 7 - 3
dist/vuex.esm.js

@@ -1,5 +1,5 @@
 /*!
- * vuex v3.5.1
+ * vuex v3.6.0
  * (c) 2020 Evan You
  * @license MIT
  */
@@ -286,7 +286,11 @@ ModuleCollection.prototype.isRegistered = function isRegistered (path) {
   var parent = this.get(path.slice(0, -1));
   var key = path[path.length - 1];
 
-  return parent.hasChild(key)
+  if (parent) {
+    return parent.hasChild(key)
+  }
+
+  return false
 };
 
 function update (path, targetModule, newModule) {
@@ -1226,7 +1230,7 @@ function pad (num, maxLength) {
 var index = {
   Store: Store,
   install: install,
-  version: '3.5.1',
+  version: '3.6.0',
   mapState: mapState,
   mapMutations: mapMutations,
   mapGetters: mapGetters,

+ 8 - 4
dist/vuex.js

@@ -1,12 +1,12 @@
 /*!
- * vuex v3.5.1
+ * vuex v3.6.0
  * (c) 2020 Evan You
  * @license MIT
  */
 (function (global, factory) {
   typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
   typeof define === 'function' && define.amd ? define(factory) :
-  (global = global || self, global.Vuex = factory());
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Vuex = factory());
 }(this, (function () { 'use strict';
 
   function applyMixin (Vue) {
@@ -292,7 +292,11 @@
     var parent = this.get(path.slice(0, -1));
     var key = path[path.length - 1];
 
-    return parent.hasChild(key)
+    if (parent) {
+      return parent.hasChild(key)
+    }
+
+    return false
   };
 
   function update (path, targetModule, newModule) {
@@ -1232,7 +1236,7 @@
   var index_cjs = {
     Store: Store,
     install: install,
-    version: '3.5.1',
+    version: '3.6.0',
     mapState: mapState,
     mapMutations: mapMutations,
     mapGetters: mapGetters,

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/vuex.min.js


+ 26 - 0
dist/vuex.mjs

@@ -0,0 +1,26 @@
+import Vuex from '../dist/vuex.common.js'
+
+const {
+  Store,
+  install,
+  version,
+  mapState,
+  mapMutations,
+  mapGetters,
+  mapActions,
+  createNamespacedHelpers,
+  createLogger
+} = Vuex
+
+export {
+  Vuex as default,
+  Store,
+  install,
+  version,
+  mapState,
+  mapMutations,
+  mapGetters,
+  mapActions,
+  createNamespacedHelpers,
+  createLogger
+}

+ 1 - 1
package.json

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

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません